PageSourceSearch

https://slaygent.ai/assets/index-Dw2GVSeF.js

js slaygent.ai collected 2026-10-05 12:39:21 UTC 2,787,980 bytes, 4,601 lines download raw bytes

vendor: 5,817 bytes, lines 1-9
1var Rse=Object.defineProperty;var BI=e=>{throw TypeError(e)};var Ise=(e,t,n)=>t in e?Rse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E1=(e,t,n)=>Ise(e,typeof t!="symbol"?t+"":t,n),k1=(e,t,n)=>t.has(e)||BI("Cannot "+n);var Q=(e,t,n)=>(k1(e,t,"read from private field"),n?n.call(e):t.get(e)),gt=(e,t,n)=>t.has(e)?BI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ue=(e,t,n,r)=>(k1(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ht=(e,t,n)=>(k1(e,t,"access private method"),n);var Qx=(e,t,n,r)=>({set _(a){Ue(e,t,a,n)},get _(){return Q(e,t,r)}});function eU(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)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(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Bo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mse(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var tU={exports:{}},lS={},nU={exports:{}},Ft={};/**
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 Vy=Symbol.for("react.element"),Dse=Symbol.for("react.portal"),Lse=Symbol.for("react.fragment"),$se=Symbol.for("react.strict_mode"),Fse=Symbol.for("react.profiler"),Bse=Symbol.for("react.provider"),zse=Symbol.for("react.context"),Use=Symbol.for("react.forward_ref"),qse=Symbol.for("react.suspense"),Wse=Symbol.for("react.memo"),Vse=Symbol.for("react.lazy"),zI=Symbol.iterator;function Hse(e){return e===null||typeof e!="object"?null:(e=zI&&e[zI]||e["@@iterator"],typeof e=="function"?e:null)}var rU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sU=Object.assign,aU={};function am(e,t,n){this.props=e,this.context=t,this.refs=aU,this.updater=n||rU}am.prototype.isReactComponent={};am.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};am.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function iU(){}iU.prototype=am.prototype;function MT(e,t,n){this.props=e,this.context=t,this.refs=aU,this.updater=n||rU}var DT=MT.prototype=new iU;DT.constructor=MT;sU(DT,am.prototype);DT.isPureReactComponent=!0;var UI=Array.isArray,oU=Object.prototype.hasOwnProperty,LT={current:null},lU={key:!0,ref:!0,__self:!0,__source:!0};function cU(e,t,n){var r,a={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)oU.call(t,r)&&!lU.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return{$$typeof:Vy,type:e,key:i,ref:o,props:a,_owner:LT.current}}function Gse(e,t){return{$$typeof:Vy,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $T(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vy}function Kse(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qI=/\/+/g;function P1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Kse(""+e.key):t.toString(36)}function wb(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Vy:case Dse:o=!0}}if(o)return o=e,a=a(o),e=r===""?"."+P1(o,0):r,UI(a)?(n="",e!=null&&(n=e.replace(qI,"$&/")+"/"),wb(a,t,n,"",function(u){return u})):a!=null&&($T(a)&&(a=Gse(a,n+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(qI,"$&/")+"/")+e)),t.push(a)),1;if(o=0,r=r===""?".":r+":",UI(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+P1(i,l);o+=wb(i,t,n,c,a)}else if(c=Hse(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+P1(i,l++),o+=wb(i,t,n,c,a);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}
vendor: 6,051 bytes, lines 9-25
9function Zx(e,t,n){if(e==null)return e;var r=[],a=0;return wb(e,r,"","",function(i){return t.call(n,i,a++)}),r}function Yse(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ps={current:null},Sb={transition:null},Xse={ReactCurrentDispatcher:Ps,ReactCurrentBatchConfig:Sb,ReactCurrentOwner:LT};function uU(){throw Error("act(...) is not supported in production builds of React.")}Ft.Children={map:Zx,forEach:function(e,t,n){Zx(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Zx(e,function(){t++}),t},toArray:function(e){return Zx(e,function(t){return t})||[]},only:function(e){if(!$T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ft.Component=am;Ft.Fragment=Lse;Ft.Profiler=Fse;Ft.PureComponent=MT;Ft.StrictMode=$se;Ft.Suspense=qse;Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xse;Ft.act=uU;Ft.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=sU({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=LT.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)oU.call(t,c)&&!lU.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Vy,type:e.type,key:a,ref:i,props:r,_owner:o}};Ft.createContext=function(e){return e={$$typeof:zse,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Bse,_context:e},e.Consumer=e};Ft.createElement=cU;Ft.createFactory=function(e){var t=cU.bind(null,e);return t.type=e,t};Ft.createRef=function(){return{current:null}};Ft.forwardRef=function(e){return{$$typeof:Use,render:e}};Ft.isValidElement=$T;Ft.lazy=function(e){return{$$typeof:Vse,_payload:{_status:-1,_result:e},_init:Yse}};Ft.memo=function(e,t){return{$$typeof:Wse,type:e,compare:t===void 0?null:t}};Ft.startTransition=function(e){var t=Sb.transition;Sb.transition={};try{e()}finally{Sb.transition=t}};Ft.unstable_act=uU;Ft.useCallback=function(e,t){return Ps.current.useCallback(e,t)};Ft.useContext=function(e){return Ps.current.useContext(e)};Ft.useDebugValue=function(){};Ft.useDeferredValue=function(e){return Ps.current.useDeferredValue(e)};Ft.useEffect=function(e,t){return Ps.current.useEffect(e,t)};Ft.useId=function(){return Ps.current.useId()};Ft.useImperativeHandle=function(e,t,n){return Ps.current.useImperativeHandle(e,t,n)};Ft.useInsertionEffect=function(e,t){return Ps.current.useInsertionEffect(e,t)};Ft.useLayoutEffect=function(e,t){return Ps.current.useLayoutEffect(e,t)};Ft.useMemo=function(e,t){return Ps.current.useMemo(e,t)};Ft.useReducer=function(e,t,n){return Ps.current.useReducer(e,t,n)};Ft.useRef=function(e){return Ps.current.useRef(e)};Ft.useState=function(e){return Ps.current.useState(e)};Ft.useSyncExternalStore=function(e,t,n){return Ps.current.useSyncExternalStore(e,t,n)};Ft.useTransition=function(){return Ps.current.useTransition()};Ft.version="18.3.1";nU.exports=Ft;var g=nU.exports;const z=$t(g),cS=eU({__proto__:null,default:z},[g]);/**
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 Qse=g,Zse=Symbol.for("react.element"),Jse=Symbol.for("react.fragment"),eae=Object.prototype.hasOwnProperty,tae=Qse.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nae={key:!0,ref:!0,__self:!0,__source:!0};function dU(e,t,n){var r,a={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)eae.call(t,r)&&!nae.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:Zse,type:e,key:i,ref:o,props:a,_owner:tae.current}}lS.Fragment=Jse;lS.jsx=dU;lS.jsxs=dU;tU.exports=lS;var s=tU.exports,hU={exports:{}},Ca={},fU={exports:{}},mU={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(T,F){var O=T.length;T.push(F);e:for(;0<O;){var E=O-1>>>1,D=T[E];if(0<a(D,F))T[E]=F,T[O]=D,O=E;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var F=T[0],O=T.pop();if(O!==F){T[0]=O;e:for(var E=0,D=T.length,M=D>>>1;E<M;){var X=2*(E+1)-1,W=T[X],re=X+1,ne=T[re];if(0>a(W,O))re<D&&0>a(ne,W)?(T[E]=ne,T[re]=O,E=re):(T[E]=W,T[X]=O,E=X);else if(re<D&&0>a(ne,O))T[E]=ne,T[re]=O,E=re;else break e}}return F}function a(T,F){var O=T.sortIndex-F.sortIndex;return O!==0?O:T.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,m=!1,y=!1,p=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=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(T){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=T)r(u),F.sortIndex=F.expirationTime,t(c,F);else break;F=n(u)}}function S(T){if(p=!1,w(T),!y)if(n(c)!==null)y=!0,L(j);else{var F=n(u);F!==null&&k(S,F.startTime-T)}}function j(T,F){y=!1,p&&(p=!1,v(_),_=-1),m=!0;var O=f;
vendor: 9,247 bytes, lines 25-34
25try{for(w(F),h=n(c);h!==null&&(!(h.expirationTime>F)||T&&!R());){var E=h.callback;if(typeof E=="function"){h.callback=null,f=h.priorityLevel;var D=E(h.expirationTime<=F);F=e.unstable_now(),typeof D=="function"?h.callback=D:h===n(c)&&r(c),w(F)}else r(c);h=n(c)}if(h!==null)var M=!0;else{var X=n(u);X!==null&&k(S,X.startTime-F),M=!1}return M}finally{h=null,f=O,m=!1}}var N=!1,C=null,_=-1,A=5,P=-1;function R(){return!(e.unstable_now()-P<A)}function I(){if(C!==null){var T=e.unstable_now();P=T;var F=!0;try{F=C(!0,T)}finally{F?B():(N=!1,C=null)}}else N=!1}var B;if(typeof b=="function")B=function(){b(I)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,q=$.port2;$.port1.onmessage=I,B=function(){q.postMessage(null)}}else B=function(){x(I,0)};function L(T){C=T,N||(N=!0,B())}function k(T,F){_=x(function(){T(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,L(j))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var F=3;break;default:F=f}var O=f;f=F;try{return T()}finally{f=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,F){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var O=f;f=T;try{return F()}finally{f=O}},e.unstable_scheduleCallback=function(T,F,O){var E=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?E+O:E):O=E,T){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=O+D,T={id:d++,callback:F,priorityLevel:T,startTime:O,expirationTime:D,sortIndex:-1},O>E?(T.sortIndex=O,t(u,T),n(c)===null&&T===n(u)&&(p?(v(_),_=-1):p=!0,k(S,O-E))):(T.sortIndex=D,t(c,T),y||m||(y=!0,L(j))),T},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(T){var F=f;return function(){var O=f;f=F;try{return T.apply(this,arguments)}finally{f=O}}}})(mU);fU.exports=mU;var rae=fU.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 sae=g,Na=rae;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pU=new Set,fg={};function fd(e,t){of(e,t),of(e+"Capture",t)}function of(e,t){for(fg[e]=t,e=0;e<t.length;e++)pU.add(t[e])}var Zo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fC=Object.prototype.hasOwnProperty,aae=/^[: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]*$/,WI={},VI={};function iae(e){return fC.call(VI,e)?!0:fC.call(WI,e)?!1:aae.test(e)?VI[e]=!0:(WI[e]=!0,!1)}function oae(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lae(e,t,n,r){if(t===null||typeof t>"u"||oae(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ts(e,t,n,r,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var qr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qr[e]=new Ts(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qr[t]=new Ts(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qr[e]=new Ts(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qr[e]=new Ts(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){qr[e]=new Ts(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qr[e]=new Ts(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qr[e]=new Ts(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qr[e]=new Ts(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qr[e]=new Ts(e,5,!1,e.toLowerCase(),null,!1,!1)});var FT=/[\-:]([a-z])/g;function BT(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(FT,BT);qr[t]=new Ts(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(FT,BT);qr[t]=new Ts(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(FT,BT);qr[t]=new Ts(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qr[e]=new Ts(e,1,!1,e.toLowerCase(),null,!1,!1)});qr.xlinkHref=new Ts("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qr[e]=new Ts(e,1,!1,e.toLowerCase(),null,!0,!0)});function zT(e,t,n,r){var a=qr.hasOwnProperty(t)?qr[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(lae(t,n,a,r)&&(n=null),r||a===null?iae(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,r=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var hl=sae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Jx=Symbol.for("react.element"),lh=Symbol.for("react.portal"),ch=Symbol.for("react.fragment"),UT=Symbol.for("react.strict_mode"),mC=Symbol.for("react.profiler"),gU=Symbol.for("react.provider"),yU=Symbol.for("react.context"),qT=Symbol.for("react.forward_ref"),pC=Symbol.for("react.suspense"),gC=Symbol.for("react.suspense_list"),WT=Symbol.for("react.memo"),Dl=Symbol.for("react.lazy"),xU=Symbol.for("react.offscreen"),HI=Symbol.iterator;function Wm(e){return e===null||typeof e!="object"?null:(e=HI&&e[HI]||e["@@iterator"],typeof e=="function"?e:null)}var Wn=Object.assign,T1;function Sp(e){if(T1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);T1=t&&t[1]||""}return`
34`+T1+e}var A1=!1;function O1(e,t){if(!e||A1)return"";A1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 4,647 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var a=u.stack.split(`
35`),i=r.stack.split(`
36`),o=a.length-1,l=i.length-1;1<=o&&0<=l&&a[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(a[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||a[o]!==i[l]){var c=`
37`+a[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{A1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sp(e):""}function cae(e){switch(e.tag){case 5:return Sp(e.type);case 16:return Sp("Lazy");case 13:return Sp("Suspense");case 19:return Sp("SuspenseList");case 0:case 2:case 15:return e=O1(e.type,!1),e;case 11:return e=O1(e.type.render,!1),e;case 1:return e=O1(e.type,!0),e;default:return""}}function yC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ch:return"Fragment";case lh:return"Portal";case mC:return"Profiler";case UT:return"StrictMode";case pC:return"Suspense";case gC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yU:return(e.displayName||"Context")+".Consumer";case gU:return(e._context.displayName||"Context")+".Provider";case qT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case WT:return t=e.displayName||null,t!==null?t:yC(e.type)||"Memo";case Dl:t=e._payload,e=e._init;try{return yC(e(t))}catch{}}return null}function uae(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yC(t);case 8:return t===UT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vU(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dae(e){var t=vU(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ev(e){e._valueTracker||(e._valueTracker=dae(e))}function bU(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vU(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Kb(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xC(e,t){var n=t.checked;return Wn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function GI(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wU(e,t){t=t.checked,t!=null&&zT(e,"checked",t,!1)}function vC(e,t){wU(e,t);var n=wc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bC(e,t.type,n):t.hasOwnProperty("defaultValue")&&bC(e,t.type,wc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function KI(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}
vendor: 13,586 bytes, line 37
37function bC(e,t,n){(t!=="number"||Kb(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jp=Array.isArray;function Th(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+wc(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function wC(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ne(91));return Wn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function YI(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ne(92));if(jp(n)){if(1<n.length)throw Error(Ne(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:wc(n)}}function SU(e,t){var n=wc(t.value),r=wc(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function XI(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function jU(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function SC(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?jU(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var tv,NU=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(tv=tv||document.createElement("div"),tv.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=tv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mg(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Op={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},hae=["Webkit","ms","Moz","O"];Object.keys(Op).forEach(function(e){hae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Op[t]=Op[e]})});function _U(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Op.hasOwnProperty(e)&&Op[e]?(""+t).trim():t+"px"}function CU(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=_U(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var fae=Wn({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 jC(e,t){if(t){if(fae[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function NC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _C=null;function VT(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var CC=null,Ah=null,Oh=null;function QI(e){if(e=Ky(e)){if(typeof CC!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=mS(t),CC(e.stateNode,e.type,t))}}function EU(e){Ah?Oh?Oh.push(e):Oh=[e]:Ah=e}function kU(){if(Ah){var e=Ah,t=Oh;if(Oh=Ah=null,QI(e),t)for(e=0;e<t.length;e++)QI(t[e])}}function PU(e,t){return e(t)}function TU(){}var R1=!1;function AU(e,t,n){if(R1)return e(t,n);R1=!0;try{return PU(e,t,n)}finally{R1=!1,(Ah!==null||Oh!==null)&&(TU(),kU())}}function pg(e,t){var n=e.stateNode;if(n===null)return null;var r=mS(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ne(231,t,typeof n));return n}var EC=!1;if(Zo)try{var Vm={};Object.defineProperty(Vm,"passive",{get:function(){EC=!0}}),window.addEventListener("test",Vm,Vm),window.removeEventListener("test",Vm,Vm)}catch{EC=!1}function mae(e,t,n,r,a,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Rp=!1,Yb=null,Xb=!1,kC=null,pae={onError:function(e){Rp=!0,Yb=e}};function gae(e,t,n,r,a,i,o,l,c){Rp=!1,Yb=null,mae.apply(pae,arguments)}function yae(e,t,n,r,a,i,o,l,c){if(gae.apply(this,arguments),Rp){if(Rp){var u=Yb;Rp=!1,Yb=null}else throw Error(Ne(198));Xb||(Xb=!0,kC=u)}}function md(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function OU(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ZI(e){if(md(e)!==e)throw Error(Ne(188))}function xae(e){var t=e.alternate;if(!t){if(t=md(e),t===null)throw Error(Ne(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return ZI(a),e;if(i===r)return ZI(a),t;i=i.sibling}throw Error(Ne(188))}if(n.return!==r.return)n=a,r=i;else{for(var o=!1,l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o)throw Error(Ne(189))}}if(n.alternate!==r)throw Error(Ne(190))}if(n.tag!==3)throw Error(Ne(188));return n.stateNode.current===n?e:t}function RU(e){return e=xae(e),e!==null?IU(e):null}function IU(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=IU(e);if(t!==null)return t;e=e.sibling}return null}var MU=Na.unstable_scheduleCallback,JI=Na.unstable_cancelCallback,vae=Na.unstable_shouldYield,bae=Na.unstable_requestPaint,er=Na.unstable_now,wae=Na.unstable_getCurrentPriorityLevel,HT=Na.unstable_ImmediatePriority,DU=Na.unstable_UserBlockingPriority,Qb=Na.unstable_NormalPriority,Sae=Na.unstable_LowPriority,LU=Na.unstable_IdlePriority,uS=null,oo=null;function jae(e){if(oo&&typeof oo.onCommitFiberRoot=="function")try{oo.onCommitFiberRoot(uS,e,void 0,(e.current.flags&128)===128)}catch{}}var Ei=Math.clz32?Math.clz32:Cae,Nae=Math.log,_ae=Math.LN2;function Cae(e){return e>>>=0,e===0?32:31-(Nae(e)/_ae|0)|0}var nv=64,rv=4194304;function Np(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zb(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~a;l!==0?r=Np(l):(i&=o,i!==0&&(r=Np(i)))}else o=n&~a,o!==0?r=Np(o):i!==0&&(r=Np(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ei(t),a=1<<n,r|=e[n],t&=~a;return r}function Eae(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kae(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ei(i),l=1<<o,c=a[o];c===-1?(!(l&n)||l&r)&&(a[o]=Eae(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function PC(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $U(){var e=nv;return nv<<=1,!(nv&4194240)&&(nv=64),e}function I1(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Hy(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ei(t),e[t]=n}function Pae(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-Ei(n),i=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~i}}function GT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ei(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var dn=0;function FU(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var BU,KT,zU,UU,qU,TC=!1,sv=[],sc=null,ac=null,ic=null,gg=new Map,yg=new Map,zl=[],Tae="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 eM(e,t){switch(e){case"focusin":case"focusout":sc=null;break;case"dragenter":case"dragleave":ac=null;break;case"mouseover":case"mouseout":ic=null;break;case"pointerover":case"pointerout":gg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yg.delete(t.pointerId)}}function Hm(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Ky(t),t!==null&&KT(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Aae(e,t,n,r,a){switch(t){case"focusin":return sc=Hm(sc,e,t,n,r,a),!0;case"dragenter":return ac=Hm(ac,e,t,n,r,a),!0;case"mouseover":return ic=Hm(ic,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return gg.set(i,Hm(gg.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,yg.set(i,Hm(yg.get(i)||null,e,t,n,r,a)),!0}return!1}function WU(e){var t=yu(e.target);if(t!==null){var n=md(t);if(n!==null){if(t=n.tag,t===13){if(t=OU(n),t!==null){e.blockedOn=t,qU(e.priority,function(){zU(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jb(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=AC(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_C=r,n.target.dispatchEvent(r),_C=null}else return t=Ky(n),t!==null&&KT(t),e.blockedOn=n,!1;t.shift()}return!0}function tM(e,t,n){jb(e)&&n.delete(t)}function Oae(){TC=!1,sc!==null&&jb(sc)&&(sc=null),ac!==null&&jb(ac)&&(ac=null),ic!==null&&jb(ic)&&(ic=null),gg.forEach(tM),yg.forEach(tM)}function Gm(e,t){e.blockedOn===t&&(e.blockedOn=null,TC||(TC=!0,Na.unstable_scheduleCallback(Na.unstable_NormalPriority,Oae)))}function xg(e){function t(a){return Gm(a,e)}if(0<sv.length){Gm(sv[0],e);for(var n=1;n<sv.length;n++){var r=sv[n];r.blockedOn===e&&(r.blockedOn=null)}}for(sc!==null&&Gm(sc,e),ac!==null&&Gm(ac,e),ic!==null&&Gm(ic,e),gg.forEach(t),yg.forEach(t),n=0;n<zl.length;n++)r=zl[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<zl.length&&(n=zl[0],n.blockedOn===null);)WU(n),n.blockedOn===null&&zl.shift()}var Rh=hl.ReactCurrentBatchConfig,Jb=!0;function Rae(e,t,n,r){var a=dn,i=Rh.transition;Rh.transition=null;try{dn=1,YT(e,t,n,r)}finally{dn=a,Rh.transition=i}}function Iae(e,t,n,r){var a=dn,i=Rh.transition;Rh.transition=null;try{dn=4,YT(e,t,n,r)}finally{dn=a,Rh.transition=i}}function YT(e,t,n,r){if(Jb){var a=AC(e,t,n,r);if(a===null)W1(e,t,r,e0,n),eM(e,r);else if(Aae(a,e,t,n,r))r.stopPropagation();else if(eM(e,r),t&4&&-1<Tae.indexOf(e)){for(;a!==null;){var i=Ky(a);if(i!==null&&BU(i),i=AC(e,t,n,r),i===null&&W1(e,t,r,e0,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else W1(e,t,r,null,n)}}var e0=null;function AC(e,t,n,r){if(e0=null,e=VT(r),e=yu(e),e!==null)if(t=md(e),t===null)e=null;else if(n=t.tag,n===13){if(e=OU(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return e0=e,null}
vendor: 8,608 bytes, line 37
37function VU(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(wae()){case HT:return 1;case DU:return 4;case Qb:case Sae:return 16;case LU:return 536870912;default:return 16}default:return 16}}var Jl=null,XT=null,Nb=null;function HU(){if(Nb)return Nb;var e,t=XT,n=t.length,r,a="value"in Jl?Jl.value:Jl.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===a[i-r];r++);return Nb=a.slice(e,1<r?1-r:void 0)}function _b(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function av(){return!0}function nM(){return!1}function Ea(e){function t(n,r,a,i,o){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?av:nM,this.isPropagationStopped=nM,this}return Wn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=av)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=av)},persist:function(){},isPersistent:av}),t}var im={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},QT=Ea(im),Gy=Wn({},im,{view:0,detail:0}),Mae=Ea(Gy),M1,D1,Km,dS=Wn({},Gy,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ZT,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Km&&(Km&&e.type==="mousemove"?(M1=e.screenX-Km.screenX,D1=e.screenY-Km.screenY):D1=M1=0,Km=e),M1)},movementY:function(e){return"movementY"in e?e.movementY:D1}}),rM=Ea(dS),Dae=Wn({},dS,{dataTransfer:0}),Lae=Ea(Dae),$ae=Wn({},Gy,{relatedTarget:0}),L1=Ea($ae),Fae=Wn({},im,{animationName:0,elapsedTime:0,pseudoElement:0}),Bae=Ea(Fae),zae=Wn({},im,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Uae=Ea(zae),qae=Wn({},im,{data:0}),sM=Ea(qae),Wae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vae={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"},Hae={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gae(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hae[e])?!!t[e]:!1}function ZT(){return Gae}var Kae=Wn({},Gy,{key:function(e){if(e.key){var t=Wae[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_b(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vae[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ZT,charCode:function(e){return e.type==="keypress"?_b(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_b(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yae=Ea(Kae),Xae=Wn({},dS,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),aM=Ea(Xae),Qae=Wn({},Gy,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ZT}),Zae=Ea(Qae),Jae=Wn({},im,{propertyName:0,elapsedTime:0,pseudoElement:0}),eie=Ea(Jae),tie=Wn({},dS,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),nie=Ea(tie),rie=[9,13,27,32],JT=Zo&&"CompositionEvent"in window,Ip=null;Zo&&"documentMode"in document&&(Ip=document.documentMode);var sie=Zo&&"TextEvent"in window&&!Ip,GU=Zo&&(!JT||Ip&&8<Ip&&11>=Ip),iM=" ",oM=!1;function KU(e,t){switch(e){case"keyup":return rie.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YU(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uh=!1;function aie(e,t){switch(e){case"compositionend":return YU(t);case"keypress":return t.which!==32?null:(oM=!0,iM);case"textInput":return e=t.data,e===iM&&oM?null:e;default:return null}}function iie(e,t){if(uh)return e==="compositionend"||!JT&&KU(e,t)?(e=HU(),Nb=XT=Jl=null,uh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return GU&&t.locale!=="ko"?null:t.data;default:return null}}var oie={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 lM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!oie[e.type]:t==="textarea"}function XU(e,t,n,r){EU(r),t=t0(t,"onChange"),0<t.length&&(n=new QT("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mp=null,vg=null;function lie(e){o8(e,0)}function hS(e){var t=fh(e);if(bU(t))return e}function cie(e,t){if(e==="change")return t}var QU=!1;if(Zo){var $1;if(Zo){var F1="oninput"in document;if(!F1){var cM=document.createElement("div");cM.setAttribute("oninput","return;"),F1=typeof cM.oninput=="function"}$1=F1}else $1=!1;QU=$1&&(!document.documentMode||9<document.documentMode)}function uM(){Mp&&(Mp.detachEvent("onpropertychange",ZU),vg=Mp=null)}function ZU(e){if(e.propertyName==="value"&&hS(vg)){var t=[];XU(t,vg,e,VT(e)),AU(lie,t)}}function uie(e,t,n){e==="focusin"?(uM(),Mp=t,vg=n,Mp.attachEvent("onpropertychange",ZU)):e==="focusout"&&uM()}function die(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hS(vg)}function hie(e,t){if(e==="click")return hS(t)}function fie(e,t){if(e==="input"||e==="change")return hS(t)}function mie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ri=typeof Object.is=="function"?Object.is:mie;function bg(e,t){if(Ri(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!fC.call(t,a)||!Ri(e[a],t[a]))return!1}return!0}function dM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hM(e,t){var n=dM(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dM(n)}}function JU(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JU(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}
vendor: 4,111 bytes, line 37
37function e8(){for(var e=window,t=Kb();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kb(e.document)}return t}function eA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pie(e){var t=e8(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JU(n.ownerDocument.documentElement,n)){if(r!==null&&eA(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=hM(n,i);var o=hM(n,r);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gie=Zo&&"documentMode"in document&&11>=document.documentMode,dh=null,OC=null,Dp=null,RC=!1;function fM(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;RC||dh==null||dh!==Kb(r)||(r=dh,"selectionStart"in r&&eA(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}),Dp&&bg(Dp,r)||(Dp=r,r=t0(OC,"onSelect"),0<r.length&&(t=new QT("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=dh)))}function iv(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hh={animationend:iv("Animation","AnimationEnd"),animationiteration:iv("Animation","AnimationIteration"),animationstart:iv("Animation","AnimationStart"),transitionend:iv("Transition","TransitionEnd")},B1={},t8={};Zo&&(t8=document.createElement("div").style,"AnimationEvent"in window||(delete hh.animationend.animation,delete hh.animationiteration.animation,delete hh.animationstart.animation),"TransitionEvent"in window||delete hh.transitionend.transition);function fS(e){if(B1[e])return B1[e];if(!hh[e])return e;var t=hh[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in t8)return B1[e]=t[n];return e}var n8=fS("animationend"),r8=fS("animationiteration"),s8=fS("animationstart"),a8=fS("transitionend"),i8=new Map,mM="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 Ic(e,t){i8.set(e,t),fd(t,[e])}for(var z1=0;z1<mM.length;z1++){var U1=mM[z1],yie=U1.toLowerCase(),xie=U1[0].toUpperCase()+U1.slice(1);Ic(yie,"on"+xie)}Ic(n8,"onAnimationEnd");Ic(r8,"onAnimationIteration");Ic(s8,"onAnimationStart");Ic("dblclick","onDoubleClick");Ic("focusin","onFocus");Ic("focusout","onBlur");Ic(a8,"onTransitionEnd");of("onMouseEnter",["mouseout","mouseover"]);of("onMouseLeave",["mouseout","mouseover"]);of("onPointerEnter",["pointerout","pointerover"]);of("onPointerLeave",["pointerout","pointerover"]);fd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,783 bytes, line 37
37fd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fd("onBeforeInput",["compositionend","keypress","textInput","paste"]);fd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _p="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(" "),vie=new Set("cancel close invalid load scroll toggle".split(" ").concat(_p));function pM(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,yae(r,t,void 0,e),e.currentTarget=null}function o8(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&a.isPropagationStopped())break e;pM(a,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&a.isPropagationStopped())break e;pM(a,l,u),i=c}}}if(Xb)throw e=kC,Xb=!1,kC=null,e}function Cn(e,t){var n=t[$C];n===void 0&&(n=t[$C]=new Set);var r=e+"__bubble";n.has(r)||(l8(t,e,2,!1),n.add(r))}function q1(e,t,n){var r=0;t&&(r|=4),l8(n,e,r,t)}var ov="_reactListening"+Math.random().toString(36).slice(2);function wg(e){if(!e[ov]){e[ov]=!0,pU.forEach(function(n){n!=="selectionchange"&&(vie.has(n)||q1(n,!1,e),q1(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ov]||(t[ov]=!0,q1("selectionchange",!1,t))}}function l8(e,t,n,r){switch(VU(t)){case 1:var a=Rae;break;case 4:a=Iae;break;default:a=YT}n=a.bind(null,t,n,e),a=void 0,!EC||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function W1(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;o=o.return}for(;l!==null;){if(o=yu(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}AU(function(){var u=i,d=VT(n),h=[];e:{var f=i8.get(e);if(f!==void 0){var m=QT,y=e;switch(e){case"keypress":if(_b(n)===0)break e;case"keydown":case"keyup":m=Yae;break;case"focusin":y="focus",m=L1;break;case"focusout":y="blur",m=L1;break;case"beforeblur":case"afterblur":m=L1;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":m=rM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Lae;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Zae;break;case n8:case r8:case s8:m=Bae;break;case a8:m=eie;break;case"scroll":m=Mae;break;case"wheel":m=nie;break;case"copy":case"cut":case"paste":m=Uae;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=aM}var p=(t&4)!==0,x=!p&&e==="scroll",v=p?f!==null?f+"Capture":null:f;p=[];for(var b=u,w;b!==null;){w=b;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,v!==null&&(S=pg(b,v),S!=null&&p.push(Sg(b,S,w)))),x)break;b=b.return}0<p.length&&(f=new m(f,y,null,n,d),h.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==_C&&(y=n.relatedTarget||n.fromElement)&&(yu(y)||y[Jo]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(y=n.relatedTarget||n.toElement,m=u,y=y?yu(y):null,y!==null&&(x=md(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=u),m!==y)){if(p=rM,S="onMouseLeave",v="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(p=aM,S="onPointerLeave",v="onPointerEnter",b="pointer"),x=m==null?f:fh(m),w=y==null?f:fh(y),f=new p(S,b+"leave",m,n,d),f.target=x,f.relatedTarget=w,S=null,yu(d)===u&&(p=new p(v,b+"enter",y,n,d),p.target=w,p.relatedTarget=x,S=p),x=S,m&&y)t:{for(p=m,v=y,b=0,w=p;w;w=Td(w))b++;for(w=0,S=v;S;S=Td(S))w++;for(;0<b-w;)p=Td(p),b--;for(;0<w-b;)v=Td(v),w--;for(;b--;){if(p===v||v!==null&&p===v.alternate)break t;p=Td(p),v=Td(v)}p=null}else p=null;m!==null&&gM(h,f,m,p,!1),y!==null&&x!==null&&gM(h,x,y,p,!0)}}
vendor: 4,595 bytes, lines 37-38
37e:{if(f=u?fh(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var j=cie;else if(lM(f))if(QU)j=fie;else{j=die;var N=uie}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=hie);if(j&&(j=j(e,u))){XU(h,j,n,d);break e}N&&N(e,f,u),e==="focusout"&&(N=f._wrapperState)&&N.controlled&&f.type==="number"&&bC(f,"number",f.value)}switch(N=u?fh(u):window,e){case"focusin":(lM(N)||N.contentEditable==="true")&&(dh=N,OC=u,Dp=null);break;case"focusout":Dp=OC=dh=null;break;case"mousedown":RC=!0;break;case"contextmenu":case"mouseup":case"dragend":RC=!1,fM(h,n,d);break;case"selectionchange":if(gie)break;case"keydown":case"keyup":fM(h,n,d)}var C;if(JT)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else uh?KU(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(GU&&n.locale!=="ko"&&(uh||_!=="onCompositionStart"?_==="onCompositionEnd"&&uh&&(C=HU()):(Jl=d,XT="value"in Jl?Jl.value:Jl.textContent,uh=!0)),N=t0(u,_),0<N.length&&(_=new sM(_,e,null,n,d),h.push({event:_,listeners:N}),C?_.data=C:(C=YU(n),C!==null&&(_.data=C)))),(C=sie?aie(e,n):iie(e,n))&&(u=t0(u,"onBeforeInput"),0<u.length&&(d=new sM("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}o8(h,t)})}function Sg(e,t,n){return{instance:e,listener:t,currentTarget:n}}function t0(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=pg(e,n),i!=null&&r.unshift(Sg(e,i,a)),i=pg(e,t),i!=null&&r.push(Sg(e,i,a))),e=e.return}return r}function Td(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gM(e,t,n,r,a){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,a?(c=pg(n,i),c!=null&&o.unshift(Sg(n,c,l))):a||(c=pg(n,i),c!=null&&o.push(Sg(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var bie=/\r\n?/g,wie=/\u0000|\uFFFD/g;function yM(e){return(typeof e=="string"?e:""+e).replace(bie,`
38`).replace(wie,"")}function lv(e,t,n){if(t=yM(t),yM(e)!==t&&n)throw Error(Ne(425))}function n0(){}var IC=null,MC=null;function DC(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var LC=typeof setTimeout=="function"?setTimeout:void 0,Sie=typeof clearTimeout=="function"?clearTimeout:void 0,xM=typeof Promise=="function"?Promise:void 0,jie=typeof queueMicrotask=="function"?queueMicrotask:typeof xM<"u"?function(e){return xM.resolve(null).then(e).catch(Nie)}:LC;function Nie(e){setTimeout(function(){throw e})}function V1(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),xg(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);xg(t)}function oc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function vM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var om=Math.random().toString(36).slice(2),no="__reactFiber$"+om,jg="__reactProps$"+om,Jo="__reactContainer$"+om,$C="__reactEvents$"+om,_ie="__reactListeners$"+om,Cie="__reactHandles$"+om;function yu(e){var t=e[no];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jo]||n[no]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vM(e);e!==null;){if(n=e[no])return n;e=vM(e)}return t}e=n,n=e.parentNode}return null}function Ky(e){return e=e[no]||e[Jo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fh(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ne(33))}function mS(e){return e[jg]||null}var FC=[],mh=-1;function Mc(e){return{current:e}}function Pn(e){0>mh||(e.current=FC[mh],FC[mh]=null,mh--)}function wn(e,t){mh++,FC[mh]=e.current,e.current=t}var Sc={},ls=Mc(Sc),zs=Mc(!1),Hu=Sc;function lf(e,t){var n=e.type.contextTypes;if(!n)return Sc;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in n)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a
vendor: 4,290 bytes, line 38
38),a}function Us(e){return e=e.childContextTypes,e!=null}function r0(){Pn(zs),Pn(ls)}function bM(e,t,n){if(ls.current!==Sc)throw Error(Ne(168));wn(ls,t),wn(zs,n)}function c8(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(Ne(108,uae(e)||"Unknown",a));return Wn({},n,r)}function s0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sc,Hu=ls.current,wn(ls,e),wn(zs,zs.current),!0}function wM(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=c8(e,t,Hu),r.__reactInternalMemoizedMergedChildContext=e,Pn(zs),Pn(ls),wn(ls,e)):Pn(zs),wn(zs,n)}var $o=null,pS=!1,H1=!1;function u8(e){$o===null?$o=[e]:$o.push(e)}function Eie(e){pS=!0,u8(e)}function Dc(){if(!H1&&$o!==null){H1=!0;var e=0,t=dn;try{var n=$o;for(dn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$o=null,pS=!1}catch(a){throw $o!==null&&($o=$o.slice(e+1)),MU(HT,Dc),a}finally{dn=t,H1=!1}}return null}var ph=[],gh=0,a0=null,i0=0,La=[],$a=0,Gu=null,zo=1,Uo="";function au(e,t){ph[gh++]=i0,ph[gh++]=a0,a0=e,i0=t}function d8(e,t,n){La[$a++]=zo,La[$a++]=Uo,La[$a++]=Gu,Gu=e;var r=zo;e=Uo;var a=32-Ei(r)-1;r&=~(1<<a),n+=1;var i=32-Ei(t)+a;if(30<i){var o=a-a%5;i=(r&(1<<o)-1).toString(32),r>>=o,a-=o,zo=1<<32-Ei(t)+a|n<<a|r,Uo=i+e}else zo=1<<i|n<<a|r,Uo=e}function tA(e){e.return!==null&&(au(e,1),d8(e,1,0))}function nA(e){for(;e===a0;)a0=ph[--gh],ph[gh]=null,i0=ph[--gh],ph[gh]=null;for(;e===Gu;)Gu=La[--$a],La[$a]=null,Uo=La[--$a],La[$a]=null,zo=La[--$a],La[$a]=null}var ya=null,ga=null,Rn=!1,Si=null;function h8(e,t){var n=Ua(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function SM(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ya=e,ga=oc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ya=e,ga=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Gu!==null?{id:zo,overflow:Uo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ua(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ya=e,ga=null,!0):!1;default:return!1}}function BC(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zC(e){if(Rn){var t=ga;if(t){var n=t;if(!SM(e,t)){if(BC(e))throw Error(Ne(418));t=oc(n.nextSibling);var r=ya;t&&SM(e,t)?h8(r,n):(e.flags=e.flags&-4097|2,Rn=!1,ya=e)}}else{if(BC(e))throw Error(Ne(418));e.flags=e.flags&-4097|2,Rn=!1,ya=e}}}function jM(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ya=e}function cv(e){if(e!==ya)return!1;if(!Rn)return jM(e),Rn=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!DC(e.type,e.memoizedProps)),t&&(t=ga)){if(BC(e))throw f8(),Error(Ne(418));for(;t;)h8(e,t),t=oc(t.nextSibling)}if(jM(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ne(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ga=oc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ga=null}}else ga=ya?oc(e.stateNode.nextSibling):null;return!0}function f8(){for(var e=ga;e;)e=oc(e.nextSibling)}function cf(){ga=ya=null,Rn=!1}function rA(e){Si===null?Si=[e]:Si.push(e)}var kie=hl.ReactCurrentBatchConfig;function Ym(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ne(309));var r=n.stateNode}if(!r)throw Error(Ne(147,e));var a=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=a.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(Ne(284));if(!n._owner)throw Error(Ne(290,e))}return e}function uv(e,t){throw e=Object.prototype.toString.call(t),Error(Ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function NM(e){var t=e._init;return t(e._payload)}function m8(e){function t(v,b){if(e){var w=v.deletions;w===null?(v.deletions=[b],v.flags|=16):w.push(b)}}function n(v,b){if(!e)return null;for(;b!==null;)t(v,b),b=b.sibling;return null}function r(v,b){for(v=new Map;b!==null;
vendor: 4,141 bytes, line 38
38)b.key!==null?v.set(b.key,b):v.set(b.index,b),b=b.sibling;return v}function a(v,b){return v=dc(v,b),v.index=0,v.sibling=null,v}function i(v,b,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<b?(v.flags|=2,b):w):(v.flags|=2,b)):(v.flags|=1048576,b)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,b,w,S){return b===null||b.tag!==6?(b=J1(w,v.mode,S),b.return=v,b):(b=a(b,w),b.return=v,b)}function c(v,b,w,S){var j=w.type;return j===ch?d(v,b,w.props.children,S,w.key):b!==null&&(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Dl&&NM(j)===b.type)?(S=a(b,w.props),S.ref=Ym(v,b,w),S.return=v,S):(S=Ob(w.type,w.key,w.props,null,v.mode,S),S.ref=Ym(v,b,w),S.return=v,S)}function u(v,b,w,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==w.containerInfo||b.stateNode.implementation!==w.implementation?(b=eN(w,v.mode,S),b.return=v,b):(b=a(b,w.children||[]),b.return=v,b)}function d(v,b,w,S,j){return b===null||b.tag!==7?(b=Du(w,v.mode,S,j),b.return=v,b):(b=a(b,w),b.return=v,b)}function h(v,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return b=J1(""+b,v.mode,w),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Jx:return w=Ob(b.type,b.key,b.props,null,v.mode,w),w.ref=Ym(v,null,b),w.return=v,w;case lh:return b=eN(b,v.mode,w),b.return=v,b;case Dl:var S=b._init;return h(v,S(b._payload),w)}if(jp(b)||Wm(b))return b=Du(b,v.mode,w,null),b.return=v,b;uv(v,b)}return null}function f(v,b,w,S){var j=b!==null?b.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:l(v,b,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Jx:return w.key===j?c(v,b,w,S):null;case lh:return w.key===j?u(v,b,w,S):null;case Dl:return j=w._init,f(v,b,j(w._payload),S)}if(jp(w)||Wm(w))return j!==null?null:d(v,b,w,S,null);uv(v,w)}return null}function m(v,b,w,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(w)||null,l(b,v,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Jx:return v=v.get(S.key===null?w:S.key)||null,c(b,v,S,j);case lh:return v=v.get(S.key===null?w:S.key)||null,u(b,v,S,j);case Dl:var N=S._init;return m(v,b,w,N(S._payload),j)}if(jp(S)||Wm(S))return v=v.get(w)||null,d(b,v,S,j,null);uv(b,S)}return null}function y(v,b,w,S){for(var j=null,N=null,C=b,_=b=0,A=null;C!==null&&_<w.length;_++){C.index>_?(A=C,C=null):A=C.sibling;var P=f(v,C,w[_],S);if(P===null){C===null&&(C=A);break}e&&C&&P.alternate===null&&t(v,C),b=i(P,b,_),N===null?j=P:N.sibling=P,N=P,C=A}if(_===w.length)return n(v,C),Rn&&au(v,_),j;if(C===null){for(;_<w.length;_++)C=h(v,w[_],S),C!==null&&(b=i(C,b,_),N===null?j=C:N.sibling=C,N=C);return Rn&&au(v,_),j}for(C=r(v,C);_<w.length;_++)A=m(C,v,_,w[_],S),A!==null&&(e&&A.alternate!==null&&C.delete(A.key===null?_:A.key),b=i(A,b,_),N===null?j=A:N.sibling=A,N=A);return e&&C.forEach(function(R){return t(v,R)}),Rn&&au(v,_),j}function p(v,b,w,S){var j=Wm(w);if(typeof j!="function")throw Error(Ne(150));if(w=j.call(w),w==null)throw Error(Ne(151));for(var N=j=null,C=b,_=b=0,A=null,P=w.next();C!==null&&!P.done;_++,P=w.next()){C.index>_?(A=C,C=null):A=C.sibling;var R=f(v,C,P.value,S);if(R===null){C===null&&(C=A);break}e&&C&&R.alternate===null&&t(v,C),b=i(R,b,_),N===null?j=R:N.sibling=R,N=R,C=A}if(P.done)return n(v,C),Rn&&au(v,_),j;if(C===null){for(;!P.done;_++,P=w.next())P=h(v,P.value,S),P!==null&&(b=i(P,b,_),N===null?j=P:N.sibling=P,N=P);return Rn&&au(v,_),j}for(C=r(v,C);!P.done;_++,P=w.next())P=m(C,v,_,P.value,S),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?_:P.key),b=i(P,b,_),N===null?j=P:N.sibling=P,N=P);return e&&C.forEach(function(I){return t(v,I)}),Rn&&au(v,_),j}function x(v,b,w,S){if(typeof w=="object"&&w!==null&&w.type===ch&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Jx:e:{for(var j=w.key,N=b;N!==null;){if(N.key===j){if(j=w.type,j===ch){if(N.tag===7){n(v,N.sibling),b=a(N,w.props.children),b.return=v,v=b;break e}}else if(N.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Dl&&NM(j)===N.type){n(v,N.sibling),b=a(N,w.props),b.ref=Ym(v,N,w),b.return=v,v=b;break e}n(v,N);break}else t(v,N);N=N.sibling}
vendor: 20,252 bytes, lines 38-40
38w.type===ch?(b=Du(w.props.children,v.mode,S,w.key),b.return=v,v=b):(S=Ob(w.type,w.key,w.props,null,v.mode,S),S.ref=Ym(v,b,w),S.return=v,v=S)}return o(v);case lh:e:{for(N=w.key;b!==null;){if(b.key===N)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(v,b.sibling),b=a(b,w.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else t(v,b);b=b.sibling}b=eN(w,v.mode,S),b.return=v,v=b}return o(v);case Dl:return N=w._init,x(v,b,N(w._payload),S)}if(jp(w))return y(v,b,w,S);if(Wm(w))return p(v,b,w,S);uv(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(v,b.sibling),b=a(b,w),b.return=v,v=b):(n(v,b),b=J1(w,v.mode,S),b.return=v,v=b),o(v)):n(v,b)}return x}var uf=m8(!0),p8=m8(!1),o0=Mc(null),l0=null,yh=null,sA=null;function aA(){sA=yh=l0=null}function iA(e){var t=o0.current;Pn(o0),e._currentValue=t}function UC(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ih(e,t){l0=e,sA=yh=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ds=!0),e.firstContext=null)}function Ja(e){var t=e._currentValue;if(sA!==e)if(e={context:e,memoizedValue:t,next:null},yh===null){if(l0===null)throw Error(Ne(308));yh=e,l0.dependencies={lanes:0,firstContext:e}}else yh=yh.next=e;return t}var xu=null;function oA(e){xu===null?xu=[e]:xu.push(e)}function g8(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,oA(t)):(n.next=a.next,a.next=n),t.interleaved=n,el(e,r)}function el(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ll=!1;function lA(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y8(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Go(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,en&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,el(e,n)}return a=r.interleaved,a===null?(t.next=t,oA(r)):(t.next=a.next,a.next=t),r.interleaved=t,el(e,n)}function Cb(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,GT(e,n)}}function _M(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=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?a=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function c0(e,t,n,r){var a=e.updateQueue;Ll=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=a.baseState;o=0,d=u=c=null,l=i;do{var f=l.lane,m=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,p=l;switch(f=t,m=n,p.tag){case 1:if(y=p.payload,typeof y=="function"){h=y.call(m,h,f);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,f=typeof y=="function"?y.call(m,h,f):y,f==null)break e;h=Wn({},h,f);break e;case 2:Ll=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=a.effects,f===null?a.effects=[l]:f.push(l))}else m={eventTime:m,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=h):d=d.next=m,o|=f;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;f=l,l=f.next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}while(!0);if(d===null&&(c=h),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Yu|=o,e.lanes=o,e.memoizedState=h}}function CM(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=n,typeof a!="function")throw Error(Ne(191,a));a.call(r)}}}var Yy={},lo=Mc(Yy),Ng=Mc(Yy),_g=Mc(Yy);function vu(e){if(e===Yy)throw Error(Ne(174));return e}function cA(e,t){switch(wn(_g,t),wn(Ng,e),wn(lo,Yy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:SC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=SC(t,e)}Pn(lo),wn(lo,t)}function df(){Pn(lo),Pn(Ng),Pn(_g)}function x8(e){vu(_g.current);var t=vu(lo.current),n=SC(t,e.type);t!==n&&(wn(Ng,e),wn(lo,n))}function uA(e){Ng.current===e&&(Pn(lo),Pn(Ng))}var $n=Mc(0);function u0(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var G1=[];function dA(){for(var e=0;e<G1.length;e++)G1[e]._workInProgressVersionPrimary=null;G1.length=0}var Eb=hl.ReactCurrentDispatcher,K1=hl.ReactCurrentBatchConfig,Ku=0,Un=null,xr=null,_r=null,d0=!1,Lp=!1,Cg=0,Pie=0;function Kr(){throw Error(Ne(321))}function hA(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ri(e[n],t[n]))return!1;return!0}function fA(e,t,n,r,a,i){if(Ku=i,Un=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Eb.current=e===null||e.memoizedState===null?Rie:Iie,e=n(r,a),Lp){i=0;do{if(Lp=!1,Cg=0,25<=i)throw Error(Ne(301));i+=1,_r=xr=null,t.updateQueue=null,Eb.current=Mie,e=n(r,a)}while(Lp)}if(Eb.current=h0,t=xr!==null&&xr.next!==null,Ku=0,_r=xr=Un=null,d0=!1,t)throw Error(Ne(300));return e}function mA(){var e=Cg!==0;return Cg=0,e}function Ki(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _r===null?Un.memoizedState=_r=e:_r=_r.next=e,_r}function ei(){if(xr===null){var e=Un.alternate;e=e!==null?e.memoizedState:null}else e=xr.next;var t=_r===null?Un.memoizedState:_r.next;if(t!==null)_r=t,xr=e;else{if(e===null)throw Error(Ne(310));xr=e,e={memoizedState:xr.memoizedState,baseState:xr.baseState,baseQueue:xr.baseQueue,queue:xr.queue,next:null},_r===null?Un.memoizedState=_r=e:_r=_r.next=e}return _r}function Eg(e,t){return typeof t=="function"?t(e):t}function Y1(e){var t=ei(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=xr,a=r.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}r.baseQueue=a=i,n.pending=null}if(a!==null){i=a.next,r=r.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((Ku&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,Un.lanes|=d,Yu|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,Ri(r,t.memoizedState)||(Ds=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){a=e;do i=a.lane,Un.lanes|=i,Yu|=i,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function X1(e){var t=ei(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);Ri(i,t.memoizedState)||(Ds=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function v8(){}function b8(e,t){var n=Un,r=ei(),a=t(),i=!Ri(r.memoizedState,a);if(i&&(r.memoizedState=a,Ds=!0),r=r.queue,pA(j8.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||_r!==null&&_r.memoizedState.tag&1){if(n.flags|=2048,kg(9,S8.bind(null,n,r,a,t),void 0,null),Er===null)throw Error(Ne(349));Ku&30||w8(n,t,a)}return a}function w8(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Un.updateQueue,t===null?(t={lastEffect:null,stores:null},Un.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function S8(e,t,n,r){t.value=n,t.getSnapshot=r,N8(t)&&_8(e)}function j8(e,t,n){return n(function(){N8(t)&&_8(e)})}function N8(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ri(e,n)}catch{return!0}}function _8(e){var t=el(e,1);t!==null&&ki(t,e,1,-1)}function EM(e){var t=Ki();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Eg,lastRenderedState:e},t.queue=e,e=e.dispatch=Oie.bind(null,Un,e),[t.memoizedState,e]}function kg(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Un.updateQueue,t===null?(t={lastEffect:null,stores:null},Un.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function C8(){return ei().memoizedState}function kb(e,t,n,r){var a=Ki();Un.flags|=e,a.memoizedState=kg(1|t,n,void 0,r===void 0?null:r)}function gS(e,t,n,r){var a=ei();r=r===void 0?null:r;var i=void 0;if(xr!==null){var o=xr.memoizedState;if(i=o.destroy,r!==null&&hA(r,o.deps)){a.memoizedState=kg(t,n,i,r);return}}Un.flags|=e,a.memoizedState=kg(1|t,n,i,r)}function kM(e,t){return kb(8390656,8,e,t)}function pA(e,t){return gS(2048,8,e,t)}function E8(e,t){return gS(4,2,e,t)}function k8(e,t){return gS(4,4,e,t)}function P8(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function T8(e,t,n){return n=n!=null?n.concat([e]):null,gS(4,4,P8.bind(null,t,e),n)}function gA(){}function A8(e,t){var n=ei();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hA(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function O8(e,t){var n=ei();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hA(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function R8(e,t,n){return Ku&21?(Ri(n,t)||(n=$U(),Un.lanes|=n,Yu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ds=!0),e.memoizedState=n)}function Tie(e,t){var n=dn;dn=n!==0&&4>n?n:4,e(!0);var r=K1.transition;K1.transition={};try{e(!1),t()}finally{dn=n,K1.transition=r}}function I8(){return ei().memoizedState}function Aie(e,t,n){var r=uc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},M8(e))D8(t,n);else if(n=g8(e,t,n,r),n!==null){var a=_s();ki(n,e,r,a),L8(n,t,r)}}function Oie(e,t,n){var r=uc(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(M8(e))D8(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(a.hasEagerState=!0,a.eagerState=l,Ri(l,o)){var c=t.interleaved;c===null?(a.next=a,oA(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}n=g8(e,t,a,r),n!==null&&(a=_s(),ki(n,e,r,a),L8(n,t,r))}}function M8(e){var t=e.alternate;return e===Un||t!==null&&t===Un}function D8(e,t){Lp=d0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function L8(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,GT(e,n)}}var h0={readContext:Ja,useCallback:Kr,useContext:Kr,useEffect:Kr,useImperativeHandle:Kr,useInsertionEffect:Kr,useLayoutEffect:Kr,useMemo:Kr,useReducer:Kr,useRef:Kr,useState:Kr,useDebugValue:Kr,useDeferredValue:Kr,useTransition:Kr,useMutableSource:Kr,useSyncExternalStore:Kr,useId:Kr,unstable_isNewReconciler:!1},Rie={readContext:Ja,useCallback:function(e,t){return Ki().memoizedState=[e,t===void 0?null:t],e},useContext:Ja,useEffect:kM,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kb(4194308,4,P8.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kb(4194308,4,e,t)},useInsertionEffect:function(e,t){return kb(4,2,e,t)},useMemo:function(e,t){var n=Ki();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ki();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Aie.bind(null,Un,e),[r.memoizedState,e]},useRef:function(e){var t=Ki();return e={current:e},t.memoizedState=e},useState:EM,useDebugValue:gA,useDeferredValue:function(e){return Ki().memoizedState=e},useTransition:function(){var e=EM(!1),t=e[0];return e=Tie.bind(null,e[1]),Ki().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Un,a=Ki();if(Rn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),Er===null)throw Error(Ne(349));Ku&30||w8(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,kM(j8.bind(null,r,i,e),[e]),r.flags|=2048,kg(9,S8.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ki(),t=Er.identifierPrefix;if(Rn){var n=Uo,r=zo;n=(r&~(1<<32-Ei(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cg++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Pie++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Iie={readContext:Ja,useCallback:A8,useContext:Ja,useEffect:pA,useImperativeHandle:T8,useInsertionEffect:E8,useLayoutEffect:k8,useMemo:O8,useReducer:Y1,useRef:C8,useState:function(){return Y1(Eg)},useDebugValue:gA,useDeferredValue:function(e){var t=ei();return R8(t,xr.memoizedState,e)},useTransition:function(){var e=Y1(Eg)[0],t=ei().memoizedState;return[e,t]},useMutableSource:v8,useSyncExternalStore:b8,useId:I8,unstable_isNewReconciler:!1},Mie={readContext:Ja,useCallback:A8,useContext:Ja,useEffect:pA,useImperativeHandle:T8,useInsertionEffect:E8,useLayoutEffect:k8,useMemo:O8,useReducer:X1,useRef:C8,useState:function(){return X1(Eg)},useDebugValue:gA,useDeferredValue:function(e){var t=ei();return xr===null?t.memoizedState=e:R8(t,xr.memoizedState,e)},useTransition:function(){var e=X1(Eg)[0],t=ei().memoizedState;return[e,t]},useMutableSource:v8,useSyncExternalStore:b8,useId:I8,unstable_isNewReconciler:!1};function pi(e,t){if(e&&e.defaultProps){t=Wn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function qC(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Wn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yS={isMounted:function(e){return(e=e._reactInternals)?md(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_s(),a=uc(e),i=Go(r,a);i.payload=t,n!=null&&(i.callback=n),t=lc(e,i,a),t!==null&&(ki(t,e,a,r),Cb(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_s(),a=uc(e),i=Go(r,a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=lc(e,i,a),t!==null&&(ki(t,e,a,r),Cb(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_s(),r=uc(e),a=Go(n,r);a.tag=2,t!=null&&(a.callback=t),t=lc(e,a,r),t!==null&&(ki(t,e,r,n),Cb(t,e,r))}};function PM(e,t,n,r,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!bg(n,r)||!bg(a,i):!0}function $8(e,t,n){var r=!1,a=Sc,i=t.contextType;return typeof i=="object"&&i!==null?i=Ja(i):(a=Us(t)?Hu:ls.current,r=t.contextTypes,i=(r=r!=null)?lf(e,a):Sc),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yS,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function TM(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yS.enqueueReplaceState(t,t.state,null)}function WC(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},lA(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Ja(i):(i=Us(t)?Hu:ls.current,a.context=lf(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(qC(e,t,i,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&yS.enqueueReplaceState(a,a.state,null),c0(e,n,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function hf(e,t){try{var n="",r=t;do n+=cae(r),r=r.return;while(r);var a=n}catch(i){a=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:a,digest:null}}function Q1(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function VC(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Die=typeof WeakMap=="function"?WeakMap:Map;function F8(e,t,n){n=Go(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){m0||(m0=!0,tE=r),VC(e,t)},n}function B8(e,t,n){n=Go(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){VC(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){VC(e,t),typeof r!="function"&&(cc===null?cc=new Set([this]):cc.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function AM(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Die;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=Xie.bind(null,e,t,n),t.then(e,e))}function OM(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function RM(e,t,n,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Go(-1,1),t.tag=2,lc(n,t,1))),n.lanes|=1),e)}var Lie=hl.ReactCurrentOwner,Ds=!1;function gs(e,t,n,r){t.child=e===null?p8(t,null,n,r):uf(t,e.child,n,r)}function IM(e,t,n,r,a){n=n.render;var i=t.ref;return Ih(t,a),r=fA(e,t,n,r,i,a),n=mA(),e!==null&&!Ds?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,tl(e,t,a)):(Rn&&n&&tA(t),t.flags|=1,gs(e,t,r,a),t.child)}function MM(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!NA(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,z8(e,t,i,r,a)):(e=Ob(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:bg,n(o,r)&&e.ref===t.ref)return tl(e,t,a)}return t.flags|=1,e=dc(i,r),e.ref=t.ref,e.return=t,t.child=e}function z8(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(bg(i,r)&&e.ref===t.ref)if(Ds=!1,t.pendingProps=r=i,(e.lanes&a)!==0)e.flags&131072&&(Ds=!0);else return t.lanes=e.lanes,tl(e,t,a)}return HC(e,t,n,r,a)}function U8(e,t,n){var r=t.pendingProps,a=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},wn(vh,ca),ca|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,wn(vh,ca),ca|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,wn(vh,ca),ca|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,wn(vh,ca),ca|=r;return gs(e,t,a,n),t.child}function q8(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 8,815 bytes, line 40
40function HC(e,t,n,r,a){var i=Us(n)?Hu:ls.current;return i=lf(t,i),Ih(t,a),n=fA(e,t,n,r,i,a),r=mA(),e!==null&&!Ds?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,tl(e,t,a)):(Rn&&r&&tA(t),t.flags|=1,gs(e,t,n,a),t.child)}function DM(e,t,n,r,a){if(Us(n)){var i=!0;s0(t)}else i=!1;if(Ih(t,a),t.stateNode===null)Pb(e,t),$8(t,n,r),WC(t,n,r,a),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ja(u):(u=Us(n)?Hu:ls.current,u=lf(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&TM(t,o,r,u),Ll=!1;var f=t.memoizedState;o.state=f,c0(t,r,o,a),c=t.memoizedState,l!==r||f!==c||zs.current||Ll?(typeof d=="function"&&(qC(t,n,d,r),c=t.memoizedState),(l=Ll||PM(t,n,l,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,y8(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:pi(t.type,l),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ja(c):(c=Us(n)?Hu:ls.current,c=lf(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||f!==c)&&TM(t,o,r,c),Ll=!1,f=t.memoizedState,o.state=f,c0(t,r,o,a);var y=t.memoizedState;l!==h||f!==y||zs.current||Ll?(typeof m=="function"&&(qC(t,n,m,r),y=t.memoizedState),(u=Ll||PM(t,n,u,r,f,y,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return GC(e,t,n,r,i,a)}function GC(e,t,n,r,a,i){q8(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return a&&wM(t,n,!1),tl(e,t,i);r=t.stateNode,Lie.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=uf(t,e.child,null,i),t.child=uf(t,null,l,i)):gs(e,t,l,i),t.memoizedState=r.state,a&&wM(t,n,!0),t.child}function W8(e){var t=e.stateNode;t.pendingContext?bM(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bM(e,t.context,!1),cA(e,t.containerInfo)}function LM(e,t,n,r,a){return cf(),rA(a),t.flags|=256,gs(e,t,n,r),t.child}var KC={dehydrated:null,treeContext:null,retryLane:0};function YC(e){return{baseLanes:e,cachePool:null,transitions:null}}function V8(e,t,n){var r=t.pendingProps,a=$n.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),wn($n,a&1),e===null)return zC(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=bS(o,r,0,null),e=Du(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=YC(n),t.memoizedState=KC,e):yA(t,o));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return $ie(e,t,o,r,l,a,n);if(i){i=r.fallback,o=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=dc(a,c),r.subtreeFlags=a.subtreeFlags&14680064),l!==null?i=dc(l,i):(i=Du(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?YC(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=KC,r}return i=e.child,e=i.sibling,r=dc(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function yA(e,t){return t=bS({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function dv(e,t,n,r){return r!==null&&rA(r),uf(t,e.child,null,n),e=yA(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $ie(e,t,n,r,a,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Q1(Error(Ne(422))),dv(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=bS({mode:"visible",children:r.children},a,0,null),i=Du(i,a,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&uf(t,e.child,null,o),t.child.memoizedState=YC(o),t.memoizedState=KC,i);if(!(t.mode&1))return dv(e,t,o,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(Ne(419)),r=Q1(i,r,void 0),dv(e,t,o,r)}if(l=(o&e.childLanes)!==0,Ds||l){if(r=Er,r!==null){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,el(e,a),ki(r,e,a,-1))}return jA(),r=Q1(Error(Ne(421))),dv(e,t,o,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Qie.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,ga=oc(a.nextSibling),ya=t,Rn=!0,Si=null,e!==null&&(La[$a++]=zo,La[$a++]=Uo,La[$a++]=Gu,zo=e.id,Uo=e.overflow,Gu=t),t=yA(t,r.children),t.flags|=4096,t)}function $M(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),UC(e.return,t,n)}function Z1(e,t,n,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a)}function H8(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(gs(e,t,r.children,n),r=$n.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$M(e,n,t);else if(e.tag===19)$M(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(wn($n,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&u0(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Z1(t,!1,a,n,i);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&u0(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Z1(t,!0,n,null,i);break;case"together":Z1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Pb(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yu|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=dc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=dc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fie(e,t,n){switch(t.tag){case 3:W8(t),cf();break;case 5:x8(t);break;case 1:Us(t.type)&&s0(t);break;case 4:cA(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;wn(o0,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(wn($n,$n.current&1),t.flags|=128,null):n&t.child.childLanes?V8(e,t,n):(wn($n,$n.current&1),e=tl(e,t,n),e!==null?e.sibling:null);
vendor: 4,825 bytes, line 40
40wn($n,$n.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return H8(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),wn($n,$n.current),r)break;return null;case 22:case 23:return t.lanes=0,U8(e,t,n)}return tl(e,t,n)}var G8,XC,K8,Y8;G8=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};XC=function(){};K8=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,vu(lo.current);var i=null;switch(n){case"input":a=xC(e,a),r=xC(e,r),i=[];break;case"select":a=Wn({},a,{value:void 0}),r=Wn({},r,{value:void 0}),i=[];break;case"textarea":a=wC(e,a),r=wC(e,r),i=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=n0)}jC(n,r);var o;n=null;for(u in a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var l=a[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(fg.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=a!=null?a[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(fg.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Cn("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Y8=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xm(e,t){if(!Rn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Yr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bie(e,t,n){var r=t.pendingProps;switch(nA(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yr(t),null;case 1:return Us(t.type)&&r0(),Yr(t),null;case 3:return r=t.stateNode,df(),Pn(zs),Pn(ls),dA(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(cv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Si!==null&&(sE(Si),Si=null))),XC(e,t),Yr(t),null;case 5:uA(t);var a=vu(_g.current);if(n=t.type,e!==null&&t.stateNode!=null)K8(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return Yr(t),null}if(e=vu(lo.current),cv(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[no]=t,r[jg]=i,e=(t.mode&1)!==0,n){case"dialog":Cn("cancel",r),Cn("close",r);break;case"iframe":case"object":case"embed":Cn("load",r);break;case"video":case"audio":for(a=0;a<_p.length;a++)Cn(_p[a],r);break;case"source":Cn("error",r);break;case"img":case"image":case"link":Cn("error",r),Cn("load",r);break;case"details":Cn("toggle",r);break;case"input":GI(r,i),Cn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Cn("invalid",r);break;case"textarea":YI(r,i),Cn("invalid",r)}jC(n,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&lv(r.textContent,l,e),a=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&lv(r.textContent,l,e),a=["children",""+l]):fg.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Cn("scroll",r)}switch(n){case"input":ev(r),KI(r,i,!0);break;case"textarea":ev(r),XI(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=n0)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=jU(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[no]=t,e[jg]=r,G8(e,t,!1,!1),t.stateNode=e;e:{switch(o=NC(n,r),n){case"dialog":Cn("cancel",e),Cn("close",e),a=r;break;case"iframe":case"object":case"embed":Cn("load",e),a=r;break;case"video":case"audio":for(a=0;a<_p.length;a++)Cn(_p[a],e);a=r;break;case"source":Cn("error",e),a=r;break;case"img":case"image":case"link":Cn("error",e),Cn("load",e),a=r;break;case"details":Cn("toggle",e),a=r;break;case"input":GI(e,r),a=xC(e,r),Cn("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Wn({},r,{value:void 0}),Cn("invalid",e);break;case"textarea":YI(e,r),a=wC(e,r),Cn("invalid",e);break;default:a=r}jC(n,a),l=a;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?CU(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&NU(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&mg(e,c):typeof c=="number"&&mg(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(fg.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Cn("scroll",e):c!=null&&zT(e,i,c,o))}switch(n){case"input":ev(e),KI(e,r,!1);break;case"textarea":ev(e),XI(e);break;case"option":r.value!=null&&e.setAttribute("value",""+wc(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Th(e,!!r.multiple,i,!1):r.defaultValue!=null&&Th(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=n0)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Yr(t),null;case 6:if(e&&t.stateNode!=null)Y8(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ne(166));if(n=vu(_g.current),vu(lo.current),cv(t)){if(r=t.stateNode,n=t.memoizedProps,r[no]=t,(i=r.nodeValue!==n)&&(e=ya,e!==null))switch(e.tag){case 3:lv(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&lv(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[no]=t,t.stateNode=r}return Yr(t),null;case 13:if(Pn($n),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Rn&&ga!==null&&t.mode&1&&!(t.flags&128))f8(),cf(),t.flags|=98560,i=!1;else if(i=cv(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(Ne(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ne(317));i[no]=t}else cf(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Yr(t),i=!1}else Si!==null&&(sE(Si),Si=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||$n.current&1?wr===0&&(wr=3):jA())),t.updateQueue!==null&&(t.flags|=4),Yr(t),null);case 4:return df(),XC(e,t),e===null&&wg(t.stateNode.containerInfo),Yr(t),null;case 10:return iA(t.type._context),Yr(t),null;case 17:return Us(t.type)&&r0(),Yr(t),null;case 19:if(Pn($n),i=t.memoizedState,i===null)return Yr(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Xm(i,!1);else{if(wr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=u0(e),o!==null){for(t.flags|=128,Xm(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return wn($n,$n.current&1|2),t.child}e=e.sibling}i.tail!==null&&er()>ff&&(t.flags|=128,r=!0,Xm(i,!1),t.lanes=4194304)}else{if(!r)if(e=u0(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xm(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Rn)return Yr(t),null}else 2*er()-i.renderingStartTime>ff&&n!==1073741824&&(t.flags|=128,r=!0,Xm(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=er(),t.sibling=null,n=$n.current,wn($n,r?n&1|2:n&1),t):(Yr(t),null);
vendor: 23,639 bytes, line 40
40case 22:case 23:return SA(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ca&1073741824&&(Yr(t),t.subtreeFlags&6&&(t.flags|=8192)):Yr(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function zie(e,t){switch(nA(t),t.tag){case 1:return Us(t.type)&&r0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return df(),Pn(zs),Pn(ls),dA(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uA(t),null;case 13:if(Pn($n),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));cf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pn($n),null;case 4:return df(),null;case 10:return iA(t.type._context),null;case 22:case 23:return SA(),null;case 24:return null;default:return null}}var hv=!1,ts=!1,Uie=typeof WeakSet=="function"?WeakSet:Set,$e=null;function xh(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Kn(e,t,r)}else n.current=null}function QC(e,t,n){try{n()}catch(r){Kn(e,t,r)}}var FM=!1;function qie(e,t){if(IC=Jb,e=e8(),eA(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var m;h!==n||a!==0&&h.nodeType!==3||(l=o+a),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)f=h,h=m;for(;;){if(h===e)break t;if(f===n&&++u===a&&(l=o),f===i&&++d===r&&(c=o),(m=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(MC={focusedElem:e,selectionRange:n},Jb=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,x=y.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?p:pi(t.type,p),x);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(S){Kn(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return y=FM,FM=!1,y}function $p(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&QC(t,n,i)}a=a.next}while(a!==r)}}function xS(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ZC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function X8(e){var t=e.alternate;t!==null&&(e.alternate=null,X8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[no],delete t[jg],delete t[$C],delete t[_ie],delete t[Cie])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Q8(e){return e.tag===5||e.tag===3||e.tag===4}function BM(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Q8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function JC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=n0));else if(r!==4&&(e=e.child,e!==null))for(JC(e,t,n),e=e.sibling;e!==null;)JC(e,t,n),e=e.sibling}function eE(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(eE(e,t,n),e=e.sibling;e!==null;)eE(e,t,n),e=e.sibling}var Ir=null,xi=!1;function jl(e,t,n){for(n=n.child;n!==null;)Z8(e,t,n),n=n.sibling}function Z8(e,t,n){if(oo&&typeof oo.onCommitFiberUnmount=="function")try{oo.onCommitFiberUnmount(uS,n)}catch{}switch(n.tag){case 5:ts||xh(n,t);case 6:var r=Ir,a=xi;Ir=null,jl(e,t,n),Ir=r,xi=a,Ir!==null&&(xi?(e=Ir,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ir.removeChild(n.stateNode));break;case 18:Ir!==null&&(xi?(e=Ir,n=n.stateNode,e.nodeType===8?V1(e.parentNode,n):e.nodeType===1&&V1(e,n),xg(e)):V1(Ir,n.stateNode));break;case 4:r=Ir,a=xi,Ir=n.stateNode.containerInfo,xi=!0,jl(e,t,n),Ir=r,xi=a;break;case 0:case 11:case 14:case 15:if(!ts&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&QC(n,t,o),a=a.next}while(a!==r)}jl(e,t,n);break;case 1:if(!ts&&(xh(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Kn(n,t,l)}jl(e,t,n);break;case 21:jl(e,t,n);break;case 22:n.mode&1?(ts=(r=ts)||n.memoizedState!==null,jl(e,t,n),ts=r):jl(e,t,n);break;default:jl(e,t,n)}}function zM(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Uie),t.forEach(function(r){var a=Zie.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function ci(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ir=l.stateNode,xi=!1;break e;case 3:Ir=l.stateNode.containerInfo,xi=!0;break e;case 4:Ir=l.stateNode.containerInfo,xi=!0;break e}l=l.return}if(Ir===null)throw Error(Ne(160));Z8(i,o,a),Ir=null,xi=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){Kn(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)J8(t,e),t=t.sibling}function J8(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ci(t,e),Hi(e),r&4){try{$p(3,e,e.return),xS(3,e)}catch(p){Kn(e,e.return,p)}try{$p(5,e,e.return)}catch(p){Kn(e,e.return,p)}}break;case 1:ci(t,e),Hi(e),r&512&&n!==null&&xh(n,n.return);break;case 5:if(ci(t,e),Hi(e),r&512&&n!==null&&xh(n,n.return),e.flags&32){var a=e.stateNode;try{mg(a,"")}catch(p){Kn(e,e.return,p)}}if(r&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&wU(a,i),NC(l,o);var u=NC(l,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?CU(a,h):d==="dangerouslySetInnerHTML"?NU(a,h):d==="children"?mg(a,h):zT(a,d,h,u)}switch(l){case"input":vC(a,i);break;case"textarea":SU(a,i);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Th(a,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?Th(a,!!i.multiple,i.defaultValue,!0):Th(a,!!i.multiple,i.multiple?[]:"",!1))}a[jg]=i}catch(p){Kn(e,e.return,p)}}break;case 6:if(ci(t,e),Hi(e),r&4){if(e.stateNode===null)throw Error(Ne(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(p){Kn(e,e.return,p)}}break;case 3:if(ci(t,e),Hi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xg(t.containerInfo)}catch(p){Kn(e,e.return,p)}break;case 4:ci(t,e),Hi(e);break;case 13:ci(t,e),Hi(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(bA=er())),r&4&&zM(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(ts=(u=ts)||d,ci(t,e),ts=u):ci(t,e),Hi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for($e=e,d=e.child;d!==null;){for(h=$e=d;$e!==null;){switch(f=$e,m=f.child,f.tag){case 0:case 11:case 14:case 15:$p(4,f,f.return);break;case 1:xh(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(p){Kn(r,n,p)}}break;case 5:xh(f,f.return);break;case 22:if(f.memoizedState!==null){qM(h);continue}}m!==null?(m.return=f,$e=m):qM(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{a=h.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=_U("display",o))}catch(p){Kn(e,e.return,p)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(p){Kn(e,e.return,p)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ci(t,e),Hi(e),r&4&&zM(e);break;case 21:break;default:ci(t,e),Hi(e)}}function Hi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Q8(n)){var r=n;break e}n=n.return}throw Error(Ne(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(mg(a,""),r.flags&=-33);var i=BM(e);eE(e,i,a);break;case 3:case 4:var o=r.stateNode.containerInfo,l=BM(e);JC(e,l,o);break;default:throw Error(Ne(161))}}catch(c){Kn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wie(e,t,n){$e=e,eq(e)}function eq(e,t,n){for(var r=(e.mode&1)!==0;$e!==null;){var a=$e,i=a.child;if(a.tag===22&&r){var o=a.memoizedState!==null||hv;if(!o){var l=a.alternate,c=l!==null&&l.memoizedState!==null||ts;l=hv;var u=ts;if(hv=o,(ts=c)&&!u)for($e=a;$e!==null;)o=$e,c=o.child,o.tag===22&&o.memoizedState!==null?WM(a):c!==null?(c.return=o,$e=c):WM(a);for(;i!==null;)$e=i,eq(i),i=i.sibling;$e=a,hv=l,ts=u}UM(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,$e=i):UM(e)}}function UM(e){for(;$e!==null;){var t=$e;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ts||xS(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ts)if(n===null)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:pi(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&CM(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}CM(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&xg(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ne(163))}ts||t.flags&512&&ZC(t)}catch(f){Kn(t,t.return,f)}}if(t===e){$e=null;break}if(n=t.sibling,n!==null){n.return=t.return,$e=n;break}$e=t.return}}function qM(e){for(;$e!==null;){var t=$e;if(t===e){$e=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$e=n;break}$e=t.return}}function WM(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{xS(4,t)}catch(c){Kn(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(c){Kn(t,a,c)}}var i=t.return;try{ZC(t)}catch(c){Kn(t,i,c)}break;case 5:var o=t.return;try{ZC(t)}catch(c){Kn(t,o,c)}}}catch(c){Kn(t,t.return,c)}if(t===e){$e=null;break}var l=t.sibling;if(l!==null){l.return=t.return,$e=l;break}$e=t.return}}var Vie=Math.ceil,f0=hl.ReactCurrentDispatcher,xA=hl.ReactCurrentOwner,Ha=hl.ReactCurrentBatchConfig,en=0,Er=null,dr=null,Fr=0,ca=0,vh=Mc(0),wr=0,Pg=null,Yu=0,vS=0,vA=0,Fp=null,Ms=null,bA=0,ff=1/0,Mo=null,m0=!1,tE=null,cc=null,fv=!1,ec=null,p0=0,Bp=0,nE=null,Tb=-1,Ab=0;function _s(){return en&6?er():Tb!==-1?Tb:Tb=er()}function uc(e){return e.mode&1?en&2&&Fr!==0?Fr&-Fr:kie.transition!==null?(Ab===0&&(Ab=$U()),Ab):(e=dn,e!==0||(e=window.event,e=e===void 0?16:VU(e.type)),e):1}function ki(e,t,n,r){if(50<Bp)throw Bp=0,nE=null,Error(Ne(185));Hy(e,n,r),(!(en&2)||e!==Er)&&(e===Er&&(!(en&2)&&(vS|=n),wr===4&&Ul(e,Fr)),qs(e,r),n===1&&en===0&&!(t.mode&1)&&(ff=er()+500,pS&&Dc()))}function qs(e,t){var n=e.callbackNode;kae(e,t);var r=Zb(e,e===Er?Fr:0);if(r===0)n!==null&&JI(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&JI(n),t===1)e.tag===0?Eie(VM.bind(null,e)):u8(VM.bind(null,e)),jie(function(){!(en&6)&&Dc()}),n=null;else{switch(FU(r)){case 1:n=HT;break;case 4:n=DU;break;case 16:n=Qb;break;case 536870912:n=LU;break;default:n=Qb}n=lq(n,tq.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tq(e,t){if(Tb=-1,Ab=0,en&6)throw Error(Ne(327));var n=e.callbackNode;if(Mh()&&e.callbackNode!==n)return null;var r=Zb(e,e===Er?Fr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=g0(e,r);else{t=r;var a=en;en|=2;var i=rq();(Er!==e||Fr!==t)&&(Mo=null,ff=er()+500,Mu(e,t));do try{Kie();break}catch(l){nq(e,l)}while(!0);aA(),f0.current=i,en=a,dr!==null?t=0:(Er=null,Fr=0,t=wr)}if(t!==0){if(t===2&&(a=PC(e),a!==0&&(r=a,t=rE(e,a))),t===1)throw n=Pg,Mu(e,0),Ul(e,r),qs(e,er()),n;if(t===6)Ul(e,r);else{if(a=e.current.alternate,!(r&30)&&!Hie(a)&&(t=g0(e,r),t===2&&(i=PC(e),i!==0&&(r=i,t=rE(e,i))),t===1))throw n=Pg,Mu(e,0),Ul(e,r),qs(e,er()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(Ne(345));case 2:iu(e,Ms,Mo);break;case 3:if(Ul(e,r),(r&130023424)===r&&(t=bA+500-er(),10<t)){if(Zb(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){_s(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=LC(iu.bind(null,e,Ms,Mo),t);break}iu(e,Ms,Mo);break;case 4:if(Ul(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var o=31-Ei(r);i=1<<o,o=t[o],o>a&&(a=o),r&=~i}if(r=a,r=er()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vie(r/1960))-r,10<r){e.timeoutHandle=LC(iu.bind(null,e,Ms,Mo),r);break}iu(e,Ms,Mo);break;case 5:iu(e,Ms,Mo);break;default:throw Error(Ne(329))}}}return qs(e,er()),e.callbackNode===n?tq.bind(null,e):null}function rE(e,t){var n=Fp;return e.current.memoizedState.isDehydrated&&(Mu(e,t).flags|=256),e=g0(e,t),e!==2&&(t=Ms,Ms=n,t!==null&&sE(t)),e}function sE(e){Ms===null?Ms=e:Ms.push.apply(Ms,e)}function Hie(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!Ri(i(),a))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ul(e,t){for(t&=~vA,t&=~vS,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ei(t),r=1<<n;e[n]=-1,t&=~r}}function VM(e){if(en&6)throw Error(Ne(327));Mh();var t=Zb(e,0);if(!(t&1))return qs(e,er()),null;var n=g0(e,t);if(e.tag!==0&&n===2){var r=PC(e);r!==0&&(t=r,n=rE(e,r))}if(n===1)throw n=Pg,Mu(e,0),Ul(e,t),qs(e,er()),n;if(n===6)throw Error(Ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,iu(e,Ms,Mo),qs(e,er()),null}function wA(e,t){var n=en;en|=1;try{return e(t)}finally{en=n,en===0&&(ff=er()+500,pS&&Dc())}}function Xu(e){ec!==null&&ec.tag===0&&!(en&6)&&Mh();var t=en;en|=1;var n=Ha.transition,r=dn;try{if(Ha.transition=null,dn=1,e)return e()}finally{dn=r,Ha.transition=n,en=t,!(en&6)&&Dc()}}function SA(){ca=vh.current,Pn(vh)}function Mu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sie(n)),dr!==null)for(n=dr.return;n!==null;){var r=n;switch(nA(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&r0();break;case 3:df(),Pn(zs),Pn(ls),dA();break;case 5:uA(r);break;case 4:df();break;case 13:Pn($n);break;case 19:Pn($n);break;case 10:iA(r.type._context);break;case 22:case 23:SA()}n=n.return}if(Er=e,dr=e=dc(e.current,null),Fr=ca=t,wr=0,Pg=null,vA=vS=Yu=0,Ms=Fp=null,xu!==null){for(t=0;t<xu.length;t++)if(n=xu[t],r=n.interleaved,r!==null){n.interleaved=null;var a=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=a,r.next=o}n.pending=r}xu=null}return e}function nq(e,t){do{var n=dr;try{if(aA(),Eb.current=h0,d0){for(var r=Un.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}d0=!1}if(Ku=0,_r=xr=Un=null,Lp=!1,Cg=0,xA.current=null,n===null||n.return===null){wr=1,Pg=t,dr=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=Fr,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=OM(o);if(m!==null){m.flags&=-257,RM(m,o,l,i,t),m.mode&1&&AM(i,u,t),t=m,c=u;var y=t.updateQueue;if(y===null){var p=new Set;p.add(c),t.updateQueue=p}else y.add(c);break e}else{if(!(t&1)){AM(i,u,t),jA();break e}c=Error(Ne(426))}}else if(Rn&&l.mode&1){var x=OM(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),RM(x,o,l,i,t),rA(hf(c,l));break e}}i=c=hf(c,l),wr!==4&&(wr=2),Fp===null?Fp=[i]:Fp.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=F8(i,c,t);_M(i,v);break e;case 1:l=c;var b=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(cc===null||!cc.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=B8(i,l,t);_M(i,S);break e}}i=i.return}while(i!==null)}aq(n)}catch(j){t=j,dr===n&&n!==null&&(dr=n=n.return);continue}break}while(!0)}function rq(){var e=f0.current;return f0.current=h0,e===null?h0:e}function jA(){(wr===0||wr===3||wr===2)&&(wr=4),Er===null||!(Yu&268435455)&&!(vS&268435455)||Ul(Er,Fr)}function g0(e,t){var n=en;en|=2;var r=rq();(Er!==e||Fr!==t)&&(Mo=null,Mu(e,t));do try{Gie();break}catch(a){nq(e,a)}while(!0);if(aA(),en=n,f0.current=r,dr!==null)throw Error(Ne(261));return Er=null,Fr=0,wr}function Gie(){for(;dr!==null;)sq(dr)}function Kie(){for(;dr!==null&&!vae();)sq(dr)}function sq(e){var t=oq(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?aq(e):dr=t,xA.current=null}function aq(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=zie(n,t),n!==null){n.flags&=32767,dr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{wr=6,dr=null;return}}else if(n=Bie(n,t,ca),n!==null){dr=n;return}if(t=t.sibling,t!==null){dr=t;return}dr=t=e}while(t!==null);wr===0&&(wr=5)}function iu(e,t,n){var r=dn,a=Ha.transition;try{Ha.transition=null,dn=1,Yie(e,t,n,r)}finally{Ha.transition=a,dn=r}return null}function Yie(e,t,n,r){do Mh();while(ec!==null);if(en&6)throw Error(Ne(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ne(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Pae(e,i),e===Er&&(dr=Er=null,Fr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||fv||(fv=!0,lq(Qb,function(){return Mh(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ha.transition,Ha.transition=null;var o=dn;dn=1;var l=en;en|=4,xA.current=null,qie(e,n),J8(n,e),pie(MC),Jb=!!IC,MC=IC=null,e.current=n,Wie(n),bae(),en=l,dn=o,Ha.transition=i}else e.current=n;if(fv&&(fv=!1,ec=e,p0=a),i=e.pendingLanes,i===0&&(cc=null),jae(n.stateNode),qs(e,er()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(m0)throw m0=!1,e=tE,tE=null,e;return p0&1&&e.tag!==0&&Mh(),i=e.pendingLanes,i&1?e===nE?Bp++:(Bp=0,nE=e):Bp=0,Dc(),null}function Mh(){if(ec!==null){var e=FU(p0),t=Ha.transition,n=dn;try{if(Ha.transition=null,dn=16>e?16:e,ec===null)var r=!1;else{if(e=ec,ec=null,p0=0,en&6)throw Error(Ne(331));var a=en;for(en|=4,$e=e.current;$e!==null;){var i=$e,o=i.child;if($e.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for($e=u;$e!==null;){var d=$e;switch(d.tag){case 0:case 11:case 15:$p(8,d,i)}var h=d.child;if(h!==null)h.return=d,$e=h;else for(;$e!==null;){d=$e;var f=d.sibling,m=d.return;if(X8(d),d===u){$e=null;break}if(f!==null){f.return=m,$e=f;break}$e=m}}}var y=i.alternate;if(y!==null){var p=y.child;if(p!==null){y.child=null;do{var x=p.sibling;p.sibling=null,p=x}while(p!==null)}}$e=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,$e=o;else e:for(;$e!==null;){if(i=$e,i.flags&2048)switch(i.tag){case 0:case 11:case 15:$p(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,$e=v;break e}$e=i.return}}var b=e.current;for($e=b;$e!==null;){o=$e;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,$e=w;else e:for(o=b;$e!==null;){if(l=$e,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:xS(9,l)}}catch(j){Kn(l,l.return,j)}if(l===o){$e=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,$e=S;break e}$e=l.return}}if(en=a,Dc(),oo&&typeof oo.onPostCommitFiberRoot=="function")try{oo.onPostCommitFiberRoot(uS,e)}catch{}r=!0}return r}finally{dn=n,Ha.transition=t}}return!1}function HM(e,t,n){t=hf(n,t),t=F8(e,t,1),e=lc(e,t,1),t=_s(),e!==null&&(Hy(e,1,t),qs(e,t))}function Kn(e,t,n){if(e.tag===3)HM(e,e,n);else for(;t!==null;){if(t.tag===3){HM(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(cc===null||!cc.has(r))){e=hf(n,e),e=B8(t,e,1),t=lc(t,e,1),e=_s(),t!==null&&(Hy(t,1,e),qs(t,e));break}}t=t.return}}function Xie(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_s(),e.pingedLanes|=e.suspendedLanes&n,Er===e&&(Fr&n)===n&&(wr===4||wr===3&&(Fr&130023424)===Fr&&500>er()-bA?Mu(e,0):vA|=n),qs(e,t)}function iq(e,t){t===0&&(e.mode&1?(t=rv,rv<<=1,!(rv&130023424)&&(rv=4194304)):t=1);var n=_s();e=el(e,t),e!==null&&(Hy(e,t,n),qs(e,n))}function Qie(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),iq(e,n)}function Zie(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),iq(e,n)}var oq;oq=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||zs.current)Ds=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ds=!1,Fie(e,t,n);Ds=!!(e.flags&131072)}else Ds=!1,Rn&&t.flags&1048576&&d8(t,i0,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Pb(e,t),e=t.pendingProps;var a=lf(t,ls.current);Ih(t,n),a=fA(null,t,r,e,a,n);var i=mA();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Us(r)?(i=!0,s0(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,lA(t),a.updater=yS,t.stateNode=a,a._reactInternals=t,WC(t,r,e,n),t=GC(null,t,r,!0,i,n)):(t.tag=0,Rn&&i&&tA(t),gs(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Pb(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=eoe(r),e=pi(r,e),a){case 0:t=HC(null,t,r,e,n);break e;case 1:t=DM(null,t,r,e,n);break e;case 11:t=IM(null,t,r,e,n);break e;case 14:t=MM(null,t,r,pi(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:pi(r,a),HC(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:pi(r,a),DM(e,t,r,a,n);case 3:e:{if(W8(t),e===null)throw Error(Ne(387));
vendor: 4,737 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,a=i.element,y8(e,t),c0(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=hf(Error(Ne(423)),t),t=LM(e,t,r,n,a);break e}else if(r!==a){a=hf(Error(Ne(424)),t),t=LM(e,t,r,n,a);break e}else for(ga=oc(t.stateNode.containerInfo.firstChild),ya=t,Rn=!0,Si=null,n=p8(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cf(),r===a){t=tl(e,t,n);break e}gs(e,t,r,n)}t=t.child}return t;case 5:return x8(t),e===null&&zC(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,DC(r,a)?o=null:i!==null&&DC(r,i)&&(t.flags|=32),q8(e,t),gs(e,t,o,n),t.child;case 6:return e===null&&zC(t),null;case 13:return V8(e,t,n);case 4:return cA(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uf(t,null,r,n):gs(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:pi(r,a),IM(e,t,r,a,n);case 7:return gs(e,t,t.pendingProps,n),t.child;case 8:return gs(e,t,t.pendingProps.children,n),t.child;case 12:return gs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,wn(o0,r._currentValue),r._currentValue=o,i!==null)if(Ri(i.value,o)){if(i.children===a.children&&!zs.current){t=tl(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Go(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),UC(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(Ne(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),UC(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}gs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Ih(t,n),a=Ja(a),r=r(a),t.flags|=1,gs(e,t,r,n),t.child;case 14:return r=t.type,a=pi(r,t.pendingProps),a=pi(r.type,a),MM(e,t,r,a,n);case 15:return z8(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:pi(r,a),Pb(e,t),t.tag=1,Us(r)?(e=!0,s0(t)):e=!1,Ih(t,n),$8(t,r,a),WC(t,r,a,n),GC(null,t,r,!0,e,n);case 19:return H8(e,t,n);case 22:return U8(e,t,n)}throw Error(Ne(156,t.tag))};function lq(e,t){return MU(e,t)}function Jie(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ua(e,t,n,r){return new Jie(e,t,n,r)}function NA(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eoe(e){if(typeof e=="function")return NA(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qT)return 11;if(e===WT)return 14}return 2}function dc(e,t){var n=e.alternate;return n===null?(n=Ua(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ob(e,t,n,r,a,i){var o=2;if(r=e,typeof e=="function")NA(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ch:return Du(n.children,a,i,t);case UT:o=8,a|=8;break;case mC:return e=Ua(12,n,t,a|2),e.elementType=mC,e.lanes=i,e;case pC:return e=Ua(13,n,t,a),e.elementType=pC,e.lanes=i,e;case gC:return e=Ua(19,n,t,a),e.elementType=gC,e.lanes=i,e;case xU:return bS(n,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gU:o=10;break e;case yU:o=9;break e;case qT:o=11;break e;case WT:o=14;break e;case Dl:o=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Ua(o,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function Du(e,t,n,r){return e=Ua(7,e,r,t),e.lanes=n,e}function bS(e,t,n,r){return e=Ua(22,e,r,t),e.elementType=xU,e.lanes=n,e.stateNode={isHidden:!1},e}function J1(e,t,n){return e=Ua(6,e,null,t),e.lanes=n,e}
vendor: 5,649 bytes, line 40
40function eN(e,t,n){return t=Ua(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function toe(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=I1(0),this.expirationTimes=I1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=I1(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function _A(e,t,n,r,a,i,o,l,c){return e=new toe(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ua(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lA(i),e}function noe(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lh,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cq(e){if(!e)return Sc;e=e._reactInternals;e:{if(md(e)!==e||e.tag!==1)throw Error(Ne(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Us(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ne(171))}if(e.tag===1){var n=e.type;if(Us(n))return c8(e,n,t)}return t}function uq(e,t,n,r,a,i,o,l,c){return e=_A(n,r,!0,e,a,i,o,l,c),e.context=cq(null),n=e.current,r=_s(),a=uc(n),i=Go(r,a),i.callback=t??null,lc(n,i,a),e.current.lanes=a,Hy(e,a,r),qs(e,r),e}function wS(e,t,n,r){var a=t.current,i=_s(),o=uc(a);return n=cq(n),t.context===null?t.context=n:t.pendingContext=n,t=Go(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=lc(a,t,o),e!==null&&(ki(e,a,o,i),Cb(e,a,o)),o}function y0(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function GM(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function CA(e,t){GM(e,t),(e=e.alternate)&&GM(e,t)}function roe(){return null}var dq=typeof reportError=="function"?reportError:function(e){console.error(e)};function EA(e){this._internalRoot=e}SS.prototype.render=EA.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ne(409));wS(e,t,null,null)};SS.prototype.unmount=EA.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xu(function(){wS(null,e,null,null)}),t[Jo]=null}};function SS(e){this._internalRoot=e}SS.prototype.unstable_scheduleHydration=function(e){if(e){var t=UU();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zl.length&&t!==0&&t<zl[n].priority;n++);zl.splice(n,0,e),n===0&&WU(e)}};function kA(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function KM(){}function soe(e,t,n,r,a){if(a){if(typeof r=="function"){var i=r;r=function(){var u=y0(o);i.call(u)}}var o=uq(t,r,e,0,null,!1,!1,"",KM);return e._reactRootContainer=o,e[Jo]=o.current,wg(e.nodeType===8?e.parentNode:e),Xu(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var l=r;r=function(){var u=y0(c);l.call(u)}}var c=_A(e,0,!1,null,null,!1,!1,"",KM);return e._reactRootContainer=c,e[Jo]=c.current,wg(e.nodeType===8?e.parentNode:e),Xu(function(){wS(t,c,n,r)}),c}function NS(e,t,n,r,a){var i=n._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var l=a;a=function(){var c=y0(o);l.call(c)}}wS(t,o,e,a)}else o=soe(n,t,e,a,r);return y0(o)}BU=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Np(t.pendingLanes);n!==0&&(GT(t,n|1),qs(t,er()),!(en&6)&&(ff=er()+500,Dc()))}break;case 13:Xu(function(){var r=el(e,1);if(r!==null){var a=_s();ki(r,e,1,a)}}),CA(e,1)}};KT=function(e){if(e.tag===13){var t=el(e,134217728);if(t!==null){var n=_s();ki(t,e,134217728,n)}CA(e,134217728)}};zU=function(e){if(e.tag===13){var t=uc(e),n=el(e,t);if(n!==null){var r=_s();ki(n,e,t,r)}CA(e,t)}};UU=function(){return dn};qU=function(e,t){var n=dn;try{return dn=e,t()}finally{dn=n}};CC=function(e,t,n){switch(t){case"input":if(vC(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=mS(r);if(!a)throw Error(Ne(90));bU(r),vC(r,a)}}}break;case"textarea":SU(e,n);break;case"select":t=n.value,t!=null&&Th(e,!!n.multiple,t,!1)}};PU=wA;TU=Xu;var aoe={usingClientEntryPoint:!1,Events:[Ky,fh,mS,EU,kU,wA]},Qm={findFiberByHostInstance:yu,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ioe={bundleType:Qm.bundleType,version:Qm.version,rendererPackageName:Qm.rendererPackageName,rendererConfig:Qm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hl.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=RU(e),e===null?null:e.stateNode},findFiberByHostInstance:Qm.findFiberByHostInstance||roe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mv.isDisabled&&mv.supportsFiber)try{uS=mv.inject(ioe),oo=mv}catch{}}Ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aoe;Ca.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kA(t))throw Error(Ne(200));return noe(e,t,null,n)};Ca.createRoot=function(e,t){if(!kA(e))throw Error(Ne(299));var n=!1,r="",a=dq;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=_A(e,1,!1,null,null,n,!1,r,a),e[Jo]=t.current,wg(e.nodeType===8?e.parentNode:e),new EA(t)};Ca.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ne(188)):(e=Object.keys(e).join(","),Error(Ne(268,e)));return e=RU(t),e=e===null?null:e.stateNode,e};Ca.flushSync=function(e){return Xu(e)};Ca.hydrate=function(e,t,n){if(!jS(t))throw Error(Ne(200));return NS(null,e,t,!0,n)};Ca.hydrateRoot=function(e,t,n){if(!kA(e))throw Error(Ne(405));var r=n!=null&&n.hydratedSources||null,a=!1,i="",o=dq;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=uq(t,null,e,1,n??null,a,!1,i,o),e[Jo]=t.current,wg(e),r)for(e=0;e<r.length;e++)n=r[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new SS(t)};Ca.render=function(e,t,n){if(!jS(t))throw Error(Ne(200));return NS(null,e,t,!1,n)};Ca.unmountComponentAtNode=function(e){if(!jS(e))throw Error(Ne(40));return e._reactRootContainer?(Xu(function(){NS(null,null,e,!1,function(){e._reactRootContainer=null,e[Jo]=null})}),!0):!1};Ca.unstable_batchedUpdates=wA;Ca.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!jS(n))throw Error(Ne(200));if(e==null||e._reactInternals===void 0)throw Error(Ne(38));return NS(e,t,n,!1,r)};Ca.version="18.3.1-next-f1338f8080-20240426";function hq(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hq)}catch(e){console.error(e)}}hq(),hU.exports=Ca;var Ga=hU.exports;const Pi=$t(Ga);var fq,YM=Ga;fq=YM.createRoot,YM.hydrateRoot;const ooe=1,loe=1e6;let tN=0;function coe(){return tN=(tN+1)%Number.MAX_SAFE_INTEGER,tN.toString()}const nN=new Map,XM=e=>{if(nN.has(e))return;const t=setTimeout(()=>{nN.delete(e),zp({type:"REMOVE_TOAST",toastId:e})},loe);nN.set(e,t)},uoe=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ooe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?XM(n):e.toasts.forEach(r=>{XM(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Rb=[];let Ib={toasts:[]};function zp(e){Ib=uoe(Ib,e),Rb.forEach(t=>{t(Ib)})}function Ra({...e}){const t=coe(),n=a=>zp({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>zp({type:"DISMISS_TOAST",toastId:t});return zp({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function Ve(){const[e,t]=g.useState(Ib);return g.useEffect(()=>(Rb.push(t),()=>{const n=Rb.indexOf(t);n>-1&&Rb.splice(n,1)}),[e]),{...e,toast:Ra,dismiss:n=>zp({type:"DISMISS_TOAST",toastId:n})}}function we(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function doe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _S(...e){return t=>e.forEach(n=>doe(n,t))}function lt(...e){return g.useCallback(_S(...e),e)}function hoe(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];function u(h){const{scope:f,children:m,...y}=h,p=(f==null?void 0:f[e][c])||l,x=g.useMemo(()=>y,Object.values(y));return s.jsx(p.Provider,{value:x,children:m})}function d(h,f){const m=(f==null?void 0:f[e][c])||l,y=g.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,foe(a,...t)]}function foe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));
vendor: 9,432 bytes, line 40
40return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var yo=g.forwardRef((e,t)=>{const{children:n,...r}=e,a=g.Children.toArray(n),i=a.find(moe);if(i){const o=i.props.children,l=a.map(c=>c===i?g.Children.count(o)>1?g.Children.only(null):g.isValidElement(o)?o.props.children:null:c);return s.jsx(aE,{...r,ref:t,children:g.isValidElement(o)?g.cloneElement(o,void 0,l):null})}return s.jsx(aE,{...r,ref:t,children:n})});yo.displayName="Slot";var aE=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const a=goe(n);return g.cloneElement(n,{...poe(r,n.props),ref:t?_S(t,a):a})}return g.Children.count(n)>1?g.Children.only(null):null});aE.displayName="SlotClone";var PA=({children:e})=>s.jsx(s.Fragment,{children:e});function moe(e){return g.isValidElement(e)&&e.type===PA}function poe(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{i(...l),a(...l)}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function goe(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Xy(e){const t=e+"CollectionProvider",[n,r]=hoe(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:p}=m,x=z.useRef(null),v=z.useRef(new Map).current;return s.jsx(a,{scope:y,itemMap:v,collectionRef:x,children:p})};o.displayName=t;const l=e+"CollectionSlot",c=z.forwardRef((m,y)=>{const{scope:p,children:x}=m,v=i(l,p),b=lt(y,v.collectionRef);return s.jsx(yo,{ref:b,children:x})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=z.forwardRef((m,y)=>{const{scope:p,children:x,...v}=m,b=z.useRef(null),w=lt(y,b),S=i(u,p);return z.useEffect(()=>(S.itemMap.set(b,{ref:b,...v}),()=>void S.itemMap.delete(b))),s.jsx(yo,{[d]:"",ref:w,children:x})});h.displayName=u;function f(m){const y=i(e+"CollectionConsumer",m);return z.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const v=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((S,j)=>v.indexOf(S.ref.current)-v.indexOf(j.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},f,r]}function yoe(e,t){const n=g.createContext(t),r=i=>{const{children:o,...l}=i,c=g.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function a(i){const o=g.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Qs(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];const u=h=>{var v;const{scope:f,children:m,...y}=h,p=((v=f==null?void 0:f[e])==null?void 0:v[c])||l,x=g.useMemo(()=>y,Object.values(y));return s.jsx(p.Provider,{value:x,children:m})};u.displayName=i+"Provider";function d(h,f){var p;const m=((p=f==null?void 0:f[e])==null?void 0:p[c])||l,y=g.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,xoe(a,...t)]}function xoe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var voe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Te=voe.reduce((e,t)=>{const n=g.forwardRef((r,a)=>{const{asChild:i,...o}=r,l=i?yo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...o,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Lc(e,t){e&&Ga.flushSync(()=>e.dispatchEvent(t))}function Dt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function boe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var woe="DismissableLayer",iE="dismissableLayer.update",Soe="dismissableLayer.pointerDownOutside",joe="dismissableLayer.focusOutside",QM,mq=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pq=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(mq),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=lt(t,C=>h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=_oe(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=Coe(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return boe(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(QM=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ZM(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=QM)}},[d,f,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ZM())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(iE,C),()=>document.removeEventListener(iE,C)},[]),s.jsx(Te.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,j.onPointerDownCapture)})});pq.displayName=woe;var Noe="DismissableLayerBranch",gq=g.forwardRef((e,t)=>{const n=g.useContext(mq),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Te.div,{...e,ref:a})});gq.displayName=Noe;function _oe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){yq(Soe,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Coe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&yq(joe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ZM(){const e=new CustomEvent(iE);document.dispatchEvent(e)}function yq(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var Eoe=pq,koe=gq,Vn=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Poe="Portal",xq=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);Vn(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Pi.createPortal(s.jsx(Te.div,{...r,ref:t}),o):null});xq.displayName=Poe;function Toe(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var As=e=>{const{present:t,children:n}=e,r=Aoe(t),a=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=lt(r.ref,Ooe(a));return typeof n=="function"||r.isPresent?g.cloneElement(a,{ref:i}):null};As.displayName="Presence";function Aoe(e){const[t,n]=g.useState(),r=g.useRef({}),a=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[l,c]=Toe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=pv(r.current);i.current=l==="mounted"?u:"none"},[l]),Vn(()=>{const u=r.current,d=a.current;if(d!==e){const f=i.current,m=pv(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),Vn(()=>
40{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const p=pv(r.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=m=>{m.target===t&&(i.current=pv(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function pv(e){return(e==null?void 0:e.animationName)||"none"}function Ooe(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Hs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Roe({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,l=Dt(n),c=g.useCallback(u=>{if(i){const h=typeof u=="function"?u(e):u;h!==e&&l(h)}else a(u)},[i,e,a,l]);return[o,c]}function Roe({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,a=g.useRef(r),i=Dt(t);return g.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}var Ioe="VisuallyHidden",Qy=g.forwardRef((e,t)=>s.jsx(Te.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Qy.displayName=Ioe;var Moe=Qy,TA="ToastProvider",[AA,Doe,Loe]=Xy("Toast"),[vq,Hdt]=Qs("Toast",[Loe]),[$oe,CS]=vq(TA),bq=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[l,c]=g.useState(null),[u,d]=g.useState(0),h=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${TA}\`. Expected non-empty \`string\`.`),s.jsx(AA.Provider,{scope:t,children:s.jsx($oe,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:g.useCallback(()=>d(m=>m+1),[]),onToastRemove:g.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};bq.displayName=TA;var wq="ToastViewport",Foe=["F8"],oE="toast.viewportPause",lE="toast.viewportResume",Sq=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Foe,label:a="Notifications ({hotkey})",...i}=e,o=CS(wq,n),l=Doe(n),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),h=g.useRef(null),f=lt(t,h,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;g.useEffect(()=>{const x=v=>{var w;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),g.useEffect(()=>{const x=c.current,v=h.current;if(y&&x&&v){const b=()=>{if(!o.isClosePausedRef.current){const N=new CustomEvent(oE);v.dispatchEvent(N),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const N=new CustomEvent(lE);v.dispatchEvent(N),o.isClosePausedRef.current=!1}},S=N=>{!x.contains(N.relatedTarget)&&w()},j=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",b),x.addEventListener("focusout",S),x.addEventListener("pointermove",b),x.addEventListener("pointerleave",j),window.addEventListener("blur",b),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",b),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",b),x.removeEventListener("pointerleave",j),window.removeEventListener("blur",b),window.removeEventListener("focus",w)}}},[y,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:x})=>{const b=l().map(w=>{const S=w.ref.current,j=[S,...Zoe(S)];return x==="forwards"?j:j.reverse()});return(x==="forwards"?b.reverse():b).flat()},[l]);return g.useEffect(()=>{const x=h.current;if(x){const v=b=>{var j,N,C;const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const _=document.activeElement,A=b.shiftKey;if(b.target===x&&A){(j=u.current)==null||j.focus();return}const I=p({tabbingDirection:A?"backwards":"forwards"}),B=I.findIndex($=>$===_);rN(I.slice(B+1))?b.preventDefault():A?(N=u.current)==null||N.focus():(C=d.current)==null||C.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[l,p]),s.jsxs(koe,{ref:c,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&s.jsx(cE,{ref:u,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"forwards"});rN(x)}}),s.jsx(AA.Slot,{scope:n,children:s.jsx(Te.ol,{tabIndex:-1,...i,ref:f})}),y&&s.jsx(cE,{ref:d,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"backwards"});rN(x)}})]})});Sq.displayName=wq;var jq="ToastFocusProxy",cE=g.forwardRef((e,t)=>
40{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,i=CS(jq,n);return s.jsx(Qy,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});cE.displayName=jq;var ES="Toast",Boe="toast.swipeStart",zoe="toast.swipeMove",Uoe="toast.swipeCancel",qoe="toast.swipeEnd",Nq=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:i,...o}=e,[l=!0,c]=Hs({prop:r,defaultProp:a,onChange:i});return s.jsx(As,{present:n||l,children:s.jsx(Hoe,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:we(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:we(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:we(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:we(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Nq.displayName=ES;var[Woe,Voe]=vq(ES,{onClose(){}}),Hoe=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:m,...y}=e,p=CS(ES,n),[x,v]=g.useState(null),b=lt(t,$=>v($)),w=g.useRef(null),S=g.useRef(null),j=a||p.duration,N=g.useRef(0),C=g.useRef(j),_=g.useRef(0),{onToastAdd:A,onToastRemove:P}=p,R=Dt(()=>{var q;(x==null?void 0:x.contains(document.activeElement))&&((q=p.viewport)==null||q.focus()),o()}),I=g.useCallback($=>{!$||$===1/0||(window.clearTimeout(_.current),N.current=new Date().getTime(),_.current=window.setTimeout(R,$))},[R]);g.useEffect(()=>{const $=p.viewport;if($){const q=()=>{I(C.current),u==null||u()},L=()=>{const k=new Date().getTime()-N.current;C.current=C.current-k,window.clearTimeout(_.current),c==null||c()};return $.addEventListener(oE,L),$.addEventListener(lE,q),()=>{$.removeEventListener(oE,L),$.removeEventListener(lE,q)}}},[p.viewport,j,c,u,I]),g.useEffect(()=>{i&&!p.isClosePausedRef.current&&I(j)},[i,j,p.isClosePausedRef,I]),g.useEffect(()=>(A(),()=>P()),[A,P]);const B=g.useMemo(()=>x?Aq(x):null,[x]);return p.viewport?s.jsxs(s.Fragment,{children:[B&&s.jsx(Goe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),s.jsx(Woe,{scope:n,onClose:R,children:Ga.createPortal(s.jsx(AA.ItemSlot,{scope:n,children:s.jsx(Eoe,{asChild:!0,onEscapeKeyDown:we(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||R(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(Te.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:we(e.onKeyDown,$=>{$.key==="Escape"&&(l==null||l($.nativeEvent),$.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:we(e.onPointerDown,$=>{$.button===0&&(w.current={x:$.clientX,y:$.clientY})}),onPointerMove:we(e.onPointerMove,$=>{if(!w.current)return;const q=$.clientX-w.current.x,L=$.clientY-w.current.y,k=!!S.current,T=["left","right"].includes(p.swipeDirection),F=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,O=T?F(0,q):0,E=T?0:F(0,L),D=$.pointerType==="touch"?10:2,M={x:O,y:E},X={originalEvent:$,delta:M};k?(S.current=M,gv(zoe,h,X,{discrete:!1})):JM(M,p.swipeDirection,D)?(S.current=M,gv(Boe,d,X,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(q)>D||Math.abs(L)>D)&&(w.current=null)}),onPointerUp:we(e.onPointerUp,$=>{const q=S.current,L=$.target;if(L.hasPointerCapture($.pointerId)&&L.releasePointerCapture($.pointerId),S.current=null,w.current=null,q){const k=$.currentTarget,T={originalEvent:$,delta:q};JM(q,p.swipeDirection,p.swipeThreshold)?gv(qoe,m,T,{discrete:!0}):gv(Uoe,f,T,{discrete:!0}),k.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Goe=e=>{const{__scopeToast:t,children:n,...r}=e,a=CS(ES,t),[i,o]=g.useState(!1),[l,c]=g.useState(!1);return Xoe(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(xq,{asChild:!0,children:s.jsx(Qy,{...r,children:i&&s.jsxs(s.Fragment,{children:[a.label," ",n]})})})},Koe="ToastTitle",_q=g.forwardRef((e,t)=>
vendor: 4,755 bytes, lines 40-60
40{const{__scopeToast:n,...r}=e;return s.jsx(Te.div,{...r,ref:t})});_q.displayName=Koe;var Yoe="ToastDescription",Cq=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(Te.div,{...r,ref:t})});Cq.displayName=Yoe;var Eq="ToastAction",kq=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(Tq,{altText:n,asChild:!0,children:s.jsx(OA,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Eq}\`. Expected non-empty \`string\`.`),null)});kq.displayName=Eq;var Pq="ToastClose",OA=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=Voe(Pq,n);return s.jsx(Tq,{asChild:!0,children:s.jsx(Te.button,{type:"button",...r,ref:t,onClick:we(e.onClick,a.onClose)})})});OA.displayName=Pq;var Tq=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return s.jsx(Te.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Aq(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Qoe(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Aq(r))}}),t}function gv(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var JM=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),i=r>a;return t==="left"||t==="right"?i&&r>n:!i&&a>n};function Xoe(e=()=>{}){const t=Dt(e);Vn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Qoe(e){return e.nodeType===e.ELEMENT_NODE}function Zoe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rN(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Joe=bq,Oq=Sq,Rq=Nq,Iq=_q,Mq=Cq,Dq=kq,Lq=OA;function $q(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=$q(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=$q(e))&&(r&&(r+=" "),r+=t);return r}const eD=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tD=Nt,pd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tD(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=eD(d)||eD(h);return a[u][f]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...m}=d;return Object.entries(m).every(y=>{let[p,x]=y;return Array.isArray(x)?x.includes({...i,...l}[p]):{...i,...l}[p]===x})?[...u,h,f]:u},[]);return tD(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const ele=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fq=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var tle={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 nle=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:o,...l},c)=>g.createElement("svg",{ref:c,...tle,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fq("lucide",a),...l},[...o.map(([u,d])=>g.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const me=(e,t)=>
60{const n=g.forwardRef(({className:r,...a},i)=>g.createElement(nle,{ref:i,iconNode:t,className:Fq(`lucide-${ele(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const Br=me("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const xo=me("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const Ws=me("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const rle=me("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const sle=me("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const uE=me("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const Mn=me("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const dE=me("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const ale=me("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const sN=me("BookmarkCheck",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z",key:"169p4p"}],["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const x0=me("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const hE=me("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const Bq=me("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Ba=me("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const tt=me("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
135],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const nD=me("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const ile=me("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const sn=me("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const os=me("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const Tt=me("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const rD=me("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Ko=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const hc=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const kS=me("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const lm=me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const zq=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const Gs=me("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const ks=me("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const Zy=me("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const fE=me("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const ole=me("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const Jy=me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const Uq=me("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const Xn=me("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const Mb=me("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const RA=me("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const lle=me("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const fc=me("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const nl=me("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const Fn=me("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const Ka=me("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const qq=me("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const ar=me("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const mc=me("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const zr=me("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const Up=me("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const gd=me("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const Qu=me("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const Wq=me("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const Dn=me("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const cle=me("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const mE=me("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/**
321 * @license lucide-react v0.462.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const ule=me("HeartHandshake",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]]);/**
326 * @license lucide-react v0.462.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const zn=me("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
331 * @license lucide-react v0.462.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const dle=me("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
336 * @license lucide-react v0.462.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const mf=me("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
341 * @license lucide-react v0.462.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const pf=me("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
346 * @license lucide-react v0.462.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const v0=me("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
351 * @license lucide-react v0.462.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const hle=me("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
356 * @license lucide-react v0.462.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const xa=me("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
361 * @license lucide-react v0.462.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const fle=me("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
366 * @license lucide-react v0.462.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const Pt=me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
371 * @license lucide-react v0.462.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const Tg=me("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
376 * @license lucide-react v0.462.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const IA=me("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
381 * @license lucide-react v0.462.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const Vq=me("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
386 * @license lucide-react v0.462.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const mle=me("Magnet",[["path",{d:"m6 15-4-4 6.75-6.77a7.79 7.79 0 0 1 11 11L13 22l-4-4 6.39-6.36a2.14 2.14 0 0 0-3-3L6 15",key:"1i3lhw"}],["path",{d:"m5 8 4 4",key:"j6kj7e"}],["path",{d:"m12 15 4 4",key:"lnac28"}]]);/**
391 * @license lucide-react v0.462.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const _a=me("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
396 * @license lucide-react v0.462.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const jc=me("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
401 * @license lucide-react v0.462.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const ple=me("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
406 * @license lucide-react v0.462.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const gle=me("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
411 * @license lucide-react v0.462.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const ti=me("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
416 * @license lucide-react v0.462.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const va=me("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
421 * @license lucide-react v0.462.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const sD=me("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
426 * @license lucide-react v0.462.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const pE=me("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
431 * @license lucide-react v0.462.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const Hq=me("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
436 * @license lucide-react v0.462.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const yle=me("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
441 * @license lucide-react v0.462.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const xle=me("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
446 * @license lucide-react v0.462.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const Gq=me("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
451 * @license lucide-react v0.462.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const Kq=me("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
456 * @license lucide-react v0.462.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const b0=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
461 * @license lucide-react v0.462.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const vle=me("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
466 * @license lucide-react v0.462.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const dt=me("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
471 * @license lucide-react v0.462.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const Yq=me("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}
475],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
476 * @license lucide-react v0.462.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const ble=me("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
481 * @license lucide-react v0.462.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const wle=me("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
486 * @license lucide-react v0.462.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const PS=me("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
491 * @license lucide-react v0.462.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const MA=me("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
496 * @license lucide-react v0.462.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const Xq=me("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/**
501 * @license lucide-react v0.462.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const st=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
506 * @license lucide-react v0.462.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const TS=me("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
511 * @license lucide-react v0.462.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const Qq=me("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
516 * @license lucide-react v0.462.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const vo=me("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
521 * @license lucide-react v0.462.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const ex=me("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
526 * @license lucide-react v0.462.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const Sle=me("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
531 * @license lucide-react v0.462.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const $l=me("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
535y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
536 * @license lucide-react v0.462.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const Ya=me("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
541 * @license lucide-react v0.462.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const Ad=me("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
546 * @license lucide-react v0.462.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const rl=me("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
551 * @license lucide-react v0.462.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const jle=me("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
556 * @license lucide-react v0.462.0 - ISC
557 *
558 * This source code is licensed under the ISC license.
559 * See the LICENSE file in the root directory of this source tree.
560 */const An=me("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
561 * @license lucide-react v0.462.0 - ISC
562 *
563 * This source code is licensed under the ISC license.
564 * See the LICENSE file in the root directory of this source tree.
565 */const Zq=me("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
566 * @license lucide-react v0.462.0 - ISC
567 *
568 * This source code is licensed under the ISC license.
569 * See the LICENSE file in the root directory of this source tree.
570 */const tn=me("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
571 * @license lucide-react v0.462.0 - ISC
572 *
573 * This source code is licensed under the ISC license.
574 * See the LICENSE file in the root directory of this source tree.
575 */const Jq=me("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
576 * @license lucide-react v0.462.0 - ISC
577 *
578 * This source code is licensed under the ISC license.
579 * See the LICENSE file in the root directory of this source tree.
580 */const e9=me("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
581 * @license lucide-react v0.462.0 - ISC
582 *
583 * This source code is licensed under the ISC license.
584 * See the LICENSE file in the root directory of this source tree.
585 */const co=me("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 4,599 bytes, lines 585-640
585],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
586 * @license lucide-react v0.462.0 - ISC
587 *
588 * This source code is licensed under the ISC license.
589 * See the LICENSE file in the root directory of this source tree.
590 */const DA=me("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
591 * @license lucide-react v0.462.0 - ISC
592 *
593 * This source code is licensed under the ISC license.
594 * See the LICENSE file in the root directory of this source tree.
595 */const ze=me("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
596 * @license lucide-react v0.462.0 - ISC
597 *
598 * This source code is licensed under the ISC license.
599 * See the LICENSE file in the root directory of this source tree.
600 */const t9=me("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
601 * @license lucide-react v0.462.0 - ISC
602 *
603 * This source code is licensed under the ISC license.
604 * See the LICENSE file in the root directory of this source tree.
605 */const gf=me("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
606 * @license lucide-react v0.462.0 - ISC
607 *
608 * This source code is licensed under the ISC license.
609 * See the LICENSE file in the root directory of this source tree.
610 */const LA=me("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
611 * @license lucide-react v0.462.0 - ISC
612 *
613 * This source code is licensed under the ISC license.
614 * See the LICENSE file in the root directory of this source tree.
615 */const n9=me("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
616 * @license lucide-react v0.462.0 - ISC
617 *
618 * This source code is licensed under the ISC license.
619 * See the LICENSE file in the root directory of this source tree.
620 */const Ti=me("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
621 * @license lucide-react v0.462.0 - ISC
622 *
623 * This source code is licensed under the ISC license.
624 * See the LICENSE file in the root directory of this source tree.
625 */const At=me("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
626 * @license lucide-react v0.462.0 - ISC
627 *
628 * This source code is licensed under the ISC license.
629 * See the LICENSE file in the root directory of this source tree.
630 */const Nle=me("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
631 * @license lucide-react v0.462.0 - ISC
632 *
633 * This source code is licensed under the ISC license.
634 * See the LICENSE file in the root directory of this source tree.
635 */const tr=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
636 * @license lucide-react v0.462.0 - ISC
637 *
638 * This source code is licensed under the ISC license.
639 * See the LICENSE file in the root directory of this source tree.
640 */const Tn=me("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),$A="-",_le=e=>{const t=Ele(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split($A);return l[0]===""&&l.length!==1&&l.shift(),r9(l,t)||Cle(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},r9=(e,t)=>
vendor: 5,629 bytes, line 640
640{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?r9(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join($A);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},aD=/^\[(.+)\]$/,Cle=e=>{if(aD.test(e)){const t=aD.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ele=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ple(Object.entries(e.classGroups),n).forEach(([i,o])=>{gE(o,r,i,t)}),r},gE=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:iD(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(kle(a)){gE(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{gE(o,iD(t,i),n,r)})})},iD=(e,t)=>{let n=e;return t.split($A).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},kle=e=>e.isThemeGetter,Ple=(e,t)=>t?e.map(([n,r])=>{const a=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,a]}):e,Tle=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return a(i,o),o},set(i,o){n.has(i)?n.set(i,o):a(i,o)}}},s9="!",Ale=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let x=0;x<l.length;x++){let v=l[x];if(u===0){if(v===a&&(r||l.slice(x,x+i)===t)){c.push(l.slice(d,x)),d=x+i;continue}if(v==="/"){h=x;continue}}v==="["?u++:v==="]"&&u--}const f=c.length===0?l:l.substring(d),m=f.startsWith(s9),y=m?f.substring(1):f,p=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}};return n?l=>n({className:l,parseClassName:o}):o},Ole=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Rle=e=>({cache:Tle(e.cacheSize),parseClassName:Ale(e),..._le(e)}),Ile=/\s+/,Mle=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(Ile);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let y=!!m,p=r(y?f.substring(0,m):f);if(!p){if(!y){l=u+(l.length>0?" "+l:l);continue}if(p=r(f),!p){l=u+(l.length>0?" "+l:l);continue}y=!1}const x=Ole(d).join(":"),v=h?x+s9:x,b=v+p;if(i.includes(b))continue;i.push(b);const w=a(p,y);for(let S=0;S<w.length;++S){const j=w[S];i.push(v+j)}l=u+(l.length>0?" "+l:l)}return l};function Dle(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=a9(t))&&(r&&(r+=" "),r+=n);return r}const a9=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=a9(e[r]))&&(n&&(n+=" "),n+=t);return n};function Lle(e,...t){let n,r,a,i=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=Rle(u),r=n.cache.get,a=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=Mle(c,n);return a(c,d),d}return function(){return i(Dle.apply(null,arguments))}}const _n=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},i9=/^\[(?:([a-z-]+):)?(.+)\]$/i,$le=/^\d+\/\d+$/,Fle=new Set(["px","full","screen"]),Ble=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zle=/\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$/,Ule=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qle=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wle=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,To=e=>Dh(e)||Fle.has(e)||$le.test(e),Nl=e=>cm(e,"length",Zle),Dh=e=>!!e&&!Number.isNaN(Number(e)),aN=e=>cm(e,"number",Dh),Zm=e=>!!e&&Number.isInteger(Number(e)),Vle=e=>e.endsWith("%")&&Dh(e.slice(0,-1)),Ct=e=>i9.test(e),_l=e=>Ble.test(e),Hle=new Set(["length","size","percentage"]),Gle=e=>cm(e,Hle,o9),Kle=e=>cm(e,"position",o9),Yle=new Set(["image","url"]),Xle=e=>cm(e,Yle,ece),Qle=e=>cm(e,"",Jle),Jm=()=>!0,cm=(e,t,n)=>{const r=i9.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Zle=e=>zle.test(e)&&!Ule.test(e),o9=()=>!1,Jle=e=>qle.test(e),ece=e=>Wle.test(e),tce=()=>{const e=_n("colors"),t=_n("spacing"),n=_n("blur"),r=_n("brightness"),a=_n("borderColor"),i=_n("borderRadius"),o=_n("borderSpacing"),l=_n("borderWidth"),c=_n("contrast"),u=_n("grayscale"),d=_n("hueRotate"),h=_n("invert"),f=_n("gap"),m=_n("gradientColorStops"),y=_n("gradientColorStopPositions"),p=_n("inset"),x=_n("margin"),v=_n("opacity"),b=_n("padding"),w=_n("saturate"),S=_n("scale"),j=_n("sepia"),N=_n("skew"),C=_n("space"),_=_n("translate"),A=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",Ct,t],I=()=>[Ct,t],B=()=>["",To,Nl],$=()=>["auto",Dh,Ct],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",Ct],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[Dh,Ct];return{cacheSize:500,separator:":",theme:{colors:[Jm],spacing:[To,Nl],blur:["none","",_l,Ct],brightness:E(),borderColor:[e],borderRadius:["n
vendor: 4,167 bytes, line 640
640one","","full",_l,Ct],borderSpacing:I(),borderWidth:B(),contrast:E(),grayscale:F(),hueRotate:E(),invert:F(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Vle,Nl],inset:R(),margin:R(),opacity:E(),padding:I(),saturate:E(),scale:E(),sepia:F(),skew:E(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",Ct]}],container:["container"],columns:[{columns:[_l]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:[...q(),Ct]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zm,Ct]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ct]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",Zm,Ct]}],"grid-cols":[{"grid-cols":[Jm]}],"col-start-end":[{col:["auto",{span:["full",Zm,Ct]},Ct]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[Jm]}],"row-start-end":[{row:["auto",{span:[Zm,Ct]},Ct]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ct]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ct]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ct,t]}],"min-w":[{"min-w":[Ct,t,"min","max","fit"]}],"max-w":[{"max-w":[Ct,t,"none","full","min","max","fit","prose",{screen:[_l]},_l]}],h:[{h:[Ct,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ct,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ct,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ct,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_l,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",aN
vendor: 6,104 bytes, line 640
640]}],"font-family":[{font:[Jm]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ct]}],"line-clamp":[{"line-clamp":["none",Dh,aN]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",To,Ct]}],"list-image":[{"list-image":["none",Ct]}],"list-style-type":[{list:["none","disc","decimal",Ct]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",To,Nl]}],"underline-offset":[{"underline-offset":["auto",To,Ct]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ct]}],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",Ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Kle]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gle]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xle]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[To,Ct]}],"outline-w":[{outline:[To,Nl]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[To,Nl]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_l,Qle]}],"shadow-color":[{shadow:[Jm]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...k(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":k()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",_l,Ct]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ct]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",Ct]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ct]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Zm,Ct]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ct]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
640none","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",Ct]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",Ct]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[To,Nl,aN]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},nce=Lle(tce);function ve(...e){return nce(Nt(e))}const rce=Joe,l9=g.forwardRef(({className:e,...t},n)=>s.jsx(Oq,{ref:n,className:ve("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));l9.displayName=Oq.displayName;const sce=pd("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"}}),c9=g.forwardRef(({className:e,variant:t,...n},r)=>s.jsx(Rq,{ref:r,className:ve(sce({variant:t}),e),...n}));c9.displayName=Rq.displayName;const ace=g.forwardRef(({className:e,...t},n)=>s.jsx(Dq,{ref:n,className:ve("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));ace.displayName=Dq.displayName;const u9=g.forwardRef(({className:e,...t},n)=>s.jsx(Lq,{ref:n,className:ve("absolute right-2 top-2 rounded-md p-1 text-foreground
640/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(tr,{className:"h-4 w-4"})}));u9.displayName=Lq.displayName;const d9=g.forwardRef(({className:e,...t},n)=>s.jsx(Iq,{ref:n,className:ve("text-sm font-semibold",e),...t}));d9.displayName=Iq.displayName;const h9=g.forwardRef(({className:e,...t},n)=>s.jsx(Mq,{ref:n,className:ve("text-sm opacity-90",e),...t}));h9.displayName=Mq.displayName;function f9(){const{toasts:e}=Ve();return s.jsxs(rce,{children:[e.map(function({id:t,title:n,description:r,action:a,...i}){return s.jsxs(c9,{...i,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(d9,{children:n}),r&&s.jsx(h9,{children:r})]}),a,s.jsx(u9,{})]},t)}),s.jsx(l9,{})]})}var oD=["light","dark"],ice="(prefers-color-scheme: dark)",oce=g.createContext(void 0),lce={setTheme:e=>{},themes:[]},cce=()=>{var e;return(e=g.useContext(oce))!=null?e:lce};g.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:o,attrs:l,nonce:c})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=a?oD.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,p=!1,x=!0)=>{let v=o?o[y]:y,b=p?y+"|| ''":`'${v}'`,w="";return a&&x&&!p&&oD.includes(y)&&(w+=`d.style.colorScheme = '${y}';`),n==="class"?p||v?w+=`c.add(${b})`:w+="null":v&&(w+=`d[s](n,${b})`),w},m=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${ice}',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)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return g.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var uce=e=>{switch(e){case"success":return fce;case"info":return pce;case"warning":return mce;case"error":return gce;default:return null}},dce=Array(12).fill(0),hce=({visible:e})=>z.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},z.createElement("div",{className:"sonner-spinner"},dce.map((t,n)=>z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),fce=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),mce=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},z.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"})),pce=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),gce=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),yce=()=>{let[e,t]=z.useState(document.hidden);return z.useEffect(()=>{let n=()=>{t(document.hidden)};
640return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},yE=1,xce=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:yE++,i=this.toasts.find(l=>l.id===a),o=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:n}),{...l,...e,id:a,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:a}),a},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
640this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),a=n!==void 0;return r.then(async i=>{if(bce(i)&&!i.ok){a=!1;let o=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,l=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:n,type:"error",message:o,description:l})}else if(t.success!==void 0){a=!1;let o=typeof t.success=="function"?await t.success(i):t.success,l=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"success",message:o,description:l})}}).catch(async i=>{if(t.error!==void 0){a=!1;let o=typeof t.error=="function"?await t.error(i):t.error,l=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"error",message:o,description:l})}}).finally(()=>{var i;a&&(this.dismiss(n),n=void 0),(i=t.finally)==null||i.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||yE++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},la=new xce,vce=(e,t)=>{let n=(t==null?void 0:t.id)||yE++;return la.addToast({title:e,...t,id:n}),n},bce=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wce=vce,Sce=()=>la.toasts,Ae=Object.assign(wce,{success:la.success,info:la.info,warning:la.warning,error:la.error,custom:la.custom,message:la.message,promise:la.promise,dismiss:la.dismiss,loading:la.loading},{getHistory:Sce});function jce(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}jce(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
640left: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;background:var(--gray1);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}: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:0;right:0;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}
640: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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%);--error-text: hsl(358, 100%, 81%)}[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%)}
641`);function yv(e){return e.label!==void 0}var Nce=3,_ce="32px",Cce=4e3,Ece=356,kce=14,Pce=20,Tce=200;function Ace(...e){return e.filter(Boolean).join(" ")}var Oce=e=>{var t,n,r,a,i,o,l,c,u,d;let{invert:h,toast:f,unstyled:m,interacting:y,setHeights:p,visibleToasts:x,heights:v,index:b,toasts:w,expanded:S,removeToast:j,defaultRichColors:N,closeButton:C,style:_,cancelButtonStyle:A,actionButtonStyle:P,className:R="",descriptionClassName:I="",duration:B,position:$,gap:q,loadingIcon:L,expandByDefault:k,classNames:T,icons:F,closeButtonAriaLabel:O="Close toast",pauseWhenPageIsHidden:E,cn:D}=e,[M,X]=z.useState(!1),[W,re]=z.useState(!1),[ne,le]=z.useState(!1),[ie,ye]=z.useState(!1),[pe,G]=z.useState(0),[Pe,J]=z.useState(0),oe=z.useRef(null),se=z.useRef(null),je=b===0,Ce=b+1<=x,ut=f.type,Ze=f.dismissible!==!1,Ye=f.className||"",Zt=f.de
641scriptionClassName||"",Yt=z.useMemo(()=>v.findIndex(He=>He.toastId===f.id)||0,[v,f.id]),Nn=z.useMemo(()=>{var He;return(He=f.closeButton)!=null?He:C},[f.closeButton,C]),Z=z.useMemo(()=>f.duration||B||Cce,[f.duration,B]),V=z.useRef(0),H=z.useRef(0),ae=z.useRef(0),be=z.useRef(null),[Re,Oe]=$.split("-"),vt=z.useMemo(()=>v.reduce((He,rt,Wt)=>Wt>=Yt?He:He+rt.height,0),[v,Yt]),qt=yce(),li=f.invert||h,Me=ut==="loading";H.current=z.useMemo(()=>Yt*q+vt,[Yt,vt]),z.useEffect(()=>{X(!0)},[]),z.useLayoutEffect(()=>{if(!M)return;let He=se.current,rt=He.style.height;He.style.height="auto";let Wt=He.getBoundingClientRect().height;He.style.height=rt,J(Wt),p(Hr=>Hr.find(Or=>Or.toastId===f.id)?Hr.map(Or=>Or.toastId===f.id?{...Or,height:Wt}:Or):[{toastId:f.id,height:Wt,position:f.position},...Hr])},[M,f.title,f.description,p,f.id]);let Xe=z.useCallback(()=>{re(!0),G(H.current),p(He=>He.filter(rt=>rt.toastId!==f.id)),setTimeout(()=>{j(f)},Tce)},[f,j,p,H]);z.useEffect(()=>{if(f.promise&&ut==="loading"||f.duration===1/0||f.type==="loading")return;let He,rt=Z;return S||y||E&&qt?(()=>{if(ae.current<V.current){let Wt=new Date().getTime()-V.current;rt=rt-Wt}ae.current=new Date().getTime()})():rt!==1/0&&(V.current=new Date().getTime(),He=setTimeout(()=>{var Wt;(Wt=f.onAutoClose)==null||Wt.call(f,f),Xe()},rt)),()=>clearTimeout(He)},[S,y,k,f,Z,Xe,f.promise,ut,E,qt]),z.useEffect(()=>{let He=se.current;if(He){let rt=He.getBoundingClientRect().height;return J(rt),p(Wt=>[{toastId:f.id,height:rt,position:f.position},...Wt]),()=>p(Wt=>Wt.filter(Hr=>Hr.toastId!==f.id))}},[p,f.id]),z.useEffect(()=>{f.delete&&Xe()},[Xe,f.delete]);function ir(){return F!=null&&F.loading?z.createElement("div",{className:"sonner-loader","data-visible":ut==="loading"},F.loading):L?z.createElement("div",{className:"sonner-loader","data-visible":ut==="loading"},L):z.createElement(hce,{visible:ut==="loading"})}return z.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:se,className:D(R,Ye,T==null?void 0:T.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[ut],(n=f==null?void 0:f.classNames)==null?void 0:n[ut]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:N,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":M,"data-promise":!!f.promise,"data-removed":W,"data-visible":Ce,"data-y-position":Re,"data-x-position":Oe,"data-index":b,"data-front":je,"data-swiping":ne,"data-dismissible":Ze,"data-type":ut,"data-invert":li,"data-swipe-out":ie,"data-expanded":!!(S||k&&M),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${W?pe:H.current}px`,"--initial-height":k?"auto":`${Pe}px`,..._,...f.style},onPointerDown:He=>{Me||!Ze||(oe.current=new Date,G(H.current),He.target.setPointerCapture(He.pointerId),He.target.tagName!=="BUTTON"&&(le(!0),be.current={x:He.clientX,y:He.clientY}))},onPointerUp:()=>{var He,rt,Wt,Hr;if(ie||!Ze)return;be.current=null;let Or=Number(((He=se.current)==null?void 0:He.style.getPropertyValue("--swipe-amount").replace("px",""))||0),_t=new Date().getTime()-((rt=oe.current)==null?void 0:rt.getTime()),ea=Math.abs(Or)/_t;if(Math.abs(Or)>=Pce||ea>.11){G(H.current),(Wt=f.onDismiss)==null||Wt.call(f,f),Xe(),ye(!0);return}(Hr=se.current)==null||Hr.style.setProperty("--swipe-amount","0px"),le(!1)},onPointerMove:He=>{var rt;if(!be.current||!Ze)return;let Wt=He.clientY-be.current.y,Hr=He.clientX-be.current.x,Or=(Re==="top"?Math.min:Math.max)(0,Wt),_t=He.pointerType==="touch"?10:2;Math.abs(Or)>_t?(rt=se.current)==null||rt.style.setProperty("--swipe-amount",`${Wt}px`):Math.abs(Hr)>_t&&(be.current=null)}},Nn&&!f.jsx?z.createElement("button",{"aria-label":O,"data-disabled":Me,"data-close-button":!0,onClick:Me||!Ze?()=>{}:()=>{var He;Xe(),(He=f.onDismiss)==null||He.call(f,f)},className:D(T==null?void 0:T.closeButton,(a=f==null?void 0:f.classNames)==null?void 0:a.closeButton)},z.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"},z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||z.isValidElement(f.title)?f.jsx||f.title:z.createElement(z.Fragment,null,ut||f.icon||f.promise?z.createElement("div",{"data-icon":"",className:D(T==null?void 0:T.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ir():null,f.type!=="loading"?f.icon||(F==null?void 0:F[ut])||uce(ut):null):null,z.createElement("div",{"data-content":"",className:D(T==null?void 0:T.content,(o=f==null?void 0:f.classNames)==null?void 0:o.content)},z.createElement("div",{"data-title":"",className:D(T==null?void 0:T.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},f.title),f.description?z.createElement("div",{"data-description":"",className:D(I,Zt,T==null?void 0:T.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},f.description):null),z.isValidElement(f.cancel)?f.cancel:f.cancel&&yv(f.cancel)?z.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||A,onClick:He=>{var rt,Wt;yv(f.cancel)&&Ze&&((Wt=(rt=f.cancel).onClick)==null||Wt.call(rt,He),Xe())},className:D(T==null?void 0:T.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,z.isValidElement(f.action)?f.action:f.action&&yv(f.action)?z.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||P,onClick:He=>{var rt,Wt;yv(f.action)&&(He.defaultPrevented||((Wt=(rt=f.action).onClick)==null||Wt.call(rt,He),Xe()))},className:D(T==null?void 0:T.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function lD(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Rce=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:a,closeButton:i,className:o,offset:l,theme:c="light",richColors:u,duration:d,style:h,visibleToasts:f=Nce,toastOptions:m,dir:y=lD(),gap:p=kce,loadingIcon:x,icons:v,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:w,cn:S=Ace}=e,[j,N]=z.useState([]),C=z.useMemo(()=>Array.from(new Set([n].concat(j.filter(E=>E.position).map(E=>E.position)))),[j,n]),[_,A]=z.useState([]),[P,R]=z.useState(!1),[I,B]=z.useState(!1),[$,q]=z.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
641k":"light"),L=z.useRef(null),k=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=z.useRef(null),F=z.useRef(!1),O=z.useCallback(E=>{var D;(D=j.find(M=>M.id===E.id))!=null&&D.delete||la.dismiss(E.id),N(M=>M.filter(({id:X})=>X!==E.id))},[j]);return z.useEffect(()=>la.subscribe(E=>{if(E.dismiss){N(D=>D.map(M=>M.id===E.id?{...M,delete:!0}:M));return}setTimeout(()=>{Pi.flushSync(()=>{N(D=>{let M=D.findIndex(X=>X.id===E.id);return M!==-1?[...D.slice(0,M),{...D[M],...E},...D.slice(M+1)]:[E,...D]})})})}),[]),z.useEffect(()=>{if(c!=="system"){q(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:E})=>{q(E?"dark":"light")})},[c]),z.useEffect(()=>{j.length<=1&&R(!1)},[j]),z.useEffect(()=>{let E=D=>{var M,X;r.every(W=>D[W]||D.code===W)&&(R(!0),(M=L.current)==null||M.focus()),D.code==="Escape"&&(document.activeElement===L.current||(X=L.current)!=null&&X.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[r]),z.useEffect(()=>{if(L.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,F.current=!1)}},[L.current]),j.length?z.createElement("section",{"aria-label":`${b} ${k}`,tabIndex:-1},C.map((E,D)=>{var M;let[X,W]=E.split("-");return z.createElement("ol",{key:E,dir:y==="auto"?lD():y,tabIndex:-1,ref:L,className:o,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":X,"data-x-position":W,style:{"--front-toast-height":`${((M=_[0])==null?void 0:M.height)||0}px`,"--offset":typeof l=="number"?`${l}px`:l||_ce,"--width":`${Ece}px`,"--gap":`${p}px`,...h},onBlur:re=>{F.current&&!re.currentTarget.contains(re.relatedTarget)&&(F.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||F.current||(F.current=!0,T.current=re.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{I||R(!1)},onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},j.filter(re=>!re.position&&D===0||re.position===E).map((re,ne)=>{var le,ie;return z.createElement(Oce,{key:re.id,icons:v,index:ne,toast:re,defaultRichColors:u,duration:(le=m==null?void 0:m.duration)!=null?le:d,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:t,visibleToasts:f,closeButton:(ie=m==null?void 0:m.closeButton)!=null?ie:i,interacting:I,position:E,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:O,toasts:j.filter(ye=>ye.position==re.position),heights:_.filter(ye=>ye.position==re.position),setHeights:A,expandByDefault:a,gap:p,loadingIcon:x,expanded:P,pauseWhenPageIsHidden:w,cn:S})}))})):null};const Ice=({...e})=>{const{theme:t="system"}=cce();return s.jsx(Rce,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};function Mce(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Dce="DismissableLayer",xE="dismissableLayer.update",Lce="dismissableLayer.pointerDownOutside",$ce="dismissableLayer.focusOutside",cD,m9=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p9=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(m9),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=lt(t,C=>
vendor: 14,702 bytes, line 641
641h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=zce(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=Uce(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return Mce(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(cD=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),uD(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=cD)}},[d,f,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),uD())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(xE,C),()=>document.removeEventListener(xE,C)},[]),s.jsx(Te.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,j.onPointerDownCapture)})});p9.displayName=Dce;var Fce="DismissableLayerBranch",Bce=g.forwardRef((e,t)=>{const n=g.useContext(m9),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Te.div,{...e,ref:a})});Bce.displayName=Fce;function zce(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){g9(Lce,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Uce(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&g9($ce,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function uD(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function g9(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var qce=cS.useId||(()=>{}),Wce=0;function Vs(e){const[t,n]=g.useState(qce());return Vn(()=>{n(r=>r??String(Wce++))},[e]),t?`radix-${t}`:""}const Vce=["top","right","bottom","left"],Nc=Math.min,da=Math.max,w0=Math.round,xv=Math.floor,_c=e=>({x:e,y:e}),Hce={left:"right",right:"left",bottom:"top",top:"bottom"},Gce={start:"end",end:"start"};function vE(e,t,n){return da(e,Nc(t,n))}function sl(e,t){return typeof e=="function"?e(t):e}function al(e){return e.split("-")[0]}function um(e){return e.split("-")[1]}function FA(e){return e==="x"?"y":"x"}function BA(e){return e==="y"?"height":"width"}function Cc(e){return["top","bottom"].includes(al(e))?"y":"x"}function zA(e){return FA(Cc(e))}function Kce(e,t,n){n===void 0&&(n=!1);const r=um(e),a=zA(e),i=BA(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=S0(o)),[o,S0(o)]}function Yce(e){const t=S0(e);return[bE(e),t,bE(t)]}function bE(e){return e.replace(/start|end/g,t=>Gce[t])}function Xce(e,t,n){const r=["left","right"],a=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?i:o;default:return[]}}function Qce(e,t,n,r){const a=um(e);let i=Xce(al(e),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(bE)))),i}function S0(e){return e.replace(/left|right|bottom|top/g,t=>Hce[t])}function Zce(e){return{top:0,right:0,bottom:0,left:0,...e}}function y9(e){return typeof e!="number"?Zce(e):{top:e,right:e,bottom:e,left:e}}function j0(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function dD(e,t,n){let{reference:r,floating:a}=e;const i=Cc(t),o=zA(t),l=BA(o),c=al(t),u=i==="y",d=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,f=r[l]/2-a[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-a.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-a.width,y:h};break;default:m={x:r.x,y:r.y}}switch(um(t)){case"start":m[o]-=f*(n&&u?-1:1);break;case"end":m[o]+=f*(n&&u?-1:1);break}return m}const Jce=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=dD(u,r,c),f=r,m={},y=0;for(let p=0;p<l.length;p++){const{name:x,fn:v}=l[p],{x:b,y:w,data:S,reset:j}=await v({x:d,y:h,initialPlacement:r,placement:f,strategy:a,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=b??d,h=w??h,m={...m,[x]:{...m[x],...S}},j&&y<=50&&(y++,typeof j=="object"&&(j.placement&&(f=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):j.rects),{x:d,y:h}=dD(u,f,c)),p=-1)}return{x:d,y:h,placement:f,strategy:a,middlewareData:m}};async function Ag(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=sl(t,e),y=y9(m),x=l[f?h==="floating"?"reference":"floating":h],v=j0(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(l.floating)),boundary:u,rootBoundary:d,strategy:c})),b=h==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},j=j0(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(v.top-j.top+y.top)/S.y,bottom:(j.bottom-v.bottom+y.bottom)/S.y,left:(v.left-j.left+y.left)/S.x,right:(j.right-v.right+y.right)/S.x}}const eue=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=sl(e,t)||{};if(u==null)return{};const h=y9(d),f={x:n,y:r},m=zA(a),y=BA(m),p=await o.getDimensions(u),x=m==="y",v=x?"top":"left",b=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=i.reference[y]+i.reference[m]-f[m]-i.floating[y],j=f[m]-i.reference[m],N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=N?N[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(N)))&&(C=l.floating[w]||i.floating[y]);const _=S/2-j/2,A=C/2-p[y]/2-1,P=Nc(h[v],A),R=Nc(h[b],A),I=P,B=C-p[y]-R,$=C/2-p[y]/2+_,q=vE(I,$,B),L=!c.arrow&&um(a)!=null&&$!==q&&i.reference[y]/2-($<I?P:R)-p[y]/2<0,k=L?$<I?$-I:$-B:0;return{[m]:f[m]+k,data:{[m]:q,centerOffset:$-q-k,...L&&{alignmentOffset:k}},reset:L}}}),tue=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...x}=sl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=al(a),b=Cc(l),w=al(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=f||(w||!p?[S0(l)]:Yce(l)),N=y!=="none";!f&&N&&j.push(...Qce(l,p,y,S));const C=[l,...j],_=await Ag(t,x),A=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&A.push(_[v]),h){const $=Kce(a,o,S);A.push(_[$[0]],_[$[1]])}if(P=[...P,{placement:a,overflows:A}],!A.every($=>$<=0)){var R,I;const $=(((R=i.flip)==null?void 0:R.index)||0)+1,q=C[$];if(q)return{data:{index:$,overflows:P},reset:{placement:q}};let L=(I=P.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:I.placement;if(!L)switch(m){case"bestFit":{var B;const k=(B=P.filter(T=>{if(N){const F=Cc(T.placement);return F===b||F==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((T,F)=>T[1]-F[1])[0])==null?void 0:B[0];k&&(L=k);break}case"initialPlacement":L=l;break}if(a!==L)return{reset:{placement:L}}}return{}}}};function hD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fD(e){return Vce.some(t=>e[t]>=0)}const nue=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=sl(e,t);switch(r){case"referenceHidden":{const i=await Ag(t,{...a,elementContext:"reference"}),o=hD(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:fD(o)}}}case"escaped":{const i=await Ag(t,{...a,altBoundary:!0}),o=hD(i,n.floating);return{data:{escapedOffsets:o,escaped:fD(o)}}}default:return{}}}}};async function rue(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=al(n),l=um(n),c=Cc(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&c?-1:1,h=sl(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),c?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const sue=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await rue(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},aue=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:x=>{let{x:v,y:b}=x;return{x:v,y:b}}},...c}=sl(e,t),u={x:n,y:r},d=await Ag(t,c),h=Cc(al(a)),f=FA(h);let m=u[f],y=u[h];if(i){const x=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=m+d[x],w=m-d[v];m=vE(b,m,w)}if(o){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=y+d[x],w=y-d[v];y=vE(b,y,w)}const p=l.fn({...t,[f]:m,[h]:y});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:i,[h]:o}}}}}},iue=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=sl(e,t),d={x:n,y:r},h=Cc(a),f=FA(h);let m=d[f],y=d[h];const p=sl(l,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const w=f==="y"?"height":"width",S=i.reference[f]-i.floating[w]+x.mainAxis,j=i.reference[f]+i.reference[w]-x.mainAxis;m<S?m=S:m>j&&(m=j)}if(u){var v,b;const w=f==="y"?"width":"height",S=["top","left"].includes(al(a)),j=i.reference[h]-i.floating[w]+(S&&((v=o.offset)==null?void 0:v[h])||0)+(S?0:x.crossAxis),N=i.reference[h]+i.reference[w]+(S?0:((b=o.offset)==null?void 0:b[h])||0)-(S?x.crossAxis:0);y<j?y=j:y>N&&(y=N)}return{[f]:m,[h]:y}}}},oue=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=sl(e,t),d=await Ag(t,u),h=al(a),f=um(a),m=Cc(a)==="y",{width:y,height:p}=i.floating;let x,v;h==="top"||h==="bottom"?(x=h,v=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(v=h,x=f==="end"?"top":"bottom");const b=p-d.top-d.bottom,w=y-d.left-d.right,S=Nc(p-d[x],b),j=Nc(y-d[v],w),N=!t.middlewareData.shift;let C=S,_=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=b),N&&!f){const P=da(d.left,0),R=da(d.right,0),I=da(d.top,0),B=da(d.bottom,0);m?_=y-2*(P!==0||R!==0?P+R:da(d.left,d.right)):C=p-2*(I!==0||B!==0?I+B:da(d.top,d.bottom))}await c({...t,availableWidth:_,availableHeight:C});const A=await o.getDimensions(l.floating);return y!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function AS(){return typeof window<"u"}function dm(e){return x9(e)?(e.nodeName||"").toLowerCase():"#document"}function ba(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function No(e){var t;return(t=(x9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x9(e){return AS()?e instanceof Node||e instanceof ba(e).Node:!1}function Ii(e){return AS()?e instanceof Element||e instanceof ba(e).Element:!1}function bo(e){return AS()?e instanceof HTMLElement||e instanceof ba(e).HTMLElement:!1}function mD(e){return!AS()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ba(e).ShadowRoot}function tx(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Mi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function lue(e){return["table","td","th"].includes(dm(e))}function OS(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function UA(e){const t=qA(),n=Ii(e)?Mi(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function cue(e){let t=Ec(e);for(;bo(t)&&!yf(t);){if(UA(t))return t;if(OS(t))return null;t=Ec(t)}return null}function qA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yf(e){return["html","body","#document"].includes(dm(e))}function Mi(e){return ba(e).getComputedStyle(e)}function RS(e){return Ii(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ec(e){if(dm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mD(e)&&e.host||No(e);return mD(t)?t.host:t}function v9(e){const t=Ec(e);return yf(t)?e.ownerDocument?e.ownerDocument.body:e.body:bo(t)&&tx(t)?t:v9(t)}
vendor: 7,134 bytes, line 641
641function Og(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=v9(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),o=ba(a);if(i){const l=wE(o);return t.concat(o,o.visualViewport||[],tx(a)?a:[],l&&n?Og(l):[])}return t.concat(a,Og(a,[],n))}function wE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function b9(e){const t=Mi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=bo(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:r,l=w0(n)!==i||w0(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function WA(e){return Ii(e)?e:e.contextElement}function Lh(e){const t=WA(e);if(!bo(t))return _c(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=b9(t);let o=(i?w0(n.width):n.width)/r,l=(i?w0(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const uue=_c(0);function w9(e){const t=ba(e);return!qA()||!t.visualViewport?uue:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function due(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ba(e)?!1:t}function Zu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=WA(e);let o=_c(1);t&&(r?Ii(r)&&(o=Lh(r)):o=Lh(e));const l=due(i,n,r)?w9(i):_c(0);let c=(a.left+l.x)/o.x,u=(a.top+l.y)/o.y,d=a.width/o.x,h=a.height/o.y;if(i){const f=ba(i),m=r&&Ii(r)?ba(r):r;let y=f,p=wE(y);for(;p&&r&&m!==y;){const x=Lh(p),v=p.getBoundingClientRect(),b=Mi(p),w=v.left+(p.clientLeft+parseFloat(b.paddingLeft))*x.x,S=v.top+(p.clientTop+parseFloat(b.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,h*=x.y,c+=w,u+=S,y=ba(p),p=wE(y)}}return j0({width:d,height:h,x:c,y:u})}function hue(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",o=No(r),l=t?OS(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=_c(1);const d=_c(0),h=bo(r);if((h||!h&&!i)&&((dm(r)!=="body"||tx(o))&&(c=RS(r)),bo(r))){const f=Zu(r);u=Lh(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function fue(e){return Array.from(e.getClientRects())}function SE(e,t){const n=RS(e).scrollLeft;return t?t.left+n:Zu(No(e)).left+n}function mue(e){const t=No(e),n=RS(e),r=e.ownerDocument.body,a=da(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=da(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+SE(e);const l=-n.scrollTop;return Mi(r).direction==="rtl"&&(o+=da(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:l}}function pue(e,t){const n=ba(e),r=No(e),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const u=qA();(!u||u&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:l,y:c}}function gue(e,t){const n=Zu(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=bo(e)?Lh(e):_c(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function pD(e,t,n){let r;if(t==="viewport")r=pue(e,n);else if(t==="document")r=mue(No(e));else if(Ii(t))r=gue(t,n);else{const a=w9(e);r={...t,x:t.x-a.x,y:t.y-a.y}}return j0(r)}function S9(e,t){const n=Ec(e);return n===t||!Ii(n)||yf(n)?!1:Mi(n).position==="fixed"||S9(n,t)}function yue(e,t){const n=t.get(e);if(n)return n;let r=Og(e,[],!1).filter(l=>Ii(l)&&dm(l)!=="body"),a=null;const i=Mi(e).position==="fixed";let o=i?Ec(e):e;for(;Ii(o)&&!yf(o);){const l=Mi(o),c=UA(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||tx(o)&&!c&&S9(e,o))?r=r.filter(d=>d!==o):a=l,o=Ec(o)}return t.set(e,r),r}function xue(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?OS(t)?[]:yue(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=pD(t,d,a);return u.top=da(h.top,u.top),u.right=Nc(h.right,u.right),u.bottom=Nc(h.bottom,u.bottom),u.left=da(h.left,u.left),u},pD(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vue(e){const{width:t,height:n}=b9(e);return{width:t,height:n}}function bue(e,t,n){const r=bo(t),a=No(t),i=n==="fixed",o=Zu(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=_c(0);if(r||!r&&!i)if((dm(t)!=="body"||tx(a))&&(l=RS(t)),r){const m=Zu(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else a&&(c.x=SE(a));let u=0,d=0;if(a&&!r&&!i){const m=a.getBoundingClientRect();d=m.top+l.scrollTop,u=m.left+l.scrollLeft-SE(a,m)}const h=o.left+l.scrollLeft-c.x-u,f=o.top+l.scrollTop-c.y-d;return{x:h,y:f,width:o.width,height:o.height}}function iN(e){return Mi(e).position==="static"}function gD(e,t){if(!bo(e)||Mi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return No(e)===n&&(n=n.ownerDocument.body),n}function j9(e,t){const n=ba(e);if(OS(e))return n;if(!bo(e)){let a=Ec(e);for(;a&&!yf(a);){if(Ii(a)&&!iN(a))return a;a=Ec(a)}return n}let r=gD(e,t);for(;r&&lue(r)&&iN(r);)r=gD(r,t);return r&&yf(r)&&iN(r)&&!UA(r)?n:r||cue(e)||n}const wue=async function(e){const t=this.getOffsetParent||j9,n=this.getDimensions,r=await n(e.floating);return{reference:bue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sue(e){return Mi(e).direction==="rtl"}const jue={convertOffsetParentRelativeRectToViewportRelativeRect:hue,getDocumentElement:No,getClippingRect:xue,getOffsetParent:j9,getElementRects:wue,getClientRects:fue,getDimensions:vue,getScale:Lh,isElement:Ii,isRTL:Sue};function Nue(e,t){let n=null,r;const a=No(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:h,height:f}=e.getBoundingClientRect();if(l||t(),!h||!f)return;const m=xv(d),y=xv(a.clientWidth-(u+h)),p=xv(a.clientHeight-(d+f)),x=xv(u),b={rootMargin:-m+"px "+-y+"px "+-p+"px "+-x+"px",threshold:da(0,Nc(1,c))||1};let w=!0;function S(j){const N=j[0].intersectionRatio;if(N!==c){if(!w)return o();N?o(!1,N):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...b,root:a.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return o(!0),i}function _ue(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=WA(e),d=a||i?[...u?Og(u):[],...Og(t)]:[];d.forEach(v=>{a&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const h=u&&l?Nue(u,n):null;let f=-1,m=null;o&&(m=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let y,p=c?Zu(e):null;c&&x();function x(){const v=Zu(e);p&&(v.x!==p.x||v.y!==p.y||v.width!==p.width||v.height!==p.height)&&n(),p=v,y=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(b=>{a&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),h==null||h(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(y)}}const Cue=sue,Eue=aue,kue=tue,Pue=oue,Tue=nue,yD=eue,Aue=iue,Oue=(e,t,n
vendor: 8,321 bytes, line 641
641)=>{const r=new Map,a={platform:jue,...n},i={...a.platform,_c:r};return Jce(e,t,{...a,platform:i})};var Db=typeof document<"u"?g.useLayoutEffect:g.useEffect;function N0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!N0(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!N0(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function N9(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xD(e,t){const n=N9(e);return Math.round(t*n)/n}function oN(e){const t=g.useRef(e);return Db(()=>{t.current=e}),t}function Rue(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=g.useState(r);N0(f,r)||m(r);const[y,p]=g.useState(null),[x,v]=g.useState(null),b=g.useCallback(T=>{T!==N.current&&(N.current=T,p(T))},[]),w=g.useCallback(T=>{T!==C.current&&(C.current=T,v(T))},[]),S=i||y,j=o||x,N=g.useRef(null),C=g.useRef(null),_=g.useRef(d),A=c!=null,P=oN(c),R=oN(a),I=oN(u),B=g.useCallback(()=>{if(!N.current||!C.current)return;const T={placement:t,strategy:n,middleware:f};R.current&&(T.platform=R.current),Oue(N.current,C.current,T).then(F=>{const O={...F,isPositioned:I.current!==!1};$.current&&!N0(_.current,O)&&(_.current=O,Ga.flushSync(()=>{h(O)}))})},[f,t,n,R,I]);Db(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,h(T=>({...T,isPositioned:!1})))},[u]);const $=g.useRef(!1);Db(()=>($.current=!0,()=>{$.current=!1}),[]),Db(()=>{if(S&&(N.current=S),j&&(C.current=j),S&&j){if(P.current)return P.current(S,j,B);B()}},[S,j,B,P,A]);const q=g.useMemo(()=>({reference:N,floating:C,setReference:b,setFloating:w}),[b,w]),L=g.useMemo(()=>({reference:S,floating:j}),[S,j]),k=g.useMemo(()=>{const T={position:n,left:0,top:0};if(!L.floating)return T;const F=xD(L.floating,d.x),O=xD(L.floating,d.y);return l?{...T,transform:"translate("+F+"px, "+O+"px)",...N9(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,l,L.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:B,refs:q,elements:L,floatingStyles:k}),[d,B,q,L,k])}const Iue=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yD({element:r.current,padding:a}).fn(n):{}:r?yD({element:r,padding:a}).fn(n):{}}}},Mue=(e,t)=>({...Cue(e),options:[e,t]}),Due=(e,t)=>({...Eue(e),options:[e,t]}),Lue=(e,t)=>({...Aue(e),options:[e,t]}),$ue=(e,t)=>({...kue(e),options:[e,t]}),Fue=(e,t)=>({...Pue(e),options:[e,t]}),Bue=(e,t)=>({...Tue(e),options:[e,t]}),zue=(e,t)=>({...Iue(e),options:[e,t]});var Uue="Arrow",_9=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return s.jsx(Te.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});_9.displayName=Uue;var que=_9;function Wue(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];function u(h){const{scope:f,children:m,...y}=h,p=(f==null?void 0:f[e][c])||l,x=g.useMemo(()=>y,Object.values(y));return s.jsx(p.Provider,{value:x,children:m})}function d(h,f){const m=(f==null?void 0:f[e][c])||l,y=g.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,Vue(a,...t)]}function Vue(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function VA(e){const[t,n]=g.useState(void 0);return Vn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var HA="Popper",[C9,$c]=Wue(HA),[Hue,E9]=C9(HA),k9=e=>{const{__scopePopper:t,children:n}=e,[r,a]=g.useState(null);return s.jsx(Hue,{scope:t,anchor:r,onAnchorChange:a,children:n})};k9.displayName=HA;var P9="PopperAnchor",T9=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=E9(P9,n),o=g.useRef(null),l=lt(t,o);return g.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:s.jsx(Te.div,{...a,ref:l})});T9.displayName=P9;var GA="PopperContent",[Gue,Kue]=C9(GA),A9=g.forwardRef((e,t)=>{var ne,le,ie,ye,pe,G;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,x=E9(GA,n),[v,b]=g.useState(null),w=lt(t,Pe=>b(Pe)),[S,j]=g.useState(null),N=VA(S),C=(N==null?void 0:N.width)??0,_=(N==null?void 0:N.height)??0,A=r+(i!=="center"?"-"+i:""),P=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(u)?u:[u],I=R.length>0,B={padding:P,boundary:R.filter(Xue),altBoundary:I},{refs:$,floatingStyles:q,placement:L,isPositioned:k,middlewareData:T}=Rue({strategy:"fixed",placement:A,whileElementsMounted:(...Pe)=>_ue(...Pe,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Mue({mainAxis:a+_,alignmentAxis:o}),c&&Due({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Lue():void 0,...B}),c&&$ue({...B}),Fue({...B,apply:({elements:Pe,rects:J,availableWidth:oe,availableHeight:se})=>{const{width:je,height:Ce}=J.reference,ut=Pe.floating.style;ut.setProperty("--radix-popper-available-width",`${oe}px`),ut.setProperty("--radix-popper-available-height",`${se}px`),ut.setProperty("--radix-popper-anchor-width",`${je}px`),ut.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),S&&zue({element:S,padding:l}),Que({arrowWidth:C,arrowHeight:_}),f&&Bue({strategy:"referenceHidden",...B})]}),[F,O]=I9(L),E=Dt(y);Vn(()=>{k&&(E==null||E())},[k,E]);const D=(ne=T.arrow)==null?void 0:ne.x,M=(le=T.arrow)==null?void 0:le.y,X=((ie=T.arrow)==null?void 0:ie.centerOffset)!==0,[W,re]=g.useState();return Vn(()=>{v&&re(window.getComputedStyle(v).zIndex)},[v]),s.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:k?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(ye=T.transformOrigin)==null?void 0:ye.x,(pe=T.transformOrigin)==null?void 0:pe.y].join(" "),...((G=T.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Gue,{scope:n,placedSide:F,onArrowChange:j,arrowX:D,arrowY:M,shouldHideArrow:X,children:s.jsx(Te.div,{"data-side":F,"data-align":O,...p,ref:w,style:{...p.style,animation:k?void 0:"none"}})})})});A9.displayName=GA;var O9="PopperArrow",Yue={top:"bottom",right:"left",bottom:"top",left:"right"},R9=g.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=Kue(O9,r),o=Yue[i.placedSide];return s.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:s.jsx(que,{...a,ref:n,style:{...a.style,display:"block"}})})});
vendor: 4,134 bytes, line 641
641R9.displayName=O9;function Xue(e){return e!==null}var Que=e=>({name:"transformOrigin",options:e,fn(t){var x,v,b;const{placement:n,rects:r,middlewareData:a}=t,o=((x=a.arrow)==null?void 0:x.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=I9(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((v=a.arrow)==null?void 0:v.x)??0)+l/2,m=(((b=a.arrow)==null?void 0:b.y)??0)+c/2;let y="",p="";return u==="bottom"?(y=o?h:`${f}px`,p=`${-c}px`):u==="top"?(y=o?h:`${f}px`,p=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,p=o?h:`${m}px`):u==="left"&&(y=`${r.floating.width+c}px`,p=o?h:`${m}px`),{data:{x:y,y:p}}}});function I9(e){const[t,n="center"]=e.split("-");return[t,n]}var IS=k9,nx=T9,MS=A9,DS=R9,[LS,Gdt]=Qs("Tooltip",[$c]),$S=$c(),M9="TooltipProvider",Zue=700,jE="tooltip.open",[Jue,KA]=LS(M9),D9=e=>{const{__scopeTooltip:t,delayDuration:n=Zue,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,[o,l]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),s.jsx(Jue,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),l(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:a,children:i})};D9.displayName=M9;var FS="Tooltip",[ede,BS]=LS(FS),L9=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:l}=e,c=KA(FS,e.__scopeTooltip),u=$S(t),[d,h]=g.useState(null),f=Vs(),m=g.useRef(0),y=o??c.disableHoverableContent,p=l??c.delayDuration,x=g.useRef(!1),[v=!1,b]=Hs({prop:r,defaultProp:a,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(jE))):c.onClose(),i==null||i(C)}}),w=g.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),S=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,b(!0)},[b]),j=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),N=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,b(!0),m.current=0},p)},[p,b]);return g.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(IS,{...u,children:s.jsx(ede,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:d,onTriggerChange:h,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?N():S()},[c.isOpenDelayed,N,S]),onTriggerLeave:g.useCallback(()=>{y?j():(window.clearTimeout(m.current),m.current=0)},[j,y]),onOpen:S,onClose:j,disableHoverableContent:y,children:n})})};L9.displayName=FS;var NE="TooltipTrigger",$9=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=BS(NE,n),i=KA(NE,n),o=$S(n),l=g.useRef(null),c=lt(t,l,a.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),h=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),s.jsx(nx,{asChild:!0,...o,children:s.jsx(Te.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:c,onPointerMove:we(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:we(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:we(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:we(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:we(e.onBlur,a.onClose),onClick:we(e.onClick,a.onClose)})})});$9.displayName=NE;var tde="TooltipPortal",[Kdt,nde]=LS(tde,{forceMount:void 0}),xf="TooltipContent",F9=g.forwardRef((e,t)=>{const n=nde(xf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,o=BS(xf,e.__scopeTooltip);return s.jsx(As,{present:r||o.open,children:o.disableHoverableContent?s.jsx(B9,{side:a,...i,ref:t}):s.jsx(rde,{side:a,...i,ref:t})})}),rde=g.forwardRef((e,t)=>{const n=BS(xf,e.__scopeTooltip),r=KA(xf,e.__scopeTooltip),a=g.useRef(null),i=lt(t,a),[o,l]=g.useState(null),{trigger:c,onClose:u}=n,d=a.current,{onPointerInTransitChange:h}=r,f=g.useCallback(()=>
vendor: 4,195 bytes, line 641
641{l(null),h(!1)},[h]),m=g.useCallback((y,p)=>{const x=y.currentTarget,v={x:y.clientX,y:y.clientY},b=ode(v,x.getBoundingClientRect()),w=lde(v,b),S=cde(p.getBoundingClientRect()),j=dde([...w,...S]);l(j),h(!0)},[h]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(c&&d){const y=x=>m(x,d),p=x=>m(x,c);return c.addEventListener("pointerleave",y),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",p)}}},[c,d,m,f]),g.useEffect(()=>{if(o){const y=p=>{const x=p.target,v={x:p.clientX,y:p.clientY},b=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),w=!ude(v,o);b?f():w&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,d,o,u,f]),s.jsx(B9,{...e,ref:i})}),[sde,ade]=LS(FS,{isInside:!1}),B9=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=BS(xf,n),u=$S(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(jE,d),()=>document.removeEventListener(jE,d)),[d]),g.useEffect(()=>{if(c.trigger){const h=f=>{const m=f.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),s.jsx(p9,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:s.jsxs(MS,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(PA,{children:r}),s.jsx(sde,{scope:n,isInside:!0,children:s.jsx(Moe,{id:c.contentId,role:"tooltip",children:a||r})})]})})});F9.displayName=xf;var z9="TooltipArrow",ide=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=$S(n);return ade(z9,n).isInside?null:s.jsx(DS,{...a,...r,ref:t})});ide.displayName=z9;function ode(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lde(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cde(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function ude(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i].x,c=t[i].y,u=t[o].x,d=t[o].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}function dde(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hde(t)}function hde(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fde=D9,mde=L9,pde=$9,U9=F9;const YA=fde,q9=mde,W9=pde,XA=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(U9,{ref:r,sideOffset:t,className:ve("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]:sli
641de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));XA.displayName=U9.displayName;var rx=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ju=typeof window>"u"||"Deno"in globalThis;function Da(){}function gde(e,t){return typeof e=="function"?e(t):e}function _E(e){return typeof e=="number"&&e>=0&&e!==1/0}function V9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $h(e,t){return typeof e=="function"?e(t):e}function ji(e,t){return typeof e=="function"?e(t):e}function vD(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==QA(o,t.options))return!1}else if(!Ig(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function bD(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Rg(t.options.mutationKey)!==Rg(i))return!1}else if(!Ig(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function QA(e,t){return((t==null?void 0:t.queryKeyHashFn)||Rg)(e)}function Rg(e){return JSON.stringify(e,(t,n)=>EE(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Ig(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ig(e[n],t[n])):!1}function H9(e,t){if(e===t)return e;const n=wD(e)&&wD(t);if(n||EE(e)&&EE(t)){const r=n?e:Object.keys(e),a=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{};let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,c++):(l[d]=H9(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&c++)}return a===o&&c===a?e:l}return t}function CE(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function wD(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function EE(e){if(!SD(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!SD(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function SD(e){return Object.prototype.toString.call(e)==="[object Object]"}function yde(e){return new Promise(t=>{setTimeout(t,e)})}function kE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?H9(e,t):t}function xde(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vde(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ZA=Symbol();function G9(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ZA?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ku,Hl,Gh,Vz,bde=(Vz=class extends rx{constructor(){super();gt(this,ku);gt(this,Hl);gt(this,Gh);Ue(this,Gh,t=>{if(!Ju&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Q(this,Hl)||this.setEventListener(Q(this,Gh))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Hl))==null||t.call(this),Ue(this,Hl,void 0))}setEventListener(t){var n;Ue(this,Gh,t),(n=Q(this,Hl))==null||n.call(this),Ue(this,Hl,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Q(this,ku)!==t&&(Ue(this,ku,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Q(this,ku)=="boolean"?Q(this,ku):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ku=new WeakMap,Hl=new WeakMap,Gh=new WeakMap,Vz),JA=new bde,Kh,Gl,Yh,Hz,wde=(Hz=class extends rx{constructor(){super();gt(this,Kh,!0);gt(this,Gl);gt(this,Yh);Ue(this,Yh,t=>{if(!Ju&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Q(this,Gl)||this.setEventListener(Q(this,Yh))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Gl))==null||t.call(this),Ue(this,Gl,void 0))}setEventListener(t){var n;Ue(this,Yh,t),(n=Q(this,Gl))==null||n.call(this),Ue(this,Gl,t(this.setOnline.bind(this)))}setOnline(t){Q(this,Kh)!==t&&(Ue(this,Kh,t),this.listeners.forEac
vendor: 32,351 bytes, lines 641-650
641h(r=>{r(t)}))}isOnline(){return Q(this,Kh)}},Kh=new WeakMap,Gl=new WeakMap,Yh=new WeakMap,Hz),_0=new wde;function PE(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}function Sde(e){return Math.min(1e3*2**e,3e4)}function K9(e){return(e??"online")==="online"?_0.isOnline():!0}var Y9=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function lN(e){return e instanceof Y9}function X9(e){let t=!1,n=0,r=!1,a;const i=PE(),o=p=>{var x;r||(f(new Y9(p)),(x=e.abort)==null||x.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>JA.isFocused()&&(e.networkMode==="always"||_0.isOnline())&&e.canRun(),d=()=>K9(e.networkMode)&&e.canRun(),h=p=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,p),a==null||a(),i.resolve(p))},f=p=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,p),a==null||a(),i.reject(p))},m=()=>new Promise(p=>{var x;a=v=>{(r||u())&&p(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var p;a=void 0,r||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(r)return;let p;const x=n===0?e.initialPromise:void 0;try{p=x??e.fn()}catch(v){p=Promise.reject(v)}Promise.resolve(p).then(h).catch(v=>{var N;if(r)return;const b=e.retry??(Ju?0:3),w=e.retryDelay??Sde,S=typeof w=="function"?w(n,v):w,j=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!j){f(v);return}n++,(N=e.onFail)==null||N.call(e,n,v),yde(S).then(()=>u()?void 0:m()).then(()=>{t?f(v):y()})})};return{promise:i,cancel:o,continue:()=>(a==null||a(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?y():m().then(y),i)}}function jde(){let e=[],t=0,n=l=>{l()},r=l=>{l()},a=l=>setTimeout(l,0);const i=l=>{t?e.push(l):a(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{a=l}}}var Lr=jde(),Pu,Gz,Q9=(Gz=class{constructor(){gt(this,Pu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_E(this.gcTime)&&Ue(this,Pu,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ju?1/0:5*60*1e3))}clearGcTimeout(){Q(this,Pu)&&(clearTimeout(Q(this,Pu)),Ue(this,Pu,void 0))}},Pu=new WeakMap,Gz),Xh,Qh,Ma,Qr,zy,Tu,yi,Ro,Kz,Nde=(Kz=class extends Q9{constructor(t){super();gt(this,yi);gt(this,Xh);gt(this,Qh);gt(this,Ma);gt(this,Qr);gt(this,zy);gt(this,Tu);Ue(this,Tu,!1),Ue(this,zy,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ue(this,Ma,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ue(this,Xh,_de(this.options)),this.state=t.state??Q(this,Xh),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Qr))==null?void 0:t.promise}setOptions(t){this.options={...Q(this,zy),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,Ma).remove(this)}setData(t,n){const r=kE(this.state.data,t,this.options);return Ht(this,yi,Ro).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ht(this,yi,Ro).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=Q(this,Qr))==null?void 0:r.promise;return(a=Q(this,Qr))==null||a.cancel(t),n?n.then(Da).catch(Da):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,Xh))}isActive(){return this.observers.some(t=>ji(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ZA||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!V9(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Qr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Qr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,Ma).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Q(this,Qr)&&(Q(this,Tu)?Q(this,Qr).cancel({revert:!0}):Q(this,Qr).cancelRetry()),this.scheduleGc()),Q(this,Ma).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ht(this,yi,Ro).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Qr))return Q(this,Qr).continueRetry(),Q(this,Qr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(Ue(this,Tu,!0),r.signal)})},i=()=>{const h=G9(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return a(f),Ue(this,Tu,!1),this.options.persister?this.options.persister(h,f,this):h(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};a(o),(c=this.options.behavior)==null||c.onFetch(o,this),Ue(this,Qh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&Ht(this,yi,Ro).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const l=h=>{var f,m,y,p;lN(h)&&h.silent||Ht(this,yi,Ro).call(this,{type:"error",error:h}),lN(h)||((m=(f=Q(this,Ma).config).onError)==null||m.call(f,h,this),(p=(y=Q(this,Ma).config).onSettled)==null||p.call(y,this.state.data,h,this)),this.scheduleGc()};return Ue(this,Qr,X9({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,m,y,p;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(x){l(x);return}(m=(f=Q(this,Ma).config).onSuccess)==null||m.call(f,h,this),(p=(y=Q(this,Ma).config).onSettled)==null||p.call(y,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,f)=>{Ht(this,yi,Ro).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{Ht(this,yi,Ro).call(this,{type:"pause"})},onContinue:()=>{Ht(this,yi,Ro).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),Q(this,Qr).start()}},Xh=new WeakMap,Qh=new WeakMap,Ma=new WeakMap,Qr=new WeakMap,zy=new WeakMap,Tu=new WeakMap,yi=new WeakSet,Ro=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Z9(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return lN(a)&&a.revert&&Q(this,Qh)?{...Q(this,Qh),fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Lr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Q(this,Ma).notify({query:this,type:"updated",action:t})})},Kz);function Z9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:K9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _de(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Xi,Yz,Cde=(Yz=class extends rx{constructor(t={}){super();gt(this,Xi);this.config=t,Ue(this,Xi,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??QA(a,n);let o=this.get(i);return o||(o=new Nde({cache:this,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){Q(this,Xi).has(t.queryHash)||(Q(this,Xi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Q(this,Xi).get(t.queryHash);n&&(t.destroy(),n===t&&Q(this,Xi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Lr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,Xi).get(t)}getAll(){return[...Q(this,Xi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>vD(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>vD(t,r)):n}notify(t){Lr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Lr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Lr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Xi=new WeakMap,Yz),Qi,fs,Au,Zi,Pl,Xz,Ede=(Xz=class extends Q9{constructor(t){super();gt(this,Zi);gt(this,Qi);gt(this,fs);gt(this,Au);this.mutationId=t.mutationId,Ue(this,fs,t.mutationCache),Ue(this,Qi,[]),this.state=t.state||kde(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,Qi).includes(t)||(Q(this,Qi).push(t),this.clearGcTimeout(),Q(this,fs).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ue(this,Qi,Q(this,Qi).filter(n=>n!==t)),this.scheduleGc(),Q(this,fs).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,Qi).length||(this.state.status==="pending"?this.scheduleGc():Q(this,fs).remove(this))}continue(){var t;return((t=Q(this,Au))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,i,o,l,c,u,d,h,f,m,y,p,x,v,b,w,S,j,N,C;Ue(this,Au,X9({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,A)=>{Ht(this,Zi,Pl).call(this,{type:"failed",failureCount:_,error:A})},onPause:()=>{Ht(this,Zi,Pl).call(this,{type:"pause"})},onContinue:()=>{Ht(this,Zi,Pl).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,fs).canRun(this)}));const n=this.state.status==="pending",r=!Q(this,Au).canStart();try{if(!n){Ht(this,Zi,Pl).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(a=Q(this,fs).config).onMutate)==null?void 0:i.call(a,t,this));const A=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));A!==this.state.context&&Ht(this,Zi,Pl).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const _=await Q(this,Au).start();return await((u=(c=Q(this,fs).config).onSuccess)==null?void 0:u.call(c,_,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,_,t,this.state.context)),await((m=(f=Q(this,fs).config).onSettled)==null?void 0:m.call(f,_,null,this.state.variables,this.state.context,this)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,_,null,t,this.state.context)),Ht(this,Zi,Pl).call(this,{type:"success",data:_}),_}catch(_){try{throw await((v=(x=Q(this,fs).config).onError)==null?void 0:v.call(x,_,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,_,t,this.state.context)),await((j=(S=Q(this,fs).config).onSettled)==null?void 0:j.call(S,void 0,_,this.state.variables,this.state.context,this)),await((C=(N=this.options).onSettled)==null?void 0:C.call(N,void 0,_,t,this.state.context)),_}finally{Ht(this,Zi,Pl).call(this,{type:"error",error:_})}}finally{Q(this,fs).runNext(this)}}},Qi=new WeakMap,fs=new WeakMap,Au=new WeakMap,Zi=new WeakSet,Pl=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Lr.batch(()=>{Q(this,Qi).forEach(r=>{r.onMutationUpdate(t)}),Q(this,fs).notify({mutation:this,type:"updated",action:t})})},Xz);function kde(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oa,Uy,Qz,Pde=(Qz=class extends rx{constructor(t={}){super();gt(this,oa);gt(this,Uy);this.config=t,Ue(this,oa,new Map),Ue(this,Uy,Date.now())}build(t,n,r){const a=new Ede({mutationCache:this,mutationId:++Qx(this,Uy)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){const n=vv(t),r=Q(this,oa).get(n)??[];r.push(t),Q(this,oa).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=vv(t);if(Q(this,oa).has(n)){const a=(r=Q(this,oa).get(n))==null?void 0:r.filter(i=>i!==t);a&&(a.length===0?Q(this,oa).delete(n):Q(this,oa).set(n,a))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=Q(this,oa).get(vv(t)))==null?void 0:r.find(a=>a.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=Q(this,oa).get(vv(t)))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Lr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...Q(this,oa).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>bD(n,r))}findAll(t={}){return this.getAll().filter(n=>bD(t,n))}notify(t){Lr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Lr.batch(()=>Promise.all(t.map(n=>n.continue().catch(Da))))}},oa=new WeakMap,Uy=new WeakMap,Qz);function vv(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function jD(e){return{onFetch:(t,n)=>{var d,h,f,m,y;const r=t.options,a=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let p=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},v=G9(t.options,t.fetchOptions),b=async(w,S,j)=>{if(p)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const N={queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};x(N);const C=await v(N),{maxPages:_}=t.options,A=j?vde:xde;return{pages:A(w.pages,C,_),pageParams:A(w.pageParams,S,_)}};if(a&&i.length){const w=a==="backward",S=w?Tde:ND,j={pages:i,pageParams:o},N=S(r,j);l=await b(j,N,w)}else{const w=e??i.length;do{const S=c===0?o[0]??r.initialPageParam:ND(r,l);if(c>0&&S==null)break;l=await b(l,S),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var p,x;return(x=(p=t.options).persister)==null?void 0:x.call(p,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ND(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Tde(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Hn,Kl,Yl,Zh,Jh,Xl,ef,tf,Zz,Ade=(Zz=class{constructor(e={}){gt(this,Hn);gt(this,Kl);gt(this,Yl);gt(this,Zh);gt(this,Jh);gt(this,Xl);gt(this,ef);gt(this,tf);Ue(this,Hn,e.queryCache||new Cde),Ue(this,Kl,e.mutationCache||new Pde),Ue(this,Yl,e.defaultOptions||{}),Ue(this,Zh,new Map),Ue(this,Jh,new Map),Ue(this,Xl,0)}mount(){Qx(this,Xl)._++,Q(this,Xl)===1&&(Ue(this,ef,JA.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,Hn).onFocus())})),Ue(this,tf,_0.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,Hn).onOnline())})))}unmount(){var e,t;Qx(this,Xl)._--,Q(this,Xl)===0&&((e=Q(this,ef))==null||e.call(this),Ue(this,ef,void 0),(t=Q(this,tf))==null||t.call(this),Ue(this,tf,void 0))}isFetching(e){return Q(this,Hn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,Kl).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,Hn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=Q(this,Hn).build(this,n);return e.revalidateIfStale&&r.isStaleByTime($h(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return Q(this,Hn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=Q(this,Hn).get(r.queryHash),i=a==null?void 0:a.state.data,o=gde(t,i);if(o!==void 0)return Q(this,Hn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Lr.batch(()=>Q(this,Hn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,Hn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Q(this,Hn);Lr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Q(this,Hn),r={type:"active",...e};return Lr.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Lr.batch(()=>Q(this,Hn).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Da).catch(Da)}invalidateQueries(e={},t={}){return Lr.batch(()=>{if(Q(this,Hn).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Lr.batch(()=>Q(this,Hn).findAll(e).filter(a=>!a.isDisabled()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Da)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Da)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Q(this,Hn).build(this,t);return n.isStaleByTime($h(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Da).catch(Da)}fetchInfiniteQuery(e){return e.behavior=jD(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Da).catch(Da)}ensureInfiniteQueryData(e){return e.behavior=jD(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _0.isOnline()?Q(this,Kl).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,Hn)}getMutationCache(){return Q(this,Kl)}getDefaultOptions(){return Q(this,Yl)}setDefaultOptions(e){Ue(this,Yl,e)}setQueryDefaults(e,t){Q(this,Zh).set(Rg(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,Zh).values()];let n={};return t.forEach(r=>{Ig(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){Q(this,Jh).set(Rg(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,Jh).values()];let n={};return t.forEach(r=>{Ig(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,Yl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=QA(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===ZA&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,Yl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,Hn).clear(),Q(this,Kl).clear()}},Hn=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,Zh=new WeakMap,Jh=new WeakMap,Xl=new WeakMap,ef=new WeakMap,tf=new WeakMap,Zz),Is,Gt,qy,ms,Ou,nf,Ql,Ji,Wy,rf,sf,Ru,Iu,Zl,af,ln,Cp,TE,AE,OE,RE,IE,ME,DE,J9,Jz,Ode=(Jz=class extends rx{constructor(t,n){super();gt(this,ln);gt(this,Is);gt(this,Gt);gt(this,qy);gt(this,ms);gt(this,Ou);gt(this,nf);gt(this,Ql);gt(this,Ji);gt(this,Wy);gt(this,rf);gt(this,sf);gt(this,Ru);gt(this,Iu);gt(this,Zl);gt(this,af,new Set);this.options=n,Ue(this,Is,t),Ue(this,Ji,null),Ue(this,Ql,PE()),this.options.experimental_prefetchInRender||Q(this,Ql).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,Gt).addObserver(this),_D(Q(this,Gt),this.options)?Ht(this,ln,Cp).call(this):this.updateResult(),Ht(this,ln,RE).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return LE(Q(this,Gt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return LE(Q(this,Gt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ht(this,ln,IE).call(this),Ht(this,ln,ME).call(this),Q(this,Gt).removeObserver(this)}setOptions(t,n){const r=this.options,a=Q(this,Gt);if(this.options=Q(this,Is).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ji(this.options.enabled,Q(this,Gt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ht(this,ln,DE).call(this),Q(this,Gt).setOptions(this.options),r._defaulted&&!CE(this.options,r)&&Q(this,Is).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,Gt),observer:this});const i=this.hasListeners();i&&CD(Q(this,Gt),a,this.options,r)&&Ht(this,ln,Cp).call(this),this.updateResult(n),i&&(Q(this,Gt)!==a||ji(this.options.enabled,Q(this,Gt))!==ji(r.enabled,Q(this,Gt))||$h(this.options.staleTime,Q(this,Gt))!==$h(r.staleTime,Q(this,Gt)))&&Ht(this,ln,TE).call(this);const o=Ht(this,ln,AE).call(this);i&&(Q(this,Gt)!==a||ji(this.options.enabled,Q(this,Gt))!==ji(r.enabled,Q(this,Gt))||o!==Q(this,Zl))&&Ht(this,ln,OE).call(this,o)}getOptimisticResult(t){const n=Q(this,Is).getQueryCache().build(Q(this,Is),t),r=this.createResult(n,t);return Ide(this,r)&&(Ue(this,ms,r),Ue(this,nf,this.options),Ue(this,Ou,Q(this,Gt).state)),r}getCurrentResult(){return Q(this,ms)}trackResult(t,n){const r={};return Object.keys(t).forEach(a=>{Object.defineProperty(r,a,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(a),n==null||n(a),t[a])})}),r}trackProp(t){Q(this,af).add(t)}getCurrentQuery(){return Q(this,Gt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Q(this,Is).defaultQueryOptions(t),r=Q(this,Is).getQueryCache().build(Q(this,Is),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ht(this,ln,Cp).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,ms)))}createResult(t,n){var _;const r=Q(this,Gt),a=this.options,i=Q(this,ms),o=Q(this,Ou),l=Q(this,nf),u=t!==r?t.state:Q(this,qy),{state:d}=t;let h={...d},f=!1,m;if(n._optimisticResults){const A=this.hasListeners(),P=!A&&_D(t,n),R=A&&CD(t,r,n,a);(P||R)&&(h={...h,...Z9(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:x}=h;if(n.select&&h.data!==void 0)if(i&&h.data===(o==null?void 0:o.data)&&n.select===Q(this,Wy))m=Q(this,rf);else try{Ue(this,Wy,n.select),m=n.select(h.data),m=kE(i==null?void 0:i.data,m,n),Ue(this,rf,m),Ue(this,Ji,null)}catch(A){Ue(this,Ji,A)}else m=h.data;if(n.placeholderData!==void 0&&m===void 0&&x==="pending"){let A;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))A=i.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((_=Q(this,sf))==null?void 0:_.state.data,Q(this,sf)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),Ue(this,Ji,null)}catch(P){Ue(this,Ji,P)}A!==void 0&&(x="success",m=kE(i==null?void 0:i.data,A,n),f=!0)}Q(this,Ji)&&(y=Q(this,Ji),m=Q(this,rf),p=Date.now(),x="error");const v=h.fetchStatus==="fetching",b=x==="pending",w=x==="error",S=b&&v,j=m!==void 0,C={status:x,fetchStatus:h.fetchStatus,isPending:b,isSuccess:x==="success",isError:w,isInitialLoading:S,isLoading:S,data:m,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:w&&!j,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&j,isStale:eO(t,n),refetch:this.refetch,promise:Q(this,Ql)};if(this.options.experimental_prefetchInRender){const A=I=>{C.status==="error"?I.reject(C.error):C.data!==void 0&&I.resolve(C.data)},P=()=>{const I=Ue(this,Ql,C.promise=PE());A(I)},R=Q(this,Ql);switch(R.status){case"pending":t.queryHash===r.queryHash&&A(R);break;case"fulfilled":(C.status==="error"||C.data!==R.value)&&P();break;case"rejected":(C.status!=="error"||C.error!==R.reason)&&P();break}}return C}updateResult(t){const n=Q(this,ms),r=this.createResult(Q(this,Gt),this.options);if(Ue(this,Ou,Q(this,Gt).state),Ue(this,nf,this.options),Q(this,Ou).data!==void 0&&Ue(this,sf,Q(this,Gt)),CE(r,n))return;Ue(this,ms,r);const a={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!Q(this,af).size)return!0;const c=new Set(l??Q(this,af));return this.options.throwOnError&&c.add("error"),Object.keys(Q(this,ms)).some(u=>{const d=u;return Q(this,ms)[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(a.listeners=!0),Ht(this,ln,J9).call(this,{...a,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ht(this,ln,RE).call(this)}},Is=new WeakMap,Gt=new WeakMap,qy=new WeakMap,ms=new WeakMap,Ou=new WeakMap,nf=new WeakMap,Ql=new WeakMap,Ji=new WeakMap,Wy=new WeakMap,rf=new WeakMap,sf=new WeakMap,Ru=new WeakMap,Iu=new WeakMap,Zl=new WeakMap,af=new WeakMap,ln=new WeakSet,Cp=function(t){Ht(this,ln,DE).call(this);let n=Q(this,Gt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Da)),n},TE=function(){Ht(this,ln,IE).call(this);const t=$h(this.options.staleTime,Q(this,Gt));if(Ju||Q(this,ms).isStale||!_E(t))return;const r=V9(Q(this,ms).dataUpdatedAt,t)+1;Ue(this,Ru,setTimeout(()=>{Q(this,ms).isStale||this.updateResult()},r))},AE=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,Gt)):this.options.refetchInterval)??!1},OE=function(t){Ht(this,ln,ME).call(this),Ue(this,Zl,t),!(Ju||ji(this.options.enabled,Q(this,Gt))===!1||!_E(Q(this,Zl))||Q(this,Zl)===0)&&Ue(this,Iu,setInterval(()=>{(this.options.refetchIntervalInBackground||JA.isFocused())&&Ht(this,ln,Cp).call(this)},Q(this,Zl)))},RE=function(){Ht(this,ln,TE).call(this),Ht(this,ln,OE).call(this,Ht(this,ln,AE).call(this))},IE=function(){Q(this,Ru)&&(clearTimeout(Q(this,Ru)),Ue(this,Ru,void 0))},ME=function(){Q(this,Iu)&&(clearInterval(Q(this,Iu)),Ue(this,Iu,void 0))},DE=function(){const t=Q(this,Is).getQueryCache().build(Q(this,Is),this.options);if(t===Q(this,Gt))return;const n=Q(this,Gt);Ue(this,Gt,t),Ue(this,qy,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},J9=function(t){Lr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Q(this,ms))}),Q(this,Is).getQueryCache().notify({query:Q(this,Gt),type:"observerResultsUpdated"})})},Jz);function Rde(e,t){return ji(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function _D(e,t){return Rde(e,t)||e.state.data!==void 0&&LE(e,t,t.refetchOnMount)}function LE(e,t,n){if(ji(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&eO(e,t)}return!1}function CD(e,t,n,r){return(e!==t||ji(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&eO(e,n)}function eO(e,t){return ji(t.enabled,e)!==!1&&e.isStaleByTime($h(t.staleTime,e))}function Ide(e,t){return!CE(e.getCurrentResult(),t)}var eW=g.createContext(void 0),pr=e=>{const t=g.useContext(eW);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mde=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(eW.Provider,{value:e,children:t})),tW=g.createContext(!1),Dde=()=>g.useContext(tW);tW.Provider;function Lde(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $de=g.createContext(Lde()),Fde=()=>g.useContext($de);function Bde(e,t){return typeof e=="function"?e(...t):!!e}function zde(){}var Ude=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},qde=e=>{g.useEffect(()=>{e.clearReset()},[e])},Wde=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Bde(n,[e.error,r]),Vde=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Hde=(e,t)=>e.isLoading&&e.isFetching&&!t,Gde=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ED=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Kde(e,t,n){var d,h,f,m,y;const r=pr(),a=Dde(),i=Fde(),o=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=a?"isRestoring":"optimistic",Vde(o),Ude(o,i),qde(i);const l=!r.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(r,o)),u=c.getOptimisticResult(o);if(g.useSyncExternalStore(g.useCallback(p=>{const x=a?()=>{}:c.subscribe(Lr.batchCalls(p));return c.updateResult(),x},[c,a]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),Gde(o,u))throw ED(o,c,i);if(Wde({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((m=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||m.call(f,o,u),o.experimental_prefetchInRender&&!Ju&&Hde(u,a)){const p=l?ED(o,c,i):(y=r.getQueryCache().get(o.queryHash))==null?void 0:y.promise;p==null||p.catch(zde).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function ct(e,t){return Kde(e,Ode)}/**
642 * @remix-run/router v1.20.0
643 *
644 * Copyright (c) Remix Software Inc.
645 *
646 * This source code is licensed under the MIT license found in the
647 * LICENSE.md file in the root directory of this source tree.
648 *
649 * @license MIT
650 */function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mg.apply(this,arguments)}var tc;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(tc||(tc={}));const kD="popstate";function Yde(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:o,hash:l}=r.location;return $E("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}
vendor: 4,655 bytes, line 650
650function n(r,a){return typeof a=="string"?a:C0(a)}return Qde(t,n,null,e)}function sr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nW(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Xde(){return Math.random().toString(36).substr(2,8)}function PD(e,t){return{usr:e.state,key:e.key,idx:t}}function $E(e,t,n,r){return n===void 0&&(n=null),Mg({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hm(t):t,{state:n,key:t&&t.key||r||Xde()})}function C0(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function hm(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Qde(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,l=tc.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Mg({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=tc.Pop;let x=d(),v=x==null?null:x-u;u=x,c&&c({action:l,location:p.location,delta:v})}function f(x,v){l=tc.Push;let b=$E(p.location,x,v);u=d()+1;let w=PD(b,u),S=p.createHref(b);try{o.pushState(w,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;a.location.assign(S)}i&&c&&c({action:l,location:p.location,delta:1})}function m(x,v){l=tc.Replace;let b=$E(p.location,x,v);u=d();let w=PD(b,u),S=p.createHref(b);o.replaceState(w,"",S),i&&c&&c({action:l,location:p.location,delta:0})}function y(x){let v=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof x=="string"?x:C0(x);return b=b.replace(/ $/,"%20"),sr(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let p={get action(){return l},get location(){return e(a,o)},listen(x){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(kD,h),c=x,()=>{a.removeEventListener(kD,h),c=null}},createHref(x){return t(a,x)},createURL:y,encodeLocation(x){let v=y(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:m,go(x){return o.go(x)}};return p}var TD;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(TD||(TD={}));function Zde(e,t,n){return n===void 0&&(n="/"),Jde(e,t,n,!1)}function Jde(e,t,n,r){let a=typeof t=="string"?hm(t):t,i=tO(a.pathname||"/",n);if(i==null)return null;let o=rW(e);ehe(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=dhe(i);l=che(o[c],u,r)}return l}function rW(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(sr(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=pc([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(sr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),rW(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:ohe(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let c of sW(i.path))a(i,o,c)}),t}function sW(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=sW(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function ehe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:lhe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const the=/^:[\w-]+$/,nhe=3,rhe=2,she=1,ahe=10,ihe=-2,AD=e=>e==="*";function ohe(e,t){let n=e.split("/"),r=n.length;return n.some(AD)&&(r+=ihe),t&&(r+=rhe),n.filter(a=>!AD(a)).reduce((a,i)=>a+(the.test(i)?nhe:i===""?she:ahe),r)}function lhe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function che(e,t,n){let{routesMeta:r}=e,a={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=OD({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=OD({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,301 bytes, lines 650-659
650Object.assign(a,h.params),o.push({params:a,pathname:pc([i,h.pathname]),pathnameBase:phe(pc([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=pc([i,h.pathnameBase]))}return o}function OD(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=uhe(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let p=l[h]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const y=l[h];return m&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function uhe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),nW(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function dhe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return nW(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tO(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function hhe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?hm(e):e;return{pathname:n?n.startsWith("/")?n:fhe(n,t):t,search:ghe(r),hash:yhe(a)}}function fhe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function cN(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function mhe(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nO(e,t){let n=mhe(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rO(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=hm(e):(a=Mg({},e),sr(!a.pathname||!a.pathname.includes("?"),cN("?","pathname","search",a)),sr(!a.pathname||!a.pathname.includes("#"),cN("#","pathname","hash",a)),sr(!a.search||!a.search.includes("#"),cN("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;a.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=hhe(a,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const pc=e=>e.join("/").replace(/\/\/+/g,"/"),phe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ghe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yhe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function xhe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const aW=["post","put","patch","delete"];new Set(aW);const vhe=["get",...aW];new Set(vhe);/**
651 * React Router v6.27.0
652 *
653 * Copyright (c) Remix Software Inc.
654 *
655 * This source code is licensed under the MIT license found in the
656 * LICENSE.md file in the root directory of this source tree.
657 *
658 * @license MIT
659 */function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(this,arguments)}const sO=g.createContext(null),bhe=g.createContext(null),Fc=g.createContext(null),zS=g.createContext(null),fl=g.createContext({outlet:null,matches:[],isDataRoute:!1}),iW=g.createContext(null);function whe(e,t){let{relative:n}=t===void 0?{}:t;fm()||sr(!1);let{basename:r,navigator:a}=g.useContext(Fc),{hash:i,pathname:o,search:l}=lW(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:pc([r,o])),a.createHref({pathname:c,search:l,hash:i})}function fm(){return g.useContext(zS)!=null}function ml(){return fm()||sr(!1),g.useContext(zS).location}function oW(e){g.useContext(Fc).static||g.useLayoutEffect(e)}function cs(){let{isDataRoute:e}=g.useContext(fl);return e?Ihe():She()}function She(){fm()||sr(!1);let e=g.useContext(sO),{basename:t,future:n,navigator:r}=g.useContext(Fc),{matches:a}=g.useContext(fl),{pathname:i}=ml(),o=JSON.stringify(nO(a,n.v7_relativeSplatPath)),l=g.useRef(!1);return oW(()=>{l.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=rO(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:pc([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function US(){let{matches:e}=g.useContext(fl),t=e[e.length-1];return t?t.params:{}}function lW(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Fc),{matches:a}=g.useContext(fl),{pathname:i}=ml(),o=JSON.stringify(nO(a,r.v7_relativeSplatPath));return g.useMemo(()=>rO(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function jhe(e,t){return Nhe(e,t)}function Nhe(e,t,n,r){fm()||sr(!1);let{navigator:a}=g.useContext(Fc),{matches:i}=g.useContext(fl),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=ml(),d;if(t){var h;let x=typeof t=="string"?hm(t):t;c==="/"||(h=x.pathname)!=null&&h.startsWith(c)||sr(!1),d=x}else d=u;let f=d.pathname||"/",m=f;if(c!=="/"){let x=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let y=Zde(e,{pathname:m}),p=Phe(y&&y.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:pc([c,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:pc([c,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&p?g.createElement(zS.Provider,{value:{location:Dg({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:tc.Pop}},p):p}function _he(){let e=Rhe(),t=xhe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:a},n):null,null)}const Che=g.createElement(_he,null);class Ehe extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(fl.Provider,{value:this.props.routeContext},g.createElement(iW.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function khe(e){let{routeContext:t,match:n,children:r}=e,a=g.useContext(sO);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(fl.Provider,{value:t},r)}function Phe(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(a=n)==null?void 0:a.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||sr(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:m}=n,y=h.route.loader&&f[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||y){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let m,y=!1,p=null,x=null;n&&(m=l&&h.route.id?l[h.route.id]:void 0,p=h.route.errorElement||Che,c&&(u<0&&f===0?(y=!0,x=null):u===f&&(y=!0,x=h.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,f+1)),b=()=>{let w;return m?w=p:y?w=x:h.route.Component?w=g.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,g.createElement(khe,{match:h,routeC
659ontext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?g.createElement(Ehe,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var cW=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(cW||{}),E0=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(E0||{});function The(e){let t=g.useContext(sO);return t||sr(!1),t}function Ahe(e){let t=g.useContext(bhe);return t||sr(!1),t}function Ohe(e){let t=g.useContext(fl);return t||sr(!1),t}function uW(e){let t=Ohe(),n=t.matches[t.matches.length-1];return n.route.id||sr(!1),n.route.id}function Rhe(){var e;let t=g.useContext(iW),n=Ahe(E0.UseRouteError),r=uW(E0.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ihe(){let{router:e}=The(cW.UseNavigateStable),t=uW(E0.UseNavigateStable),n=g.useRef(!1);return oW(()=>{n.current=!0}),g.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Dg({fromRouteId:t},i)))},[e,t])}function Mhe(e){let{to:t,replace:n,state:r,relative:a}=e;fm()||sr(!1);let{future:i,static:o}=g.useContext(Fc),{matches:l}=g.useContext(fl),{pathname:c}=ml(),u=cs(),d=rO(t,nO(l,i.v7_relativeSplatPath),c,a==="path"),h=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:a}),[u,h,a,n,r]),null}function Le(e){sr(!1)}function Dhe(e){let{basename:t="/",children:n=null,location:r,navigationType:a=tc.Pop,navigator:i,static:o=!1,future:l}=e;fm()&&sr(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:i,static:o,future:Dg({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=hm(r));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:y="default"}=r,p=g.useMemo(()=>{let x=tO(d,c);return x==null?null:{location:{pathname:x,search:h,hash:f,state:m,key:y},navigationType:a}},[c,d,h,f,m,y,a]);return p==null?null:g.createElement(Fc.Provider,{value:u},g.createElement(zS.Provider,{children:n,value:p}))}function Lhe(e){let{children:t,location:n}=e;return jhe(FE(t),n)}new Promise(()=>{});function FE(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,a)=>{if(!g.isValidElement(r))return;let i=[...t,a];if(r.type===g.Fragment){n.push.apply(n,FE(r.props.children,i));return}r.type!==Le&&sr(!1),!r.props.index||!r.props.children||sr(!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=FE(r.props.children,i)),n.push(o)}),n}/**
660 * React Router DOM v6.27.0
661 *
662 * Copyright (c) Remix Software Inc.
663 *
664 * This source code is licensed under the MIT license found in the
665 * LICENSE.md file in the root directory of this source tree.
666 *
667 * @license MIT
668 */function BE(){return BE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BE.apply(this,arguments)}function $he(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Fhe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Bhe(e,t){return e.button===0&&(!t||t==="_self")&&!Fhe(e)}function zE(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function zhe(e,t){let n=zE(e);return t&&t.forEach((r,a)=>
668{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}const Uhe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],qhe="6";try{window.__reactRouterVersion=qhe}catch{}const Whe="startTransition",RD=cS[Whe];function Vhe(e){let{basename:t,children:n,future:r,window:a}=e,i=g.useRef();i.current==null&&(i.current=Yde({window:a,v5Compat:!0}));let o=i.current,[l,c]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=g.useCallback(h=>{u&&RD?RD(()=>c(h)):c(h)},[c,u]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.createElement(Dhe,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Hhe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ghe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ee=g.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=$he(t,Uhe),{basename:m}=g.useContext(Fc),y,p=!1;if(typeof u=="string"&&Ghe.test(u)&&(y=u,Hhe))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),j=tO(S.pathname,m);S.origin===w.origin&&j!=null?u=j+S.search+S.hash:p=!0}catch{}let x=whe(u,{relative:a}),v=Khe(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:h});function b(w){r&&r(w),w.defaultPrevented||v(w)}return g.createElement("a",BE({},f,{href:y||x,onClick:p||i?r:b,ref:n,target:c}))});var ID;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ID||(ID={}));var MD;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(MD||(MD={}));function Khe(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=cs(),u=ml(),d=lW(e,{relative:o});return g.useCallback(h=>{if(Bhe(h,n)){h.preventDefault();let f=r!==void 0?r:C0(u)===C0(d);c(e,{replace:f,state:a,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,r,a,n,e,i,o,l])}function yd(e){let t=g.useRef(zE(e)),n=g.useRef(!1),r=ml(),a=g.useMemo(()=>zhe(r.search,n.current?null:t.current),[r.search]),i=cs(),o=g.useCallback((l,c)=>{const u=zE(typeof l=="function"?l(a):l);n.current=!0,i("?"+u,c)},[i,a]);return[a,o]}const Yhe=g.createContext(void 0),Xhe=({children:e})=>{const[t,n]=g.useState({}),r=g.useCallback((o,l,c)=>{n(u=>({...u,[o]:{isLoading:l,error:c}}))},[]),a=g.useCallback(o=>{var l;return((l=t[o])==null?void 0:l.isLoading)||!1},[t]),i=g.useCallback(o=>{var l;return(l=t[o])==null?void 0:l.error},[t]);return s.jsx(Yhe.Provider,{value:{loadingStates:t,setLoading:r,isLoading:a,getError:i},children:e})};var UE=function(e,t){return UE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},UE(e,t)};function dW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");UE(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Vt=function(){return Vt=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Vt.apply(this,arguments)};function ai(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function hW(e,t,n,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function fW(e,t){return function(n,r){t(n,r,e)}}function mW(e,t,n,r,a,i){function o(v){if(v!==void 0&&typeof v!="function")throw new TypeError("Function expected");return v}for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),h,f=!1,m=n.length-1;m>=0;m--){var y={};for(var p in r)y[p]=p==="access"?{}:r[p];for(var p in r.access)y.access[p]=r.access[p];y.addInitializer=function(v){if(f)throw new TypeError("Cannot add initializer
vendor: 4,522 bytes, line 668
668s after decoration has completed");i.push(o(v||null))};var x=(0,n[m])(l==="accessor"?{get:d.get,set:d.set}:d[c],y);if(l==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(h=o(x.get))&&(d.get=h),(h=o(x.set))&&(d.set=h),(h=o(x.init))&&a.unshift(h)}else(h=o(x))&&(l==="field"?a.unshift(h):d[c]=h)}u&&Object.defineProperty(u,r.name,d),f=!0}function pW(e,t,n){for(var r=arguments.length>2,a=0;a<t.length;a++)n=r?t[a].call(e,n):t[a].call(e);return r?n:void 0}function gW(e){return typeof e=="symbol"?e:"".concat(e)}function yW(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function xW(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ge(e,t,n,r){function a(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):a(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}function vW(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,a=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],a=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var qS=Object.create?function(e,t,n,r){r===void 0&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function bW(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&qS(t,e,n)}function k0(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function aO(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(l){o={error:l}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i}function wW(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(aO(arguments[t]));return e}function SW(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),a=0,t=0;t<n;t++)for(var i=arguments[t],o=0,l=i.length;o<l;o++,a++)r[a]=i[o];return r}function xd(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function vf(e){return this instanceof vf?(this.v=e,this):new vf(e)}function jW(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),a,i=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",o),a[Symbol.asyncIterator]=function(){return this},a;function o(m){return function(y){return Promise.resolve(y).then(m,h)}}function l(m,y){r[m]&&(a[m]=function(p){return new Promise(function(x,v){i.push([m,p,x,v])>1||c(m,p)})},y&&(a[m]=y(a[m])))}function c(m,y){try{u(r[m](y))}catch(p){f(i[0][3],p)}}function u(m){m.value instanceof vf?Promise.resolve(m.value.v).then(d,h):f(i[0][2],m)}function d(m){c("next",m)}function h(m){c("throw",m)}
vendor: 4,009 bytes, line 668
668function f(m,y){m(y),i.shift(),i.length&&c(i[0][0],i[0][1])}}function NW(e){var t,n;return t={},r("next"),r("throw",function(a){throw a}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(a,i){t[a]=e[a]?function(o){return(n=!n)?{value:vf(e[a](o)),done:!1}:i?i(o):o}:i}}function _W(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof k0=="function"?k0(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(o){return new Promise(function(l,c){o=e[i](o),a(l,c,o.done,o.value)})}}function a(i,o,l,c){Promise.resolve(c).then(function(u){i({value:u,done:l})},o)}}function CW(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Qhe=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},qE=function(e){return qE=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},qE(e)};function EW(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=qE(e),r=0;r<n.length;r++)n[r]!=="default"&&qS(t,e,n[r]);return Qhe(t,e),t}function kW(e){return e&&e.__esModule?e:{default:e}}function PW(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function TW(e,t,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(e,n):a?a.value=n:t.set(e,n),n}function AW(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function OW(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,a;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(a=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");a&&(r=function(){try{a.call(this)}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Zhe=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function RW(e){function t(i){e.error=e.hasError?new Zhe(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}var n,r=0;function a(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(a);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(a,function(o){return t(o),a()})}else r|=1}catch(o){t(o)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a()}function IW(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,a,i,o){return r?t?".jsx":".js":a&&(!i||!o)?n:a+i+"."+o.toLowerCase()+"js"}):e}const Jhe={__extends:dW,__assign:Vt,__rest:ai,__decorate:hW,__param:fW,__esDecorate:mW,__runInitializers:pW,__propKey:gW,__setFunctionName:yW,__metadata:xW,__awaiter:Ge,__generator:vW,__createBinding:qS,__exportStar:bW,__values:k0,__read:aO,__spread:wW,__spreadArrays:SW,__spreadArray:xd,__await:vf,__asyncGenerator:jW,__asyncDelegator:NW,__asyncValues:_W,__makeTemplateOb
668ject:CW,__importStar:EW,__importDefault:kW,__classPrivateFieldGet:PW,__classPrivateFieldSet:TW,__classPrivateFieldIn:AW,__addDisposableResource:OW,__disposeResources:RW,__rewriteRelativeImportExtension:IW},efe=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:OW,get __assign(){return Vt},__asyncDelegator:NW,__asyncGenerator:jW,__asyncValues:_W,__await:vf,__awaiter:Ge,__classPrivateFieldGet:PW,__classPrivateFieldIn:AW,__classPrivateFieldSet:TW,__createBinding:qS,__decorate:hW,__disposeResources:RW,__esDecorate:mW,__exportStar:bW,__extends:dW,__generator:vW,__importDefault:kW,__importStar:EW,__makeTemplateObject:CW,__metadata:xW,__param:fW,__propKey:gW,__read:aO,__rest:ai,__rewriteRelativeImportExtension:IW,__runInitializers:pW,__setFunctionName:yW,__spread:wW,__spreadArray:xd,__spreadArrays:SW,__values:k0,default:Jhe},Symbol.toStringTag,{value:"Module"})),tfe=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class iO extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class DD extends iO{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class LD extends iO{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class $D extends iO{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var WE;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(WE||(WE={}));class nfe{constructor(t,{headers:n={},customFetch:r,region:a=WE.Any}={}){this.url=t,this.headers=n,this.region=a,this.fetch=tfe(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Ge(this,arguments,void 0,function*(n,r={}){var a;try{const{headers:i,method:o,body:l,signal:c}=r;let u={},{region:d}=r;d||(d=this.region);const h=new URL(`${this.url}/${n}`);d&&d!=="any"&&(u["x-region"]=d,h.searchParams.set("forceFunctionRegion",d));let f;l&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)?typeof Blob<"u"&&l instanceof Blob||l instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",f=l):typeof l=="string"?(u["Content-Type"]="text/plain",f=l):typeof FormData<"u"&&l instanceof FormData?f=l:(u["Content-Type"]="application/json",f=JSON.stringify(l)):f=l;const m=yield this.fetch(h.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),i),body:f,signal:c}).catch(v=>{throw v.name==="AbortError"?v:new DD(v)}),y=m.headers.get("x-relay-error");if(y&&y==="true")throw new LD(m);if(!m.ok)throw new $D(m);let p=((a=m.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),x;return p==="application/json"?x=yield m.json():p==="application/octet-stream"||p==="application/pdf"?x=yield m.blob():p==="text/event-stream"?x=m:p==="multipart/form-data"?x=yield m.formData():x=yield m.text(),{data:x,error:null,response:m}}catch(i){return i instanceof Error&&i.name==="AbortError"?{data:null,error:new DD(i)}:{data:null,error:i,response:i instanceof $D||i instanceof LD?i.context:void 0}}})}}var xs={};const mm=Mse(efe);var bv={},wv={},Sv={},jv={},Nv={},_v={},FD;function MW(){if(FD)return _v;
668FD=1,Object.defineProperty(_v,"__esModule",{value:!0});class e extends Error{constructor(n){super(n.message),this.name="PostgrestError",this.details=n.details,this.hint=n.hint,this.code=n.code}}return _v.default=e,_v}var BD;function DW(){if(BD)return Nv;BD=1,Object.defineProperty(Nv,"__esModule",{value:!0});const t=mm.__importDefault(MW());class n{constructor(a){var i,o;this.shouldThrowOnError=!1,this.method=a.method,this.url=a.url,this.headers=new Headers(a.headers),this.schema=a.schema,this.body=a.body,this.shouldThrowOnError=(i=a.shouldThrowOnError)!==null&&i!==void 0?i:!1,this.signal=a.signal,this.isMaybeSingle=(o=a.isMaybeSingle)!==null&&o!==void 0?o:!1,a.fetch?this.fetch=a.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(a,i){return this.headers=new Headers(this.headers),this.headers.set(a,i),this}then(a,i){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const o=this.fetch;let l=o(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async c=>{var u,d,h,f;let m=null,y=null,p=null,x=c.status,v=c.statusText;if(c.ok){if(this.method!=="HEAD"){const j=await c.text();j===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((u=this.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?y=j:y=JSON.parse(j))}const w=(d=this.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),S=(h=c.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");w&&S&&S.length>1&&(p=parseInt(S[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(y)&&(y.length>1?(m={code:"PGRST116",details:`Results contain ${y.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},y=null,p=null,x=406,v="Not Acceptable"):y.length===1?y=y[0]:y=null)}else{const w=await c.text();try{m=JSON.parse(w),Array.isArray(m)&&c.status===404&&(y=[],m=null,x=200,v="OK")}catch{c.status===404&&w===""?(x=204,v="No Content"):m={message:w}}if(m&&this.isMaybeSingle&&(!((f=m==null?void 0:m.details)===null||f===void 0)&&f.includes("0 rows"))&&(m=null,x=200,v="OK"),m&&this.shouldThrowOnError)throw new t.default(m)}return{error:m,data:y,count:p,status:x,statusText:v}});return this.shouldThrowOnError||(l=l.catch(c=>{var u,d,h;return{error:{message:`${(u=c==null?void 0:c.name)!==null&&u!==void 0?u:"FetchError"}: ${c==null?void 0:c.message}`,details:`${(d=c==null?void 0:c.stack)!==null&&d!==void 0?d:""}`,hint:"",code:`${(h=c==null?void 0:c.code)!==null&&h!==void 0?h:""}`},data:null,count:null,status:0,statusText:""}})),l.then(a,i)}returns(){return this}overrideTypes(){return this}}return Nv.default=n,Nv}var zD;function LW(){if(zD)return jv;zD=1,Object.defineProperty(jv,"__esModule",{value:!0});const t=mm.__importDefault(DW());class n extends t.default{select(a){let i=!1;const o=(a??"*").split("").map(l=>/\s/.test(l)&&!i?"":(l==='"'&&(i=!i),l)).join("");return this.url.searchParams.set("select",o),this.headers.append("Prefer","return=representation"),this}order(a,{ascending:i=!0,nullsFirst:o,foreignTable:l,referencedTable:c=l}={}){const u=c?`${c}.order`:"order",d=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${d?`${d},`:""}${a}.${i?"asc":"desc"}${o===void 0?"":o?".nullsfirst":".nullslast"}`),this}limit(a,{foreignTable:i,referencedTable:o=i}={}){const l=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(l,`${a}`),this}range(a,i,{foreignTable:o,referencedTable:l=o}={}){const c=typeof l>"u"?"offset":`${l}.offset`,u=typeof l>"u"?"limit":`${l}.limit`;return this.url.searchParams.set(c,`${a}`),this.url.searchParams.set(u,`${i-a+1}`),this}abortSignal(a){return this.signal=a,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
668explain({analyze:a=!1,verbose:i=!1,settings:o=!1,buffers:l=!1,wal:c=!1,format:u="text"}={}){var d;const h=[a?"analyze":null,i?"verbose":null,o?"settings":null,l?"buffers":null,c?"wal":null].filter(Boolean).join("|"),f=(d=this.headers.get("Accept"))!==null&&d!==void 0?d:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${f}"; options=${h};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(a){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${a}`),this}}return jv.default=n,jv}var UD;function oO(){if(UD)return Sv;UD=1,Object.defineProperty(Sv,"__esModule",{value:!0});const t=mm.__importDefault(LW()),n=new RegExp("[,()]");class r extends t.default{eq(i,o){return this.url.searchParams.append(i,`eq.${o}`),this}neq(i,o){return this.url.searchParams.append(i,`neq.${o}`),this}gt(i,o){return this.url.searchParams.append(i,`gt.${o}`),this}gte(i,o){return this.url.searchParams.append(i,`gte.${o}`),this}lt(i,o){return this.url.searchParams.append(i,`lt.${o}`),this}lte(i,o){return this.url.searchParams.append(i,`lte.${o}`),this}like(i,o){return this.url.searchParams.append(i,`like.${o}`),this}likeAllOf(i,o){return this.url.searchParams.append(i,`like(all).{${o.join(",")}}`),this}likeAnyOf(i,o){return this.url.searchParams.append(i,`like(any).{${o.join(",")}}`),this}ilike(i,o){return this.url.searchParams.append(i,`ilike.${o}`),this}ilikeAllOf(i,o){return this.url.searchParams.append(i,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(i,o){return this.url.searchParams.append(i,`ilike(any).{${o.join(",")}}`),this}is(i,o){return this.url.searchParams.append(i,`is.${o}`),this}in(i,o){const l=Array.from(new Set(o)).map(c=>typeof c=="string"&&n.test(c)?`"${c}"`:`${c}`).join(",");return this.url.searchParams.append(i,`in.(${l})`),this}contains(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cs.{${o.join(",")}}`):this.url.searchParams.append(i,`cs.${JSON.stringify(o)}`),this}containedBy(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cd.{${o.join(",")}}`):this.url.searchParams.append(i,`cd.${JSON.stringify(o)}`),this}rangeGt(i,o){return this.url.searchParams.append(i,`sr.${o}`),this}rangeGte(i,o){return this.url.searchParams.append(i,`nxl.${o}`),this}rangeLt(i,o){return this.url.searchParams.append(i,`sl.${o}`),this}rangeLte(i,o){return this.url.searchParams.append(i,`nxr.${o}`),this}rangeAdjacent(i,o){return this.url.searchParams.append(i,`adj.${o}`),this}overlaps(i,o){return typeof o=="string"?this.url.searchParams.append(i,`ov.${o}`):this.url.searchParams.append(i,`ov.{${o.join(",")}}`),this}textSearch(i,o,{config:l,type:c}={}){let u="";c==="plain"?u="pl":c==="phrase"?u="ph":c==="websearch"&&(u="w");const d=l===void 0?"":`(${l})`;return this.url.searchParams.append(i,`${u}fts${d}.${o}`),this}match(i){return Object.entries(i).forEach(([o,l])=>{this.url.searchParams.append(o,`eq.${l}`)}),this}not(i,o,l){return this.url.searchParams.append(i,`not.${o}.${l}`),this}or(i,{foreignTable:o,referencedTable:l=o}={}){const c=l?`${l}.or`:"or";return this.url.searchParams.append(c,`(${i})`),this}filter(i,o,l){return this.url.searchParams.append(i,`${o}.${l}`),this}}return Sv.default=r,Sv}var qD;function $W(){if(qD)return wv;qD=1,Object.defineProperty(wv,"__esModule",{value:!0});
668const t=mm.__importDefault(oO());class n{constructor(a,{headers:i={},schema:o,fetch:l}){this.url=a,this.headers=new Headers(i),this.schema=o,this.fetch=l}select(a,i){const{head:o=!1,count:l}=i??{},c=o?"HEAD":"GET";let u=!1;const d=(a??"*").split("").map(h=>/\s/.test(h)&&!u?"":(h==='"'&&(u=!u),h)).join("");return this.url.searchParams.set("select",d),l&&this.headers.append("Prefer",`count=${l}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(a,{count:i,defaultToNull:o=!0}={}){var l;const c="POST";if(i&&this.headers.append("Prefer",`count=${i}`),o||this.headers.append("Prefer","missing=default"),Array.isArray(a)){const u=a.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);this.url.searchParams.set("columns",d.join(","))}}return new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}upsert(a,{onConflict:i,ignoreDuplicates:o=!1,count:l,defaultToNull:c=!0}={}){var u;const d="POST";if(this.headers.append("Prefer",`resolution=${o?"ignore":"merge"}-duplicates`),i!==void 0&&this.url.searchParams.set("on_conflict",i),l&&this.headers.append("Prefer",`count=${l}`),c||this.headers.append("Prefer","missing=default"),Array.isArray(a)){const h=a.reduce((f,m)=>f.concat(Object.keys(m)),[]);if(h.length>0){const f=[...new Set(h)].map(m=>`"${m}"`);this.url.searchParams.set("columns",f.join(","))}}return new t.default({method:d,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}update(a,{count:i}={}){var o;const l="PATCH";return i&&this.headers.append("Prefer",`count=${i}`),new t.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}delete({count:a}={}){var i;const o="DELETE";return a&&this.headers.append("Prefer",`count=${a}`),new t.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}}return wv.default=n,wv}var WD;function rfe(){if(WD)return bv;WD=1,Object.defineProperty(bv,"__esModule",{value:!0});
668const e=mm,t=e.__importDefault($W()),n=e.__importDefault(oO());class r{constructor(i,{headers:o={},schema:l,fetch:c}={}){this.url=i,this.headers=new Headers(o),this.schemaName=l,this.fetch=c}from(i){const o=new URL(`${this.url}/${i}`);return new t.default(o,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(i){return new r(this.url,{headers:this.headers,schema:i,fetch:this.fetch})}rpc(i,o={},{head:l=!1,get:c=!1,count:u}={}){var d;let h;const f=new URL(`${this.url}/rpc/${i}`);let m;l||c?(h=l?"HEAD":"GET",Object.entries(o).filter(([p,x])=>x!==void 0).map(([p,x])=>[p,Array.isArray(x)?`{${x.join(",")}}`:`${x}`]).forEach(([p,x])=>{f.searchParams.append(p,x)})):(h="POST",m=o);const y=new Headers(this.headers);return u&&y.set("Prefer",`count=${u}`),new n.default({method:h,url:f,headers:y,schema:this.schemaName,body:m,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch})}}return bv.default=r,bv}Object.defineProperty(xs,"__esModule",{value:!0});var FW=xs.PostgrestError=YW=xs.PostgrestBuilder=GW=xs.PostgrestTransformBuilder=VW=xs.PostgrestFilterBuilder=qW=xs.PostgrestQueryBuilder=zW=xs.PostgrestClient=void 0;const pm=mm,BW=pm.__importDefault(rfe());var zW=xs.PostgrestClient=BW.default;const UW=pm.__importDefault($W());var qW=xs.PostgrestQueryBuilder=UW.default;
668const WW=pm.__importDefault(oO());var VW=xs.PostgrestFilterBuilder=WW.default;const HW=pm.__importDefault(LW());var GW=xs.PostgrestTransformBuilder=HW.default;const KW=pm.__importDefault(DW());var YW=xs.PostgrestBuilder=KW.default;const XW=pm.__importDefault(MW());FW=xs.PostgrestError=XW.default;var QW=xs.default={PostgrestClient:BW.default,PostgrestQueryBuilder:UW.default,PostgrestFilterBuilder:WW.default,PostgrestTransformBuilder:HW.default,PostgrestBuilder:KW.default,PostgrestError:XW.default};const sfe=eU({__proto__:null,get PostgrestBuilder(){return YW},get PostgrestClient(){return zW},get PostgrestError(){return FW},get PostgrestFilterBuilder(){return VW},get PostgrestQueryBuilder(){return qW},get PostgrestTransformBuilder(){return GW},default:QW},[xs]),{PostgrestClient:afe,PostgrestQueryBuilder:Ydt,PostgrestFilterBuilder:Xdt,PostgrestTransformBuilder:Qdt,PostgrestBuilder:Zdt,PostgrestError:Jdt}=QW||sfe;class ife{static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const n=process.versions;if(n&&n.node){const r=n.node,a=parseInt(r.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
669import ws from "ws"
670new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
671
672Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const ofe="2.80.0",lfe=`realtime-js/${ofe}`,cfe="1.0.0",VE=1e4,ufe=1e3,dfe=100;var qp;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(qp||(qp={}));var yr;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(yr||(yr={}));var vi;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(vi||(vi={}));var HE;(function(e){e.websocket="websocket"})(HE||(HE={}));var fu;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(fu||(fu={}));class hfe{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const a=n.getUint8(1),i=n.getUint8(2);let o=this.HEADER_LENGTH+2;const l=r.decode(t.slice(o,o+a));o=o+a;const c=r.decode(t.slice(o,o+i));o=o+i;const u=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:l,event:c,payload:u}}}
672class ZW{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var yn;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(yn||(yn={}));const VD=(e,t,n={})=>{var r;const a=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=ffe(o,e,t,a),i),{}):{}},ffe=(e,t,n,r)=>{const a=t.find(l=>l.name===e),i=a==null?void 0:a.type,o=n[e];return i&&!r.includes(i)?JW(i,o):GE(o)},JW=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return yfe(t,n)}switch(e){case yn.bool:return mfe(t);case yn.float4:case yn.float8:case yn.int2:case yn.int4:case yn.int8:case yn.numeric:case yn.oid:return pfe(t);case yn.json:case yn.jsonb:return gfe(t);case yn.timestamp:return xfe(t);case yn.abstime:case yn.date:case yn.daterange:case yn.int4range:case yn.int8range:case yn.money:case yn.reltime:case yn.text:case yn.time:case yn.timestamptz:case yn.timetz:case yn.tsrange:case yn.tstzrange:return GE(t);default:return GE(t)}},GE=e=>e,mfe=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},pfe=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},gfe=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},yfe=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>JW(t,l))}return e},xfe=e=>typeof e=="string"?e.replace(" ","T"):e,eV=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class uN{constructor(t,n,r={},a=VE){this.channel=t,this.event=n,this.payload=r,this.timeout=a,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var HD;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(HD||(HD={}));class Wp{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},a=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Wp.syncState(this.state,a,i,o),this.pendingDiffs.forEac
672h(c=>{this.state=Wp.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel._on(r.diff,{},a=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=Wp.syncDiff(this.state,a,i,o),l())}),this.onJoin((a,i,o)=>{this.channel._trigger("presence",{event:"join",key:a,currentPresences:i,newPresences:o})}),this.onLeave((a,i,o)=>{this.channel._trigger("presence",{event:"leave",key:a,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,a){const i=this.cloneDeep(t),o=this.transformState(n),l={},c={};return this.map(i,(u,d)=>{o[u]||(c[u]=d)}),this.map(o,(u,d)=>{const h=i[u];if(h){const f=d.map(x=>x.presence_ref),m=h.map(x=>x.presence_ref),y=d.filter(x=>m.indexOf(x.presence_ref)<0),p=h.filter(x=>f.indexOf(x.presence_ref)<0);y.length>0&&(l[u]=y),p.length>0&&(c[u]=p)}else l[u]=d}),this.syncDiff(i,{joins:l,leaves:c},r,a)}static syncDiff(t,n,r,a){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),a||(a=()=>{}),this.map(i,(l,c)=>{var u;const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const h=t[l].map(m=>m.presence_ref),f=d.filter(m=>h.indexOf(m.presence_ref)<0);t[l].unshift(...f)}r(l,d,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[l]=u,a(l,u,c),u.length===0&&delete t[l]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const a=t[r];return"metas"in a?n[r]=a.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=a,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var GD;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(GD||(GD={}));var Vp;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Vp||(Vp={}));var Do;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Do||(Do={}));class lO{constructor(t,n={config:{}},r){var a,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=yr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new uN(this,vi.join,this.params,this.timeout),this.rejoinTimer=new ZW(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=yr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=yr.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=yr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=yr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=yr.errored,this.rejoinTimer.scheduleTimeout())}),this._on(vi.reply,{},(o,l)=>{this._trigger(this._replyEventName(l),o)}),this.presence=new Wp(this),this.broadcastEndpointURL=eV(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(a=this.params.config)===null||a===void 0?void 0:a.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,a,i;if(this.socket.isConnected()||this.socket.connect(),this.state==yr.closed){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(a=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(m=>m.filter))!==null&&a!==void 0?a:[],d=!!this.bindings[Vp.PRESENCE]&&this.bindings[Vp.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(m=>t==null?void 0:t(Do.CHANNEL_ERROR,m)),this._onClose(()=>t==null?void 0:t(Do.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:m})=>{var y;if(this.socket.setAuth(),m===void 0){t==null||t(Do.SUBSCRIBED);return}else{const p=this.bindings.postgres_changes,x=(y=p==null?void 0:p.length)!==null&&y!==void 0?y:0,v=[];for(let b=0;b<x;b++){const w=p[b],{filter:{event:S,schema:j,table:N,filter:C}}=w,_=m&&m[b];
672if(_&&_.event===S&&_.schema===j&&_.table===N&&_.filter===C)v.push(Object.assign(Object.assign({},w),{id:_.id}));else{this.unsubscribe(),this.state=yr.errored,t==null||t(Do.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,t&&t(Do.SUBSCRIBED);return}}).receive("error",m=>{this.state=yr.errored,t==null||t(Do.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Do.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===yr.joined&&t===Vp.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var a;const i=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(n==null)return Promise.reject("Payload is required for httpSend()");const o={method:"POST",headers:{Authorization:i,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(a=r.timeout)!==null&&a!==void 0?a:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,a;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
672in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,c={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((a=u.body)===null||a===void 0?void 0:a.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=yr.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(vi.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(a=>{r=new uN(this,vi.leave,{},t),r.receive("ok",()=>{n(),a("ok")}).receive("timeout",()=>{n(),a("timed out")}).receive("error",()=>{a("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=yr.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const a=new AbortController,i=setTimeout(()=>a.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:a.signal}));return clearTimeout(i),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let a=new uN(this,t,n,r);return this._canPush()?a.send():this._addToPushBuffer(a),a}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>dfe){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var a,i;const o=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=vi;if(r&&[l,c,u,d].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(a=this.bindings.postgres_changes)===null||a===void 0||a.filter(m=>{var y,p,x;return((y=m.filter)===null||y===void 0?void 0:y.event)==="*"||((x=(p=m.filter)===null||p===void 0?void 0:p.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(m=>m.callback(f,r)):(i=this.bindings[o])===null||i===void 0||i.filter(m=>{var y,p,x,v,b,w;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const S=m.id,j=(y=m.filter)===null||y===void 0?void 0:y.event;return S&&((p=n.ids)===null||p===void 0?void 0:p.includes(S))&&(j==="*"||(j==null?void 0:j.toLocaleLowerCase())===((x=n.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const S=(b=(v=m==null?void 0:m.filter)===null||v===void 0?void 0:v.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return S==="*"||S===((w=n==null?void 0:n.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof f=="object"&&"ids"in f){const y=f.data,{schema:p,table:
672x,commit_timestamp:v,type:b,errors:w}=y;f=Object.assign(Object.assign({},{schema:p,table:x,commit_timestamp:v,eventType:b,new:{},old:{},errors:w}),this._getPayloadRecords(y))}m.callback(f,r)})}_isClosed(){return this.state===yr.closed}_isJoined(){return this.state===yr.joined}_isJoining(){return this.state===yr.joining}_isLeaving(){return this.state===yr.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const a=t.toLocaleLowerCase(),i={type:a,filter:n,callback:r};return this.bindings[a]?this.bindings[a].push(i):this.bindings[a]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(a=>{var i;return!(((i=a.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&lO.isEqual(a.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(vi.close,{},t)}_onError(t){this._on(vi.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=yr.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=VD(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=VD(t.columns,t.old_record)),n}}const dN=()=>{},Cv={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},vfe=[1e3,2e3,5e3,1e4],bfe=1e4,wfe=`
673  addEventListener("message", (e) => {
674    if (e.data.event === "start") {
675      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
676    }
677  });`;class Sfe{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=VE,this.transport=null,this.heartbeatIntervalMs=Cv.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=dN,this.ref=0,this.reconnectTimer=null,this.logger=dN,this.conn=null,this.sendBuffer=[],this.serializer=new hfe,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=a=>a?(...i)=>a(...i):(...i)=>fetch(...i),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${HE.websocket}`,this.httpEndpoint=eV(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=ife.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
678
679To use Realtime in Node.js, you need to provide a WebSocket implementation:
680
681Option 1: Use Node.js 22+ which has native WebSocket support
682Option 2: Install and provide the "ws" package:
683
684  npm install ws
685
686  import ws from "ws"
687  const client = new RealtimeClient(url, {
688    ...options,
689    transport: ws
690  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:cfe}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},t?this.conn.close(t,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case qp.connecting:return fu.Connecting;case qp.open:return fu.Open;case qp.closing:return fu.Closing;default:return fu.Closed}}isConnected(){return this.connectionState()===fu.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
690channel(t,n={config:{}}){const r=`realtime:${t}`,a=this.getChannels().find(i=>i.topic===r);if(a)return a;{const i=new lO(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){const{topic:n,event:r,payload:a,ref:i}=t,o=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${n} ${r} (${i})`,a),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(ufe,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},Cv.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:a,payload:i,ref:o}=n,l=o?`(${o})`:"",c=i.status||"";this.log("receive",`${c} ${r} ${a} ${l}`.trim(),i),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(a,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}
690_triggerChanError(){this.channels.forEach(t=>t._trigger(vi.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",a=new URLSearchParams(n);return`${t}${r}${a}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([wfe],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n;t?n=t:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const a={access_token:n,version:lfe};n&&r.updateJoinPayload(a),r.joinedOnce&&r._isJoined()&&r._push(vi.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(a){this.log("error",`error in ${t} callback`,a)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new ZW(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Cv.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,a,i,o,l,c,u,d;if(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:VE,this.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Cv.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:dN,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:h=>vfe[h-1]||bfe,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(h,f)=>f(JSON.stringify(h)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}class cO extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Ln(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class jfe extends cO{constructor(t,n,r){super(t),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class KE extends cO{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}const uO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Nfe=()=>Response,YE=e=>{if(Array.isArray(e))return e.map(n=>YE(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const a=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[a]=YE(r)}),t},_fe=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},hN=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},Cfe=(e,t,n)=>Ge(void 0,void 0,void 0,function*(){const r=yield Nfe();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(a=>{const i=e.status||500,o=(a==null?void 0:a.statusCode)||i+"";t(new jfe(hN(a),i,o))}).catch(a=>{t(new KE(hN(a),a))}):t(new KE(hN(e),e))}),Efe=(e,t,n,r)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?a:(_fe(r)?(a.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a.body=JSON.stringify(r)):a.body=r,t!=null&&t.duplex&&(a.duplex=t.duplex),Object.assign(Object.assign({},a),n))};function sx(e,t,n,r,a,i){return Ge(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(n,Efe(t,r,a,i)).then(c=>{if(!c.ok)throw c;return r!=null&&r.noResolveJson?c:c.json()}).then(c=>o(c)).catch(c=>Cfe(c,l,r))})})}function Lg(e,t,n,r){return Ge(this,void 0,void 0,function*(){return sx(e,"GET",t,n,r)})}function gi(e,t,n,r,a){return Ge(this,void 0,void 0,function*(){return sx(e,"POST",t,r,a,n)})}function XE(e,t,n,r,a){return Ge(this,void 0,void 0,function*(){return sx(e,"PUT",t,r,a,n)})}function kfe(e,t,n,r){return Ge(this,void 0,void 0,function*(){return sx(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function dO(e,t,n,r,a){return Ge(this,void 0,void 0,function*(){return sx(e,"DELETE",t,r,a,n)})}class Pfe{constructor(t,n){this.downloadFn=t,this.shouldThrowOnError=n}then(t,n){return this.execute().then(t,n)}execute(){return Ge(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Ln(t))return{data:null,error:t};throw t}})}}var tV;class Tfe{constructor(t,n){this.downloadFn=t,this.shouldThrowOnError=n,this[tV]="BlobDownloadBuilder",this.promise=null}asStream(){return new Pfe(this.downloadFn,this.shouldThrowOnError)}then(t,n){return this.getPromise().then(t,n)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return Ge(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Ln(t))return{data:null,error:t};throw t}})}}tV=Symbol.toStringTag;const Afe={limit:100,offset:0,sortBy:{column:"name",order:"asc"}}
690,KD={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class Ofe{constructor(t,n={},r,a){this.shouldThrowOnError=!1,this.url=t,this.headers=n,this.bucketId=r,this.fetch=uO(a)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,n,r,a){return Ge(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},KD),a);let l=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",this.encodeMetadata(c)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),c&&!i.has("metadata")&&i.append("metadata",this.encodeMetadata(c))):(i=r,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=this.toBase64(this.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),a!=null&&a.headers&&(l=Object.assign(Object.assign({},l),a.headers));const u=this._removeEmptyFolders(n),d=this._getFinalPath(u),h=yield(t=="PUT"?XE:gi)(this.fetch,`${this.url}/object/${d}`,i,Object.assign({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ln(i))return{data:null,error:i};throw i}})}upload(t,n,r){return Ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,a){return Ge(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(t),o=this._getFinalPath(i),l=new URL(this.url+`/object/upload/sign/${o}`);l.searchParams.set("token",n);try{let c;const u=Object.assign({upsert:KD.upsert},a),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const h=yield XE(this.fetch,l.toString(),c,{headers:d});return{data:{path:i,fullPath:h.Key},error:null}}catch(c){if(this.shouldThrowOnError)throw c;if(Ln(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(t,n){return Ge(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const a=Object.assign({},this.headers);n!=null&&n.upsert&&(a["x-upsert"]="true");const i=yield gi(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:a}),o=new URL(this.url+i.url),l=o.searchParams.get("token");if(!l)throw new cO("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:l},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ln(r))return{data:null,error:r};throw r}})}update(t,n,r){return Ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return Ge(this,void 0,void 0,function*(){try{return{data:yield gi(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ln(a))return{data:null,error:a};throw a}})}copy(t,n,r){return Ge(this,void 0,void 0,function*(){try{return{data:{path:(yield gi(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ln(a))return{data:null,error:a};throw a}})}createSignedUrl(t,n,r){return Ge(this,void 0,void 0,function*(){try{let a=this._getFinalPath(t),i=yield gi(this.fetch,`${this.url}/object/sign/${a}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ln(a))return{data:null,error:a};throw a}})}createSignedUrls(t,n,r){return Ge(this,void 0,void 0,function*(){try{const a=yield gi(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:a.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ln(a))return{data:null,error:a};throw a}})}download(t,n){const a=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=i?`?${i}`:"",l=this._getFinalPath(t),c=()=>Lg(this.fetch,`${this.url}/${a}/${l}${o}
690`,{headers:this.headers,noResolveJson:!0});return new Tfe(c,this.shouldThrowOnError)}info(t){return Ge(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Lg(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:YE(r),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ln(r))return{data:null,error:r};throw r}})}exists(t){return Ge(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield kfe(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ln(r)&&r instanceof KE){const a=r.originalError;if([400,404].includes(a==null?void 0:a.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),a=[],i=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";i!==""&&a.push(i);const l=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});c!==""&&a.push(c);let u=a.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${r}${u}`)}}}remove(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield dO(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}list(t,n,r){return Ge(this,void 0,void 0,function*(){try{const a=Object.assign(Object.assign(Object.assign({},Afe),n),{prefix:t||""});return{data:yield gi(this.fetch,`${this.url}/object/list/${this.bucketId}`,a,{headers:this.headers},r),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ln(a))return{data:null,error:a};throw a}})}listV2(t,n){return Ge(this,void 0,void 0,function*(){try{const r=Object.assign({},t);return{data:yield gi(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ln(r))return{data:null,error:r};throw r}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const nV="2.80.0",rV={"X-Client-Info":`storage-js/${nV}`};class Rfe{constructor(t,n={},r,a){this.shouldThrowOnError=!1;const i=new URL(t);a!=null&&a.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},rV),n),this.fetch=uO(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return Ge(this,void 0,void 0,function*(){try{const n=this.listBucketOptionsToQueryString(t);return{data:yield Lg(this.fetch,`${this.url}/bucket${n}`,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}getBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield Lg(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}createBucket(t){return Ge(this,arguments,void 0,function*(n,r={public:!1}){try{return{data:yield gi(this.fetch,`${this.url}/bucket`,{id:n,name:n,type:r.type,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ln(a))return{data:null,error:a};throw a}})}updateBucket(t,n){return Ge(this,void 0,void 0,function*(){try{return{data:yield XE(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ln(r))return{data:null,error:r};throw r}})}emptyBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield gi(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}deleteBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield dO(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}listBucketOptionsToQueryString(t){const n={};return t&&("limit"in t&&(n.limit=String(t.limit)),"offset"in t&&(n.offset=String(t.offset)),t.search&&(n.search=t.search),t.sortColumn&&(n.sortColumn=t.sortColumn),t.sortOrder&&(n.sortOrder=t.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}}class Ife{constructor(t,n={},r){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},rV),n),this.fetch=uO(r)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield gi(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}listBuckets(t){return Ge(this,void 0,void 0,function*(){try{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(),a=r?`${this.url}/bucket?${r}`:`${this.url}/bucket`;return{data:yield Lg(this.fetch,a,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}deleteBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield dO(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ln(n))return{data:null,error:n};throw n}})}}const hO={"X-Client-Info":`storage-js/${nV}`,"Content-Type":"application/json"};
690class sV extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function fa(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}class fN extends sV{constructor(t,n,r){super(t),this.name="StorageVectorsApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Mfe extends sV{constructor(t,n){super(t),this.name="StorageVectorsUnknownError",this.originalError=n}}var YD;(function(e){e.InternalError="InternalError",e.S3VectorConflictException="S3VectorConflictException",e.S3VectorNotFoundException="S3VectorNotFoundException",e.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",e.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",e.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(YD||(YD={}));const fO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Dfe=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},XD=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Lfe=(e,t,n)=>Ge(void 0,void 0,void 0,function*(){if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const a=e.status||500,i=e;if(typeof i.json=="function")i.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new fN(XD(o),a,l))}).catch(()=>{const o=a+"",l=i.statusText||`HTTP ${a} error`;t(new fN(l,a,o))});else{const o=a+"",l=i.statusText||`HTTP ${a} error`;t(new fN(l,a,o))}}else t(new Mfe(XD(e),e))}),$fe=(e,t,n,r)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return r?(Dfe(r)?(a.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a.body=JSON.stringify(r)):a.body=r,Object.assign(Object.assign({},a),n)):a};function Ffe(e,t,n,r,a,i){return Ge(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(n,$fe(t,r,a,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>o(c)).catch(c=>Lfe(c,l,r))})})}function ma(e,t,n,r,a){return Ge(this,void 0,void 0,function*(){return Ffe(e,"POST",t,r,a,n)})}class Bfe{constructor(t,n={},r){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},hO),n),this.fetch=fO(r)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return Ge(this,void 0,void 0,function*(){try{return{data:(yield ma(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}getIndex(t,n){return Ge(this,void 0,void 0,function*(){try{return{data:yield ma(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:n},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(fa(r))return{data:null,error:r};throw r}})}listIndexes(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield ma(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}deleteIndex(t,n){return Ge(this,void 0,void 0,function*(){try{return{data:(yield ma(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:n},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(fa(r))return{data:null,error:r};throw r}})}}class zfe{constructor(t,n={},r){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},hO),n),this.fetch=fO(r)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return Ge(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield ma(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}getVectors(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield ma(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}listVectors(t){return Ge(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
690if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield ma(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}queryVectors(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield ma(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}deleteVectors(t){return Ge(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield ma(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}}class Ufe{constructor(t,n={},r){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},hO),n),this.fetch=fO(r)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:(yield ma(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}getBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:yield ma(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}listBuckets(){return Ge(this,arguments,void 0,function*(t={}){try{return{data:yield ma(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}deleteBucket(t){return Ge(this,void 0,void 0,function*(){try{return{data:(yield ma(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(fa(n))return{data:null,error:n};throw n}})}}class qfe extends Ufe{constructor(t,n={}){super(t,n.headers||{},n.fetch)}from(t){return new Wfe(this.url,this.headers,t,this.fetch)}}class Wfe extends Bfe{constructor(t,n,r,a){super(t,n,a),this.vectorBucketName=r}createIndex(t){const n=Object.create(null,{createIndex:{get:()=>super.createIndex}});return Ge(this,void 0,void 0,function*(){return n.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return Ge(this,arguments,void 0,function*(n={}){return t.listIndexes.call(this,Object.assign(Object.assign({},n),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){const n=Object.create(null,{getIndex:{get:()=>super.getIndex}});return Ge(this,void 0,void 0,function*(){return n.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){const n=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return Ge(this,void 0,void 0,function*(){return n.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new Vfe(this.url,this.headers,this.vectorBucketName,t,this.fetch)}}class Vfe extends zfe{constructor(t,n,r,a,i){super(t,n,i),this.vectorBucketName=r,this.indexName=a}putVectors(t){const n=Object.create(null,{putVectors:{get:()=>super.putVectors}});return Ge(this,void 0,void 0,function*(){return n.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){const n=Object.create(null,{getVectors:{get:()=>super.getVectors}});return Ge(this,void 0,void 0,function*(){return n.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return Ge(this,arguments,void 0,function*(n={}){return t.listVectors.call(this,Object.assign(Object.assign({},n),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){const n=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return Ge(this,void 0,void 0,function*(){return n.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){const n=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return Ge(this,void 0,void 0,function*(){return n.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class Hfe extends Rfe{constructor(t,n={},r,a){super(t,n,r,a)}from(t){return new Ofe(this.url,this.headers,t,this.fetch)}get vectors(){return new qfe(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Ife(this.url+"/iceberg",this.headers,this.fetch)}}const Gfe="2.80.0";let Ep="";typeof Deno<"u"?Ep="deno":typeof document<"u"?Ep="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ep="react-native":Ep="node";const Kfe={"X-Client-Info":`supabase-js-${Ep}/${Gfe}`},Yfe={headers:Kfe},Xfe={schema:"public"},Qfe={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Zfe={},Jfe=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),eme=()=>
690Headers,tme=(e,t,n)=>{const r=Jfe(n),a=eme();return async(i,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new a(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(i,Object.assign(Object.assign({},o),{headers:u}))}};function nme(e){return e.endsWith("/")?e:e+"/"}function rme(e,t){var n,r;const{db:a,auth:i,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:Object.assign(Object.assign({},c),a),auth:Object.assign(Object.assign({},u),i),realtime:Object.assign(Object.assign({},d),o),storage:{},global:Object.assign(Object.assign(Object.assign({},h),l),{headers:Object.assign(Object.assign({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function sme(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(nme(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const aV="2.80.0",rh=30*1e3,QE=3,mN=QE*rh,ame="http://localhost:9999",ime="supabase.auth.token",ome={"X-Client-Info":`gotrue-js/${aV}`},ZE="X-Supabase-Api-Version",iV={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},lme=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,cme=10*60*1e3;class $g extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function et(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class ume extends $g{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function dme(e){return et(e)&&e.name==="AuthApiError"}class mu extends $g{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Bc extends $g{constructor(t,n,r,a){super(t,r,a),this.name=n,this.status=r}}class di extends Bc{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function hme(e){return et(e)&&e.name==="AuthSessionMissingError"}class Od extends Bc{constructor(){super("Auth session or user missing","AuthInvalidToken
690ResponseError",500,void 0)}}class Ev extends Bc{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class kv extends Bc{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function fme(e){return et(e)&&e.name==="AuthImplicitGrantRedirectError"}class QD extends Bc{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class JE extends Bc{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function pN(e){return et(e)&&e.name==="AuthRetryableFetchError"}class ZD extends Bc{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class ek extends Bc{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const P0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),JD=` 	
691\r=`.split(""),mme=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<JD.length;t+=1)e[JD[t].charCodeAt(0)]=-2;for(let t=0;t<P0.length;t+=1)e[P0[t].charCodeAt(0)]=t;return e})();function e4(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(P0[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(P0[r]),t.queuedBits-=6}}function oV(e,t,n){const r=mme[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function t4(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},i=o=>{yme(o,r,n)};for(let o=0;o<e.length;o+=1)oV(e.charCodeAt(o),a,i);return t.join("")}function pme(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function gme(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const a=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|a)+65536,n+=1}pme(r,t)}}function yme(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Fh(e){const t=[],n={queue:0,queuedBits:0},r=a=>{t.push(a)};for(let a=0;a<e.length;a+=1)oV(e.charCodeAt(a),n,r);return new Uint8Array(t)}function xme(e){const t=[];return gme(e,n=>t.push(n)),new Uint8Array(t)}function bu(e){const t=[],n={queue:0,queuedBits:0},r=a=>{t.push(a)};return e.forEach(a=>e4(a,n,r)),e4(null,n,r),t.join("")}function vme(e){return Math.round(Date.now()/1e3)+e}function bme(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const Xr=()=>typeof window<"u"&&typeof document<"u",Zc={tested:!1,writable:!1},lV=()=>{if(!Xr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Zc.tested)return Zc.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Zc.tested=!0,Zc.writable=!0}catch{Zc.tested=!0,Zc.writable=!1}return Zc.writable};function wme(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((a,i)=>{t[i]=a})}catch{}return n.searchParams.forEach((r,a)=>{t[a]=r}),t}const cV=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Sme=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",sh=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Jc=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Cl=async(e,t)=>{await e.removeItem(t)};class WS{constructor(){this.promise=new WS.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}WS.promiseConstructor=Promise;function gN(e){const t=e.split(".");if(t.length!==3)throw new ek("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!lme.test(t[r]))throw new ek("JWT not in base64url format");return{header:JSON.parse(t4(t[0])),payload:JSON.parse(t4(t[1])),signature:Fh(t[2]),raw:{header:t[0],payload:t[1]}}}async function jme(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Nme(e,t){return new Promise((r,a)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){a(o);return}}})()})}function _me(e){return("0"+e.toString(16)).substr(-2)}function Cme(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let a="";for(let i=0;i<56;i++)a+=n.charAt(Math.floor(Math.random()*r));return a}return crypto.getRandomValues(t),Array.from(t,_me).join("")}async function Eme(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",
691n),a=new Uint8Array(r);return Array.from(a).map(i=>String.fromCharCode(i)).join("")}async function kme(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await Eme(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Rd(e,t,n=!1){const r=Cme();let a=r;n&&(a+="/PASSWORD_RECOVERY"),await sh(e,`${t}-code-verifier`,a);const i=await kme(r);return[i,r===i?"plain":"s256"]}const Pme=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Tme(e){const t=e.headers.get(ZE);if(!t||!t.match(Pme))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Ame(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function Ome(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Rme=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Id(e){if(!Rme.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function yN(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Ime(e,t){return new Proxy(e,{get:(n,r,a)=>{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,a)}return!t.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."),t.value=!0),Reflect.get(n,r,a)}})}function n4(e){return JSON.parse(JSON.stringify(e))}const ou=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Mme=[502,503,504];async function r4(e){var t;if(!Sme(e))throw new JE(ou(e),0);if(Mme.includes(e.status))throw new JE(ou(e),e.status);let n;try{n=await e.json()}catch(i){throw new mu(ou(i),i)}let r;const a=Tme(e);if(a&&a.getTime()>=iV["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 ZD(ou(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new di}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 ZD(ou(n),e.status,n.weak_password.reasons);throw new ume(ou(n),e.status||500,r)}const Dme=(e,t,n,r)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),a.body=JSON.stringify(r),Object.assign(Object.assign({},a),n))};async function ft(e,t,n,r){var a;const i=Object.assign({},r==null?void 0:r.headers);i[ZE]||(i[ZE]=iV["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(a=r==null?void 0:r.query)!==null&&a!==void 0?a:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await Lme(e,t,n+l,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function Lme(e,t,n,r,a,i){const o=Dme(t,r,a,i);let l;try{l=await e(n,Object.assign({},o))}catch(c){throw console.error(c),new JE(ou(c),0)}if(l.ok||await r4(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await r4(c)}}function hi(e){var t;let n=null;
691Bme(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=vme(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function s4(e){const t=hi(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function ql(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function $me(e){return{data:e,error:null}}function Fme(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:a,verification_type:i}=e,o=ai(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:a,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function a4(e){return e}function Bme(e){return e.access_token&&e.refresh_token&&e.expires_in}const xN=["global","local","others"];class zme{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=cV(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,n=xN[0]){if(xN.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${xN.join(", ")}`);try{return await ft(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(et(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await ft(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:ql})}catch(r){if(et(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=ai(t,["options"]),a=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(a.new_email=r==null?void 0:r.newEmail,delete a.newEmail),await ft(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:Fme,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(et(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ft(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ql})}catch(n){if(et(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,a,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ft(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:a4});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(y=>{const p=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(y.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(et(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Id(t);try{return await ft(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ql})}catch(n){if(et(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Id(t);try{return await ft(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:ql})}catch(r){if(et(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Id(t);
691try{return await ft(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:ql})}catch(r){if(et(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Id(t.userId);try{const{data:n,error:r}=await ft(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:n,error:r}}catch(n){if(et(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Id(t.userId),Id(t.id);try{return{data:await ft(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(et(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,a,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ft(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:a4});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(y=>{const p=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(y.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(et(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ft(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(et(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await ft(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(et(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await ft(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(et(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await ft(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(et(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await ft(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(et(n))return{data:null,error:n};throw n}}}function i4(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Md={debug:!!(globalThis&&lV()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class uV extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Ume extends uV{}async function qme(e,t,n){Md.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),Md.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async a=>{if(a){Md.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return await n()}finally{Md.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(t===0)throw Md.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Ume(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Md.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null,"  "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}function Wme(){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 dV(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
691" is invalid.`);return e.toLowerCase()}function Vme(e){return parseInt(e,16)}function Hme(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function Gme(e){var t;const{chainId:n,domain:r,expirationTime:a,issuedAt:i=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{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(!h)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(!((t=e.statement)===null||t===void 0)&&t.includes(`
692`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=dV(e.address),y=d?`${d}://${r}`:r,p=e.statement?`${e.statement}
693`:"",x=`${y} wants you to sign in with your Ethereum account:
694${m}
695
696${p}`;let v=`URI: ${h}
697Version: ${f}
698Chain ID: ${n}${o?`
699Nonce: ${o}`:""}
700Issued At: ${i.toISOString()}`;if(a&&(v+=`
701Expiration Time: ${a.toISOString()}`),l&&(v+=`
702Not Before: ${l.toISOString()}`),c&&(v+=`
703Request ID: ${c}`),u){let b=`
704Resources:`;for(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}`);b+=`
705- ${w}`}v+=b}return`${x}
706${v}`}class cr extends Error{constructor({message:t,code:n,cause:r,name:a}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=a??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class T0 extends cr{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function Kme({error:e,options:t}){var n,r,a;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new cr({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new cr({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new cr({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((a=i.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new cr({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new cr({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new cr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new cr({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new cr({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(hV(o)){if(i.rp.id!==o)return new cr({message:`The RP ID "${i.rp.id}
706" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new cr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new cr({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new cr({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new cr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Yme({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new cr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new cr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(hV(r)){if(n.rpId!==r)return new cr({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new cr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new cr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new cr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Xme{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Qme=new Xme;function Zme(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,a=ai(e,["challenge","user","excludeCredentials"]),i=Fh(t).buffer,o=Object.assign(Object.assign({},n),{id:Fh(n.id).buffer}),l=Object.assign(Object.assign({},a),{challenge:i,user:o});if(r&&r.length>0){l.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Fh(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function Jme(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=ai(e,["challenge","allowCredentials"]),a=Fh(t).buffer,i=Object.assign(Object.assign({},r),{challenge:a});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const l=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},l),{id:Fh(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function epe(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:bu(new Uint8Array(e.response.attestationObject)),clientDataJSON:bu(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function tpe(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),a=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:bu(new Uint8Array(a.authenticatorData)),clientDataJSON:bu(new Uint8Array(a.clientDataJSON)),signature:bu(new Uint8Array(a.signature)),userHandle:a.userHandle?bu(new 
706Uint8Array(a.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function hV(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function o4(){var e,t;return!!(Xr()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function npe(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new T0("Browser returned unexpected credential type",t)}:{data:null,error:new T0("Empty credential response",t)}}catch(t){return{data:null,error:Kme({error:t,options:e})}}}async function rpe(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new T0("Browser returned unexpected credential type",t)}:{data:null,error:new T0("Empty credential response",t)}}catch(t){return{data:null,error:Yme({error:t,options:e})}}}const spe={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"none"},ape={userVerification:"preferred",hints:["security-key"]};function A0(...e){const t=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),n=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),r={};for(const a of e)if(a)for(const i in a){const o=a[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const l=r[i];t(l)?r[i]=A0(l,o):r[i]=A0(o)}else r[i]=o}return r}function ipe(e,t){return A0(spe,e,t||{})}function ope(e,t){return A0(ape,e,t||{})}class lpe{constructor(t){this.client=t,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(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:a},i){try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!o)return{data:null,error:l};const c=a??Qme.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${r}`),u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=ipe(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await npe({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=ope(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await rpe(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(o){return et(o)?{data:null,error:o}:{data:null,error:new mu("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:a}},i){if(!n)return{data:null,error:new $g("rpId is required for WebAuthn authentication")};try{if(!o4())return{data:null,error:new mu("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:a},{request:i});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(o){return et(o)?{data:null,error:o}:{data:null,error:new mu("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:a},i){if(!n)return{data:null,error:new $g("rpId is required for WebAuthn registration")};try{if(!o4())return{data:null,error:new mu("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;
706return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:a},{create:i});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return et(o)?{data:null,error:o}:{data:null,error:new mu("Unexpected error in register",o)}}}}Wme();const cpe={url:ame,storageKey:ime,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ome,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function l4(e,t,n){return await n()}const Dd={};class Fg{get jwks(){var t,n;return(n=(t=Dd[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Dd[this.storageKey]=Object.assign(Object.assign({},Dd[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Dd[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Dd[this.storageKey]=Object.assign(Object.assign({},Dd[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},cpe),t);if(this.storageKey=i.storageKey,this.instanceID=(n=Fg.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Fg.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Xr()){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.admin=new zme({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=cV(i.fetch),this.lock=i.lock||l4,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,i.lock?this.lock=i.lock:Xr()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=qme:this.lock=l4,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 lpe(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:lV()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=i4(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=i4(this.memoryStorage)),Xr()&&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)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${aV}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Xr()&&(n=wme(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Xr()&&this.detectSessionInUrl&&r!=="none"){const{data:a,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),fme(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:l}=a;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return et(n)?this._returnResult({error:n}):this._returnResult({error:new mu("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,a;try{const i=await ft(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(a=t==null?void 0:t.options)===null||a===void 0?void 0:a.captchaToken}},xform:hi}),{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(et(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,a;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Rd(this.storage,this.storageKey)),i=await ft(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:m,code_challenge_method:y},xform:hi})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await ft(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(a=f==null?void 0:f.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:hi})}else throw new Ev("You must provide either an email or phone number and a password");const{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(et(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:l}=t;n=await ft(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:s4})}else if("phone"in t){const{phone:i,password:o,options:l}=t;n=await ft(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:s4})}else throw new Ev("You must provide either an email or phone number and a password");const{data:r,error:a}=n;
706if(a)return this._returnResult({data:{user:null,session:null},error:a});if(!r||!r.session||!r.user){const i=new Od;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:a})}catch(n){if(et(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,a,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(a=t.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,a,i,o,l,c,u,d,h,f;let m,y;if("message"in t)m=t.message,y=t.signature;else{const{chain:p,wallet:x,statement:v,options:b}=t;let w;if(Xr())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"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const S=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href),j=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(!j||j.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const N=dV(j[0]);let C=(r=b==null?void 0:b.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!C){const A=await w.request({method:"eth_chainId"});C=Vme(A)}const _={domain:S.host,address:N,statement:v,uri:S.href,version:"1",chainId:C,nonce:(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.nonce,issuedAt:(o=(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=b==null?void 0:b.signInWithEthereum)===null||d===void 0?void 0:d.resources};m=Gme(_),y=await w.request({method:"personal_sign",params:[Hme(m),N]})}try{const{data:p,error:x}=await ft(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:y},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:hi});if(x)throw x;if(!p||!p.session||!p.user){const v=new Od;return this._returnResult({data:{user:null,session:null},error:v})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:x})}catch(p){if(et(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var n,r,a,i,o,l,c,u,d,h,f,m;let y,p;if("message"in t)y=t.message,p=t.signature;else{const{chain:x,wallet:v,statement:b,options:w}=t;let S;if(Xr())if(typeof v=="object")S=v;else{const N=window;if("solana"in N&&typeof N.solana=="object"&&("signIn"in N.solana&&typeof N.solana.signIn=="function"||"signMessage"in N.solana&&typeof N.solana.signMessage=="function"))S=N.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 v!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=v}const j=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const N=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),b?{statement:b}:null));let C;if(Array.isArray(N)&&N[0]&&typeof N[0]=="object")C=N[0];else if(N&&typeof N=="object"&&"signedMessage"in N&&"signature"in N)C=N;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)y=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),p=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${j.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(a=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...w.sign
706InWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
707`);const N=await S.signMessage(new TextEncoder().encode(y),"utf8");if(!N||!(N instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=N}}try{const{data:x,error:v}=await ft(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:bu(p)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:hi});if(v)throw v;if(!x||!x.session||!x.user){const b=new Od;return this._returnResult({data:{user:null,session:null},error:b})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:v})}catch(x){if(et(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await Jc(this.storage,`${this.storageKey}-code-verifier`),[r,a]=(n??"").split("/");try{const{data:i,error:o}=await ft(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:hi});if(await Cl(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const l=new Od;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:a??null}),error:o})}catch(i){if(et(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:a,access_token:i,nonce:o}=t,l=await ft(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:a,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:hi}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new Od;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(et(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,a,i,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Rd(this.storage,this.storageKey));const{error:h}=await ft(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ft(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(a=c==null?void 0:c.data)!==null&&a!==void 0?a:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Ev("You must provide either an email or phone number.")}catch(l){if(et(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var n,r;try{let a,i;"options"in t&&(a=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await ft(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:a,xform:hi});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(et(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithSSO(t){var n,r,a;try{let i=null,o=null;this.flowType==="pkce"&&([i,o]=await Rd(this.storage,this.storageKey));const l=await ft(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((a=t==null?void 0:t.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:$me});return this._returnResult(l)}catch(i){if(et(i))return this._returnResult({data:null,error:i});throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new di;const{error:a}=await ft(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:a})})}catch(t){if(et(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:a,options:i}=t,{error:o}=await ft(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:a,options:i}=t,{data:o,error:l}=await ft(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new Ev("You must provide either an email or phone number and a type")}catch(n){if(et(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Jc(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
707id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<mN:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Jc(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=yN()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=Ime(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:a},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await ft(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ql}):await this._useSession(async n=>{var r,a,i;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new di}:await ft(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(a=o.session)===null||a===void 0?void 0:a.access_token)!==null&&i!==void 0?i:void 0,xform:ql})})}catch(n){if(et(n))return hme(n)&&(await this._removeSession(),await Cl(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:a,error:i}=r;if(i)throw i;if(!a.session)throw new di;const o=a.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Rd(this.storage,this.storageKey));const{data:u,error:d}=await ft(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:ql});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(et(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new di;const n=Date.now()/1e3;let r=n,a=!0,i=null;const{payload:o}=gN(t.access_token);if(o.exp&&(r=o.exp,a=r<=n),a){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(et(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new di;const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):a?this._returnResult({data:{user:a.user,session:a},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(et(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!Xr())throw new kv("No browser detected.");
707if(t.error||t.error_description||t.error_code)throw new kv(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new QD("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new kv("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new QD("No code detected.");const{data:b,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:a,access_token:i,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!i||!l||!o||!u)throw new kv("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let f=d+h;c&&(f=parseInt(c));const m=f-d;m*1e3<=rh&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${h}s`);const y=f-h;d-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,d):d-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,d);const{data:p,error:x}=await this._getUser(i);if(x)throw x;const v={provider_token:r,provider_refresh_token:a,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(et(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Jc(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:a,error:i}=n;if(i)return this._returnResult({error:i});const o=(r=a.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(dme(l)&&(l.status===404||l.status===401||l.status===403)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await Cl(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=bme(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,a;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,a=null;this.flowType==="pkce"&&([r,a]=await Rd(this.storage,this.storageKey,!0));try{return await ft(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:a,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(et(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:a}=await this._useSession(async i=>{var o,l,c,u,d;const{data:h,error:f}=i;if(f)throw f;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ft(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(a)throw a;return Xr()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(et(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:a,data:{session:i}}=n;
707if(a)throw a;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,h=await ft(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:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:hi}),{data:f,error:m}=h;return m?this._returnResult({data:{user:null,session:null},error:m}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Od}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:m}))}catch(a){if(et(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,a;const{data:i,error:o}=n;if(o)throw o;return await ft(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(a=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&a!==void 0?a:void 0})})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await Nme(async a=>(a>0&&await jme(200*Math.pow(2,a-1)),this._debug(n,"refreshing attempt",a),await ft(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:hi})),(a,i)=>{const o=200*Math.pow(2,a);return i&&pN(i)&&Date.now()+o-r<rh})}catch(r){if(this._debug(n,"error",r),et(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Xr()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const a=await Jc(this.storage,this.storageKey);if(a&&this.userStorage){let o=await Jc(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:a.user},await sh(this.userStorage,this.storageKey+"-user",o)),a.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:yN()}else if(a&&!a.user&&!a.user){const o=await Jc(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(a.user=o.user,await Cl(this.storage,this.storageKey+"-user"),await sh(this.storage,this.storageKey,a)):a.user=yN()}if(this._debug(r,"session from storage",a),!this._isValidSession(a)){this._debug(r,"session is not valid"),a!==null&&await this._removeSession();return}const i=((n=a.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<mN;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${mN}s`),i){if(this.autoRefreshToken&&a.refresh_token){const{error:o}=await this._callRefreshToken(a.refresh_token);o&&(console.error(o),pN(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(a.access_token);!l&&(o!=null&&o.user)?(a.user=o.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):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",a)}catch(a){this._debug(r,"error",a),console.error(a);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new di;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new WS;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new di;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={data:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(a,"error",i),et(i)){const o={data:null,error:i};return pN(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(t,n,r=!0){const a=`#_notifyAllSubscribers(${t})`;this._debug(a,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(a,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await sh(this.userStorage,this.storageKey+"-user",{user:n.user});const a=Object.assign({},n);delete a.user;const i=n4(a);await sh(this.storage,this.storageKey,i)}else{const a=n4(n);await sh(this.storage,this.storageKey,a)}}async _removeSession(){this._debug("#_removeSession()"),await Cl(this.storage,this.storageKey),await Cl(this.storage,this.storageKey+"-code-verifier"),await Cl(this.storage,this.storageKey+"-user"),this.userStorage&&await Cl(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Xr()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
707catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),rh);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((r.expires_at*1e3-t)/rh);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${rh}ms, refresh threshold is ${QE} ticks`),a<=QE&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof uV)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Xr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const a=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&a.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&a.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Rd(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});a.push(l.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);a.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&a.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${a.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:a,error:i}=n;return i?this._returnResult({data:null,error:i}):await ft(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,a;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ft(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((a=c==null?void 0:c.totp)===null||a===void 0)&&a.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:a,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?epe(t.webauthn.credential_response):tpe(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ft(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(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:c}))})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:a,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await ft(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:l}=o;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:Zme(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:Jme(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const a={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])a.all.push(i),i.status==="verified"&&a[i.factor_type].push(i);return{data:a,error:null}}async _getAuthenticatorAssuranceLevel(){var t,n;const{data:{session:r},error:a}
707=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=gN(r.access_token);let o=null;i.aal&&(o=i.aal);let l=o;((n=(t=r.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(l="aal2");const u=i.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:a}=n;return a?this._returnResult({data:null,error:a}):r?await ft(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new di})})}catch(n){if(et(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:a},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new di});const o=await ft(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&Xr()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(et(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:a},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new di});const o=await ft(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&Xr()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(et(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const a=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+cme>a)return r;const{data:i,error:o}=await ft(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=a,r=i.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:m,error:y}
707=await this.getSession();if(y||!m.session)return this._returnResult({data:null,error:y});r=m.session.access_token}const{header:a,payload:i,signature:o,raw:{header:l,payload:c}}=gN(r);n!=null&&n.allowExpired||Ame(i.exp);const u=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:m}=await this.getUser(r);if(m)throw m;return{data:{claims:i,header:a,signature:o},error:null}}const d=Ome(a.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,xme(`${l}.${c}`)))throw new ek("Invalid JWT signature");return{data:{claims:i,header:a,signature:o},error:null}}catch(r){if(et(r))return this._returnResult({data:null,error:r});throw r}}}Fg.nextInstanceID={};const upe=Fg;class dpe extends upe{constructor(t){super(t)}}class hpe{constructor(t,n,r){var a,i,o;this.supabaseUrl=t,this.supabaseKey=n;const l=sme(t);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,u={db:Xfe,realtime:Zfe,auth:Object.assign(Object.assign({},Qfe),{storageKey:c}),global:Yfe},d=rme(r??{},u);this.storageKey=(a=d.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(h,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=tme(n,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new afe(new URL("rest/v1",l).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new Hfe(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new nfe(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t,n;if(this.accessToken)return await this.accessToken();const{data:r}=await this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:a,userStorage:i,storageKey:o,flowType:l,lock:c,debug:u,throwOnError:d},h,f){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new dpe({url:this.authUrl.href,headers:Object.assign(Object.assign({},m),h),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:a,userStorage:i,flowType:l,lock:c,debug:u,throwOnError:d,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new Sfe(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const fpe=(e,t,n)=>new hpe(e,t,n);function mpe(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}mpe()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
707ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ppe="https://wjqeqokemkpcmvuwwbqo.supabase.co",gpe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndqcWVxb2tlbWtwY212dXd3YnFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjI1ODUxMTQsImV4cCI6MjA3ODE2MTExNH0.gPQ9NDQmxCDiGIPkI7yFzbAA4IJNQBjHmGWuPTCZxTA",K=fpe(ppe,gpe,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),fV=g.createContext(void 0),Ie=()=>{const e=g.useContext(fV);if(e===void 0)throw console.error("useAuth called outside AuthProvider context"),new Error("useAuth must be used within an AuthProvider");return e},ype=({children:e})=>{const[t,n]=g.useState(null),[r,a]=g.useState(!0),[i,o]=g.useState(!1),[l,c]=g.useState(!1),[u,d]=g.useState(null),[h,f]=g.useState(0),[m,y]=g.useState(10),[p,x]=g.useState(0),[v,b]=g.useState(0),[w]=g.useState(5),[S]=g.useState(10),[j,N]=g.useState(0),[C,_]=g.useState(0),[A]=g.useState(50),[P,R]=g.useState(1e3),[I,B]=g.useState(0),[$,q]=g.useState(0),[L,k]=g.useState(0),[T,F]=g.useState(0),[O,E]=g.useState(!1),{toast:D}=Ve(),M=async J=>{try{const{data:oe,error:se}=await K.rpc("has_role",{_user_id:J,_role:"admin"});return se?(console.error("Error checking admin role:",se),!1):oe||!1}catch(oe){return console.error("Error checking admin role:",oe),!1}},X=async(J,oe,se)=>{if(t)try{await K.rpc("log_scraping_activity",{p_user_id:t.id,p_domain:J})}catch(je){console.error("Error logging scraping activity:",je)}},W=async(J,oe)=>{if(t)try{await K.rpc("log_company_view",{p_user_id:t.id,p_company_id:J})}catch(se){console.error("Error logging company view:",se)}},re=async()=>{if(t)try{console.log("Refreshing subscription status...");const{data:J,error:oe}=await K.functions.invoke("check-subscription");oe&&console.error("Error checking subscription:",oe);const{data:se,error:je}=await K.from("subscribers").select("*").eq("user_id",t.id).single();if(je){console.error("Error fetching subscriber data:",je);return}se&&(console.log("Subscriber data:",se),c(se.subscribed||!1),d(se.subscription_tier),f(se.usage_count||0),y(se.usage_limit||10),x(se.daily_scrapes_count||0),b(se.daily_profiles_viewed||0),se.subscribed&&!se.subscription_start_date&&await K.from("subscribers").update({subscription_start_date:new Date().toISOString()}).eq("user_id",t.id),R(se.monthly_matchmaking_limit||0),q(se.monthly_research_limit||0),F(se.monthly_slaygent_limit||0),B(se.monthly_research_count||0),k(se.monthly_slaygent_count||0));const{data:Ce,error:ut}=await K.from("matchmaking_usage").select("daily_count, monthly_count").eq("user_id",t.id).maybeSingle();!ut&&Ce?(N(Ce.daily_count||0),_(Ce.monthly_count||0)):(N(0),_(0));const Ze=await M(t.id);o(Ze)}catch(J){console.error("Error refreshing subscription:",J)}},ne=async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("check_matchmaking_limit",{p_user_id:t.id});return oe?(console.error("Error checking matchmaking limit:",oe),!1):J||!1}catch(J){return console.error("Error checking matchmaking limit:",J),!1}},le=async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("check_monthly_research_limit",{p_user_id:t.id});return oe?(console.error("Error checking monthly research limit:",oe),!1):J}catch(J){return console.error("Error checking monthly research limit:",J),!1}},ie=async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("increment_monthly_research",{p_user_id:t.id});return oe?(console.error("Error incrementing monthly research:",oe),!1):(J&&B(se=>se+1),J)}catch(J){return console.error("Error incrementing monthly research:",J),!1}},ye=async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("check_monthly_slaygent_limit",{p_user_id:t.id});return oe?(console.error("Error checking monthly Slaygent limit:",oe),!1):J}catch(J){return console.error("Error checking monthly Slaygent limit:",J),!1}},pe=async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("increment_monthly_slaygent",{p_user_id:t.id});return oe?(console.error("Error incrementing monthly Slaygent:",oe),!1):(J&&k(se
707=>se+1),J)}catch(J){return console.error("Error incrementing monthly Slaygent:",J),!1}};g.useEffect(()=>{K.auth.getSession().then(({data:{session:oe}})=>{n((oe==null?void 0:oe.user)??null),a(!1),E(!0)});const{data:{subscription:J}}=K.auth.onAuthStateChange(async(oe,se)=>{n((se==null?void 0:se.user)??null),a(!1),se!=null&&se.user&&oe==="SIGNED_IN"&&setTimeout(()=>{re()},1e3)});return()=>J.unsubscribe()},[]),g.useEffect(()=>{t?re():(c(!1),d(null),f(0),y(10),x(0),b(0),N(0),_(0),o(!1))},[t]);const Pe={user:t,loading:r,isAdmin:i,signIn:async(J,oe)=>{try{const{error:se}=await K.auth.signInWithPassword({email:J,password:oe});return D(se?{title:"Error signing in",description:se.message,variant:"destructive"}:{title:"Welcome back!",description:"You have been signed in successfully."}),{error:se}}catch(se){return console.error("Sign in error:",se),{error:se}}},signUp:async(J,oe,se)=>{try{const{error:je}=await K.auth.signUp({email:J,password:oe,options:{emailRedirectTo:`${window.location.origin}/`,data:{full_name:se}}});return D(je?{title:"Error creating account",description:je.message,variant:"destructive"}:{title:"Account created!",description:"Please check your email to verify your account."}),{error:je}}catch(je){return console.error("Sign up error:",je),{error:je}}},signOut:async()=>{try{await K.auth.signOut(),n(null),c(!1),d(null),f(0),y(10),x(0),b(0),N(0),_(0),o(!1),D({title:"Signed out successfully",description:"You have been logged out of your account."})}catch(J){console.error("Error signing out:",J),n(null),c(!1),d(null),f(0),y(10),x(0),b(0),N(0),_(0),o(!1),D({title:"Signed out successfully",description:"You have been logged out of your account."})}},subscribed:l,subscriptionTier:u,usageCount:h,usageLimit:m,dailyScrapes:p,dailyProfiles:v,dailyScrapeLimit:w,dailyProfileLimit:S,dailyMatchmaking:j,monthlyMatchmaking:C,dailyMatchmakingLimit:A,monthlyMatchmakingLimit:P,monthlyResearch:I,monthlyResearchLimit:$,monthlySlaygent:L,monthlySlaygentLimit:T,refreshSubscription:re,checkMatchmakingLimit:ne,checkMonthlyResearchLimit:le,incrementMonthlyResearch:ie,checkMonthlySlaygentLimit:ye,incrementMonthlySlaygent:pe,checkDailyScrapeLimit:async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("check_daily_scrape_limit",{p_user_id:t.id});return oe?(console.error("Error checking daily scrape limit:",oe),!1):J||!1}catch(J){return console.error("Error checking daily scrape limit:",J),!1}},incrementDailyScrapes:async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("increment_daily_scrapes",{p_user_id:t.id});return oe?(console.error("Error incrementing daily scrapes:",oe),!1):(await re(),J||!1)}catch(J){return console.error("Error incrementing daily scrapes:",J),!1}},checkDailyProfileLimit:async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("check_daily_profile_limit",{p_user_id:t.id});return oe?(console.error("Error checking daily profile limit:",oe),!1):J||!1}catch(J){return console.error("Error checking daily profile limit:",J),!1}},incrementDailyProfiles:async()=>{if(!t)return!1;try{const{data:J,error:oe}=await K.rpc("increment_daily_profiles",{p_user_id:t.id});return oe?(console.error("Error incrementing daily profiles:",oe),!1):(await re(),J||!1)}catch(J){return console.error("Error incrementing daily profiles:",J),!1}},createCheckoutSession:async J=>{var oe;if(!t)return D({title:"Authentication required",description:"Please sign in to subscribe.",variant:"destructive"}),null;try{console.log("Creating checkout session for price:",J),console.log("User authenticated:",{userId:t.id,email:t.email});const se=await K.auth.getSession();console.log("Current session available:",!!se.data.session);const{data:je,error:Ce}=await K.functions.invoke("create-checkout",{body:{priceId:J},headers:{Authorization:`Bearer ${(oe=se.data.session)==null?void 0:oe.access_token}`}});return console.log("Checkout function response:",{data:je,error:Ce}),Ce?(console.error("Detailed error from create-checkout:",Ce),D({title:"Error",description:`Failed to create checkout session: ${Ce.message||"Unknown error"}`,variant:"destructive"}),null):je!=null&&je.url?(console.log("Checkout session created successfully:",je.url),je.url):(console.error("No checkout URL returned:",je),D({title:"Error",description:"No checkout URL received from server.",variant:"destructive"}),null)}catch(se){return console.error("Error creating checkout session:",se),D({title:"Error",description:`Failed to create checkout session: ${se instanceof Error?se.message:"Unknown error"}`,variant:"destructive"}),null}},openCustomerPortal:async()=>{var J;if(!t)return D({title:"Authentication required",description:"Please sign in to manage your subscription.",variant:"destructive"}),null;try{console.log("Opening customer portal...");const{data:oe,error:se}=await K.functions.invoke("customer-portal",{headers:{Authorization:`Bearer ${(J=(await K.auth.getSession()).data.session)==null?void 0:J.access_token}`}});return se?(console.error("Error opening customer portal:",se),D({title:"Error",description:"Failed to open customer portal. Please try again.",variant:"destructive"}),null):oe.url}catch(oe){return console.error("Error opening customer portal:",oe),D({title:"Error",description:"Failed to open customer portal. Please try again.",variant:"destructive"}),null}},logScrapingActivity:X,logCompanyView:W,hasContactDirectory:()=>l?u==="growth"||u==="pro":!1,hasAIPitchGenerator:()=>l?u==="growth"||u==="pro":!1,hasAPIAccess:()=>l?u==="pro":!1,hasCSVExport:()=>l?u==="pro":!1,hasPrioritySupport:()=>l?u==="pro":!1,hasMatchmakingAccess:()=>l?u==="growth"||u==="pro":!1,hasAutoProspectingAccess:()=>l?u==="growth"||u==="pro":!1,getMonthlyResearchLimit:()=>l?u==="starter"?0:u==="growth"?200:u==="pro"?500:0:5,getMonthlySlaygentLimit:()=>l?u==="starter"?0:u==="growth"?200:u==="pro"?500:0:5,getMonthlyMatchmakingLimit:()=>!l||u==="starter"?0:u==="growth"?50:u==="pro"?200:0};return O?s.jsx(fV.Provider,{value:Pe,children:e}):s.jsx("div",{children:"Loading..."})},mV=g.createContext(null),us=()=>{const e=g.useContext(mV);if(!e)throw new Error("useProtection must be used within a ProtectionProvider");return e},xpe=({children:e})=>{const[t,n]=g.useState(0),[r,a]=g.useState(!1);g.useEffect(()=>{const l=sessionStorage.getItem("requestCount");l&&n(parseInt(l))},[]),g.useEffect(()=>{t>=5&&a(!0)},[t]);const i=()=>{const l=t+1;n(l),sessionStorage.setItem("requestCount",l.toString()),l===5&&Ra({title:"Limited Access",description:"Please provide your email to continue browsing companies.",variant:"destructive"})},o=()=>{n(0),sessionStorage.removeItem("requestCount"),a(!1)};return s.jsx(mV.Provider,{value:{requestCount:t,showEmailSignup:r,incrementRequestCount:i,resetRequestCount:o},children:e})},pV=g.createContext(void 0),vpe=()=>{const e=g.useContext(pV);if(!e)throw new Error("useOnboarding must be used within OnboardingProvider");return e},bpe=({children:e})=>{const{user:t,subscribed:n}=Ie(),[r,a]=g.useState([]),[i,o]=g.useState(null),[l,c]=g.useState(!0),[u,d]=g.useState(!1),h=[{id:"complete_profile",title:"Complete Your Profile",description:"Add your name and avatar to personalize your account",completed:!1,link:"/profile",tier:"free",icon:"👤"},{id:"browse_companies",title:"Browse Companies",description:"Explore our database of companies and their signals",completed:!1,link:"/companies",tier:"free",icon:"🏢"},{id:"save_company",title:"Save Your First Company",description:"Save a company to track for future opportunities",completed:!1,link:"/companies",tier:"free",icon:"⭐"},{id:"explore_signals",title:"Explore Signals",description:"Check out real-time signals from companies",completed:!1,link:"/signals",tier:"free",icon:"📡"},{id:"slaygent_chat",title:"Slaygent Chat",description:"Experience our AI-powered chat assistant",completed:!1,link:"/chat",tier:"free",icon:"💬"},{id:"view_signal_analytics",title:"View Signal Analytics Page",description:"Explore comprehensive signal analytics dashboard",completed:!1,link:"/signal-analytics",tier:"free",icon:"📈"}
707,{id:"view_pitch_analytics",title:"View Pitch Analytics Dashboard",description:"Discover service opportunities and market trends",completed:!1,link:"/pitch-analytics",tier:"free",icon:"📊"},{id:"subscribe_newsletter",title:"Subscribe to Newsletter",description:"Get weekly insights delivered to your inbox",completed:!1,link:"https://substack.com/@rohansinghio?utm_campaign=profile&utm_medium=slaygent.ai",tier:"free",icon:"📧"},{id:"do_research",title:"Do Brand Research",description:"Research a company domain for deep insights",completed:!1,link:"/scrape",tier:"paid",icon:"🔍"},{id:"setup_revenue_tracking",title:"Set Up Revenue Tracking",description:"Configure your deal size and goals to track pipeline value",completed:!1,link:"/profile?tab=revenue-insights",tier:"free",icon:"💰"},{id:"complete_matchmaking_profile",title:"Complete Matchmaking Profile",description:"Set up your ideal customer profile preferences",completed:!1,link:"/matchmaking",tier:"paid",icon:"🎯"},{id:"try_matchmaking",title:"Try Matchmaking",description:"Find companies that match your ideal customer profile",completed:!1,link:"/matchmaking",tier:"paid",icon:"🤝"},{id:"setup_byok",title:"Bring Your Own Key (BYOK)",description:"Configure your own API keys for enhanced features",completed:!1,link:"/profile?tab=settings",tier:"paid",icon:"🔑"},{id:"auto_prospecting",title:"Link to Auto Prospecting",description:"Set up automated prospecting workflows",completed:!1,link:"/profile?tab=auto-prospecting",tier:"paid",icon:"🚀"},{id:"export_data",title:"Export Data",description:"Export your saved companies to CSV or Google Sheets",completed:!1,link:"/saved-companies",tier:"paid",icon:"📤"}],f=async()=>{var w;if(!t){c(!1);return}try{const{data:S,error:j}=await K.from("onboarding_checklist").select("*").eq("user_id",t.id);if(j)throw j;const{data:N,error:C}=await K.from("onboarding_progress").select("*").eq("user_id",t.id).single();C&&console.error("Progress error:",C);const _=new Set(Array.isArray((w=S==null?void 0:S[0])==null?void 0:w.completed_tasks)?S[0].completed_tasks:[]),A=h.filter(R=>R.tier==="free"||n);await m(A,_);const P=A.map(R=>({...R,completed:_.has(R.id)}));a(P),N&&o({totalTasks:N.total_tasks||0,completedTasks:N.completed_tasks||0,completionPercentage:N.completion_percentage||0,milestone:"beginner",creditsAwarded:0,checklistCompleted:N.checklist_completed||!1}),c(!1)}catch(S){console.error("Error loading onboarding progress:",S),c(!1)}},m=async(w,S)=>{if(t)try{if(!S.has("complete_profile")){const{data:j}=await K.from("profiles").select("full_name").eq("id",t.id).single();j!=null&&j.full_name&&j.full_name.trim()!==""&&(await y("complete_profile"),S.add("complete_profile"))}if(!S.has("browse_companies")){const{data:j}=await K.from("company_views_logs").select("id").eq("user_id",t.id).limit(1);j&&j.length>0&&(await y("browse_companies"),S.add("browse_companies"))}if(!S.has("explore_signals")){const{data:j}=await K.from("signal_upvotes").select("id").eq("user_id",t.id).limit(1);j&&j.length>0&&(await y("explore_signals"),S.add("explore_signals"))}if(!S.has("save_company")){const{data:j}=await K.from("saved_companies").select("id").eq("user_id",t.id).limit(1);j&&j.length>0&&(await y("save_company"),S.add("save_company"))}if(!S.has("do_research")&&n){const{data:j}=await K.from("scraping_logs").select("id").eq("user_id",t.id).limit(1);j&&j.length>0&&(await y("do_research"),S.add("do_research"))}if(!S.has("try_matchmaking")&&n){const{data:j}=await K.from("company_matches").select("id").eq("user_id",t.id).limit(1);j&&j.length>
7070&&(await y("try_matchmaking"),S.add("try_matchmaking"))}}catch(j){console.error("Error auto-detecting tasks:",j)}},y=async w=>{if(t)try{const{data:S}=await K.from("onboarding_checklist").select("completed_tasks").eq("user_id",t.id).single(),j=Array.isArray(S==null?void 0:S.completed_tasks)?[...S.completed_tasks,w]:[w];await K.from("onboarding_checklist").upsert({user_id:t.id,completed_tasks:j},{onConflict:"user_id"})}catch(S){console.error("Error marking task complete:",S)}},p=async w=>{if(t)try{await y(w),Ae.success("Task completed!"),await b(),x()}catch(S){console.error("Error marking task complete:",S),Ae.error("Failed to mark task as complete")}},x=async()=>{if(!t||!i)return;const w=i.completedTasks+1,S=i.totalTasks;w===3&&i.milestone==="beginner"?await v(5,"explorer"):w===5&&i.milestone==="explorer"?await v(10,"pro_user"):w===S&&i.milestone==="pro_user"&&(await v(20,"master"),d(!0),Ae.success("🎉 Congratulations! You completed all onboarding tasks!"))},v=async(w,S)=>{if(t)try{console.log(`Would award ${w} credits for ${S}`),d(!0),Ae.success(`🎉 Milestone reached! +${w} free scrapes awarded!`)}catch(j){console.error("Error awarding credits:",j)}},b=async()=>{await f()};return g.useEffect(()=>{if(f(),t){const w=K.channel("onboarding-progress").on("postgres_changes",{event:"*",schema:"public",table:"onboarding_checklist",filter:`user_id=eq.${t.id}`},()=>{f()}).subscribe();return()=>{K.removeChannel(w)}}},[t,n]),s.jsx(pV.Provider,{value:{tasks:r,progress:i,loading:l,markTaskComplete:p,refreshProgress:b,showConfetti:u,setShowConfetti:d},children:e})},c4=[{code:"USD",symbol:"$",name:"US Dollar"},{code:"EUR",symbol:"€",name:"Euro"},{code:"GBP",symbol:"£",name:"British Pound"},{code:"INR",symbol:"₹",name:"Indian Rupee"},{code:"CAD",symbol:"CA$",name:"Canadian Dollar"},{code:"AUD",symbol:"A$",name:"Australian Dollar"},{code:"SGD",symbol:"S$",name:"Singapore Dollar"},{code:"CHF",symbol:"CHF",name:"Swiss Franc"},{code:"AED",symbol:"AED",name:"UAE Dirham"},{code:"JPY",symbol:"¥",name:"Japanese Yen"},{code:"KRW",symbol:"₩",name:"South Korean Won"},{code:"PHP",symbol:"₱",name:"Philippine Peso"},{code:"BRL",symbol:"R$",name:"Brazilian Real"},{code:"ZAR",symbol:"R",name:"South African Rand"},{code:"ILS",symbol:"₪",name:"Israeli Shekel"},{code:"NGN",symbol:"₦",name:"Nigerian Naira"},{code:"TRY",symbol:"TL",name:"Turkish Lira"},{code:"MXN",symbol:"MX$",name:"Mexican Peso"},{code:"CZK",symbol:"Kč",name:"Czech Koruna"},{code:"PLN",symbol:"zł",name:"Polish Złoty"},{code:"SEK",symbol:"kr",name:"Swedish Krona"},{code:"NOK",symbol:"kr",name:"Norwegian Krone"},{code:"DKK",symbol:"kr",name:"Danish Krone"},{code:"CUSTOM",symbol:"",name:"Custom Currency"}],rs=(e,t)=>`${t}${e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})}`,gV=e=>e<=50?{label:"Fresh",color:"text-green-600",message:"Build momentum by adding qualified prospects"}:e<=75?{label:"Active",color:"text-yellow-600",message:"Closing window approaching - nurture hot leads"}:e<=100?{label:"Urgent",color:"text-orange-600",message:"Time to finish strong and close deals"}:{label:"Expired",color:"text-blue-600",message:"Ready to refresh your pipeline?"},yV=g.createContext(void 0),wpe=({children:e})=>{const{user:t}=Ie(),[n,r]=g.useState(null),[a,i]=g.useState(null),[o,l]=g.useState(!0),c=g.useCallback(async()=>{if(!t){r(null),i(null),l(!1);return}try{const{data:x,error:v}=await K.from("revenue_settings").select("*").eq("user_id",t.id).single();if(v&&v.code!=="PGRST116")throw v;r(x)}catch(x){console.error("Error fetching revenue settings:",x)}finally{l(!1)}},[t]),u=g.useCallback(async()=>{if(!(!t||!n))try{const{data:x,error:v}=await K.rpc("calculate_pipeline_value",{p_user_id:t.id});if(v)throw v;i(x)}catch(x){console.error("Error fetching pipeline value:",x)}},[t,n]);g.useEffect(()=>{c()},[c]),g.useEffect(()=>{n&&u()},[n,u]);const d=async x=>{if(t)try{const{data:v}=await K.from("revenue_settings").select("id").eq("user_id",t.id).single();if(v){const{error:b}=await K.from("revenue_settings").update(x).eq("user_id",t.id);if(b)throw b}else{const{error:b}=await K.from("revenue_settings").insert({user_id:t.id,...x});if(b)throw b}await c(),await u(),Ae.success("Revenue settings updated successfully")}catch(v){throw console.error("Error updating revenue settings:",v),Ae.error("Failed to update revenue settings"),v}},h=async()=>{await u()},f=async x=>{if(!t)return{success:!1,action:x,error:"User not authenticated"};try{const{data:v,error:b}=await K.rpc("refresh_sales_cycle",{p_user_id:t.id,p_action:x});if(b)throw b;return await c(),await u(),v}catch(v){return console.error("Error refreshing cycle:",v),{success:!1,action:x,error:"Failed to refresh cycle"}}},m=x=>{if(!n)return 0;const v=n.average_deal_size;return x?x>=80?v*1.2:x>=60?v:v*.8:v},y=(x,v)=>{if(!n)return;const b=rs(x,n.currency_symbol),w=v==="add"?`Added ${b} to your pipeline`:`Removed ${b} from your pipeline`;Ae.success(w,{duration:3e3,icon:v==="add"?"💰":"📉"})},p=!!n;return s.jsx(yV.Provider,{value:{settings:n,pipelineValue:a,loading:o,updateSettings:d,refreshPipeline:h,refreshCycle:f,calculateDealValue:m,showRevenueToast:y,hasSettings:p},children:e})},gm=()=>{const e=g.useContext(yV);if(e===void 0)throw new Error("useRevenue must be used within a RevenueProvider");return e},mO=g.createContext({});function pO(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const gO=typeof window<"u",xV=gO?g.useLayoutEffect:g.useEffect,VS=g.createContext(null);function yO(e,t){e.indexOf(t)===-1&&e.push(t)}function xO(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const il=(e,t,n)=>n>t?t:n<e?e:n;let O0=()=>{};const ol={},vV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function bV(e){return typeof e=="object"&&e!==null}const wV=e=>/^0[^.\s]+$/u.test(e);function vO(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xa=e=>e,Spe=(e,t)=>n=>t(e(n)),ax=(...e)=>
vendor: 22,667 bytes, line 707
707e.reduce(Spe),Bg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class bO{constructor(){this.subscriptions=[]}add(t){return yO(this.subscriptions,t),()=>xO(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i<a;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const uo=e=>e*1e3,ho=e=>e/1e3;function SV(e,t){return t?e*(1e3/t):0}const jV=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jpe=1e-7,Npe=12;function _pe(e,t,n,r,a){let i,o,l=0;do o=t+(n-t)/2,i=jV(o,r,a)-e,i>0?n=o:t=o;while(Math.abs(i)>jpe&&++l<Npe);return o}function ix(e,t,n,r){if(e===t&&n===r)return Xa;const a=i=>_pe(i,0,1,e,n);return i=>i===0||i===1?i:jV(a(i),t,r)}const NV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_V=e=>t=>1-e(1-t),CV=ix(.33,1.53,.69,.99),wO=_V(CV),EV=NV(wO),kV=e=>(e*=2)<1?.5*wO(e):.5*(2-Math.pow(2,-10*(e-1))),SO=e=>1-Math.sin(Math.acos(e)),PV=_V(SO),TV=NV(SO),Cpe=ix(.42,0,1,1),Epe=ix(0,0,.58,1),AV=ix(.42,0,.58,1),kpe=e=>Array.isArray(e)&&typeof e[0]!="number",OV=e=>Array.isArray(e)&&typeof e[0]=="number",u4={linear:Xa,easeIn:Cpe,easeInOut:AV,easeOut:Epe,circIn:SO,circInOut:TV,circOut:PV,backIn:wO,backInOut:EV,backOut:CV,anticipate:kV},Ppe=e=>typeof e=="string",d4=e=>{if(OV(e)){O0(e.length===4);const[t,n,r,a]=e;return ix(t,n,r,a)}else if(Ppe(e))return O0(u4[e]!==void 0),u4[e];return e},Pv=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],h4={value:null,addProjectionMetrics:null};function Tpe(e,t){let n=new Set,r=new Set,a=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,f=!1,m=!1)=>{const p=m&&a?n:r;return f&&o.add(h),p.has(h)||p.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(l=h,a){i=!0;return}a=!0,[n,r]=[r,n],n.forEach(u),t&&h4.value&&h4.value.frameloop[t].push(c),c=0,n.clear(),a=!1,i&&(i=!1,d.process(h))}};return d}const Ape=40;function RV(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Pv.reduce((w,S)=>(w[S]=Tpe(i,t?S:void 0),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:m,postRender:y}=o,p=()=>{const w=ol.useManualTiming?a.timestamp:performance.now();n=!1,ol.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(w-a.timestamp,Ape),1)),a.timestamp=w,a.isProcessing=!0,l.process(a),c.process(a),u.process(a),d.process(a),h.process(a),f.process(a),m.process(a),y.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},x=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:Pv.reduce((w,S)=>{const j=o[S];return w[S]=(N,C=!1,_=!1)=>(n||x(),j.schedule(N,C,_)),w},{}),cancel:w=>{for(let S=0;S<Pv.length;S++)o[Pv[S]].cancel(w)},state:a,steps:o}}const{schedule:qn,cancel:kc,state:Mr,steps:vN}=RV(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xa,!0);let Lb;function Ope(){Lb=void 0}const Ls={now:()=>(Lb===void 0&&Ls.set(Mr.isProcessing||ol.useManualTiming?Mr.timestamp:performance.now()),Lb),set:e=>{Lb=e,queueMicrotask(Ope)}},IV=e=>t=>typeof t=="string"&&t.startsWith(e),jO=IV("--"),Rpe=IV("var(--"),NO=e=>Rpe(e)?Ipe.test(e.split("/*")[0].trim()):!1,Ipe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ym={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},zg={...ym,transform:e=>il(0,1,e)},Tv={...ym,default:1},Hp=e=>Math.round(e*1e5)/1e5,_O=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Mpe(e){return e==null}const Dpe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,CO=(e,t)=>n=>!!(typeof n=="string"&&Dpe.test(n)&&n.startsWith(e)||t&&!Mpe(n)&&Object.prototype.hasOwnProperty.call(n,t)),MV=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,o,l]=r.match(_O);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Lpe=e=>il(0,255,e),bN={...ym,transform:e=>Math.round(Lpe(e))},wu={test:CO("rgb","red"),parse:MV("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+bN.transform(e)+", "+bN.transform(t)+", "+bN.transform(n)+", "+Hp(zg.transform(r))+")"};function $pe(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const tk={test:CO("#"),parse:$pe,transform:wu.transform},ox=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Tl=ox("deg"),fo=ox("%"),mt=ox("px"),Fpe=ox("vh"),Bpe=ox("vw"),f4={...fo,parse:e=>fo.parse(e)/100,transform:e=>fo.transform(e*100)},bh={test:CO("hsl","hue"),parse:MV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fo.transform(Hp(t))+", "+fo.transform(Hp(n))+", "+Hp(zg.transform(r))+")"},Zr={test:e=>wu.test(e)||tk.test(e)||bh.test(e),parse:e=>wu.test(e)?wu.parse(e):bh.test(e)?bh.parse(e):tk.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wu.transform(e):bh.transform(e)},zpe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Upe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(_O))==null?void 0:t.length)||0)+(((n=e.match(zpe))==null?void 0:n.length)||0)>0}const DV="number",LV="color",qpe="var",Wpe="var(",m4="${}",Vpe=/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 Ug(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const l=t.replace(Vpe,c=>(Zr.test(c)?(r.color.push(i),a.push(LV),n.push(Zr.parse(c))):c.startsWith(Wpe)?(r.var.push(i),a.push(qpe),n.push(c)):(r.number.push(i),a.push(DV),n.push(parseFloat(c))),++i,m4)).split(m4);return{values:n,split:l,indexes:r,types:a}}function $V(e){return Ug(e).values}function FV(e){const{split:t,types:n}=Ug(e),r=t.length;return a=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],a[o]!==void 0){const l=n[o];l===DV?i+=Hp(a[o]):l===LV?i+=Zr.transform(a[o]):i+=a[o]}return i}}const Hpe=e=>typeof e=="number"?0:e;function Gpe(e){const t=$V(e);return FV(e)(t.map(Hpe))}const Pc={test:Upe,parse:$V,createTransformer:FV,getAnimatableNone:Gpe};function wN(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Kpe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,o=0;if(!t)a=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;a=wN(c,l,e+1/3),i=wN(c,l,e),o=wN(c,l,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function R0(e,t){return n=>n>0?t:e}const Bn=(e,t,n)=>e+(t-e)*n,SN=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},Ype=[tk,wu,bh],Xpe=e=>Ype.find(t=>t.test(e));function p4(e){const t=Xpe(e);if(!t)return!1;let n=t.parse(e);return t===bh&&(n=Kpe(n)),n}const g4=(e,t)=>{const n=p4(e),r=p4(t);if(!n||!r)return R0(e,t);const a={...n};return i=>(a.red=SN(n.red,r.red,i),a.green=SN(n.green,r.green,i),a.blue=SN(n.blue,r.blue,i),a.alpha=Bn(n.alpha,r.alpha,i),wu.transform(a))},nk=new Set(["none","hidden"]);function Qpe(e,t){return nk.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zpe(e,t){return n=>Bn(e,t,n)}function EO(e){return typeof e=="number"?Zpe:typeof e=="string"?NO(e)?R0:Zr.test(e)?g4:tge:Array.isArray(e)?BV:typeof e=="object"?Zr.test(e)?g4:Jpe:R0}function BV(e,t){const n=[...e],r=n.length,a=e.map((i,o)=>EO(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=a[o](i);return n}}function Jpe(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=EO(e[a])(e[a],t[a]));return a=>{for(const i in r)n[i]=r[i](a);return n}}function ege(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const i=t.types[a],o=e.indexes[i][r[i]],l=e.values[o]??0;n[a]=l,r[i]++}return n}const tge=(e,t)=>{const n=Pc.createTransformer(t),r=Ug(e),a=Ug(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?nk.has(e)&&!a.values.length||nk.has(t)&&!r.values.length?Qpe(e,t):ax(BV(ege(r,a),a.values),n):R0(e,t)};function zV(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Bn(e,t,n):EO(e)(e,t)}const nge=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>qn.update(t,n),stop:()=>kc(t),now:()=>Mr.isProcessing?Mr.timestamp:Ls.now()}},UV=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)r+=e(i/(a-1))+", ";return`linear(${r.substring(0,r.length-2)})`},I0=2e4;function kO(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<I0;)t+=n,r=e.next(t);return t>=I0?1/0:t}function rge(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(kO(r),I0);return{type:"keyframes",ease:i=>r.next(a*i).value/t,duration:ho(a)}}const sge=5;function qV(e,t,n){const r=Math.max(t-sge,0);return SV(n-e(r),t-r)}const Gn={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},jN=.001;function age({duration:e=Gn.duration,bounce:t=Gn.bounce,velocity:n=Gn.velocity,mass:r=Gn.mass}){let a,i,o=1-t;o=il(Gn.minDamping,Gn.maxDamping,o),e=il(Gn.minDuration,Gn.maxDuration,ho(e)),o<1?(a=u=>{const d=u*o,h=d*e,f=d-n,m=rk(u,o),y=Math.exp(-h);return jN-f/m*y},i=u=>{const h=u*o*e,f=h*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-h),p=rk(Math.pow(u,2),o);return(-a(u)+jN>0?-1:1)*((f-m)*y)/p}):(a=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-jN+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=oge(a,i,l);if(e=uo(e),isNaN(c))return{stiffness:Gn.stiffness,damping:Gn.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const ige=12;function oge(e,t,n){let r=n;for(let a=1;a<ige;a++)r=r-e(r)/t(r);return r}function rk(e,t){return e*Math.sqrt(1-t*t)}const lge=["duration","bounce"],cge=["stiffness","damping","mass"];function y4(e,t){return t.some(n=>e[n]!==void 0)}function uge(e){let t={velocity:Gn.velocity,stiffness:Gn.stiffness,damping:Gn.damping,mass:Gn.mass,isResolvedFromDuration:!1,...e};if(!y4(e,cge)&&y4(e,lge))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*il(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:Gn.mass,stiffness:a,damping:i}}else{const n=age(e);t={...t,...n,mass:Gn.mass},t.isResolvedFromDuration=!0}return t}function M0(e=Gn.visualDuration,t=Gn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:m}=uge({...n,velocity:-ho(n.velocity||0)}),y=f||0,p=u/(2*Math.sqrt(c*d)),x=o-i,v=ho(Math.sqrt(c/d)),b=Math.abs(x)<5;r||(r=b?Gn.restSpeed.granular:Gn.restSpeed.default),a||(a=b?Gn.restDelta.granular:Gn.restDelta.default);let w;if(p<1){const j=rk(v,p);w=N=>{const C=Math.exp(-p*v*N);return o-C*((y+p*v*x)/j*Math.sin(j*N)+x*Math.cos(j*N))}}else if(p===1)w=j=>o-Math.exp(-v*j)*(x+(y+v*x)*j);else{const j=v*Math.sqrt(p*p-1);w=N=>{const C=Math.exp(-p*v*N),_=Math.min(j*N,300);return o-C*((y+p*v*x)*Math.sinh(_)+j*x*Math.cosh(_))/j}}const S={calculatedDuration:m&&h||null,next:j=>{const N=w(j);if(m)l.done=j>=h;else{let C=j===0?y:0;p<1&&(C=j===0?uo(y):qV(w,j,N));const _=Math.abs(C)<=r,A=Math.abs(o-N)<=a;l.done=_&&A}return l.value=l.done?o:N,l},toString:()=>{const j=Math.min(kO(S),I0),N=UV(C=>S.next(j*C).value,j,30);return j+"ms "+N},toTransition:()=>{}};return S}M0.applyToOptions=e=>{const t=rge(e,100,M0);return e.ease=t.ease,e.duration=uo(t.duration),e.type="keyframes",e};function sk({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},m=_=>l!==void 0&&_<l||c!==void 0&&_>c,y=_=>l===void 0?c:c===void 0||Math.abs(l-_)<Math.abs(c-_)?l:c;let p=n*t;const x=h+p,v=o===void 0?x:o(x);v!==x&&(p=v-h);const b=_=>-p*Math.exp(-_/r),w=_=>v+b(_),S=_=>{const A=b(_),P=w(_);f.done=Math.abs(A)<=u,f.value=f.done?v:P};let j,N;const C=_=>{m(f.value)&&(j=_,N=M0({keyframes:[f.value,y(f.value)],velocity:qV(w,_,f.value),damping:a,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:_=>{let A=!1;return!N&&j===void 0&&(A=!0,S(_),C(_)),j!==void 0&&_>=j?N.next(_-j):(!A&&S(_),f)}}}function dge(e,t,n){const r=[],a=n||ol.mix||zV,i=e.length-1;for(let o=0;o<i;o++){let l=a(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Xa:t;l=ax(c,l)}r.push(l)}return r}function hge(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(O0(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=dge(t,r,a),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=Bg(e[h],e[h+1],d);return l[h](f)};return n?d=>u(il(e[0],e[i-1],d)):u}function fge(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Bg(0,t,r);e.push(Bn(n,1,a))}}function mge(e){const t=[0];return fge(t,e.length-1),t}function pge(e,t){return e.map(n=>n*t)}function gge(e,t){return e.map(()=>t||AV).splice(0,e.length-1)}function Gp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=kpe(r)?r.map(d4):d4(r),i={done:!1,value:t[0]},o=pge(n&&n.length===t.length?n:mge(t),e),l=hge(o,t,{ease:Array.isArray(a)?a:gge(t,a)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const yge=e=>e!==null;function PO(e,{repeat:t,repeatType:n="loop"},r,a=1){const i=e.filter(yge),l=a<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const xge={decay:sk,inertia:sk,tween:Gp,keyframes:Gp,spring:M0};function WV(e){typeof e.type=="string"&&(e.type=xge[e.type])}class TO{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const vge=e=>e/100;class AO extends TO{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,a;const{motionValue:n}=this.options;n&&n.updatedAt!==Ls.now()&&this.tick(Ls.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;WV(t);const{type:n=Gp,repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const c=n||Gp;c!==Gp&&typeof l[0]!="number"&&(this.mixKeyframes=ax(vge,zV(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=kO(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:m,type:y,onUpdate:p,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>a;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let w=this.currentTime,S=r;if(h){const _=Math.min(this.currentTime,a)/l;let A=Math.floor(_),P=_%1;!P&&_>=1&&(P=1),P===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(f==="reverse"?(P=1-P,m&&(P-=m/l)):f==="mirror"&&(S=o)),w=il(0,1,P)*l}const j=b?{done:!1,value:d[0]}:S.next(w);i&&(j.value=i(j.value));let{done:N}=j;!b&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return C&&y!==sk&&(j.value=PO(d,this.options,x,this.speed)),p&&p(j.value),C&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return ho(this.calculatedDuration)}get time(){return ho(this.currentTime)}set time(t){var n;t=uo(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ls.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ho(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=nge,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(a=this.options).onPlay)==null||i.call(a);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(Ls.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function bge(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Su=e=>e*180/Math.PI,ak=e=>{const t=Su(Math.atan2(e[1],e[0]));return ik(t)},wge={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ak,rotateZ:ak,skewX:e=>Su(Math.atan(e[1])),skewY:e=>Su(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ik=e=>(e=e%360,e<0&&(e+=360),e),x4=ak,v4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),b4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Sge={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:v4,scaleY:b4,scale:e=>(v4(e)+b4(e))/2,rotateX:e=>ik(Su(Math.atan2(e[6],e[5]))),rotateY:e=>ik(Su(Math.atan2(-e[2],e[0]))),rotateZ:x4,rotate:x4,skewX:e=>Su(Math.atan(e[4])),skewY:e=>Su(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ok(e){return e.includes("scale")?1:0}function lk(e,t){if(!e||e==="none")return ok(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=Sge,a=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=wge,a=l}if(!a)return ok(t);const i=r[t],o=a[1].split(",").map(Nge);return typeof i=="function"?i(o):o[i]}const jge=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return lk(n,t)};function Nge(e){return parseFloat(e.trim())}const xm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vm=new Set(xm),w4=e=>e===ym||e===mt,_ge=new Set(["x","y","z"]),Cge=xm.filter(e=>!_ge.has(e));function Ege(e){const t=[];return Cge.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Lu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>lk(t,"x"),y:(e,{transform:t})=>lk(t,"y")};Lu.translateX=Lu.x;Lu.translateY=Lu.y;const $u=new Set;let ck=!1,uk=!1,dk=!1;function VV(){if(uk){const e=Array.from($u).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=Ege(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uk=!1,ck=!1,$u.forEach(e=>e.complete(dk)),$u.clear()}function HV(){$u.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uk=!0)})}function kge(){dk=!0,HV(),VV(),dk=!1}class OO{constructor(t,n,r,a,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?($u.add(this),ck||(ck=!0,qn.read(HV),qn.resolveKeyframes(VV))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),a&&i===void 0&&a.set(t[0])}bge(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$u.delete(this)}cancel(){this.state==="scheduled"&&($u.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Pge=e=>e.startsWith("--");function Tge(e,t,n){Pge(t)?e.style.setProperty(t,n):e.style[t]=n}const Age=vO(()=>window.ScrollTimeline!==void 0),Oge={};function Rge(e,t){const n=vO(e);return()=>Oge[t]??n()}const GV=Rge(()=>{try{document.createElement("div").animate({opacity:0}
707,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,S4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kp([0,.65,.55,1]),circOut:kp([.55,0,1,.45]),backIn:kp([.31,.01,.66,-.59]),backOut:kp([.33,1.53,.69,.99])};function KV(e,t){if(e)return typeof e=="function"?GV()?UV(e,t):"ease-out":OV(e)?kp(e):Array.isArray(e)?e.map(n=>KV(n,t)||S4.easeOut):S4[e]}function Ige(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=KV(l,a);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:a,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function YV(e){return typeof e=="function"&&"applyToOptions"in e}function Mge({type:e,...t}){return YV(e)&&GV()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dge extends TO{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,O0(typeof t.type!="string");const u=Mge(t);this.animation=Ige(n,r,a,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=PO(a,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):Tge(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ho(Number(t))}get time(){return ho(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=uo(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Age()?(this.animation.timeline=t,Xa):n(this)}}const XV={anticipate:kV,backInOut:EV,circInOut:TV};function Lge(e){return e in XV}function $ge(e){typeof e.ease=="string"&&Lge(e.ease)&&(e.ease=XV[e.ease])}const j4=10;class Fge extends Dge{constructor(t){$ge(t),WV(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new AO({...o,autoplay:!1}),c=uo(this.finishedTime??this.time);n.setWithVelocity(l.sample(c-j4).value,l.sample(c).value,j4),l.stop()}}const N4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Pc.test(e)||e==="0")&&!e.startsWith("url("));function Bge(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zge(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=N4(a,t),l=N4(i,t);return!o||!l?!1:Bge(e)||(n==="spring"||YV(n))&&r}function RO(e){return bV(e)&&"offsetHeight"in e}const Uge=new Set(["opacity","clipPath","filter","transform"]),qge=vO(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wge(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:i,type:o}=e;if(!RO((u=t==null?void 0:t.owner)==null?void 0:u.current))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return qge()&&n&&Uge.has(n)&&(n!=="transform"||!c)&&!l&&!r&&a!=="mirror"&&i!==0&&o!=="inertia"}const Vge=40;class Hge extends TO{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:
707o="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var y;super(),this.stop=()=>{var p,x;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ls.now();const f={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||OO;this.keyframeResolver=new m(l,(p,x,v)=>this.onKeyframesResolved(p,x,f,!v),c,u,d),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Ls.now(),zge(t,i,o,l)||((ol.instantAnimations||!c)&&(d==null||d(PO(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const f={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>Vge?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!u&&Wge(f)?new Fge({...f,element:f.motionValue.owner.current}):new AO(f);m.finished.then(()=>this.notifyFinished()).catch(Xa),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(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),kge()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Gge=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Kge(e){const t=Gge.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function QV(e,t,n=1){const[r,a]=Kge(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return vV(o)?parseFloat(o):o}return NO(a)?QV(a,t,n+1):a}function IO(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ZV=new Set(["width","height","top","left","right","bottom",...xm]),Yge={test:e=>e==="auto",parse:e=>e},JV=e=>t=>t.test(e),e7=[ym,mt,fo,Tl,Bpe,Fpe,Yge],_4=e=>e7.find(JV(e));function Xge(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wV(e):!0}const Qge=new Set(["brightness","contrast","saturate","opacity"]);function Zge(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_O)||[];if(!r)return e;const a=n.replace(r,"");let i=Qge.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const Jge=/\b([a-z-]*)\(.*?\)/gu,hk={...Pc,getAnimatableNone:e=>{const t=e.match(Jge);return t?t.map(Zge).join(" "):e}},C4={...ym,transform:Math.round},eye={rotate:Tl,rotateX:Tl,rotateY:Tl,rotateZ:Tl,scale:Tv,scaleX:Tv,scaleY:Tv,scaleZ:Tv,skew:Tl,skewX:Tl,skewY:Tl,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:zg,originX:f4,originY:f4,originZ:mt},MO={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,backgroundPositionX:mt,backgroundPositionY:mt,...eye,zIndex:C4,fillOpacity:zg,strokeOpacity:zg,numOctaves:C4},tye={...MO,color:Zr,backgroundColor:Zr,outlineColor:Zr,fill:Zr,stroke:Zr,borderColor:Zr,borderTopColor:Zr,borderRightColor:Zr,borderBottomColor:Zr,borderLeftColor:Zr,filter:hk,WebkitFilter:hk},t7=e=>tye[e];function n7(e,t){let n=t7(e);return n!==hk&&(n=Pc),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
vendor: 13,379 bytes, lines 707-715
707const nye=new Set(["auto","none","0"]);function rye(e,t,n){let r=0,a;for(;r<e.length&&!a;){const i=e[r];typeof i=="string"&&!nye.has(i)&&Ug(i).values.length&&(a=e[r]),r++}if(a&&n)for(const i of t)e[i]=n7(n,a)}class sye extends OO{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),NO(u))){const d=QV(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ZV.has(r)||t.length!==2)return;const[a,i]=t,o=_4(a),l=_4(i);if(o!==l)if(w4(o)&&w4(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else Lu[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||Xge(t[a]))&&r.push(a);r.length&&rye(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lu[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Lu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function r7(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const a=document.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const s7=(e,t)=>t&&typeof e=="number"?t.transform(e):e,E4=30,aye=e=>!isNaN(parseFloat(e));class iye{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{var o,l;const i=Ls.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((l=this.events.renderRequest)==null||l.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ls.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aye(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new bO);const r=this.events[t].add(n);return t==="change"?()=>{r(),qn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ls.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>E4)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,E4);return SV(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bf(e,t){return new iye(e,t)}const{schedule:DO,cancel:eht}=RV(queueMicrotask,!1),fi={x:!1,y:!1};function a7(){return fi.x||fi.y}function oye(e){return e==="x"||e==="y"?fi[e]?null:(fi[e]=!0,()=>{fi[e]=!1}):fi.x||fi.y?null:(fi.x=fi.y=!0,()=>{fi.x=fi.y=!1})}function i7(e,t){const n=r7(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function k4(e){return!(e.pointerType==="touch"||a7())}function lye(e,t,n={}){const[r,a,i]=i7(e,n),o=l=>{if(!k4(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=h=>{k4(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,a)};return r.forEach(l=>{l.addEventListener("pointerenter",o,a)}),i}const o7=(e,t)=>t?e===t?!0:o7(e,t.parentElement):!1,LO=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,cye=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function uye(e){return cye.has(e.tagName)||e.tabIndex!==-1}const $b=new WeakSet;function P4(e){return t=>{t.key==="Enter"&&e(t)}}function NN(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const dye=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=P4(()=>{if($b.has(n))return;NN(n,"down");const a=P4(()=>{NN(n,"up")}),i=()=>NN(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function T4(e){return LO(e)&&!a7()}function hye(e,t,n={}){const[r,a,i]=i7(e,n),o=l=>{const c=l.currentTarget;if(!T4(l))return;$b.add(c);const u=t(c,l),d=(m,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),$b.has(c)&&$b.delete(c),T4(m)&&typeof u=="function"&&u(m,{success:y})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||o7(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,a),window.addEventListener("pointercancel",f,a)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,a),RO(l)&&(l.addEventListener("focus",u=>dye(u,a)),!uye(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function l7(e){return bV(e)&&"ownerSVGElement"in e}function fye(e){return l7(e)&&e.tagName==="svg"}const ss=e=>!!(e&&e.getVelocity),mye=[...e7,Zr,Pc],pye=e=>mye.find(JV(e)),$O=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class gye extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,a=RO(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=a-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function yye({children:e,isPresent:t,anchorX:n}){const r=g.useId(),a=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=g.useContext($O);return g.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:d,right:h}=i.current;if(t||!a.current||!l||!c)return;const f=n==="left"?`left: ${d}`:`right: ${h}`;a.current.dataset.motionPopId=r;const m=document.createElement("style");return o&&(m.nonce=o),document.head.appendChild(m),m.sheet&&m.sheet.insertRule(`
708          [data-motion-pop-id="${r}"] {
709            position: absolute !important;
710            width: ${l}px !important;
711            height: ${c}px !important;
712            ${f}px !important;
713            top: ${u}px !important;
714          }
715        `),()=>{document.head.contains(m)&&document.head.removeChild(m)}},[t]),s.jsx(gye,{isPresent:t,childRef:a,sizeRef:i,children:g.cloneElement(e,{ref:a})})}const xye=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:o,anchorX:l})=>{const c=pO(vye),u=g.useId();let d=!0,h=g.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:a,onExitComplete:f=>{c.set(f,!0);for(const m of c.values())if(!m)return;r&&r()},register:f=>(c.set(f,!1),()=>c.delete(f))}),[n,c,r]);return i&&d&&(h={...h}),g.useMemo(()=>{c.forEach((f,m)=>c.set(m,!1))},[n]),g.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),o==="popLayout"&&(e=s.jsx(yye,{isPresent:n,anchorX:l,children:e})),s.jsx(VS.Provider,{value:h,children:e})};function vye(){return new Map}function c7(e=!0){const t=g.useContext(VS);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=g.useId();g.useEffect(()=>{if(e)return a(i)},[e]);const o=g.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Av=e=>e.key||"";function A4(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const fk=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:o=!1,anchorX:l="left"})=>{const[c,u]=c7(o),d=g.useMemo(()=>A4(e),[e]),h=o&&!c?[]:d.map(Av),f=g.useRef(!0),m=g.useRef(d),y=pO(()=>new Map),[p,x]=g.useState(d),[v,b]=g.useState(d);xV(()=>{f.current=!1,m.current=d;for(let j=0;j<v.length;j++){const N=Av(v[j]);h.includes(N)?y.delete(N):y.get(N)!==!0&&y.set(N,!1)}},[v,h.length,h.join("-")]);const w=[];if(d!==p){let j=[...d];for(let N=0;N<v.length;N++){const C=v[N],_=Av(C);h.includes(_)||(j.splice(N,0,C),w.push(C))}return i==="wait"&&w.length&&(j=w),b(A4(j)),x(d),null}const{forceRender:S}=g.useContext(mO);return s.jsx(s.Fragment,{children:v.map(j=>{const N=Av(j),C=o&&!c?!1:d===v||h.includes(N),_=()=>{if(y.has(N))y.set(N,!0);else return;let A=!0;y.forEach(P=>{P||(A=!1)}),A&&(S==null||S(),b(m.current),o&&(u==null||u()),r&&r())};return s.jsx(xye,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:i,onExitComplete:C?void 0:_,anchorX:l,children:j},N)})})},u7=g.createContext({strict:!1}),O4={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"]},wf={};for(const e in O4)wf[e]={isEnabled:t=>O4[e].some(n=>!!t[n])};function bye(e){for(const t in e)wf[t]={...wf[t],...e[t]}}const wye=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","ignoreStrict","viewport"]);function D0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wye.has(e)}let d7=e=>!D0(e);function Sye(e){e&&(d7=t=>t.startsWith("on")?!D0(t):e(t))}try{Sye(require("@emotion/is-prop-valid").default)}catch{}function jye(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(d7(a)||n===!0&&D0(a)||!t&&!D0(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function Nye(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const HS=g.createContext({});function GS(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qg(e){return typeof e=="string"||Array.isArray(e)}const FO=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],BO=["initial",...FO];function KS(e){return GS(e.animate)||BO.some(t=>qg(e[t]))}function h7(e){return!!(KS(e)||e.variants)}function _ye(e,t){if(KS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qg(n)?n:void 0,animate:qg(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cye(e){const{initial:t,animate:n}=_ye(e,g.useContext(HS));return g.useMemo(()=>({initial:t,animate:n}),[R4(t),R4(n)])}function R4(e){return Array.isArray(e)?e.join(" "):e}const Eye=Symbol.for("motionComponentSymbol");function wh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kye(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):wh(n)&&(n.current=r))},[t])}const zO=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Pye="framerAppearId",f7="data-"+zO(Pye),m7=g.createContext({});function Tye(e,t,n,r,a){var p,x;const{visualElement:i}=g.useContext(HS),o=g.useContext(u7),l=g.useContext(VS),c=g.useContext($O).reducedMotion,u=g.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 47,848 bytes, line 715
715));const d=u.current,h=g.useContext(m7);d&&!d.projection&&a&&(d.type==="html"||d.type==="svg")&&Aye(u.current,n,a,h);const f=g.useRef(!1);g.useInsertionEffect(()=>{d&&f.current&&d.update(n,l)});const m=n[f7],y=g.useRef(!!m&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,m))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,m)));return xV(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),DO.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),g.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,m)}),y.current=!1))}),d}function Aye(e,t,n,r){const{layoutId:a,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:p7(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||l&&wh(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function p7(e){if(e)return e.options.allowProjection!==!1?e.projection:p7(e.parent)}function Oye({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&bye(e);function i(l,c){let u;const d={...g.useContext($O),...l,layoutId:Rye(l)},{isStatic:h}=d,f=Cye(l),m=r(l,h);if(!h&&gO){Iye();const y=Mye(d);u=y.MeasureLayout,f.visualElement=Tye(a,m,d,t,y.ProjectionNode)}return s.jsxs(HS.Provider,{value:f,children:[u&&f.visualElement?s.jsx(u,{visualElement:f.visualElement,...d}):null,n(a,l,kye(m,f.visualElement,c),m,h,f.visualElement)]})}i.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const o=g.forwardRef(i);return o[Eye]=a,o}function Rye({layoutId:e}){const t=g.useContext(mO).id;return t&&e!==void 0?t+"-"+e:e}function Iye(e,t){g.useContext(u7).strict}function Mye(e){const{drag:t,layout:n}=wf;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Wg={};function Dye(e){for(const t in e)Wg[t]=e[t],jO(t)&&(Wg[t].isCSSVariable=!0)}function g7(e,{layout:t,layoutId:n}){return vm.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Wg[e]||e==="opacity")}const Lye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$ye=xm.length;function Fye(e,t,n){let r="",a=!0;for(let i=0;i<$ye;i++){const o=xm[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=s7(l,MO[o]);if(!c){a=!1;const d=Lye[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function UO(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(vm.has(c)){o=!0;continue}else if(jO(c)){a[c]=u;continue}else{const d=s7(u,MO[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=Fye(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const qO=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function y7(e,t,n){for(const r in t)!ss(t[r])&&!g7(r,n)&&(e[r]=t[r])}function Bye({transformTemplate:e},t){return g.useMemo(()=>{const n=qO();return UO(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zye(e,t){const n=e.style||{},r={};return y7(r,n,e),Object.assign(r,Bye(e,t)),r}function Uye(e,t){const n={},r=zye(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const qye={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wye={offset:"strokeDashoffset",array:"strokeDasharray"};function Vye(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?qye:Wye;e[i.offset]=mt.transform(-r);const o=mt.transform(t),l=mt.transform(n);e[i.array]=`${o} ${l}`}function x7(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:o=0,...l},c,u,d){if(UO(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&Vye(h,a,i,o,!1)}const v7=()=>({...qO(),attrs:{}}),b7=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Hye(e,t,n,r){const a=g.useMemo(()=>{const i=v7();return x7(i,t,b7(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};y7(i,e.style,e),a.style={...i,...a.style}}return a}const Gye=["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 WO(e){return typeof e!="string"||e.includes("-")?!1:!!(Gye.indexOf(e)>-1||/[A-Z]/u.test(e))}function Kye(e=!1){return(n,r,a,{latestValues:i},o)=>{const c=(WO(n)?Hye:Uye)(r,i,o,n),u=jye(r,typeof n=="string",e),d=n!==g.Fragment?{...u,...c,ref:a}:{},{children:h}=r,f=g.useMemo(()=>ss(h)?h.get():h,[h]);return g.createElement(n,{...d,children:f})}}function I4(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function VO(e,t,n,r){if(typeof t=="function"){const[a,i]=I4(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=I4(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Fb(e){return ss(e)?e.get():e}function Yye({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:Xye(n,r,a,e),renderState:t()}}const w7=e=>(t,n)=>{const r=g.useContext(HS),a=g.useContext(VS),i=()=>Yye(e,t,r,a);return n?i():pO(i)};function Xye(e,t,n,r){const a={},i=r(e,{});for(const f in i)a[f]=Fb(i[f]);let{initial:o,animate:l}=e;const c=KS(e),u=h7(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!GS(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const y=VO(e,f[m]);if(y){const{transitionEnd:p,transition:x,...v}=y;for(const b in v){let w=v[b];if(Array.isArray(w)){const S=d?w.length-1:0;w=w[S]}w!==null&&(a[b]=w)}for(const b in p)a[b]=p[b]}}}return a}function HO(e,t,n){var i;const{style:r}=e,a={};for(const o in r)(ss(r[o])||t.style&&ss(t.style[o])||g7(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(a[o]=r[o]);return a}const Qye={useVisualState:w7({scrapeMotionValuesFromProps:HO,createRenderState:qO})};function S7(e,t,n){const r=HO(e,t,n);for(const a in e)if(ss(e[a])||ss(t[a])){const i=xm.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}const Zye={useVisualState:w7({scrapeMotionValuesFromProps:S7,createRenderState:v7})};function Jye(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const o={...WO(r)?Zye:Qye,preloadedFeatures:e,useRender:Kye(a),createVisualElement:t,Component:r};return Oye(o)}}function Vg(e,t,n){const r=e.getProps();return VO(r,t,n!==void 0?n:r.custom,e)}const mk=e=>Array.isArray(e);function exe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bf(n))}function txe(e){return mk(e)?e[e.length-1]||0:e}function nxe(e,t){const n=Vg(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const o in i){const l=txe(i[o]);exe(e,o,l)}}function rxe(e){return!!(ss(e)&&e.add)}function pk(e,t){const n=e.getValue("willChange");if(rxe(n))return n.add(t);if(!n&&ol.WillChange){const r=new ol.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function j7(e){return e.props[f7]}const sxe=e=>e!==null;function axe(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(sxe),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const ixe={type:"spring",stiffness:500,damping:25,restSpeed:10},oxe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lxe={type:"keyframes",duration:.8},cxe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uxe=(e,{keyframes:t})=>t.length>2?lxe:vm.has(e)?e.startsWith("scale")?oxe(t[1]):ixe:cxe;function dxe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const GO=(e,t,n,r={},a,i)=>o=>{const l=IO(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-uo(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:a};dxe(l)||Object.assign(d,uxe(e,d)),d.duration&&(d.duration=uo(d.duration)),d.repeatDelay&&(d.repeatDelay=uo(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),(ol.instantAnimations||ol.skipAnimations)&&(h=!0,d.duration=0,d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!i&&t.get()!==void 0){const f=axe(d.keyframes,l);if(f!==void 0){qn.update(()=>{d.onUpdate(f),d.onComplete()});return}}return l.isSync?new AO(d):new Hge(d)};function hxe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function N7(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(i=r);const c=[],u=a&&e.animationState&&e.animationState.getState()[a];for(const d in l){const h=e.getValue(d,e.latestValues[d]??null),f=l[d];if(f===void 0||u&&hxe(u,d))continue;const m={delay:n,...IO(i||{},d)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===y&&!m.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const v=j7(e);if(v){const b=window.MotionHandoffAnimation(v,d,qn);b!==null&&(m.startTime=b,p=!0)}}pk(e,d),h.start(GO(d,h,f,e.shouldReduceMotion&&ZV.has(d)?{type:!1}:m,e,p));const x=h.animation;x&&c.push(x)}return o&&Promise.all(c).then(()=>{qn.update(()=>{o&&nxe(e,o)})}),c}function gk(e,t,n={}){var c;const r=Vg(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const i=r?()=>Promise.all(N7(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=a;return fxe(e,t,d+u,h,f,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[u,d]=l==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function fxe(e,t,n=0,r=0,a=1,i){const o=[],l=(e.variantChildren.size-1)*r,c=a===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(mxe).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(gk(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function mxe(e,t){return e.sortNodePosition(t)}function pxe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>gk(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=gk(e,t,n);else{const a=typeof t=="function"?Vg(e,t,n.custom):t;r=Promise.all(N7(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function _7(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const gxe=BO.length;function C7(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?C7(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<gxe;n++){const r=BO[n],a=e.props[r];(qg(a)||a===!1)&&(t[r]=a)}return t}const yxe=[...FO].reverse(),xxe=FO.length;function vxe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>pxe(e,n,r)))}function bxe(e){let t=vxe(e),n=M4(),r=!0;const a=c=>(u,d)=>{var f;const h=Vg(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:y,...p}=h;u={...u,...p,...y}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,d=C7(e.parent)||{},h=[],f=new Set;let m={},y=1/0;for(let x=0;x<xxe;x++){const v=yxe[x],b=n[v],w=u[v]!==void 0?u[v]:d[v],S=qg(w),j=v===c?b.isActive:null;j===!1&&(y=x);let N=w===d[v]&&w!==u[v]&&S;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),b.protectedKeys={...m},!b.isActive&&j===null||!w&&!b.prevProp||GS(w)||typeof w=="boolean")continue;const C=wxe(b.prevProp,w);let _=C||v===c&&b.isActive&&!N&&S||x>y&&S,A=!1;const P=Array.isArray(w)?w:[w];let R=P.reduce(a(v),{});j===!1&&(R={});const{prevResolvedValues:I={}}=b,B={...I,...R},$=k=>{_=!0,f.has(k)&&(A=!0,f.delete(k)),b.needsAnimating[k]=!0;const T=e.getValue(k);T&&(T.liveStyle=!1)};for(const k in B){const T=R[k],F=I[k];if(m.hasOwnProperty(k))continue;let O=!1;mk(T)&&mk(F)?O=!_7(T,F):O=T!==F,O?T!=null?$(k):f.add(k):T!==void 0&&f.has(k)?$(k):b.protectedKeys[k]=!0}b.prevProp=w,b.prevResolvedValues=R,b.isActive&&(m={...m,...R}),r&&e.blockInitialAnimation&&(_=!1),_&&(!(N&&C)||A)&&h.push(...P.map(k=>({animation:k,options:{type:v}})))}if(f.size){const x={};if(typeof u.initial!="boolean"){const v=Vg(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),x[v]=b??null}),h.push({animation:x})}let p=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=M4(),r=!0}}}function wxe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!_7(t,e):!1}function eu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function M4(){return{animate:eu(!0),whileInView:eu(),whileHover:eu(),whileTap:eu(),whileDrag:eu(),whileFocus:eu(),exit:eu()}}class zc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Sxe extends zc{constructor(t){super(t),t.animationState||(t.animationState=bxe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();GS(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let jxe=0;class Nxe extends zc{constructor(){super(...arguments),this.id=jxe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const _xe={animation:{Feature:Sxe},exit:{Feature:Nxe}};function Hg(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function lx(e){return{point:{x:e.pageX,y:e.pageY}}}const Cxe=e=>t=>LO(t)&&e(t,lx(t));function Kp(e,t,n,r){return Hg(e,t,Cxe(n),r)}function E7({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Exe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kxe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const k7=1e-4,Pxe=1-k7,Txe=1+k7,P7=.01,Axe=0-P7,Oxe=0+P7;function bs(e){return e.max-e.min}function Rxe(e,t,n){return Math.abs(e-t)<=n}function D4(e,t,n,r=.5){e.origin=r,e.originPoint=Bn(t.min,t.max,e.origin),e.scale=bs(n)/bs(t),e.translate=Bn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Pxe&&e.scale<=Txe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Axe&&e.translate<=Oxe||isNaN(e.translate))&&(e.translate=0)}function Yp(e,t,n,r){D4(e.x,t.x,n.x,r?r.originX:void 0),D4(e.y,t.y,n.y,r?r.originY:void 0)}function L4(e,t,n){e.min=n.min+t.min,e.max=e.min+bs(t)}function Ixe(e,t,n){L4(e.x,t.x,n.x),L4(e.y,t.y,n.y)}function $4(e,t,n){e.min=t.min-n.min,e.max=e.min+bs(t)}function Xp(e,t,n){$4(e.x,t.x,n.x),$4(e.y,t.y,n.y)}const F4=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sh=()=>({x:F4(),y:F4()}),B4=()=>({min:0,max:0}),Qn=()=>({x:B4(),y:B4()});function Ia(e){return[e("x"),e("y")]}function _N(e){return e===void 0||e===1}function yk({scale:e,scaleX:t,scaleY:n}){return!_N(e)||!_N(t)||!_N(n)}function lu(e){return yk(e)||T7(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function T7(e){return z4(e.x)||z4(e.y)}function z4(e){return e&&e!=="0%"}function L0(e,t,n){const r=e-n,a=t*r;return n+a}function U4(e,t,n,r,a){return a!==void 0&&(e=L0(e,a,r)),L0(e,n,r)+t}function xk(e,t=0,n=1,r,a){e.min=U4(e.min,t,n,r,a),e.max=U4(e.max,t,n,r,a)}function A7(e,{x:t,y:n}){xk(e.x,t.translate,t.scale,t.originPoint),xk(e.y,n.translate,n.scale,n.originPoint)}const q4=.999999999999,W4=1.0000000000001;function Mxe(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,o;for(let l=0;l<a;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Nh(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,A7(e,o)),r&&lu(i.latestValues)&&Nh(e,i.latestValues))}t.x<W4&&t.x>q4&&(t.x=1),t.y<W4&&t.y>q4&&(t.y=1)}function jh(e,t){e.min=e.min+t,e.max=e.max+t}function V4(e,t,n,r,a=.5){const i=Bn(e.min,e.max,a);xk(e,t,n,i,r)}function Nh(e,t){V4(e.x,t.x,t.scaleX,t.scale,t.originX),V4(e.y,t.y,t.scaleY,t.scale,t.originY)}function O7(e,t){return E7(kxe(e.getBoundingClientRect(),t))}function Dxe(e,t,n){const r=O7(e,n),{scroll:a}=t;return a&&(jh(r.x,a.offset.x),jh(r.y,a.offset.y)),r}const R7=({current:e})=>e?e.ownerDocument.defaultView:null,H4=(e,t)=>Math.abs(e-t);function Lxe(e,t){const n=H4(e.x,t.x),r=H4(e.y,t.y);return Math.sqrt(n**2+r**2)}class I7{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=EN(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=Lxe(h.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:y}=h,{timestamp:p}=Mr;this.history.push({...y,timestamp:p});const{onStart:x,onMove:v}=this.handlers;f||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=CN(f,this.transformPagePoint),qn.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=EN(h.type==="pointercancel"?this.lastMoveEventInfo:CN(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),y&&y(h,x)},!LO(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const o=lx(t),l=CN(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=Mr;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,EN(l,this.history)),this.removeListeners=ax(Kp(this.contextWindow,"pointermove",this.handlePointerMove),Kp(this.contextWindow,"pointerup",this.handlePointerUp),Kp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kc(this.updatePoint)}}function CN(e,t){return t?{point:t(e.point)}:e}function G4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function EN({point:e},t){return{point:e,delta:G4(e,M7(t)),offset:G4(e,$xe(t)),velocity:Fxe(t,.1)}}function $xe(e){return e[0]}function M7(e){return e[e.length-1]}function Fxe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=M7(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>uo(t)));)n--;if(!r)return{x:0,y:0};const i=ho(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Bxe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Bn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Bn(n,e,r.max):Math.min(e,n)),e}function K4(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zxe(e,{top:t,left:n,bottom:r,right:a}){return{x:K4(e.x,n,a),y:K4(e.y,t,r)}}function Y4(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Uxe(e,t){return{x:Y4(e.x,t.x),y:Y4(e.y,t.y)}}function qxe(e,t){let n=.5;const r=bs(e),a=bs(t);return a>r?n=Bg(t.min,t.max-r,e.min):r>a&&(n=Bg(e.min,e.max-a,t.min)),il(0,1,n)}function Wxe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vk=.35;function Vxe(e=vk){return e===!1?e=0:e===!0&&(e=vk),{x:X4(e,"left","right"),y:X4(e,"top","bottom")}}function X4(e,t,n){return{min:Q4(e,t),max:Q4(e,n)}}function Q4(e,t){return typeof e=="number"?e:e[t]||0}const Hxe=new WeakMap;class Gxe{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Qn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(lx(d).point)},i=(d,h)=>{const{drag:f,dragPropagation:m,onDragStart:y}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oye(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ia(x=>{let v=this.getAxisMotionValue(x).get()||0;if(fo.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[x];w&&(v=bs(w)*(parseFloat(v)/100))}}this.originPoint[x]=v}),y&&qn.postRender(()=>y(d,h)),pk(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(d,h)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:y,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=h;if(m&&this.currentDirection===null){this.currentDirection=Kxe(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),p&&p(d,h)},l=(d,h)=>this.stop(d,h),c=()=>Ia(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new I7(t,{onSessionStart:a,onStart:i,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:R7(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&qn.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Ov(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Bxe(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,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,a=this.constraints;t&&wh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zxe(r.layoutBox,t):this.constraints=!1,this.elastic=Vxe(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ia(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Wxe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wh(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=Dxe(r,a.root,this.visualElement.getTransformPagePoint());let o=Uxe(a.layout.layoutBox,i);if(n){const l=n(Exe(o));this.hasMutatedConstraints=!!l,l&&(o=E7(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ia(d=>{if(!Ov(d,n,this.currentDirection))return;let h=c&&c[d]||{};o&&(h={min:0,max:0});const f=a?200:1e6,m=a?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pk(this.visualElement,t),r.start(GO(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ia(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ia(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ia(n=>{const{drag:r}=this.getProps();if(!Ov(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:o,max:l}=a.layout.layoutBox[n];i.set(t[n]-Bn(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wh(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Ia(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();a[o]=qxe({min:c,max:c},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.resolveConstraints(),Ia(o=>{if(!Ov(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(Bn(c,u,a[o]))})}addListeners(){if(!this.visualElement.current)return;Hxe.set(this.visualElement,this);const t=this.visualElement.current,n=Kp(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();wh(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),qn.read(r);const o=Hg(window,"resize",()=>this.scalePositionWithinConstraints()),l=a.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ia(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:o=vk,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Ov(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kxe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Yxe extends zc{constructor(t){super(t),this.removeGroupControls=Xa,this.removeListeners=Xa,this.controls=new Gxe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xa}unmount(){this.removeGroupControls(),this.removeListeners()}}const Z4=e=>(t,n)=>{e&&qn.postRender(()=>e(t,n))};class Xxe extends zc{constructor(){super(...arguments),this.removePointerDownListener=Xa}onPointerDown(t){this.session=new I7(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:R7(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:Z4(t),onStart:Z4(n),onMove:r,onEnd:(i,o)=>{delete this.session,a&&qn.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=Kp(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Bb={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function J4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ep={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(mt.test(e))e=parseFloat(e);else return e;const n=J4(e,t.target.x),r=J4(e,t.target.y);return`${n}% ${r}%`}},Qxe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Pc.parse(e);if(a.length>5)return r;const i=Pc.createTransformer(e),o=typeof a[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;a[0+o]/=l,a[1+o]/=c;const u=Bn(l,c,.5);return typeof a[2+o]=="number"&&(a[2+o]/=u),typeof a[3+o]=="number"&&(a[3+o]/=u),i(a)}};class Zxe extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;Dye(Jxe),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Bb.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,a||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||qn.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),DO.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function D7(e){const[t,n]=c7(),r=g.useContext(mO);return s.jsx(Zxe,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(m7),isPresent:t,safeToRemove:n})}const Jxe={borderRadius:{...ep,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ep,borderTopRightRadius:ep,borderBottomLeftRadius:ep,borderBottomRightRadius:ep,boxShadow:Qxe};function eve(e,t,n){const r=ss(e)?e:bf(e);return r.start(GO("",r,t,n)),r.animation}const tve=(e,t)=>e.depth-t.depth;class nve{constructor(){this.children=[],this.isDirty=!1}add(t){yO(this.children,t),this.isDirty=!0}remove(t){xO(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tve),this.isDirty=!1,this.children.forEach(t)}}function rve(e,t){const n=Ls.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(kc(r),e(i-t))};return qn.setup(r,!0),()=>kc(r)}const L7=["TopLeft","TopRight","BottomLeft","BottomRight"],sve=L7.length,eL=e=>typeof e=="string"?parseFloat(e):e,tL=e=>typeof e=="number"||mt.test(e);function ave(e,t,n,r,a,i){a?(e.opacity=Bn(0,n.opacity??1,ive(r)),e.opacityExit=Bn(t.opacity??1,0,ove(r))):i&&(e.opacity=Bn(t.opacity??1,n.opacity??1,r));for(let o=0;o<sve;o++){const l=`border${L7[o]}Radius`;let c=nL(t,l),u=nL(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||tL(c)===tL(u)?(e[l]=Math.max(Bn(eL(c),eL(u),r),0),(fo.test(u)||fo.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Bn(t.rotate||0,n.rotate||0,r))}function nL(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ive=$7(0,.5,PV),ove=$7(.5,.95,Xa);function $7(e,t,n){return r=>r<e?0:r>t?1:n(Bg(e,t,r))}function rL(e,t){e.min=t.min,e.max=t.max}function Pa(e,t){rL(e.x,t.x),rL(e.y,t.y)}function sL(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function aL(e,t,n,r,a){return e-=t,e=L0(e,1/n,r),a!==void 0&&(e=L0(e,1/a,r)),e}function lve(e,t=0,n=1,r=.5,a,i=e,o=e){if(fo.test(t)&&(t=parseFloat(t),t=Bn(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Bn(i.min,i.max,r);e===i&&(l-=t),e.min=aL(e.min,t,n,l,a),e.max=aL(e.max,t,n,l,a)}function iL(e,t,[n,r,a],i,o){lve(e,t[n],t[r],t[a],t.scale,i,o)}const cve=["x","scaleX","originX"],uve=["y","scaleY","originY"];function oL(e,t,n,r){iL(e.x,t,cve,n?n.x:void 0,r?r.x:void 0),iL(e.y,t,uve,n?n.y:void 0,r?r.y:void 0)}function lL(e){return e.translate===0&&e.scale===1}function F7(e){return lL(e.x)&&lL(e.y)}function cL(e,t){return e.min===t.min&&e.max===t.max}function dve(e,t){return cL(e.x,t.x)&&cL(e.y,t.y)}function uL(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function B7(e,t){return uL(e.x,t.x)&&uL(e.y,t.y)}function dL(e){return bs(e.x)/bs(e.y)}function hL(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hve{constructor(){this.members=[]}add(t){yO(this.members,t),t.scheduleRender()}remove(t){if(xO(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fve(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((a||i||o)&&(r=`translate3d(${a}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:m,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const kN=["","X","Y","Z"],mve={visibility:"hidden"},pve=1e3;let gve=0;function PN(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function z7(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=j7(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",qn,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&z7(r)}function U7({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(o={},l=t==null?void 0:t()){this.id=gve++,this.animationId=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.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(vve),this.nodes.forEach(Nve),this.nodes.forEach(_ve),this.nodes.forEach(bve)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new nve)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bO),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=l7(o)&&!fye(o),this.instance=o;const{layoutId:l,layout:c,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&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=rve(h,250),Bb.hasAnimatedSinceResize&&(Bb.hasAnimatedSinceResize=!1,this.nodes.forEach(mL))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||Tve,{onLayoutAnimationStart:p,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!B7(this.targetLayout,m),b=!h&&f;if(this.options.layoutRoot||this.resumeFrom||b||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...IO(y,"layout"),onPlay:p,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,b)}else h||mL(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(),kc(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(Cve),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&&z7(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)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(fL);return}this.isUpdating||this.nodes.forEach(Sve),this.isUpdating=!1,this.nodes.forEach(jve),this.nodes.forEach(yve),this.nodes.forEach(xve),this.clearAllSnapshots();const l=Ls.now();Mr.delta=il(0,1e3/60,l-Mr.timestamp),Mr.timestamp=l,Mr.isProcessing=!0,vN.update.process(Mr),vN.preRender.process(Mr),vN.render.process(Mr),Mr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,DO.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wve),this.sharedNodes.forEach(Eve)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,qn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){qn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bs(this.snapshot.measuredBox.x)&&!bs(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Qn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!F7(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||lu(this.latestValues)||d)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),Ave(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Qn();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Ove))){const{scroll:d}=this.root;d&&(jh(l.x,d.offset.x),jh(l.y,d.offset.y))}return l}removeElementScroll(o){var c;const l=Qn();if(Pa(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Pa(l,o),jh(l.x,h.offset.x),jh(l.y,h.offset.y))}return l}applyTransform(o,l=!1){const c=Qn();Pa(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Nh(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),lu(d.latestValues)&&Nh(c,d.latestValues)}return lu(this.latestValues)&&Nh(c,this.latestValues),c}removeTransform(o){const l=Qn();Pa(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!lu(u.latestValues))continue;yk(u.latestValues)&&u.updateSnapshot();const d=Qn(),h=u.measurePageBox();Pa(d,h),oL(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return lu(this.latestValues)&&oL(l,this.latestValues),l}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!==Mr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=Mr.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Qn(),this.relativeTargetOrigin=Qn(),Xp(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),Pa(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Qn(),this.targetWithTransforms=Qn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ixe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pa(this.target,this.layout.layoutBox),A7(this.target,this.targetDelta)):Pa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Qn(),this.relativeTargetOrigin=Qn(),Xp(this.relativeTargetOrigin,this.target,m.target),Pa(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||yk(this.parent.latestValues)||T7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&
vendor: 4,154 bytes, line 715
715(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mr.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;Pa(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Mxe(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Qn());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sL(this.prevProjectionDelta.x,this.projectionDelta.x),sL(this.prevProjectionDelta.y,this.projectionDelta.y)),Yp(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!hL(this.projectionDelta.x,this.prevProjectionDelta.x)||!hL(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sh(),this.projectionDelta=Sh(),this.projectionDeltaWithTransform=Sh()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Sh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Qn(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,p=m!==y,x=this.getStack(),v=!x||x.members.length<=1,b=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(Pve));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const j=S/1e3;pL(h.x,o.x,j),pL(h.y,o.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xp(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kve(this.relativeTarget,this.relativeTargetOrigin,f,j),w&&dve(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Qn()),Pa(w,this.relativeTarget)),p&&(this.animationValues=d,ave(d,u,this.latestValues,j,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(kc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=qn.update(()=>{Bb.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=bf(0)),this.currentAnimation=eve(this.motionValue,[0,1e3],{...o,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},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(pve),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&q7(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Qn();const h=bs(this.layout.layoutBox.x);
vendor: 18,903 bytes, line 715
715c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=bs(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}Pa(l,c),Nh(l,d),Yp(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new hve),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&PN("z",o,u,this.animationValues);for(let d=0;d<kN.length;d++)PN(`rotate${kN[d]}`,o,u,this.animationValues),PN(`skew${kN[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return mve;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Fb(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Fb(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!lu(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=fve(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:h,y:f}=this.projectionDelta;l.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Wg){if(d[m]===void 0)continue;const{correct:y,applyTo:p,isCSSVariable:x}=Wg[m],v=l.transform==="none"?d[m]:y(d[m],u);if(p){const b=p.length;for(let w=0;w<b;w++)l[p[w]]=v}else x?this.options.visualElement.renderState.vars[m]=v:l[m]=v}return this.options.layoutId&&(l.pointerEvents=u===this?Fb(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(fL),this.root.sharedNodes.clear()}}}function yve(e){e.updateLayout()}function xve(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Ia(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=bs(f);f.min=r[h].min,f.max=f.min+m}):q7(i,t.layoutBox,r)&&Ia(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=bs(r[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Sh();Yp(l,r,t.layoutBox);const c=Sh();o?Yp(c,e.applyTransform(a,!0),t.measuredBox):Yp(c,r,t.layoutBox);const u=!F7(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const y=Qn();Xp(y,t.layoutBox,f.layoutBox);const p=Qn();Xp(p,r,m.layoutBox),B7(y,p)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vve(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function bve(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wve(e){e.clearSnapshot()}function fL(e){e.clearMeasurements()}function Sve(e){e.isLayoutDirty=!1}function jve(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function mL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Nve(e){e.resolveTargetDelta()}function _ve(e){e.calcProjection()}function Cve(e){e.resetSkewAndRotation()}function Eve(e){e.removeLeadSnapshot()}function pL(e,t,n){e.translate=Bn(t.translate,0,n),e.scale=Bn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gL(e,t,n,r){e.min=Bn(t.min,n.min,r),e.max=Bn(t.max,n.max,r)}function kve(e,t,n,r){gL(e.x,t.x,n.x,r),gL(e.y,t.y,n.y,r)}function Pve(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Tve={duration:.45,ease:[.4,0,.1,1]},yL=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),xL=yL("applewebkit/")&&!yL("chrome/")?Math.round:Xa;function vL(e){e.min=xL(e.min),e.max=xL(e.max)}function Ave(e){vL(e.x),vL(e.y)}function q7(e,t,n){return e==="position"||e==="preserve-aspect"&&!Rxe(dL(t),dL(n),.2)}function Ove(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Rve=U7({attachResizeListener:(e,t)=>Hg(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),TN={current:void 0},W7=U7({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!TN.current){const e=new Rve({});e.mount(window),e.setOptions({layoutScroll:!0}),TN.current=e}return TN.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ive={pan:{Feature:Xxe},drag:{Feature:Yxe,ProjectionNode:W7,MeasureLayout:D7}};function bL(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&qn.postRender(()=>i(t,lx(t)))}class Mve extends zc{mount(){const{current:t}=this.node;t&&(this.unmount=lye(t,(n,r)=>(bL(this.node,r,"Start"),a=>bL(this.node,a,"End"))))}unmount(){}}class Dve extends zc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ax(Hg(this.node.current,"focus",()=>this.onFocus()),Hg(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wL(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&qn.postRender(()=>i(t,lx(t)))}class Lve extends zc{mount(){const{current:t}=this.node;t&&(this.unmount=hye(t,(n,r)=>(wL(this.node,r,"Start"),(a,{success:i})=>wL(this.node,a,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bk=new WeakMap,AN=new WeakMap,$ve=e=>{const t=bk.get(e.target);t&&t(e)},Fve=e=>{e.forEach($ve)};function Bve({root:e,...t}){const n=e||document;AN.has(n)||AN.set(n,{});const r=AN.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(Fve,{root:e,...t})),r[a]}function zve(e,t,n){const r=Bve(t);return bk.set(e,n),r.observe(e),()=>{bk.delete(e),r.unobserve(e)}}const Uve={some:0,all:1};class qve extends zc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:Uve[a]},l=c=>{const{isIntersecting:u}=c;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:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return zve(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Wve(t,n))&&this.startObserver()}unmount(){}}function Wve({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Vve={inView:{Feature:qve},tap:{Feature:Lve},focus:{Feature:Dve},hover:{Feature:Mve}},Hve={layout:{ProjectionNode:W7,MeasureLayout:D7}},wk={current:null},V7={current:!1};function Gve(){if(V7.current=!0,!!gO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>wk.current=e.matches;e.addListener(t),t()}else wk.current=!1}const Kve=new WeakMap;function Yve(e,t,n){for(const r in t){const a=t[r],i=n[r];if(ss(a))e.addValue(r,a);else if(ss(i))e.addValue(r,bf(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(r);e.addValue(r,bf(o!==void 0?o:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const SL=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xve{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=OO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 f=Ls.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,qn.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=KS(n),this.isVariantNode=h7(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const m=h[f];c[f]!==void 0&&ss(m)&&m.set(c[f],!1)}}mount(t){this.current=t,Kve.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),V7.current||Gve(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:wk.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),kc(this.notifyUpdate),kc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=vm.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&qn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in wf){const n=wf[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];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):Qn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<SL.length;r++){const a=SL[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,o=t[i];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=Yve(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=bf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(vV(r)||wV(r))?r=parseFloat(r):!pye(r)&&Pc.test(n)&&(r=n7(t,n)),this.setBaseTarget(t,ss(r)?r.get():r)),ss(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=VO(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ss(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bO),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class H7 extends Xve{constructor(){super(...arguments),this.KeyframeResolver=sye}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ss(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function G7(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function Qve(e){return window.getComputedStyle(e)}class Zve extends H7{constructor(){super(...arguments),this.type="html",this.renderInstance=G7}readValueFromInstance(t,n){var r;if(vm.has(n))return(r=this.projection)!=null&&r.isProjecting?ok(n):jge(t,n);{const a=Qve(t),i=(jO(n)?a.getPropertyValue(n):a[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return O7(t,n)}build(t,n,r){UO(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return HO(t,n,r)}}const K7=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"]);function Jve(e,t,n,r){G7(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(K7.has(a)?a:zO(a),t.attrs[a])}class ebe extends H7{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vm.has(n)){const r=t7(n);return r&&r.default||0}return n=K7.has(n)?n:zO(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return S7(t,n,r)}build(t,n,r){x7(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){Jve(t,n,r,a)}mount(t){this.isSVGTag=b7(t.tagName),super.mount(t)}}const tbe=(e,t)=>WO(e)?new ebe(t):new Zve(t,{allowProjection:e!==g.Fragment}),nbe=Jye({..._xe,...Vve,...Ive,...Hve},tbe),he=Nye(nbe),rbe={some:0,all:1};function sbe(e,t,{root:n,margin:r,amount:a="some"}={}){const i=r7(e),o=new WeakMap,l=u=>{u.forEach(d=>{const h=o.get(d.target);if(d.isIntersecting!==!!h)if(d.isIntersecting){const f=t(d.target,d);typeof f=="function"?o.set(d.target,f):c.unobserve(d.target)}
715else typeof h=="function"&&(h(d),o.delete(d.target))})},c=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof a=="number"?a:rbe[a]});return i.forEach(u=>c.observe(u)),()=>c.disconnect()}function abe(e,{root:t,margin:n,amount:r,once:a=!1,initial:i=!1}={}){const[o,l]=g.useState(i);return g.useEffect(()=>{if(!e.current||a&&o)return;const c=()=>(l(!0),a?void 0:()=>l(!1)),u={root:t&&t.current||void 0,margin:n,amount:r};return sbe(e.current,c,u)},[t,e,n,a,r]),o}const ibe=()=>{const[e,t]=g.useState(0),[n,r]=g.useState(!1);return g.useEffect(()=>{let a=document.documentElement.scrollHeight-window.innerHeight,i=!1;const o=()=>{a=document.documentElement.scrollHeight-window.innerHeight},l=()=>{i||(requestAnimationFrame(()=>{const c=window.scrollY,u=a>0?c/a*100:0;t(Math.min(u,100)),r(c>100),i=!1}),i=!0)};return window.addEventListener("resize",o,{passive:!0}),window.addEventListener("scroll",l,{passive:!0}),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",l)}},[]),n?s.jsx(he.div,{className:"fixed top-0 left-0 right-0 z-50 h-1 bg-gradient-to-r from-agency-accent via-red-500 to-purple-600",initial:{scaleX:0},animate:{scaleX:e/100},style:{transformOrigin:"0%"},transition:{duration:.1,ease:"easeOut"}}):null},KO=z.memo(()=>{const[e,t]=g.useState({x:0,y:0}),[n,r]=g.useState(!1),[a,i]=g.useState(!1),o=g.useCallback(f=>{t({x:f.clientX,y:f.clientY}),i(!0)},[]),l=g.useCallback(f=>{const m=f.target,y=m.tagName==="BUTTON"||m.tagName==="A"||m.closest("button")!==null||m.closest("a")!==null;r(y)},[]),c=g.useCallback(()=>{r(!1)},[]),u=g.useCallback(()=>{i(!1)},[]);g.useEffect(()=>{if(window.innerWidth>768&&!("ontouchstart"in window))return window.addEventListener("mousemove",o),window.addEventListener("mouseover",l),window.addEventListener("mouseout",c),window.addEventListener("mouseleave",u),()=>{window.removeEventListener("mousemove",o),window.removeEventListener("mouseover",l),window.removeEventListener("mouseout",c),window.removeEventListener("mouseleave",u)}},[o,l,c,u]);const d=g.useMemo(()=>({x:e.x-12,y:e.y-12,scale:n?1.5:1,opacity:a?1:0}),[e.x,e.y,n,a]),h=g.useMemo(()=>({type:"spring",damping:30,stiffness:200,mass:.5}),[]);return typeof window<"u"&&(window.innerWidth<=768||"ontouchstart"in window)?null:s.jsx(he.div,{className:"fixed pointer-events-none z-50 w-6 h-6 rounded-full bg-agency-accent/20 backdrop-blur-sm border border-agency-accent/30 hidden md:block",animate:d,transition:h})});KO.displayName="MicroInteractions";const Sf=pd("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"}}),U=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},i)=>{const o=r?yo:"button";return s.jsx(o,{className:ve(Sf({variant:t,size:n,className:e})),ref:i,...a})});U.displayName="Button";var obe=g.createContext(void 0);function cx(e){const t=g.useContext(obe);return e||t||"ltr"}function lbe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cbe="DismissableLayer",Sk="dismissableLayer.update",ube="dismissableLayer.pointerDownOutside",dbe="dismissableLayer.focusOutside",jL,Y7=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),X7=g.forwardRef((e,t)=>
vendor: 9,729 bytes, line 715
715{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(Y7),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=lt(t,C=>h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=mbe(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=pbe(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return lbe(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jL=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),NL(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=jL)}},[d,f,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),NL())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(Sk,C),()=>document.removeEventListener(Sk,C)},[]),s.jsx(Te.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,j.onPointerDownCapture)})});X7.displayName=cbe;var hbe="DismissableLayerBranch",fbe=g.forwardRef((e,t)=>{const n=g.useContext(Y7),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Te.div,{...e,ref:a})});fbe.displayName=hbe;function mbe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){Q7(ube,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pbe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&Q7(dbe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function NL(){const e=new CustomEvent(Sk);document.dispatchEvent(e)}function Q7(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var ON=0;function gbe(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_L()),document.body.insertAdjacentElement("beforeend",e[1]??_L()),ON++,()=>{ON===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ON--}},[])}function _L(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var RN="focusScope.autoFocusOnMount",IN="focusScope.autoFocusOnUnmount",CL={bubbles:!1,cancelable:!0},ybe="FocusScope",Z7=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=Dt(a),d=Dt(i),h=g.useRef(null),f=lt(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:Al(h.current,{select:!0})},x=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||Al(h.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Al(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const b=new MutationObserver(v);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),b.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){kL.add(m);const p=document.activeElement;if(!l.contains(p)){const v=new CustomEvent(RN,CL);l.addEventListener(RN,u),l.dispatchEvent(v),v.defaultPrevented||(xbe(jbe(J7(l)),{select:!0}),document.activeElement===p&&Al(l))}return()=>{l.removeEventListener(RN,u),setTimeout(()=>{const v=new CustomEvent(IN,CL);l.addEventListener(IN,d),l.dispatchEvent(v),v.defaultPrevented||Al(p??document.body,{select:!0}),l.removeEventListener(IN,d),kL.remove(m)},0)}}},[l,u,d,m]);const y=g.useCallback(p=>{if(!n&&!r||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,v=document.activeElement;if(x&&v){const b=p.currentTarget,[w,S]=vbe(b);w&&S?!p.shiftKey&&v===S?(p.preventDefault(),n&&Al(w,{select:!0})):p.shiftKey&&v===w&&(p.preventDefault(),n&&Al(S,{select:!0})):v===b&&p.preventDefault()}},[n,r,m.paused]);return s.jsx(Te.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});Z7.displayName=ybe;function xbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Al(r,{select:t}),document.activeElement!==n)return}function vbe(e){const t=J7(e),n=EL(t,e),r=EL(t.reverse(),e);return[n,r]}function J7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function EL(e,t){for(const n of e)if(!bbe(n,{upTo:t}))return n}function bbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wbe(e){return e instanceof HTMLInputElement&&"select"in e}function Al(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wbe(e)&&t&&e.select()}}var kL=Sbe();function Sbe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=PL(e,t),e.unshift(t)},remove(t){var n;e=PL(e,t),(n=e[0])==null||n.resume()}}}function PL(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jbe(e){return e.filter(t=>t.tagName!=="A")}var Nbe="Portal",eH=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);Vn(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Pi.createPortal(s.jsx(Te.div,{...r,ref:t}),o):null});eH.displayName=Nbe;function _be(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];function u(h){const{scope:f,children:m,...y}=h,p=(f==null?void 0:f[e][c])||l,x=g.useMemo(()=>y,Object.values(y));return s.jsx(p.Provider,{value:x,children:m})}function d(h,f){const m=(f==null?void 0:f[e][c])||l,y=g.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,Cbe(a,...t)]}function Cbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var MN="rovingFocusGroup.onEntryFocus",Ebe={bubbles:!1,cancelable:!0},YS="RovingFocusGroup",[jk,tH,kbe]=Xy(YS),[Pbe,XS]=_be(YS,[kbe]),[Tbe,Abe]=Pbe(YS),nH=g.forwardRef((e,t)=>s.jsx(jk.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(jk.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Obe,{...e,ref:t})})}));nH.displayName=YS;var Obe=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=g.useRef(null),m=lt(t,f),y=cx(i),[p=null,x]=Hs({prop:o,defaultProp:l,onChange:c}),[v,b]=g.useState(!1),w=Dt(u),S=tH(n),j=g.useRef(!1),[N,C]=g.useState(0);return g.useEffect(()=>{const _=f.current;if(_)return _.addEventListener(MN,w),()=>_.removeEventListener(MN,w)},[w]),s.jsx(Tbe,{scope:n,orientation:r,dir:y,loop:a,currentTabStopId:p,onItemFocus:g.useCallback(_=>x(_),[x]),onItemShiftTab:g.useCallback(()=>b(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(_=>_+1),[]),onFocusableItemRemove:g.useCallback(()=>C(_=>_-1),[]),children:s.jsx(Te.div,{tabIndex:v||N===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:we(e.onMouseDown,()=>{j.current=!0}),onFocus:we(e.onFocus,_=>{const A=!j.current;if(_.target===_.currentTarget&&A&&!v){const P=new CustomEvent(MN,Ebe);if(_.currentTarget.dispatchEvent(P),!P.defaultPrevented){const R=S().filter(L=>L.focusable),I=R.find(L=>L.active),B=R.find(L=>
vendor: 4,692 bytes, line 715
715L.id===p),q=[I,B,...R].filter(Boolean).map(L=>L.ref.current);aH(q,d)}}j.current=!1}),onBlur:we(e.onBlur,()=>b(!1))})})}),rH="RovingFocusGroupItem",sH=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,...o}=e,l=Vs(),c=i||l,u=Abe(rH,n),d=u.currentTabStopId===c,h=tH(n),{onFocusableItemAdd:f,onFocusableItemRemove:m}=u;return g.useEffect(()=>{if(r)return f(),()=>m()},[r,f,m]),s.jsx(jk.ItemSlot,{scope:n,id:c,focusable:r,active:a,children:s.jsx(Te.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:we(e.onMouseDown,y=>{r?u.onItemFocus(c):y.preventDefault()}),onFocus:we(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:we(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const p=Mbe(y,u.orientation,u.dir);if(p!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let v=h().filter(b=>b.focusable).map(b=>b.ref.current);if(p==="last")v.reverse();else if(p==="prev"||p==="next"){p==="prev"&&v.reverse();const b=v.indexOf(y.currentTarget);v=u.loop?Dbe(v,b+1):v.slice(b+1)}setTimeout(()=>aH(v))}})})})});sH.displayName=rH;var Rbe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ibe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mbe(e,t,n){const r=Ibe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Rbe[r]}function aH(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Dbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iH=nH,oH=sH,Lbe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ld=new WeakMap,Rv=new WeakMap,Iv={},DN=0,lH=function(e){return e&&(e.host||lH(e.parentNode))},$be=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=lH(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Fbe=function(e,t,n,r){var a=$be(t,Array.isArray(e)?e:[e]);Iv[n]||(Iv[n]=new WeakMap);var i=Iv[n],o=[],l=new Set,c=new Set(a),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};a.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var m=f.getAttribute(r),y=m!==null&&m!=="false",p=(Ld.get(f)||0)+1,x=(i.get(f)||0)+1;Ld.set(f,p),i.set(f,x),o.push(f),p===1&&y&&Rv.set(f,!0),x===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return d(t),l.clear(),DN++,function(){o.forEach(function(h){var f=Ld.get(h)-1,m=i.get(h)-1;Ld.set(h,f),i.set(h,m),f||(Rv.has(h)||h.removeAttribute(r),Rv.delete(h)),m||h.removeAttribute(n)}),DN--,DN||(Ld=new WeakMap,Ld=new WeakMap,Rv=new WeakMap,Iv={})}},ux=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Lbe(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Fbe(r,a,n,"aria-hidden")):function(){return null}},gc="right-scroll-bar-position",yc="width-before-scroll-bar",Bbe="with-scroll-bars-hidden",zbe="--removed-body-scroll-bar-size";function LN(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ube(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var qbe=typeof window<"u"?g.useLayoutEffect:g.useEffect,TL=new WeakMap;function dx(e,t){var n=Ube(null,function(r){return e.forEach(function(a){return LN(a,r)})});return qbe(function(){var r=TL.get(n);if(r){var a=new Set(r),i=new Set(e),o=n.current;a.forEach(function(l){i.has(l)||LN(l,null)}),i.forEach(function(l){a.has(l)||LN(l,o)})}TL.set(n,e)},[e]),n}function Wbe(e){return e}function Vbe(e,t){t===void 0&&(t=Wbe);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};
vendor: 5,317 bytes, lines 715-752
715u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return a}function hx(e){e===void 0&&(e={});var t=Vbe(null);return t.options=Vt({async:!0,ssr:!1},e),t}var cH=function(e){var t=e.sideCar,n=ai(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,Vt({},n))};cH.isSideCarExport=!0;function fx(e,t){return e.useMedium(t),cH}var uH=hx(),$N=function(){},QS=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:$N,onWheelCapture:$N,onTouchMoveCapture:$N}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noIsolation,y=e.inert,p=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,b=e.gapMode,w=ai(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,j=dx([n,t]),N=Vt(Vt({},w),a);return g.createElement(g.Fragment,null,d&&g.createElement(S,{sideCar:uH,removeScrollBar:u,shards:h,noIsolation:m,inert:y,setCallbacks:i,allowPinchZoom:!!p,lockRef:n,gapMode:b}),o?g.cloneElement(g.Children.only(l),Vt(Vt({},N),{ref:j})):g.createElement(v,Vt({},N,{className:c,ref:j}),l))});QS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};QS.classNames={fullWidth:yc,zeroRight:gc};var Hbe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gbe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hbe();return t&&e.setAttribute("nonce",t),e}function Kbe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ybe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Xbe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gbe())&&(Kbe(t,n),Ybe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qbe=function(){var e=Xbe();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bm=function(){var e=Qbe(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Zbe={left:0,top:0,right:0,gap:0},FN=function(e){return parseInt(e||"",10)||0},Jbe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[FN(n),FN(r),FN(a)]},e0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zbe;var t=Jbe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},t0e=bm(),Bh="data-scroll-locked",n0e=function(e,t,n,r){var a=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
716  .`.concat(Bbe,` {
717   overflow: hidden `).concat(r,`;
718   padding-right: `).concat(l,"px ").concat(r,`;
719  }
720  body[`).concat(Bh,`] {
721    overflow: hidden `).concat(r,`;
722    overscroll-behavior: contain;
723    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
724    padding-left: `.concat(a,`px;
725    padding-top: `).concat(i,`px;
726    padding-right: `).concat(o,`px;
727    margin-left:0;
728    margin-top:0;
729    margin-right: `).concat(l,"px ").concat(r,`;
730    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
731  }
732  
733  .`).concat(gc,` {
734    right: `).concat(l,"px ").concat(r,`;
735  }
736  
737  .`).concat(yc,` {
738    margin-right: `).concat(l,"px ").concat(r,`;
739  }
740  
741  .`).concat(gc," .").concat(gc,` {
742    right: 0 `).concat(r,`;
743  }
744  
745  .`).concat(yc," .").concat(yc,` {
746    margin-right: 0 `).concat(r,`;
747  }
748  
749  body[`).concat(Bh,`] {
750    `).concat(zbe,": ").concat(l,`px;
751  }
752`)},AL=function(){var e=parseInt(document.body.getAttribute(Bh)||"0",10);return isFinite(e)?e:0},r0e=function(){g.useEffect(function(){return document.body.setAttribute(Bh,(AL()+1).toString()),function(){var e=AL()-1;e<=0?document.body.removeAttribute(Bh):document.body.setAttribute(Bh,e.toString())}},[])},mx=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;r0e();var i=g.useMemo(function(){return e0e(a)},[a]);return g.createElement(t0e,{styles:n0e(i,!t,a,n?"":"!important")})},Nk=!1;if(typeof window<"u")try{var Mv=Object.defineProperty({},"passive",{get:function(){return Nk=!0,!0}});window.addEventListener("test",Mv,Mv),window.removeEventListener("test",Mv,Mv)}catch{Nk=!1}var $d=Nk?{passive:!1}:!1,s0e=function(e){return e.tagName==="TEXTAREA"},dH=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!s0e(e)&&n[t]==="visible")},a0e=function(e){return dH(e,"overflowY")},i0e=function(e){return dH(e,"overflowX")},OL=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=hH(e,r);if(a){var i=fH(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},o0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},l0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hH=function(e,t){return e==="v"?a0e(t):i0e(t)},fH=function(e,t){return e==="v"?o0e(t):l0e(t)}
vendor: 17,849 bytes, lines 752-755
752,c0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},u0e=function(e,t,n,r,a){var i=c0e(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{var m=fH(e,l),y=m[0],p=m[1],x=m[2],v=p-x-i*y;(y||v)&&hH(e,l)&&(h+=v,f+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!a)||!d&&(Math.abs(f)<1||!a))&&(u=!0),u},Dv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RL=function(e){return[e.deltaX,e.deltaY]},IL=function(e){return e&&"current"in e?e.current:e},d0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h0e=function(e){return`
753  .block-interactivity-`.concat(e,` {pointer-events: none;}
754  .allow-interactivity-`).concat(e,` {pointer-events: all;}
755`)},f0e=0,Fd=[];function m0e(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(f0e++)[0],i=g.useState(bm)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=xd([e.lockRef.current],(e.shards||[]).map(IL),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var v=Dv(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-v[0],S="deltaY"in p?p.deltaY:b[1]-v[1],j,N=p.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&C==="h"&&N.type==="range")return!1;var _=OL(C,N);if(!_)return!0;if(_?j=C:(j=C==="v"?"h":"v",_=OL(C,N)),!_)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=j),!j)return!0;var A=r.current||j;return u0e(A,x,p,A==="h"?w:S,!0)},[]),c=g.useCallback(function(p){var x=p;if(!(!Fd.length||Fd[Fd.length-1]!==i)){var v="deltaY"in x?RL(x):Dv(x),b=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&d0e(j.delta,v)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(IL).filter(Boolean).filter(function(j){return j.contains(x.target)}),S=w.length>0?l(x,w[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(p,x,v,b){var w={name:p,delta:x,target:v,should:b,shadowParent:p0e(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=g.useCallback(function(p){n.current=Dv(p),r.current=void 0},[]),h=g.useCallback(function(p){u(p.type,RL(p),p.target,l(p,e.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,Dv(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return Fd.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,$d),document.addEventListener("touchmove",c,$d),document.addEventListener("touchstart",d,$d),function(){Fd=Fd.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,$d),document.removeEventListener("touchmove",c,$d),document.removeEventListener("touchstart",d,$d)}},[]);var m=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(i,{styles:h0e(a)}):null,m?g.createElement(mx,{gapMode:e.gapMode}):null)}function p0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const g0e=fx(uH,m0e);var mH=g.forwardRef(function(e,t){return g.createElement(QS,Vt({},e,{ref:t,sideCar:g0e}))});mH.classNames=QS.classNames;var _k=["Enter"," "],y0e=["ArrowDown","PageUp","Home"],pH=["ArrowUp","PageDown","End"],x0e=[...y0e,...pH],v0e={ltr:[..._k,"ArrowRight"],rtl:[..._k,"ArrowLeft"]},b0e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},px="Menu",[Gg,w0e,S0e]=Xy(px),[vd,gH]=Qs(px,[S0e,$c,XS]),ZS=$c(),yH=XS(),[j0e,bd]=vd(px),[N0e,gx]=vd(px),xH=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:o=!0}=e,l=ZS(t),[c,u]=g.useState(null),d=g.useRef(!1),h=Dt(i),f=cx(a);return g.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),s.jsx(IS,{...l,children:s.jsx(j0e,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:s.jsx(N0e,{scope:t,onClose:g.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:f,modal:o,children:r})})})};xH.displayName=px;var _0e="MenuAnchor",YO=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=ZS(n);return s.jsx(nx,{...a,...r,ref:t})});YO.displayName=_0e;var XO="MenuPortal",[C0e,vH]=vd(XO,{forceMount:void 0}),bH=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=bd(XO,t);return s.jsx(C0e,{scope:t,forceMount:n,children:s.jsx(As,{present:n||i.open,children:s.jsx(eH,{asChild:!0,container:a,children:r})})})};bH.displayName=XO;var Qa="MenuContent",[E0e,QO]=vd(Qa),wH=g.forwardRef((e,t)=>{const n=vH(Qa,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=bd(Qa,e.__scopeMenu),o=gx(Qa,e.__scopeMenu);return s.jsx(Gg.Provider,{scope:e.__scopeMenu,children:s.jsx(As,{present:r||i.open,children:s.jsx(Gg.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(k0e,{...a,ref:t}):s.jsx(P0e,{...a,ref:t})})})})}),k0e=g.forwardRef((e,t)=>{const n=bd(Qa,e.__scopeMenu),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return ux(i)},[]),s.jsx(ZO,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:we(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),P0e=g.forwardRef((e,t)=>{const n=bd(Qa,e.__scopeMenu);return s.jsx(ZO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ZO=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:m,disableOutsideScroll:y,...p}=e,x=bd(Qa,n),v=gx(Qa,n),b=ZS(n),w=yH(n),S=w0e(n),[j,N]=g.useState(null),C=g.useRef(null),_=lt(t,C,x.onContentChange),A=g.useRef(0),P=g.useRef(""),R=g.useRef(0),I=g.useRef(null),B=g.useRef("right"),$=g.useRef(0),q=y?mH:g.Fragment,L=y?{as:yo,allowPinchZoom:!0}:void 0,k=F=>{var ne,le;const O=P.current+F,E=S().filter(ie=>!ie.disabled),D=document.activeElement,M=(ne=E.find(ie=>ie.ref.current===D))==null?void 0:ne.textValue,X=E.map(ie=>ie.textValue),W=z0e(X,O,M),re=(le=E.find(ie=>ie.textValue===W))==null?void 0:le.ref.current;(function ie(ye){P.current=ye,window.clearTimeout(A.current),ye!==""&&(A.current=window.setTimeout(()=>ie(""),1e3))})(O),re&&setTimeout(()=>re.focus())};g.useEffect(()=>()=>window.clearTimeout(A.current),[]),gbe();const T=g.useCallback(F=>{var E,D;return B.current===((E=I.current)==null?void 0:E.side)&&q0e(F,(D=I.current)==null?void 0:D.area)},[]);return s.jsx(E0e,{scope:n,searchRef:P,onItemEnter:g.useCallback(F=>{T(F)&&F.preventDefault()},[T]),onItemLeave:g.useCallback(F=>{var O;T(F)||((O=C.current)==null||O.focus(),N(null))},[T]),onTriggerLeave:g.useCallback(F=>{T(F)&&F.preventDefault()},[T]),pointerGraceTimerRef:R,onPointerGraceIntentChange:g.useCallback(F=>{I.current=F},[]),children:s.jsx(q,{...L,children:s.jsx(Z7,{asChild:!0,trapped:a,onMountAutoFocus:we(i,F=>{var O;F.preventDefault(),(O=C.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(X7,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:m,children:s.jsx(iH,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:N,onEntryFocus:we(c,F=>{v.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(MS,{role:"menu","aria-orientation":"vertical","data-state":LH(x.open),"data-radix-menu-content":"",dir:v.dir,...b,...p,ref:_,style:{outline:"none",...p.style},onKeyDown:we(p.onKeyDown,F=>{const E=F.target.closest("[data-radix-menu-content]")===F.currentTarget,D=F.ctrlKey||F.altKey||F.metaKey,M=F.key.length===1;E&&(F.key==="Tab"&&F.preventDefault(),!D&&M&&k(F.key));const X=C.current;if(F.target!==X||!x0e.includes(F.key))return;F.preventDefault();const re=S().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);pH.includes(F.key)&&re.reverse(),F0e(re)}),onBlur:we(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(A.current),P.current="")}),onPointerMove:we(e.onPointerMove,Kg(F=>{const O=F.target,E=$.current!==F.clientX;if(F.currentTarget.contains(O)&&E){const D=F.clientX>$.current?"right":"left";B.current=D,$.current=F.clientX}}))})})})})})})});wH.displayName=Qa;var T0e="MenuGroup",JO=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Te.div,{role:"group",...r,ref:t})});JO.displayName=T0e;var A0e="MenuLabel",SH=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Te.div,{...r,ref:t})});SH.displayName=A0e;var $0="MenuItem",ML="menu.itemSelect",JS=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=g.useRef(null),o=gx($0,e.__scopeMenu),l=QO($0,e.__scopeMenu),c=lt(t,i),u=g.useRef(!1),d=()=>{const h=i.current;if(!n&&h){const f=new CustomEvent(ML,{bubbles:!0,cancelable:!0});h.addEventListener(ML,m=>r==null?void 0:r(m),{once:!0}),Lc(h,f),f.defaultPrevented?u.current=!1:o.onClose()}};return s.jsx(jH,{...a,ref:c,disabled:n,onClick:we(e.onClick,d),onPointerDown:h=>{var f;(f=e.onPointerDown)==null||f.call(e,h),u.current=!0},onPointerUp:we(e.onPointerUp,h=>{var f;u.current||(f=h.currentTarget)==null||f.click()}),onKeyDown:we(e.onKeyDown,h=>{const f=l.searchRef.current!=="";n||f&&h.key===" "||_k.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});JS.displayName=$0;var jH=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,o=QO($0,n),l=yH(n),c=g.useRef(null),u=lt(t,c),[d,h]=g.useState(!1),[f,m]=g.useState("");return g.useEffect(()=>{const y=c.current;y&&m((y.textContent??"").trim())},[i.children]),s.jsx(Gg.ItemSlot,{scope:n,disabled:r,textValue:a??f,children:s.jsx(oH,{asChild:!0,...l,focusable:!r,children:s.jsx(Te.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:we(e.onPointerMove,Kg(y=>{r?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:we(e.onPointerLeave,Kg(y=>o.onItemLeave(y))),onFocus:we(e.onFocus,()=>h(!0)),onBlur:we(e.onBlur,()=>h(!1))})})})}),O0e="MenuCheckboxItem",NH=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return s.jsx(PH,{scope:e.__scopeMenu,checked:n,children:s.jsx(JS,{role:"menuitemcheckbox","aria-checked":F0(n)?"mixed":n,...a,ref:t,"data-state":t2(n),onSelect:we(a.onSelect,()=>r==null?void 0:r(F0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});NH.displayName=O0e;var _H="MenuRadioGroup",[R0e,I0e]=vd(_H,{value:void 0,onValueChange:()=>{}}),CH=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Dt(r);return s.jsx(R0e,{scope:e.__scopeMenu,value:n,onValueChange:i,children:s.jsx(JO,{...a,ref:t})})});CH.displayName=_H;var EH="MenuRadioItem",kH=g.forwardRef((e,t)=>{const{value:n,...r}=e,a=I0e(EH,e.__scopeMenu),i=n===a.value;return s.jsx(PH,{scope:e.__scopeMenu,checked:i,children:s.jsx(JS,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":t2(i),onSelect:we(r.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,n)},{checkForDefaultPrevented:!1})})})});kH.displayName=EH;var e2="MenuItemIndicator",[PH,M0e]=vd(e2,{checked:!1}),TH=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=M0e(e2,n);return s.jsx(As,{present:r||F0(i.checked)||i.checked===!0,children:s.jsx(Te.span,{...a,ref:t,"data-state":t2(i.checked)})})});TH.displayName=e2;var D0e="MenuSeparator",AH=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});AH.displayName=D0e;var L0e="MenuArrow",OH=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=ZS(n);return s.jsx(DS,{...a,...r,ref:t})});OH.displayName=L0e;var $0e="MenuSub",[nht,RH]=vd($0e),Pp="MenuSubTrigger",IH=g.forwardRef((e,t)=>{const n=bd(Pp,e.__scopeMenu),r=gx(Pp,e.__scopeMenu),a=RH(Pp,e.__scopeMenu),i=QO(Pp,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),s.jsx(YO,{asChild:!0,...u,children:s.jsx(jH,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":LH(n.open),...e,ref:_S(t,a.onTriggerChange),onClick:h=>{var f;(f=e.onClick)==null||f.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:we(e.onPointerMove,Kg(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:we(e.onPointerLeave,Kg(h=>{var m,y;d();const f=(m=n.content)==null?void 0:m.getBoundingClientRect();if(f){const p=(y=n.content)==null?void 0:y.dataset.side,x=p==="right",v=x?-5:5,b=f[x?"left":"right"],w=f[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+v,y:h.clientY},{x:b,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:b,y:f.bottom}],side:p}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:we(e.onKeyDown,h=>{var m;const f=i.searchRef.current!=="";e.disabled||f&&h.key===" "||v0e[r.dir].includes(h.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),h.preventDefault())})})})});IH.displayName=Pp;var MH="MenuSubContent",DH=g.forwardRef((e,t)=>{const n=vH(Qa,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=bd(Qa,e.__scopeMenu),o=gx(Qa,e.__scopeMenu),l=RH(MH,e.__scopeMenu),c=g.useRef(null),u=lt(t,c);return s.jsx(Gg.Provider,{scope:e.__scopeMenu,children:s.jsx(As,{present:r||i.open,children:s.jsx(Gg.Slot,{scope:e.__scopeMenu,children:s.jsx(ZO,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:we(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:we(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:we(e.onKeyDown,d=>{var m;const h=d.currentTarget.contains(d.target),f=b0e[o.dir].includes(d.key);h&&f&&(i.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});DH.displayName=MH;function LH(e){return e?"open":"closed"}function F0(e){return e==="indeterminate"}function t2(e){return F0(e)?"indeterminate":e?"checked":"unchecked"}function F0e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function B0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function z0e(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=B0e(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function U0e(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i].x,c=t[i].y,u=t[o].x,d=t[o].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}function q0e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return U0e(n,t)}function Kg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var W0e=xH,V0e=YO,H0e=bH,G0e=wH,K0e=JO,Y0e=SH,X0e=JS,Q0e=NH,Z0e=CH,J0e=kH,ewe=TH,twe=AH,nwe=OH,rwe=IH,swe=DH,n2="DropdownMenu",[awe,rht]=Qs(n2,[gH]),Os=gH(),[iwe,$H]=awe(n2),FH=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=Os(t),u=g.useRef(null),[d=!1,h]=Hs({prop:a,defaultProp:i,onChange:o});return s.jsx(iwe,{scope:t,triggerId:Vs(),triggerRef:u,contentId:Vs(),open:d,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(f=>!f),[h]),modal:l,children:s.jsx(W0e,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};FH.displayName=n2;var BH="DropdownMenuTrigger",zH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=$H(BH,n),o=Os(n);return s.jsx(V0e,{asChild:!0,...o,children:s.jsx(Te.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:_S(t,i.triggerRef),onPointerDown:we(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:we(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});zH.displayName=BH;var owe="DropdownMenuPortal",UH=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Os(t);return s.jsx(H0e,{...r,...n})};UH.displayName=owe;var qH="DropdownMenuContent",WH=g.forwardRef((e,t)=>
755{const{__scopeDropdownMenu:n,...r}=e,a=$H(qH,n),i=Os(n),o=g.useRef(!1);return s.jsx(G0e,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:we(e.onCloseAutoFocus,l=>{var c;o.current||(c=a.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:we(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!a.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});WH.displayName=qH;var lwe="DropdownMenuGroup",cwe=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(K0e,{...a,...r,ref:t})});cwe.displayName=lwe;var uwe="DropdownMenuLabel",VH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(Y0e,{...a,...r,ref:t})});VH.displayName=uwe;var dwe="DropdownMenuItem",HH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(X0e,{...a,...r,ref:t})});HH.displayName=dwe;var hwe="DropdownMenuCheckboxItem",GH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(Q0e,{...a,...r,ref:t})});GH.displayName=hwe;var fwe="DropdownMenuRadioGroup",mwe=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(Z0e,{...a,...r,ref:t})});mwe.displayName=fwe;var pwe="DropdownMenuRadioItem",KH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(J0e,{...a,...r,ref:t})});KH.displayName=pwe;var gwe="DropdownMenuItemIndicator",YH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(ewe,{...a,...r,ref:t})});YH.displayName=gwe;var ywe="DropdownMenuSeparator",XH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(twe,{...a,...r,ref:t})});XH.displayName=ywe;var xwe="DropdownMenuArrow",vwe=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(nwe,{...a,...r,ref:t})});vwe.displayName=xwe;var bwe="DropdownMenuSubTrigger",QH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(rwe,{...a,...r,ref:t})});QH.displayName=bwe;var wwe="DropdownMenuSubContent",ZH=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Os(n);return s.jsx(swe,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ZH.displayName=wwe;var Swe=FH,jwe=zH,Nwe=UH,JH=WH,eG=VH,tG=HH,nG=GH,rG=KH,sG=YH,aG=XH,iG=QH,oG=ZH;const Fu=Swe,Bu=jwe,_we=g.forwardRef(({className:e,inset:t,children:n,...r},a)=>s.jsxs(iG,{ref:a,className:ve("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,s.jsx(lm,{className:"ml-auto h-4 w-4"})]}));_we.displayName=iG.displayName;const Cwe=g.forwardRef(({className:e,...t},n)=>s.jsx(oG,{ref:n,className:ve("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Cwe.displayName=oG.displayName;const xc=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(Nwe,{children:s.jsx(JH,{ref:r,sideOffset:t,className:ve("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
755de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));xc.displayName=JH.displayName;const Qe=g.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(tG,{ref:r,className:ve("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Qe.displayName=tG.displayName;const Ewe=g.forwardRef(({className:e,children:t,checked:n,...r},a)=>s.jsxs(nG,{ref:a,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(sG,{children:s.jsx(Ko,{className:"h-4 w-4"})})}),t]}));Ewe.displayName=nG.displayName;const kwe=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(rG,{ref:r,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(sG,{children:s.jsx(Uq,{className:"h-2 w-2 fill-current"})})}),t]}));kwe.displayName=rG.displayName;const Pwe=g.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(eG,{ref:r,className:ve("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Pwe.displayName=eG.displayName;const ej=g.forwardRef(({className:e,...t},n)=>s.jsx(aG,{ref:n,className:ve("-mx-1 my-1 h-px bg-muted",e),...t}));ej.displayName=aG.displayName;var r2="Avatar",[Twe,sht]=Qs(r2),[Awe,lG]=Twe(r2),cG=g.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=g.useState("idle");return s.jsx(Awe,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:s.jsx(Te.span,{...r,ref:t})})});cG.displayName=r2;var uG="AvatarImage",dG=g.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,o=lG(uG,n),l=Owe(r,i.referrerPolicy),c=Dt(u=>{a(u),o.onImageLoadingStatusChange(u)});return Vn(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?s.jsx(Te.img,{...i,ref:t,src:r}):null});dG.displayName=uG;var hG="AvatarFallback",fG=g.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=lG(hG,n),[o,l]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&i.imageLoadingStatus!=="loaded"?s.jsx(Te.span,{...a,ref:t}):null});fG.displayName=hG;function Owe(e,t){const[n,r]=g.useState("idle");return Vn(()=>{if(!e){r("error");return}let a=!0;const i=new window.Image,o=l=>()=>{a&&r(l)};return r("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,t&&(i.referrerPolicy=t),()=>{a=!1}},[e,t]),n}var mG=cG,pG=dG,gG=fG;const Ks=g.forwardRef(({className:e,...t},n)=>s.jsx(mG,{ref:n,className:ve("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ks.displayName=mG.displayName;const ni=g.forwardRef(({className:e,...t},n)=>s.jsx(pG,{ref:n,className:ve("aspect-square h-full w-full",e),...t}));ni.displayName=pG.displayName;const Ys=g.forwardRef(({className:e,...t},n)=>s.jsx(gG,{ref:n,className:ve("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ys.displayName=gG.displayName;const Rwe=pd("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function fe({className:e,variant:t,...n}){return s.jsx("div",{className:ve(Rwe({variant:t}),e),...n})}const Iwe=()=>{const{user:e}=Ie(),[t,n]=g.useState({count:0,loading:!0}),r=async()=>
755{if(!e){n({count:0,loading:!1});return}try{const{data:i,error:o}=await K.rpc("get_unread_notification_count",{p_user_id:e.id});if(o)throw o;n({count:i||0,loading:!1})}catch(i){console.error("Error loading notification count:",i),n({count:0,loading:!1,error:"Failed to load notifications"})}},a=async()=>{if(e)try{const{error:i}=await K.from("auto_prospecting_notifications").update({is_read:!0}).eq("user_id",e.id).eq("is_read",!1);if(i)throw i;n(o=>({...o,count:0}))}catch(i){console.error("Error marking notifications as read:",i)}};return g.useEffect(()=>{if(r(),e){const i=K.channel("auto-prospecting-notifications").on("postgres_changes",{event:"INSERT",schema:"public",table:"auto_prospecting_notifications",filter:`user_id=eq.${e.id}`},()=>{r()}).on("postgres_changes",{event:"UPDATE",schema:"public",table:"auto_prospecting_notifications",filter:`user_id=eq.${e.id}`},()=>{r()}).subscribe();return()=>{K.removeChannel(i)}}},[e]),{...t,markAsRead:a,refresh:r}},s2=()=>{var i;const e=vpe(),t=e.tasks.filter(o=>!o.completed),n=t.some(o=>o.tier==="free"),r=t.some(o=>o.tier==="paid"),a=!((i=e.progress)!=null&&i.checklistCompleted)&&t.length>0;return{...e,incompleteTasks:t,hasIncompleteFreeTasks:n,hasIncompletePaidTasks:r,shouldShowNotification:a}},Mwe=()=>{const{incompleteTasks:e,shouldShowNotification:t}=s2();return!t||e.length===0?null:s.jsxs("span",{className:"absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center",children:[s.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-75"}),s.jsx("span",{className:"relative inline-flex h-5 w-5 rounded-full bg-primary text-[10px] font-semibold text-primary-foreground items-center justify-center",children:e.length})]})};function nt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Xs(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function ys(e,t){const n=nt(e);return isNaN(t)?Xs(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Di(e,t){const n=nt(e);if(isNaN(t))return Xs(e,NaN);if(!t)return n;const r=n.getDate(),a=Xs(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);const i=a.getDate();return r>=i?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}const a2=6048e5,Dwe=864e5,yG=6e4,xG=36e5,Lv=43200,DL=1440;let Lwe={};function wm(){return Lwe}function as(e,t){var l,c,u,d;const n=wm(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,a=nt(e),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function ed(e){return as(e,{weekStartsOn:1})}function vG(e){const t=nt(e),n=t.getFullYear(),r=Xs(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=ed(r),i=Xs(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=ed(i);return t.getTime()>=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function wo(e){const t=nt(e);return t.setHours(0,0,0,0),t}function jf(e){const t=nt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ro(e,t){const n=wo(e),r=wo(t),a=+n-jf(n),i=+r-jf(r);return Math.round((a-i)/Dwe)}function $we(e){const t=vG(e),n=Xs(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ed(n)}function Yg(e,t){const n=t*7;return ys(e,n)}function Fwe(e,t){return Di(e,t*12)}function Bwe(e){let t;return e.forEach(function(n){const r=nt(n);(t===void 0||t<r||isNaN(Number(r)))&&(t=r)}),t||new Date(NaN)}function zwe(e){let t;return e.forEach(n=>{const r=nt(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function zb(e,t){const n=nt(e),r=nt(t),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function Uwe(e){return Xs(e,Date.now())}function $s(e,t){const n=wo(e),r=wo(t);return+n==+r}function i2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qwe(e){if(!i2(e)&&typeof e!="number")return!1;const t=nt(e);return!isNaN(Number(t))}function Nf(e,t){const n=nt(e),r=nt(t),a=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return a*12+i}function Wwe(e,t,n){const r=as(e,n),a=as(t,n),i=+r-jf(r),o=+a-jf(a);return Math.round((i-o)/a2)}function Vwe(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Hwe(e,t){return+nt(e)-+nt(t)}function bG(e){const t=nt(e);return t.setHours(23,59,59,999),t}function tj(e){const t=nt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Gwe(e){const t=nt(e);return+bG(t)==+tj(t)}function Kwe(e,t){const n=nt(e),r=nt(t),a=zb(n,r),i=Math.abs(Nf(n,r));let o;if(i<1)o=0;else{n.getMonth()===1&&n.getDate()>
75527&&n.setDate(30),n.setMonth(n.getMonth()-a*i);let l=zb(n,r)===-a;Gwe(nt(e))&&i===1&&zb(e,r)===1&&(l=!1),o=a*(i-Number(l))}return o===0?0:o}function Ywe(e,t,n){const r=Hwe(e,t)/1e3;return Vwe(n==null?void 0:n.roundingMethod)(r)}function yx(e,t){const n=nt(e.start),r=nt(e.end);let a=+n>+r;const i=a?+n:+r,o=a?r:n;o.setHours(0,0,0,0);let l=1;const c=[];for(;+o<=i;)c.push(nt(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return a?c.reverse():c}function Xwe(e,t){const n=nt(e.start),r=nt(e.end);let a=+n>+r;const i=as(a?r:n,t),o=as(a?n:r,t);i.setHours(15),o.setHours(15);const l=+o.getTime();let c=i,u=(t==null?void 0:t.step)??1;if(!u)return[];u<0&&(u=-u,a=!a);const d=[];for(;+c<=l;)c.setHours(0),d.push(nt(c)),c=Yg(c,u),c.setHours(15);return a?d.reverse():d}function Ur(e){const t=nt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function nj(e){const t=nt(e),n=Xs(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function o2(e,t){var l,c,u,d;const n=wm(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,a=nt(e),i=a.getDay(),o=(i<r?-7:0)+6-(i-r);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}function wG(e){return o2(e,{weekStartsOn:1})}const Qwe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Zwe=(e,t,n)=>{let r;const a=Qwe[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function BN(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Jwe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eSe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tSe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nSe={date:BN({formats:Jwe,defaultWidth:"full"}),time:BN({formats:eSe,defaultWidth:"full"}),dateTime:BN({formats:tSe,defaultWidth:"full"})},rSe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sSe=(e,t,n,r)=>rSe[e];function tp(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const aSe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iSe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oSe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},lSe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
755ay","Saturday"]},cSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},uSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},dSe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},hSe={ordinalNumber:dSe,era:tp({values:aSe,defaultWidth:"wide"}),quarter:tp({values:iSe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:tp({values:oSe,defaultWidth:"wide"}),day:tp({values:lSe,defaultWidth:"wide"}),dayPeriod:tp({values:cSe,defaultWidth:"wide",formattingValues:uSe,defaultFormattingWidth:"wide"})};function np(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?mSe(l,h=>h.test(o)):fSe(l,h=>h.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function fSe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mSe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function pSe(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(a.length);return{value:o,rest:l}}}const gSe=/^(\d+)(th|st|nd|rd)?/i,ySe=/\d+/i,xSe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vSe={any:[/^b/i,/^(a|c)/i]},bSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wSe={any:[/1/i,/2/i,/3/i,/4/i]},SSe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},jSe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},NSe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},_Se={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},CSe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ESe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kSe={ordinalNumber:pSe({matchPattern:gSe,parsePattern:ySe,valueCallback:e=>parseInt(e,10)}),era:np({matchPatterns:xSe,defaultMatchWidth:"wide",parsePatterns:vSe,defaultParseWidth:"any"}),quarter:np({matchPatterns:bSe,defaultMatchWidth:"wide",parsePatterns:wSe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:np({matchPatterns:SSe,defaultMatchWidth:"wide",parsePatterns:jSe,defaultParseWidth:"any"}),day:np({matchPatterns:NSe,defaultMatchWidth:"wide",parsePatterns:_Se,defaultParseWidth:"any"}),dayPeriod:np({matchPatterns:CSe,defaultMatchWidth:"any",parsePatterns:ESe,defaultParseWidth:"any"})},l2={code:"en-US",formatDistance:Zwe,formatLong:nSe,formatRelative:sSe,localize:hSe,match:kSe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function PSe(e){const t=nt(e);return ro(t,nj(t))+1}function SG(e){const t=nt(e),n=+ed(t)-+$we(t);return Math.round(n/a2)+1}function jG(e,t){var d,h,f,m;
vendor: 4,098 bytes, line 755
755const n=nt(e),r=n.getFullYear(),a=wm(),i=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(f=a.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,o=Xs(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const l=as(o,t),c=Xs(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=as(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function TSe(e,t){var l,c,u,d;const n=wm(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=jG(e,t),i=Xs(e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),as(i,t)}function NG(e,t){const n=nt(e),r=+as(n,t)-+TSe(n,t);return Math.round(r/a2)+1}function un(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const El={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return un(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):un(n+1,2)},d(e,t){return un(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return un(e.getHours()%12||12,t.length)},H(e,t){return un(e.getHours(),t.length)},m(e,t){return un(e.getMinutes(),t.length)},s(e,t){return un(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return un(a,t.length)}},Bd={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},LL={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return El.y(e,t)},Y:function(e,t,n,r){const a=jG(e,r),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return un(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):un(i,t.length)},R:function(e,t){const n=vG(e);return un(n,t.length)},u:function(e,t){const n=e.getFullYear();return un(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return un(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return un(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return El.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return un(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=NG(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):un(a,t.length)},I:function(e,t,n){const r=SG(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}
vendor: 4,330 bytes, line 755
755):un(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):El.d(e,t)},D:function(e,t,n){const r=PSe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):un(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return un(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return un(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return un(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Bd.noon:r===0?a=Bd.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Bd.evening:r>=12?a=Bd.afternoon:r>=4?a=Bd.morning:a=Bd.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return El.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):El.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):un(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):un(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):El.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):El.s(e,t)},S:function(e,t){return El.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return FL(r);case"XXXX":case"XX":return cu(r);case"XXXXX":case"XXX":default:return cu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return FL(r);case"xxxx":case"xx":return cu(r);case"xxxxx":case"xxx":default:return cu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$L(r,":");case"OOOO":default:return"GMT"+cu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$L(r,":");
755case"zzzz":default:return"GMT"+cu(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return un(r,t.length)},T:function(e,t,n){const r=e.getTime();return un(r,t.length)}};function $L(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+un(i,2)}function FL(e,t){return e%60===0?(e>0?"-":"+")+un(Math.abs(e)/60,2):cu(e,t)}function cu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=un(Math.trunc(r/60),2),i=un(r%60,2);return n+a+t+i}const BL=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},_G=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ASe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return BL(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",BL(r,t)).replace("{{time}}",_G(a,t))},OSe={p:_G,P:ASe},RSe=/^D+$/,ISe=/^Y+$/,MSe=["D","DD","YY","YYYY"];function DSe(e){return RSe.test(e)}function LSe(e){return ISe.test(e)}function $Se(e,t,n){const r=FSe(e,t,n);if(console.warn(r),MSe.includes(e))throw new RangeError(r)}function FSe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const BSe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zSe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,USe=/^'([^]*?)'?$/,qSe=/''/g,WSe=/[a-zA-Z]/;function kt(e,t,n){var d,h,f,m,y,p,x,v;const r=wm(),a=(n==null?void 0:n.locale)??r.locale??l2,i=(n==null?void 0:n.firstWeekContainsDate)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((p=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((v=(x=r.locale)==null?void 0:x.options)==null?void 0:v.weekStartsOn)??0,l=nt(e);if(!qwe(l))throw new RangeError("Invalid time value");let c=t.match(zSe).map(b=>{const w=b[0];if(w==="p"||w==="P"){const S=OSe[w];return S(b,a.formatLong)}return b}).join("").match(BSe).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const w=b[0];if(w==="'")return{isToken:!1,value:VSe(b)};if(LL[w])return{isToken:!0,value:b};if(w.match(WSe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(b=>{if(!b.isToken)return b.value;const w=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&LSe(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&DSe(w))&&$Se(w,t,String(e));const S=LL[w[0]];return S(l,w,a.localize,u)}).join("")}function VSe(e){const t=e.match(USe);return t?t[1].replace(qSe,"'"):e}function HSe(e,t,n){const r=wm(),a=(n==null?void 0:n.locale)??r.locale??l2,i=2520,o=zb(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const l=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let c,u;o>0?(c=nt(t),u=nt(e)):(c=nt(e),u=nt(t));const d=Ywe(u,c),h=(jf(u)-jf(c))/1e3,f=Math.round((d-h)/60);let m;if(f<2)return n!=null&&n.includeSeconds?d<5?a.formatDistance("lessThanXSeconds",5,l):d<10?a.formatDistance("lessThanXSeconds",10,l):d<20?a.formatDistance("lessThanXSeconds",20,l):d<40?a.formatDistance("halfAMinute",0,l):d<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):f===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",f,l);if(f<45)return a.formatDistance("xMinutes",f,l);if(f<90)return a.formatDistance("aboutXHours",1,l);if(f<DL){const y=Math.round(f/60);return a.formatDistance("aboutXHours",y,l)}else{if(f<i)return a.formatDistance("xDays",1,l);if(f<Lv){const y=Math.round(f/DL);return a.formatDistance("xDays",y,l)}else if(f<Lv*2)return m=Math.round(f/Lv),a.formatDistance("aboutXMonths",m,l)}if(m=Kwe(u,c),m<12){const y=Math.round(f/Lv);return a.formatDistance("xMonths",y,l)}else{const y=m%12,p=Math.trunc(m/12);return y<3?a.formatDistance("aboutXYears",p,l):y<9?a.formatDistance("overXYears",p,l):a.formatDistance("almostXYears",p+1,l)}}function CG(e,t){return HSe(e,Uwe(e),t)}function GSe(e){return nt(e).getDay()}function KSe(e){const t=nt(e),n=t.getFullYear(),r=t.getMonth(),a=Xs(e,0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function YSe(e){return Math.trunc(+nt(e)/1e3)}function XSe(e){const t=nt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function QSe(e,t){return Wwe(XSe(e),Ur(e),t)+1}function Ck(e,t){const n=nt(e),r=nt(t);return n.getTime()>r.getTime()}function EG(e,t){const n=nt(e),r=nt(t);return+n<+r}function c2(e,t){const n=nt(e),r=nt(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function ZSe(e,t){const n=nt(e),r=nt(t);return n.getFullYear()===r.getFullYear()}function JSe(e,t){const n=+nt(e),[r,a]=[+nt(t.start),+nt(t.end)].sort((i,o)=>i-o);return n>=r&&n<=a}function $r(e,t){return ys(e,-t)}function eje(e,t){const r=sje(e);let a;if(r.date){const c=aje(r.date,2);a=ije(c.restDateString,c.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,l;if(r.time&&(o=oje(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(l=lje(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(i+o),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(i+o+l)}
755const $v={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},tje=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,nje=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,rje=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sje(e){const t={},n=e.split($v.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],$v.timeZoneDelimiter.test(t.date)&&(t.date=e.split($v.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const a=$v.timezone.exec(r);a?(t.time=r.replace(a[1],""),t.timezone=a[1]):t.time=r}return t}function aje(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function ije(e,t){if(t===null)return new Date(NaN);const n=e.match(tje);if(!n)return new Date(NaN);const r=!!n[4],a=rp(n[1]),i=rp(n[2])-1,o=rp(n[3]),l=rp(n[4]),c=rp(n[5])-1;if(r)return fje(t,l,c)?cje(t,l,c):new Date(NaN);{const u=new Date(0);return!dje(t,i,o)||!hje(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}}function rp(e){return e?parseInt(e):1}function oje(e){const t=e.match(nje);if(!t)return NaN;const n=zN(t[1]),r=zN(t[2]),a=zN(t[3]);return mje(n,r,a)?n*xG+r*yG+a*1e3:NaN}function zN(e){return e&&parseFloat(e.replace(",","."))||0}function lje(e){if(e==="Z")return 0;const t=e.match(rje);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return pje(r,a)?n*(r*xG+a*yG):NaN}function cje(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const a=r.getUTCDay()||7,i=(t-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const uje=[31,null,31,30,31,30,31,31,30,31,30,31];function kG(e){return e%400===0||e%4===0&&e%100!==0}function dje(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(uje[t]||(kG(e)?29:28))}function hje(e,t){return t>=1&&t<=(kG(e)?366:365)}function fje(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function mje(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function pje(e,t){return t>=0&&t<=59}function UN(e,t){const n=nt(e),r=n.getFullYear(),a=n.getDate(),i=Xs(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const o=KSe(i);return n.setMonth(t,Math.min(a,o)),n}function zL(e,t){const n=nt(e);return isNaN(+n)?Xs(e,NaN):(n.setFullYear(t),n)}function gje(e,t){return Yg(e,-t)}const yje={job_change:Ba,company_funding:ze,promotion:Mn,company_news:pE},xje={job_change:"text-blue-600",company_funding:"text-green-600",promotion:"text-purple-600",company_news:"text-orange-600"},vje=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(0),[a,i]=g.useState(!0);g.useEffect(()=>{o();const u=setInterval(o,6e4);return()=>clearInterval(u)},[]);const o=async()=>{try{const{data:u,error:d}=await K.from("contact_alerts").select("*").order("created_at",{ascending:!1}).limit(10);if(d)throw d;t(u||[]),r((u==null?void 0:u.filter(h=>!h.is_read).length)||0)}catch(u){console.error("Error fetching alerts:",u)}finally{i(!1)}},l=async u=>{try{const{error:d}=await K.from("contact_alerts").update({is_read:!0,read_at:new Date().toISOString()}).eq("id",u);if(d)throw d;t(h=>h.map(f=>f.id===u?{...f,is_read:!0}:f)),r(h=>Math.max(0,h-1))}catch(d){console.error("Error marking alert as read:",d),Ae.error("Failed to update alert")}},c=async()=>{try{const u=e.filter(h=>!h.is_read).map(h=>h.id);if(u.length===0)return;const{error:d}=await K.from("contact_alerts").update({is_read:!0,read_at:new Date().toISOString()}).in("id",u);if(d)throw d;t(h=>h.map(f=>({...f,is_read:!0}))),r(0),Ae.success("All alerts marked as read")}catch(u){console.error("Error marking all as read:",u),Ae.error("Failed to update alerts")}};return s.jsxs(Fu,{children:[s.jsx(Bu,{asChild:!0,children:s.jsxs(U,{variant:"ghost",size:"icon",className:"relative",children:[s.jsx(dE,{className:"h-5 w-5"}),n>0&&s.jsx(fe,{variant:"destructive",className:"absolute -top-1 -right-1 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:n>9?"9+":n})]})}),s.jsxs(xc,{align:"end",className:"w-80",children:[s.jsxs("div",{className:"flex items-center justify-between p-2",children:[s.jsx("h3",{className:"font-semibold",children:"Contact Alerts"}),n>0&&s.jsx(U,{variant:"ghost",size:"sm",onClick:c,className:"text-xs",children:"Mark all read"})]}),s.jsx(ej,{}),a?s.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"Loading alerts..."}):e.length===0?s.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No alerts yet"}):s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:e.map(u=>{const d=yje[u.alert_type]||dE,h=xje[u.alert_type]||"text-muted-foreground";return s.jsx(Qe,{className:`p-3 cursor-pointer ${u.is_read?"":"bg-accent/50"}`,onClick:()=>l(u.id),children:s.jsxs("div",{className:"flex gap-3 w-full",children:[s.jsx(d,{className:`w-5 h-5 flex-shrink-0 ${h}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm line-clamp-1",children:u.alert_title}),u.contact_name&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:u.contact_name}),u.alert_description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mt-1",children:u.alert_description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:CG(new Date(u.created_at),{addSuffix:!0})})]})]})},u.id)})})]})]})},Ee=()=>{var m,y;const[e,t]=g.useState(!1),{user:n,signOut:r,subscribed:a,subscriptionTier:i}=Ie(),o=cs(),{count:l,markAsRead:c}=Iwe(),{shouldShowNotification:u}
755=s2(),d=async()=>{await r(),o("/")},h=p=>p.split(" ").map(x=>x[0]).join("").toUpperCase(),f=()=>{var p;return(p=n==null?void 0:n.user_metadata)!=null&&p.full_name?n.user_metadata.full_name:n!=null&&n.email?n.email.split("@")[0]:"User"};return s.jsx("nav",{className:"fixed top-0 left-0 right-0 bg-white border-b border-gray-200 z-50",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex justify-between items-center h-16",children:[s.jsxs(ee,{to:"/",className:"flex items-center space-x-2",children:[s.jsx("div",{className:"w-8 h-8 bg-gradient-to-r from-orange-500 to-red-600 rounded-lg flex items-center justify-center",children:s.jsx("span",{className:"text-white font-bold text-sm",children:"S"})}),s.jsxs("div",{className:"flex flex-col leading-none",children:[s.jsx("span",{className:"text-xl font-bold text-gray-900",children:"Slay"}),s.jsx("span",{className:"text-[10px] text-muted-foreground -mt-0.5",children:"Beta"})]})]}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx(ee,{to:"/",className:"text-gray-700 hover:text-orange-600 font-medium transition-colors",children:"Home"}),s.jsx(ee,{to:"/scrape",className:"text-gray-700 hover:text-orange-600 font-medium transition-colors",children:"Research"}),s.jsx(ee,{to:"/signals",className:"text-gray-700 hover:text-orange-600 font-medium transition-colors",children:"Signals"}),s.jsx(ee,{to:"/people",className:"text-gray-700 hover:text-orange-600 font-medium transition-colors",children:"People"}),s.jsxs(Fu,{children:[s.jsxs(Bu,{className:"flex items-center space-x-1 text-gray-700 hover:text-orange-600 font-medium transition-colors",children:[s.jsx("span",{children:"Companies"}),s.jsx(hc,{className:"w-4 h-4"})]}),s.jsxs(xc,{align:"start",className:"w-56",children:[s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/companies",className:"flex items-center space-x-2",children:[s.jsx(tt,{className:"w-4 h-4"}),s.jsx("span",{children:"All Companies"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/recently-funded",className:"flex items-center space-x-2",children:[s.jsx(ze,{className:"w-4 h-4"}),s.jsx("span",{children:"Recently Funded"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/hiring-spike",className:"flex items-center space-x-2",children:[s.jsx(At,{className:"w-4 h-4"}),s.jsx("span",{children:"Hiring Spikes"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/product-launch",className:"flex items-center space-x-2",children:[s.jsx(Tn,{className:"w-4 h-4"}),s.jsx("span",{children:"Product Launches"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/leadership-change",className:"flex items-center space-x-2",children:[s.jsx(At,{className:"w-4 h-4"}),s.jsx("span",{children:"Leadership Change"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/tech-stack-change",className:"flex items-center space-x-2",children:[s.jsx(Tn,{className:"w-4 h-4"}),s.jsx("span",{children:"Tech Stack Change"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/press-coverage",className:"flex items-center space-x-2",children:[s.jsx(va,{className:"w-4 h-4"}),s.jsx("span",{children:"Press Coverage"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/ma-activity",className:"flex items-center space-x-2",children:[s.jsx(ze,{className:"w-4 h-4"}),s.jsx("span",{children:"M&A Activity"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/newsletter-sponsor",className:"flex items-center space-x-2","data-tour":"newsletter-link",children:[s.jsx(va,{className:"w-4 h-4"}),s.jsx("span",{children:"Newsletter Sponsor"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/social-buzz",className:"flex items-center space-x-2",children:[s.jsx(va,{className:"w-4 h-4"}),s.jsx("span",{children:"Social Buzz"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/strategic-partnership",className:"flex items-center space-x-2",children:[s.jsx(mE,{className:"w-4 h-4"}),s.jsx("span",{children:"Strategic Partnership"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/event-activity",className:"flex items-center space-x-2",children:[s.jsx(sn,{className:"w-4 h-4"}),s.jsx("span",{children:"Event Activity"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/cost-cutting",className:"flex items-center space-x-2",children:[s.jsx(Xq,{className:"w-4 h-4"}),s.jsx("span",{children:"Cost Cutting"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/legal-challenge",className:"flex items-center space-x-2",children:[s.jsx(MA,{className:"w-4 h-4"}),s.jsx("span",{children:"Legal Challenge"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/major-customer-announcements",className:"flex items-center space-x-2",children:[s.jsx(ple,{className:"w-4 h-4"}),s.jsx("span",{children:"Major Customer Announcements"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/budget-increase",className:"flex items-center space-x-2",children:[s.jsx(ze,{className:"w-4 h-4"}),s.jsx("span",{children:"Budget Increase"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/increased-ad-spend",className:"flex items-center space-x-2",children:[s.jsx(Fn,{className:"w-4 h-4"}),s.jsx("span",{children:"Increased Ad Spend"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/awards-recognition",className:"flex items-center space-x-2",children:[s.jsx(Mn,{className:"w-4 h-4"}),s.jsx("span",{children:"Awards & Recognition"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/ipo-filing",className:"flex items-center space-x-2",children:[s.jsx(Ba,{className:"w-4 h-4"}),s.jsx("span",{children:"IPO Filing"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/geographic-expansion",className:"flex items-center space-x-2",children:[s.jsx(Dn,{className:"w-4 h-4"}),s.jsx("span",{children:"Geographic Expansion"})]})})]})]}),s.jsxs(Fu,{children:[s.jsxs(Bu,{className:"flex items-center space-x-1 text-gray-700 hover:text-orange-600 font-medium transition-colors",children:[s.jsx("span",{children:"Pitch"}),s.jsx(hc,{className:"w-4 h-4"})]}),s.jsxs(xc,{align:"start",className:"w-56",children:[s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/seo-organic",className:"flex items-center space-x-2",children:[s.jsx(tn,{className:"w-4 h-4"}),s.jsx("span",{children:"SEO & Organic Growth"})]})}
755),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/outbound-sales",className:"flex items-center space-x-2",children:[s.jsx(At,{className:"w-4 h-4"}),s.jsx("span",{children:"Outbound Sales"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/paid-ads",className:"flex items-center space-x-2",children:[s.jsx(ze,{className:"w-4 h-4"}),s.jsx("span",{children:"Paid Advertising"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/ux-ui",className:"flex items-center space-x-2",children:[s.jsx(yle,{className:"w-4 h-4"}),s.jsx("span",{children:"UX/UI Design"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/gtm-positioning",className:"flex items-center space-x-2",children:[s.jsx(tn,{className:"w-4 h-4"}),s.jsx("span",{children:"GTM & Positioning"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/ai-integration",className:"flex items-center space-x-2",children:[s.jsx(hE,{className:"w-4 h-4"}),s.jsx("span",{children:"AI Integration"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/growth-marketing",className:"flex items-center space-x-2",children:[s.jsx(ze,{className:"w-4 h-4"}),s.jsx("span",{children:"Growth Marketing"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/revenue-operations",className:"flex items-center space-x-2",children:[s.jsx(Fn,{className:"w-4 h-4"}),s.jsx("span",{children:"Revenue Operations"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/conversion-rate-optimization",className:"flex items-center space-x-2",children:[s.jsx(os,{className:"w-4 h-4"}),s.jsx("span",{children:"Conversion Rate Optimization"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/product-marketing-analytics",className:"flex items-center space-x-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),s.jsx("span",{children:"Product & Marketing Analytics"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/customer-success",className:"flex items-center space-x-2",children:[s.jsx(zn,{className:"w-4 h-4"}),s.jsx("span",{children:"Customer Success"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/content-marketing",className:"flex items-center space-x-2",children:[s.jsx(gd,{className:"w-4 h-4"}),s.jsx("span",{children:"Content Marketing"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/demand-generation",className:"flex items-center space-x-2",children:[s.jsx(mle,{className:"w-4 h-4"}),s.jsx("span",{children:"Demand Generation"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/social-media-community-growth",className:"flex items-center space-x-2",children:[s.jsx(At,{className:"w-4 h-4"}),s.jsx("span",{children:"Social Media & Community Growth"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/security-data-privacy",className:"flex items-center space-x-2",children:[s.jsx(Ya,{className:"w-4 h-4"}),s.jsx("span",{children:"Security & Data Privacy"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/devops-platform-enablement",className:"flex items-center space-x-2",children:[s.jsx(vo,{className:"w-4 h-4"}),s.jsx("span",{children:"DevOps & Platform Enablement"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/pitch",className:"flex items-center space-x-2",children:[s.jsx(st,{className:"w-4 h-4"}),s.jsx("span",{children:"View All Pitches"})]})})]})]}),s.jsx(ee,{to:"/chat",className:"text-gray-700 hover:text-orange-600 font-medium transition-colors",children:"Slaygent"}),s.jsx(ee,{to:"/pricing",className:"text-orange-600 hover:text-orange-700 font-medium transition-colors",children:"Pricing"}),s.jsx("a",{href:"https://agency.slaygent.ai/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-700 hover:text-orange-600 font-medium transition-colors",children:"Agency"})]}),s.jsx("div",{className:"hidden md:flex items-center space-x-4",children:n?s.jsxs(s.Fragment,{children:[s.jsxs(U,{variant:"ghost",size:"sm",className:"relative p-2 hover:bg-gray-100",onClick:()=>o("/onboarding"),title:"Getting Started Checklist",children:[s.jsx(rl,{className:"w-5 h-5"}),u&&s.jsx(Mwe,{})]}),s.jsxs(U,{variant:"ghost",size:"sm",className:"relative p-2 hover:bg-gray-100",onClick:()=>{o("/profile?tab=results"),c()},children:[s.jsx(dE,{className:"w-5 h-5"}),l>0&&s.jsx(fe,{variant:"destructive",className:"absolute -top-1 -right-1 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:l>99?"99+":l})]}),s.jsx(vje,{}),s.jsxs(Fu,{children:[s.jsx(Bu,{asChild:!0,children:s.jsxs(U,{variant:"ghost",className:"flex items-center space-x-2 hover:bg-gray-100",children:[s.jsxs(Ks,{className:"w-6 h-6",children:[s.jsx(ni,{src:(m=n.user_metadata)==null?void 0:m.avatar_url}),s.jsx(Ys,{className:"text-xs",children:h(f())})]}),s.jsx("span",{className:"text-sm font-medium",children:f()}),a&&s.jsx(fc,{className:"w-4 h-4 text-yellow-500"}),s.jsx(hc,{className:"w-4 h-4"})]})}),s.jsxs(xc,{align:"end",className:"w-56",children:[s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/profile",className:"flex items-center space-x-2",children:[s.jsx(Ti,{className:"w-4 h-4"}),s.jsx("span",{children:"Profile"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/saved-companies",className:"flex items-center space-x-2","data-tour":"saved-companies-link",children:[s.jsx(zn,{className:"w-4 h-4"}),s.jsx("span",{children:"Saved Companies"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/saved-contacts",className:"flex items-center space-x-2",children:[s.jsx(At,{className:"w-4 h-4"}),s.jsx("span",{children:"Saved Contacts"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/contact-analytics",className:"flex items-center space-x-2",children:[s.jsx(os,{className:"w-4 h-4"}),s.jsx("span",{children:"Contact Analytics"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/matchmaking",className:"flex items-center space-x-2",children:[s.jsx(mE,{className:"w-4 h-4"}),s.jsx("span",{children:"Matchmaking"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/signal-analytics",className:"flex items-center space-x-2","data-tour":"analytics-link",children:[s.jsx(os,{className:"w-4 h-4"}),s.jsx("span",{children:"Signal Analytics"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/pitch-analytics",className:"flex items-center space-x-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),s.jsx("span",{children:"Pitch Analytics"})]})}),s.jsx(Qe,{asChild:!0,children:s.jsxs(ee,{to:"/profile?tab=settings",className:"flex items-center space-x-2",children:[s.jsx(vo,{className:"w-4 h-4"}),s.jsx("span",{children:"API Settings (BYOK)"})]})}),a&&s.jsxs(Qe,{className:"flex items-center space-x-2",children:[s.jsx(fc,{className:"w-4 h-4 text-yellow-500"}),s.jsxs("span",{className:"capitalize",children:[i||"Premium"," Plan"]})]}),s.jsx(ej,{}),s.jsxs(Qe,{onClick:d,className:"flex items-center space-x-2 text-red-600",children:[s.jsx(Vq,{className:"w-4 h-4"}),s.jsx("span",{children:"Sign Out"})]})]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(U,{variant:"outline",asChild:!0,children:s.jsx(ee,{to:"/auth",children:"Sign In"})}),s.jsx(U,{asChild:!0,className:"bg-orange-600 hover:bg-orange-700 text-white",children:s.jsx(ee,{to:"/pricing",children:"Get Started"})})]})}),s.jsx("div",{className:"md:hidden",children:s.jsx(U,{variant:"ghost",size:"sm",className:"p-2",onClick:()=>t(!e),children:e?s.jsx(tr,{className:"h-5 w-5"}):s.jsx(gle,{className:"h-5 w-5"})})})]}),e&&s.jsx("div",{className:"md:hidden border-t border-gray-200 py-4",children:s.jsxs("div",{className:"flex flex-col space-y-4",children:[s.jsx(ee,{to:"/",className:"text-gray-700 font-medium",onClick:()=>t(!1),children:"Home"}),s.jsx(ee,{to:"/scrape",className:"text-gray-700 font-medium",onClick:()=>t(!1),children:"Scrape"}),s.jsx(ee,{to:"/signals",className:"text-gray-700 font-medium",onClick:()=>t(!1),children:"Signals"}),s.jsx(ee,{to:"/companies",className:"text-gray-700 font-medium",onClick:()=>t(!1),children:"Companies"}),s.jsx(ee,{to:"/chat",className:"text-gray-700 font-medium",onClick:()=>t(!1),children:"Slaygent"}),s.jsx(ee,{to:"/pricing",className:"text-orange-600 font-medium",onClick:()=>t(!1),children:"Pricing"}),s.jsx("a",{href:"https://agency.slaygent.ai/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-700 font-medium",onClick:()=>t(!1),children:"Agency"}),n?s.jsxs("div",{className:"pt-4 border-t border-gray-200",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsxs(Ks,{className:"w-6 h-6",children:[s.jsx(ni,{src:(y=n.user_metadata)==null?void 0:y.avatar_url}),s.jsx(Ys,{className:"text-xs",children:h(f())})]}),s.jsx("span",{className:"text-sm font-medium",children:f()}),a&&s.jsx(fc,{className:"w-4 h-4 text-yellow-500"})]}),s.jsx(ee,{to:"/profile",className:"block text-gray-700 font-medium mb-2",onClick:()=>t(!1),children:"Profile"}),s.jsx(U,{variant:"ghost",onClick:()=>{d(),t(!1)},className:"text-red-600 justify-start p-0 h-auto font-medium",children:"Sign Out"})]}):s.jsxs("div",{className:"pt-4 border-t border-gray-200 space-y-2",children:[s.jsx(U,{variant:"outline",asChild:!0,className:"w-full",children:s.jsx(ee,{to:"/auth",onClick:()=>t(!1),children:"Sign In"})}),s.jsx(U,{asChild:!0,className:"w-full bg-orange-600 hover:bg-orange-700 text-white",children:s.jsx(ee,{to:"/pricing",onClick:()=>t(!1),children:"Get Started"})})]})]})})]})})},Y=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ve("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
755Y.displayName="Card";const xe=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ve("flex flex-col space-y-1.5 p-6",e),...t}));xe.displayName="CardHeader";const Se=g.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:ve("text-2xl font-semibold leading-none tracking-tight",e),...t}));Se.displayName="CardTitle";const Za=g.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:ve("text-sm text-muted-foreground",e),...t}));Za.displayName="CardDescription";const te=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ve("p-6 pt-0",e),...t}));te.displayName="CardContent";const bje=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ve("flex items-center p-6 pt-0",e),...t}));bje.displayName="CardFooter";const at=g.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:ve("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));at.displayName="Input";const PG=({prefilledDomain:e,prefilledCompany:t})=>{const[n,r]=g.useState(e||""),[a,i]=g.useState(t||""),[o,l]=g.useState(!1),[c,u]=g.useState("idle"),[d,h]=g.useState([]),[f,m]=g.useState(!1),[y,p]=g.useState(!1),[x,v]=g.useState([]),[b,w]=g.useState(!1),{user:S}=Ie(),{toast:j}=Ve(),N=cs(),C=g.useRef(null),_=g.useRef(null);g.useEffect(()=>{C.current&&C.current.focus(),A()},[]);const A=async()=>{try{console.log("🔄 Loading companies from database..."),m(!0);const{data:T,error:F}=await K.from("company_overview").select("id, company_name, domain, short_description, logo_url, industry").order("added_date",{ascending:!1}).limit(1e3);if(F){console.error("❌ Database query error:",F),w(!0);return}if(!T||T.length===0){console.log("📊 No companies found in database"),w(!0);return}console.log("📊 Companies loaded:",T.length);const O=T.map(E=>({id:E.id,company_name:E.company_name||"Unknown",domain:E.domain||"",description:E.short_description||"",logo_url:E.logo_url||`https://logo.clearbit.com/${E.domain}`,date_added:"",industry:E.industry||""})).filter(E=>E.company_name!=="Unknown"&&E.company_name&&(E.domain||E.description));console.log("✅ Transformed companies:",O.length),v(O),w(!0)}catch(T){console.error("❌ Failed to load companies:",T),w(!0)}finally{m(!1)}};g.useEffect(()=>{const T=F=>{_.current&&!_.current.contains(F.target)&&p(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const P=g.useCallback(T=>{if(console.log("🔍 Local search called with:",T),console.log("🔍 Companies loaded:",b),console.log("🔍 Total companies available:",x.length),T.length<2||!b){console.log("🔍 Search cancelled - too short or companies not loaded"),h([]),p(!1);return}console.log("🔍 Searching locally for:",T);const F=T.toLowerCase().trim(),O=D=>D.toLowerCase().replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/$/,""),E=x.filter(D=>{const M=(D.company_name||"").toLowerCase(),X=O(D.domain||""),W=(D.description||"").toLowerCase(),re=M.includes(F),ne=X.includes(F)||X.includes(F.replace(".com","")),le=W.includes(F),ie=F.replace(/\.(com|org|net|co|io|ai|dev)$/,""),ye=X.replace(/\.(com|org|net|co|io|ai|dev)$/,""),pe=ye.includes(ie)||ie.includes(ye),G=re||ne||le||pe;return G&&console.log("✅ Match found:",{name:M,domain:X,searchTerm:F}),G});console.log("🔍 Filtered results count:",E.length),console.log("🔍 Sample results:",E.slice(0,3)),h(E.slice(0,10)),p(E.length>0)},[x,b]);g.useEffect(()=>{const T=setTimeout(()=>{n.trim()?P(n.trim()):(h([]),p(!1))},150);return()=>clearTimeout(T)},[n,P]);const R=T=>T.toLowerCase().replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/$/,""),I=T=>/^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/.test(T),B=T=>{p(!1);const F=(T.company_name||T.domain||"").trim();N(`/companies?search=${encodeURIComponent(F)}`)},$=async()=>
755{if(!S){j({title:"Authentication required",description:"Please sign in to use the domain scraping feature.",variant:"destructive",duration:3e3}),N("/auth");return}const T=R(n);if(!I(T)){j({title:"Invalid domain",description:"Please enter a valid domain (e.g., example.com)",variant:"destructive",duration:3e3});return}l(!0),u("loading"),p(!1);try{const{data:F,error:O}=await K.rpc("increment_daily_scrapes",{p_user_id:S.id});if(O){console.error("Error checking scrape limits:",O),j({title:"Error",description:"Failed to check usage limits. Please try again.",variant:"destructive",duration:3e3}),u("error");return}if(!F){j({title:"Daily limit reached",description:"You've reached your daily scraping limit. Please try again tomorrow or upgrade your plan.",variant:"destructive",duration:5e3}),u("limit_reached");return}const E=await fetch("https://n8n.rohansingh.io/webhook/bulk-enrich-dispatch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:T,requestedBy:S.email||"Unknown User",userId:S.id,timeStamp:new Date().toISOString(),companyName:a||void 0})});if(E.ok)await K.rpc("log_scraping_activity",{p_user_id:S.id,p_domain:T}),u("success"),j({title:"Scraping initiated!",description:`Domain "${T}" has been queued for processing. Results will be available shortly.`,duration:5e3}),r(""),i("");else throw new Error(`Webhook failed with status: ${E.status}`)}catch(F){console.error("Scraping error:",F),await K.rpc("log_scraping_activity",{p_user_id:S.id,p_domain:T}),u("error"),j({title:"Scraping failed",description:"There was an error processing your request. Please try again.",variant:"destructive",duration:3e3})}finally{l(!1),setTimeout(()=>u("idle"),3e3)}},q=()=>{switch(c){case"loading":return s.jsx(Pt,{className:"w-4 h-4 animate-spin"});case"success":return s.jsx(ks,{className:"w-4 h-4"});case"error":case"limit_reached":return s.jsx(Jy,{className:"w-4 h-4"});default:return s.jsx(rl,{className:"w-4 h-4"})}},L=()=>{switch(c){case"loading":return"bg-blue-500 hover:bg-blue-600 text-white";case"success":return"bg-green-500 hover:bg-green-600 text-white";case"error":case"limit_reached":return"bg-red-500 hover:bg-red-600 text-white";default:return"bg-agency-accent hover:bg-agency-accent/90 text-white"}},k=()=>{switch(c){case"loading":return"Processing...";case"success":return"Success!";case"error":return"Try Again";case"limit_reached":return"Limit Reached";default:return"Slay"}};return s.jsxs("div",{className:"relative w-full max-w-2xl mx-auto",ref:_,children:[s.jsx(Y,{className:"bg-white/90 backdrop-blur-sm border-2 border-gray-200 shadow-xl",children:s.jsx(te,{className:"p-8",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Enter Company Domain"}),s.jsx("p",{className:"text-gray-600",children:"Get comprehensive intelligence data in minutes"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(at,{ref:C,type:"text",placeholder:"e.g., openai.com, stripe.com, airbnb.com",value:n,onChange:T=>r(T.target.value),onFocus:()=>d.length>0&&p(!0),className:"h-14 text-lg px-6 pr-12 rounded-xl border-2 border-gray-300 focus:border-agency-accent transition-colors",disabled:o,onKeyPress:T=>T.key==="Enter"&&$()}),s.jsx("div",{className:"absolute right-4 top-1/2 transform -translate-y-1/2",children:f||!b?s.jsx(Pt,{className:"w-5 h-5 text-gray-400 animate-spin"}):s.jsx(st,{className:"w-5 h-5 text-gray-400"})})]}),a&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-gray-600",children:"Company:"}),s.jsx("span",{className:"text-sm bg-gray-100 px-2 py-1 rounded",children:a})]}),s.jsx(U,{onClick:$,disabled:o||!n.trim(),className:`w-full h-14 text-lg font-semibold rounded-xl transition-all duration-300 transform hover:scale-105 ${L()}`,children:s.jsxs("div",{className:"flex items-center gap-3",children:[q(),s.jsx("span",{children:k()})]})})]}),s.jsx(fk,{children:c==="loading"&&s.jsx(he.div,{initial:{opacity:0,height:0}
755,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ze,{className:"w-5 h-5 text-blue-600 animate-bounce"}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-blue-800 font-medium",children:["Analyzing ",R(n)]}),s.jsx("p",{className:"text-blue-600 text-sm",children:"Collecting company data, signals, and intelligence..."})]})]})})}),s.jsxs("div",{className:"text-center text-sm text-gray-500",children:[s.jsx("p",{children:"We'll analyze 100+ data points including funding, team, tech stack, and market signals"}),!S&&s.jsx("p",{className:"text-orange-600 mt-2",children:"Sign in required to scrape companies"})]})]})})}),s.jsx(fk,{children:y&&d.length>0&&s.jsx(he.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"absolute top-full left-0 right-0 z-50 mt-2",children:s.jsx(Y,{className:"bg-white border border-gray-200 shadow-xl",children:s.jsxs(te,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 text-sm text-gray-600",children:[s.jsx(Gs,{className:"h-4 w-4"}),s.jsx("span",{children:"Found existing companies - click to view:"})]}),s.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:d.map(T=>s.jsxs(he.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"flex items-center justify-between p-3 rounded-lg border border-gray-100 hover:border-gray-200 hover:bg-gray-50 transition-all duration-200",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[T.logo_url?s.jsx("img",{src:T.logo_url,alt:`${T.company_name} logo`,className:"w-8 h-8 rounded object-cover flex-shrink-0",onError:F=>{var E;const O=F.target;O.style.display="none",(E=O.nextElementSibling)==null||E.classList.remove("hidden")}}):null,s.jsx(tt,{className:`w-8 h-8 text-gray-400 flex-shrink-0 ${T.logo_url?"hidden":""}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-gray-900 truncate",children:T.company_name||(T.domain?T.domain.replace(/\.(com|io|co|net|org|ai)$/,""):"Unknown Company")}),s.jsx("p",{className:"text-sm text-gray-500 truncate",children:T.domain}),T.industry&&s.jsx("p",{className:"text-xs text-gray-400 truncate",children:T.industry})]})]}),s.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>B(T),className:"text-xs",children:[s.jsx(ar,{className:"w-3 h-3 mr-1"}),"View"]}
755)})]},T.id))})]})})})})]})},wje=()=>s.jsxs("div",{className:"space-y-8 px-2 sm:px-4",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-gray-900 leading-tight",children:s.jsxs("span",{className:"block break-words",children:[s.jsx(he.span,{className:"inline-block bg-gradient-to-r from-orange-600 via-red-500 to-orange-700 bg-clip-text text-transparent font-extrabold",animate:{scale:[1,1.05,1],textShadow:["0 0 0px rgba(251, 146, 60, 0)","0 0 20px rgba(251, 146, 60, 0.3)","0 0 0px rgba(251, 146, 60, 0)"]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:"Slay"})," ","Your Sales with the World's First Community-Powered AI Agent"]})}),s.jsx("p",{className:"text-lg sm:text-xl md:text-2xl text-gray-600 max-w-4xl mx-auto leading-relaxed px-2 break-words",children:"Never search for clients again — this is prospecting, redefined."})]}),s.jsx("div",{className:"mt-12",children:s.jsx(PG,{})})]}),Sje=({itemVariants:e})=>{const t=a=>{const i=a.currentTarget,o=i.getBoundingClientRect(),l=document.createElement("span"),c=Math.max(o.width,o.height),u=a.clientX-o.left-c/2,d=a.clientY-o.top-c/2;l.style.width=l.style.height=c+"px",l.style.left=u+"px",l.style.top=d+"px",l.classList.add("absolute","bg-white/20","rounded-full","animate-ripple"),i.appendChild(l),setTimeout(()=>l.remove(),600)},n=a=>{a.preventDefault(),window.location.href="/pricing"},r=a=>{a.preventDefault(),window.open("https://hello.rohansingh.io/slay-form","_blank")};return s.jsxs(he.div,{variants:e,className:"flex flex-col sm:flex-row justify-center gap-4 mb-12",children:[s.jsxs(he.a,{href:"/pricing",onClick:n,className:"inline-flex items-center justify-center bg-orange-600 hover:bg-orange-700 text-white px-8 py-4 text-lg rounded-lg shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-2 ripple-button group relative overflow-hidden focus:outline-none focus:ring-2 focus:ring-orange-600 focus:ring-offset-2 font-semibold",whileHover:{scale:1.05},whileTap:{scale:.95},onMouseDown:t,"aria-label":"Slay Your Sales with AI-powered prospecting",children:["Get Started",s.jsx(Ws,{className:"ml-2 group-hover:translate-x-1 transition-transform",size:20})]}),s.jsx(he.a,{href:"https://hello.rohansingh.io/slay-form",onClick:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-white hover:bg-gray-50 text-orange-600 border-2 border-orange-600 px-8 py-4 text-lg rounded-lg shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-2 focus:outline-none focus:ring-2 focus:ring-orange-600 focus:ring-offset-2 font-semibold",whileHover:{scale:1.05},whileTap:{scale:.95},"aria-label":"See complete data fields",children:"See Demo"})]})},jje=()=>{const e={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,ease:"easeOut"}}};return s.jsxs("section",{className:"relative min-h-screen bg-gradient-to-br from-slate-50 via-white to-blue-50 overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-grid-slate-100 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))]"}),s.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-gradient-to-br from-agency-accent/20 to-transparent rounded-full blur-3xl"}),s.jsx("div",{className:"absolute bottom-0 left-0 w-96 h-96 bg-gradient-to-tr from-blue-500/10 to-transparent rounded-full blur-3xl"}),s.jsx("div",{className:"relative z-10 container mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-32 pb-16 sm:pb-24",children:s.jsxs("div",{className:"max-w-7xl mx-auto text-center space-y-8 sm:space-y-12",children:[s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},className:"space-y-6",children:s.jsx(wje,{})}),s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},children:s.jsx(Sje,{itemVariants:e})})]})})]})},Nje=()=>{const e=[{icon:st,title:"Deep Company Intelligence",description:"Access 100+ data points including funding history, team changes, tech stack, and market positioning.",isNew:!1},{icon:Bq,title:"AI Matching Score",description:"Get compatibility scores based on your ICP. Know which prospects are most likely to convert.",isNew:!0},{icon:tn,title:"Auto-Pitch Generation",description:"AI-tailored pitch decks and outreach messages based on real-time company signals.",isNew:!0},{icon:ze,title:"Signal Tracking",description:"Monitor funding rounds, product launches, hiring sprees, and market expansion moves.",isNew:!1},{icon:At,title:"Team Intelligence",description:"Track key decision makers, recent hires, and organizational changes in real-time.",isNew:!1},{icon:Tn,title:"Real-time Alerts",description:"Get notified when your prospects show buying signals or enter your ideal customer profile.",isNew:!1}],t={hidden:{opacity:0}
755,visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},n={hidden:{opacity:0,y:30,scale:.9},visible:{opacity:1,y:0,scale:1,transition:{duration:.6,ease:"easeOut"}}};return s.jsx("section",{className:"py-20 px-6 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(he.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6},children:[s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4 text-gray-900",children:"Everything You Need to Slay Your Pitch"}),s.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:"From deep company intelligence to AI-powered matching, we give you the edge over your competition."})]}),s.jsx(he.div,{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",variants:t,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},children:e.map((r,a)=>s.jsx(he.div,{variants:n,className:"relative group",children:s.jsxs(Y,{className:"p-6 h-full bg-gradient-to-br from-white to-gray-50 border-2 border-gray-100 hover:border-agency-accent/30 transition-all duration-300 hover:shadow-xl hover:-translate-y-1 relative overflow-hidden",style:{transform:"perspective(1000px) rotateX(0deg) rotateY(0deg)",transformStyle:"preserve-3d"},onMouseMove:i=>{const o=i.currentTarget.getBoundingClientRect(),l=i.clientX-o.left,c=i.clientY-o.top,u=o.width/2,d=o.height/2,h=(c-d)/10,f=(u-l)/10;i.currentTarget.style.transform=`perspective(1000px) rotateX(${h}deg) rotateY(${f}deg)`},onMouseLeave:i=>{i.currentTarget.style.transform="perspective(1000px) rotateX(0deg) rotateY(0deg)"},children:[r.isNew&&s.jsx(he.div,{className:"absolute top-4 right-4 bg-agency-accent text-white text-xs px-2 py-1 rounded-full font-medium",initial:{y:-10,opacity:0},whileInView:{y:0,opacity:1},viewport:{once:!0},transition:{duration:.3,delay:a*.1+.5},children:"NEW"}),s.jsx("div",{className:"flex items-center gap-4 mb-4",children:s.jsx("div",{className:"bg-agency-accent/10 p-3 rounded-lg group-hover:bg-agency-accent/20 transition-colors duration-300",children:s.jsx(r.icon,{className:"h-6 w-6 text-agency-accent"})})}),s.jsx("h3",{className:"text-lg font-bold mb-2 text-gray-900 group-hover:text-agency-accent transition-colors duration-300",children:r.title}),s.jsx("p",{className:"text-gray-600 group-hover:text-gray-700 transition-colors duration-300",children:r.description}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-agency-accent/0 via-agency-accent/5 to-agency-accent/0 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none"})]})},r.title))})]})})};function Qp(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function UL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function TG(...e){return t=>{let n=!1;const r=e.map(a=>{const i=UL(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():UL(e[a],null)}}}}function rj(...e){return g.useCallback(TG(...e),e)}function _je(e,t){const n=g.createContext(t),r=i=>{const{children:o,...l}=i,c=g.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function a(i){const o=g.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Cje(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];const u=h=>{var v;const{scope:f,children:m,...y}=h,p=((v=f==null?void 0:f[e])==null?void 0:v[c])||l,x=g.useMemo(()=>y,Object.values(y));return s.jsx(p.Provider,{value:x,children:m})};u.displayName=i+"Provider";function d(h,f){var p;const m=((p=f==null?void 0:f[e])==null?void 0:p[c])||l,y=g.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,Eje(a,...t)]}function Eje(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));
vendor: 22,572 bytes, line 755
755return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var kje=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Pje=cS[" useId ".trim().toString()]||(()=>{}),Tje=0;function qN(e){const[t,n]=g.useState(Pje());return kje(()=>{e||n(r=>r??String(Tje++))},[e]),e||(t?`radix-${t}`:"")}var Aje=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Oje=cS[" useInsertionEffect ".trim().toString()]||Aje;function Rje({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,o]=Ije({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:a;{const d=g.useRef(e!==void 0);g.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=g.useCallback(d=>{var h;if(l){const f=Mje(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else i(d)},[l,e,i,o]);return[c,u]}function Ije({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),a=g.useRef(n),i=g.useRef(t);return Oje(()=>{i.current=t},[t]),g.useEffect(()=>{var o;a.current!==n&&((o=i.current)==null||o.call(i,n),a.current=n)},[n,a]),[n,r,i]}function Mje(e){return typeof e=="function"}function WN(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function qL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function AG(...e){return t=>{let n=!1;const r=e.map(a=>{const i=qL(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():qL(e[a],null)}}}}function OG(...e){return g.useCallback(AG(...e),e)}function Dje(e){const t=Lje(e),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,l=g.Children.toArray(i),c=l.find(Fje);if(c){const u=c.props.children,d=l.map(h=>h===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...o,ref:a,children:g.isValidElement(u)?g.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Lje(e){const t=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=zje(a),l=Bje(i,a.props);return a.type!==g.Fragment&&(l.ref=r?AG(r,o):o),g.cloneElement(a,l)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $je=Symbol("radix.slottable");function Fje(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$je}function Bje(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function zje(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Uje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],RG=Uje.reduce((e,t)=>{const n=Dje(`Primitive.${t}`),r=g.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qje(e,t){e&&Ga.flushSync(()=>e.dispatchEvent(t))}function IG(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Wje(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Vje(e,t=globalThis==null?void 0:globalThis.document){const n=Wje(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Hje="DismissableLayer",Ek="dismissableLayer.update",Gje="dismissableLayer.pointerDownOutside",Kje="dismissableLayer.focusOutside",WL,MG=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DG=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(MG),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=OG(t,C=>h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=Qje(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=Zje(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return Vje(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(WL=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),VL(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=WL)}},[d,f,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),VL())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(Ek,C),()=>document.removeEventListener(Ek,C)},[]),s.jsx(RG.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:WN(e.onFocusCapture,N.onFocusCapture),onBlurCapture:WN(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:WN(e.onPointerDownCapture,j.onPointerDownCapture)})});DG.displayName=Hje;var Yje="DismissableLayerBranch",Xje=g.forwardRef((e,t)=>{const n=g.useContext(MG),r=g.useRef(null),a=OG(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(RG.div,{...e,ref:a})});Xje.displayName=Yje;function Qje(e,t=globalThis==null?void 0:globalThis.document){const n=IG(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){LG(Gje,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zje(e,t=globalThis==null?void 0:globalThis.document){const n=IG(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&LG(Kje,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VL(){const e=new CustomEvent(Ek);document.dispatchEvent(e)}function LG(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?qje(a,i):a.dispatchEvent(i)}function HL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $G(...e){return t=>{let n=!1;const r=e.map(a=>{const i=HL(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():HL(e[a],null)}}}}function Jje(...e){return g.useCallback($G(...e),e)}function e1e(e){const t=t1e(e),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,l=g.Children.toArray(i),c=l.find(r1e);if(c){const u=c.props.children,d=l.map(h=>h===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...o,ref:a,children:g.isValidElement(u)?g.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function t1e(e){const t=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=a1e(a),l=s1e(i,a.props);return a.type!==g.Fragment&&(l.ref=r?$G(r,o):o),g.cloneElement(a,l)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var n1e=Symbol("radix.slottable");function r1e(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n1e}function s1e(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function a1e(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var i1e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o1e=i1e.reduce((e,t)=>{const n=e1e(`Primitive.${t}`),r=g.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function GL(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var VN="focusScope.autoFocusOnMount",HN="focusScope.autoFocusOnUnmount",KL={bubbles:!1,cancelable:!0},l1e="FocusScope",FG=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=GL(a),d=GL(i),h=g.useRef(null),f=Jje(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:Ol(h.current,{select:!0})},x=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||Ol(h.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Ol(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const b=new MutationObserver(v);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),b.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){XL.add(m);const p=document.activeElement;if(!l.contains(p)){const v=new CustomEvent(VN,KL);l.addEventListener(VN,u),l.dispatchEvent(v),v.defaultPrevented||(c1e(m1e(BG(l)),{select:!0}),document.activeElement===p&&Ol(l))}return()=>{l.removeEventListener(VN,u),setTimeout(()=>{const v=new CustomEvent(HN,KL);l.addEventListener(HN,d),l.dispatchEvent(v),v.defaultPrevented||Ol(p??document.body,{select:!0}),l.removeEventListener(HN,d),XL.remove(m)},0)}}},[l,u,d,m]);const y=g.useCallback(p=>{if(!n&&!r||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,v=document.activeElement;if(x&&v){const b=p.currentTarget,[w,S]=u1e(b);w&&S?!p.shiftKey&&v===S?(p.preventDefault(),n&&Ol(w,{select:!0})):p.shiftKey&&v===w&&(p.preventDefault(),n&&Ol(S,{select:!0})):v===b&&p.preventDefault()}},[n,r,m.paused]);return s.jsx(o1e.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});FG.displayName=l1e;function c1e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ol(r,{select:t}),document.activeElement!==n)return}function u1e(e){const t=BG(e),n=YL(t,e),r=YL(t.reverse(),e);return[n,r]}function BG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function YL(e,t){for(const n of e)if(!d1e(n,{upTo:t}))return n}function d1e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function h1e(e){return e instanceof HTMLInputElement&&"select"in e}function Ol(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&h1e(e)&&t&&e.select()}}var XL=f1e();function f1e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=QL(e,t),e.unshift(t)},remove(t){var n;e=QL(e,t),(n=e[0])==null||n.resume()}}}function QL(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function m1e(e){return e.filter(t=>t.tagName!=="A")}function ZL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function p1e(...e){return t=>{let n=!1;const r=e.map(a=>{const i=ZL(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():ZL(e[a],null)}}}}function g1e(e){const t=y1e(e),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,l=g.Children.toArray(i),c=l.find(v1e);if(c){const u=c.props.children,d=l.map(h=>h===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...o,ref:a,children:g.isValidElement(u)?g.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function y1e(e){const t=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=w1e(a),l=b1e(i,a.props);return a.type!==g.Fragment&&(l.ref=r?p1e(r,o):o),g.cloneElement(a,l)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x1e=Symbol("radix.slottable");function v1e(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x1e}function b1e(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function w1e(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var S1e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],j1e=S1e.reduce((e,t)=>{const n=g1e(`Primitive.${t}`),r=g.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),N1e=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},_1e="Portal",zG=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);N1e(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Pi.createPortal(s.jsx(j1e.div,{...r,ref:t}),o):null});zG.displayName=_1e;var JL=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{};function C1e(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var sj=e=>{const{present:t,children:n}=e,r=E1e(t),a=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=rj(r.ref,k1e(a));return typeof n=="function"||r.isPresent?g.cloneElement(a,{ref:i}):null};sj.displayName="Presence";function E1e(e){const[t,n]=g.useState(),r=g.useRef(null),a=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[l,c]=C1e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Fv(r.current);i.current=l==="mounted"?u:"none"},[l]),JL(()=>{const u=r.current,d=a.current;if(d!==e){const f=i.current,m=Fv(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),JL(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const p=Fv(r.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=m=>{m.target===t&&(i.current=Fv(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Fv(e){return(e==null?void 0:e.animationName)||"none"}function k1e(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function UG(e){const t=P1e(e),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,l=g.Children.toArray(i),c=l.find(A1e);if(c){const u=c.props.children,d=l.map(h=>h===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...o,ref:a,children:g.isValidElement(u)?g.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function P1e(e){const t=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=R1e(a),l=O1e(i,a.props);return a.type!==g.Fragment&&(l.ref=r?TG(r,o):o),g.cloneElement(a,l)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var T1e=Symbol("radix.slottable");function A1e(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===T1e}function O1e(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function R1e(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var I1e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xx=I1e.reduce((e,t)=>{const n=UG(`Primitive.${t}`),r=g.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),GN=0;function M1e(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??e$()),document.body.insertAdjacentElement("beforeend",e[1]??e$()),GN++,()=>{GN===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GN--}},[])}function e$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qG=hx(),KN=function(){},aj=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:KN,onWheelCapture:KN,onTouchMoveCapture:KN}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,y=e.noIsolation,p=e.inert,x=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,w=e.gapMode,S=ai(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=f,N=dx([n,t]),C=Vt(Vt({},S),a);return g.createElement(g.Fragment,null,d&&g.createElement(j,{sideCar:qG,removeScrollBar:u,shards:h,noRelative:m,noIsolation:y,inert:p,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:w}),o?g.cloneElement(g.Children.only(l),Vt(Vt({},C),{ref:N})):g.createElement(b,Vt({},C,{className:c,ref:N}),l))});aj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};aj.classNames={fullWidth:yc,zeroRight:gc};var kk=!1;if(typeof window<"u")try{var Bv=Object.defineProperty({},"passive",{get:function(){return kk=!0,!0}});window.addEventListener("test",Bv,Bv),window.removeEventListener("test",Bv,Bv)}catch{kk=!1}var zd=kk?{passive:!1}:!1,D1e=function(e){return e.tagName==="TEXTAREA"},WG=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!D1e(e)&&n[t]==="visible")},L1e=function(e){return WG(e,"overflowY")},$1e=function(e){return WG(e,"overflowX")},t$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=VG(e,r);if(a){var i=HG(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},F1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},VG=function(e,t){return e==="v"?L1e(t):$1e(t)},HG=function(e,t){return e==="v"?F1e(t):B1e(t)},z1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},U1e=function(e,t,n,r,a){var i=z1e(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{if(!l)break;var m=HG(e,l),y=m[0],p=m[1],x=m[2],v=p-x-i*y;(y||v)&&VG(e,l)&&(h+=v,f+=y);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));
vendor: 4,099 bytes, lines 755-758
755return(d&&(Math.abs(h)<1||!a)||!d&&(Math.abs(f)<1||!a))&&(u=!0),u},zv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},n$=function(e){return[e.deltaX,e.deltaY]},r$=function(e){return e&&"current"in e?e.current:e},q1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},W1e=function(e){return`
756  .block-interactivity-`.concat(e,` {pointer-events: none;}
757  .allow-interactivity-`).concat(e,` {pointer-events: all;}
758`)},V1e=0,Ud=[];function H1e(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(V1e++)[0],i=g.useState(bm)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=xd([e.lockRef.current],(e.shards||[]).map(r$),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var v=zv(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-v[0],S="deltaY"in p?p.deltaY:b[1]-v[1],j,N=p.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&C==="h"&&N.type==="range")return!1;var _=t$(C,N);if(!_)return!0;if(_?j=C:(j=C==="v"?"h":"v",_=t$(C,N)),!_)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=j),!j)return!0;var A=r.current||j;return U1e(A,x,p,A==="h"?w:S,!0)},[]),c=g.useCallback(function(p){var x=p;if(!(!Ud.length||Ud[Ud.length-1]!==i)){var v="deltaY"in x?n$(x):zv(x),b=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&q1e(j.delta,v)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(r$).filter(Boolean).filter(function(j){return j.contains(x.target)}),S=w.length>0?l(x,w[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(p,x,v,b){var w={name:p,delta:x,target:v,should:b,shadowParent:G1e(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=g.useCallback(function(p){n.current=zv(p),r.current=void 0},[]),h=g.useCallback(function(p){u(p.type,n$(p),p.target,l(p,e.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,zv(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return Ud.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,zd),document.addEventListener("touchmove",c,zd),document.addEventListener("touchstart",d,zd),function(){Ud=Ud.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,zd),document.removeEventListener("touchmove",c,zd),document.removeEventListener("touchstart",d,zd)}},[]);var m=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(i,{styles:W1e(a)}):null,m?g.createElement(mx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function G1e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const K1e=fx(qG,H1e);var GG=g.forwardRef(function(e,t){return g.createElement(aj,Vt({},e,{ref:t,sideCar:K1e}))});GG.classNames=aj.classNames;var ij="Dialog",[KG,aht]=Cje(ij),[Y1e,$i]=KG(ij),YG=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=g.useRef(null),c=g.useRef(null),[u,d]=Rje({prop:r,defaultProp:a??!1,onChange:i,caller:ij});return s.jsx(Y1e,{scope:t,triggerRef:l,contentRef:c,contentId:qN(),titleId:qN(),descriptionId:qN(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};YG.displayName=ij;var XG="DialogTrigger",QG=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(XG,n),i=rj(t,a.triggerRef);return s.jsx(xx.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":h2
vendor: 5,354 bytes, lines 758-762
758(a.open),...r,ref:i,onClick:Qp(e.onClick,a.onOpenToggle)})});QG.displayName=XG;var u2="DialogPortal",[X1e,ZG]=KG(u2,{forceMount:void 0}),JG=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=$i(u2,t);return s.jsx(X1e,{scope:t,forceMount:n,children:g.Children.map(r,o=>s.jsx(sj,{present:n||i.open,children:s.jsx(zG,{asChild:!0,container:a,children:o})}))})};JG.displayName=u2;var B0="DialogOverlay",eK=g.forwardRef((e,t)=>{const n=ZG(B0,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=$i(B0,e.__scopeDialog);return i.modal?s.jsx(sj,{present:r||i.open,children:s.jsx(Z1e,{...a,ref:t})}):null});eK.displayName=B0;var Q1e=UG("DialogOverlay.RemoveScroll"),Z1e=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(B0,n);return s.jsx(GG,{as:Q1e,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(xx.div,{"data-state":h2(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),td="DialogContent",tK=g.forwardRef((e,t)=>{const n=ZG(td,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=$i(td,e.__scopeDialog);return s.jsx(sj,{present:r||i.open,children:i.modal?s.jsx(J1e,{...a,ref:t}):s.jsx(eNe,{...a,ref:t})})});tK.displayName=td;var J1e=g.forwardRef((e,t)=>{const n=$i(td,e.__scopeDialog),r=g.useRef(null),a=rj(t,n.contentRef,r);return g.useEffect(()=>{const i=r.current;if(i)return ux(i)},[]),s.jsx(nK,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qp(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Qp(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:Qp(e.onFocusOutside,i=>i.preventDefault())})}),eNe=g.forwardRef((e,t)=>{const n=$i(td,e.__scopeDialog),r=g.useRef(!1),a=g.useRef(!1);return s.jsx(nK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),nK=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=$i(td,n),c=g.useRef(null),u=rj(t,c);return M1e(),s.jsxs(s.Fragment,{children:[s.jsx(FG,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(DG,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":h2(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(tNe,{titleId:l.titleId}),s.jsx(rNe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),d2="DialogTitle",rK=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(d2,n);return s.jsx(xx.h2,{id:a.titleId,...r,ref:t})});rK.displayName=d2;var sK="DialogDescription",aK=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(sK,n);return s.jsx(xx.p,{id:a.descriptionId,...r,ref:t})});aK.displayName=sK;var iK="DialogClose",oK=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(iK,n);return s.jsx(xx.button,{type:"button",...r,ref:t,onClick:Qp(e.onClick,()=>a.onOpenChange(!1))})});oK.displayName=iK;function h2(e){return e?"open":"closed"}var lK="DialogTitleWarning",[iht,cK]=_je(lK,{contentName:td,titleName:d2,docsSlug:"dialog"}),tNe=({titleId:e})=>{const t=cK(lK),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
759
760If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
761
762For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nNe="DialogDescriptionWarning",rNe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cK(nNe).contentName}}.`;return g.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},uK=YG,dK=QG,hK=JG,oj=eK,lj=tK,cj=rK,uj=aK,fK=oK;const Wr=uK,wd=dK,sNe=hK,mK=g.forwardRef(({className:e,...t},n)=>s.jsx(oj,{ref:n,className:ve("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));mK.displayName=oj.displayName;const Pr=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(sNe,{children:[s.jsx(mK,{}),s.jsxs(lj,{ref:r,className:ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
762nded-lg",e),...n,children:[t,s.jsxs(fK,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(tr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pr.displayName=lj.displayName;const Vr=({className:e,...t})=>s.jsx("div",{className:ve("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Vr.displayName="DialogHeader";const dj=({className:e,...t})=>s.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});dj.displayName="DialogFooter";const Tr=g.forwardRef(({className:e,...t},n)=>s.jsx(cj,{ref:n,className:ve("text-lg font-semibold leading-none tracking-tight",e),...t}));Tr.displayName=cj.displayName;const Uc=g.forwardRef(({className:e,...t},n)=>s.jsx(uj,{ref:n,className:ve("text-sm text-muted-foreground",e),...t}));Uc.displayName=uj.displayName;const pK=({isOpen:e,onClose:t,matchData:n})=>{const{user:r}=Ie(),{settings:a}=gm(),[i,o]=g.useState(null),[l,c]=g.useState(!1);if(!n)return null;const u=m=>m>=80?"text-green-600 bg-green-50 border-green-200":m>=60?"text-yellow-600 bg-yellow-50 border-yellow-200":"text-red-600 bg-red-50 border-red-200",d=m=>m>=80?"Excellent Match":m>=60?"Good Match":"Poor Match",h=async m=>{if(!(!r||i))try{const{error:y}=await K.from("match_feedback").insert({user_id:r.id,match_id:n.company_id,feedback_type:m});if(y)throw y;o(m),Ae.success("Feedback submitted! This helps improve future matches.")}catch(y){console.error("Error submitting feedback:",y),Ae.error("Failed to submit feedback")}},f=async()=>{if(r){c(!0);try{const{data:m}=await K.from("saved_companies").select("id").eq("user_id",r.id).eq("company_id",n.company_id).single();if(m){Ae.info("Company is already in your saved list"),c(!1);return}const{error:y}=await K.from("saved_companies").insert({user_id:r.id,company_id:n.company_id,company_name:n.company_name,company_domain:n.company_domain,notes:`Matchmaking Score: ${n.score}/100
763
764Ice Breaker: ${n.ice_breaker}
765
766Pitch: ${n.pitch_suggestions}`,folder_name:"matchmaking"});if(y)throw y;Ae.success("Company saved with matchmaking insights!")}catch(m){console.error("Error saving company:",m),Ae.error("Failed to save company")}finally{c(!1)}}};return s.jsx(Wr,{open:e,onOpenChange:t,children:s.jsxs(Pr,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[s.jsx(Vr,{children:s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(An,{className:"h-5 w-5 text-yellow-500"}),"Matchmaking Result: ",n.company_name]})}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg border ${u(n.score)}`,children:[s.jsxs("span",{className:"text-2xl font-bold",children:[n.score,"/100"]}),s.jsx("span",{className:"text-sm font-medium",children:d(n.score)})]}),n.cached&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Cached result"})]}),a&&n.potential_deal_value&&s.jsx(Y,{className:"bg-gradient-to-r from-green-50 to-emerald-50 dark:from-green-950/20 dark:to-emerald-950/20 border-green-200 dark:border-green-800",children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("p",{className:"text-sm font-medium text-green-700 dark:text-green-300",children:"Potential Revenue"}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(Fn,{className:"h-5 w-5 text-green-700 dark:text-green-300"}),s.jsx("span",{className:"text-3xl font-bold text-green-900 dark:text-green-100",children:rs(n.potential_deal_value,a.currency_symbol)})]}),s.jsxs("div",{className:"flex items-center justify-center gap-4 text-xs text-green-600 dark:text-green-400",children:[n.deal_probability&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ze,{className:"h-3 w-3"}),s.jsxs("span",{children:[n.deal_probability,"% probability"]})]}),n.expected_close_date&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(sn,{className:"h-3 w-3"}),s.jsxs("span",{children:["Est. close: ",kt(new Date(n.expected_close_date),"MMM dd, yyyy")]})]})]})]})})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ti,{className:"h-4 w-4 text-blue-500"}),s.jsx("h3",{className:"font-semibold",children:"Ice Breaker"})]}),s.jsx("div",{className:"bg-blue-50 p-3 rounded-lg border border-blue-200",children:s.jsxs("p",{className:"text-sm text-blue-800 italic",children:['"',n.ice_breaker,'"']})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tn,{className:"h-4 w-4 text-green-500"}),s.jsx("h3",{className:"font-semibold",children:"Target Positions"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:n.target_positions.map((m,y)=>s.jsx(fe,{variant:"secondary",className:"text-xs",children:m}
766,y))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{className:"h-4 w-4 text-purple-500"}),s.jsx("h3",{className:"font-semibold",children:"Pitch Suggestions"})]}),s.jsx("div",{className:"bg-gray-50 p-3 rounded-lg border",children:s.jsx("div",{className:"text-sm whitespace-pre-line",children:n.pitch_suggestions})})]}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Was this helpful?"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>h("thumbs_up"),disabled:i!==null,className:i==="thumbs_up"?"bg-green-50 text-green-600":"",children:s.jsx(e9,{className:"h-4 w-4"})}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>h("thumbs_down"),disabled:i!==null,className:i==="thumbs_down"?"bg-red-50 text-red-600":"",children:s.jsx(Jq,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(U,{variant:"outline",onClick:f,disabled:l,className:"gap-2",children:[l?s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-current"}):s.jsx(PS,{className:"h-4 w-4"}),"Save Company"]}),s.jsx(U,{onClick:t,children:"Close"})]})]})]})]})})},Xg=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:ve("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
766ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Xg.displayName="Textarea";function Je({className:e,...t}){return s.jsx("div",{className:ve("animate-pulse rounded-md bg-muted",e),...t})}function aNe({signalId:e,signalTitle:t,signalDate:n,onCommentCountChange:r}){var A,P,R,I;const[a,i]=g.useState([]),[o,l]=g.useState(""),[c,u]=g.useState(!1),[d,h]=g.useState(!1),[f,m]=g.useState(!1),[y,p]=g.useState(null),[x,v]=g.useState(null),{toast:b}=Ve();g.useEffect(()=>{(async()=>{var q;if(!e)return;if(/^[0-9a-fA-F-]{36}$/.test(e)){v(e);return}try{let L=K.from("signals_feed").select("id").eq("company_id",e);n&&(L=L.eq("signal_date",n)),t&&(L=L.eq("signal_title",t));const{data:k,error:T}=await L.order("signal_date",{ascending:!1}).limit(1);if(T)throw T;const F=((q=k==null?void 0:k[0])==null?void 0:q.id)||null;v(F),F||console.warn("No matching signals_feed row for company_id",{signalId:e,signalDate:n,signalTitle:t})}catch(L){console.error("Failed to resolve DB signal ID",L),v(null)}})()},[e,t,n]),g.useEffect(()=>{(async()=>{const{data:{user:q}}=await K.auth.getUser();p(q)})();const{data:{subscription:$}}=K.auth.onAuthStateChange((q,L)=>{p((L==null?void 0:L.user)??null)});return()=>$.unsubscribe()},[]);const w=async()=>{var B;if(x){h(!0);try{const{data:$,error:q}=await K.functions.invoke("fetch-signal-comments",{body:{signal_id:x}});if(q)throw q;i($.comments||[]),r==null||r(((B=$.comments)==null?void 0:B.length)||0)}catch($){console.error("Error fetching comments:",$),b({title:"Error",description:"Failed to load comments",variant:"destructive"})}finally{h(!1)}}};g.useEffect(()=>{if(!x)return;w();const B=K.channel(`signal_comments:${x}`).on("postgres_changes",{event:"*",schema:"public",table:"signal_comments",filter:`signal_id=eq.${x}`},$=>{console.log("Real-time comment update:",$),w()}).subscribe();return()=>{K.removeChannel(B)}},[x]);const S=async B=>{var $,q;if(B.preventDefault(),!y){b({title:"Authentication required",description:"Please sign in to comment",variant:"destructive"});return}if(o.trim()){m(!0);try{const{data:L,error:k}=await K.functions.invoke("create-signal-comment",{body:{signal_id:x,company_id:/^[0-9a-zA-Z]+$/.test(e)?e:void 0,signal_date:n,signal_title:t,comment_text:o.trim()}});if(k)throw k;l(""),b({title:"Success",description:"Comment added successfully"})}catch(L){console.error("Error creating comment:",L);let k="Failed to add comment";($=L.message)!=null&&$.includes("wait")?k="Please wait before commenting again":(q=L.message)!=null&&q.includes("1000 characters")&&(k="Comment must be less than 1000 characters"),b({title:"Error",description:k,variant:"destructive"})}finally{m(!1)}}},j=async B=>{if(y)try{const{error:$}=await K.functions.invoke("delete-signal-comment",{body:{comment_id:B}});if($)throw $;b({title:"Success",description:"Comment deleted successfully"})}catch($){console.error("Error deleting comment:",$),b({title:"Error",description:"Failed to delete comment",variant:"destructive"})}},N=B=>y?y.email==="[email protected]"||B.user_id===y.id:!1,C=B=>{const $=new Date(B),L=new Date().getTime()-$.getTime(),k=Math.floor(L/(1e3*60)),T=Math.floor(L/(1e3*60*60)),F=Math.floor(L/(1e3*60*60*24));return k<1?"just now":k<60?`${k}m ago`:T<24?`${T}h ago`:F<7?`${F}d ago`:$.toLocaleDateString()},_=B=>(B==null?void 0:B.split(" ").map($=>$[0]).join("").toUpperCase())||"?";return s.jsxs("div",{className:"border-t border-border/40 mt-4",children:[s.jsxs(U,{variant:"ghost",size:"sm",onClick:()=>u(!c),className:"w-full justify-between p-3 text-muted-foreground hover:text-foreground",disabled:!x,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ti,{className:"w-4 h-4"}),s.jsxs("span",{children:[a.length," ",a.length===1?"comment":"comments"]})]}),c?s.jsx(zq,{className:"w-4 h-4"}):s.jsx(hc,{className:"w-4 h-4"})]}),c&&s.jsxs("div",{className:"p-4 space-y-4",children:[y&&s.jsxs("form",{onSubmit:S,className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ks,{className:"w-6 h-6",children:s.jsx(Ys,{className:"text-[10px] bg-primary/10 text-primary",children:_(((A
766=y==null?void 0:y.user_metadata)==null?void 0:A.full_name)||((P=y==null?void 0:y.user_metadata)==null?void 0:P.name)||(y==null?void 0:y.email)||"User")})}),s.jsxs("span",{children:["Commenting as ",s.jsx("span",{className:"font-medium text-foreground",children:((R=y==null?void 0:y.user_metadata)==null?void 0:R.full_name)||((I=y==null?void 0:y.user_metadata)==null?void 0:I.name)||(y!=null&&y.email?y.email.split("@")[0]:"User")})]})]}),s.jsx(Xg,{value:o,onChange:B=>l(B.target.value),placeholder:x?"Write a comment...":"Loading signal context...",maxLength:1e3,rows:3,className:"resize-none",disabled:!x}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.length,"/1000"]}),s.jsxs(U,{type:"submit",size:"sm",disabled:!o.trim()||f||!x,children:[s.jsx(TS,{className:"w-4 h-4 mr-2"}),f?"Posting...":"Post"]})]})]}),!y&&s.jsx(Y,{className:"border-dashed border-muted-foreground/30",children:s.jsxs(te,{className:"p-4 text-center",children:[s.jsx("p",{className:"text-muted-foreground mb-2",children:"Please sign in to leave a comment"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Join the conversation and share your thoughts"})]})}),s.jsx("div",{className:"space-y-3",children:d?Array.from({length:2}).map((B,$)=>s.jsxs("div",{className:"flex gap-3",children:[s.jsx(Je,{className:"w-8 h-8 rounded-full"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx(Je,{className:"h-4 w-24"}),s.jsx(Je,{className:"h-16 w-full"})]})]},$)):a.length===0?s.jsx(Y,{className:"border-dashed border-muted-foreground/30",children:s.jsxs(te,{className:"p-6 text-center",children:[s.jsx(ti,{className:"w-12 h-12 mx-auto mb-3 text-muted-foreground/50"}),s.jsx("p",{className:"text-muted-foreground mb-1 font-medium",children:"No comments yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Be the first to start the discussion!"})]})}):a.map(B=>{var $,q,L;return s.jsxs("div",{className:"flex gap-3 group p-3 rounded-lg hover:bg-muted/30 transition-colors",children:[s.jsxs(Ks,{className:"w-8 h-8 shrink-0",children:[s.jsx(ni,{src:(($=B.profiles)==null?void 0:$.avatar_url)||void 0}),s.jsx(Ys,{className:"text-xs bg-primary/10 text-primary",children:_(((q=B.profiles)==null?void 0:q.full_name)||B.user_email||"User")})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"font-medium text-sm",children:((L=B.profiles)==null?void 0:L.full_name)||(B.user_email?B.user_email.split("@")[0]:"Anonymous User")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:C(B.created_at)}),N(B)&&s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>j(B.id),className:"opacity-0 group-hover:opacity-100 transition-opacity h-7 w-7 p-0 text-muted-foreground hover:text-destructive ml-auto rounded-md",title:"Delete comment",children:s.jsx(co,{className:"w-3 h-3"})})]}),s.jsx("div",{className:"bg-muted/40 rounded-md p-3 border",children:s.jsx("p",{className:"text-sm whitespace-pre-wrap break-words leading-relaxed",children:B.comment_text})})]})]},B.id)})})]})]})}const qd=({children:e,content:t,storageKey:n,side:r="top",className:a})=>{const[i,o]=g.useState(!0),[l,c]=g.useState(!1),[u,d]=g.useState(!1);g.useEffect(()=>{const f=localStorage.getItem(n);o(f==="true")},[n]);const h=()=>{localStorage.setItem(n,"true"),o(!0),d(!1)};return g.useEffect(()=>{if(!i&&l){const f=setTimeout(()=>{d(!0)},500);return()=>clearTimeout(f)}},[l,i]),i?s.jsx(s.Fragment,{children:e}):s.jsx(YA,{children:s.jsxs(q9,{open:u,onOpenChange:d,children:[s.jsx(W9,{asChild:!0,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:e}),s.jsx(XA,{side:r,className:ve("max-w-xs p-4",a),children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:t.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),s.jsx(U,{onClick:h,size:"sm",className:"w-full mt-2",children:"Got it!"})]})})]})})};var iNe="Separator",s$="horizontal",oNe=["horizontal","vertical"],gK=g.forwardRef((e,t)=>
766{const{decorative:n,orientation:r=s$,...a}=e,i=lNe(r)?r:s$,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return s.jsx(Te.div,{"data-orientation":i,...l,...a,ref:t})});gK.displayName=iNe;function lNe(e){return oNe.includes(e)}var yK=gK;const qa=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>s.jsx(yK,{ref:a,decorative:n,orientation:t,className:ve("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));qa.displayName=yK.displayName;const cNe=({signal:e,isOpen:t,onClose:n})=>{const{toast:r}=Ve(),[a,i]=z.useState(null),[o,l]=z.useState(!0);z.useEffect(()=>{const h=async()=>{if(e){l(!0),console.log("🔍 Resolving public ID for signal:",{id:e.id,db_id:e.db_id,company_id:e.company_id,signal_title:e.signal_title,signal_date:e.signal_date});try{if(e.db_id){console.log("✅ Using db_id directly:",e.db_id),i(e.db_id),l(!1);return}if(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i.test(e.id)){console.log("✅ Signal ID is already a UUID"),i(e.id),l(!1);return}console.log("🔎 Querying database for UUID...");let m=K.from("signals_feed").select("id, company_id, signal_title, signal_date").eq("company_id",e.company_id||e.id);e.signal_date&&(m=m.eq("signal_date",e.signal_date)),e.signal_title&&(m=m.eq("signal_title",e.signal_title));const{data:y,error:p}=await m.order("signal_date",{ascending:!1}).limit(1);if(p)throw console.error("❌ Database query error:",p),p;if(y&&y.length>0)console.log("✅ Resolved UUID:",y[0].id),i(y[0].id);else throw console.warn("⚠️ No matching signal found"),new Error("Signal not found in database")}catch(f){console.error("❌ Failed to resolve public ID:",f),r({title:"Share Link Unavailable",description:"This signal hasn't been synced yet. Please try again in a moment.",variant:"destructive"})}finally{l(!1)}}};t&&e.id&&h()},[e.id,e.db_id,e.signal_title,e.signal_date,t]);const c=a?`${window.location.origin}/signal/${a}`:"",u=a?`<!-- Slaygent.ai Embed - Branding Required -->
767<iframe src="${window.location.origin}/embed/signal/${a}" width="400" height="250" frameborder="0" style="border-radius: 8px;"></iframe>
768<!-- Powered by Slaygent.ai -->`:"",d=[{name:"Twitter/X",icon:LA,color:"hover:bg-black hover:text-white",action:()=>{const h=`🚀 ${e.company_name}: ${e.signal_title}
769
770Shared via @Slaygent_ai`;window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(h)}&url=${encodeURIComponent(c)}`,"_blank")}},{name:"LinkedIn",icon:xa,color:"hover:bg-[#0077b5] hover:text-white",action:()=>{window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(c)}`,"_blank")}},{name:"Email",icon:_a,color:"hover:bg-blue-600 hover:text-white",action:()=>{if(!c){r({title:"Please wait",description:"Signal link is being prepared..."});return}const h=`${e.company_name} – ${e.signal_title}`,f=`I found this interesting signal on Slaygent.ai:
771
772${e.company_name} – ${e.signal_title}
773
774${e.signal_description||"Check it out!"}
775
776View signal: ${c}
777
778—
779Shared via Slaygent.ai`,m=`mailto:?subject=${encodeURIComponent(h)}&body=${encodeURIComponent(f)}`;try{window.open(m,"_self")||(window.location.href=m),setTimeout(()=>{navigator.clipboard.writeText(`${e.company_name} – ${e.signal_title}
780${c}
781
782Shared via Slaygent.ai`),r({title:"Email opened & link copied",description:"Link copied to clipboard as backup"})},500)}catch{navigator.clipboard.writeText(`${e.company_name} – ${e.signal_title}
783${c}
784
785Shared via Slaygent.ai`),r({title:"Link copied to clipboard",description:"Paste this into your email"})}}},{name:"WhatsApp",icon:ti,color:"hover:bg-[#25D366] hover:text-white",action:()=>{const h=`🚀 ${e.company_name}: ${e.signal_title}
786
787${c}
788
789Shared via Slaygent.ai`;window.open(`https://wa.me/?text=${encodeURIComponent(h)}`,"_blank")}},{name:"Copy Link",icon:hle,color:"hover:bg-orange-600 hover:text-white",action:()=>{if(!a){r({title:"Link not ready",description:"Please wait while we generate the share link",variant:"destructive"});return}navigator.clipboard.writeText(c),r({title:"Link copied!",description:"Signal URL copied to clipboard"}),n()}},{name:"Embed Code",icon:Mb,color:"hover:bg-purple-600 hover:text-white",action:()=>{navigator.clipboard.writeText(u),r({title:"Embed code copied!",description:"Paste this on your website. Slaygent.ai branding must remain intact."}),n()}}];return s.jsx(Wr,{open:t,onOpenChange:n,children:s.jsxs(Pr,{className:"sm:max-w-md",children:[s.jsxs(Vr,{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("img",{src:"/lovable-uploads/d2d294c2-7005-4f31-9144-d84ac42b8786.png",alt:"Slaygent.ai",className:"w-6 h-6"}),s.jsx(Tr,{children:"Share Signal"})]}),s.jsxs(Uc,{children:["Share this signal from ",e.company_name," via Slaygent.ai"]})]}),s.jsxs("div",{className:"py-4",children:[s.jsxs("div",{className:"mb-4 p-3 bg-muted rounded-lg",children:[s.jsx("p",{className:"text-sm font-medium mb-1",children:e.company_name}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.signal_title})]}),o&&s.jsx("p",{className:"text-xs text-center text-muted-foreground mb-4",children:"Preparing share link..."}),s.jsx(qa,{className:"my-4"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:d.map(h=>s.jsxs(U,{variant:"outline",onClick:h.action,disabled:o,className:`flex items-center justify-center gap-2 h-auto py-3 transition-colors ${h.color}`,children:[s.jsx(h.icon,{className:"w-4 h-4"}),s.jsx("span",{className:"text-sm",children:h.name})]},h.name))}),s.jsx("div",{className:"mt-6 pt-4 border-t",children:s.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx("img",{src:"/lovable-uploads/d2d294c2-7005-4f31-9144-d84ac42b8786.png",alt:"Slaygent.ai",className:"w-4 h-4"}),s.jsxs("p",{children:["Sharing from ",s.jsx("span",{className:"font-semibold text-orange-600",children:"Slaygent.ai"})," - Real-time startup intelligence"]})]})})]}),s.jsx("div",{className:"mt-4 pt-4 border-t text-center",children:s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("img",{src:"/lovable-uploads/d2d294c2-7005-4f31-9144-d84ac42b8786.png",alt:"Slaygent.ai",className:"w-4 h-4"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Powered by ",s.jsx("strong",{children:"Slaygent.ai"})]})]})})]})})},a$=({signal:e,variant:t="ghost",size:n="sm",className:r=""})=>{const[a,i]=g.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx(U,{variant:t,size:n,onClick:()=>i(!0),className:r,"data-tour":"share-button",children:s.jsx(ex,{className:"w-4 h-4"})}),s.jsx(cNe,{signal:e,isOpen:a,onClose:()=>i(!1)})]})},xK=({signal:e,rank:t,onUpvote:n,isFirst:r=!1})=>{const{user:a,hasMatchmakingAccess:i}=Ie(),{toast:o}=Ve(),[l,c]=g.useState(!1),[u,d]=g.useState(!1),[h,f]=g.useState(null),[m,y]=g.useState(!1),[p,x]=g.useState(!1),v=()=>{const P=e.signal_date,R=!P.includes("T")&&!P.includes(":"),I=new Date(P),B=new Date;if(R){const T=B.toISOString().split("T")[0],F=I.toISOString().split("T")[0];if(T===F)return{isNew:!0,text:"Today"};const O=Math.floor((B.getTime()-I.getTime())/(1e3*60*60*24));return O===1?{isNew:!0,text:"1d ago"}:O<7?{isNew:!1,text:`${O}d ago`}:{isNew:!1,text:I.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}}const $=B.getTime()-I.getTime(),q=Math.floor($/(1e3*60)),L=Math.floor($/(1e3*60*60)),k=Math.floor($/(1e3*60*60*24));return q<5?{isNew:!0,text:"Just added"}:q<60?{isNew:!0,text:`${q}m ago`}:L<24?{isNew:L<6,text:`${L}h ago`}:k<7?{isNew:!1,text:`${k}d ago`}:{isNew:!1,text:I.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}},b=e.upvote_count>=10,w=v(),[,S]=g.useState({});g.useEffect(()=>{const P=setInterval(()=>{S({})},6e4);return()=>clearInterval(P)},[]),g.useEffect(()=>{(async()=>
789{if(a)try{const{data:R,error:I}=await K.rpc("is_company_saved",{p_user_id:a.id,p_company_id:e.company_name});if(I)throw I;c(R)}catch(R){console.error("Error checking if company is saved:",R)}})()},[a,e.company_name]);const j=P=>({funding:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300",hiring:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300",product_launch:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300",partnership:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300",expansion:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-300",acquisition:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300",leadership:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300",tech_stack:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-300"})[P]||"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300",N=P=>P.split("_").map(R=>R.charAt(0).toUpperCase()+R.slice(1)).join(" "),C=P=>P.split(" ").map(R=>R.charAt(0)).join("").toUpperCase().slice(0,2),_=async()=>{if(!a){o({title:"Authentication required",description:"Please sign in to save companies.",variant:"destructive"});return}d(!0);try{if(l){const{error:P}=await K.from("saved_companies").delete().eq("user_id",a.id).eq("company_id",e.company_name);if(P)throw P;c(!1),o({title:"Company removed",description:`${e.company_name} has been removed from your saved companies.`})}else{const{error:P}=await K.from("saved_companies").insert({user_id:a.id,company_id:e.company_name,company_name:e.company_name,company_domain:e.company_domain,company_logo_url:e.company_logo_url});if(P)throw P;c(!0),o({title:"Company saved",description:`${e.company_name} has been added to your saved companies.`})}}catch(P){console.error("Error toggling save status:",P),o({title:"Error",description:"Failed to save company. Please try again.",variant:"destructive"})}finally{d(!1)}},A=async()=>{if(!a){o({title:"Authentication required",description:"Please sign in to use matchmaking.",variant:"destructive"});return}if(!i()){window.location.href="/pricing";return}x(!0);try{const P={name:e.company_name||(e.company_domain?e.company_domain.replace(/\.(com|io|co|net|org|ai)$/,""):"Unknown Company"),domain:e.company_domain||"",description:e.signal_description||"",industry:e.industry||"Unknown",country:e.country||"Unknown",signal_type:e.signal_type||"General",logo_url:e.company_logo_url||"",website_url:e.company_url||"",id:e.company_id||e.id,airtable_id:e.company_id||e.id};console.log("Matchmaking request data:",P);const{data:R,error:I}=await K.functions.invoke("matchmaking-score",{body:{company_data:P}});if(I)throw console.error("Matchmaking error:",I),I;if(!R)throw new Error("No data returned from matchmaking function");f(R),y(!0)}catch(P){console.error("Error running matchmaking:",P),o({title:"Error",description:"Failed to run matchmaking. Please try again.",variant:"destructive"})}finally{x(!1)}};return s.jsxs(Y,{className:"p-4 sm:p-6 hover:shadow-lg transition-shadow duration-200",children:[s.jsxs("div",{className:"block sm:hidden",children:[s.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsxs("span",{className:"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-full text-sm font-medium text-muted-foreground",children:["#",t]})}),s.jsxs(Ks,{className:"w-10 h-10 flex-shrink-0",children:[e.company_logo_url?s.jsx(ni,{src:e.company_logo_url,alt:`${e.company_name} logo`}):null,s.jsx(Ys,{className:"bg-orange-100 text-orange-700 font-semibold text-sm",children:C(e.company_name)})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[s.jsx("h3",{className:"font-semibold text-base text-foreground",children:s.jsx("a",{href:`https://slaygent.ai/companies?search=${encodeURIComponent(e.company_name)}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:e.company_name})}),b&&s.jsx(fe,{className:"bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300",children:"🔥 Trending"}),w.isNew&&w.text&&s.jsxs(fe,{className:"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300",children:[s.jsx(Xn,{className:"w-3 h-3 mr-1"}),w.text]})]}),e.signal_type&&s.jsx(fe,{className:j(e.signal_type),children:N(e.signal_type)})]})]}),e.signal_description&&s.jsx("p",{className:"text-muted-foreground mb-3 text-sm line-clamp-3",children:e.signal_description}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground mb-3",children:[e.country&&s.jsx("span",{children:e.country}),e.industry&&e.country&&s.jsx("span",{children:"•"}),e.industry&&s.jsx("span",{children:e.industry})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(qd,{content:{title:"❤️ Save Companies",description:"Access saved companies from your profile anytime"},storageKey:"signal-save-tooltip",side:"top",children:s.jsx(U,{variant:"ghost",size:"sm",onClick:_,disabled:u,className:ve("p-2 h-8 w-8",l&&"text-red-500"),"data-tour":r?"first-card-save":"save-button",children:s.jsx(zn,{className:ve("w-4 h-4",l&&"fill-current")})})}),s.jsx(qd,{content:{title:"⚡ AI Matchmaking",description:"Get AI-powered fit score (Pro feature)"},storageKey:"signal-matchmaking-tooltip",side:"top",children:s.jsx(U,{variant:"ghost",size:"sm",onClick:A,disabled:p,className:"p-2 h-8 w-8",children:s.jsx(Tn,{className:ve("w-4 h-4",p&&"animate-pulse")})})}),s.jsx(a$,{signal:e,variant:"ghost",size:"sm",className:"p-2 h-8 w-8"}),(e.company_url||e.company_domain)&&s.jsx(U,{variant:"ghost",size:"sm",asChild:!0,className:"p-2 h-8 w-8",children:s.jsx("a",{href:e.company_url||`https://${e.company_domain}`,target:"_blank",rel:"noopener noreferrer",children:s.jsx(ar,{className:"w-4 h-4"})})})]}
789),s.jsx(qd,{content:{title:"👆 Upvote Signals",description:"Your upvotes help surface important signals to the community"},storageKey:"signal-upvote-tooltip",side:"left",children:s.jsxs(U,{variant:e.user_upvoted?"default":"outline",size:"sm",className:ve("flex items-center gap-2 h-8 px-3",e.user_upvoted&&"bg-primary text-primary-foreground hover:bg-primary/90"),onClick:()=>n(e.id),"data-tour":r?"first-card-upvote":"upvote-button",children:[s.jsx(uE,{className:"w-4 h-4"}),s.jsx("span",{className:"text-sm font-medium",children:e.upvote_count})]})})]})]}),s.jsxs("div",{className:"hidden sm:flex gap-4",children:[s.jsxs("div",{className:"flex flex-col items-center gap-2 min-w-0",children:[s.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["#",t]}),s.jsx(qd,{content:{title:"👆 Upvote Signals",description:"Your upvotes help surface important signals"},storageKey:"signal-upvote-tooltip",side:"right",children:s.jsxs(U,{variant:e.user_upvoted?"default":"outline",size:"sm",className:ve("flex flex-col items-center gap-1 h-auto py-2 px-3 min-w-[60px]",e.user_upvoted&&"bg-primary text-primary-foreground hover:bg-primary/90"),onClick:()=>n(e.id),"data-tour":r?"first-card-upvote":"upvote-button",children:[s.jsx(uE,{className:"w-4 h-4"}),s.jsx("span",{className:"text-xs font-medium",children:e.upvote_count})]})})]}),s.jsx("div",{className:"flex-shrink-0",children:s.jsxs(Ks,{className:"w-12 h-12",children:[e.company_logo_url?s.jsx(ni,{src:e.company_logo_url,alt:`${e.company_name} logo`}):null,s.jsx(Ys,{className:"bg-orange-100 text-orange-700 font-semibold",children:C(e.company_name)})]})}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[s.jsx("h3",{className:"font-semibold text-lg text-foreground",children:s.jsx("a",{href:`https://slaygent.ai/companies?search=${encodeURIComponent(e.company_name)}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:e.company_name})}),e.signal_type&&s.jsx(fe,{className:j(e.signal_type),children:N(e.signal_type)}),b&&s.jsx(fe,{className:"bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300",children:"🔥 Trending"}),w.isNew&&w.text&&s.jsxs(fe,{className:"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300",children:[s.jsx(Xn,{className:"w-3 h-3 mr-1"}),w.text]})]}),e.signal_description&&s.jsx("p",{className:"text-muted-foreground mb-3 line-clamp-2",children:e.signal_description}),s.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[e.signal_type&&s.jsx("span",{children:N(e.signal_type)}),e.country&&s.jsxs(s.Fragment,{children:[e.signal_type&&s.jsx("span",{children:"•"}),s.jsx("span",{children:e.country})]}),e.industry&&s.jsxs(s.Fragment,{children:[(e.signal_type||e.country)&&s.jsx("span",{children:"•"}),s.jsx("span",{children:e.industry})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx(qd,{content:{title:"❤️ Save Companies",description:"Access saved companies from your profile"},storageKey:"signal-save-tooltip",side:"bottom",children:s.jsx(U,{variant:"ghost",size:"sm",onClick:_,disabled:u,className:ve("p-2",l&&"text-red-500"),title:l?"Remove from saved":"Save company","data-tour":"save-button",children:s.jsx(zn,{className:ve("w-4 h-4",l&&"fill-current")})})}),s.jsx(qd,{content:{title:"⚡ AI Matchmaking",description:"Get AI-powered fit score (Pro feature)"},storageKey:"signal-matchmaking-tooltip",side:"bottom",children:s.jsx(U,{variant:"ghost",size:"sm",onClick:A,disabled:p,className:"p-2",title:"Run matchmaking analysis",children:s.jsx(Tn,{className:ve("w-4 h-4",p&&"animate-pulse")})})}),s.jsx(a$,{signal:e,variant:"ghost",size:"sm",className:"p-2"}),(e.company_url||e.company_domain)&&s.jsx(U,{variant:"ghost",size:"sm",asChild:!0,className:"p-2",children:s.jsx("a",{href:e.company_url||`https://${e.company_domain}`,target:"_blank",rel:"noopener noreferrer",children:s.jsx(ar,{className:"w-4 h-4"})})})]})]})})]}),s.jsx("div",{"data-tour":"comments-section",children:s.jsx(aNe,{signalId:e.id,signalTitle:e.signal_title,signalDate:e.signal_date})}),m&&h&&s.jsx(pK,{isOpen:m,onClose:()=>y(!1),matchData:h})]})},uNe=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(!0),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(null),[d,h]=g.useState(!1),[f,m]=g.useState(1),[y,p]=g.useState(0),[x,v]=g.useState({search:"",fundingStage:"all",industry:"all",signalType:"all",sortBy:"newest"}),b=9,w=3;g.useEffect(()=>{S(!0)},[x]);const S=async(P=!1)=>{try{P?(r(!0),m(1),p(0)):i(!0),u(null);const R=P?1:f;console.log("Attempting to fetch signals with page:",R);const I=new Date().toISOString().split("T")[0],{data:B,error:$}=await K.functions.invoke("fetch-signals",{body:{date:I,limit:b,offset:(R-1)*b,signal_type:x.signalType!=="all"?x.signalType:void 0,sort_by:x.sortBy}});if($)throw new Error(`Supabase function error: ${$.message}`);const q=(B==null?void 0:B.signals)||B||[];console.log("Received signals data:",q),P?(t(q),m(2)):(t(L=>[...L,...q]),m(L=>L+1)),h(q.length===b),p(0)}catch(R){const I=R instanceof Error?R.message:"Unknown error occurred";console.error("Error fetching signals:",R),y<w?(console.log(`Retrying fetch (attempt ${y+1}/${w})...`),p(B=>B+1),setTimeout(()=>{S(P)},Math.pow(2,y)*1e3)):u(`Failed to load signal data after ${w} attempts: ${I}`)}finally{r(!1),i(!1)}},j=async()=>
789{l(!0);try{await S(!0)}finally{l(!1)}},N=()=>{p(0),S(!0)},C=async P=>{console.log("Upvote signal:",P)},_=()=>{window.location.href="/signals"},A=()=>s.jsxs("div",{className:"space-y-3",children:[s.jsx(Je,{className:"h-4 w-3/4"}),s.jsx(Je,{className:"h-3 w-1/2"}),s.jsx(Je,{className:"h-16 w-full"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Je,{className:"h-6 w-16"}),s.jsx(Je,{className:"h-6 w-20"})]})]});return s.jsx("section",{id:"live-signals",className:"py-20 px-6 bg-gray-50",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsxs(he.div,{className:"flex items-center justify-center gap-4 mb-4",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsx(he.h2,{className:"text-3xl md:text-4xl font-bold text-gray-900",children:"Live Signals Feed"}),s.jsxs(U,{onClick:j,disabled:o||n,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${o?"animate-spin":""}`}),o?"Refreshing...":"Refresh"]})]}),s.jsx(he.p,{className:"text-lg text-gray-600 max-w-3xl mx-auto",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1},children:"Real-time startup intelligence powered by our community. See what companies are getting enriched right now."})]}),s.jsxs(he.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"max-w-6xl mx-auto",children:[c&&s.jsxs("div",{className:"flex items-center justify-center p-8 text-red-600 bg-red-50 rounded-lg mb-6",children:[s.jsx(Gs,{className:"w-5 h-5 mr-2 flex-shrink-0"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("span",{className:"block",children:c}),y>0&&s.jsxs("span",{className:"text-sm text-red-500 mt-1",children:["Retrying... (attempt ",y,"/",w,")"]})]}),s.jsxs(U,{onClick:N,variant:"outline",size:"sm",className:"ml-4",disabled:n||o,children:[s.jsx(dt,{className:"w-4 h-4 mr-2"}),"Retry"]})]}),n?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(9)].map((P,R)=>s.jsx("div",{className:"p-6 bg-white rounded-lg border border-gray-200",children:s.jsx(A,{})},R))}):e.length===0&&!c?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"text-gray-400 mb-4",children:s.jsx(Gs,{className:"w-12 h-12 mx-auto"})}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No signals found"}),s.jsx("p",{className:"text-gray-600",children:"Try adjusting your filters to see more results."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-4",children:e.map((P,R)=>s.jsx(xK,{signal:P,rank:R+1,onUpvote:C},P.id))}),d&&!c&&s.jsx("div",{className:"text-center mt-8",children:s.jsx(U,{onClick:_,variant:"outline",className:"px-8 py-2",children:"View All Signals"})})]}),!n&&!c&&e.length>0&&s.jsx("div",{className:"text-center mt-8",children:s.jsxs("p",{className:"text-sm text-gray-500",children:["Showing ",e.length," signals • Updated in real-time"]})})]})]})})},dNe=()=>{const e=[{icon:"🏢",title:"Company Profile",fields:"Company Name, Legal Name, Description, Aliases, Website, City, Region, Country, Operating Status, Company Type"},{icon:"👥",title:"Leadership & People",fields:"Founder & Title, Founder Start Date, Key Employees & Titles, Employee Count Range"},{icon:"💰",title:"Funding & Investors",fields:"Total Funding (USD), Funding Stage, Last Funding Amount + Date + Type, Number of Rounds, Investors List, Latest/First Investor"},{icon:"🔄",title:"Transactions & Exits",fields:"Total Acquisitions, Companies Acquired, Total Investments, List of Investments, Number of Exits, Companies Exited"},{icon:"📈",title:"Market & Traction Metrics",fields:"Monthly Website Visits, Global SEMrush Rank, MoM Traffic %, Monthly App Downloads, App Stores, Platform Availability"},{icon:"📰",title:"Signals & Extras",fields:"News Summary, Notable Events, Bombora Intent, IT Spend, Unique Product Features, Products & Services"}],t=n=>{n.preventDefault(),console.log("Scrolling to pricing section from DataFields...");const r=document.getElementById("pricing");r?r.scrollIntoView({behavior:"smooth"}):console.error("Pricing section not found")};return s.jsx("section",{id:"data-points",className:"py-20 px-6 bg-gray-50",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4 text-gray-900",children:"All the Data You Need—Out of the Box"}),s.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Slay covers 100+ fields per company. Below is our core set—ask for anything else."}),s.jsxs(Wr,{children:[s.jsx(wd,{asChild:!0,children:s.jsx(U,{variant:"outline",className:"text-agency-accent border-agency-accent hover:bg-agency-accent hover:text-white",children:"Need custom fields?"})}),s.jsxs(Pr,{className:"sm:max-w-md",children:[s.jsx(Vr,{children:s.jsx(Tr,{className:"text-gray-900",children:"Custom Data Fields"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-gray-600",children:"We can source or model additional data points (e.g., ESG scores, cap-table breakdown, patent filings, social media metrics)."}),s.jsx("p",{className:"text-gray-600",children:"Tell us what you need and we'll build it into your data feed."}
789),s.jsx("a",{href:"http://survey.qwary.com/f/AABrqA?identifier=S_wSzSPnasH9Wc_FT15X0J1BuEcPl5gIyGbF90zTixc=",target:"_blank",rel:"noopener noreferrer",className:"w-full inline-flex justify-center items-center bg-agency-accent hover:bg-agency-accent/90 text-white px-6 py-3 rounded-lg font-medium transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-agency-accent focus:ring-offset-2",children:"Contact Sales"})]})]})]})]}),s.jsx(he.div,{className:"grid grid-cols-1 md:grid-cols-2 gap-8",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:e.map((n,r)=>s.jsxs(he.div,{className:"bg-white p-6 rounded-lg shadow-sm border border-gray-200",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:r*.1},children:[s.jsxs("div",{className:"flex items-start mb-3",children:[s.jsx("span",{className:"text-2xl mr-3 flex-shrink-0",role:"img","aria-label":`${n.title} icon`,children:n.icon}),s.jsx("h3",{className:"text-lg font-bold text-gray-900",children:n.title})]}),s.jsxs("p",{className:"text-gray-700 leading-relaxed",children:[n.fields," ",s.jsx("em",{className:"text-gray-500",children:"+ more"})]})]},n.title))}),s.jsx("div",{className:"mt-12 text-center",children:s.jsx("a",{href:"#pricing",onClick:t,className:"inline-flex items-center justify-center bg-agency-accent hover:bg-agency-accent/90 text-white px-8 py-4 text-lg rounded-sm shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 focus:outline-none focus:ring-2 focus:ring-agency-accent focus:ring-offset-2",children:"See Pricing"})})]})})},hNe=[{name:"Sarah Johnson",role:"Sales Director at TechCorp",content:"This AI agent has completely transformed our prospecting process. We've seen a 300% increase in qualified leads and our team is closing deals faster than ever.",rating:5,avatar:"https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=150&h=150&fit=crop&crop=face"},{name:"Michael Chen",role:"Business Development Manager at SalesHub",content:"The insights are incredibly accurate and actionable. What used to take hours of research now takes minutes. Our conversion rate has doubled.",rating:5,avatar:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face"},{name:"Emily Rodriguez",role:"Founder & CEO at GrowthLabs",content:"Finally, a tool that actually understands the nuances of B2B sales. The AI provides context that makes every outreach feel personal and relevant.",rating:5,avatar:"https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=150&h=150&fit=crop&crop=face"},{name:"David Thompson",role:"VP of Sales at CloudScale",content:"The community-powered approach is genius. Real insights from real sales professionals, enhanced by AI. Our team's productivity has skyrocketed.",rating:5,avatar:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face"},{name:"Jessica Martinez",role:"Sales Operations Lead at DataPro",content:"The depth of company intelligence is remarkable. Every prospect feels like a warm lead because we know exactly how to approach them.",rating:5,avatar:"https://images.unsplash.com/photo-1517841905240-472988babdf9?w=150&h=150&fit=crop&crop=face"},{name:"Alex Kumar",role:"Account Executive at SaaS Solutions",content:"This tool has made me a better salesperson. The AI doesn't just give me data—it gives me strategy. My close rate has never been higher.",rating:5,avatar:"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=150&h=150&fit=crop&crop=face"}],fNe=()=>s.jsx("section",{className:"py-16 sm:py-24 bg-slate-50 overflow-hidden",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl",children:[s.jsxs(he.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},className:"text-center mb-12 sm:mb-16",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-gray-900 mb-4 px-2 break-words",children:"Loved by Sales Teams Worldwide"}),s.jsx("p",{className:"text-lg sm:text-xl text-gray-600 max-w-3xl mx-auto px-2 break-words",children:"Join thousands of sales professionals who've transformed their prospecting game"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8 w-full max-w-full",children:hNe.map((e,t)=>s.jsx(he.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:t*.1},viewport:{once:!0},className:"w-full",children:s.jsx(Y,{className:"h-full hover:shadow-lg transition-shadow duration-300 bg-white border-0 shadow-md overflow-hidden",children:s.jsxs(te,{className:"p-6 sm:p-8 flex flex-col h-full",children:[s.jsx("div",{className:"flex items-center mb-4",children:[...Array(e.rating)].map((n,r)=>s.jsx(An,{className:"w-4 h-4 fill-yellow-400 text-yellow-400"},r))}),s.jsx(vle,{className:"w-8 h-8 text-agency-accent/20 mb-4 flex-shrink-0"}),s.jsxs("blockquote",{className:"text-gray-700 text-sm sm:text-base leading-relaxed mb-6 flex-grow break-words",children:['"',e.content,'"']}),s.jsxs("div",{className:"flex items-center gap-4 mt-auto",children:[s.jsx("img",{src:e.avatar,alt:e.name,className:"w-12 h-12 rounded-full object-cover flex-shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-gray-900 text-sm sm:text-base truncate",children:e.name}),s.jsx("p",{className:"text-gray-600 text-xs sm:text-sm truncate",children:e.role})]})]})]})})},t))})]})});var f2="Collapsible",[mNe,vK]=Qs(f2),[pNe,m2]=mNe(f2),bK=g.forwardRef((e,t)=>
789{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:o,...l}=e,[c=!1,u]=Hs({prop:r,defaultProp:a,onChange:o});return s.jsx(pNe,{scope:n,disabled:i,contentId:Vs(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:s.jsx(Te.div,{"data-state":x2(c),"data-disabled":i?"":void 0,...l,ref:t})})});bK.displayName=f2;var wK="CollapsibleTrigger",p2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=m2(wK,n);return s.jsx(Te.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":x2(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:we(e.onClick,a.onOpenToggle)})});p2.displayName=wK;var g2="CollapsibleContent",y2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=m2(g2,e.__scopeCollapsible);return s.jsx(As,{present:n||a.open,children:({present:i})=>s.jsx(gNe,{...r,ref:t,present:i})})});y2.displayName=g2;var gNe=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=e,o=m2(g2,n),[l,c]=g.useState(r),u=g.useRef(null),d=lt(t,u),h=g.useRef(0),f=h.current,m=g.useRef(0),y=m.current,p=o.open||l,x=g.useRef(p),v=g.useRef();return g.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),Vn(()=>{const b=u.current;if(b){v.current=v.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();h.current=w.height,m.current=w.width,x.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),c(r)}},[o.open,r]),s.jsx(Te.div,{"data-state":x2(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p,...i,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:p&&a})});function x2(e){return e?"open":"closed"}var SK=bK,yNe=p2,xNe=y2,pl="Accordion",vNe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[v2,bNe,wNe]=Xy(pl),[hj,oht]=Qs(pl,[wNe,vK]),b2=vK(),jK=z.forwardRef((e,t)=>{const{type:n,...r}=e,a=r,i=r;return s.jsx(v2.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx(_Ne,{...i,ref:t}):s.jsx(NNe,{...a,ref:t})})});jK.displayName=pl;var[NK,SNe]=hj(pl),[_K,jNe]=hj(pl,{collapsible:!1}),NNe=z.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},collapsible:i=!1,...o}=e,[l,c]=Hs({prop:n,defaultProp:r,onChange:a});return s.jsx(NK,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:z.useCallback(()=>i&&c(""),[i,c]),children:s.jsx(_K,{scope:e.__scopeAccordion,collapsible:i,children:s.jsx(CK,{...o,ref:t})})})}),_Ne=z.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...i}=e,[o=[],l]=Hs({prop:n,defaultProp:r,onChange:a}),c=z.useCallback(d=>l((h=[])=>[...h,d]),[l]),u=z.useCallback(d=>l((h=[])=>h.filter(f=>f!==d)),[l]);return s.jsx(NK,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:s.jsx(_K,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(CK,{...i,ref:t})})})}),[CNe,fj]=hj(pl),CK=z.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:a,orientation:i="vertical",...o}=e,l=z.useRef(null),c=lt(l,t),u=bNe(n),h=cx(a)==="ltr",f=we(e.onKeyDown,m=>{var _;if(!vNe.includes(m.key))return;const y=m.target,p=u().filter(A=>{var P;return!((P=A.ref.current)!=null&&P.disabled)}),x=p.findIndex(A=>A.ref.current===y),v=p.length;if(x===-1)return;m.preventDefault();let b=x;const w=0,S=v-1,j=()=>{b=x+1,b>S&&(b=w)},N=()=>{b=x-1,b<w&&(b=S)};switch(m.key){case"Home":b=w;break;case"End":b=S;break;case"ArrowRight":i==="horizontal"&&(h?j():N());break;case"ArrowDown":i==="vertical"&&j();break;case"ArrowLeft":i==="horizontal"&&(h?N():j());break;case"ArrowUp":i==="vertical"&&N();break}const C=b%v;(_=p[C].ref.current)==null||_.focus()});return s.jsx(CNe,{scope:n,disabled:r,direction:a,orientation:i,children:s.jsx(v2.Slot,{scope:n,children:s.jsx(Te.div,{...o,"data-orientation":i,ref:c,onKeyDown:r?void 0:f})})})}),z0="AccordionItem",[ENe,w2]=hj(z0),EK=z.forwardRef((e,t)=>
789{const{__scopeAccordion:n,value:r,...a}=e,i=fj(z0,n),o=SNe(z0,n),l=b2(n),c=Vs(),u=r&&o.value.includes(r)||!1,d=i.disabled||e.disabled;return s.jsx(ENe,{scope:n,open:u,disabled:d,triggerId:c,children:s.jsx(SK,{"data-orientation":i.orientation,"data-state":RK(u),...l,...a,ref:t,disabled:d,open:u,onOpenChange:h=>{h?o.onItemOpen(r):o.onItemClose(r)}})})});EK.displayName=z0;var kK="AccordionHeader",PK=z.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=fj(pl,n),i=w2(kK,n);return s.jsx(Te.h3,{"data-orientation":a.orientation,"data-state":RK(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});PK.displayName=kK;var Pk="AccordionTrigger",TK=z.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=fj(pl,n),i=w2(Pk,n),o=jNe(Pk,n),l=b2(n);return s.jsx(v2.ItemSlot,{scope:n,children:s.jsx(yNe,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...r,ref:t})})});TK.displayName=Pk;var AK="AccordionContent",OK=z.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=fj(pl,n),i=w2(AK,n),o=b2(n);return s.jsx(xNe,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});OK.displayName=AK;function RK(e){return e?"open":"closed"}var kNe=jK,PNe=EK,TNe=PK,IK=TK,MK=OK;const ANe=kNe,DK=g.forwardRef(({className:e,...t},n)=>s.jsx(PNe,{ref:n,className:ve("border-b",e),...t}));DK.displayName="AccordionItem";const LK=g.forwardRef(({className:e,children:t,...n},r)=>s.jsx(TNe,{className:"flex",children:s.jsxs(IK,{ref:r,className:ve("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(hc,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));LK.displayName=IK.displayName;const $K=g.forwardRef(({className:e,children:t,...n},r)=>s.jsx(MK,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:ve("pb-4 pt-0",e),children:t})}));$K.displayName=MK.displayName;const FK=()=>{const e=[{question:"Where does your funding data come from?",answer:"We aggregate data from SEC filings, press releases, investor announcements, and regulatory databases. All data is verified through multiple sources for accuracy."},{question:"How fresh is your acquisition data?",answer:"Our system updates in real-time, with most funding rounds and acquisitions captured within hours of public announcement. Critical alerts are sent immediately."},{question:"How is pricing calculated for large datasets?",answer:"Enterprise pricing is based on data volume, API calls, and custom integrations. We offer volume discounts and can structure deals around your specific needs."},{question:"Can you integrate with our existing CRM?",answer:"Yes, we support integrations with Salesforce, HubSpot, and other major CRM platforms through our API and webhook system."}];return s.jsx("section",{id:"faq",className:"py-20 px-6 bg-gray-50",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("div",{className:"text-center mb-16",children:s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4 text-gray-900",children:"Frequently Asked Questions"})}),s.jsx(ANe,{type:"single",collapsible:!0,className:"space-y-4",children:e.map((t,n)=>s.jsxs(DK,{value:`item-${n}`,className:"bg-white rounded-lg px-6",children:[s.jsx(LK,{className:"text-left text-gray-900 hover:text-orange-600 transition-colors",children:t.question}),s.jsx($K,{className:"text-gray-600",children:t.answer})]},n))})]})})},ONe=pd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-semibold 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:{primary:"bg-orange-600 text-white hover:bg-orange-700 shadow-lg hover:shadow-xl",secondary:"bg-gray-100 text-gray-900 hover:bg-gray-200 border border-gray-300",outline:"border border-orange-600/20 bg-background text-orange-600 hover:bg-orange-50 hover:text-orange-700",ghost:"text-orange-600 hover:bg-orange-50 hover:text-orange-700",link:"text-orange-600 underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},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:"primary",size:"default"}}),U0=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},i)=>{const o=r?yo:"button";return s.jsx(o,{className:ve(ONe({variant:t,size:n,className:e})),ref:i,...a})});U0.displayName="BrandButton";const BK=()=>{const{user:e,createCheckoutSession:t,subscriptionTier:n}=Ie(),[r,a]=g.useState(null),{toast:i}=Ve(),o=async(u,d)=>{if(!e){i({title:"Sign in required",description:"Please sign in to subscribe to a plan.",variant:"destructive"});return}a(u);try{const h=await t(u);h&&window.open(h,"_blank")}catch(h){console.error("Error creating checkout session:",h),i({title:"Error",description:"Failed to start checkout process. Please try again.",variant:"destructive"})}finally{a(null)}},l=[{name:"Starter",price:"€59",priceUnit:"/mo",priceId:"price_1RpiGuSIqeUqO2AKoRCXjBat",features:[{name:"Live Signals Feed",included:!0},{name:"Company Views",included:!0},{name:"Community-enriched companies",included:!0},{name:"Advanced filters and alerts",included:!0},{name:"Research Companies",included:!1},{name:"Matchmaking Runs",included:!1},{name:"Contact Directory",included:!1},{name:"AI Pitch Generator",included:!1},{name:"API Access",included:!1},{name:"CSV Export (30 Days Data)",included:!1},{name:"Priority Support",included:!1}],ctaText:"Start Starter Plan",popular:!1},{name:"Growth",price:"€149",priceUnit:"/mo",priceId:"price_1RpiKoSIqeUqO2AKVTWv7EH4",features:[{name:"Live Signals Feed",included:!0},{name:"Company Views",included:!0},{name:"Community-enriched companies",included:!0},{name:"Research Companies: 200/month",included:!0},{name:"Slaygent Queries: 200/month",included:!0},{name:"Matchmaking Runs: 50/month",included:!0},{name:"Contact Directory",included:!0},{name:"AI Pitch Generator",included:!0},{name:"Advanced filters and alerts",included:!0},{name:"API Access",included:!1},{name:"CSV Export (30 Days Data)",included:!1},{name:"Priority Support",included:!1}],ctaText:"Start Growth Plan",popular:!0},{name:"Pro",price:"€299",priceUnit:"/mo",priceId:"price_1RksCcSIqeUqO2AK9NpoPdkx",features:[{name:"Live Signals Feed",included:!0},{name:"Company Views",included:!0},{name:"Community-enriched companies",included:!0},{name:"Research Companies: 500/month",included:!0},{name:"Slaygent Queries: 500/month",included:!0},{name:"Matchmaking Runs: 200/month",included:!0},{name:"Contact Directory",included:!0},{name:"AI Pitch Generator",included:!0},{name:"API Access",included:!0},{name:"Advanced filters and alerts",included:!0},{name:"CSV Export (30 Days Data)",included:!0}
789,{name:"BYOK (Bring Your Own Key)",included:!0},{name:"Priority Support",included:!0}],ctaText:"Start Pro Plan",popular:!1}],c=u=>n===u.toLowerCase();return s.jsx("section",{id:"pricing",className:"py-16 bg-white transition-colors duration-300",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 text-center",children:[s.jsx("h2",{className:"text-3xl font-bold mb-2 text-gray-900",children:"Early-Bird Pricing"}),s.jsx("p",{className:"text-slate-600 mb-4",children:"Invite-only during beta."}),s.jsx("p",{className:"text-sm text-gray-500 mb-10",children:"One flat fee—no hidden per-seat costs. Every plan gives you the latest company data."}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto",children:l.map((u,d)=>s.jsxs("div",{className:`border rounded-xl p-6 flex flex-col relative transition-all duration-200 hover:-translate-y-1 hover:shadow-xl bg-white ${u.popular?"border-2 border-orange-600 shadow-lg scale-105":"border border-gray-200 hover:shadow-lg"} ${c(u.name)?"ring-2 ring-green-500":""}`,children:[u.popular&&s.jsx("span",{className:"absolute -top-3 right-3 bg-orange-600 text-white text-xs px-2 py-0.5 rounded",children:"Most Popular"}),c(u.name)&&s.jsx("span",{className:"absolute -top-3 left-3 bg-green-600 text-white text-xs px-2 py-0.5 rounded",children:"Current Plan"}),s.jsx("h3",{className:"text-xl font-semibold mb-1 text-gray-900",children:u.name}),s.jsxs("p",{className:"text-4xl font-bold mb-6 text-gray-900",children:[u.price,s.jsx("span",{className:"text-lg font-normal",children:u.priceUnit})]}),s.jsx("ul",{className:"space-y-3 text-left flex-grow",children:u.features.map((h,f)=>s.jsx("li",{className:"flex items-start",children:s.jsxs("div",{className:"flex items-start w-full",children:[h.included?s.jsx(Ko,{className:"h-5 w-5 text-green-500 mt-0.5 mr-3 flex-shrink-0"}):s.jsx(tr,{className:"h-5 w-5 text-gray-400 mt-0.5 mr-3 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 text-sm",children:h.name})]})},f))}),s.jsx(U0,{variant:u.popular?"primary":"secondary",className:"w-full mt-6",onClick:()=>o(u.priceId,u.name),disabled:r===u.priceId||c(u.name),children:r===u.priceId?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"w-4 h-4 mr-2 animate-spin"}),"Processing..."]}):c(u.name)?"Current Plan":u.ctaText})]},d))})]})})},RNe=()=>{const e=[{icon:pf,title:"Bring Your Own Key (BYOK)",description:"Use your own API keys for complete data control and cost transparency. No markup, no limits - just pure value.",benefits:["Lower costs","Data sovereignty","Unlimited usage"],color:"from-blue-500 to-cyan-500"},{icon:st,title:"AI-Powered Auto-Prospecting",description:"Let our AI continuously find and qualify prospects while you sleep. Wake up to a pipeline full of opportunities.",benefits:["24/7 automation","Smart qualification","Real-time alerts"],color:"from-purple-500 to-pink-500"},{icon:ze,title:"Live Business Signals",description:"Track real-time company events, funding rounds, hiring spikes, and growth indicators to time your outreach perfectly.",benefits:["Perfect timing","Higher conversion","Competitive edge"],color:"from-green-500 to-emerald-500"},{icon:nl,title:"Company Intelligence Hub",description:"Deep dive into any company with 50+ data points including tech stack, team changes, financial health, and more.",benefits:["Rich insights","Accurate data","Instant research"],color:"from-orange-500 to-red-500"},{icon:At,title:"Smart Matchmaking",description:"AI-powered matching system that connects you with ideal prospects based on your success patterns and preferences.",benefits:["Higher success rate","Better fit scores","Personalized matches"],color:"from-indigo-500 to-purple-500"},{icon:os,title:"Advanced Analytics",description:"Track your prospecting performance with detailed analytics, c
789onversion rates, and ROI insights to optimize your strategy.",benefits:["Data-driven decisions","Performance tracking","ROI optimization"],color:"from-teal-500 to-blue-500"}],t={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};return s.jsx("section",{className:"py-24 px-6 bg-gradient-to-br from-gray-50 to-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(he.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-primary to-primary/70 bg-clip-text text-transparent",children:"Everything You Need to Dominate B2B Sales"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"From intelligent prospecting to advanced analytics, our platform provides all the tools successful sales teams need to scale their revenue."})]}),s.jsx(he.div,{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",variants:t,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},children:e.map((r,a)=>s.jsx(he.div,{variants:n,className:"group",children:s.jsx(Y,{className:"h-full border-0 shadow-lg hover:shadow-xl transition-all duration-300 group-hover:scale-105 bg-white/80 backdrop-blur-sm",children:s.jsxs(te,{className:"p-8",children:[s.jsx("div",{className:`w-16 h-16 rounded-2xl bg-gradient-to-br ${r.color} p-4 mb-6 group-hover:scale-110 transition-transform duration-300`,children:s.jsx(r.icon,{className:"w-8 h-8 text-white"})}),s.jsx("h3",{className:"text-xl font-semibold mb-3 text-foreground group-hover:text-primary transition-colors",children:r.title}),s.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:r.description}),s.jsx("div",{className:"space-y-2",children:r.benefits.map((i,o)=>s.jsxs("div",{className:"flex items-center text-sm",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-gradient-to-r from-primary to-primary/70 mr-3"}),s.jsx("span",{className:"text-muted-foreground",children:i})]},o))})]})})},r.title))}),s.jsx(he.div,{className:"text-center mt-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},children:s.jsxs("div",{className:"bg-gradient-to-r from-primary/10 to-primary/5 rounded-2xl p-8",children:[s.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:"Ready to Transform Your Sales Process?"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-2xl mx-auto",children:"Join thousands of sales professionals who've already revolutionized their prospecting with our AI-powered platform."}),s.jsxs(U,{size:"lg",className:"group",onClick:()=>window.location.href="/pricing",children:["Get Started for Free",s.jsx(Tn,{className:"w-4 h-4 ml-2 group-hover:animate-pulse"})]})]})})]})})},INe=({value:e,suffix:t="",prefix:n="",duration:r=2,className:a=""})=>{const i=g.useRef(null),o=abe(i,{once:!0,margin:"-50px"}),[l,c]=g.useState(0);return g.useEffect(()=>{if(o){let u,d;const h=f=>{u||(u=f);const m=Math.min((f-u)/(r*1e3),1),y=1-Math.pow(1-m,4);c(Math.floor(e*y)),m<1&&(d=requestAnimationFrame(h))};return d=requestAnimationFrame(h),()=>cancelAnimationFrame(d)}},[o,e,r]),s.jsxs(he.div,{ref:i,className:a,initial:{opacity:0,scale:.5},animate:o?{opacity:1,scale:1}:{},transition:{duration:.5,ease:"easeOut"},children:[n,l.toLocaleString(),t]})},MNe=()=>{const[e,t]=g.useState({companiesAnalyzed:125e3,activeUsers:2500,signalsProcessed:45e3,averageROI:340,timesSaved:15e3,dealsWon:8900});g.useEffect(()=>{const i=setInterval(()=>{t(o=>({companiesAnalyzed:o.companiesAnalyzed+Math.floor(Math.random()*5),activeUsers:o.activeUsers+Math.floor(Math.random()*3),signalsProcessed:o.signalsProcessed+Math.floor(Math.random()*8),averageROI:Math.min(o.averageROI+Math.floor(Math.random()*2),500),timesSaved:o.timesSaved+Math.floor(Math.random()*10),dealsWon:o.dealsWon+Math.floor(Math.random()*4)}))},3e3);return()=>clearInterval(i)},[]);const n=[{icon:nl,value:e.companiesAnalyzed,suffix:"+",label:"Companies Analyzed",color:"from-blue-500 to-cyan-500",description:"Deep intelligence on companies worldwide"},{icon:At,value:e.activeUsers,suffix:"+",label:"Active Users",color:"from-purple-500 to-pink-500",description:"Sales professionals trust our platform"},{icon:Tn,value:e.signalsProcessed,suffix:"+",label:"Signals Processed Daily",color:"from-green-500 to-emerald-500",description:"Real-time business events tracked"},{icon:ze,value:e.averageROI,suffix:"%",label:"Average ROI Increase",color:"from-orange-500 to-red-500",description:"Revenue growth with our platform"},{icon:Xn,value:e.timesSaved,suffix:"+",label:"Hours Saved Monthly",color:"from-indigo-500 to-purple-500",description:"Time saved through automation"},{icon:tn,value:e.dealsWon,suffix:"+",label:"Deals Closed",color:"from-teal-500 to-blue-500",description:"Successful deals facilitated"}],r={hidden:{opacity:0}
789,visible:{opacity:1,transition:{staggerChildren:.1}}},a={hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1,transition:{duration:.5,ease:"easeOut"}}};return s.jsx("section",{className:"py-24 px-6 bg-gradient-to-br from-primary/5 via-white to-primary/10",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(he.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full text-sm font-medium mb-4",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"Live Platform Statistics"]}),s.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["Trusted by Thousands of ",s.jsx("span",{className:"text-primary",children:"Sales Leaders"})]}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Real-time metrics showing the impact our platform has on sales teams worldwide. These numbers update live as our users achieve success."})]}),s.jsx(he.div,{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",variants:r,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},children:n.map((i,o)=>s.jsx(he.div,{variants:a,className:"group",children:s.jsxs("div",{className:"bg-white/80 backdrop-blur-sm rounded-2xl p-8 border border-gray-100 hover:border-primary/20 transition-all duration-300 hover:shadow-xl group-hover:scale-105",children:[s.jsx("div",{className:`w-14 h-14 rounded-xl bg-gradient-to-br ${i.color} p-3 mb-6 group-hover:scale-110 transition-transform duration-300`,children:s.jsx(i.icon,{className:"w-8 h-8 text-white"})}),s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"flex items-baseline gap-1",children:s.jsx(INe,{value:i.value,suffix:i.suffix,className:"text-3xl md:text-4xl font-bold text-foreground",duration:2})}),s.jsx("h3",{className:"text-lg font-semibold text-foreground mt-2",children:i.label})]}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:i.description}),s.jsxs("div",{className:"flex items-center gap-2 mt-4 text-xs text-green-600",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Live Data"]})]})},i.label))}),s.jsx(he.div,{className:"text-center mt-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.3},children:s.jsxs("div",{className:"inline-flex items-center gap-3 text-muted-foreground",children:[s.jsx("div",{className:"flex -space-x-2",children:["https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&h=100&fit=crop&crop=face","https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop&crop=face","https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100&h=100&fit=crop&crop=face","https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100&h=100&fit=crop&crop=face"].map((i,o)=>s.jsx("img",{src:i,alt:`Team member ${o+1}`,className:"w-8 h-8 rounded-full border-2 border-white object-cover"},o))}),s.jsx("span",{children:"Join these successful sales teams and many more"})]})})]})})},DNe=()=>{const e=[{title:"SaaS Startup to Series A Success",company:"TechFlow Solutions",industry:"SaaS",challenge:"Struggled to identify and reach decision-makers at target companies",solution:"Used BYOK + Auto-prospecting to identify 500+ qualified leads monthly",results:[{icon:ze,metric:"340%",label:"Revenue Growth"},{icon:Xn,metric:"15hrs",label:"Saved Weekly"},{icon:tn,metric:"85%",label:"Email Open Rate"}],quote:"Slay Your Sales transformed our prospecting from guesswork to science. We closed our Series A in 8 months.",author:"Sarah Chen, VP Sales",color:"from-blue-500 to-cyan-500"},{title:"Enterprise Sales Team Scales 10x",company:"GlobalTech Corp",industry:"Enterprise Software",challenge:"Manual research taking 80% of sales team's time with poor conversion",solution:"Implemented live signals tracking and company intelligence for perfect timing",results:[{icon:At,metric:"10x",label:"Team Productivity"},{icon:Fn,metric:"$2.5M",label:"Pipeline Value"},{icon:Tn,metric:"60%",label:"Faster Deals"}],quote:"Our sales team now focuses on selling, not searching. The ROI was immediate and substantial.",author:"Michael Rodriguez, Sales Director",color:"from-purple-500 to-pink-500"},{title:"Agency Revolutionizes Client Acquisition",company:"Growth Partners",industry:"Marketing Agency",challenge:"Inconsistent lead flow and difficulty identifying companies ready to invest",solution:"Smart matchmaking + funding signals to target companies with fresh capital",results:[{icon:tn,metric:"250%",label:"Qualified Leads"},{icon:ze,metric:"45%",label:"Close Rate"},{icon:Xn,metric:"5 days",label:"Sales Cycle"}],quote:"We went from feast or famine to a predictable $50k monthly pipeline. Game changer.",author:"David Park, Founder",color:"from-green-500 to-emerald-500"}],t={hidden:{opacity:0}
789,visible:{opacity:1,transition:{staggerChildren:.2}}},n={hidden:{opacity:0,y:50},visible:{opacity:1,y:0,transition:{duration:.6,ease:"easeOut"}}};return s.jsx("section",{className:"py-24 px-6 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(he.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsx(fe,{variant:"secondary",className:"mb-4 text-primary bg-primary/10",children:"Customer Success Stories"}),s.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["Real Results from Real ",s.jsx("span",{className:"text-primary",children:"Sales Teams"})]}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"See how sales teams across different industries have transformed their prospecting and achieved remarkable growth with our platform."})]}),s.jsx(he.div,{className:"space-y-12",variants:t,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},children:e.map((r,a)=>s.jsx(he.div,{variants:n,className:`${a%2===1?"lg:flex-row-reverse":""}`,children:s.jsx(Y,{className:"overflow-hidden border-0 shadow-xl hover:shadow-2xl transition-all duration-500 bg-gradient-to-br from-white to-gray-50/50",children:s.jsx(te,{className:"p-0",children:s.jsxs("div",{className:"lg:flex",children:[s.jsxs("div",{className:"lg:w-2/3 p-8 lg:p-12",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(fe,{className:"mb-3",variant:"outline",children:r.industry}),s.jsx("h3",{className:"text-2xl lg:text-3xl font-bold mb-2 text-foreground",children:r.title}),s.jsx("p",{className:"text-muted-foreground font-medium",children:r.company})]}),s.jsxs("div",{className:"space-y-4 mb-8",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-red-600 mb-2",children:"Challenge:"}),s.jsx("p",{className:"text-muted-foreground",children:r.challenge})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-green-600 mb-2",children:"Solution:"}),s.jsx("p",{className:"text-muted-foreground",children:r.solution})]})]}),s.jsxs("blockquote",{className:"border-l-4 border-primary pl-6 mb-6",children:[s.jsxs("p",{className:"text-lg italic text-foreground mb-2",children:['"',r.quote,'"']}),s.jsxs("cite",{className:"text-sm font-medium text-muted-foreground",children:["— ",r.author]})]})]}),s.jsxs("div",{className:"lg:w-1/3 bg-gradient-to-br from-primary/5 to-primary/10 p-8 lg:p-12 flex flex-col justify-center",children:[s.jsx("h4",{className:"text-xl font-bold mb-6 text-center text-foreground",children:"Key Results"}),s.jsx("div",{className:"space-y-6",children:r.results.map((i,o)=>s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:`w-12 h-12 mx-auto rounded-xl bg-gradient-to-br ${r.color} p-3 mb-3`,children:s.jsx(i.icon,{className:"w-6 h-6 text-white"})}),s.jsx("div",{className:"text-2xl font-bold text-foreground mb-1",children:i.metric}),s.jsx("div",{className:"text-sm text-muted-foreground",children:i.label})]},o))})]})]})})})},r.title))}),s.jsx(he.div,{className:"text-center mt-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.4},children:s.jsxs("div",{className:"bg-gradient-to-r from-primary to-primary/80 rounded-2xl p-8 text-white",children:[s.jsx("h3",{className:"text-2xl font-bold mb-4",children:"Ready to Write Your Success Story?"}),s.jsx("p",{className:"mb-6 opacity-90 max-w-2xl mx-auto",children:"Join these successful companies and thousands of others who've transformed their sales process with our AI-powered platform."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx("a",{href:"/pricing",className:"bg-white text-primary px-6 py-3 rounded-lg font-medium hover:bg-gray-50 transition-colors",children:"Start Free Trial"}),s.jsx("button",{className:"border border-white/30 px-6 py-3 rounded-lg font-medium hover:bg-white/10 transition-colors",onClick:()=>window.open("https://hello.rohansingh.io/slay-form","_blank"),children:"Book a Demo"})]})]})})]})})},LNe=()=>{const e=[{icon:Ya,title:"Enterprise-Grade Security",description:"SOC 2 Type II compliant with end-to-e
789nd encryption for all data transmissions.",features:["256-bit AES encryption","Zero-knowledge architecture","Regular security audits"]},{icon:pf,title:"BYOK Architecture",description:"Bring Your Own Key ensures complete data sovereignty and cost transparency.",features:["Your API keys","No data retention","Direct provider access"]},{icon:Tg,title:"Privacy First",description:"GDPR and CCPA compliant with strict data handling and retention policies.",features:["Data minimization","Right to deletion","Consent management"]},{icon:nl,title:"Secure Data Processing",description:"All data processing happens in secure, isolated environments with audit trails.",features:["Isolated processing","Complete audit logs","Data lineage tracking"]}],t=[{name:"React & TypeScript",description:"Modern, type-safe frontend"},{name:"Supabase",description:"Real-time database & auth"},{name:"Edge Functions",description:"Serverless computing at the edge"},{name:"AI/ML APIs",description:"OpenAI, Claude, custom models"},{name:"WebSockets",description:"Real-time data synchronization"},{name:"PostgreSQL",description:"Robust, scalable database"}],n=[{name:"Salesforce",logo:"🔗"},{name:"HubSpot",logo:"📊"},{name:"Pipedrive",logo:"⚡"},{name:"Slack",logo:"💬"},{name:"Zapier",logo:"🔄"},{name:"Webhooks",logo:"🔌"}],r={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},a={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};return s.jsx("section",{className:"py-24 px-6 bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900 text-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(he.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsxs(fe,{className:"mb-4 bg-green-500/20 text-green-300 border-green-500/30",children:[s.jsx(Ya,{className:"w-3 h-3 mr-1"}),"Enterprise Ready"]}),s.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6",children:["Built for ",s.jsx("span",{className:"bg-gradient-to-r from-green-400 to-blue-400 bg-clip-text text-transparent",children:"Security"})," & Scale"]}),s.jsx("p",{className:"text-xl text-gray-300 max-w-3xl mx-auto",children:"Enterprise-grade security meets cutting-edge technology. Our platform is designed to meet the most stringent security requirements while delivering exceptional performance."})]}),s.jsx(he.div,{className:"grid md:grid-cols-2 gap-8 mb-16",variants:r,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},children:e.map(i=>s.jsx(he.div,{variants:a,children:s.jsx(Y,{className:"bg-gray-800/50 border-gray-700 hover:border-green-500/50 transition-all duration-300 backdrop-blur-sm",children:s.jsx(te,{className:"p-8",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-green-500 to-blue-500 p-3 flex-shrink-0",children:s.jsx(i.icon,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-semibold mb-3 text-white",children:i.title}),s.jsx("p",{className:"text-gray-300 mb-4 leading-relaxed",children:i.description}),s.jsx("div",{className:"space-y-2",children:i.features.map((o,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ks,{className:"w-4 h-4 text-green-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-300",children:o})]},l))})]})]})})})},i.title))}),s.jsxs(he.div,{className:"mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsx("h3",{className:"text-2xl font-bold text-center mb-8 text-white",children:"Powered by Modern Technology"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:t.map((i,o)=>s.jsxs(he.div,{className:"text-center p-6 rounded-xl bg-gray-800/30 border border-gray-700 hover:border-blue-500/50 transition-all duration-300",initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.4,delay:o*.1},children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-gradient-to-br from-blue-500 to-purple-500 flex items-center justify-center",children:s.jsx(Qq,{className:"w-6 h-6 text-white"})}),s.jsx("h4",{className:"font-semibold text-white mb-2",children:i.name}),s.jsx("p",{className:"text-sm text-gray-400",children:i.description})]},i.name))})]}),s.jsxs(he.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsx("h3",{className:"text-2xl font-bold text-center mb-8 text-white",children:"Seamless Integrations"}),s.jsx("div",{className:"grid grid-cols-3 md:grid-cols-6 gap-6",children:n.map((i,o)=>s.jsxs(he.div,{className:"text-center p-4 rounded-xl bg-gray-800/30 border border-gray-700 hover:border-green-500/50 transition-all duration-300 group cursor-pointer",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:o*.1},whileHover:{scale:1.05},children:[s.jsx("div",{className:"text-2xl mb-2",children:i.logo}),s.jsx("p",{className:"text-xs font-medium text-gray-300 group-hover:text-white transition-colors",children:i.name})]},i.name))})]}),s.jsx(he.div,{className:"mt-16 text-center",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:s.jsxs("div",{className:"bg-gradient-to-r from-gray-800 to-gray-700 rounded-2xl p-8 border border-gray-600",children:[s.jsx("h3",{className:"text-xl font-semibold mb-4 text-white",children:"Compliance & Certifications"}),s.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:["SOC 2 Type II","GDPR Compliant","CCPA Ready","ISO 27001","HIPAA Ready"].map(i=>s.jsxs(fe,{variant:"outline",className:"border-green-500/50 text-green-300",children:[s.jsx(ks,{className:"w-3 h-3 mr-1"}),i]},i))})]})})]})})},$Ne=()=>
789{const e=[{category:"Data Access & Control",items:[{feature:"Use Your Own API Keys (BYOK)",us:!0,traditional:!1,highlight:!0},{feature:"No Data Markup Costs",us:!0,traditional:!1,highlight:!0},{feature:"Complete Data Sovereignty",us:!0,traditional:!1},{feature:"Real-time Data Updates",us:!0,traditional:"limited"},{feature:"Unlimited Usage",us:!0,traditional:!1}]},{category:"AI & Automation",items:[{feature:"AI-Powered Auto-Prospecting",us:!0,traditional:!1,highlight:!0},{feature:"24/7 Automated Discovery",us:!0,traditional:!1},{feature:"Smart Lead Qualification",us:!0,traditional:"manual"},{feature:"Automated Pitch Generation",us:!0,traditional:!1},{feature:"Machine Learning Optimization",us:!0,traditional:!1}]},{category:"Intelligence & Insights",items:[{feature:"Live Business Signals",us:!0,traditional:"limited",highlight:!0},{feature:"50+ Company Data Points",us:!0,traditional:"basic"},{feature:"Funding & Growth Tracking",us:!0,traditional:!1},{feature:"Tech Stack Intelligence",us:!0,traditional:!1},{feature:"Team Change Alerts",us:!0,traditional:!1}]},{category:"Performance & Efficiency",items:[{feature:"Setup Time",us:"5 minutes",traditional:"2-4 weeks"},{feature:"Monthly Cost",us:"From $0",traditional:"$500-5000+"},{feature:"Time Saved per Week",us:"15+ hours",traditional:"0 hours"},{feature:"Lead Quality Score",us:"85%+",traditional:"45%"},{feature:"ROI Improvement",us:"300%+",traditional:"0-50%"}]}],t=[{name:"Traditional Tools",description:"Outdated manual processes",price:"$500-5000+",period:"per month",features:["Manual research required","Limited data access","High markup costs","No real-time updates","Basic automation"],cta:"Expensive & Slow",popular:!1,color:"from-gray-400 to-gray-500"},{name:"Slay Your Sales",description:"AI-powered modern solution",price:"From $0",period:"with BYOK",features:["Fully automated prospecting","50+ data points per company","Use your own API keys","Real-time business signals","AI-powered matching"],cta:"Get Started Free",popular:!0,color:"from-primary to-primary/70"}],n={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},r={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0,transition:{duration:.5,ease:"easeOut"}}};return s.jsx("section",{className:"py-24 px-6 bg-gradient-to-br from-gray-50 to-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(he.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsxs(fe,{className:"mb-4 bg-orange-500/10 text-orange-600 border-orange-500/30",children:[s.jsx(Tn,{className:"w-3 h-3 mr-1"}),"Why Switch?"]}),s.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["Traditional Tools vs. ",s.jsx("span",{className:"text-primary",children:"Modern AI"})]}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"See why forward-thinking sales teams are making the switch from expensive, outdated tools to our AI-powered platform."})]}),s.jsx(he.div,{className:"grid md:grid-cols-2 gap-8 mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:t.map((a,i)=>s.jsxs(Y,{className:`relative overflow-hidden border-2 transition-all duration-300 hover:shadow-xl ${a.popular?"border-primary shadow-lg scale-105":"border-gray-200 hover:border-gray-300"}`,children:[a.popular&&s.jsxs("div",{className:"absolute top-0 left-0 right-0 bg-gradient-to-r from-primary to-primary/70 text-white text-center py-2 text-sm font-medium",children:[s.jsx(An,{className:"w-4 h-4 inline mr-1"}),"Recommended"]}),s.jsxs(xe,{className:`text-center ${a.popular?"pt-12":"pt-6"}`,children:[s.jsx(Se,{className:"text-2xl mb-2",children:a.name}),s.jsx("p",{className:"text-muted-foreground mb-4",children:a.description}),s.jsxs("div",{className:"mb-4",children:[s.jsx("span",{className:"text-3xl font-bold text-foreground",children:a.price}),s.jsx("span",{className:"text-muted-foreground ml-1",children:a.period})]})]}),s.jsxs(te,{className:"pt-0",children:[s.jsx("ul",{className:"space-y-3 mb-6",children:a.features.map((o,l)=>s.jsxs("li",{className:"flex items-start gap-2",children:[a.popular?s.jsx(Ko,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}):s.jsx(tr,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:o})]},l))}),s.jsx(U,{className:`w-full ${a.popular?"bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary/70":"bg-gray-400 text-gray-700 cursor-not-allowed"}`,disabled:!a.popular,onClick:()=>a.popular&&(window.location.href="/pricing"),children:a.cta})]})]},a.name))}),s.jsxs(he.div,{className:"bg-white rounded-2xl border border-gray-200 shadow-lg overflow-hidden",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[s.jsx("div",{className:"bg-gradient-to-r from-primary/10 to-primary/5 p-6 border-b",children:s.jsx("h3",{className:"text-2xl font-bold text-center text-foreground",children:"Detailed Feature Comparison"})}),s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6 pb-4 border-b border-gray-200",children:[s.jsx("div",{className:"font-semibold text-muted-foreground",children:"Feature"}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"font-bold text-primary",children:"Slay Your Sales"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Modern AI Platform"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"font-bold text-gray-600",children:"Traditional Tools"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Legacy Solutions"})]})]}
789),s.jsx(he.div,{variants:n,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},children:e.map((a,i)=>s.jsxs("div",{className:"mb-8",children:[s.jsx("h4",{className:"font-semibold text-foreground mb-4 text-lg",children:a.category}),s.jsx("div",{className:"space-y-3",children:a.items.map((o,l)=>s.jsxs(he.div,{variants:r,className:`grid grid-cols-3 gap-4 py-3 px-4 rounded-lg transition-colors ${o.highlight?"bg-primary/5 border border-primary/20":"hover:bg-gray-50"}`,children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx("span",{className:"text-sm text-foreground",children:o.feature}),o.highlight&&s.jsx(An,{className:"w-4 h-4 text-primary ml-2"})]}),s.jsx("div",{className:"flex justify-center items-center",children:typeof o.us=="boolean"?o.us?s.jsx(Ko,{className:"w-5 h-5 text-green-500"}):s.jsx(tr,{className:"w-5 h-5 text-red-500"}):s.jsx(fe,{className:"bg-green-500/10 text-green-700 border-green-500/20",children:o.us})}),s.jsx("div",{className:"flex justify-center items-center",children:typeof o.traditional=="boolean"?o.traditional?s.jsx(Ko,{className:"w-5 h-5 text-green-500"}):s.jsx(tr,{className:"w-5 h-5 text-red-500"}):s.jsx(fe,{variant:"outline",className:"text-gray-600",children:o.traditional})})]},o.feature))})]},a.category))})]})]}),s.jsx(he.div,{className:"text-center mt-12",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},children:s.jsxs("div",{className:"bg-gradient-to-r from-primary to-primary/80 rounded-2xl p-8 text-white",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[s.jsx(Xn,{className:"w-5 h-5"}),s.jsx("span",{className:"font-medium",children:"Limited Time: No Setup Fees"})]}),s.jsx("h3",{className:"text-2xl font-bold mb-4",children:"Ready to Leave Traditional Tools Behind?"}),s.jsx("p",{className:"mb-6 opacity-90 max-w-2xl mx-auto",children:"Join the hundreds of sales teams who've already made the switch and are seeing 3x better results with our modern AI-powered platform."}),s.jsxs(U,{size:"lg",className:"bg-white text-primary hover:bg-gray-50",onClick:()=>window.location.href="/pricing",children:["Start Your Free Trial",s.jsx(Tn,{className:"w-4 h-4 ml-2"})]})]})})]})})},wt=()=>{const e=["Pricing","Blog"];return s.jsx("footer",{className:"bg-gray-900 text-white py-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"md:col-span-1",children:[s.jsx("div",{className:"font-bold text-2xl mb-4 text-orange-500",children:"Slay"}),s.jsx("p",{className:"text-gray-400",children:"AI-Powered Prospecting Platform"}),s.jsx("p",{className:"text-gray-500 text-sm mt-2",children:"The world's first community-powered AI agent built to slay your sales prospecting."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-4",children:"Platform"}),s.jsxs("ul",{className:"space-y-2",children:[e.map(t=>s.jsx("li",{children:s.jsx("a",{href:t==="Blog"?"https://blog.slaygent.ai/":`#${t.toLowerCase().replace(" ","-")}`,className:"text-gray-400 hover:text-orange-500 transition-colors",target:t==="Blog"?"_blank":void 0,rel:t==="Blog"?"noopener noreferrer":void 0,children:t})},t)),s.jsx("li",{children:s.jsx("a",{href:"/signal-analytics",className:"text-gray-400 hover:text-orange-500 transition-colors",children:"Signal Analytics"})}),s.jsx("li",{children:s.jsx("a",{href:"/pitch-analytics",className:"text-gray-400 hover:text-orange-500 transition-colors",children:"Pitch Analytics"})}),s.jsx("li",{children:s.jsx("a",{href:"/pitch",className:"text-gray-400 hover:text-orange-500 transition-colors",children:"View All Pitches"})}),s.jsx("li",{children:s.jsx("a",{href:"/help",className:"text-gray-400 hover:text-orange-500 transition-colors",children:"How to Guides"})}),s.jsx("li",{children:s.jsx("a",{href:"/terms",className:"text-gray-400 hover:text-orange-500 transition-colors",children:"Terms & Conditions"})}),s.jsx("li",{children:s.jsx("a",{href:"/privacy",className:"text-gray-400 hover:text-orange-500 transition-colors",children:"Privacy Policy"})})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-4",children:"Connect"}),s.jsx("div",{className:"flex space-x-4 mb-6",children:s.jsx("a",{href:"https://www.linkedin.com/company/slaygent-ai/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-orange-500 transition-colors",children:s.jsx(xa,{size:24})})}),s.jsx("div",{className:"mt-4",children:s.jsx("a",{href:"https://hello.rohansingh.io/slay-form",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center bg-orange-600 hover:bg-orange-700 text-white px-4 py-2 rounded-lg font-semibold transition-all duration-300 hover:shadow-lg",children:"Slay Your Sales"})})]})]}),s.jsxs("div",{className:"border-t border-gray-800 mt-12 pt-8 text-center text-gray-400",children:[s.jsx("p",{children:"© 2025 Slay. All rights reserved."}),s.jsx("p",{className:"text-sm mt-2",children:"Never search for clients again — this is prospecting, redefined."})]})]})})},zK=z.memo(()=>{const[e,t]=g.useState(!1),[n,r]=g.useState(!1);g.useEffect(()=>{const o=()=>{const l=window.scrollY,c=window.innerHeight,u=document.documentElement.scrollHeight,d=l>c*.3&&l<u-c*1.5&&!n;t(d)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[n]);const a=()=>{r(!0),t(!1)},i=o=>{o.preventDefault();const l=document.getElementById("pricing");l&&l.scrollIntoView({behavior:"smooth"})};
789return s.jsx(fk,{children:e&&s.jsx(he.div,{className:"fixed bottom-6 left-4 right-4 md:left-auto md:right-6 md:w-80 z-40",initial:{opacity:0,y:100,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:100,scale:.8},transition:{duration:.5,type:"spring",damping:20},role:"dialog","aria-labelledby":"floating-cta-title","aria-describedby":"floating-cta-description",children:s.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg shadow-2xl p-4 relative overflow-hidden",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-agency-accent to-red-500"}),s.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-gray-400 hover:text-gray-600 transition-colors focus:outline-none focus:ring-2 focus:ring-agency-accent focus:ring-offset-2 rounded-full p-1","aria-label":"Dismiss notification",children:s.jsx(tr,{size:16})}),s.jsxs("div",{className:"pr-6",children:[s.jsxs("div",{className:"flex items-center space-x-3 mb-3",children:[s.jsx("div",{className:"w-10 h-10 bg-agency-accent rounded-full flex items-center justify-center",children:s.jsx("span",{className:"text-white font-bold text-lg",role:"img","aria-label":"Chart",children:"📊"})}),s.jsxs("div",{children:[s.jsx("h3",{id:"floating-cta-title",className:"font-bold text-gray-900",children:"Ready to 4X Your Leads?"}),s.jsx("p",{id:"floating-cta-description",className:"text-sm text-gray-600",children:"Join 500+ companies already growing"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-2",children:[s.jsxs(he.a,{href:"#pricing",onClick:i,className:"flex-1 bg-agency-accent hover:bg-agency-accent/90 text-white px-4 py-2 rounded-lg text-sm font-medium text-center transition-colors flex items-center justify-center space-x-1 focus:outline-none focus:ring-2 focus:ring-agency-accent focus:ring-offset-2",whileHover:{scale:1.02},whileTap:{scale:.98},"aria-label":"Subscribe now to access funding data",children:[s.jsx("span",{children:"Subscribe Now"}),s.jsx(Ws,{size:14})]}),s.jsx(he.button,{onClick:a,className:"px-4 py-2 border border-gray-300 rounded-lg text-sm text-gray-600 hover:bg-gray-50 transition-colors focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",whileHover:{scale:1.02},whileTap:{scale:.98},"aria-label":"Dismiss this notification",children:"Maybe Later"})]})]})]})})})});zK.displayName="FloatingCTA";const UK=e=>{g.useEffect(()=>{e.title&&(document.title=e.title);const t=(n,r,a)=>{const i=a?`meta[property="${n}"]`:`meta[name="${n}"]`;let o=document.querySelector(i);o||(o=document.createElement("meta"),a?o.setAttribute("property",n):o.setAttribute("name",n),document.head.appendChild(o)),o.content=r};if(e.description&&t("description",e.description),e.keywords&&t("keywords",e.keywords),e.ogTitle&&t("og:title",e.ogTitle,!0),e.ogDescription&&t("og:description",e.ogDescription,!0),e.ogImage&&t("og:image",e.ogImage,!0),e.title&&t("twitter:title",e.title),e.description&&t("twitter:description",e.description),e.canonicalUrl){let n=document.querySelector('link[rel="canonical"]');n||(n=document.createElement("link"),n.rel="canonical",document.head.appendChild(n)),n.href=e.canonicalUrl}if(e.structuredData){let n=document.querySelector('script[type="application/ld+json"]');n||(n=document.createElement("script"),n.type="application/ld+json",document.head.appendChild(n)),n.textContent=JSON.stringify(e.structuredData)}},[e])},ri=({title:e,description:t,keywords:n,ogImage:r,canonicalUrl:a,structuredData:i})=>(UK({title:e,description:t,keywords:n,ogTitle:e,ogDescription:t,ogImage:r,canonicalUrl:a,structuredData:i}),null),FNe=()=>{const e={"@context":"https://schema.org","@type":"SoftwareApplication",name:"Slay Your Sales",description:"The world's first community-powered AI agent for B2B prospecting. Never search for clients again — this is prospecting, redefined.",url:"https://slayyoursales.com",applicationCategory:"BusinessApplication",operatingSystem:"Web",offers:{"@type":"Offer",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"2500"},featureList:["AI-powered auto-prospecting","BYOK (Bring Your Own Key) architecture","Live business signals tracking","Company intelligence database","Real-time funding alerts","Smart matchmaking system","Automated pitch generation","Team intelligence monitoring","Advanced analytics dashboard","Enterprise-grade security"],author:{"@type":"Organization",name:"Slay Your Sales"},creator:{"@type":"Organization",name:"Slay Your Sales"}
789,softwareVersion:"2.0",screenshot:"https://slayyoursales.com/screenshot.png",downloadUrl:"https://slayyoursales.com",supportingData:{"@type":"Dataset",name:"B2B Company Intelligence Database",description:"Comprehensive database of 125,000+ companies with real-time updates"}};return s.jsxs("div",{className:"min-h-screen bg-white scroll-smooth",children:[s.jsx(ri,{title:"Slay Your Sales - AI-Powered B2B Prospecting Platform | BYOK & Live Signals",description:"Revolutionary AI prospecting platform with BYOK architecture, live business signals, and automated lead generation. Transform your sales process with 300% ROI improvement.",keywords:"AI prospecting, BYOK sales tools, automated lead generation, business signals, B2B sales automation, company intelligence, real-time alerts, sales AI, prospecting platform, lead qualification",canonicalUrl:"https://slayyoursales.com/",structuredData:e}),s.jsx(Ee,{}),s.jsx(jje,{}),s.jsx(Nje,{}),s.jsx(uNe,{}),s.jsx(dNe,{}),s.jsx(fNe,{}),s.jsx(FK,{}),s.jsx(BK,{}),s.jsx(RNe,{}),s.jsx(MNe,{}),s.jsx(DNe,{}),s.jsx($Ne,{}),s.jsx(LNe,{}),s.jsx(wt,{}),s.jsx(zK,{}),s.jsx(KO,{}),s.jsx(f9,{})]})},BNe=()=>{const e=cs(),t=()=>{e("/companies")};return s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.5},className:"w-full max-w-2xl mx-auto",children:s.jsx(Y,{className:"bg-gradient-to-br from-blue-50 via-white to-purple-50 border-2 border-blue-200/60 shadow-lg",children:s.jsxs(te,{className:"p-8",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx(he.div,{animate:{rotate:[0,5,-5,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"inline-flex items-center justify-center w-16 h-16 bg-gradient-to-r from-blue-500 to-purple-500 rounded-full mb-4",children:s.jsx(nl,{className:"w-8 h-8 text-white"})}),s.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Where Will My Results Appear?"}),s.jsx("p",{className:"text-gray-600",children:"Your scraped company data will be processed and appear in the Companies page"})]}),s.jsxs("div",{className:"space-y-4 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-white rounded-lg border border-gray-200",children:[s.jsx(ks,{className:"w-5 h-5 text-green-500 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700",children:"Analysis starts immediately after submission"})]}),s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-white rounded-lg border border-gray-200",children:[s.jsx(Xn,{className:"w-5 h-5 text-orange-500 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700",children:"Processing typically takes 2-5 minutes"})]}),s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-white rounded-lg border border-gray-200",children:[s.jsx(nl,{className:"w-5 h-5 text-blue-500 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700",children:"Results automatically appear in Companies page"})]})]}),s.jsx(U,{onClick:t,className:"w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white py-3 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 group",children:s.jsxs("span",{className:"flex items-center justify-center gap-2",children:["View Companies Page",s.jsx(Ws,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})})]})})})},zNe=()=>{const[e]=yd(),t=cs(),[n,r]=g.useState({});g.useEffect(()=>{const o=e.get("domain"),l=e.get("company"),c=e.get("context"),u=e.get("industries");r({domain:o||void 0,company:l||void 0,context:!o&&!l&&c||void 0,industries:u?u.split(","):void 0})},[e]);const a={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},i={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,ease:"easeOut"}}};return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"min-h-screen flex items-center justify-center px-6 pt-32 pb-16",children:s.jsx("div",{className:"max-w-6xl mx-auto text-center",children:s.jsxs(he.div,{variants:a,initial:"hidden",animate:"visible",children:[n.domain&&n.company&&s.jsx(he.div,{variants:i,className:"mb-8",children:s.jsx(Y,{className:"bg-green-50 border-green-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(tn,{className:"w-5 h-5 text-green-600"}),s.jsxs("div",{className:"text-left",children:[s.jsxs("p",{className:"text-sm font-medium text-green-800",children:["Ready to scrape: ",n.company]}),s.jsxs("p",{className:"text-sm text-green-700",children:["Domain: ",n.domain]})]})]}),s.jsxs(U,{variant:"ghost",size:"sm",onClick:()=>window.close(),className:"text-green-600 hover:text-green-700",children:[s.jsx(xo,{className:"w-4 h-4 mr-1"}),"Back to Chat"]})]})})})}),n.context&&!n.domain&&!n.company&&s.jsx(he.div,{variants:i,className:"mb-8",children:s.jsx(Y,{className:"bg-orange-50 border-orange-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(tn,{className:"w-5 h-5 text-orange-600"}),s.jsxs("div",{className:"text-left",children:[s.jsx("p",{className:"text-sm font-medium text-orange-800",children:"Scraping context from AI chat:"}),s.jsxs("p",{className:"text-sm text-orange-700",children:['"',n.context,'"']}),n.industries&&s.jsxs("p",{className:"text-xs text-orange-600 mt-1",children:["Suggested industries: ",n.industries.join(", ")
789]})]})]}),s.jsxs(U,{variant:"ghost",size:"sm",onClick:()=>t("/chat"),className:"text-orange-600 hover:text-orange-700",children:[s.jsx(xo,{className:"w-4 h-4 mr-1"}),"Back to Chat"]})]})})})}),s.jsxs(he.div,{variants:i,className:"mb-12",children:[s.jsxs("h1",{className:"text-3xl md:text-5xl font-bold font-playfair mb-4 max-w-4xl mx-auto leading-tight text-gray-900",children:["Deep Research Company Data with"," ",s.jsx("span",{className:"text-agency-accent font-extrabold relative inline-block",children:"AI Precision"})]}),s.jsx("p",{className:"text-lg md:text-xl text-gray-600 mb-8 max-w-2xl mx-auto font-inter",children:n.domain?`Ready to analyze ${n.company||"this company"}. Click "Slay" to get comprehensive intelligence data.`:n.context?"Enter domains similar to your AI chat query to expand your prospect database":"Enter a company domain and get comprehensive intelligence data in minutes"})]}),s.jsx(he.div,{variants:i,className:"mb-12",children:s.jsx(PG,{prefilledDomain:n.domain,prefilledCompany:n.company})}),s.jsx(he.div,{variants:i,className:"mb-12",children:s.jsx(BNe,{})}),s.jsx(he.div,{variants:i,children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(Y,{className:"bg-white/80 backdrop-blur-sm border border-gray-200 shadow-lg hover:shadow-xl transition-all duration-300",children:s.jsxs(te,{className:"p-6 text-center",children:[s.jsx(he.div,{animate:{scale:[1,1.1,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:s.jsx(Dn,{className:"w-12 h-12 mx-auto mb-4 text-blue-600"})}),s.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:"100+"}),s.jsx("p",{className:"text-gray-600",children:"Data Points Per Company"})]})}),s.jsx(Y,{className:"bg-white/80 backdrop-blur-sm border border-gray-200 shadow-lg hover:shadow-xl transition-all duration-300",children:s.jsxs(te,{className:"p-6 text-center",children:[s.jsx(he.div,{animate:{rotate:[0,10,-10,0]},transition:{duration:3,repeat:1/0,ease:"easeInOut"},children:s.jsx(Tn,{className:"w-12 h-12 mx-auto mb-4 text-green-600"})}),s.jsx("div",{className:"text-3xl font-bold text-green-600 mb-2",children:"99%"}),s.jsx("p",{className:"text-gray-600",children:"Accuracy Rate"})]})}),s.jsx(Y,{className:"bg-white/80 backdrop-blur-sm border border-gray-200 shadow-lg hover:shadow-xl transition-all duration-300",children:s.jsxs(te,{className:"p-6 text-center",children:[s.jsx(he.div,{animate:{y:[0,-5,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:s.jsx(tn,{className:"w-12 h-12 mx-auto mb-4 text-purple-600"})}),s.jsx("div",{className:"text-3xl font-bold text-purple-600 mb-2",children:"Real-time"}),s.jsx("p",{className:"text-gray-600",children:"Data Processing"})]})})]})})]})})})]})};var S2="Tabs",[UNe,lht]=Qs(S2,[XS]),qK=XS(),[qNe,j2]=UNe(S2),WK=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=cx(l),[h,f]=Hs({prop:r,onChange:a,defaultProp:i});return s.jsx(qNe,{scope:n,baseId:Vs(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:c,children:s.jsx(Te.div,{dir:d,"data-orientation":o,...u,ref:t})})});WK.displayName=S2;var VK="TabsList",HK=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=j2(VK,n),o=qK(n);return s.jsx(iH,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:s.jsx(Te.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});HK.displayName=VK;var GK="TabsTrigger",KK=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,o=j2(GK,n),l=qK(n),c=QK(o.baseId,r),u=ZK(o.baseId,r),d=r===o.value;return s.jsx(oH,{asChild:!0,...l,focusable:!a,active:d,children:s.jsx(Te.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:we(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:we(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:we(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!a&&h&&o.onValueChange(r)})})})});KK.displayName=GK;var YK="TabsContent",XK=g.forwardRef((e,t)=>
789{const{__scopeTabs:n,value:r,forceMount:a,children:i,...o}=e,l=j2(YK,n),c=QK(l.baseId,r),u=ZK(l.baseId,r),d=r===l.value,h=g.useRef(d);return g.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),s.jsx(As,{present:a||d,children:({present:f})=>s.jsx(Te.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&i})})});XK.displayName=YK;function QK(e,t){return`${e}-trigger-${t}`}function ZK(e,t){return`${e}-content-${t}`}var WNe=WK,JK=HK,eY=KK,tY=XK;const _o=WNe,Fi=g.forwardRef(({className:e,...t},n)=>s.jsx(JK,{ref:n,className:ve("inline-flex h-12 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground shadow-sm scrollbar-hide gap-1",e),...t}));Fi.displayName=JK.displayName;const yt=g.forwardRef(({className:e,...t},n)=>s.jsx(eY,{ref:n,className:ve("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-2 text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm hover:bg-background/50 hover:text-foreground/80",e),...t}));yt.displayName=eY.displayName;const nn=g.forwardRef(({className:e,...t},n)=>s.jsx(tY,{ref:n,className:ve("mt-6 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 animate-fade-in",e),...t}));nn.displayName=tY.displayName;const VNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.replace(/\*\*/g,"").replace(/\*/g,"").trim();return t?s.jsx("div",{className:"p-3 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},nY=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
790`).filter(n=>n.trim()!=="");return t.length===0?null:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.map((n,r)=>s.jsx(Y,{className:"border border-gray-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(_a,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),s.jsx("code",{className:"text-sm font-mono text-gray-700 bg-white px-2 py-1 rounded border",children:n.trim()})]})})},r))})},rY=e=>{if(!e||e==="Unknown"||e==="")return null;const t=new Map,n=e.split(/\n/).filter(r=>r.trim()!=="");for(let r=0;r<n.length;r++){const a=n[r].trim();if(a.match(/^\d+\.?\d*$/)){const i=a;for(let o=r-1;o>=0;o--){const l=n[o].trim();if(l&&!l.match(/^\d+\.?\d*$/)&&!l.includes("Measure")&&!l.includes("Rating")){t.set(l,i);break}}}}return t.size===0?null:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Array.from(t.entries()).map(([r,a],i)=>s.jsx(Y,{className:"border border-gray-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-gray-900 text-sm",children:r}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{className:"w-4 h-4 text-yellow-500 fill-yellow-500"}),s.jsx("span",{className:"font-bold text-gray-700",children:a})]})]})})},i))})},Mt=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.replace(/\s+/g," ").trim();return t?s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},zh=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
791
792`).filter(n=>n.trim()!=="");return t.length===0?null:s.jsx("div",{className:"grid grid-cols-1 gap-4",children:t.map((n,r)=>{var d;const a=n.split(`
793`).filter(h=>h.trim()!==""),i=((d=a[0])==null?void 0:d.trim())||"",o=a.slice(1).join(" ").trim();let l="",c="";const u=o.match(/(https?:\/\/[^\s]+)/);if(u){l=u[1];try{c=new URL(l).hostname}catch{c=l}}return n.includes("Url: Domain: amplemarket.com Position:")&&n.includes("Position:")?null:s.jsx(Y,{className:"border border-gray-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"space-y-2",children:[l?s.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-gray-900 hover:text-blue-600 block",children:i}):s.jsx("h4",{className:"font-semibold text-gray-900",children:i}),o&&s.jsx("p",{className:"text-sm text-gray-600 leading-relaxed line-clamp-2",children:o.replace(/(https?:\/\/[^\s]+)/g,"").trim()}),c&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx(Dn,{className:"w-3 h-3"}),s.jsx("span",{children:c}),s.jsx(ar,{className:"w-3 h-3"})]})]})})},r)}
793).filter(Boolean)})},HNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.replace(/[*•-]\s*/g,"").replace(/✅|❌|✓|✗/g,"").replace(/true/g,"enabled").replace(/false/g,"disabled").replace(/,/g,`,
794`).replace(/\s+/g," ").trim();return t?s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},GNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.trim();return t?s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},sY=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(/[,\n]/).filter(n=>n.trim()!=="");return t.length===0?null:s.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((n,r)=>s.jsx(fe,{variant:"outline",className:"text-xs",children:n.trim()},r))})},aY=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(/[\n,]/).filter(n=>n.trim()!==""&&n.includes("http"));return t.length===0?null:s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-medium text-gray-900",children:"Trusted by"}),s.jsx("div",{className:"flex flex-wrap gap-4 items-center",children:t.map((n,r)=>s.jsx("div",{className:"h-12 flex items-center",children:s.jsx("img",{src:n.trim(),alt:`Partner ${r+1}`,className:"max-h-12 max-w-24 object-contain grayscale hover:grayscale-0 transition-all",onError:a=>{a.currentTarget.style.display="none"}})},r))})]})},KNe=e=>{if(!e||e.trim()==="")return null;const t=e.split(/[\n,;|]/).map(n=>n.trim()).filter(n=>n&&n.length>0);return t.length===0?null:s.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((n,r)=>{const a=n.match(/(https?:\/\/[^\s]+)/),o=n.replace(/(https?:\/\/[^\s]+)/,"").trim()||n,l=a?a[1]:`https://www.linkedin.com/search/results/companies/?keywords=${encodeURIComponent(o)}`;return s.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 px-3 py-1 text-xs bg-blue-100 text-blue-800 rounded-full hover:bg-blue-200 transition-colors",children:[o,s.jsx(ar,{className:"w-3 h-3"})]},r)})})},YNe=e=>{if(!e)return null;const t=e.trim();if(!t)return null;const n=t.match(/(?:TrustScore|Rating)?:?\s*(\d+\.?\d*)\s*(?:\/\s*5)?/i),r=t.match(/(\d+)\s+reviews?/i);let a=null;if(n){const u=parseFloat(n[1]),d=r?r[1]:null,h=Math.floor(u),f=u%1>=.5;a=s.jsx("div",{className:"mb-4 p-4 bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg border-l-4 border-green-400",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"text-3xl font-bold text-green-600",children:u}),s.jsxs("div",{children:[s.jsx("div",{className:"flex gap-1 mb-1",children:[...Array(5)].map((m,y)=>s.jsx(An,{className:`w-4 h-4 ${y<h?"fill-green-500 text-green-500":y===h&&f?"fill-green-300 text-green-500":"text-gray-300"}`},y))}),d&&s.jsxs("div",{className:"text-xs text-gray-600",children:[d," reviews"]})]})]})})}const i=t.split(/\n\n+|\n[-•]\s*/).map(u=>u.trim()).filter(u=>u&&u.length>20&&!u.match(/^(?:TrustScore|Rating|reviews?)/i)),o=i.length>0?s.jsx("div",{className:"grid gap-3",children:i.map((u,d)=>s.jsx("div",{className:"p-3 bg-white rounded-lg border border-gray-200 shadow-sm",children:s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:u})},d))}):null,l=t.match(/(https?:\/\/[^\s]+trustpilot[^\s]*)/i),c=l?s.jsxs("a",{href:l[1],target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline mt-2",children:["View on Trustpilot",s.jsx(ar,{className:"w-3 h-3"})]}):null;return!a&&!o?s.jsxs("div",{className:"p-4 bg-green-50 rounded-lg border-l-4 border-green-400",children:[s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t}),c]}):s.jsxs("div",{className:"space-y-4",children:[a,o,c]})},XNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
795
796`).map(n=>{const r=n.split(`
797`),a={};return r.forEach(i=>{const o=i.match(/"Title":\s*"([^"]*)"/),l=i.match(/"Location":\s*"([^"]*)"/),c=i.match(/"Posted":\s*"([^"]*)"/),u=i.match(/"Type":\s*"([^"]*)"/),d=i.match(/"Link":\s*"([^"]*)"/);
797o&&(a.title=o[1]),l&&(a.location=l[1]),c&&(a.posted=c[1]),u&&(a.type=u[1]),d&&(a.link=d[1])}),a}).filter(n=>n.title&&n.title.trim()!=="");return t.length===0?null:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.map((n,r)=>s.jsx(Y,{className:"border border-gray-200",children:s.jsxs(te,{className:"p-4",children:[s.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:n.title}),s.jsxs("div",{className:"space-y-1 text-sm text-gray-600 mb-3",children:[n.location&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(jc,{className:"w-3 h-3"}),n.location]}),n.posted&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Xn,{className:"w-3 h-3"}),"Posted ",n.posted]}),n.type&&n.type!=="N/A"&&s.jsx(fe,{variant:"outline",className:"text-xs",children:n.type})]}),n.link&&s.jsxs("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 text-sm font-medium",children:["View Job ",s.jsx(ar,{className:"w-3 h-3"})]})]})},r))})},QNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=new Map,n=e.split(/[,\n]/).filter(o=>o.trim()!=="");let r="",a="",i="";return n.forEach(o=>{const l=o.trim();l.match(/^[A-Za-z\s&]+$/)&&!l.match(/^\d+$/)&&!l.includes("%")?r=l:l.match(/^\d+$/)?a=l:l.includes("%")&&(i=l,r&&a&&t.set(r,{count:a,percentage:i}))}),t.size===0?null:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Array.from(t.entries()).map(([o,l],c)=>s.jsx(Y,{className:"border border-gray-200",children:s.jsxs(te,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"font-medium text-gray-900 text-sm",children:o}),s.jsxs("span",{className:"text-sm text-gray-600",children:[l.count," (",l.percentage,")"]})]}),s.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:s.jsx("div",{className:"bg-blue-500 h-2 rounded-full",style:{width:l.percentage}})})]})},c))})},ZNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
798
799`).map(n=>{const r=n.split(`
800`),a={};return r.forEach(i=>{const o=i.match(/"Name":\s*"([^"]*)"/),l=i.match(/"Title":\s*"([^"]*)"/),c=i.match(/"LinkedinEmployeeUrl":\s*"([^"]*)"/);o&&(a.name=o[1]),l&&(a.title=l[1]),c&&(a.url=c[1])}),a}).filter(n=>n.name&&n.name.trim()!=="");return t.length===0?null:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map((n,r)=>s.jsx(Y,{className:"border border-gray-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ks,{className:"h-10 w-10",children:s.jsx(Ys,{className:"bg-blue-100 text-blue-600",children:n.name.charAt(0).toUpperCase()})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-medium text-gray-900 truncate",children:n.name}),s.jsx("p",{className:"text-sm text-gray-600 mb-2 line-clamp-2",children:n.title}),n.url&&s.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 text-sm",children:[s.jsx(xa,{className:"w-3 h-3"}),"View Profile"]})]})]})})},r))})},JNe=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
801`).filter(n=>n.trim()!=="");return s.jsx("div",{className:"grid grid-cols-1 gap-3",children:t.map((n,r)=>{const a=n.trim();let i="",o=a;const l=a.match(/(https?:\/\/[^\s]+)/);return l&&(i=l[1],o=a.replace(l[1],"").trim()),s.jsx(Y,{className:"border border-gray-200",children:s.jsx(te,{className:"p-3",children:s.jsxs("div",{className:"space-y-1",children:[i?s.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-gray-900 hover:text-blue-600 text-sm block",children:o||i}):s.jsx("span",{className:"font-medium text-gray-900 text-sm",children:o}),i&&s.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-500",children:[s.jsx(Dn,{className:"w-3 h-3"}),s.jsx("span",{children:i})]})]})})},r)})})},e_e=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.replace(/\*\*(.+?)\*\*/g,"$1").replace(/\*(.+?)\*/g,"$1").trim();return t?s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},t_e=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.trim();return t?s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},n_e=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.trim();return t?s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:t})}):null},r_e=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
802
803`).filter(n=>n.trim()!=="");return t.length===0?null:s.jsx("div",{className:"grid grid-cols-1 gap-4",children:t.map((n,r)=>{const a=n.split(`
804`).filter(u=>u.trim()!=="");let i="",o="",l="",c="";return a.forEach((u,d)=>{const h=u.trim(),f=h.match(/(https?:\/\/[^\s]+)/);if(f){l=f[1];try{c=new URL(l).hostname}catch{c=l}}!i&&h&&!h.startsWith("http")&&h.length>10?i=h:i&&h&&!h.startsWith("http")&&h!==i&&(o+=h+" ")}),n.includes("amplemarket.com")&&n.includes("Position:")||!i&&!o?null:s.jsx(Y,{className:"border border-gray-200",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"space-y-2",children:[l&&i?s.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-gray-900 hover:text-blue-600 block text-sm leading-tight",children:i}):i?s.jsx("h4",{className:"font-semibold text-gray-900 text-sm leading-tight",children:i}):null,o&&s.jsx("p",{className:"text-sm text-gray-600 leading-relaxed line-clamp-3",children:o.replace(/(https?:\/\/[^\s]+)/g,"").trim()}),c&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx(Dn,{className:"w-3 h-3"}),s.jsx("span",{children:c}),l&&s.jsx(ar,{className:"w-3 h-3"})]})]})})},r)}
804).filter(Boolean)})},iY=e=>{if(!e||e==="Unknown"||e==="")return null;const t=e.split(`
805
806`).filter(n=>n.trim()!=="");return s.jsx("div",{className:"space-y-4",children:t.map((n,r)=>{const a=n.split(`
807`);let i="",o="",l="";return a.forEach(c=>{const u=c.replace(/"/g,"").trim();u.includes("LinkedinPostUrl:")?l=u.replace("LinkedinPostUrl:","").trim():u.includes("reactions")||u.includes("comment")?o=u:u&&!u.includes("KeyPointsRaw:")&&(i+=u+" ")}),s.jsxs("div",{className:"p-4 border border-gray-200 rounded-lg",children:[s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed mb-2",children:i.trim()}),o&&s.jsxs("p",{className:"text-xs text-gray-500 mb-2",children:["💬 ",o]}),l&&s.jsx(U,{asChild:!0,variant:"outline",size:"sm",className:"inline-flex items-center gap-2",children:s.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(xa,{className:"w-3 h-3"}),"View Post"]})})]},r)})})};function Be(e){if(!e)return!1;if(Array.isArray(e))return e.length>0;if(typeof e=="object"&&e!==null)return Object.keys(e).length>0;if(typeof e!="string")return!!e;const t=e.trim();if(!t||/^[\s,.\-—•*]+$/.test(t))return!1;const n=["unknown","n/a","na","-","--","—",".",",","null","undefined","no description available","no data available","not available","tbd","tba","0 employees"],r=t.toLowerCase();return!n.includes(r)}const s_e=({startup:e})=>s.jsxs("div",{className:"space-y-6 mt-6",children:[e.score&&s.jsxs("div",{className:"animate-fade-in bg-gradient-to-r from-purple-50 to-pink-50 p-6 rounded-lg border-l-4 border-purple-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(An,{className:"w-5 h-5 text-purple-600"}),"Company Score"]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"text-4xl font-bold text-purple-600",children:e.score}),s.jsx("div",{className:"text-sm text-gray-600",children:"Overall evaluation score for vendor outreach"})]})]}),e.marketSignals&&s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(ze,{className:"w-5 h-5 text-green-600"}),"Market Signals"]}),s.jsx("div",{className:"p-4 bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg border-l-4 border-green-400",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:e.marketSignals})})]}),e.potentialServices&&s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(os,{className:"w-5 h-5 text-blue-600"}),"Pitch: Potential Services & Opportunities"]}),s.jsx("div",{className:"bg-blue-50 rounded-lg p-1",children:e_e(e.potentialServices)})]}),Be(e.insights)&&(()=>{const t=Mt(e.insights);return t?s.jsxs("div",{className:"animate-fade-in border-t pt-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Br,{className:"w-5 h-5 text-indigo-600"}),"Strategic Insights"]}),s.jsx("div",{className:"p-4 bg-gradient-to-r from-indigo-50 to-blue-50 rounded-lg border-l-4 border-indigo-400",children:t})]}):null})()]}),ge=({icon:e,label:t,value:n,link:r,isLongText:a,formatter:i,showZero:o=!1})=>{if(!n)return null;const l=String(n).trim(),c=l.toLowerCase();return!l||["unknown","n/a","na","null","undefined","tbd","tba","no data available","no description available","not available","employees","0 employees"].includes(c)||/^[,.\-—\s]+$/.test(l)||!o&&(l==="0"||l==="0.0")?null:s.jsxs("div",{className:"flex items-start gap-2 py-1.5 border-b border-gray-100 last:border-b-0 w-full min-w-0",children:[s.jsx(e,{className:"w-3 h-3 text-gray-500 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0 flex-1 w-full overflow-hidden",children:[s.jsx("p",{className:"text-xs font-medium text-gray-900 mb-0.5 break-words w-full",children:t}),i?s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:i(n)}):r?s.jsx("a",{href:n.startsWith("http")?n:`https://${n}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline break-all word-break-all inline-block max-w-full overflow-wrap-anywhere",style:{wordBreak:"break-all",overflowWrap:"anywhere"},children:n}):s.jsx("p",{className:"text-xs text-gray-600 break-words whitespace-pre-wrap w-full",style:{wordBreak:"break-word",overflowWrap:"anywhere"},children:n})]})]})},a_e=({startup:e})=>{const t=Be(e.numberOfInvestors)||Be(e.latestInvestorName)||Be(e.firstInvestorName)||Be(e.investorsList);return s.jsxs("div",{className:"space-y-6 mt-6",children:[s.jsxs("div",{className:"animate-fade-in bg-green-50 p-4 rounded-lg border-l-4 border-green-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Fn,{className:"w-5 h-5 text-green-600"}),"Key Funding Metrics"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ge,{icon:Fn,label:"Latest Funding",value:e.fundingAmount}
807),s.jsx(ge,{icon:Fn,label:"Latest Funding Amount",value:e.latestFundingAmount}),s.jsx(ge,{icon:sn,label:"Latest Funding Date",value:e.latestFundingDate}),s.jsx(ge,{icon:Br,label:"Latest Funding Type",value:e.latestFundingType}),s.jsx(ge,{icon:Fn,label:"Total Funding",value:e.totalFunding}),s.jsx(ge,{icon:ze,label:"Funding Rounds",value:e.numberOfFundingRounds})]})]}),t&&s.jsxs("div",{className:"animate-fade-in bg-purple-50 p-4 rounded-lg border-l-4 border-purple-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(At,{className:"w-5 h-5 text-purple-600"}),"Investor Network"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(ge,{icon:At,label:"Number of Investors",value:e.numberOfInvestors}),s.jsx(ge,{icon:Ti,label:"Latest Investor",value:e.latestInvestorName}),s.jsx(ge,{icon:Ti,label:"First Investor",value:e.firstInvestorName}),s.jsx(ge,{icon:At,label:"Investors List",value:e.investorsList,formatter:Mt})]})]}),s.jsxs("div",{className:"animate-fade-in bg-orange-50 p-4 rounded-lg border-l-4 border-orange-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(ze,{className:"w-5 h-5 text-orange-600"}),"Growth Metrics"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(ge,{icon:Br,label:"Headcount Growth",value:e.headcountGrowth,formatter:Mt}),s.jsx(ge,{icon:ze,label:"Number of Exits",value:e.numberOfExits}),s.jsx(ge,{icon:tt,label:"Total Acquisitions",value:e.totalAcquisitions}),s.jsx(ge,{icon:tt,label:"Companies Acquired",value:e.companiesAcquired,formatter:Mt}),s.jsx(ge,{icon:Fn,label:"Investments",value:e.investments,formatter:Mt})]})]}),e.fundingNews&&s.jsxs("div",{className:"animate-fade-in border-t pt-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Br,{className:"w-5 h-5 text-emerald-600"}),"Funding News & Updates"]}),zh(e.fundingNews)]})]})},i_e=({startup:e})=>{const t=i=>{if(!i)return!1;const o=String(i).trim();return o!==""&&o!=="Unknown"&&o!=="N/A"&&o!=="n/a"&&o!=="null"&&o!=="undefined"},n=e.employeeCount||e.headcountGrowth||e.leadership||e.founder||e.linkedinEmployees||e.jobOpenings||e.jobOpportunities||e.hiringSignals||e.jobNews||e.departmentDistribution,r=t(e.employeeCount)||t(e.headcountGrowth)||t(e.linkedinEmployees),a=t(e.jobOpenings);return n?s.jsxs("div",{className:"space-y-6 mt-6",children:[r&&s.jsxs("div",{className:"animate-fade-in bg-blue-50 p-4 rounded-lg border-l-4 border-blue-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(At,{className:"w-5 h-5 text-blue-600"}),"Employee Information"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsx(ge,{icon:At,label:"Employee Count (approx.)",value:e.employeeCount}),s.jsx(ge,{icon:ze,label:"Headcount Growth",value:e.headcountGrowth}),s.jsx(ge,{icon:xa,label:"LinkedIn Employees Count",value:e.linkedinEmployees})]})]}),(()=>{const i=t_e(e.leadership);return i?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Ti,{className:"w-5 h-5 text-blue-600"}),"Leadership"]}),i]}):null})(),(()=>{const i=n_e(e.founder);return i?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Ti,{className:"w-5 h-5 text-green-600"}),"Founder"]}),i]}):null})(),s.jsx(ge,{icon:Ti,label:"Founder Start Date",value:e.founderStartDate}),(()=>{const i=QNe(e.departmentDistribution);return i?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(At,{className:"w-5 h-5 text-purple-600"}),"Department Distribution"]}),i]}):null})(),(()=>{const i=ZNe(e.linkedinEmployees);return i?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(xa,{
807className:"w-5 h-5 text-blue-500"}),"Team Members"]}),i]}):null})(),a&&s.jsxs("div",{className:"bg-orange-50 p-4 rounded-lg border-l-4 border-orange-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Ba,{className:"w-5 h-5 text-orange-600"}),"Hiring Information"]}),s.jsx("div",{className:"space-y-2",children:s.jsx(ge,{icon:Ba,label:"Job Openings",value:e.jobOpenings})})]}),(()=>{const i=XNe(e.jobOpportunities);return i?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Ba,{className:"w-5 h-5 text-orange-600"}),"Job Opportunities"]}),i]}):null})(),Be(e.hiringSignals)&&(()=>{const i=Mt(e.hiringSignals);return i?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Ba,{className:"w-5 h-5 text-cyan-600"}),"Hiring Signals"]}),s.jsx("div",{className:"p-4 bg-gradient-to-r from-cyan-50 to-blue-50 rounded-lg border-l-4 border-cyan-400",children:i})]}):null})(),e.jobNews&&s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Ba,{className:"w-5 h-5 text-indigo-600"}),"Job News"]}),zh(e.jobNews)]})]}):s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("p",{className:"text-gray-500 text-sm",children:"No people data available"})})},o_e=({startup:e})=>{const t=Be(e.server),n=Be(e.performanceScore)||Be(e.seoAccessibilityIssues)||Be(e.accessibilityIssues)||Be(e.performanceOverview),r=Be(e.iosAppUrl)||Be(e.androidAppUrl)||Be(e.appName)||Be(e.platformAvailability)||Be(e.monthlyAppDownloads)||Be(e.apptopiaInformation),a=Be(e.sifteryIntegrations)||Be(e.integrationNames)||Be(e.integrationLinks);return e.techStack||t||n||e.performanceStatuses||r||a?s.jsxs("div",{className:"space-y-4 mt-4 w-full min-w-0 overflow-hidden",children:[e.techStack&&s.jsxs("div",{className:"animate-fade-in border-b pb-4 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Mb,{className:"w-4 h-4 text-blue-600"}),"Tech Stack"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:GNe(e.techStack)})]}),t&&s.jsxs("div",{className:"animate-fade-in bg-blue-50 p-3 rounded-lg border-l-4 border-blue-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Qq,{className:"w-4 h-4 text-blue-600"}),"Infrastructure"]}),s.jsx("div",{className:"w-full min-w-0",children:s.jsx(ge,{icon:Dn,label:"Server",value:e.server})})]}),n&&s.jsxs("div",{className:"animate-fade-in bg-green-50 p-3 rounded-lg border-l-4 border-green-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(ze,{className:"w-4 h-4 text-green-600"}),"Website Performance Overview"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:ze,label:"Performance Score",value:e.performanceScore}),s.jsx(ge,{icon:$l,label:"SEO/Accessibility Issues",value:e.seoAccessibilityIssues,formatter:Mt}),s.jsx(ge,{icon:$l,label:"Accessibility Issues",value:e.accessibilityIssues,formatter:Mt}),e.performanceOverview&&s.jsx(ge,{icon:Br,label:"Performance Overview",value:e.performanceOverview,formatter:Mt})]})]}),(()=>{const o=HNe(e.performanceStatuses);return o?s.jsxs("div",{className:"animate-fade-in border-b pb-4 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Br,{className:"w-4 h-4 text-purple-600"}),"Performance Statuses"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:o})]}):null})(),r&&s.jsxs("div",{className:"animate-fade-in bg-purple-50 p-3 rounded-lg border-l-4 border-purple-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Ad,{className:"w-4 h-4 text-purple-600"}),"Mobile Applications"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:Ad,label:"iOS App",value:e.i
807osAppUrl,link:!0}),s.jsx(ge,{icon:Ad,label:"Android App",value:e.androidAppUrl,link:!0}),s.jsx(ge,{icon:Ad,label:"App Name",value:e.appName}),s.jsx(ge,{icon:Ad,label:"Platform Availability",value:e.platformAvailability}),s.jsx(ge,{icon:Ad,label:"Monthly App Downloads",value:e.monthlyAppDownloads}),s.jsx(ge,{icon:Br,label:"Apptopia Information",value:e.apptopiaInformation,formatter:Mt})]})]}),a&&s.jsxs("div",{className:"animate-fade-in bg-orange-50 p-3 rounded-lg border-l-4 border-orange-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(nl,{className:"w-4 h-4 text-orange-600"}),"Integrations"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:ze,label:"Siftery Integrations",value:e.sifteryIntegrations,formatter:Mt}),s.jsx(ge,{icon:Mb,label:"Integration Names",value:e.integrationNames,formatter:Mt}),s.jsx(ge,{icon:Mb,label:"Integration Links",value:e.integrationLinks,formatter:Mt})]})]})]}):s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("p",{className:"text-gray-500 text-sm",children:"No technology data available"})})},l_e=({startup:e})=>{var l,c;const t=Be(e.semrushTrafficByCountry)||Be(e.authorityScore)||Be(e.totalBacklinks)||Be(e.referringDomains)||Be(e.followLinks)||Be(e.nofollowLinks)||Be(e.sponsoredLinks)||Be(e.imageLinks)||Be(e.totalPagesPerVisit)||Be(e.totalAvgVisitDuration)||Be(e.bounceRate)||Be(e.organicKeywords)||Be(e.alexaGlobalRank),n=Be(e.monthlyWebsiteVisits)||Be(e.globalSemrushRank)||Be(e.trafficChange),r=Be(e.estimatedRevenue)||Be(e.ppcSpend)||Be(e.ppcTraffic)||Be(e.ppcPositions)||Be(e.itSpend),a=Be(e.clients)||Be(e.idealCustomerProfile)||Be(e.clientTestimonials),i=Be(e.partnerNames)||Be(e.newsletterCopy)||Be(e.leadMagnets)||Be(e.primaryCtas)||Be(e.pricingInfo)||Be(e.freeTrialOffer),o=Be(e.aliases);return s.jsxs("div",{className:"space-y-4 w-full min-w-0 overflow-hidden",children:[t&&s.jsxs("div",{className:"animate-fade-in bg-cyan-50 p-3 rounded-lg border-l-4 border-cyan-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Dn,{className:"w-4 h-4 text-cyan-600 flex-shrink-0"}),"SEO Performance"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:Dn,label:"SEMrush Traffic by Country",value:e.semrushTrafficByCountry,formatter:Mt}),s.jsx(ge,{icon:ze,label:"Authority Score",value:e.authorityScore}),s.jsx(ge,{icon:Dn,label:"Total Backlinks",value:e.totalBacklinks}),s.jsx(ge,{icon:Dn,label:"Referring Domains",value:e.referringDomains}),s.jsx(ge,{icon:Dn,label:"Follow Links",value:e.followLinks}),s.jsx(ge,{icon:Dn,label:"Nofollow Links",value:e.nofollowLinks}),s.jsx(ge,{icon:Dn,label:"Sponsored Links",value:e.sponsoredLinks}),s.jsx(ge,{icon:Dn,label:"Image Links",value:e.imageLinks}),s.jsx(ge,{icon:Dn,label:"Pages Per Visit",value:e.totalPagesPerVisit}),s.jsx(ge,{icon:Br,label:"Avg Visit Duration",value:e.totalAvgVisitDuration}),s.jsx(ge,{icon:ze,label:"Bounce Rate",value:e.bounceRate}),s.jsx(ge,{icon:Dn,label:"Organic Keywords",value:e.organicKeywords}),s.jsx(ge,{icon:ze,label:"Alexa Global Rank",value:e.alexaGlobalRank})]})]}),n&&s.jsxs("div",{className:"animate-fade-in bg-gray-50 p-3 rounded-lg border-l-4 border-gray-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(ze,{className:"w-4 h-4 text-gray-600 flex-shrink-0"}),"Website Performance Metrics"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:Dn,label:"Monthly Website Visits",value:e.monthlyWebsiteVisits}),s.jsx(ge,{icon:ze,label:"SEMrush Global Rank",value:e.globalSemrushRank}),s.jsx(ge,{icon:ze,label:"Traffic Change %",value:e.trafficChange})]})]}),(()=>{const u=JNe(e.topPages);return u?s.jsxs("div",{className:"animate-fade-in bg-indigo-50 p-3 rounded-lg border-l-4 border-indigo-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Dn,{className:"w-4 h-4 text-indigo-600 flex-shrink-0"}),"Top Pages"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:u})]}):null})(),r&&s.jsxs("div",{className:"animate-fade-in bg-blue-50 p-3 rounded-lg border-l-4 border-blue-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(os,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}),"Ad Spend"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:Fn,label:"Estimated Revenue",value:e.estimatedRevenue}),s.jsx(ge,{icon:Fn,label:"PPC Spend",value:e.ppcSpend}),s.jsx(ge,{icon:ze,label:"PPC Traffic",value:e.ppcTraffic}),s.jsx(ge,{icon:ze,label:"PPC Positions",value:e.ppcPositions}),s.jsx(ge,{icon:Fn,label:"IT Spend",value:e.itSpend})]})]}),(()=>{const u=VNe(e.seoInsights);return u?s.jsxs("div",{className:"animate-fade-in bg-purple-50 p-3 rounded-lg border-l-4 border-purple-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(ze,{className:"w-4 h-4 text-purple-600 flex-shrink-0"}
807),"SEO Insights"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:u})]}):null})(),(()=>{const u=nY(e.emailPatterns);return u?s.jsxs("div",{className:"animate-fade-in bg-purple-50 p-3 rounded-lg border-l-4 border-purple-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(_a,{className:"w-4 h-4 text-purple-600 flex-shrink-0"}),"Email Patterns"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:u})]}):null})(),a&&s.jsxs("div",{className:"animate-fade-in bg-green-50 p-3 rounded-lg border-l-4 border-green-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(At,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),"Customer Information"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:At,label:"Trusted by",value:e.clients,formatter:Mt}),s.jsx(ge,{icon:tn,label:"Ideal Customer Profile",value:e.idealCustomerProfile,formatter:Mt}),s.jsx(ge,{icon:Mn,label:"Client Testimonials",value:e.clientTestimonials,formatter:Mt})]})]}),i&&s.jsxs("div",{className:"animate-fade-in bg-purple-50 p-3 rounded-lg border-l-4 border-purple-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(va,{className:"w-4 h-4 text-purple-600 flex-shrink-0"}),"Marketing Content"]}),s.jsxs("div",{className:"space-y-2 w-full min-w-0",children:[s.jsx(ge,{icon:tt,label:"Partner Names",value:e.partnerNames,formatter:Mt}),s.jsx(ge,{icon:va,label:"Newsletter Copy",value:e.newsletterCopy,formatter:Mt}),s.jsx(ge,{icon:ze,label:"Lead Magnets",value:e.leadMagnets,formatter:Mt}),s.jsx(ge,{icon:tn,label:"Primary CTAs",value:e.primaryCtas,formatter:Mt}),s.jsx(ge,{icon:Fn,label:"Pricing Info",value:e.pricingInfo,link:(l=e.pricingInfo)==null?void 0:l.startsWith("http")}),s.jsx(ge,{icon:Mn,label:"Free Trial",value:e.freeTrialOffer,link:(c=e.freeTrialOffer)==null?void 0:c.startsWith("http")})]})]}),Be(e.faq)&&(()=>{const u=Mt(e.faq);return u?s.jsxs("div",{className:"animate-fade-in bg-gray-50 p-3 rounded-lg border-l-4 border-gray-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(va,{className:"w-4 h-4 text-gray-600 flex-shrink-0"}),"FAQ"]}),s.jsx("div",{className:"p-3 bg-white rounded-lg w-full min-w-0 overflow-hidden",children:u})]}):null})(),(()=>{const u=sY(e.domainAliases);return u?s.jsxs("div",{className:"animate-fade-in bg-green-50 p-3 rounded-lg border-l-4 border-green-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Dn,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),"Domain Aliases"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:u})]}):null})(),o&&s.jsxs("div",{className:"bg-gray-50 p-3 rounded-lg border-l-4 border-gray-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Dn,{className:"w-4 h-4 text-gray-600 flex-shrink-0"}),"Domain Information"]}),s.jsx("div",{className:"space-y-2 w-full min-w-0",children:s.jsx(ge,{icon:tt,label:"Aliases",value:e.aliases,formatter:Mt})})]}),(()=>{const u=aY(e.partnerLogos);return u?s.jsx("div",{className:"animate-fade-in border-b pb-2 w-full min-w-0 overflow-hidden",children:u}):null})(),(()=>{const u=rY(e.glassdoor);return u?s.jsxs("div",{className:"animate-fade-in bg-yellow-50 p-3 rounded-lg border-l-4 border-yellow-400 w-full min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2 text-sm",children:[s.jsx(Mn,{className:"w-4 h-4 text-yellow-600 flex-shrink-0"}),"Glassdoor Reviews"]}),s.jsx("div",{className:"w-full min-w-0 overflow-hidden",children:u})]}):null})()]})},c_e=({startup:e})=>{var i,o;const t=l=>{if(!l)return!1;const c=String(l).trim();return c!==""&&c!=="Unknown"&&c!=="N/A"&&c!=="n/a"&&c!=="null"&&c!=="undefined"},n=t(e.pricingInfo)||t(e.freeTrialOffer)||t(e.estimatedRevenue)||t(e.itSpend),r=t(e.linkedinFollowers)||t(e.twitterFollowers)||t(e.facebookUrl)||t(e.instagramUrl)||t(e.tiktokUrl)||t(e.youtubeUrl)||t(e.githubUrl)||t(e.discordUrl),a=t(e.crunchbaseUrl)||t(e.linkedinAffiliatePages);return s.jsxs("div",{className:"space-y-6 mt-6",children:[n&&s.jsxs("div",{className:"animate-fade-in bg-blue-50 p-4 rounded-lg border-l-4 border-blue-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Hq,{className:"w-5 h-5 text-blue-600"}),"Business Model"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(ge,{icon:Fn,label:"Pricing Info",value:e.pricingInfo,link:(i=e.pricingInfo)==null?void 0:i.startsWith("http")}),s.jsx(ge,{icon:Mn,label:"Free Trial",value:e.freeTrialOffer,link:(o=e.freeTrialOffer)==null?void 0:o.startsWith("http")}),s.jsx(ge,{icon:Fn,label:"Estimated Revenue (USD)",value:e.estimatedRevenue}),s.jsx(ge,{icon:Fn,label:"IT Spend (USD)",value:e.itSpend})]})]}),t(e.features)&&s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Mn,{className:"w-5 h-5 text-green-600"}),"Key Features"]}),s.jsx("div",{className:"p-4 bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg border-l-4 border-green-400",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:e.features})})]}),t(e.differentiators)&&s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(v0,{className:"w-5 h-5 text-purple-600"}),"Key Differentiators"]}),s.jsx("div",{className:"p-4 bg-gradient-to-r from-purple-50 to-pink-50 rounded-lg border-l-4 border-purple-400",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:e.differentiators})})]}),r&&s.jsxs("div",{className:"animate-fade-in bg-cyan-50 p-4 rounded-lg border-l-4 border-cyan-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Mn,{className:"w-5 h-5 text-cyan-600"}),"Digital Presence"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsx(ge,{icon:Mn,label:"LinkedIn Followers",value:e.linkedinFollowers}),s.jsx(ge,{icon:Mn,label:"Twitter Followers",value:e.twitterFollowers}),s.jsx(ge,{icon:Mn,label:"Facebook URL",value:e.facebookUrl,link:!0}),s.jsx(ge,{icon:Mn,label:"Instagram URL",value:e.instagramUrl,link:!0}),s.jsx(ge,{icon:Mn,label:"TikTok URL",value:e.tiktokUrl,link:!0}),s.jsx(ge,{icon:Mn,label:"YouTube URL",value:e.youtubeUrl,link:!0}),s.jsx(ge,{icon:Mn,label:"GitHub URL",value:e.githubUrl,link:!0}),s.jsx(ge,{icon:Mn,label:"Discord URL",value:e.discordUrl,link:!0})]})]}),a&&s.jsxs("div",{className:"animate-fade-in bg-gray-50 p-4 rounded-lg border-l-4 border-gray-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Mn,{className:"w-5 h-5 text-gray-600"}),"External References"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(ge,{icon:Mn,label:"Crunchbase",value:e.crunchbaseUrl,link:!0}),s.jsx(ge,{icon:Mn,label:"LinkedIn Affiliate Pages",value:e.linkedinAffiliatePages,formatter:Mt})]})]})]})},u_e=({startup:e})=>
807s.jsxs("div",{className:"space-y-4 mt-6",children:[s.jsx(ge,{icon:_a,label:"Support Email",value:e.supportEmail}),s.jsx(ge,{icon:Gq,label:"Phone Number",value:e.phoneNumber}),s.jsx(ge,{icon:jc,label:"Address",value:e.address,formatter:Mt}),s.jsx(ge,{icon:xa,label:"LinkedIn",value:e.linkedinUrl,link:!0}),s.jsx(ge,{icon:xa,label:"LinkedIn Affiliate Pages",value:e.linkedinAffiliatePages,formatter:Mt}),s.jsx(ge,{icon:Br,label:"Twitter",value:e.twitterUrl,link:!0}),s.jsx(ge,{icon:tt,label:"Crunchbase",value:e.crunchbaseUrl,link:!0}),e.domainAliases&&s.jsxs("div",{className:"border-b pb-4",children:[s.jsxs("h3",{className:"text-base font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Dn,{className:"w-5 h-5"}),"Domain Aliases"]}),sY(e.domainAliases)]}),s.jsx(ge,{icon:tt,label:"Aliases",value:e.aliases}),e.emailPatterns&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("h3",{className:"text-base font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(_a,{className:"w-5 h-5"}),"Email Patterns"]}),nY(e.emailPatterns)]}),s.jsx(ge,{icon:Br,label:"Newsletter Copy",value:e.newsletterCopy,formatter:Mt}),s.jsx(ge,{icon:tt,label:"Partner Names",value:e.partnerNames,formatter:Mt}),e.partnerLogos&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-4",children:"Partner Logos"}),aY(e.partnerLogos)]}),s.jsx(ge,{icon:At,label:"Ideal Customer Profile",value:e.idealCustomerProfile,formatter:Mt}),s.jsx(ge,{icon:At,label:"Clients",value:e.clients,formatter:Mt}),s.jsx(ge,{icon:Mn,label:"Client Testimonials",value:e.clientTestimonials,formatter:Mt}),e.glassdoor&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("h3",{className:"text-base font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Mn,{className:"w-5 h-5"}),"Glassdoor Reviews"]}),rY(e.glassdoor)]}),e.faq&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-4",children:"FAQ"}),s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:e.faq})})]}),s.jsx(ge,{icon:ze,label:"Lead Magnets",value:e.leadMagnets,formatter:Mt}),s.jsx(ge,{icon:Br,label:"Primary CTAs",value:e.primaryCtas,formatter:Mt}),e.newsSummary&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-4",children:"Recent News"}),zh(e.newsSummary)]}),e.notableEvents&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-4",children:"Notable Events"}),s.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:s.jsx("div",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:e.notableEvents})})]}),e.linkedinUpdates&&s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("h3",{className:"text-base font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(xa,{className:"w-5 h-5"}),"LinkedIn Updates"]}),iY(e.linkedinUpdates)]})]}),d_e=({startup:e})=>s.jsxs("div",{className:"space-y-6 mt-6",children:[(()=>{const t=r_e(e.newsArticles);return t?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(pE,{className:"w-5 h-5 text-red-600"}),"News Articles"]}),t]}):null})(),(()=>{const t=iY(e.linkedinUpdates);return t?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(xa,{className:"w-5 h-5 text-blue-500"}),"LinkedIn Updates"]}),t]}):null})(),(()=>{const t=zh(e.newsSummary);return t?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(pE,{className:"w-5 h-5 text-green-600"}),"Recent News"]}),t]}):null})(),(()=>{const t=zh(e.productLaunches);return t?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(ze,{className:"w-5 h-5 text-purple-600"}),"Product Launches"]}),t]}):null})(),(()=>{const t=zh(e.fundingNews);return t?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(Br,{className:"w-5 h-5 text-emerald-600"}),"Funding News"]}),t]}):null})(),Be(e.notableEvents)&&(()=>{const t=Mt(e.notableEvents);return t?s.jsxs("div",{className:"animate-fade-in border-b pb-6",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(sn,{className:"w-5 h-5 text-orange-600"}),"Notable Events"]}),s.jsx("div",{className:"p-4 bg-gradient-to-r from-orange-50 to-yellow-50 rounded-lg border-l-4 border-orange-400",children:t})]}):null})()]}),h_e=({startup:e})=>{var n,r,a,i,o;return((n=e.spamming)==null?void 0:n.trim())||((r=e.malware)==null?void 0:r.trim())||((a=e.phishing)==null?void 0:a.trim())||((i=e.suspicious)==null?void 0:i.trim())||((o=e.riskScore)==null?void 0:o.trim())?s.jsx("div",{className:"space-y-4 mt
807-6",children:s.jsxs("div",{className:"bg-red-50 p-4 rounded-lg border-l-4 border-red-400",children:[s.jsxs("h3",{className:"font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx($l,{className:"w-5 h-5 text-red-600"}),"Security Analysis"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsx(ge,{icon:$l,label:"Spamming",value:e.spamming}),s.jsx(ge,{icon:$l,label:"Malware",value:e.malware}),s.jsx(ge,{icon:$l,label:"Phishing",value:e.phishing}),s.jsx(ge,{icon:$l,label:"Suspicious",value:e.suspicious}),s.jsx(ge,{icon:$l,label:"Risk Score",value:e.riskScore})]})]})}):null},Qg=e=>{if(!e||typeof e!="string")return!1;const t=e.trim(),n=["","null","undefined","N/A","n/a","Unknown","unknown","No data available","Not available","TBD","tbd",",","-","No description available","employees","0 employees","0"];return t.length>0&&!n.includes(t)},f_e=e=>{if(!Qg(e)||!e||e.trim()==="employees"||e.trim()==="0 employees")return!1;const t=e.match(/\d+/);return t?parseInt(t[0])>0:!1},m_e=e=>{if(!Qg(e)||!e)return!1;const t=e.trim();return!(t===","||t===", ")},p_e=e=>{if(!Qg(e)||!e)return!1;const t=e.trim();if(t.length<10)return!1;const n=/https?:\/\/[^\s]+/.test(t),r=/\b(article|news|press|announcement|launch|funding)\b/i.test(t);return n||r||t.length>50},Jt=(e,t)=>{switch(e){case"overview":return!!(t.description||t.valueProposition||t.tagline||t.fullDescription||t.legalName||t.industry||t.location||t.foundedYear||t.website||t.marketSignals||t.latestSignal);case"signals":return!!(t.score||t.marketSignals||t.potentialServices||t.insights);case"funding":return!!(t.fundingStage||t.totalFunding||t.lastFundingAmount||t.lastFundingDate||t.investors||t.fundingNews||t.growthMetrics);case"people":return!!(t.linkedinEmployees||t.leadership||t.founder||t.hiringSignals||t.jobNews||t.insights||t.lookalikeCompanies||t.similarLinkedinCompanies||t.competitorAnalysis||t.bomboraInsights);case"technology":return!!(t.techStack||t.server||t.seoIssues||t.appUrl||t.playStoreUrl||t.appStoreUrl||t.integrations);case"marketing":return!!(t.semrushTrafficByCountry||t.authorityScore||t.totalBacklinks||t.monthlyWebsiteVisits||t.topPages||t.seoInsights||t.ppcSpend||t.estimatedRevenue||t.emailPatterns||t.clients||t.partnerNames||t.faq||t.domainAliases||t.glassdoor);case"business":return!!(t.pricingInfo||t.freeTrialOffer||t.estimatedRevenue||t.itSpend||t.potentialServices||t.productLaunches||t.features||t.differentiators||t.linkedinFollowers||t.twitterFollowers||t.facebookUrl||t.crunchbaseUrl||t.linkedinAffiliatePages);case"contact":return!!(t.emailPatterns||t.phoneNumber||t.address||t.headquarters||t.linkedinEmployees||t.leadership||t.founder);case"updates":return!!(p_e(t.newsArticles)||t.linkedinUpdates||t.newsSummary||t.productLaunches||t.fundingNews||t.notableEvents);case"metrics":return!1;case"security":return!!(t.spamming||t.malware||t.phishing||t.suspicious||t.riskScore);case"reviews":return!!(t.trustPilot||t.glassdoor);default:return!0}},g_e=({children:e,featureCheck:t,featureName:n,requiredTiers:r,description:a})=>{const{subscribed:i,subscriptionTier:o}=Ie();return t()?s.jsx(s.Fragment,{children:e}):s.jsxs(Y,{className:"border-2 border-dashed border-gray-300 bg-gray-50",children:[s.jsxs(xe,{className:"text-center",children:[s.jsx("div",{className:"mx-auto w-12 h-12 bg-orange-100 rounded-full flex items-center justify-center mb-4",children:s.jsx(Tg,{className:"w-6 h-6 text-orange-600"})}),s.jsxs(Se,{className:"text-xl font-semibold text-gray-900 flex items-center justify-center gap-2",children:[s.jsx(An,{className:"w-5 h-5 text-orange-600"}),n]})]}),s.jsxs(te,{className:"text-center space-y-4",children:[s.jsx("p",{className:"text-gray-600 text-sm",children:a||`${n} is available in ${r.join(" and ")} plans.`}),s.jsx("div",{className:"space-y-2",children:i?s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"text-sm text-gray-500",children:["Current plan: ",s.jsx("span",{className:"font-medium capitalize",children:o})]}),s.jsx(ee,{to:"/pricing",className:"block",children:s.jsx(U0,{variant:"primary",className:"w-full",children:"Upgrade Plan"})})]}):s.jsx(ee,{to:"/pricing",className:"block",children:s.jsxs(U0,{variant:"primary",className:"w-full",children:["Upgrade to Access ",n]})})})]})]})},i$=({startup:e,children:t,onSave:n,onUnsave:r,isSaved:a=!1,defaultTab:i})=>{const{user:o,dailyProfiles:l,dailyProfileLimit:c,subscribed:u,hasContactDirectory:d}=Ie(),{toast:h}=Ve(),[f,m]=g.useState(!1),[y,p]=g.useState(!1);g.useEffect(()=>{(async()=>
807{if(!(!o||!f))try{if(!u&&l>=c){h({title:"Daily limit reached",description:"You've reached your daily company view limit. Upgrade to continue.",variant:"destructive"}),m(!1);return}const{data:j,error:N}=await K.rpc("increment_daily_profiles",{p_user_id:o.id});if(N){console.error("Error checking profile limits:",N);return}if(!j){h({title:"Daily limit reached",description:"You've reached your daily company view limit. Upgrade to continue.",variant:"destructive"}),m(!1);return}await K.rpc("log_company_view",{p_user_id:o.id,p_company_id:e.name,company_domain:e.website||null,ip_address:null,user_agent:navigator.userAgent||null})}catch(j){console.error("Error logging company view:",j)}})()},[f,o,e.name,e.website,u,l,c,h]);const x=async()=>{if(!o){h({title:"Authentication required",description:"Please sign in to save companies.",variant:"destructive"});return}p(!0);try{if(a){const{error:S}=await K.from("saved_companies").delete().eq("user_id",o.id).eq("company_id",e.name);if(S)throw S;h({title:"Company removed",description:`${e.name} has been removed from your saved companies.`}),r==null||r(e.name)}else{const{error:S}=await K.from("saved_companies").insert({user_id:o.id,company_id:e.name,company_name:e.name,company_domain:e.website,company_logo_url:e.logoUrl});if(S){if(S.code==="23505"){h({title:"Already saved",description:"This company is already in your saved list.",variant:"destructive"});return}throw S}h({title:"Company saved",description:`${e.name} has been added to your saved companies.`}),n==null||n(e)}}catch(S){console.error("Error managing saved company:",S),h({title:"Error",description:"Failed to update saved companies. Please try again.",variant:"destructive"})}finally{p(!1)}},v=S=>{var N;return!S||S==="null"||S.trim()===""?null:((N=S.split(`
808`).filter(C=>C.trim()!=="")[0])==null?void 0:N.trim())||null},b=S=>S?`https://${S.replace(/^https?:\/\//,"").replace(/^www\./,"")}`:"#",w=v(e.logoUrl);return o?s.jsxs(Wr,{open:f,onOpenChange:m,children:[s.jsx(wd,{asChild:!0,children:t}),s.jsxs(Pr,{className:"max-w-6xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Tr,{className:"sr-only",children:[e.name," Company Details"]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[w&&s.jsx("img",{src:w,alt:`${e.name} Logo`,className:"w-12 h-12 rounded-md"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold",children:e.name}),e.website&&s.jsxs("a",{href:b(e.website),target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline flex items-center gap-1 text-sm",children:[s.jsx(Dn,{className:"w-4 h-4"}),e.website]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(U,{variant:a?"default":"outline",size:"sm",onClick:x,disabled:y,className:"flex items-center gap-2",children:a?s.jsxs(s.Fragment,{children:[s.jsx(ule,{className:"w-4 h-4"}),"Saved"]}):s.jsxs(s.Fragment,{children:[s.jsx(zn,{className:"w-4 h-4"}),"Save Company"]})}),e.website&&s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>window.open(b(e.website),"_blank"),children:[s.jsx(ar,{className:"w-4 h-4 mr-2"}),"Visit Website"]})]})]}),s.jsxs(_o,{defaultValue:i||(Jt("overview",e)?"overview":Jt("signals",e)?"signals":Jt("funding",e)?"funding":Jt("people",e)?"people":Jt("technology",e)?"technology":Jt("marketing",e)?"marketing":Jt("business",e)?"business":Jt("contact",e)?"contact":Jt("updates",e)?"updates":Jt("metrics",e)?"metrics":Jt("security",e)?"security":"reviews"),className:"space-y-6",children:[s.jsx("div",{className:"sticky top-0 bg-white z-10 border-b pb-2",children:s.jsxs(Fi,{className:"grid w-full grid-cols-6 lg:grid-cols-12",children:[Jt("overview",e)&&s.jsx(yt,{value:"overview",className:"text-xs",children:"Overview"}),Jt("signals",e)&&s.jsx(yt,{value:"signals",className:"text-xs",children:"Signals"}),Jt("funding",e)&&s.jsx(yt,{value:"funding",className:"text-xs",children:"Funding"}),Jt("people",e)&&s.jsx(yt,{value:"people",className:"text-xs",children:"People"}),Jt("technology",e)&&s.jsx(yt,{value:"technology",className:"text-xs",children:"Technology"}),Jt("marketing",e)&&s.jsx(yt,{value:"marketing",className:"text-xs",children:"Marketing"}),Jt("business",e)&&s.jsx(yt,{value:"business",className:"text-xs",children:"Business"}),Jt("contact",e)&&s.jsx(yt,{value:"contact",className:"text-xs",children:"Contact"}),Jt("updates",e)&&s.jsx(yt,{value:"updates",className:"text-xs",children:"Updates"}),Jt("security",e)&&s.jsx(yt,{value:"security",className:"text-xs",children:"Security"}),Jt("reviews",e)&&s.jsx(yt,{value:"reviews",className:"text-xs",children:"Reviews"})]})}),Jt("overview",e)&&s.jsx(nn,{value:"overview",className:"mt-8 pt-4",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[Be(e.legalName)||Be(e.valueProposition)||Be(e.location)||Be(e.sizeRange)||Be(e.foundedYear)||Be(e.operatingStatus)||Be(e.companyType)?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),"Basic Information"]})}),s.jsxs(te,{className:"space-y-3",children:[s.jsx(ge,{icon:tt,label:"Legal Name",value:e.legalName}),s.jsx(ge,{icon:Hq,label:"Value Proposition",value:e.valueProposition}),s.jsx(ge,{icon:jc,label:"Location",value:e.location}),s.jsx(ge,{icon:At,label:"Company Size",value:e.sizeRange}),s.jsx(ge,{icon:sn,label:"Founded",value:e.foundedYear}),s.jsx(ge,{icon:Br,label:"Operating Status",value:e.operatingStatus}),s.jsx(ge,{icon:tt,label:"Company Type",value:e.companyType})]})]}):null,Be(e.industry)||Be(e.categories)||Be(e.industryTags)?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(tn,{className:"w-4 h-4"}),"Industry & Categories"]})}),s.jsxs(te,{className:"space-y-3",children:[s.jsx(ge,{icon:tn,label:"Industry",value:e.industry}),s.jsx(ge,{icon:tn,label:"Categories",value:e.categories}),s.jsx(ge,{icon:tn,label:"Industry Tags",value:e.industryTags})]})]}):null]}),Be(e.fullDescription)&&s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(va,{className:"w-4 h-4"}),"Company Description"]})}),s.jsx(te,{children:s.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:e.fullDescription})})]}),Be(e.features)&&s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(v0,{className:"w-4 h-4"}),"Key Features"]})}),s.jsx(te,{children:s.jsx("div",{className:"p-3 bg-green-50 rounded-lg border-l-4 border-green-400",children:s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:e.features})})})]}),(()=>
808{const S=Mt(e.insights),j=Mt(e.bomboraInsights);return S||j?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(tn,{className:"w-4 h-4"}),"Market Intelligence"]})}),s.jsxs(te,{className:"space-y-3",children:[S&&s.jsx(ge,{icon:v0,label:"Insights",value:e.insights,formatter:C=>s.jsx("div",{className:"p-3 bg-blue-50 rounded-lg border-l-4 border-blue-400",children:s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:C})})}),j&&s.jsx(ge,{icon:ze,label:"Bombora Insights",value:e.bomboraInsights,formatter:C=>s.jsx("div",{className:"p-3 bg-purple-50 rounded-lg border-l-4 border-purple-400",children:s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:C})})})]})]}):null})(),(()=>{const S=Mt(e.lookalikeCompanies),j=KNe(e.similarLinkedinCompanies),N=Mt(e.competitorAnalysis);return S||j||N?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),"Competitive Analysis"]})}),s.jsxs(te,{className:"space-y-3",children:[S&&s.jsx(ge,{icon:tt,label:"Lookalike Companies",value:e.lookalikeCompanies,formatter:_=>s.jsx("div",{className:"p-3 bg-green-50 rounded-lg border-l-4 border-green-400",children:s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:_})})}),j&&s.jsx(ge,{icon:tt,label:"Similar LinkedIn Companies",value:e.similarLinkedinCompanies,formatter:()=>j}),N&&s.jsx(ge,{icon:ze,label:"Competitor Analysis",value:e.competitorAnalysis,formatter:_=>s.jsx("div",{className:"p-3 bg-orange-50 rounded-lg border-l-4 border-orange-400",children:s.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:_})})})]})]}):null})()]})}),Jt("signals",e)&&s.jsx(nn,{value:"signals",className:"mt-8 pt-4",children:s.jsx(s_e,{startup:e})}),Jt("funding",e)&&s.jsx(nn,{value:"funding",className:"mt-8 pt-4",children:s.jsx(a_e,{startup:e})}),Jt("people",e)&&s.jsx(nn,{value:"people",className:"mt-8 pt-4",children:s.jsx(i_e,{startup:e})}),Jt("technology",e)&&s.jsx(nn,{value:"technology",className:"mt-8 pt-4",children:s.jsx(o_e,{startup:e})}),Jt("marketing",e)&&s.jsx(nn,{value:"marketing",className:"mt-8 pt-4",children:s.jsx(l_e,{startup:e})}),Jt("business",e)&&s.jsx(nn,{value:"business",className:"mt-8 pt-4",children:s.jsx(c_e,{startup:e})}),Jt("contact",e)&&s.jsx(nn,{value:"contact",className:"mt-8 pt-4",children:s.jsx(g_e,{featureCheck:d,featureName:"Contact Directory",requiredTiers:["Growth","Pro"],description:"Access detailed contact information including emails, phone numbers, and LinkedIn profiles for key team members.",children:s.jsx(u_e,{startup:e})})}),Jt("updates",e)&&s.jsx(nn,{value:"updates",className:"mt-8 pt-4",children:s.jsx(d_e,{startup:e})}),Jt("security",e)&&s.jsx(nn,{value:"security",className:"mt-8 pt-4",children:s.jsx(h_e,{startup:e})}),Jt("reviews",e)&&s.jsx(nn,{value:"reviews",className:"mt-8 pt-4",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(An,{className:"w-5 h-5 text-yellow-500"}),s.jsx("h3",{className:"text-base font-semibold",children:"Customer Reviews"})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-base flex items-center gap-2",children:[s.jsx(An,{className:"w-4 h-4 text-yellow-500"}),"Trustpilot Reviews"]})}),s.jsx(te,{className:"space-y-4",children:e.trustPilot?YNe(e.trustPilot):s.jsx("p",{className:"text-sm text-gray-500",children:"No Trustpilot reviews available"})})]})]})})]})]})]})]}):s.jsx("div",{onClick:()=>{h({title:"Authentication required",description:"Please sign in to view company details.",variant:"destructive"})},className:"cursor-pointer",children:t})},y_e=({startup:e,className:t=""})=>{const[n,r]=g.useState(!1),a=()=>`${window.location.origin}/companies?search=${encodeURIComponent(e.name)}`,i={title:`Check out ${e.name} – ${e.description||"Innovative startup"}`,description:e.description||`Discover insights about ${e.name} and their business opportunities`,url:a(),image:e.logoUrl||""},o=async()=>{try{await navigator.clipboard.writeText(i.url),Ae.success("Link copied to clipboard!"),r(!1)}catch{Ae.error("Failed to copy link")}},l=()=>{const f=encodeURIComponent(i.title),m=encodeURIComponent(`${i.description}
809
810${i.url}`);window.open(`mailto:?subject=${f}&body=${m}`,"_blank"),r(!1)},c=()=>{const f=encodeURIComponent(`${i.title}
811
812${i.description}
813
814${i.url}`);/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?window.open(`whatsapp://send?text=${f}
814`,"_blank"):window.open(`https://web.whatsapp.com/send?text=${f}`,"_blank"),r(!1)},u=()=>{const f=encodeURIComponent(i.url),m=encodeURIComponent(i.title),y=encodeURIComponent(i.description);window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${f}&title=${m}&summary=${y}`,"_blank"),r(!1)},d=()=>{const f=encodeURIComponent(`${i.title}
815
816${i.url}`);window.open(`https://twitter.com/intent/tweet?text=${f}`,"_blank"),r(!1)},h=async()=>{if(navigator.share&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))try{await navigator.share({title:i.title,text:i.description,url:i.url}),r(!1)}catch{}};return s.jsxs(Fu,{open:n,onOpenChange:r,children:[s.jsx(Bu,{asChild:!0,children:s.jsxs(U,{variant:"outline",size:"sm",className:`w-full flex items-center gap-2 hover:bg-[rgb(234,85,43)] hover:text-white border-[rgb(234,85,43)] text-[rgb(234,85,43)] ${t}`,onClick:h,children:[s.jsx(ex,{className:"w-4 h-4"}),"Share Insights"]})}),s.jsxs(xc,{align:"end",className:"w-48",children:[s.jsxs(Qe,{onClick:o,className:"flex items-center gap-2",children:[s.jsx(RA,{className:"w-4 h-4"}),"Copy Link"]}),s.jsxs(Qe,{onClick:l,className:"flex items-center gap-2",children:[s.jsx(_a,{className:"w-4 h-4"}),"Email"]}),s.jsxs(Qe,{onClick:c,className:"flex items-center gap-2",children:[s.jsx(ti,{className:"w-4 h-4"}),"WhatsApp"]}),s.jsxs(Qe,{onClick:u,className:"flex items-center gap-2",children:[s.jsx(xa,{className:"w-4 h-4"}),"LinkedIn"]}),s.jsxs(Qe,{onClick:d,className:"flex items-center gap-2",children:[s.jsx(tr,{className:"w-4 h-4"}),"Twitter"]})]})]})},N2=e=>{if(!e||typeof e!="string")return[];const t=["typical deliverables","why the company","why the company probably needs it","why the company needs it","ideal vendor profile","kpis","deliverables / kpis","deliverables/kpis","service name","urgency score"];let n=null;return n=e.match(/^(?:\*\*)?\s*Service Name:\s*\*?\*?([^*–\-—\n]+)\*?\*?\s*(?:[–\-—:]\s*[Uu]rgency\s*:?\s*\d+\/\d+)?/gmi),(!n||n.length===0)&&(n=e.match(/^(?:\*\*)?\s*\d+\.\s+\*?\*?([^*–\-—\n]+)\*?\*?\s*(?:[–\-—]\s*[Uu]rgency\s*:?\s*\d+\/\d+)?/gm)),(!n||n.length===0)&&(n=e.match(/^#{1,3}\s+\*\*?([^*–\-—\n]+)\*\*?\s*[–\-—]\s*[Uu]rgency\s*:?\s*\d+\/\d+/gm)),(!n||n.length===0)&&(n=e.match(/^(?:\*\*)?\s*([A-Z][^*–\-—\n]+)\s*(?:\*\*)?\s*[–\-—]\s*[Uu]rgency\s*:?\s*\d+\/\d+/gm)),(!n||n.length===0)&&(n=e.match(/^#{1,3}\s+\*\*?([^*\n]+)\*\*?$/gm)),(!n||n.length===0)&&(n=e.match(/^(?:\*\*)?\s*([A-Z][A-Za-z\s&\/(),-]+)\s*(?:\*\*)?\s*[–\-—:]\s*[Uu]rgency/gm)),!n||n.length===0?[]:n.map(r=>r.replace(/^\*\*/g,"").replace(/^Service Name:\s*/gi,"").replace(/^\d+\.\s+/,"").replace(/^#{1,3}\s+/,"").replace(/\*\*/g,"").replace(/\*/g,"").replace(/\s*[–\-—:]\s*[Uu]rgency\s*:?\s*\d+\/\d+.*$/gi,"").replace(/\s*[–\-—:]\s*$/g,"").replace(/\n/g,"").trim()).filter(r=>{if(r.length<3||r.length>100)return!1;const a=r.toLowerCase();return!t.some(i=>a.includes(i))})},x_e=({startup:e,index:t})=>{const{user:n,hasMatchmakingAccess:r}=Ie(),{toast:a}=Ve(),[i,o]=g.useState(!1),[l,c]=g.useState(!1),[u,d]=g.useState(null),[h,f]=g.useState(!1),[m,y]=g.useState(!1);g.useEffect(()=>{(async()=>{if(n)try{const{data:P,error:R}=await K.rpc("is_company_saved",{p_user_id:n.id,p_company_id:e.name});if(R)throw R;o(P)}catch(P){console.error("Error checking if company is saved:",P)}})()},[n,e.name]);const p=async()=>{if(!n){a({title:"Authentication required",description:"Please sign in to save companies.",variant:"destructive"});return}c(!0);try{if(i){const{error:A}=await K.from("saved_companies").delete().eq("user_id",n.id).eq("company_id",e.name);if(A)throw A;o(!1),a({title:"Company removed",description:`${e.name} has been removed from your saved companies.`})}else{const{error:A}=await K.from("saved_companies").insert({user_id:n.id,company_id:e.name,company_name:e.name,company_domain:e.website,company_logo_url:e.logoUrl});if(A)throw A;o(!0),a({title:"Company saved",description:`${e.name} has been added to your saved companies.`})}}catch(A){console.error("Error toggling save status:",A),a({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}finally{c(!1)}},x=async()=>
816{if(!n){a({title:"Authentication required",description:"Please sign in to use matchmaking.",variant:"destructive"});return}if(!r()){window.location.href="/pricing";return}y(!0);try{const{data:A,error:P}=await K.functions.invoke("matchmaking-score",{body:{company_data:e}});if(P)throw P;d(A),f(!0)}catch(A){console.error("Error getting matchmaking score:",A),a({title:"Matchmaking error",description:A.message||"Failed to get matchmaking score",variant:"destructive"})}finally{y(!1)}},v=A=>{switch(A.toLowerCase()){case"funding":return"bg-green-100 text-green-800 border-green-200";case"hiring":return"bg-blue-100 text-blue-800 border-blue-200";case"product launch":return"bg-purple-100 text-purple-800 border-purple-200";case"partnership":return"bg-orange-100 text-orange-800 border-orange-200";case"award":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"regulatory":return"bg-red-100 text-red-800 border-red-200";case"market signal":return"bg-indigo-100 text-indigo-800 border-indigo-200";case"news":return"bg-cyan-100 text-cyan-800 border-cyan-200";case"social media":return"bg-pink-100 text-pink-800 border-pink-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},b=A=>{const P=parseFloat(A);return P>=80?"bg-green-100 text-green-800":P>=60?"bg-yellow-100 text-yellow-800":P>=40?"bg-orange-100 text-orange-800":"bg-red-100 text-red-800"},w=A=>{const P=A||(e.domain?e.domain.replace(/\.(com|io|co|net|org|ai)$/,""):"");return P&&P!=="Unknown Company"?P.charAt(0).toUpperCase():"?"},S=A=>{var R;return!A||A==="null"||A.trim()===""?null:((R=A.split(`
817`).filter(I=>I.trim()!=="")[0])==null?void 0:R.trim())||null},j=A=>{try{return new Date(A).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return A}},N=S(e.logoUrl),C=!e.score||e.score==="No Score",_=A=>{try{let P=A.trim();return/^https?:\/\//i.test(P)&&(P=new URL(P).hostname),P=P.replace(/^www\./i,"").replace(/\/$/,""),P.toLowerCase()}catch{return A.replace(/^https?:\/\//i,"").replace(/^www\./i,"").split("/")[0].toLowerCase()}};return s.jsxs(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:t*.1},whileHover:{y:-4,transition:{duration:.2}},children:[s.jsxs(Y,{className:`h-full bg-white hover:shadow-lg transition-all duration-300 border border-gray-200 hover:border-agency-accent/30 flex flex-col ${C?"relative overflow-hidden":""}`,children:[C&&s.jsx("div",{className:"absolute top-0 left-0 right-0 bg-blue-50 border-b border-blue-200 p-2",children:s.jsxs("div",{className:"flex items-center justify-center gap-2 text-blue-700 text-xs",children:[s.jsx(Pt,{className:"w-3 h-3 animate-spin"}),s.jsx(Xn,{className:"w-3 h-3"}),s.jsx("span",{children:"Data being researched - full details coming soon"})]})}),s.jsx(xe,{className:`pb-3 ${C?"pt-12":""}`,children:s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[s.jsxs(Ks,{className:"h-10 w-10 flex-shrink-0",children:[s.jsx(ni,{src:N||void 0,alt:`${e.name} logo`,loading:"lazy",onError:A=>{A.currentTarget.style.display="none"}}),s.jsx(Ys,{className:"bg-agency-accent/10 text-agency-accent font-semibold",children:w(e.name)})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx(Se,{className:"text-lg font-semibold text-gray-900 mb-2 line-clamp-1",children:e.name}),e.website&&e.website!==""&&s.jsxs("div",{className:"flex items-center text-sm text-gray-600 mb-2",children:[s.jsx(ar,{className:"w-3 h-3 mr-1 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.website})]}),s.jsxs("div",{className:"flex items-center text-xs text-gray-400 mb-2",children:[s.jsx(sn,{className:"w-3 h-3 mr-1"}),s.jsxs("span",{children:["Added: ",j(e.addedDate)]})]})]})]}),s.jsxs("div",{className:"flex flex-col items-end gap-2 flex-shrink-0 w-20",children:[s.jsxs("div",{className:"flex gap-1",children:[s.jsx(U,{variant:"ghost",size:"sm",onClick:x,disabled:m,className:"p-1 h-8 w-8 hover:bg-yellow-50",title:"AI Matchmaking",children:m?s.jsx(Pt,{className:"w-4 h-4 animate-spin"}):s.jsx(An,{className:"w-4 h-4 text-yellow-600"})}),s.jsx(U,{variant:"ghost",size:"sm",onClick:p,disabled:l,className:"p-1 h-8 w-8 hover:bg-red-50",title:"Save Company",children:l?s.jsx(Pt,{className:"w-4 h-4 animate-spin"}):s.jsx(zn,{className:`w-4 h-4 transition-colors ${i?"fill-red-500 text-red-500":"text-gray-400 hover:text-red-500"}`})})]}),e.score&&e.score!=="No Score"?s.jsxs(fe,{className:`${b(e.score)} flex items-center gap-1 text-xs max-w-full`,children:[s.jsx(An,{className:"w-3 h-3 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.score})]}):s.jsx(fe,{className:"bg-blue-100 text-blue-800 animate-pulse text-xs max-w-full",children:s.jsx("span",{className:"truncate",children:"Scraping..."})})]})]})}),s.jsxs(te,{className:"pt-0 flex-1 flex flex-col",children:[s.jsxs("div",{className:"flex-1 space-y-3",children:[e.description&&e.description!=="No description available"&&s.jsx("p",{className:"text-sm text-gray-600 line-clamp-2",children:e.description}),s.jsxs("div",{className:"company-info-grid",children:[m_e(e.location)&&s.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[s.jsx(jc,{className:"w-3 h-3 mr-1 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.location})]}),f_e(e.employeeCount)&&s.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[s.jsx(At,{className:"w-3 h-3 mr-1 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.employeeCount})]}),Qg(e.industry)&&s.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[s.jsx(tt,{className:"w-3 h-3 mr-1 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.industry})]}),Qg(e.fundingAmount)&&s.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[s.jsx(ze,{className:"w-3 h-3 mr-1 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.fundingAmount})]})]}),s.jsx("div",{className:"pt-2 border-t border-gray-100",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(fe,{className:`${v(e.signalType)} text-xs flex-shrink-0`,children:e.signalType}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm text-gray-700 line-clamp-2",children:e.latestSignal||e.marketSignals})})]})}),(()=>{const A=N2(e.potentialServices);if(A.length===0)return null;const P=A.slice(0,4),R=A.length-4;return s.jsx("div",{className:"pt-3 border-t border-gray-100",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(rl,{className:"w-4 h-4 text-purple-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("span",{className:"text-xs font-semibold text-gray-700",children:"Services to Pitch: "}),s.jsxs("span",{className:"text-sm text-gray-700",children:[P.join(", "),R>0&&s.jsxs(s.Fragment,{children:[", ",s.jsx(i$,{startup:e,isSaved:i,onSave:()=>o(!0),onUnsave:()=>o(!1),defaultTab:"signals",children:s.jsxs("button",{className:"text-purple-600 hover:text-purple-700 font-medium hover:underline",children:["+",R," more"]})})]})]})]})]})})})()]}),s.jsxs("div",{className:"flex flex-col gap-2 pt-3 mt-auto",children:[s.jsx(i$,{startup:e,isSaved:i,onSave:()=>o(!0),onUnsave:()=>o(!1),children:s.jsx(U,{variant:"outline",size:"sm",className:"w-full",children:"View Details"})}),e.website&&s.jsx(ee,{to:`/people?domain=${encodeURIComponent(_(e.website))}`,children:s.jsxs(U,{variant:"outline",size:"sm",className:"w-full gap-2",children:[s.jsx(At,{className:"w-4 h-4"}),"Find Contacts"]})}),s.jsx(y_e,{startup:e})]})]})]}),s.jsx(pK,{isOpen:h,onClose:()=>f(!1),matchData:u})]})},Bt=g.memo(x_e);function o$(e,[t,n]){return Math.min(n,Math.max(t,e))}function v_e(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var b_e="DismissableLayer",Tk="dismissableLayer.update",w_e="dismissableLayer.pointerDownOutside",S_e="dismissableLayer.focusOutside",l$,oY=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lY=g.forwardRef((e,t)=>
vendor: 9,706 bytes, line 817
817{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(oY),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=lt(t,C=>h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=__e(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=C_e(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return v_e(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(l$=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),c$(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=l$)}},[d,f,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),c$())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(Tk,C),()=>document.removeEventListener(Tk,C)},[]),s.jsx(Te.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,j.onPointerDownCapture)})});lY.displayName=b_e;var j_e="DismissableLayerBranch",N_e=g.forwardRef((e,t)=>{const n=g.useContext(oY),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Te.div,{...e,ref:a})});N_e.displayName=j_e;function __e(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){cY(w_e,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function C_e(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&cY(S_e,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function c$(){const e=new CustomEvent(Tk);document.dispatchEvent(e)}function cY(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var YN=0;function E_e(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??u$()),document.body.insertAdjacentElement("beforeend",e[1]??u$()),YN++,()=>{YN===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),YN--}},[])}function u$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var XN="focusScope.autoFocusOnMount",QN="focusScope.autoFocusOnUnmount",d$={bubbles:!1,cancelable:!0},k_e="FocusScope",uY=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=Dt(a),d=Dt(i),h=g.useRef(null),f=lt(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:Rl(h.current,{select:!0})},x=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||Rl(h.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Rl(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const b=new MutationObserver(v);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),b.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){f$.add(m);const p=document.activeElement;if(!l.contains(p)){const v=new CustomEvent(XN,d$);l.addEventListener(XN,u),l.dispatchEvent(v),v.defaultPrevented||(P_e(I_e(dY(l)),{select:!0}),document.activeElement===p&&Rl(l))}return()=>{l.removeEventListener(XN,u),setTimeout(()=>{const v=new CustomEvent(QN,d$);l.addEventListener(QN,d),l.dispatchEvent(v),v.defaultPrevented||Rl(p??document.body,{select:!0}),l.removeEventListener(QN,d),f$.remove(m)},0)}}},[l,u,d,m]);const y=g.useCallback(p=>{if(!n&&!r||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,v=document.activeElement;if(x&&v){const b=p.currentTarget,[w,S]=T_e(b);w&&S?!p.shiftKey&&v===S?(p.preventDefault(),n&&Rl(w,{select:!0})):p.shiftKey&&v===w&&(p.preventDefault(),n&&Rl(S,{select:!0})):v===b&&p.preventDefault()}},[n,r,m.paused]);return s.jsx(Te.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});uY.displayName=k_e;function P_e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rl(r,{select:t}),document.activeElement!==n)return}function T_e(e){const t=dY(e),n=h$(t,e),r=h$(t.reverse(),e);return[n,r]}function dY(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h$(e,t){for(const n of e)if(!A_e(n,{upTo:t}))return n}function A_e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function O_e(e){return e instanceof HTMLInputElement&&"select"in e}function Rl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&O_e(e)&&t&&e.select()}}var f$=R_e();function R_e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=m$(e,t),e.unshift(t)},remove(t){var n;e=m$(e,t),(n=e[0])==null||n.resume()}}}function m$(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function I_e(e){return e.filter(t=>t.tagName!=="A")}var M_e="Portal",hY=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);Vn(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Pi.createPortal(s.jsx(Te.div,{...r,ref:t}),o):null});hY.displayName=M_e;function _2(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var fY=hx(),ZN=function(){},mj=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:ZN,onWheelCapture:ZN,onTouchMoveCapture:ZN}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noIsolation,y=e.inert,p=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,b=e.gapMode,w=ai(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,j=dx([n,t]),N=Vt(Vt({},w),a);return g.createElement(g.Fragment,null,d&&g.createElement(S,{sideCar:fY,removeScrollBar:u,shards:h,noIsolation:m,inert:y,setCallbacks:i,allowPinchZoom:!!p,lockRef:n,gapMode:b}),o?g.cloneElement(g.Children.only(l),Vt(Vt({},N),{ref:j})):g.createElement(v,Vt({},N,{className:c,ref:j}),l))});mj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mj.classNames={fullWidth:yc,zeroRight:gc};var Ak=!1;if(typeof window<"u")try{var Uv=Object.defineProperty({},"passive",{get:function(){return Ak=!0,!0}});window.addEventListener("test",Uv,Uv),window.removeEventListener("test",Uv,Uv)}catch{Ak=!1}var Wd=Ak?{passive:!1}:!1,D_e=function(e){return e.tagName==="TEXTAREA"},mY=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!D_e(e)&&n[t]==="visible")},L_e=function(e){return mY(e,"overflowY")},$_e=function(e){return mY(e,"overflowX")},p$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=pY(e,r);if(a){var i=gY(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},F_e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B_e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},pY=function(e,t){return e==="v"?L_e(t):$_e(t)},gY=function(e,t){return e==="v"?F_e(t):B_e(t)},z_e=function(e,t){return e==="h"&&t==="rtl"?-1:1},U_e=function(e,t,n,r,a){var i=z_e(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{var m=gY(e,l),y=m[0],p=m[1],x=m[2],v=p-x-i*y;(y||v)&&pY(e,l)&&(h+=v,f+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));
vendor: 4,774 bytes, lines 817-820
817return(d&&(Math.abs(h)<1||!a)||!d&&(Math.abs(f)<1||!a))&&(u=!0),u},qv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},g$=function(e){return[e.deltaX,e.deltaY]},y$=function(e){return e&&"current"in e?e.current:e},q_e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},W_e=function(e){return`
818  .block-interactivity-`.concat(e,` {pointer-events: none;}
819  .allow-interactivity-`).concat(e,` {pointer-events: all;}
820`)},V_e=0,Vd=[];function H_e(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(V_e++)[0],i=g.useState(bm)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=xd([e.lockRef.current],(e.shards||[]).map(y$),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var v=qv(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-v[0],S="deltaY"in p?p.deltaY:b[1]-v[1],j,N=p.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&C==="h"&&N.type==="range")return!1;var _=p$(C,N);if(!_)return!0;if(_?j=C:(j=C==="v"?"h":"v",_=p$(C,N)),!_)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=j),!j)return!0;var A=r.current||j;return U_e(A,x,p,A==="h"?w:S,!0)},[]),c=g.useCallback(function(p){var x=p;if(!(!Vd.length||Vd[Vd.length-1]!==i)){var v="deltaY"in x?g$(x):qv(x),b=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&q_e(j.delta,v)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(y$).filter(Boolean).filter(function(j){return j.contains(x.target)}),S=w.length>0?l(x,w[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(p,x,v,b){var w={name:p,delta:x,target:v,should:b,shadowParent:G_e(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=g.useCallback(function(p){n.current=qv(p),r.current=void 0},[]),h=g.useCallback(function(p){u(p.type,g$(p),p.target,l(p,e.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,qv(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return Vd.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Wd),document.addEventListener("touchmove",c,Wd),document.addEventListener("touchstart",d,Wd),function(){Vd=Vd.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,Wd),document.removeEventListener("touchmove",c,Wd),document.removeEventListener("touchstart",d,Wd)}},[]);var m=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(i,{styles:W_e(a)}):null,m?g.createElement(mx,{gapMode:e.gapMode}):null)}function G_e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const K_e=fx(fY,H_e);var yY=g.forwardRef(function(e,t){return g.createElement(mj,Vt({},e,{ref:t,sideCar:K_e}))});yY.classNames=mj.classNames;var Y_e=[" ","Enter","ArrowUp","ArrowDown"],X_e=[" ","Enter"],vx="Select",[pj,gj,Q_e]=Xy(vx),[Sm,cht]=Qs(vx,[Q_e,$c]),yj=$c(),[Z_e,qc]=Sm(vx),[J_e,eCe]=Sm(vx),xY=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:f,required:m,form:y}=e,p=yj(t),[x,v]=g.useState(null),[b,w]=g.useState(null),[S,j]=g.useState(!1),N=cx(u),[C=!1,_]=Hs({prop:r,defaultProp:a,onChange:i}),[A,P]=Hs({prop:o,defaultProp:l,onChange:c}),R=g.useRef(null),I=x?y||!!x.closest("form"):!0,[B,$]=g.useState(new Set),q=Array.from(B).map(L=>L.props.value).join(";");return s.jsx(IS,{...p,children:s.jsxs(Z_e,{required:m,scope:t,trigger:x,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:Vs(),value:A,onValueChange:P,open:C,onOpenChange:_,dir:N,triggerPointerDownPosRef:R,disabled:f,children:[s.jsx(pj.Provider,{scope:t,children:s.jsx(J_e,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(L=>{$(k=>new Set(k).add(L))},[]),onNativeOptionRemove:g.useCallback(L=>{$(k=>{const T=new Set(k);return T.delete(L),T})},[]),children:n})}),I?s.jsxs(qY,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:h,value:A,onChange:L=>P(L.target.value),disabled:f,form:y,children:[A===void 0?s.jsx("option",{value:""}):null,Array.from(B)]},q):null]})})};
vendor: 16,848 bytes, line 820
820xY.displayName=vx;var vY="SelectTrigger",bY=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=yj(n),o=qc(vY,n),l=o.disabled||r,c=lt(t,o.onTriggerChange),u=gj(n),d=g.useRef("touch"),[h,f,m]=WY(p=>{const x=u().filter(w=>!w.disabled),v=x.find(w=>w.value===o.value),b=VY(x,p,v);b!==void 0&&o.onValueChange(b.value)}),y=p=>{l||(o.onOpenChange(!0),m()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return s.jsx(nx,{asChild:!0,...i,children:s.jsx(Te.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":UY(o.value)?"":void 0,...a,ref:c,onClick:we(a.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&y(p)}),onPointerDown:we(a.onPointerDown,p=>{d.current=p.pointerType;const x=p.target;x.hasPointerCapture(p.pointerId)&&x.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(y(p),p.preventDefault())}),onKeyDown:we(a.onKeyDown,p=>{const x=h.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(x&&p.key===" ")&&Y_e.includes(p.key)&&(y(),p.preventDefault())})})})});bY.displayName=vY;var wY="SelectValue",SY=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:o="",...l}=e,c=qc(wY,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,h=lt(t,c.onValueNodeChange);return Vn(()=>{u(d)},[u,d]),s.jsx(Te.span,{...l,ref:h,style:{pointerEvents:"none"},children:UY(c.value)?s.jsx(s.Fragment,{children:o}):i})});SY.displayName=wY;var tCe="SelectIcon",jY=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return s.jsx(Te.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});jY.displayName=tCe;var nCe="SelectPortal",NY=e=>s.jsx(hY,{asChild:!0,...e});NY.displayName=nCe;var nd="SelectContent",_Y=g.forwardRef((e,t)=>{const n=qc(nd,e.__scopeSelect),[r,a]=g.useState();if(Vn(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?Ga.createPortal(s.jsx(CY,{scope:e.__scopeSelect,children:s.jsx(pj.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(EY,{...e,ref:t})});_Y.displayName=nd;var mi=10,[CY,Wc]=Sm(nd),rCe="SelectContentImpl",EY=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x,...v}=e,b=qc(nd,n),[w,S]=g.useState(null),[j,N]=g.useState(null),C=lt(t,ne=>S(ne)),[_,A]=g.useState(null),[P,R]=g.useState(null),I=gj(n),[B,$]=g.useState(!1),q=g.useRef(!1);g.useEffect(()=>{if(w)return ux(w)},[w]),E_e();const L=g.useCallback(ne=>{const[le,...ie]=I().map(G=>G.ref.current),[ye]=ie.slice(-1),pe=document.activeElement;for(const G of ne)if(G===pe||(G==null||G.scrollIntoView({block:"nearest"}),G===le&&j&&(j.scrollTop=0),G===ye&&j&&(j.scrollTop=j.scrollHeight),G==null||G.focus(),document.activeElement!==pe))return},[I,j]),k=g.useCallback(()=>L([_,w]),[L,_,w]);g.useEffect(()=>{B&&k()},[B,k]);const{onOpenChange:T,triggerPointerDownPosRef:F}=b;g.useEffect(()=>{if(w){let ne={x:0,y:0};const le=ye=>{var pe,G;ne={x:Math.abs(Math.round(ye.pageX)-(((pe=F.current)==null?void 0:pe.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((G=F.current)==null?void 0:G.y)??0))}},ie=ye=>{ne.x<=10&&ne.y<=10?ye.preventDefault():w.contains(ye.target)||T(!1),document.removeEventListener("pointermove",le),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",ie,{capture:!0})}}},[w,T,F]),g.useEffect(()=>{const ne=()=>T(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[T]);const[O,E]=WY(ne=>{const le=I().filter(pe=>!pe.disabled),ie=le.find(pe=>pe.ref.current===document.activeElement),ye=VY(le,ne,ie);ye&&setTimeout(()=>ye.ref.current.focus())}),D=g.useCallback((ne,le,ie)=>{const ye=!q.current&&!ie;(b.value!==void 0&&b.value===le||ye)&&(A(ne),ye&&(q.current=!0))},[b.value]),M=g.useCallback(()=>w==null?void 0:w.focus(),[w]),X=g.useCallback((ne,le,ie)=>{const ye=!q.current&&!ie;(b.value!==void 0&&b.value===le||ye)&&R(ne)},[b.value]),W=r==="popper"?Ok:kY,re=W===Ok?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x}:{};return s.jsx(CY,{scope:n,content:w,viewport:j,onViewportChange:N,itemRefCallback:D,selectedItem:_,onItemLeave:M,itemTextRefCallback:X,focusSelectedItem:k,selectedItemText:P,position:r,isPositioned:B,searchRef:O,children:s.jsx(yY,{as:yo,allowPinchZoom:!0,children:s.jsx(uY,{asChild:!0,trapped:b.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:we(a,ne=>{var le;(le=b.trigger)==null||le.focus({preventScroll:!0}),ne.preventDefault()}),children:s.jsx(lY,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(W,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:ne=>ne.preventDefault(),...v,...re,onPlaced:()=>$(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:we(v.onKeyDown,ne=>{const le=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!le&&ne.key.length===1&&E(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let ye=I().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const pe=ne.target,G=ye.indexOf(pe);ye=ye.slice(G+1)}setTimeout(()=>L(ye)),ne.preventDefault()}})})})})})})});EY.displayName=rCe;var sCe="SelectItemAlignedPosition",kY=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=qc(nd,n),o=Wc(nd,n),[l,c]=g.useState(null),[u,d]=g.useState(null),h=lt(t,C=>d(C)),f=gj(n),m=g.useRef(!1),y=g.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:v,focusSelectedItem:b}=o,w=g.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&x&&v){const C=i.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),P=v.getBoundingClientRect();if(i.dir!=="rtl"){const pe=P.left-_.left,G=A.left-pe,Pe=C.left-G,J=C.width+Pe,oe=Math.max(J,_.width),se=window.innerWidth-mi,je=o$(G,[mi,Math.max(mi,se-oe)]);l.style.minWidth=J+"px",l.style.left=je+"px"}else{const pe=_.right-P.right,G=window.innerWidth-A.right-pe,Pe=window.innerWidth-C.right-G,J=C.width+Pe,oe=Math.max(J,_.width),se=window.innerWidth-mi,je=o$(G,[mi,Math.max(mi,se-oe)]);l.style.minWidth=J+"px",l.style.right=je+"px"}const R=f(),I=window.innerHeight-mi*2,B=p.scrollHeight,$=window.getComputedStyle(u),q=parseInt($.borderTopWidth,10),L=parseInt($.paddingTop,10),k=parseInt($.borderBottomWidth,10),T=parseInt($.paddingBottom,10),F=q+L+B+T+k,O=Math.min(x.offsetHeight*5,F),E=window.getComputedStyle(p),D=parseInt(E.paddingTop,10),M=parseInt(E.paddingBottom,10),X=C.top+C.height/2-mi,W=I-X,re=x.offsetHeight/2,ne=x.offsetTop+re,le=q+L+ne,ie=F-le;if(le<=X){const pe=R.length>0&&x===R[R.length-1].ref.current;l.style.bottom="0px";const G=u.clientHeight-p.offsetTop-p.offsetHeight,Pe=Math.max(W,re+(pe?M:0)+G+k),J=le+Pe;l.style.height=J+"px"}else{const pe=R.length>0&&x===R[0].ref.current;l.style.top="0px";const Pe=Math.max(X,q+p.offsetTop+(pe?D:0)+re)+ie;l.style.height=Pe+"px",p.scrollTop=le-X+p.offsetTop}l.style.margin=`${mi}px 0`,l.style.minHeight=O+"px",l.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[f,i.trigger,i.valueNode,l,u,p,x,v,i.dir,r]);Vn(()=>w(),[w]);const[S,j]=g.useState();Vn(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const N=g.useCallback(C=>{C&&y.current===!0&&(w(),b==null||b(),y.current=!1)},[w,b]);return s.jsx(iCe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:s.jsx(Te.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});kY.displayName=sCe;var aCe="SelectPopperPosition",Ok=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=mi,...i}=e,o=yj(n);return s.jsx(MS,{...o,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ok.displayName=aCe;var[iCe,C2]=Sm(nd,{}),Rk="SelectViewport",PY=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=Wc(Rk,n),o=C2(Rk,n),l=lt(t,i.onViewportChange),c=g.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(pj.Slot,{scope:n,children:s.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:we(a.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const m=Math.abs(c.current-d.scrollTop);if(m>0){const y=window.innerHeight-mi*2,p=parseFloat(h.style.minHeight),x=parseFloat(h.style.height),v=Math.max(p,x);if(v<y){const b=v+m,w=Math.min(y,b),S=b-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});PY.displayName=Rk;var TY="SelectGroup",[oCe,lCe]=Sm(TY),cCe=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Vs();return s.jsx(oCe,{scope:n,id:a,children:s.jsx(Te.div,{role:"group","aria-labelledby":a,...r,ref:t})})});cCe.displayName=TY;var AY="SelectLabel",OY=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=lCe(AY,n);return s.jsx(Te.div,{id:a.id,...r,ref:t})});OY.displayName=AY;var q0="SelectItem",[uCe,RY]=Sm(q0),IY=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...o}=e,l=qc(q0,n),c=Wc(q0,n),u=l.value===r,[d,h]=g.useState(i??""),[f,m]=g.useState(!1),y=lt(t,b=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,b,r,a)}),p=Vs(),x=g.useRef("touch"),v=()=>{a||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(uCe,{scope:n,value:r,disabled:a,textId:p,isSelected:u,onItemTextChange:g.useCallback(b=>{h(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(pj.ItemSlot,{scope:n,value:r,disabled:a,textValue:d,children:s.jsx(Te.div,{role:"option","aria-labelledby":p,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:y,onFocus:we(o.onFocus,()=>m(!0)),onBlur:we(o.onBlur,()=>m(!1)),onClick:we(o.onClick,()=>{x.current!=="mouse"&&v()}),onPointerUp:we(o.onPointerUp,()=>{x.current==="mouse"&&v()}),onPointerDown:we(o.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:we(o.onPointerMove,b=>{var w;x.current=b.pointerType,a?(w=c.onItemLeave)==null||w.call(c):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(o.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:we(o.onKeyDown,b=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(X_e.includes(b.key)&&v(),b.key===" "&&b.preventDefault())})})})})});IY.displayName=q0;var Tp="SelectItemText",MY=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,o=qc(Tp,n),l=Wc(Tp,n),c=RY(Tp,n),u=eCe(Tp,n),[d,h]=g.useState(null),f=lt(t,v=>h(v),c.onItemTextChange,v=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,v,c.value,c.disabled)}),m=d==null?void 0:d.textContent,y=g.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=u;return Vn(()=>(p(y),()=>x(y)),[p,x,y]),s.jsxs(s.Fragment,{children:[s.jsx(Te.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ga.createPortal(i.children,o.valueNode):null]})});MY.displayName=Tp;var DY="SelectItemIndicator",LY=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return RY(DY,n).isSelected?s.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});LY.displayName=DY;var Ik="SelectScrollUpButton",$Y=g.forwardRef((e,t)=>{const n=Wc(Ik,e.__scopeSelect),r=C2(Ik,e.__scopeSelect),[a,i]=g.useState(!1),o=lt(t,r.onScrollButtonChange);return Vn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(BY,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});$Y.displayName=Ik;var Mk="SelectScrollDownButton",FY=g.forwardRef((e,t)=>{const n=Wc(Mk,e.__scopeSelect),r=C2(Mk,e.__scopeSelect),[a,i]=g.useState(!1),o=lt(t,r.onScrollButtonChange);return Vn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(BY,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});FY.displayName=Mk;var BY=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=Wc("SelectScrollButton",n),o=g.useRef(null),l=gj(n),c=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Vn(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),s.jsx(Te.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:we(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:we(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:we(a.onPointerLeave,()=>{c()})})}),dCe="SelectSeparator",zY=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});zY.displayName=dCe;var Dk="SelectArrow",hCe=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=yj(n),i=qc(Dk,n),o=Wc(Dk,n);return i.open&&o.position==="popper"?s.jsx(DS,{...a,...r,ref:t}):null});hCe.displayName=Dk;function UY(e){return e===""||e===void 0}var qY=g.forwardRef((e,t)=>{const{value:n,...r}=e,a=g.useRef(null),i=lt(t,a),o=_2(n);return g.useEffect(()=>{const l=a.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&d){const h=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(h)}},[o,n]),s.jsx(Qy,{asChild:!0,children:s.jsx("select",{...r,ref:i,defaultValue:n})})});qY.displayName="BubbleSelect";function WY(e){const t=Dt(e),n=g.useRef(""),r=g.useRef(0),a=g.useCallback(o=>{const l=n.current+o;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function VY(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=fCe(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function fCe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mCe=xY,HY=bY,pCe=SY,gCe=jY,yCe=NY,GY=_Y,xCe=PY,KY=OY,YY=IY,vCe=MY,bCe=LY,XY=$Y,QY=FY,ZY=zY;const hr=mCe,fr=pCe,nr=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(HY,{ref:r,className:ve("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
820ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(gCe,{asChild:!0,children:s.jsx(hc,{className:"h-4 w-4 opacity-50"})})]}));nr.displayName=HY.displayName;const JY=g.forwardRef(({className:e,...t},n)=>s.jsx(XY,{ref:n,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(zq,{className:"h-4 w-4"})}));JY.displayName=XY.displayName;const eX=g.forwardRef(({className:e,...t},n)=>s.jsx(QY,{ref:n,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(hc,{className:"h-4 w-4"})}));eX.displayName=QY.displayName;const rr=g.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>s.jsx(yCe,{children:s.jsxs(GY,{ref:a,className:ve("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(JY,{}),s.jsx(xCe,{className:ve("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(eX,{})]})}));rr.displayName=GY.displayName;const wCe=g.forwardRef(({className:e,...t},n)=>s.jsx(KY,{ref:n,className:ve("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));wCe.displayName=KY.displayName;const bt=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(YY,{ref:r,className:ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(bCe,{children:s.jsx(Ko,{className:"h-4 w-4"})})}),s.jsx(vCe,{children:t})]}));bt.displayName=YY.displayName;const SCe=g.forwardRef(({className:e,...t},n)=>s.jsx(ZY,{ref:n,className:ve("-mx-1 my-1 h-px bg-muted",e),...t}));SCe.displayName=ZY.displayName;function jCe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var NCe="DismissableLayer",Lk="dismissableLayer.update",_Ce="dismissableLayer.pointerDownOutside",CCe="dismissableLayer.focusOutside",x$,tX=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nX=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(tX),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=lt(t,C=>h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=PCe(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=TCe(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return jCe(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(x$=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),v$(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=x$)}},[d,f,n,u]),g.useEffect(()=>()=>
vendor: 18,465 bytes, lines 820-823
820{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),v$())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(Lk,C),()=>document.removeEventListener(Lk,C)},[]),s.jsx(Te.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,j.onPointerDownCapture)})});nX.displayName=NCe;var ECe="DismissableLayerBranch",kCe=g.forwardRef((e,t)=>{const n=g.useContext(tX),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Te.div,{...e,ref:a})});kCe.displayName=ECe;function PCe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){rX(_Ce,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function TCe(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&rX(CCe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function v$(){const e=new CustomEvent(Lk);document.dispatchEvent(e)}function rX(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var JN=0;function ACe(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??b$()),document.body.insertAdjacentElement("beforeend",e[1]??b$()),JN++,()=>{JN===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),JN--}},[])}function b$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var e_="focusScope.autoFocusOnMount",t_="focusScope.autoFocusOnUnmount",w$={bubbles:!1,cancelable:!0},OCe="FocusScope",sX=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=Dt(a),d=Dt(i),h=g.useRef(null),f=lt(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:Il(h.current,{select:!0})},x=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||Il(h.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Il(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const b=new MutationObserver(v);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),b.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){j$.add(m);const p=document.activeElement;if(!l.contains(p)){const v=new CustomEvent(e_,w$);l.addEventListener(e_,u),l.dispatchEvent(v),v.defaultPrevented||(RCe($Ce(aX(l)),{select:!0}),document.activeElement===p&&Il(l))}return()=>{l.removeEventListener(e_,u),setTimeout(()=>{const v=new CustomEvent(t_,w$);l.addEventListener(t_,d),l.dispatchEvent(v),v.defaultPrevented||Il(p??document.body,{select:!0}),l.removeEventListener(t_,d),j$.remove(m)},0)}}},[l,u,d,m]);const y=g.useCallback(p=>{if(!n&&!r||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,v=document.activeElement;if(x&&v){const b=p.currentTarget,[w,S]=ICe(b);w&&S?!p.shiftKey&&v===S?(p.preventDefault(),n&&Il(w,{select:!0})):p.shiftKey&&v===w&&(p.preventDefault(),n&&Il(S,{select:!0})):v===b&&p.preventDefault()}},[n,r,m.paused]);return s.jsx(Te.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});sX.displayName=OCe;function RCe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Il(r,{select:t}),document.activeElement!==n)return}function ICe(e){const t=aX(e),n=S$(t,e),r=S$(t.reverse(),e);return[n,r]}function aX(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function S$(e,t){for(const n of e)if(!MCe(n,{upTo:t}))return n}function MCe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function DCe(e){return e instanceof HTMLInputElement&&"select"in e}function Il(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DCe(e)&&t&&e.select()}}var j$=LCe();function LCe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=N$(e,t),e.unshift(t)},remove(t){var n;e=N$(e,t),(n=e[0])==null||n.resume()}}}function N$(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $Ce(e){return e.filter(t=>t.tagName!=="A")}var FCe="Portal",iX=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);Vn(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Pi.createPortal(s.jsx(Te.div,{...r,ref:t}),o):null});iX.displayName=FCe;var oX=hx(),n_=function(){},xj=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:n_,onWheelCapture:n_,onTouchMoveCapture:n_}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noIsolation,y=e.inert,p=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,b=e.gapMode,w=ai(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,j=dx([n,t]),N=Vt(Vt({},w),a);return g.createElement(g.Fragment,null,d&&g.createElement(S,{sideCar:oX,removeScrollBar:u,shards:h,noIsolation:m,inert:y,setCallbacks:i,allowPinchZoom:!!p,lockRef:n,gapMode:b}),o?g.cloneElement(g.Children.only(l),Vt(Vt({},N),{ref:j})):g.createElement(v,Vt({},N,{className:c,ref:j}),l))});xj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xj.classNames={fullWidth:yc,zeroRight:gc};var $k=!1;if(typeof window<"u")try{var Wv=Object.defineProperty({},"passive",{get:function(){return $k=!0,!0}});window.addEventListener("test",Wv,Wv),window.removeEventListener("test",Wv,Wv)}catch{$k=!1}var Hd=$k?{passive:!1}:!1,BCe=function(e){return e.tagName==="TEXTAREA"},lX=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!BCe(e)&&n[t]==="visible")},zCe=function(e){return lX(e,"overflowY")},UCe=function(e){return lX(e,"overflowX")},_$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=cX(e,r);if(a){var i=uX(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qCe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},WCe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cX=function(e,t){return e==="v"?zCe(t):UCe(t)},uX=function(e,t){return e==="v"?qCe(t):WCe(t)},VCe=function(e,t){return e==="h"&&t==="rtl"?-1:1},HCe=function(e,t,n,r,a){var i=VCe(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{var m=uX(e,l),y=m[0],p=m[1],x=m[2],v=p-x-i*y;(y||v)&&cX(e,l)&&(h+=v,f+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!a)||!d&&(Math.abs(f)<1||!a))&&(u=!0),u},Vv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},C$=function(e){return[e.deltaX,e.deltaY]},E$=function(e){return e&&"current"in e?e.current:e},GCe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KCe=function(e){return`
821  .block-interactivity-`.concat(e,` {pointer-events: none;}
822  .allow-interactivity-`).concat(e,` {pointer-events: all;}
823`)},YCe=0,Gd=[];function XCe(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(YCe++)[0],i=g.useState(bm)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=xd([e.lockRef.current],(e.shards||[]).map(E$),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var v=Vv(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-v[0],S="deltaY"in p?p.deltaY:b[1]-v[1],j,N=p.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&C==="h"&&N.type==="range")return!1;var _=_$(C,N);if(!_)return!0;if(_?j=C:(j=C==="v"?"h":"v",_=_$(C,N)),!_)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=j),!j)return!0;var A=r.current||j;return HCe(A,x,p,A==="h"?w:S,!0)},[]),c=g.useCallback(function(p){var x=p;if(!(!Gd.length||Gd[Gd.length-1]!==i)){var v="deltaY"in x?C$(x):Vv(x),b=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&GCe(j.delta,v)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(E$).filter(Boolean).filter(function(j){return j.contains(x.target)}),S=w.length>0?l(x,w[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(p,x,v,b){var w={name:p,delta:x,target:v,should:b,shadowParent:QCe(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=g.useCallback(function(p){n.current=Vv(p),r.current=void 0},[]),h=g.useCallback(function(p){u(p.type,C$(p),p.target,l(p,e.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,Vv(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return Gd.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Hd),document.addEventListener("touchmove",c,Hd),document.addEventListener("touchstart",d,Hd),function(){Gd=Gd.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,Hd),document.removeEventListener("touchmove",c,Hd),document.removeEventListener("touchstart",d,Hd)}},[]);var m=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(i,{styles:KCe(a)}):null,m?g.createElement(mx,{gapMode:e.gapMode}):null)}function QCe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZCe=fx(oX,XCe);var dX=g.forwardRef(function(e,t){return g.createElement(xj,Vt({},e,{ref:t,sideCar:ZCe}))});dX.classNames=xj.classNames;var E2="Popover",[hX,uht]=Qs(E2,[$c]),bx=$c(),[JCe,Vc]=hX(E2),fX=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,l=bx(t),c=g.useRef(null),[u,d]=g.useState(!1),[h=!1,f]=Hs({prop:r,defaultProp:a,onChange:i});return s.jsx(IS,{...l,children:s.jsx(JCe,{scope:t,contentId:Vs(),triggerRef:c,open:h,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:g.useCallback(()=>d(!0),[]),onCustomAnchorRemove:g.useCallback(()=>d(!1),[]),modal:o,children:n})})};fX.displayName=E2;var mX="PopoverAnchor",eEe=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Vc(mX,n),i=bx(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=a;return g.useEffect(()=>(o(),()=>l()),[o,l]),s.jsx(nx,{...i,...r,ref:t})});eEe.displayName=mX;var pX="PopoverTrigger",gX=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Vc(pX,n),i=bx(n),o=lt(t,a.triggerRef),l=s.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":wX(a.open),...r,ref:o,onClick:we(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(nx,{asChild:!0,...i,children:l})});gX.displayName=pX;var k2="PopoverPortal",[tEe,nEe]=hX(k2,{forceMount:void 0}),yX=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,i=Vc(k2,t);return s.jsx(tEe,{scope:t,forceMount:n,children:s.jsx(As,{present:n||i.open,children:s.jsx(iX,{asChild:!0,container:a,children:r})})})};yX.displayName=k2;var _f="PopoverContent",xX=g.forwardRef((e,t)=>{const n=nEe(_f,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,i=Vc(_f,e.__scopePopover);return s.jsx(As,{present:r||i.open,children:i.modal?s.jsx(rEe,{...a,ref:t}):s.jsx(sEe,{...a,ref:t})})});xX.displayName=_f;var rEe=g.forwardRef((e,t)=>{const n=Vc(_f,e.__scopePopover),r=g.useRef(null),a=lt(t,r),i=g.useRef(!1);return g.useEffect(()=>{const o=r.current;if(o)return ux(o)},[]),s.jsx(dX,{as:yo,allowPinchZoom:!0,children:s.jsx(vX,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:we(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),sEe=g.forwardRef((e,t)=>{const n=Vc(_f,e.__scopePopover),r=g.useRef(!1),a=g.useRef(!1);return s.jsx(vX,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),vX=g.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...h}=e,f=Vc(_f,n),m=bx(n);return ACe(),s.jsx(sX,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(nX,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:s.jsx(MS,{"data-state":wX(f.open),role:"dialog",id:f.contentId,...m,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),bX="PopoverClose",aEe=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Vc(bX,n);return s.jsx(Te.button,{type:"button",...r,ref:t,onClick:we(e.onClick,()=>a.onOpenChange(!1))})});aEe.displayName=bX;var iEe="PopoverArrow",oEe=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=bx(n);return s.jsx(DS,{...a,...r,ref:t})});oEe.displayName=iEe;function wX(e){return e?"open":"closed"}var lEe=fX,cEe=gX,uEe=yX,SX=xX;const Tc=lEe,Ac=cEe,ll=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>s.jsx(uEe,{children:s.jsx(SX,{ref:a,align:t,sideOffset:n,className:ve("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ll.displayName=SX.displayName;const zt=({searchTerm:e,onSearchChange:t,sortBy:n,onSortChange:r,selectedFilters:a,onFilterToggle:i,scoreRange:o,onScoreRangeChange:l,dateRange:c="all",onDateRangeChange:u,companySize:d="all",onCompanySizeChange:h,location:f="all",onLocationChange:m,onClearFilters:y})=>{var _,A,P,R;const p=["Technology","Healthcare","FinTech","SaaS","E-commerce","AI/ML","Biotech","Software","Cybersecurity","EdTech"],x=["Series A","Series B","Series C","Seed","Pre-seed","Growth","Private Equity"],v=[{value:"all",label:"All Scores"},{value:"90+",label:"90+ (Excellent)"},{value:"80+",label:"80+ (Very Good)"},{value:"70-89",label:"70-89 (Good)"},{value:"60-79",label:"60-79 (Fair)"},{value:"<60",label:"Below 60"}],b=[{value:"all",label:"All Time"},{value:"today",label:"Today"},{value:"yesterday",label:"Yesterday"},{value:"week",label:"This Week"},{value:"month",label:"This Month"},{value:"3months",label:"Last 3 Months"},{value:"6months",label:"Last 6 Months"},{value:"year",label:"This Year"}],w=[{value:"all",label:"All Sizes"},{value:"1-10",label:"1-10 employees"},{value:"11-50",label:"11-50 employees"},{value:"51-200",label:"51-200 employees"},{value:"201-1000",label:"201-1000 employees"},{value:"1000+",label:"1000+ employees"}],S=[{value:"all",label:"All Locations"},{value:"us",label:"United States"},{value:"uk",label:"United Kingdom"},{value:"eu",label:"Europe"},{value:"canada",label:"Canada"},{value:"australia",label:"Australia"},{value:"asia",label:"Asia"},{value:"remote",label:"Remote"}],j=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name",label:"Name A-Z"}
823,{value:"funding",label:"Funding Amount"},{value:"score",label:"Score High to Low"},{value:"employees",label:"Employee Count"}],N=a.length>0||o!=="all"||c!=="all"||d!=="all"||f!=="all",C=a.length+(o!=="all"?1:0)+(c!=="all"?1:0)+(d!=="all"?1:0)+(f!=="all"?1:0);return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(st,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(at,{placeholder:"Search companies, industries, locations...",value:e,onChange:I=>t(I.target.value),className:"pl-10"})]}),s.jsxs(hr,{value:n,onValueChange:r,children:[s.jsxs(nr,{className:"w-full sm:w-48",children:[s.jsx(rle,{className:"w-4 h-4 mr-2"}),s.jsx(fr,{placeholder:"Sort by"})]}),s.jsx(rr,{className:"bg-background border z-50",children:j.map(I=>s.jsx(bt,{value:I.value,children:I.label},I.value))})]}),s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"w-full sm:w-auto",children:[s.jsx(Qu,{className:"w-4 h-4 mr-2"}),"Advanced Filters",N&&s.jsx(fe,{variant:"secondary",className:"ml-2",children:C})]})}),s.jsx(ll,{className:"w-80 sm:w-96 bg-background border shadow-lg z-50 max-h-[80vh] overflow-y-auto",align:"end",side:"bottom",sideOffset:8,avoidCollisions:!0,collisionPadding:16,children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"font-medium",children:"Advanced Filters"}),N&&s.jsxs(U,{variant:"ghost",size:"sm",onClick:y,children:[s.jsx(tr,{className:"w-4 h-4 mr-1"}),"Clear All"]})]}),u&&s.jsxs("div",{children:[s.jsxs("label",{className:"text-sm font-medium mb-2 block flex items-center",children:[s.jsx(sn,{className:"w-4 h-4 mr-2"}),"Date Added"]}),s.jsxs(hr,{value:c,onValueChange:u,children:[s.jsx(nr,{children:s.jsx(fr,{})}),s.jsx(rr,{className:"bg-background border shadow-lg z-[60]",children:b.map(I=>s.jsx(bt,{value:I.value,children:I.label},I.value))})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Score Range"}),s.jsxs(hr,{value:o,onValueChange:l,children:[s.jsx(nr,{children:s.jsx(fr,{})}),s.jsx(rr,{className:"bg-background border shadow-lg z-[60]",children:v.map(I=>s.jsx(bt,{value:I.value,children:I.label},I.value))})]})]}),h&&s.jsxs("div",{children:[s.jsxs("label",{className:"text-sm font-medium mb-2 block flex items-center",children:[s.jsx(nD,{className:"w-4 h-4 mr-2"}),"Company Size"]}),s.jsxs(hr,{value:d,onValueChange:h,children:[s.jsx(nr,{children:s.jsx(fr,{})}),s.jsx(rr,{className:"bg-background border shadow-lg z-[60]",children:w.map(I=>s.jsx(bt,{value:I.value,children:I.label},I.value))})]})]}),m&&s.jsxs("div",{children:[s.jsxs("label",{className:"text-sm font-medium mb-2 block flex items-center",children:[s.jsx(jc,{className:"w-4 h-4 mr-2"}),"Location"]}),s.jsxs(hr,{value:f,onValueChange:m,children:[s.jsx(nr,{children:s.jsx(fr,{})}),s.jsx(rr,{className:"bg-background border shadow-lg z-[60]",children:S.map(I=>s.jsx(bt,{value:I.value,children:I.label},I.value))})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Industries"}),s.jsx("div",{className:"flex flex-wrap gap-2 max-h-32 overflow-y-auto",children:p.map(I=>s.jsx(fe,{variant:a.includes(I)?"default":"outline",className:"cursor-pointer hover:bg-accent transition-colors",onClick:()=>i(I),children:I},I))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Funding Stages"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(I=>s.jsx(fe,{variant:a.includes(I)?"default":"outline",className:"cursor-pointer hover:bg-accent transition-colors",onClick:()=>i(I),children:I},I))})]})]})})]})]}),N&&s.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Active filters:"}),c!=="all"&&u&&s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:[s.jsx(sn,{className:"w-3 h-3"}),(_=b.find(I=>I.value===c))==null?void 0:_.label,s.jsx(tr,{className:"w-3 h-3 cursor-pointer",onClick:()=>u("all")})]}),o!=="all"&&s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:["Score: ",(A=v.find(I=>I.value===o))==null?void 0:A.label,s.jsx(tr,{className:"w-3 h-3 cursor-pointer",onClick:()=>l("all")})]}),d!=="all"&&h&&s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:[s.jsx(nD,{className:"w-3 h-3"}),(P=w.find(I=>I.value===d))==null?void 0:P.label,s.jsx(tr,{className:"w-3 h-3 cursor-pointer",onClick:()=>h("all")})]}),f!=="all"&&m&&s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:[s.jsx(jc,{className:"w-3 h-3"}),(R=S.find(I=>I.value===f))==null?void 0:R.label,s.jsx(tr,{className:"w-3 h-3 cursor-pointer",onClick:()=>m("all")})]}),a.map(I=>s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:[I,s.jsx(tr,{className:"w-3 h-3 cursor-pointer",onClick:()=>i(I)})]},I))]})]})},Ot=({isOpen:e,question:t,isLoading:n,onSolve:r,onClose:a})=>{const[i,o]=g.useState(""),l=u=>{u.preventDefault();const d=parseInt(i);isNaN(d)||r(d,()=>{o("")},()=>{o("")})},c=()=>{o(""),a()};return s.jsx(Wr,{open:e,onOpenChange:c,children:s.jsxs(Pr,{className:"sm:max-w-md",children:[s.jsx(Vr,{children:s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(Bq,{className:"w-5 h-5 text-blue-600"}),"Quick Math Challenge"]})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"To continue chatting, please solve this quick math problem:"}),s.jsx("div",{className:"bg-gradient-to-r from-blue-50 to-purple-50 rounded-lg p-6 border-2 border-blue-200",children:s.jsxs("div",{className:"flex items-center justify-center gap-3 text-3xl font-bold text-gray-800",children:[s.jsx(ile,{className:"w-8 h-8 text-blue-600"}),s.jsxs("span",{className:"font-mono",children:[t," = ?"]})]})})]}),s.jsxs("form",{onSubmit:l,className:"space-y-4",children:[s.jsx("div",{children:s.jsx(at,{type:"number",value:i,onChange:u=>o(u.target.value),placeholder:"Enter your answer",className:"text-center text-lg",autoFocus:!0,disabled:n})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(U,{type:"submit",disabled:!i||n,className:"flex-1",children:n?"Checking...":"Submit Answer"}),s.jsx(U,{type:"button",variant:"outline",onClick:c,disabled:n,children:"Cancel"})]})]}),s.jsx("p",{className:"text-xs text-gray-500 text-center",children:"This helps us prevent spam and ensures quality interactions"})]})]})})},P2=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:ve("mx-auto flex w-full justify-center",e),...t});P2.displayName="Pagination";const T2=g.forwardRef(({className:e,...t},n)=>s.jsx("ul",{ref:n,className:ve("flex flex-row items-center gap-1",e),...t}));T2.displayName="PaginationContent";const zu=g.forwardRef(({className:e,...t},n)=>s.jsx("li",{ref:n,className:ve("",e),...t}));zu.displayName="PaginationItem";const wx=({className:e,isActive:t,size:n="icon",...r})=>s.jsx("button",{"aria-current":t?"page":void 0,className:ve(Sf({variant:t?"default":"outline",size:n}),e),...r});wx.displayName="PaginationLink";const A2=({className:e,...t})=>s.jsxs(wx,{"aria-label":"Go to previous page",size:"default",className:ve("gap-1 pl-2.5",e),...t,children:[s.jsx(kS,{className:"h-4 w-4"}),s.jsx("span",{children:"Previous"})]});A2.displayName="PaginationPrevious";const O2=({className:e,...t})=>s.jsxs(wx,{"aria-label":"Go to next page",size:"default",className:ve("gap-1 pr-2.5",e),...t,children:[s.jsx("span",{children:"Next"}),s.jsx(lm,{className:"h-4 w-4"})]});O2.displayName="PaginationNext";const R2=({className:e,...t})=>
823s.jsxs("span",{"aria-hidden":!0,className:ve("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(qq,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});R2.displayName="PaginationEllipsis";const Ut=({currentPage:e,totalPages:t,totalRecords:n,isSubscribed:r,isAuthenticated:a=!0,onPageChange:i,isLoading:o=!1})=>{const l=cs();if(t<=1||n===0)return null;if(!a&&e>1)return s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-gray-600 mb-2",children:"Sign in to browse more companies"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Create a free account to access pagination"})]}),s.jsxs(U,{onClick:()=>l("/auth"),className:"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-3 rounded-lg font-semibold shadow-lg hover:shadow-xl transition-all duration-300",children:["Sign In / Sign Up",s.jsx(Ws,{className:"w-4 h-4 ml-2"})]})]});if(a&&!r&&e>=7)return s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-gray-600 mb-2",children:["You've viewed the first 105 companies of ",n.toLocaleString()," total"]}),s.jsx("p",{className:"text-sm text-gray-500",children:"Upgrade to view all companies with full pagination"})]}),s.jsxs(U,{onClick:()=>l("/pricing"),className:"bg-gradient-to-r from-orange-600 to-red-600 hover:from-orange-700 hover:to-red-700 text-white px-6 py-3 rounded-lg font-semibold shadow-lg hover:shadow-xl transition-all duration-300",children:[s.jsx(fc,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro",s.jsx(Ws,{className:"w-4 h-4 ml-2"})]})]});const u=(()=>{const d=[];if(t<=7)for(let f=1;f<=t;f++)d.push(f);else if(e<=4){for(let f=1;f<=5;f++)d.push(f);d.push("ellipsis"),d.push(t)}else if(e>=t-3){d.push(1),d.push("ellipsis");for(let f=t-4;f<=t;f++)d.push(f)}else{d.push(1),d.push("ellipsis");for(let f=e-1;f<=e+1;f++)d.push(f);d.push("ellipsis"),d.push(t)}return d})();return s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsxs("div",{className:"text-center text-sm text-gray-600",children:["Showing page ",e," of ",t," (",n.toLocaleString()," total companies)"]}),s.jsx(P2,{children:s.jsxs(T2,{children:[s.jsx(zu,{children:s.jsx(A2,{onClick:()=>i(e-1),disabled:e===1||o,className:e===1?"opacity-50 cursor-not-allowed":""})}),u.map((d,h)=>s.jsx(zu,{children:d==="ellipsis"?s.jsx(R2,{}):s.jsx(wx,{onClick:()=>i(d),isActive:e===d,disabled:o,className:o?"opacity-50 cursor-not-allowed":"",children:d})},h)),s.jsx(zu,{children:s.jsx(O2,{onClick:()=>i(e+1),disabled:e===t||o,className:e===t?"opacity-50 cursor-not-allowed":""})})]})})]})};class dEe{mapCompanyOverviewToStartupCard(t){var n;return{id:t.airtable_id||t.id,name:t.company_name||"",website:t.website||t.domain||"",fundingStage:t.funding_stage||"Unknown",industry:t.industry||"Not specified",location:[t.hq_city,t.hq_country].filter(Boolean).join(", ")||"Unknown",latestSignal:t.market_signals||t.news_summary||"No recent signals",signalType:"Company Update",dateAdded:t.added_date||t.created_at||"",addedDate:t.added_date||t.created_at||"",fundingAmount:t.total_funding||t.latest_funding_amount||"",employeeCount:t.employee_count||"",description:t.short_description||t.full_description||t.tagline||"",logoUrl:t.logo_url,legalName:t.legal_name,aliases:t.aliases,address:t.address,domainAliases:t.domain_aliases,companyType:t.company_type,operatingStatus:t.operating_status,domain:t.domain,tagline:t.tagline,valueProposition:t.value_proposition,fullDescription:t.full_description,industryTags:t.industry_tags,categories:t.categories,foundedYear:t.founded_year,hqCity:t.hq_city,hqCountry:t.hq_country,supportEmail:t.support_email,phoneNumber:t.phone_number,sizeRange:t.size_range,headcountGrowth:t.headcount_growth,departmentDistribution:t.department_distribution,leadership:t.leadership,linkedinEmployees:t.linkedin_employees,founder:t.founder,founderStartDate:t.founder_start_date,techStack:t.tech_stack,features:t.features,productLaunches:t.product_launches,differentiators:t.differentiators,pricingInfo:t.pricing_info,freeTrialOffer:t.free_trial_offer,fundingLastRoundDate:t.funding_last_round_date,fundingLastRoundAmount:t.funding_last_round_amount,latestFundingType:t.latest_funding_type,latestFundingDate:t.latest_funding_date,latestFundingAmount:t.latest_funding_amount,totalFunding:t.total_funding,estimatedRevenue:t.estimated_revenue,numberOfFundingRounds:t.number_of_funding_rounds,numberOfInvestors:t.number_of_investors,investorsList:t.investors_list,latestInvestorName:t.latest_investor_name,firstInvestorName:t.first_investor_name,numberOfExits:t.number_of_exits,totalAcquisitions:t.total_acquisitions,companiesAcquired:t.companies_acquired,investments:t.investments,fundingNews:t.funding_news,monthlyWebsiteVisits:t.monthly_website_visits,globalSemrushRank:t.global_semrush_rank,trafficChange:t.mom_traffic_change,semrushTrafficByCountry:t.semrush_traffic_by_country,topPages:t.top_pages,authorityScore:t.authority_score,totalBacklinks:t.total_backlinks,referringDomains:t.referring_domains,followLinks:t.follow_links,nofollowLinks:t.nofollow_links,sponsoredLinks:t.sponsored_links,imageLinks:t.image_links,totalPagesPerVisit:t.total_pages_per_visit,totalAvgVisitDuration:t.total_avg_visit_duration,bounceRate:t.bounce_rate,organicKeywords:t.organic_keywords,seoInsights:t.seo_insights,ppcSpend:t.ppc_spend,ppcTraffic:t.ppc_traffic,ppcPositions:t.ppc_positions,itSpend:t.it_spend,performanceOverview:t.performance_overview,performanceScore:t.performance_score,performanceStatuses:t.performance_statuses,server:t.server,seoAccessibilityIssues:t.seo_accessibility_issues,accessibilityIssues:t.accessibility_issues,emailPatterns:t.email_patterns,insights:t.insights,lookalikeCompanies:t.lookalike_companies,similarLinkedinCompanies:t.similar_linkedin_companies,competitorAnalysis:t.competitor_analysis,faq:t.faq,leadMagnets:t.lead_magnets,primaryCtas:t.primary_ctas,newsSummary:t.news_summary,notableEvents:t.notable_events,linkedinUrl:t.linkedin_url,linkedinAffiliatePages:t.linkedin_affiliate_pages,linkedinFollowers:t.linkedin_followers,twitterUrl:t.twitter_url,twitterFollowers:t.twitter_followers,facebookUrl:t.facebook_url,instagramUrl:t.instagram_url,tiktokUrl:t.tiktok_url,youtubeUrl:t.youtube_url,githubUrl:t.github_url,discordUrl:t.discord_url,crunchbaseUrl:t.crunchbase_url,newsletterCopy:t.newsletter_copy,partnerNames:t.partner_names,partnerLogos:t.partner_logos,sifteryIntegrations:t.siftery_integrations,integrationNames:t.integration_names,integrationLinks:t.integration_links_json,idealCustomerProfile:t.ideal_customer_profile,clients:t.clients,clientTestimonials:t.client_testimonials,glassdoor:t.glassdoor,trustPilot:t.trust_pilot,hiringSignals:t.hiring_signals,jobOpenings:t.job_openings,jobOpportunities:t.job_opportunities,jobNews:t.job_news,iosAppUrl:t.ios_a
823pp_url,androidAppUrl:t.android_app_url,monthlyAppDownloads:t.monthly_app_downloads,platformAvailability:t.platform_availability,appName:t.app_name,apptopiaInformation:t.apptopia_information,bomboraInsights:t.bombora_insights,alexaGlobalRank:t.alexa_global_rank,newsArticles:t.news_articles,linkedinUpdates:t.linkedin_updates,spamming:t.spamming,malware:t.malware,phishing:t.phishing,suspicious:t.suspicious,riskScore:t.risk_score,potentialServices:t.potential_services,marketSignals:t.market_signals,score:((n=t.score)==null?void 0:n.toString())||"0"}}buildSearchQuery(t){return t?t.replace(/[^\w\s]/g," ").trim().split(/\s+/).map(r=>`${r}:*`).join(" & "):""}buildFiltersQuery(t){const n=[];if(t.industry&&t.industry!=="all"&&n.push(`industry.ilike.%${t.industry}%`),t.fundingStage&&t.fundingStage!=="all"&&n.push(`funding_stage.ilike.%${t.fundingStage}%`),t.companySize&&t.companySize!=="all")switch(t.companySize){case"1-10":n.push("or(size_range.ilike.%1-10%,employee_count.ilike.%1-10%,employee_count.lte.10)");break;case"11-50":n.push("or(size_range.ilike.%11-50%,employee_count.ilike.%11-50%,and(employee_count.gte.11,employee_count.lte.50))");break;case"51-200":n.push("or(size_range.ilike.%51-200%,employee_count.ilike.%51-200%,and(employee_count.gte.51,employee_count.lte.200))");break;case"201-1000":n.push("or(size_range.ilike.%201-1000%,employee_count.ilike.%201-1000%,and(employee_count.gte.201,employee_count.lte.1000))");break;case"1000+":n.push("or(size_range.ilike.%1000+%,employee_count.ilike.%1000+%,employee_count.gte.1000)");break;default:n.push(`size_range.ilike.%${t.companySize}%`)}if(t.location&&t.location!=="all")switch(t.location){case"us":n.push("or(hq_country.ilike.%United States%,hq_country.ilike.%USA%,hq_country.ilike.%US%)");break;case"uk":n.push("or(hq_country.ilike.%United Kingdom%,hq_country.ilike.%UK%,hq_country.ilike.%Britain%)");break;case"eu":n.push("or(hq_country.ilike.%Germany%,hq_country.ilike.%France%,hq_country.ilike.%Netherlands%,hq_country.ilike.%Spain%,hq_country.ilike.%Italy%)");break;case"canada":n.push("hq_country.ilike.%Canada%");break;case"australia":n.push("hq_country.ilike.%Australia%");break;case"asia":n.push("or(hq_country.ilike.%China%,hq_country.ilike.%Japan%,hq_country.ilike.%India%,hq_country.ilike.%Singapore%,hq_country.ilike.%Korea%)");break;case"remote":n.push("or(hq_city.ilike.%remote%,hq_country.ilike.%remote%,address.ilike.%remote%)");break;default:n.push(`or(hq_city.ilike.%${t.location}%,hq_country.ilike.%${t.location}%)`)}if(t.scoreRange&&t.scoreRange!=="all")switch(t.scoreRange){case"90+":n.push("score.gte.90");break;case"80+":n.push("score.gte.80");break;case"70-89":n.push("score.gte.70,score.lte.89");break;case"60-79":n.push("score.gte.60,score.lte.79");break;case"<60":n.push("score.lt.60");break;case"high":n.push("score.gte.80");break;case"medium":n.push("score.gte.50,score.lt.80");break;case"low":n.push("score.lt.50");break}if(t.dateRange&&t.dateRange!=="all"){const r=new Date;let a;switch(t.dateRange){case"today":a=new Date(r.getFullYear(),r.getMonth(),r.getDate());break;case"yesterday":a=new Date(r.getTime()-24*60*60*1e3),a=new Date(a.getFullYear(),a.getMonth(),a.getDate());break;case"week":a=new Date(r.getTime()-7*24*60*60*1e3);break;case"month":a=new Date(r.getTime()-30*24*60*60*1e3);break;case"3months":a=new Date(r.getTime()-90*24*60*60*1e3);break;case"6months":a=new Date(r.getTime()-180*24*60*60*1e3);break;case"year":a=new Date(r.getFullYear(),0,1);break;case"quarter":a=new Date(r.getTime()-90*24*60*60*1e3);break;default:return n}n.push(`added_date.gte.${a.toISOString().split("T")[0]}`)}return n}getOrderBy(t="newest"){switch(t){case"oldest":return{added_date:{ascending:!0}};case"score_high":case"score":return{score:{ascending:!1}};case"score_low":return{score:{ascending:!0}};case"name_az":case"name":return{company_name:{ascending:!0}};case"name_za":return{company_name:{ascending:!1}};case"funding":return{total_funding:{ascending:!1,nullsLast:!0}};case"employees":return{employee_count:{ascending:!1,nullsLast:!0}};case"newest":default:return{added_date:{ascending:!1}}}}async fetchCompanies(t){try{const{search:n="",page:r=1,pageSize:a=12,sortBy:i="newest",...o}=t;let l=K.from("company_overview").select("*",{count:"exact"});n&&this.buildSearchQuery(n)&&(l=l.or(`company_name.ilike.%${n}%,legal_name.ilike.%${n}%,domain.ilike.%${n}%,short_description.ilike.%${n}
823%`)),this.buildFiltersQuery(o).forEach(b=>{const w=b.split("."),S=w[0],j=w[1],N=w.slice(2).join(".");switch(j){case"ilike":l=l.ilike(S,N);break;case"gte":S==="created_at"||S==="added_date"?l=l.gte(S,N):l=l.gte(S,isNaN(Number(N))?N:Number(N));break;case"lte":S==="created_at"||S==="added_date"?l=l.lte(S,N):l=l.lte(S,isNaN(Number(N))?N:Number(N));break;case"lt":S==="created_at"||S==="added_date"?l=l.lt(S,N):l=l.lt(S,isNaN(Number(N))?N:Number(N));break;case"or":l=l.or(N);break;case"and":N.split(",").forEach(_=>{const[A,P,R]=_.split(".");P==="gte"?l=l.gte(A,isNaN(Number(R))?R:Number(R)):P==="lte"&&(l=l.lte(A,isNaN(Number(R))?R:Number(R)))});break;default:console.warn("Unknown filter operator:",j,"for condition:",b)}});const u=this.getOrderBy(i);Object.entries(u).forEach(([b,w])=>{l=l.order(b,w)});const d=(r-1)*a,h=d+a-1;l=l.range(d,h);const{data:f,count:m,error:y}=await l;if(y)throw console.error("❌ Supabase query error:",y),y;const p=(f||[]).map(b=>this.mapCompanyOverviewToStartupCard(b)),x=m||0,v=Math.ceil(x/a);return{records:p,pagination:{currentPage:r,totalPages:v,totalRecords:x,hasMore:r<v},hasMore:r<v}}catch(n){throw console.error("❌ Company overview fetch failed:",n),n}}async getStats(){try{const{count:t}=await K.from("company_overview").select("*",{count:"exact",head:!0}),{data:n}=await K.from("company_overview").select("industry").not("industry","is",null),r=new Set(n==null?void 0:n.map(o=>o.industry)).size,{data:a}=await K.from("company_overview").select("score").not("score","is",null),i=a&&a.length>0?a.reduce((o,l)=>o+(parseFloat(l.score)||0),0)/a.length:0;return{totalCompanies:t||0,uniqueIndustries:r,averageScore:i}}catch(t){return console.error("❌ Stats fetch failed:",t),{totalCompanies:0,uniqueIndustries:0,averageScore:0}}}async fetchCompaniesByService(t){try{const{serviceSearch:n="",page:r=1,pageSize:a=12,sortBy:i="newest",...o}=t;let l=K.from("company_overview").select("*",{count:"exact"}).not("potential_services","is",null);n&&(l=l.ilike("potential_services",`%${n}%`)),this.buildFiltersQuery(o).forEach(b=>{const w=b.split("."),S=w[0],j=w[1],N=w.slice(2).join(".");switch(j){case"ilike":l=l.ilike(S,N);break;case"gte":S==="created_at"||S==="added_date"?l=l.gte(S,N):l=l.gte(S,isNaN(Number(N))?N:Number(N));break;case"lte":S==="created_at"||S==="added_date"?l=l.lte(S,N):l=l.lte(S,isNaN(Number(N))?N:Number(N));break;case"lt":S==="created_at"||S==="added_date"?l=l.lt(S,N):l=l.lt(S,isNaN(Number(N))?N:Number(N));break;case"or":l=l.or(N);break}});const u=this.getOrderBy(i);Object.entries(u).forEach(([b,w])=>{l=l.order(b,w)});const d=(r-1)*a,h=d+a-1;l=l.range(d,h);const{data:f,count:m,error:y}=await l;if(y)throw console.error("❌ Service search query error:",y),y;const p=(f||[]).map(b=>this.mapCompanyOverviewToStartupCard(b)),x=m||0,v=Math.ceil(x/a);return{records:p,pagination:{currentPage:r,totalPages:v,totalRecords:x,hasMore:r<v},hasMore:r<v}}catch(n){throw console.error("❌ Service search failed:",n),n}}}const jX=new dEe,Rt=()=>{const[e,t]=g.useState(null),[n,r]=g.useState(!1),[a,i]=g.useState(!1),o=g.useCallback(()=>{const f=["+","-","*"],m=f[Math.floor(Math.random()*f.length)];let y,p,x,v;switch(m){case"+":y=Math.floor(Math.random()*20)+1,p=Math.floor(Math.random()*20)+1,x=y+p,v=`${y} + ${p}`;break;case"-":y=Math.floor(Math.random()*20)+10,p=Math.floor(Math.random()*10)+1,x=y-p,v=`${y} - ${p}`;break;case"*":y=Math.floor(Math.random()*10)+1,p=Math.floor(Math.random()*10)+1,x=y*p,v=`${y} × ${p}`;break;default:y=2,p=2,x=4,v="2 + 2"}return{question:v,answer:x}},[]),l=g.useCallback((f,m=4)=>{try{const y=parseInt(localStorage.getItem(f)||"0");return y>0&&y%m===0}catch{return!1}},[]),c=g.useCallback(f=>{try{const m=parseInt(localStorage.getItem(f)||"0");localStorage.setItem(f,(m+1).toString())}catch{}},[]),u=g.useCallback((f,m=4)=>{if(c(f),l(f,m)){const y=o();return t(y),r(!0),!0}else return!1},[l,o,c]),d=g.useCallback((f,m,y)=>{e&&(i(!0),setTimeout(()=>{if(f===e.answer)r(!1),t(null),i(!1),m&&m();else{i(!1),y&&y();const p=o();t(p)}},1e3))},[e,o]),h=g.useCallback(()=>{r(!1),t(null),i(!1)},[]);return{showCaptcha:n,currentProblem:e,isLoading:a,initiateCaptcha:u,solveCaptcha:d,resetCaptcha:h}},NX=({items:e,className:t=""})=>s.jsxs("nav",{className:`flex items-center space-x-1 text-sm text-muted-foreground ${t}`,"aria-label":"Breadcrumb",children:[s.jsx(ee,{to:"/",className:"flex items-center hover:text-foreground transition-colors","aria-label":"Home",children:s.jsx(dle,{className:"h-4 w-4"})}),e.map((n,r)=>s.jsxs("div",{className:"flex items-center",children:[s.jsx(lm,{className:"h-4 w-4"}),n.href&&r<e.length-1?s.jsx(ee,{to:n.href,className:"hover:text-foreground transition-colors",children:n.name}):s.jsx("span",{className:"text-foreground font-medium","aria-current":"page",children:n.name})]},r))]}),_X=({links:e,title:t="Related Pages",className:n=""})=>e.length===0?null:s.jsxs(Y,{className:`mt-8 ${n}`,children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(ze,{className:"h-5 w-5"}),t]})}),s.jsx(te,{children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map((r,a)=>{const i=r.icon||tt;return r.external?s.jsxs("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-3 p-3 rounded-lg border hover:bg-accent/50 transition-colors group",children:[s.jsx(i,{className:"h-4 w-4 mt-0.5 text-muted-foreground group-hover:text-foreground"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("h4",{className:"font-medium text-sm group-hover:text-foreground transition-colors flex items-center gap-1",children:[r.title,s.jsx(ar,{className:"h-3 w-3"})]}),r.description&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:r.description})]})]},a):s.jsxs(ee,{to:r.href,className:"flex items-start gap-3 p-3 rounded-lg border hover:bg-accent/50 transition-colors group",children:[s.jsx(i,{className:"h-4 w-4 mt-0.5 text-muted-foreground group-hover:text-foreground"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-medium text-sm group-hover:text-foreground transition-colors",children:r.title}),r.description&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:r.description})]})]},a)})})})]});var hEe="Label",CX=g.forwardRef((e,t)=>
823s.jsx(Te.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));CX.displayName=hEe;var EX=CX;const fEe=pd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ke=g.forwardRef(({className:e,...t},n)=>s.jsx(EX,{ref:n,className:ve(fEe(),e),...t}));Ke.displayName=EX.displayName;const Sd=({isOpen:e,onClose:t,onAuthSuccess:n})=>{const[r,a]=g.useState(""),[i,o]=g.useState(""),[l,c]=g.useState(""),[u,d]=g.useState(""),[h,f]=g.useState(!1),[m,y]=g.useState(!1),[p,x]=g.useState(!1),[v,b]=g.useState("login"),w=()=>{a(""),o(""),c(""),d(""),f(!1),y(!1),x(!1)},S=async N=>{if(N.preventDefault(),!r||!i){Ra({title:"Missing Information",description:"Please fill in all fields.",variant:"destructive"});return}x(!0);try{const{data:C,error:_}=await K.auth.signInWithPassword({email:r,password:i});if(_){Ra({title:"Login Failed",description:_.message,variant:"destructive"});return}C.user&&(Ra({title:"Welcome back!",description:"You have successfully signed in."}),w(),n())}catch{Ra({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}finally{x(!1)}},j=async N=>{if(N.preventDefault(),!r||!i||!l||!u){Ra({title:"Missing Information",description:"Please fill in all fields.",variant:"destructive"});return}if(i!==l){Ra({title:"Password Mismatch",description:"Passwords do not match.",variant:"destructive"});return}if(i.length<6){Ra({title:"Password Too Short",description:"Password must be at least 6 characters long.",variant:"destructive"});return}x(!0);try{const C=`${window.location.origin}/`,{data:_,error:A}=await K.auth.signUp({email:r,password:i,options:{emailRedirectTo:C,data:{full_name:u}}});if(A){Ra({title:"Sign Up Failed",description:A.message,variant:"destructive"});return}_.user&&(await K.from("profiles").update({full_name:u}).eq("id",_.user.id),Ra({title:"Account Created!",description:_.user.email_confirmed_at?"You have successfully signed up and can now browse freely.":"Please check your email to confirm your account."}),w(),n())}catch{Ra({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}finally{x(!1)}};return s.jsx(Wr,{open:e,onOpenChange:()=>{},children:s.jsxs(Pr,{className:"sm:max-w-md",onEscapeKeyDown:N=>N.preventDefault(),children:[s.jsx(Vr,{children:s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(_a,{className:"w-5 h-5 text-blue-600"}),"Continue Browsing"]})}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-gray-600",children:"You've viewed several companies. Please sign in or create an account to continue accessing our database."}),s.jsxs(_o,{value:v,onValueChange:b,children:[s.jsxs(Fi,{className:"grid w-full grid-cols-2",children:[s.jsxs(yt,{value:"login",className:"flex items-center gap-2",children:[s.jsx(IA,{className:"w-4 h-4"}),"Sign In"]}),s.jsxs(yt,{value:"signup",className:"flex items-center gap-2",children:[s.jsx(n9,{className:"w-4 h-4"}),"Sign Up"]})]}),s.jsx(nn,{value:"login",children:s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"login-email",children:"Email"}),s.jsx(at,{id:"login-email",type:"email",placeholder:"[email protected]",value:r,onChange:N=>a(N.target.value),required:!0,autoFocus:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"login-password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"login-password",type:h?"text":"password",placeholder:"Enter your password",value:i,onChange:N=>o(N.target.value),required:!0}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:()=>f(!h),children:h?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsx(U,{type:"submit",className:"w-full",disabled:p,children:p?"Signing In...":"Sign In"})]})}),s.jsx(nn,{value:"signup",children:s.jsxs("form",{onSubmit:j,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-fullname",children:"Full Name"}),s.jsx(at,{id:"signup-fullname",type:"text",placeholder:"John Doe",value:u,onChange:N=>d(N.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-email",children:"Email"}),s.jsx(at,{id:"signup-email",type:"email",placeholder:"[email protected]",value:r,onChange:N=>a(N.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"signup-password",type:h?"text":"password",placeholder:"Create a password (min 6 characters)",value:i,onChange:N=>o(N.target.value),required:!0,minLength:6}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:()=>f(!h),children:h?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-confirm-password",children:"Confirm Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"signup-confirm-password",type:m?"text":"password",placeholder:"Confirm your password",value:l,onCh
823ange:N=>c(N.target.value),required:!0}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:()=>y(!m),children:m?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsx(U,{type:"submit",className:"w-full",disabled:p,children:p?"Creating Account...":"Create Account"})]})})]}),s.jsx("p",{className:"text-xs text-gray-500 text-center",children:"We'll only use your information to improve our service. No spam, ever."})]})]})})},kr=({children:e})=>(g.useEffect(()=>{const t=u=>(u.preventDefault(),!1),n=u=>(u.preventDefault(),!1),r=u=>{if(u.key==="F12"||(u.ctrlKey||u.metaKey)&&u.shiftKey&&u.key==="I"||(u.ctrlKey||u.metaKey)&&u.shiftKey&&u.key==="J"||(u.ctrlKey||u.metaKey)&&u.key==="u"||(u.ctrlKey||u.metaKey)&&u.key==="s"||(u.ctrlKey||u.metaKey)&&u.key==="a"||(u.ctrlKey||u.metaKey)&&u.key==="c"||(u.ctrlKey||u.metaKey)&&u.key==="x"||(u.ctrlKey||u.metaKey)&&u.key==="v")return u.preventDefault(),!1},a=()=>{const u=performance.now();debugger;performance.now()-u>100&&(document.body.innerHTML='<div style="text-align: center; padding: 50px; font-family: Arial;"><h1>Developer tools detected</h1><p>Please close developer tools to continue.</p></div>')},i=u=>(u.preventDefault(),!1),o=u=>(u.preventDefault(),!1);document.addEventListener("contextmenu",t),document.addEventListener("selectstart",n),document.addEventListener("keydown",r),document.addEventListener("beforeprint",i),document.addEventListener("copy",o),document.addEventListener("cut",o),document.addEventListener("paste",o);const l=document.createElement("style");l.textContent=`
824      * {
825        -webkit-user-select: none !important;
826        -moz-user-select: none !important;
827        -ms-user-select: none !important;
828        user-select: none !important;
829        -webkit-touch-callout: none !important;
830        -webkit-tap-highlight-color: transparent !important;
831      }
832      
833      input, textarea, [contenteditable] {
834        -webkit-user-select: text !important;
835        -moz-user-select: text !important;
836        -ms-user-select: text !important;
837        user-select: text !important;
838      }
839    `,document.head.appendChild(l);const c=setInterval(a,2e3);return console.clear(),console.log("%cSTOP!","color: red; font-size: 50px; font-weight: bold;"),console.log("%cThis is a browser feature intended for developers. Data scraping is prohibited.","color: red; font-size: 16px;"),()=>{document.removeEventListener("contextmenu",t),document.removeEventListener("selectstart",n),document.removeEventListener("keydown",r),document.removeEventListener("beforeprint",i),document.removeEventListener("copy",o),document.removeEventListener("cut",o),document.removeEventListener("paste",o),l.parentNode&&l.parentNode.removeChild(l),clearInterval(c)}},[]),s.jsx(s.Fragment,{children:e})),kX=(e,t,n)=>{let r=e;return n&&(r+=` | Search: ${n}`),t&&t.length>0&&(r+=` | ${t.join(", ")}`),r+=" - Slay Your Sales",r},PX=(e,t,n,r)=>{let a=`Discover ${e.toLowerCase()} with our AI-powered platform. `;return n&&(a+=`Search results for "${n}". `),t&&t.length>0&&(a+=`Filtered by ${t.join(", ")}. `),r&&(a+=`${r} companies found. `),a+="Never search for clients again — this is prospecting, redefined.",a},TX=(e,t,n)=>{const r=["AI prospecting","sales automation","B2B leads","company intelligence","sales tools","lead generation"],a=e.toLowerCase().split(" "),i=t||[],o=n||[];return[...r,...a,...i,...o].join(", ")},AX=(e,t)=>({"@context":"https://schema.org","@type":"CollectionPage",name:`${e} Companies - Slay Your Sales`,description:`Discover ${e.toLowerCase()} companies with our AI-powered prospecting platform`,url:window.location.href,mainEntity:{"@type":"ItemList",numberOfItems:t.length,itemListElement:t.slice(0,10).map((n,r)=>({"@type":"ListItem",position:r+1,item:{"@type":"Organization",name:n.name,description:n.description||`${n.name} company profile`,url:n.website}}))}}),OX=(e,t)=>{const n=window.location.origin;let r=e;if(t){const a=["search","industry","funding","score"],i=new URLSearchParams;a.forEach(o=>{const l=t.get(o);l&&i.set(o,l)}),i.toString()&&(r+=`?${i.toString()}`)}return`${n}${r}`},mEe=(e,t,n)=>({"@context":"https://schema.org","@type":"SearchResultsPage",mainEntity:{"@type":"ItemList",numberOfItems:n,name:`Search results for "${e}"`,description:`${n} companies found for search term "${e}"`,itemListElement:t.slice(0,10).map((r,a)=>({"@type":"ListItem",position:a+1,item:{"@type":"Organization",name:r.name,description:r.description||`${r.name} company profile`,url:r.website,industry:r.industry}}))}}),pEe=(e,t)=>{let n=`Search: ${e}`;return t!==void 0&&(n+=` (${t} results)`),n+=" - Company Intelligence Database | Slay Your Sales",n},gEe=(e,t)=>{let n=`Find companies matching "${e}" using our AI-powered intelligence platform. `;return t!==void 0&&t>0?n+=`${t} companies found with comprehensive data including funding, team size, tech stack, and market signals. `:t===0&&(n+="No results found. Try searching for other companies or domains. "),n+="Never search for clients again — this is prospecting, redefined.",n},yEe=()=>{var be,Re;const[e,t]=yd(),n=ml(),[r,a]=g.useState(e.get("search")||""),[i,o]=g.useState("newest"),[l,c]=g.useState([]),[u,d]=g.useState("all"),[h,f]=g.useState("all"),[m,y]=g.useState("all"),[p,x]=g.useState("all"),[v,b]=g.useState(1),[w,S]=g.useState(!1),{toast:j}=Ve(),N=pr(),{subscribed:C,user:_}=Ie(),{incrementRequestCount:A,showEmailSignup:P,resetRequestCount:R}=us(),{showCaptcha:I,currentProblem:B,isLoading:$,initiateCaptcha:q,solveCaptcha:L,resetCaptcha:k}=Rt(),T=12,F=8,O=new Date(new Date().setHours(0,0,0,0)).toISOString(),E=new Date;E.setDate(1),E.setHours(0,0,0,0);const D=E.toISOString(),{data:M}=ct({queryKey:["companies-added-today",O],queryFn:async()=>{const{count:Oe,error:vt}=await K.from("company_overview").select("*",{count:"exact",head:!0}).gte("added_date",new Date().toISOString().split("T")[0]);if(vt)throw vt;return Oe??0},refetchInterval:6e4,staleTime:0,refetchOnWindowFocus:!0}),{data:X}
839=ct({queryKey:["companies-added-this-month",D],queryFn:async()=>{const Oe=new Date;Oe.setDate(1);const{count:vt,error:qt}=await K.from("company_overview").select("*",{count:"exact",head:!0}).gte("added_date",Oe.toISOString().split("T")[0]);if(qt)throw qt;return vt??0},refetchInterval:6e4,staleTime:0,refetchOnWindowFocus:!0}),{data:W,isLoading:re,error:ne,refetch:le,isFetching:ie}=ct({queryKey:["companies",{searchTerm:r,selectedFilters:l,scoreRange:u,dateRange:h,companySize:m,companyLocation:p,sortBy:i,currentPage:v}],queryFn:async()=>{var vt;const Oe=await jX.fetchCompanies({search:r,industry:l.find(qt=>["Technology","Healthcare","FinTech","SaaS","E-commerce","AI/ML","Biotech","Software","Cybersecurity","EdTech"].includes(qt)),fundingStage:l.find(qt=>["Series A","Series B","Series C","Seed","Pre-seed","Growth","Private Equity"].includes(qt)),scoreRange:u,dateRange:h,companySize:m,location:p,sortBy:i,page:v,pageSize:T});return!_&&((vt=Oe.records)==null?void 0:vt.length)>0&&A(),Oe},staleTime:15*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,enabled:!0});g.useEffect(()=>{const Oe=new URLSearchParams(e);r?Oe.set("search",r):Oe.delete("search"),t(Oe,{replace:!0})},[r,t]);const ye=async()=>{S(!0);try{await N.invalidateQueries({queryKey:["companies"]}),await le(),j({title:"Refreshed Successfully",description:"Fetched the latest company data."})}catch{j({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{S(!1)}},pe=Oe=>{c(vt=>vt.includes(Oe)?vt.filter(qt=>qt!==Oe):[...vt,Oe]),b(1)},G=()=>{a(""),o("newest"),c([]),d("all"),f("all"),y("all"),x("all"),b(1)},Pe=Oe=>{if(console.log("🔄 Page change requested:",Oe,"Current page:",v),!C&&Oe>F){j({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}q("companies_page_change")?(console.log("🔒 Captcha needed, storing target page:",Oe),sessionStorage.setItem("targetPage",Oe.toString())):(console.log("🟢 No captcha needed, setting page to:",Oe),b(Oe))},J=()=>{const Oe=sessionStorage.getItem("targetPage");Oe&&(console.log("🎉 Captcha success, setting page to:",Oe),b(parseInt(Oe)),sessionStorage.removeItem("targetPage"),j({title:"Correct! 🎉",description:"Loading the requested page..."}))},oe=()=>{sessionStorage.removeItem("targetPage"),j({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},se=()=>{R()},je=(W==null?void 0:W.records)||[],ut=(()=>{var vt;const Oe=((vt=W==null?void 0:W.pagination)==null?void 0:vt.totalRecords)||0;return je.reduce((qt,li)=>{const Me=parseInt(li.score||"0");return qt+Me},0)/je.length,new Set(je.map(qt=>qt.industry)).size,[{title:"Total Companies",value:Oe.toLocaleString(),icon:tt,color:"text-blue-600"},{title:"Added This Month",value:(X??0).toLocaleString(),icon:ze,color:"text-green-600"},{title:"Added Today",value:(M??0).toLocaleString(),icon:At,color:"text-purple-600"}]})(),Ze=!!r,Ye=((be=W==null?void 0:W.pagination)==null?void 0:be.totalRecords)||0,Zt=Ze?pEe(r,Ye):kX("Company Intelligence Database",l,r),Yt=Ze?gEe(r,Ye):PX("companies",l,r,Ye),Nn=TX("companies",l,["database","intelligence","prospects"]),Z=OX(n.pathname,e),V=Ze&&je.length>0?mEe(r,je,Ye):je.length>0?AX("Companies",je):null,H=[{title:"Recently Funded Companies",href:"/recently-funded",description:"Companies that recently secured funding rounds",icon:ze},{title:"Hiring Spike Companies",href:"/hiring-spike",description:"Companies experiencing rapid hiring growth",icon:At},{title:"Product Launch Signals",href:"/product-launch",description:"Companies announcing new products",icon:Tn},{title:"View All Pitches",href:"/pitch",description:"Search companies by service opportunities",icon:st}],ae=[{name:"Companies"}];return r&&ae.push({name:`Search: ${r}`}),l.length>0&&ae.push({name:`Filters: ${l.join(", ")}`}),s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(ri,{title:Zt,description:Yt,keywords:Nn,canonicalUrl:Z,structuredData:V}),s.jsx(Ee,{}),s.jsx("div",{className:"pt-24 pb-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[s.jsx(NX,{items:ae,className:"mb-6"}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Company Intelligence Database"}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Access real-time signals and detailed company data"}),s.jsxs("div",{className:"flex justify-center items-center gap-4 mb-8",children:[s.jsxs(U,{onClick:ye,disabled:w||re,variant:"outline",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${w?"animate-spin":""}`}),w?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})}),s.jsxs("div",{className:"flex items-center text-sm text-gray-500",children:[s.jsx(ze,{className:"w-4 h-4 mr-1"}),je.length," companies found"]}
839)]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:ut.map((Oe,vt)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:vt*.1},className:"bg-white rounded-lg p-6 shadow-sm border border-gray-200",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:Oe.title}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:Oe.value})]}),s.jsx(Oe.icon,{className:`w-8 h-8 ${Oe.color}`})]})},vt))}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:r,onSearchChange:a,sortBy:i,onSortChange:o,selectedFilters:l,onFilterToggle:pe,scoreRange:u,onScoreRangeChange:d,dateRange:h,onDateRangeChange:f,companySize:m,onCompanySizeChange:y,location:p,onLocationChange:x,onClearFilters:G})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((Re=W==null?void 0:W.pagination)==null?void 0:Re.totalRecords)||0," companies",(W==null?void 0:W.pagination)&&` (Page ${W.pagination.currentPage} of ${W.pagination.totalPages})`]})}),re?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading companies..."})]}):ne?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-red-600 mb-4",children:"Error loading companies"}),s.jsx("p",{className:"text-sm text-gray-500 mb-4",children:ne instanceof Error?ne.message:"Unknown error"}),s.jsx(U,{onClick:()=>le(),children:"Try Again"})]}):je.length===0&&!ie?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Seems like we do not have this company in our database"}),s.jsxs("p",{className:"text-gray-600",children:["Try adjusting your search or ",s.jsx("a",{href:"https://www.slaygent.ai/scrape",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-[rgb(234,85,43)]",children:"research the company for free"}),"."]})]}):s.jsxs(s.Fragment,{children:[s.jsx(he.div,{initial:{opacity:0}
839,animate:{opacity:1},transition:{duration:.5},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:je.map((Oe,vt)=>s.jsx(Bt,{startup:Oe,index:vt},`${Oe.id}-${v}-${vt}`))}),(W==null?void 0:W.pagination)&&s.jsx(Ut,{currentPage:W.pagination.currentPage,totalPages:C?W.pagination.totalPages:Math.min(F,W.pagination.totalPages),totalRecords:W.pagination.totalRecords,isSubscribed:C,isAuthenticated:!!_,onPageChange:Pe,isLoading:ie})]}),s.jsx(_X,{links:H,title:"Explore More Company Signals"})]})}),I&&B&&s.jsx(Ot,{isOpen:I,question:B.question,isLoading:$,onSolve:Oe=>L(Oe,J,oe),onClose:k}),s.jsx(Sd,{isOpen:P&&!_,onAuthSuccess:se}),s.jsx(wt,{})]})})},RX=({contact:e})=>{const{user:t}=Ie(),[n,r]=g.useState(!1),[a,i]=g.useState(!1);g.useEffect(()=>{t&&o()},[t,e.Email]);const o=async()=>{if(t)try{const{data:c,error:u}=await K.from("saved_contacts").select("id").eq("user_id",t.id).eq("contact_email",e.Email).maybeSingle();!u&&c&&r(!0)}catch(c){console.error("Error checking saved status:",c)}},l=async c=>{if(c.stopPropagation(),!t){Ae.error("Please sign in to save contacts");return}i(!0);try{if(n){const{error:u}=await K.from("saved_contacts").delete().eq("user_id",t.id).eq("contact_email",e.Email);if(u)throw u;r(!1),Ae.success("Contact removed from saved")}else{const{error:u}=await K.from("saved_contacts").insert({user_id:t.id,contact_email:e.Email,contact_name:e["Full Name"],contact_company:e.Company||null,contact_position:e.Position||null});if(u)throw u;r(!0),Ae.success("Contact saved successfully")}}catch(u){console.error("Error toggling save:",u),Ae.error(u.message||"Failed to save contact")}finally{i(!1)}};return s.jsx(U,{variant:n?"default":"outline",size:"icon",onClick:l,disabled:a,className:n?"bg-[rgb(234,85,43)] text-white hover:bg-[rgb(214,65,23)]":"","aria-label":n?"Remove from saved contacts":"Save contact",children:a?s.jsx(Pt,{className:"w-4 h-4 animate-spin"}):s.jsx(zn,{className:`w-4 h-4 ${n?"fill-current":""}`})})},IX=({contact:e})=>{const[t,n]=g.useState(!1),r=`${window.location.origin}/people?search=${encodeURIComponent(e["Full Name"]||"")}`,a=`Check out ${e["Full Name"]} - ${e.Position||"Professional"} at ${e.Company||"Company"} on Slaygent.ai`,i=()=>{navigator.clipboard.writeText(r),Ae.success("Link copied to clipboard!"),n(!1)},o=()=>{const d=encodeURIComponent(`Contact: ${e["Full Name"]}`),h=encodeURIComponent(`${a}
840
841${r}`);window.open(`mailto:?subject=${d}&body=${h}`),n(!1)},l=()=>{const d=encodeURIComponent(`${a}
842${r}`);window.open(`https://wa.me/?text=${d}`),n(!1)},c=()=>{const d=encodeURIComponent(r);window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${d}`),n(!1)},u=()=>{const d=encodeURIComponent(a),h=encodeURIComponent(r);window.open(`https://twitter.com/intent/tweet?text=${d}&url=${h}`),n(!1)};return s.jsxs(Tc,{open:t,onOpenChange:n,children:[s.jsx(Ac,{asChild:!0,children:s.jsx(U,{variant:"outline",size:"icon",onClick:d=>d.stopPropagation(),"aria-label":"Share contact",children:s.jsx(ex,{className:"w-4 h-4"})})}),s.jsx(ll,{className:"w-56",align:"end",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-medium mb-3",children:"Share Contact"}),s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:i,children:[s.jsx(RA,{className:"w-4 h-4"}),"Copy Link"]}),s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:o,children:[s.jsx(_a,{className:"w-4 h-4"}),"Email"]}),s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:l,children:[s.jsx(ti,{className:"w-4 h-4"}),"WhatsApp"]}),s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:c,children:[s.jsx(xa,{className:"w-4 h-4"}),"LinkedIn"]}),s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:u,children:[s.jsx(LA,{className:"w-4 h-4"}),"X (Twitter)"]})]})})]})};function xEe(e){let t=0;return e["Email Valid"]==="true"&&(t+=20),e["Contacts Linkedin"]&&(t+=15),e.Seniority&&(t+=10),e.Position&&(t+=10),e.Department&&(t+=5),e.Company&&e.Domain&&(t+=10),(e.Country||e.City)&&(t+=5),(e["Company Size"]||e["Company Revenue"])&&(t+=10),(e["Contacts Twitter"]||e["Company LinkedIn"])&&(t+=5),Math.min(t,100)}function vEe(e){return e>=80?"bg-green-500/10 text-green-600 border-green-600":e>=60?"bg-blue-500/10 text-blue-600 border-blue-600":e>=40?"bg-yellow-500/10 text-yellow-600 border-yellow-600":"bg-gray-500/10 text-gray-600 border-gray-600"}const bEe=({contact:e,onViewDetails:t})=>{const n=xEe(e),r=vEe(n);return s.jsx(Y,{className:"hover:shadow-lg hover:border-primary/50 transition-all duration-300 cursor-pointer group",onClick:t,role:"article","aria-label":`Contact c
842ard for ${e["Full Name"]}`,tabIndex:0,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),t())},children:s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"mb-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsx("h3",{className:"font-semibold text-lg line-clamp-1",children:e["Full Name"]||"Unknown"}),s.jsxs("div",{className:"flex gap-1 flex-wrap justify-end",children:[e["Email Valid"]==="true"&&s.jsx(fe,{variant:"outline",className:"text-green-600 border-green-600 text-xs",children:"✓ Verified"}),n>0&&s.jsxs(fe,{variant:"outline",className:`text-xs border ${r}`,children:[s.jsx(Mn,{className:"w-3 h-3 mr-1"}),n,"%"]})]})]}),e.Position&&s.jsxs("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-1",children:[s.jsx(Ba,{className:"w-3 h-3 inline mr-1"}),e.Position]})]}),s.jsxs("div",{className:"space-y-2 mb-4",children:[e.Company&&s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(tt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),s.jsx("span",{className:"line-clamp-1",children:e.Company})]}),(e.City||e.Country)&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(jc,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:"line-clamp-1",children:[e.City,e.Country].filter(Boolean).join(", ")})]}),e.Domain&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(tt,{className:"w-3 h-3 flex-shrink-0"}),s.jsx("span",{className:"line-clamp-1",children:e.Domain})]}),e.isEmailMasked&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_a,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:"line-clamp-1",children:e.Email})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.Department&&s.jsx(fe,{variant:"secondary",className:"text-xs",children:e.Department}),e.Seniority&&s.jsx(fe,{variant:"secondary",className:"text-xs",children:e.Seniority}),e["Company Size"]&&s.jsx(fe,{variant:"outline",className:"text-xs",children:e["Company Size"]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(U,{onClick:a=>{a.stopPropagation(),t()},className:"flex-1 bg-[rgb(234,85,43)] text-white hover:bg-[rgb(214,65,23)] transition-all hover:scale-105","aria-label":`View details for ${e["Full Name"]}`,children:"View Details"}),s.jsx(RX,{contact:e}),s.jsx(IX,{contact:e})]}),e.isEmailMasked&&s.jsx("p",{className:"text-xs text-muted-foreground text-center mt-3",children:"Sign in to reveal full contact details"})]})})},wEe=()=>s.jsx(Y,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Je,{className:"h-5 w-3/4 mb-2"}),s.jsx(Je,{className:"h-4 w-1/2"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Je,{className:"h-4 w-full"}),s.jsx(Je,{className:"h-4 w-2/3"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Je,{className:"h-6 w-16"}),s.jsx(Je,{className:"h-6 w-20"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Je,{className:"h-10 flex-1"}),s.jsx(Je,{className:"h-10 w-10"})]})]})})}),SEe=uK,jEe=dK,NEe=hK,MX=g.forwardRef(({className:e,...t},n)=>s.jsx(oj,{className:ve("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));MX.displayName=oj.displayName;const _Ee=pd("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),DX=g.forwardRef(({side:e="right",className:t,children:n,...r},a)=>s.jsxs(NEe,{children:[s.jsx(MX,{}),s.jsxs(lj,{ref:a,className:ve(_Ee({side:e}),t),...r,children:[n,s.jsxs(fK,{className:"absolute right-4 top-4 roun
842ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[s.jsx(tr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DX.displayName=lj.displayName;const LX=({className:e,...t})=>s.jsx("div",{className:ve("flex flex-col space-y-2 text-center sm:text-left",e),...t});LX.displayName="SheetHeader";const $X=g.forwardRef(({className:e,...t},n)=>s.jsx(cj,{ref:n,className:ve("text-lg font-semibold text-foreground",e),...t}));$X.displayName=cj.displayName;const CEe=g.forwardRef(({className:e,...t},n)=>s.jsx(uj,{ref:n,className:ve("text-sm text-muted-foreground",e),...t}));CEe.displayName=uj.displayName;var I2="Checkbox",[EEe,dht]=Qs(I2),[kEe,PEe]=EEe(I2),FX=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,m]=g.useState(null),y=lt(t,S=>m(S)),p=g.useRef(!1),x=f?d||!!f.closest("form"):!0,[v=!1,b]=Hs({prop:a,defaultProp:i,onChange:u}),w=g.useRef(v);return g.useEffect(()=>{const S=f==null?void 0:f.form;if(S){const j=()=>b(w.current);return S.addEventListener("reset",j),()=>S.removeEventListener("reset",j)}},[f,b]),s.jsxs(kEe,{scope:n,state:v,disabled:l,children:[s.jsx(Te.button,{type:"button",role:"checkbox","aria-checked":vc(v)?"mixed":v,"aria-required":o,"data-state":UX(v),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:y,onKeyDown:we(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:we(e.onClick,S=>{b(j=>vc(j)?!0:!j),x&&(p.current=S.isPropagationStopped(),p.current||S.stopPropagation())})}),x&&s.jsx(TEe,{control:f,bubbles:!p.current,name:r,value:c,checked:v,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"},defaultChecked:vc(i)?!1:i})]})});FX.displayName=I2;var BX="CheckboxIndicator",zX=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=PEe(BX,n);return s.jsx(As,{present:r||vc(i.state)||i.state===!0,children:s.jsx(Te.span,{"data-state":UX(i.state),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});zX.displayName=BX;var TEe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...i}=e,o=g.useRef(null),l=_2(n),c=VA(t);g.useEffect(()=>{const d=o.current,h=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(h,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});d.indeterminate=vc(n),m.call(d,vc(n)?!1:n),d.dispatchEvent(y)}},[l,n,r]);const u=g.useRef(vc(n)?!1:n);return s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??u.current,...i,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function vc(e){return e==="indeterminate"}function UX(e){return vc(e)?"indeterminate":e?"checked":"unchecked"}var qX=FX,AEe=zX;const vr=g.forwardRef(({className:e,...t},n)=>s.jsx(qX,{ref:n,className:ve("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(AEe,{className:ve("flex items-center justify-center text-current"),children:s.jsx(Ko,{className:"h-4 w-4"})})}));vr.displayName=qX.displayName;const OEe=({filters:e,onFiltersChange:t})=>{const[n,r]=g.useState(e),[a,i]=g.useState(!1),o=()=>{t(n),i(!1)},l=(c,u)=>{const d=n[c]||[],h=d.includes(u)?d.filter(f=>f!==u):[...d,u];r({...n,[c]:h.length>0?h:void 0})};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(st,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),s.jsx(at,{placeholder:"Search contacts, companies, positions...",value:e.search||"",onChange:c=>t({...e,search:c.target.value||void 0}),className:"pl-10"})]}),s.jsxs(SEe,{open:a,onOpenChange:i,children:[s.jsx(jEe,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"gap-2",children:[s.jsx(Qu,{className:"w-4 h-4"}
842),"Advanced Filters",Object.values(e).filter(Boolean).length>0&&s.jsx(fe,{variant:"secondary",className:"ml-1",children:Object.values(e).filter(Boolean).length})]})}),s.jsxs(DX,{className:"w-full sm:max-w-xl overflow-y-auto",children:[s.jsx(LX,{children:s.jsx($X,{children:"Filter Contacts"})}),s.jsxs("div",{className:"space-y-6 mt-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Country"}),s.jsx("div",{className:"space-y-2",children:["United States","United Kingdom","Canada","Germany","France","India","Australia"].map(c=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:`country-${c}`,checked:(n.country||[]).includes(c),onCheckedChange:()=>l("country",c)}),s.jsx("label",{htmlFor:`country-${c}`,className:"text-sm cursor-pointer",children:c})]},c))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Seniority"}),s.jsx("div",{className:"space-y-2",children:["C-Level","VP","Director","Manager","Senior","Mid-Level","Entry Level"].map(c=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:`seniority-${c}`,checked:(n.seniority||[]).includes(c),onCheckedChange:()=>l("seniority",c)}),s.jsx("label",{htmlFor:`seniority-${c}`,className:"text-sm cursor-pointer",children:c})]},c))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Department"}),s.jsx("div",{className:"space-y-2",children:["Sales","Marketing","Engineering","Product","Operations","Finance","HR"].map(c=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:`dept-${c}`,checked:(n.department||[]).includes(c),onCheckedChange:()=>l("department",c)}),s.jsx("label",{htmlFor:`dept-${c}`,className:"text-sm cursor-pointer",children:c})]},c))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Industry"}),s.jsx("div",{className:"space-y-2",children:["Technology","Healthcare","Finance","Retail","Manufacturing","Education","Media"].map(c=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:`industry-${c}`,checked:(n.industry||[]).includes(c),onCheckedChange:()=>l("industry",c)}),s.jsx("label",{htmlFor:`industry-${c}`,className:"text-sm cursor-pointer",children:c})]},c))})]}),s.jsxs("div",{className:"space-y-3 pt-4 border-t",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:"has-linkedin",checked:n.hasLinkedin||!1,onCheckedChange:c=>r({...n,hasLinkedin:c||void 0})}),s.jsx("label",{htmlFor:"has-linkedin",className:"text-sm cursor-pointer",children:"Has LinkedIn Profile"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:"email-valid",checked:n.emailValid||!1,onCheckedChange:c=>r({...n,emailValid:c||void 0})}),s.jsx("label",{htmlFor:"email-valid",className:"text-sm cursor-pointer",children:"Email Verified Only"})]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(U,{variant:"outline",onClick:()=>{r({}),t({}),i(!1)},className:"flex-1",children:"Clear All"}),s.jsx(U,{onClick:o,className:"flex-1 bg-[rgb(234,85,43)] text-white hover:bg-[rgb(214,65,23)]",children:"Apply Filters"})]})]})]})]})]})},REe=({contact:e,onReveal:t,userInfo:n})=>{const[r,a]=g.useState(!1),i=async()=>{a(!0);try{const{data:{session:o}}=await K.auth.getSession();if(!o){Ae.error("Please sign in to reveal emails");return}console.log("[REVEAL] Invoking edge function with auth header");const l=await K.functions.invoke("reveal-contact-email",{headers:{Authorization:`Bearer ${o.access_token}`},body:{contactEmail:e.Email,contactName:e["Full Name"]}});if(l.error)throw l.error;const c=l.data;if(c.requiresUpgrade){Ae.error("Upgrade to Pro or Growth to reveal emails",{action:{label:"View Pricing",onClick:()=>window.location.href="/pricing"}});return}if(c.limitReached){Ae.error(`Daily limit reached (${c.revealsToday}/${c.dailyLimit}). Try again tomorrow.`);return}c.success&&c.email&&(t(c.email),Ae.success(`Email revealed! ${c.revealsRemaining} reveals remaining today`),window.dispatchEvent(new CustomEvent("contact-revealed",{detail:{revealsToday:c.revealsToday,revealsRemaining:c.revealsRemaining}})))}catch(o){console.error("Error revealing email:",o),Ae.error(o.message||"Failed to reveal email")}finally{a(!1)}};return s.jsxs(U,{size:"sm",variant:"outline",onClick:i,disabled:r||n.revealsRemaining<=0,className:"gap-2",children:[r?s.jsx(Pt,{className:"w-3 h-3 animate-spin"}):s.jsx(zr,{className:"w-3 h-3"}),n.revealsRemaining>
8420?"Reveal Email":"Limit Reached"]})},IEe=({contact:e,onContactClick:t})=>{const[n,r]=g.useState([]),[a,i]=g.useState(!0);g.useEffect(()=>{o()},[e]);const o=async()=>{i(!0);try{const{data:l,error:c}=await K.functions.invoke("fetch-contacts",{body:{filters:{...e.Industry&&{industry:[e.Industry]},...e.Department&&{department:[e.Department]},...e.Seniority&&{seniority:[e.Seniority]}},pagination:{offset:Math.floor(Math.random()*20),pageSize:15}}});if(c)throw c;const u=((l==null?void 0:l.contacts)||[]).filter(d=>d.Email!==e.Email&&d.Company!==e.Company).sort(()=>Math.random()-.5).slice(0,5);r(u)}catch(l){console.error("Error fetching similar contacts:",l),r([])}finally{i(!1)}};return a?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"text-sm flex items-center gap-2",children:[s.jsx(At,{className:"w-4 h-4"}),"Similar Contacts"]})}),s.jsx(te,{children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})})]}):n.length===0?null:s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"text-sm flex items-center gap-2",children:[s.jsx(At,{className:"w-4 h-4"}),"People Like This (",n.length,")"]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"At similar companies or roles"})]}),s.jsxs(te,{className:"space-y-3",children:[n.map(l=>s.jsx("div",{className:"p-3 border rounded-lg hover:bg-accent cursor-pointer transition-colors",onClick:()=>t(l),children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-medium text-sm line-clamp-1",children:l["Full Name"]||"Unknown"}),l.Position&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(Ba,{className:"w-3 h-3"}),s.jsx("span",{className:"line-clamp-1",children:l.Position})]}),l.Company&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(tt,{className:"w-3 h-3"}),s.jsx("span",{className:"line-clamp-1",children:l.Company})]}),s.jsxs("div",{className:"flex flex-wrap gap-1",children:[l.Department&&s.jsx(fe,{variant:"secondary",className:"text-xs",children:l.Department}),l.Seniority&&s.jsx(fe,{variant:"outline",className:"text-xs",children:l.Seniority})]})]})},l.Email)),s.jsx(U,{variant:"outline",size:"sm",className:"w-full",onClick:()=>{const l=new URLSearchParams;e.Company&&l.set("search",e.Company),e.Industry&&l.set("industry",e.Industry),window.location.href=`/people?${l.toString()}`},children:"View More Similar Contacts"})]})]})},MEe=({emailValid:e,className:t="",showIcon:n=!0})=>{const a=(()=>{if(!e)return{status:"unknown",label:"Unverified",color:"bg-muted text-muted-foreground border-muted",icon:fE,tooltip:"Email verification status unknown"};const o=e.toLowerCase();return o==="true"||o==="valid"?{status:"valid",label:"Verified",color:"bg-green-50 text-green-700 border-green-200",icon:Zy,tooltip:"Email has been verified and is deliverable"}:o==="false"||o==="invalid"?{status:"invalid",label:"Invalid",color:"bg-red-50 text-red-700 border-red-200",icon:Jy,tooltip:"Email is invalid or undeliverable"}:o==="risky"||o==="catch-all"?{status:"risky",label:"Risky",color:"bg-yellow-50 text-yellow-700 border-yellow-200",icon:Gs,tooltip:"Email may be valid but has risk factors (catch-all, disposable, etc.)"}:{status:"unknown",label:"Unverified",color:"bg-muted text-muted-foreground border-muted",icon:fE,tooltip:"Email verification status unknown"}})(),i=a.icon;return s.jsx(YA,{children:s.jsxs(q9,{children:[s.jsx(W9,{asChild:!0,children:s.jsxs(fe,{variant:"outline",className:`text-xs font-medium ${a.color} ${t}`,children:[n&&s.jsx(i,{className:"w-3 h-3 mr-1"}),a.label]})}),s.jsx(XA,{children:s.jsx("p",{className:"text-xs",children:a.tooltip})})]})})},DEe=({contact:e,open:t,onOpenChange:n,userInfo:r,onRevealSuccess:a})=>{const[i,o]=g.useState(null),l=i||e.Email,c=!i&&e.isEmailMasked;return s.jsx(Wr,{open:t,onOpenChange:n,children:s.jsxs(Pr,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[s.jsx(Vr,{children:s.jsx(Tr,{className:"text-2xl",children:e["Full Name"]||"Contact Details"})}),s.jsxs("div",{className:"space-y-6 py-4",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"space-y-2 flex-1",children:[e.Position&&s.jsxs("div",{className:"flex items-center gap-2 text-lg",children:[s.jsx(Ba,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:e.Position})]}),e.Company&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{children:e.Company}),e.Domain&&s.jsxs("a",{href:`https://${e.Domain}`,target:"_blank",rel:"noopener noreferrer",className:"text-[rgb(234,85,43)] hover:underline text-sm",children:["(",e.Domain,")"]})]}),(e.City||e.Country)&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(jc,{className:"w-5 h-5"}
842),s.jsx("span",{children:[e.City,e.Country].filter(Boolean).join(", ")})]})]}),s.jsx(MEe,{emailValid:e["Email Valid"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.Department&&s.jsx(fe,{variant:"secondary",children:e.Department}),e.Seniority&&s.jsx(fe,{variant:"secondary",children:e.Seniority}),e.Industry&&s.jsx(fe,{variant:"outline",children:e.Industry})]})]}),s.jsx(qa,{}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Contact Information"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(_a,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:"Email:"}),s.jsx("span",{className:"text-sm",children:l}),c&&r&&s.jsx(REe,{contact:e,onReveal:u=>{o(u),a==null||a()},userInfo:r})]}),e["Phone Number"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Gq,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:"Phone:"}),s.jsx("span",{className:"text-sm",children:e["Phone Number"]})]}),e["Contacts Linkedin"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xa,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("a",{href:e["Contacts Linkedin"],target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[rgb(234,85,43)] hover:underline",children:"LinkedIn Profile"})]}),e["Contacts Twitter"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(LA,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("a",{href:e["Contacts Twitter"],target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[rgb(234,85,43)] hover:underline",children:"Twitter Profile"})]})]})]}),(e["Company Description"]||e["Company Size"]||e["Company Revenue"])&&s.jsxs(s.Fragment,{children:[s.jsx(qa,{}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Company Details"}),e["Company Description"]&&s.jsx("p",{className:"text-sm text-muted-foreground",children:e["Company Description"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e["Company Size"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(At,{className:"w-4 h-4 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Company Size"}),s.jsx("p",{className:"text-sm font-medium",children:e["Company Size"]})]})]}),e["Company Revenue"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Fn,{className:"w-4 h-4 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Revenue"}),s.jsx("p",{className:"text-sm font-medium",children:e["Company Revenue"]})]})]}),e["Founded Year"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(sn,{className:"w-4 h-4 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Founded"}),s.jsx("p",{className:"text-sm font-medium",children:e["Founded Year"]})]})]}),e["Company Type"]&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Type"}),s.jsx("p",{className:"text-sm font-medium",children:e["Company Type"]})]})]})]})]})]}),s.jsx(IEe,{contact:e,onContactClick:u=>{n(!1),setTimeout(()=>{n(!0)},100)}}),s.jsx(qa,{}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(RX,{contact:e}),s.jsx(IX,{contact:e}),s.jsx(U,{variant:"outline",onClick:()=>n(!1),children:"Close"})]})]})]})})},LEe=()=>{const{data:e,isLoading:t}=ct({queryKey:["people-stats"],queryFn:async()=>{try{const n=new Date,r=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1,0,0,0,0)).toISOString(),a=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),0,0,0,0)).toISOString(),{count:i}=await K.from("contacts").select("*",{count:"exact",head:!0}),o=r.split("T")[0],l=a.split("T")[0];console.log("[PEOPLE-STATS] Querying with monthStart:",o,"todayStart:",l);const{count:c,error:u}
842=await K.from("contacts").select("Email",{count:"exact",head:!0}).filter("Added On","gte",o),{count:d,error:h}=await K.from("contacts").select("Email",{count:"exact",head:!0}).filter("Added On","gte",l);return console.log("[PEOPLE-STATS] Month count:",c,"error:",u),console.log("[PEOPLE-STATS] Today count:",d,"error:",h),{total:i||0,thisMonth:u?0:c||0,today:h?0:d||0}}catch(n){return console.error("Error fetching people stats:",n),{total:0,thisMonth:0,today:0}}},refetchInterval:6e4});return t?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:[1,2,3].map(n=>s.jsxs(Y,{className:"p-6",children:[s.jsx(Je,{className:"h-4 w-24 mb-2"}),s.jsx(Je,{className:"h-8 w-16"})]},n))}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:[s.jsx(Y,{className:"p-6 hover:shadow-lg transition-shadow",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-3 bg-primary/10 rounded-lg",children:s.jsx(At,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Contacts"}),s.jsx("p",{className:"text-2xl font-bold",children:e==null?void 0:e.total.toLocaleString()})]})]})}),s.jsx(Y,{className:"p-6 hover:shadow-lg transition-shadow",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-3 bg-primary/10 rounded-lg",children:s.jsx(sn,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Added This Month"}),s.jsx("p",{className:"text-2xl font-bold",children:e==null?void 0:e.thisMonth.toLocaleString()})]})]})}),s.jsx(Y,{className:"p-6 hover:shadow-lg transition-shadow",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-3 bg-primary/10 rounded-lg",children:s.jsx(ze,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Added Today"}),s.jsx("p",{className:"text-2xl font-bold",children:e==null?void 0:e.today.toLocaleString()})]})]})})]})},$Ee=({currentFilters:e,onApplyFilter:t})=>{const[n,r]=g.useState([]),[a,i]=g.useState(!1),[o,l]=g.useState(""),[c,u]=g.useState(!1);g.useEffect(()=>{d()},[]);const d=async()=>{try{const{data:p,error:x}=await K.from("saved_filters").select("*").order("created_at",{ascending:!1});if(x)throw x;r(p||[])}catch(p){console.error("Error fetching saved filters:",p)}},h=async()=>{if(!o.trim()){Ae.error("Please enter a filter name");return}u(!0);try{const{data:{user:p}}=await K.auth.getUser();if(!p)throw new Error("Not authenticated");const{error:x}=await K.from("saved_filters").insert({filter_name:o,filter_config:e,is_default:!1,user_id:p.id});if(x)throw x;Ae.success("Filter saved successfully"),l(""),i(!1),d()}catch(p){console.error("Error saving filter:",p),Ae.error("Failed to save filter")}finally{u(!1)}},f=async p=>{try{const{error:x}=await K.from("saved_filters").delete().eq("id",p);if(x)throw x;Ae.success("Filter deleted"),d()}catch(x){console.error("Error deleting filter:",x),Ae.error("Failed to delete filter")}},m=async p=>{try{await K.from("saved_filters").update({is_default:!1}).neq("id","00000000-0000-0000-0000-000000000000");const{error:x}=await K.from("saved_filters").update({is_default:!0}).eq("id",p);if(x)throw x;Ae.success("Default filter updated"),d()}catch(x){console.error("Error setting default:",x),Ae.error("Failed to set default filter")}},y=Object.values(e).some(p=>Array.isArray(p)?p.length>0:typeof p=="boolean"?p:p!=null&&p!=="");return s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Wr,{open:a,onOpenChange:i,children:[s.jsx(wd,{asChild:!0,children:s.jsxs(U,{variant:"outline",size:"sm",disabled:!y,className:"gap-2",children:[s.jsx(PS,{className:"w-4 h-4"}),"Save Filters"]})}),s.jsxs(Pr,{children:[s.jsxs(Vr,{children:[s.jsx(Tr,{children:"Save Current Filters"}),s.jsx(Uc,{children:"Give your filter combination a name for quick access later."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(at,{placeholder:"Filter name (e.g., 'Senior Engineers in SF')",value:o,onChange:p=>l(p.target.value),onKeyDown:p=>p.key==="Enter"&&h()}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(U,{onClick:h,disabled:c||!o.trim(),className:"flex-1",children:c?"Saving...":"Save Filter"}),s.jsx(U,{variant:"outline",onClick:()=>i(!1),children:"Cancel"})]})]})]})]}),n.length>0&&s.jsxs(Fu,{children:[s.jsx(Bu,{asChild:!0,children:s.jsxs(U,{variant:"outline",size:"sm",className:"gap-2",children:[s.jsx(x0,{className:"w-4 h-4"}),"Saved Filters",s.jsx(fe,{variant:"secondary",className:"ml-1",children:n.length})]})}),s.jsxs(xc,{align:"end",className:"w-80",children:[s.jsx("div",{className:"p-2",children:s.jsx("p",{className:"text-sm font-semibold mb-2",children:"Your Saved Filters"})}),s.jsx(ej,{}),s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:n.map(p=>s.jsxs(Qe,{className:"flex items-center justify-between p-3 cursor-pointer",onClick:()=>t(p.filter_config),children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[p.is_default&&s.jsx(An,{className:"w-4 h-4 text-yellow-500 fill-yellow-500 flex-shrink-0"}),s.jsx("span",{className:"text-sm line-clamp-1",children:p.filter_name})]}),s.jsxs("div",{className:"flex gap-1",onClick:x=>x.stopPropagation(),children:[!p.is_default&&s.jsx(U,{variant:"ghost",size:"sm",onClick:x=>{x.stopPropagation(),m(p.id)},title:"Set as default",children:s.jsx(An,{className:"w-3 h-3"})}),s.jsx(U,{variant:"ghost",size:"sm",onClick:x=>{x.stopPropagation(),f(p.id)},title:"Delete filter",children:s.jsx(co,{className:"w-3 h-3 text-destructive"})})]})]}
842,p.id))})]})]})]})};function FEe(e,t=300){const[n,r]=g.useState(e);return g.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(a)}},[e,t]),n}const Hv=15,BEe=()=>{var X,W,re,ne,le,ie,ye,pe;const[e,t]=yd(),{user:n}=Ie(),[r,a]=g.useState(null),[i,o]=g.useState(!1),[l,c]=g.useState(!1),[u,d]=g.useState(1),[h,f]=g.useState(0),[m,y]=g.useState(0),[p,x]=g.useState(null),{showCaptcha:v,currentProblem:b,isLoading:w,initiateCaptcha:S,solveCaptcha:j,resetCaptcha:N}=Rt(),[C,_]=g.useState({search:e.get("search")||void 0,domain:e.get("domain")||void 0,country:((X=e.get("country"))==null?void 0:X.split(",").filter(Boolean))||void 0,city:((W=e.get("city"))==null?void 0:W.split(",").filter(Boolean))||void 0,industry:((re=e.get("industry"))==null?void 0:re.split(",").filter(Boolean))||void 0,position:e.get("position")||void 0,seniority:((ne=e.get("seniority"))==null?void 0:ne.split(",").filter(Boolean))||void 0,department:((le=e.get("department"))==null?void 0:le.split(",").filter(Boolean))||void 0,companySize:((ie=e.get("companySize"))==null?void 0:ie.split(",").filter(Boolean))||void 0,revenue:((ye=e.get("revenue"))==null?void 0:ye.split(",").filter(Boolean))||void 0,companyType:((pe=e.get("companyType"))==null?void 0:pe.split(",").filter(Boolean))||void 0,hasLinkedin:e.get("hasLinkedin")==="true",emailValid:e.get("emailValid")==="true"}),[A,P]=g.useState(e.get("sortBy")||"newest"),R=FEe(C.search,300);UK({title:"People Intelligence Database - Find Decision Makers | Slaygent.ai",description:"Search 2M+ verified business contacts. Find decision makers, reveal emails, and connect with the right people at companies showing buying signals.",keywords:"business contacts, decision makers, email finder, contact database, B2B leads, prospect search",ogTitle:"People Intelligence Database - Slaygent.ai",ogDescription:"Turn company signals into conversations. Find decision makers and reveal verified contact information.",canonicalUrl:"https://slaygent.ai/people",structuredData:{"@context":"https://schema.org","@type":"WebPage",name:"People Intelligence Database",description:"Search and discover business contacts and decision makers",provider:{"@type":"Organization",name:"Slaygent.ai",url:"https://slaygent.ai"}}}),g.useEffect(()=>{const G=e.get("domain");if(G){const Pe=zEe(G);_(J=>({...J,domain:Pe,search:Pe}))}},[]),g.useEffect(()=>{var Pe,J,oe,se,je,Ce,ut,Ze;const G=new URLSearchParams;C.search&&G.set("search",C.search),C.domain&&G.set("domain",C.domain),(Pe=C.country)!=null&&Pe.length&&G.set("country",C.country.join(",")),(J=C.city)!=null&&J.length&&G.set("city",C.city.join(",")),(oe=C.industry)!=null&&oe.length&&G.set("industry",C.industry.join(",")),C.position&&G.set("position",C.position),(se=C.seniority)!=null&&se.length&&G.set("seniority",C.seniority.join(",")),(je=C.department)!=null&&je.length&&G.set("department",C.department.join(",")),(Ce=C.companySize)!=null&&Ce.length&&G.set("companySize",C.companySize.join(",")),(ut=C.revenue)!=null&&ut.length&&G.set("revenue",C.revenue.join(",")),(Ze=C.companyType)!=null&&Ze.length&&G.set("companyType",C.companyType.join(",")),C.hasLinkedin&&G.set("hasLinkedin","true"),C.emailValid&&G.set("emailValid","true"),A!=="newest"&&G.set("sortBy",A),t(G)},[C,A,t]);const I=(u-1)*Hv,{data:B,isLoading:$,error:q,refetch:L}=ct({queryKey:["contacts",I,{...C,search:R},A],queryFn:async()=>{var je,Ce,ut,Ze,Ye,Zt,Yt,Nn;const G=new URLSearchParams({offset:I.toString(),pageSize:Hv.toString(),sortBy:A});R&&G.set("search",R),C.domain&&G.set("domain",C.domain),(je=C.country)!=null&&je.length&&G.set("country",C.country.join(",")),(Ce=C.city)!=null&&Ce.length&&G.set("city",C.city.join(",")),(ut=C.industry)!=null&&ut.length&&G.set("industry",C.industry.join(",")),C.position&&G.set("position",C.position),(Ze=C.seniority)!=null&&Ze.length&&G.set("seniority",C.seniority.join(",")),(Ye=C.department)!=null&&Ye.length&&G.set("department",C.department.join(",")),(Zt=C.companySize)!=null&&Zt.length&&G.set("companySize",C.companySize.join(",")),(Yt=C.revenue)!=null&&Yt.length&&G.set("revenue",C.revenue.join(",")),(Nn=C.companyType)!=null&&Nn.length&&G.set("companyType",C.companyType.join(",")),C.hasLinkedin&&G.set("hasLinkedin","true"),C.emailValid&&G.set("emailValid","true");const{data:{session:Pe}}=await K.auth.getSession(),J=`https://wjqeqokemkpcmvuwwbqo.supabase.co/functions/v1/fetch-contacts?${G.toString()}`,se=await(await fetch(J,{headers:Pe?{Authorization:`Bearer ${Pe.access_token}`}:{}})).json();if(se.requiresAuth)throw o(!0),new Error("Authentication required");if(se.requiresUpgrade)throw c(!0),new Error("Upgrade required");if(se.error)throw new Error(se.error);return{contacts:se.contacts,pagination:se.pagination,userInfo:se.userInfo}},enabled:!v});g.useEffect(()=>{const G=Pe=>{const J=Pe.detail;J&&x({revealsToday:J.revealsToday,revealsRemaining:J.revealsRemaining}),L()};return window.addEventListener("contact-revealed",G),()=>window.removeEventListener("contact-revealed",G)},[L]);const k=G=>{S("people_pagination",4)||(d(G),f(J=>J+1),window.scrollTo({top:0,behavior:"smooth"}))},T=G=>{if(!n){o(!0);return}S("people_detail_view",4)||(a(G),y(J=>J+1))},F=()=>{N()},O=()=>{Ae.error("Incorrect answer. Please try again.")},E=()=>{_({}),P("newest"),d(1)},M=(()=>{var Pe,J,oe,se,je,Ce,ut,Ze;let G=0;return C.search&&G++,C.domain&&G++,(Pe=C.country)!=null&&Pe.length&&G++,(J=C.city)!=null&&J.length&&G++,(oe=C.industry)!=null&&oe.length&&G++,C.position&&G++,(se=C.seniority)!=null&&se.length&&G++,(je=C.department)!=null&&je.length&&G++,(Ce=C.companySize)!=null&&Ce.length&&G++,(ut=C.revenue)!=null&&ut.length&&G++,(Ze=C.
842companyType)!=null&&Ze.length&&G++,C.hasLinkedin&&G++,C.emailValid&&G++,G})();return s.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[s.jsx(Ee,{}),s.jsx("main",{className:"flex-1 pt-24 pb-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[s.jsx("div",{className:"mb-8 text-center",children:s.jsxs("div",{className:"mb-4",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[s.jsx("h1",{className:"text-4xl font-bold",children:"People Intelligence Database"}),s.jsxs(fe,{variant:"secondary",className:"bg-[rgb(234,85,43)] text-white",children:[s.jsx(rl,{className:"w-3 h-3 mr-1"}),"BETA"]})]}),s.jsx("p",{className:"text-muted-foreground text-lg mb-4",children:"Turn company signals into conversations with the right people. Find the decision makers. Reveal contacts. Grow revenue."}),s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>L(),disabled:$,className:"inline-flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${$?"animate-spin":""}`}),"Refresh"]})]})}),s.jsx(LEe,{}),(B==null?void 0:B.userInfo)&&s.jsxs("div",{className:"flex items-center gap-4 p-4 bg-muted/50 rounded-lg mb-8",children:[s.jsx(At,{className:"w-5 h-5 text-muted-foreground"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("p",{className:"text-sm font-medium",children:[(p==null?void 0:p.revealsToday)??B.userInfo.revealsToday," contacts revealed today —"," ",(p==null?void 0:p.revealsRemaining)??B.userInfo.revealsRemaining," left"]}),s.jsx("div",{className:"mt-2 h-2 bg-background rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-[rgb(234,85,43)] transition-all",style:{width:`${((p==null?void 0:p.revealsToday)??B.userInfo.revealsToday)/B.userInfo.dailyRevealLimit*100}%`}})})]})]}),s.jsxs("div",{className:"mb-6 space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-4",children:[s.jsx("div",{className:"flex-1 min-w-[250px]",children:s.jsx(OEe,{filters:C,onFiltersChange:_})}),s.jsxs("div",{className:"flex items-center gap-3 sm:ml-auto flex-shrink-0",children:[s.jsx($Ee,{currentFilters:C,onApplyFilter:G=>{_(G),d(1)}}),s.jsx("label",{htmlFor:"sort-select",className:"sr-only",children:"Sort contacts by"}),s.jsxs("select",{id:"sort-select",value:A,onChange:G=>P(G.target.value),className:"px-4 py-2 border rounded-lg bg-background focus:outline-none focus:ring-2 focus:ring-primary whitespace-nowrap min-w-[180px]","aria-label":"Sort contacts",children:[s.jsx("option",{value:"newest",children:"Newest First"}),s.jsx("option",{value:"seniority",children:"Seniority (High → Low)"}),s.jsx("option",{value:"companySize",children:"Company Size (High → Low)"}),s.jsx("option",{value:"revenue",children:"Revenue (High → Low)"}),s.jsx("option",{value:"emailValid",children:"Email Valid First"})]})]})]}),M>0&&s.jsxs("div",{className:"flex items-center justify-between px-1",children:[s.jsxs("span",{className:"text-sm text-muted-foreground",children:[M," filter",M!==1?"s":""," active"]}),s.jsxs(U,{variant:"ghost",size:"sm",onClick:E,className:"gap-2","aria-label":`Clear ${M} active filters`,children:[s.jsx(tr,{className:"w-4 h-4"}),"Clear all"]})]})]}),(B==null?void 0:B.pagination)&&s.jsxs("div",{className:"mb-4 text-sm text-muted-foreground",children:["Showing ",I+1,"–",Math.min(I+Hv,B.pagination.total)," of"," ",B.pagination.total.toLocaleString()," contacts",M>0&&` (${M} filter${M!==1?"s":""} active)`]}),$?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:Hv}).map((G,Pe)=>s.jsx(wEe,{},Pe))}):q?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-destructive",children:q.message})}):B!=null&&B.contacts&&B.contacts.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:B.contacts.map((G,Pe)=>s.jsx(bEe,{contact:G,onViewDetails:()=>T(G)},`${G.Email}-${Pe}`))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(At,{className:"w-16 h-16 mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No contacts found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters or search terms"})]}),(B==null?void 0:B.pagination)&&B.pagination.totalPages>1&&s.jsxs("nav",{className:"mt-8 flex justify-center gap-2","aria-label":"Pagination",children:[s.jsx(U,{variant:"outline",onClick:()=>k(u-1),disabled:u===1||$,"aria-label":"Go to previous page",children:"Previous"}),s.jsx("div",{className:"flex items-center gap-2 px-4",children:s.jsxs("span",{className:"text-sm","aria-current":"page",children:["Page ",B.pagination.currentPage," of ",B.pagination.totalPages]})}),s.jsx(U,{variant:"outline",onClick:()=>k(u+1),disabled:u>=B.pagination.totalPages||$,className:"bg-[rgb(234,85,43)] text-white hover:bg-[rgb(214,65,23)]","aria-label":"Go to next page",children:"Next Page"})]})]})}),s.jsx(wt,{}),r&&s.jsx(DEe,{contact:r,open:!!r,onOpenChange:G=>!G&&a(null),userInfo:(B==null?void 0:B.userInfo)||null,onRevealSuccess:()=>L()}),v&&b&&s.jsx(Ot,{isOpen:v,question:b.question,onSolve:G=>j(G,F,O),onClose:N,isLoading:w}),s.jsx(Sd,{isOpen:i,onClose:()=>o(!1),onAuthSuccess:()=>{o(!1),L()}}),l&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",role:"dialog","aria-labelledby":"upgrade-title","aria-describedby":"upgrade-description",children:s.jsxs("div",{className:"bg-background rounded-lg p-8 max-w-md w-full",children:[s.jsx("h3",{id:"upgrade-title",className:"text-2xl font-bold mb-4",children:"Upgrade to Continue"}),s.jsx("p",{id:"upgrade-description",className:"text-muted-foreground mb-6",children:"Upgrade to Pro or Growth to access more contacts and unlock advanced features."}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx(U,{variant:"outline",onClick:()=>c(!1),className:"flex-1",children:"Maybe Later"}),s.jsx(U,{onClick:()=>window.location.href="/pricing",className:"flex-1 bg-[rgb(234,85,43)] text-white hover:bg-[rgb(214,65,23)]",children:"View Pricing"})]})]})})]})};function zEe(e){try{let t=e.trim();return/^https?:\/\//i.test(t)&&(t=new URL(t).hostname),t=t.replace(/^www\./i,"").replace(/\/$/,""),t.toLowerCase()}catch{return e.replace(/^https?:\/\//i,"").replace(/^www\./i,"").split("/")[0].toLowerCase()}}const UEe=({contact:e,isSelected:t,onSelect:n,onEdit:r,onDelete:a})=>s.jsx(Y,{className:"hover:shadow-md transition-shadow",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(vr,{checked:t,onCheckedChange:n,className:"mt-1"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"font-semibold text-lg mb-1 line-clamp-1",children:e.contact_name||"Unknown"}),s.jsxs("div",{className:"space-y-1 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_a,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.contact_email})]}),e.contact_company&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(tt,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.contact_company})]}),e.contact_position&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ba,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.contact_position})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[s.jsxs(fe,{variant:"secondary",className:"text-xs",children:[s.jsx(Wq,{className:"w-3 h-3 mr-1"}),e.folder_name||"default"]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Saved ",new Date(e.saved_at).toLocaleDateString()]})]}),e.tags&&e.tags.length>0&&s.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.tags.slice(0,3).map(i=>s.jsx(fe,{variant:"outline",className:"text-xs",children:i},i)),e.tags.length>3&&s.jsxs(fe,{variant:"outline",className:"text-xs text-muted-foreground",children:["+",e.tags.length-3," more"]})]}),e.outreach_status&&e.outreach_status!=="not_contacted"&&s.jsxs("div",{className:"flex items-center gap-2 text-xs mb-2",children:[e.outreach_status==="contacted"&&s.jsxs(s.Fragment,{children:[s.jsx(TS,{className:"w-3 h-3 text-blue-600"}),s.jsx("span",{className:"text-blue-600",children:"Contacted"})]}),e.outreach_status==="replied"&&s.jsxs(s.Fragment,{children:[s.jsx(Yq,{className:"w-3 h-3 text-green-600"}),s.jsx("span",{className:"text-green-600",children:"Replied"})]}),e.outreach_status==="qualified"&&s.jsxs(s.Fragment,{children:[s.jsx(Zy,{className:"w-3 h-3 text-[rgb(234,85,43)]"}),s.jsx("span",{className:"text-[rgb(234,85,43)]",children:"Qualified"})]})]}),e.notes&&s.jsxs("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-2 italic",children:['"',e.notes,'"']})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(U,{variant:"ghost",size:"sm",onClick:r,className:"h-8 w-8 p-0",children:s.jsx(jle,{className:"w-4 h-4"})}),s.jsx(U,{variant:"ghost",size:"sm",onClick:a,className:"h-8 w-8 p-0 text-destructive hover:text-destructive",children:s.jsx(co,{className:"w-4 h-4"})})]})]})})}),qEe=["Hot Lead","Decision Maker","Contacted","Replied","Qualified","Demo Sc
842heduled","Negotiating","Not Interested","Follow Up","Champion"],WEe=({contactId:e,initialTags:t,onUpdate:n})=>{const[r,a]=g.useState(t||[]),[i,o]=g.useState(""),[l,c]=g.useState(!1),u=async f=>{const m=f.trim();if(!m||r.includes(m))return;const y=[...r,m];a(y),o(""),await h(y)},d=async f=>{const m=r.filter(y=>y!==f);a(m),await h(m)},h=async f=>{c(!0);try{const{error:m}=await K.from("saved_contacts").update({tags:f}).eq("id",e);if(m)throw m;n()}catch(m){console.error("Error saving tags:",m),Ae.error("Failed to save tags")}finally{c(!1)}};return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Zq,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:"Tags"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(f=>s.jsxs(fe,{variant:"secondary",className:"gap-1",children:[f,s.jsx("button",{onClick:()=>d(f),className:"ml-1 hover:text-destructive","aria-label":`Remove ${f} tag`,children:s.jsx(tr,{className:"w-3 h-3"})})]},f))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(at,{value:i,onChange:f=>o(f.target.value),onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),u(i))},placeholder:"Add custom tag...",className:"flex-1",disabled:l}),s.jsx(U,{size:"sm",onClick:()=>u(i),disabled:!i.trim()||l,children:s.jsx(b0,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Quick add:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:qEe.filter(f=>!r.includes(f)).map(f=>s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>u(f),className:"text-xs h-7",disabled:l,children:[s.jsx(b0,{className:"w-3 h-3 mr-1"}),f]},f))})]})]})},r_=[{value:"not_contacted",label:"Not Contacted",icon:Xn,color:"text-muted-foreground"},{value:"contacted",label:"Contacted",icon:TS,color:"text-blue-600"},{value:"replied",label:"Replied",icon:Yq,color:"text-green-600"},{value:"qualified",label:"Qualified",icon:Zy,color:"text-[rgb(234,85,43)]"}],VEe=({contactId:e,initialStatus:t,onUpdate:n})=>{const[r,a]=g.useState(t||"not_contacted"),[i,o]=g.useState(!1),l=async d=>{a(d),o(!0);try{const{error:h}=await K.from("saved_contacts").update({outreach_status:d}).eq("id",e);if(h)throw h;Ae.success("Outreach status updated"),n()}catch(h){console.error("Error updating outreach status:",h),Ae.error("Failed to update status")}finally{o(!1)}},c=r_.find(d=>d.value===r)||r_[0],u=c.icon;return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(u,{className:`w-4 h-4 ${c.color}`}),s.jsx("span",{className:"text-sm font-medium",children:"Outreach Status"})]}),s.jsxs(hr,{value:r,onValueChange:l,disabled:i,children:[s.jsx(nr,{className:"w-full",children:s.jsx(fr,{})}),s.jsx(rr,{children:r_.map(d=>{const h=d.icon;return s.jsx(bt,{value:d.value,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(h,{className:`w-4 h-4 ${d.color}`}),d.label]})},d.value)})})]})]})},HEe=({contact:e,open:t,onOpenChange:n,onUpdate:r})=>{const[a,i]=g.useState((e==null?void 0:e.notes)||""),[o,l]=g.useState((e==null?void 0:e.folder_name)||"default"),[c,u]=g.useState(!1);g.useEffect(()=>{e&&(i(e.notes||""),l(e.folder_name||"default"))},[e]);const d=async()=>{if(e){u(!0);try{const{error:h}=await K.from("saved_contacts").update({notes:a,folder_name:o}).eq("id",e.id);if(h)throw h;Ae.success("Contact updated successfully"),r(),n(!1)}catch(h){console.error("Error updating contact:",h),Ae.error(h.message||"Failed to update contact")}finally{u(!1)}}};return s.jsx(Wr,{open:t,onOpenChange:n,children:s.jsxs(Pr,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[s.jsx(Vr,{children:s.jsx(Tr,{children:"Edit Contact - CRM Details"})}),e&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-lg",children:e.contact_name}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e.contact_email}),e.contact_company&&s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e.contact_company})]}),s.jsx(qa,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"folder",children:"Folder"}),s.jsx(at,{id:"folder",value:o,onChange:h=>l(h.target.value),placeholder:"default"})]}),s.jsx(qa,{}),s.jsx(WEe,{contactId:e.id,initialTags:e.tags||[],onUpdate:r}),s.jsx(qa,{}),s.jsx(VEe,{contactId:e.id,initialStatus:e.outreach_status||"not_contacted",onUpdate:r}),s.jsx(qa,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"notes",children:"Notes"}),s.jsx(Xg,{id:"notes",value:a,onChange:h=>i(h.target.value),placeholder:"Add notes about this contact...",rows:6})]})]}),s.jsxs(dj,{children:[s.jsx(U,{variant:"outline",onClick:()=>
842n(!1),disabled:c,children:"Cancel"}),s.jsxs(U,{onClick:d,disabled:c,children:[c&&s.jsx(Pt,{className:"w-4 h-4 mr-2 animate-spin"}),"Save Changes"]})]})]})})},GEe=({open:e,onOpenChange:t,folderName:n,selectedCount:r})=>{const[a,i]=g.useState(!1),[o,l]=g.useState(!1),c=async()=>{i(!0);try{const{data:{session:d}}=await K.auth.getSession();if(!d){Ae.error("Please sign in to export contacts");return}console.log("[EXPORT-CSV] Starting export for folder:",n);const h=await K.functions.invoke("export-saved-contacts",{headers:{Authorization:`Bearer ${d.access_token}`},body:{folderName:n}});if(console.log("[EXPORT-CSV] Response:",h),h.error)throw new Error(h.error.message||"Export failed");if(!h.data||!h.data.csv)throw new Error("No data received from export");const{csv:f,count:m}=h.data,y=new Blob([f],{type:"text/csv;charset=utf-8;"}),p=window.URL.createObjectURL(y),x=document.createElement("a");x.href=p,x.download=`saved-contacts-${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(x),x.click(),document.body.removeChild(x),window.URL.revokeObjectURL(p),Ae.success(`${m} contacts exported successfully!`),t(!1)}catch(d){console.error("Error exporting to CSV:",d),Ae.error(d.message||"Failed to export contacts. Please try again.")}finally{i(!1)}},u=async()=>{var d;l(!0);try{const{data:{session:h}}=await K.auth.getSession();if(!h){Ae.error("Please sign in to export to Google Sheets");return}console.log("[EXPORT-SHEETS] Starting export for folder:",n);const f=await K.functions.invoke("export-saved-contacts-to-sheets",{headers:{Authorization:`Bearer ${h.access_token}`},body:{folderName:n}});if(console.log("[EXPORT-SHEETS] Response:",f),f.error){if((d=f.data)!=null&&d.needsAuth)Ae.error("Please connect Google Sheets first",{action:{label:"Connect",onClick:()=>window.location.href="/profile"}});else throw new Error(f.error.message||"Export to Sheets failed");return}if(!f.data||!f.data.spreadsheetUrl)throw new Error("No spreadsheet URL received");const{spreadsheetUrl:m,contactCount:y}=f.data;Ae.success(`${y} contacts exported successfully!`,{action:{label:"Open Sheet",onClick:()=>window.open(m,"_blank")}}),t(!1)}catch(h){console.error("Error exporting to Sheets:",h),Ae.error(h.message||"Failed to export to Google Sheets. Please try again.")}finally{l(!1)}};return s.jsx(Wr,{open:e,onOpenChange:t,children:s.jsxs(Pr,{className:"max-w-md",children:[s.jsxs(Vr,{children:[s.jsx(Tr,{children:"Export Contacts"}),s.jsx(Uc,{children:r>0?`Export ${r} selected contacts`:n?`Export all contacts from "${n}" folder`:"Export all saved contacts"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs(U,{onClick:c,disabled:a||o,className:"w-full gap-2",variant:"outline",children:[a?s.jsx(Pt,{className:"w-4 h-4 animate-spin"}):s.jsx(Ka,{className:"w-4 h-4"}),"Export as CSV"]}),s.jsxs(U,{onClick:u,disabled:a||o,className:"w-full gap-2",variant:"outline",children:[o?s.jsx(Pt,{className:"w-4 h-4 animate-spin"}):s.jsx(Sle,{className:"w-4 h-4"}),"Export to Google Sheets"]})]})]})})},WX=({userId:e})=>{const{data:t,isLoading:n}=ct({queryKey:["saved-contacts-analytics",e],queryFn:async()=>{const{count:r}=await K.from("saved_contacts").select("id",{count:"exact",head:!0}).eq("user_id",e),a=new Date().toISOString().split("T")[0],{count:i}=await K.from("contact_reveals").select("id",{count:"exact",head:!0}).eq("user_id",e).gte("revealed_at",a),{data:o}=await K.from("saved_contacts").select("tags").eq("user_id",e).not("tags","is",null),l=(o==null?void 0:o.filter(d=>d.tags&&d.tags.length>0).length)||0,{data:c}=await K.from("saved_contacts").select("outreach_status").eq("user_id",e),u={not_contacted:0,contacted:0,replied:0,qualified:0};return c==null||c.forEach(d=>{const h=d.outreach_status||"not_contacted";h in u&&u[h]++}),{totalSaved:r||0,revealsToday:i||0,taggedContacts:l,outreachStats:u}},refetchInterval:6e4});return n?s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[1,2,3,4].map(r=>s.jsxs(Y,{className:"p-4",children:[s.jsx(Je,{className:"h-4 w-20 mb-2"}),s.jsx(Je,{className:"h-6 w-12"})]},r))}):s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[s.jsxs(Y,{className:"p-4 hover:shadow-md transition-shadow",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(zn,{className:"w-4 h-4 text-[rgb(234,85,43)]"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Saved"})]}),s.jsx("p",{className:"text-2xl font-bold",children:t==null?void 0:t.totalSaved})]}),s.jsxs(Y,{className:"p-4 hover:shadow-md transition-shadow",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(zr,{className:"w-4 h-4 text-blue-600"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Reveals Today"})]}),s.jsx("p",{className:"text-2xl font-bold",children:t==null?void 0:t.revealsToday})]}),s.jsxs(Y,{className:"p-4 hover:shadow-md transition-shadow",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Zq,{className:"w-4 h-4 text-purple-600"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Tagged"})]}),s.jsx("p",{className:"text-2xl font-bold",children:t==null?void 0:t.taggedContacts})]}),s.jsxs(Y,{className:"p-4 hover:shadow-md transition-shadow",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Xn,{className:"w-4 h-4 text-green-600"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Replied"})]}),s.jsx("p",{className:"text-2xl font-bold",children:(t==null?void 0:t.outreachStats.replied)||0})]})]})},KEe=()=>{const{user:e}=Ie(),t=cs(),[n,r]=g.useState(""),[a,i]=g.useState("all"),[o,l]=g.useState(new Set),[c,u]=g.useState(null),[d,h]=g.useState(!1);g.useEffect(()=>{e||t("/auth")},[e,t]);const{data:f,isLoading:m,refetch:y}=ct({queryKey:["saved-contacts",e==null?void 0:e.id,a,n],queryFn:async()=>
842{if(!e)return[];let S=K.from("saved_contacts").select("*").eq("user_id",e.id).order("saved_at",{ascending:!1});a!=="all"&&(S=S.eq("folder_name",a)),n&&(S=S.or(`contact_name.ilike.%${n}%,contact_email.ilike.%${n}%,contact_company.ilike.%${n}%`));const{data:j,error:N}=await S;if(N)throw N;return j},enabled:!!e}),p=Array.from(new Set((f==null?void 0:f.map(S=>S.folder_name||"default"))||[])),x=S=>{l(S?new Set((f==null?void 0:f.map(j=>j.id))||[]):new Set)},v=(S,j)=>{const N=new Set(o);j?N.add(S):N.delete(S),l(N)},b=async()=>{if(o.size!==0&&confirm(`Delete ${o.size} selected contacts?`))try{const{error:S}=await K.from("saved_contacts").delete().in("id",Array.from(o));if(S)throw S;Ae.success(`${o.size} contacts deleted`),l(new Set),y()}catch(S){console.error("Error deleting contacts:",S),Ae.error(S.message||"Failed to delete contacts")}},w=async S=>{if(confirm("Delete this contact?"))try{const{error:j}=await K.from("saved_contacts").delete().eq("id",S);if(j)throw j;Ae.success("Contact deleted"),y()}catch(j){console.error("Error deleting contact:",j),Ae.error(j.message||"Failed to delete contact")}};return e?s.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[s.jsx(Ee,{}),s.jsx("main",{className:"flex-1 pt-20 pb-12",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("div",{className:"mb-8 text-center",children:s.jsxs("div",{className:"mb-4",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[s.jsx("h1",{className:"text-4xl font-bold",children:"Saved Contacts"}),s.jsxs(fe,{variant:"secondary",className:"bg-[rgb(234,85,43)] text-white",children:[s.jsx(zn,{className:"w-3 h-3 mr-1 fill-current"}),(f==null?void 0:f.length)||0]})]}),s.jsx("p",{className:"text-muted-foreground text-lg",children:"Manage your saved contacts, organize by folders, and export to CSV or Google Sheets"})]})}),e&&s.jsx(WX,{userId:e.id}),s.jsxs("div",{className:"mb-6 flex flex-wrap gap-4 items-center",children:[s.jsxs("div",{className:"relative flex-1 min-w-[300px]",children:[s.jsx(st,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(at,{placeholder:"Search by name, email, or company...",value:n,onChange:S=>r(S.target.value),className:"pl-10"})]}),s.jsxs(hr,{value:a,onValueChange:i,children:[s.jsx(nr,{className:"w-[200px]",children:s.jsx(fr,{placeholder:"All Folders"})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"all",children:"All Folders"}),p.map(S=>s.jsx(bt,{value:S,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Wq,{className:"w-4 h-4"}),S]})},S))]})]}),s.jsxs(U,{variant:"outline",onClick:()=>h(!0),className:"gap-2",disabled:!f||f.length===0,children:[s.jsx(Ka,{className:"w-4 h-4"}),"Export"]})]}),o.size>0&&s.jsxs("div",{className:"mb-4 p-4 bg-muted rounded-lg flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:"font-medium",children:[o.size," contact",o.size!==1?"s":""," selected"]}),s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>l(new Set),children:"Clear Selection"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>h(!0),className:"gap-2",children:[s.jsx(Ka,{className:"w-4 h-4"}),"Export Selected"]}),s.jsxs(U,{variant:"destructive",size:"sm",onClick:b,className:"gap-2",children:[s.jsx(co,{className:"w-4 h-4"}),"Delete Selected"]})]})]}),f&&f.length>0&&s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",checked:o.size===f.length&&f.length>0,onChange:S=>x(S.target.checked),className:"rounded"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Select all"})]}),m?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((S,j)=>s.jsxs("div",{className:"border rounded-lg p-4 space-y-4",children:[s.jsx(Je,{className:"h-4 w-3/4"}),s.jsx(Je,{className:"h-3 w-1/2"}),s.jsx(Je,{className:"h-3 w-2/3"})]},j))}):f&&f.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map(S=>
vendor: 6,338 bytes, line 842
842s.jsx(UEe,{contact:S,isSelected:o.has(S.id),onSelect:j=>v(S.id,j),onEdit:()=>u(S),onDelete:()=>w(S.id)},S.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(At,{className:"w-16 h-16 mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No saved contacts"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:n||a!=="all"?"No contacts match your filters":"Start saving contacts from the People directory"}),s.jsx(U,{onClick:()=>t("/people"),children:"Browse Contacts"})]})]})}),s.jsx(wt,{}),s.jsx(HEe,{contact:c,open:!!c,onOpenChange:S=>!S&&u(null),onUpdate:y}),s.jsx(GEe,{open:d,onOpenChange:h,folderName:a!=="all"?a:void 0,selectedCount:o.size})]}):null};var YEe=Array.isArray,Zs=YEe,XEe=typeof Bo=="object"&&Bo&&Bo.Object===Object&&Bo,VX=XEe,QEe=VX,ZEe=typeof self=="object"&&self&&self.Object===Object&&self,JEe=QEe||ZEe||Function("return this")(),Co=JEe,eke=Co,tke=eke.Symbol,Sx=tke,k$=Sx,HX=Object.prototype,nke=HX.hasOwnProperty,rke=HX.toString,sp=k$?k$.toStringTag:void 0;function ske(e){var t=nke.call(e,sp),n=e[sp];try{e[sp]=void 0;var r=!0}catch{}var a=rke.call(e);return r&&(t?e[sp]=n:delete e[sp]),a}var ake=ske,ike=Object.prototype,oke=ike.toString;function lke(e){return oke.call(e)}var cke=lke,P$=Sx,uke=ake,dke=cke,hke="[object Null]",fke="[object Undefined]",T$=P$?P$.toStringTag:void 0;function mke(e){return e==null?e===void 0?fke:hke:T$&&T$ in Object(e)?uke(e):dke(e)}var gl=mke;function pke(e){return e!=null&&typeof e=="object"}var yl=pke,gke=gl,yke=yl,xke="[object Symbol]";function vke(e){return typeof e=="symbol"||yke(e)&&gke(e)==xke}var jm=vke,bke=Zs,wke=jm,Ske=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jke=/^\w*$/;function Nke(e,t){if(bke(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||wke(e)?!0:jke.test(e)||!Ske.test(e)||t!=null&&e in Object(t)}var M2=Nke;function _ke(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hc=_ke;const Nm=$t(Hc);var Cke=gl,Eke=Hc,kke="[object AsyncFunction]",Pke="[object Function]",Tke="[object GeneratorFunction]",Ake="[object Proxy]";function Oke(e){if(!Eke(e))return!1;var t=Cke(e);return t==Pke||t==Tke||t==kke||t==Ake}var D2=Oke;const xt=$t(D2);var Rke=Co,Ike=Rke["__core-js_shared__"],Mke=Ike,s_=Mke,A$=function(){var e=/[^.]+$/.exec(s_&&s_.keys&&s_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Dke(e){return!!A$&&A$ in e}var Lke=Dke,$ke=Function.prototype,Fke=$ke.toString;function Bke(e){if(e!=null){try{return Fke.call(e)}catch{}try{return e+""}catch{}}return""}var GX=Bke,zke=D2,Uke=Lke,qke=Hc,Wke=GX,Vke=/[\\^$.*+?()[\]{}|]/g,Hke=/^\[object .+?Constructor\]$/,Gke=Function.prototype,Kke=Object.prototype,Yke=Gke.toString,Xke=Kke.hasOwnProperty,Qke=RegExp("^"+Yke.call(Xke).replace(Vke,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zke(e){if(!qke(e)||Uke(e))return!1;var t=zke(e)?Qke:Hke;return t.test(Wke(e))}var Jke=Zke;function ePe(e,t){return e==null?void 0:e[t]}var tPe=ePe,nPe=Jke,rPe=tPe;function sPe(e,t){var n=rPe(e,t);return nPe(n)?n:void 0}var jd=sPe,aPe=jd,iPe=aPe(Object,"create"),vj=iPe,O$=vj;function oPe(){this.__data__=O$?O$(null):{},this.size=0}var lPe=oPe;function cPe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uPe=cPe,dPe=vj,hPe="__lodash_hash_undefined__",fPe=Object.prototype,mPe=fPe.hasOwnProperty;function pPe(e){var t=this.__data__;if(dPe){var n=t[e];return n===hPe?void 0:n}return mPe.call(t,e)?t[e]:void 0}var gPe=pPe,yPe=vj,xPe=Object.prototype,vPe=xPe.hasOwnProperty;function bPe(e){var t=this.__data__;return yPe?t[e]!==void 0:vPe.call(t,e)}var wPe=bPe,SPe=vj,jPe="__lodash_hash_undefined__";function NPe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=SPe&&t===void 0?jPe:t,this}var _Pe=NPe,CPe=lPe,EPe=uPe,kPe=gPe,PPe=wPe,TPe=_Pe;function _m(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_m.prototype.clear=CPe;_m.prototype.delete=EPe;_m.prototype.get=kPe;_m.prototype.has=PPe;_m.prototype.set=TPe;var APe=_m;function OPe(){this.__data__=[],this.size=0}var RPe=OPe;function IPe(e,t){return e===t||e!==e&&t!==t}var L2=IPe,MPe=L2;function DPe(e,t){for(var n=e.length;n--;)if(MPe(e[n][0],t))return n;return-1}var bj=DPe,LPe=bj,$Pe=Array.prototype,FPe=$Pe.splice;function BPe(e){var t=this.__data__,n=LPe(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():FPe.call(t,n,1),--this.size,!0}var zPe=BPe,UPe=bj;function qPe(e){var t=this.__data__,n=UPe(t,e);return n<0?void 0:t[n][1]}var WPe=qPe,VPe=bj;function HPe(e){return VPe(this.__data__,e)>-1}var GPe=HPe,KPe=bj;function YPe(e,t){var n=this.__data__,r=KPe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var XPe=YPe,QPe=RPe,ZPe=zPe,JPe=WPe,eTe=GPe,tTe=XPe;function Cm(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cm.prototype.clear=QPe;Cm.prototype.delete=ZPe;Cm.prototype.get=JPe;Cm.prototype.has=eTe;Cm.prototype.set=tTe;var wj=Cm,nTe=jd,rTe=Co,sTe=nTe(rTe,"Map"),$2=sTe,R$=APe,aTe=wj,iTe=$2;function oTe(){this.size=0,this.__data__={hash:new R$,map:new(iTe||aTe),string:new R$}}var lTe=oTe;function cTe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var uTe=cTe,dTe=uTe;function hTe(e,t){var n=e.__data__;return dTe(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Sj=hTe,fTe=Sj;function mTe(e){var t=fTe(this,e).delete(e);return this.size-=t?1:0,t}var pTe=mTe,gTe=Sj;function yTe(e){return gTe(this,e).get(e)}var xTe=yTe,vTe=Sj;function bTe(e){return vTe(this,e).has(e)}var wTe=bTe,STe=Sj;function jTe(e,t){var n=STe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var NTe=jTe,_Te=lTe,CTe=pTe,ETe=xTe,kTe=wTe,PTe=NTe;function Em(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Em.prototype.clear=_Te;Em.prototype.delete=CTe;Em.prototype.get=ETe;Em.prototype.has=kTe;Em.prototype.set=PTe;var F2=Em,KX=F2,TTe="Expected a function";function B2(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(TTe);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(B2.Cache||KX),n}
842B2.Cache=KX;var YX=B2;const ATe=$t(YX);var OTe=YX,RTe=500;function ITe(e){var t=OTe(e,function(r){return n.size===RTe&&n.clear(),r}),n=t.cache;return t}var MTe=ITe,DTe=MTe,LTe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Te=/\\(\\)?/g,FTe=DTe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(LTe,function(n,r,a,i){t.push(a?i.replace($Te,"$1"):r||n)}),t}),BTe=FTe;function zTe(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var z2=zTe,I$=Sx,UTe=z2,qTe=Zs,WTe=jm,VTe=1/0,M$=I$?I$.prototype:void 0,D$=M$?M$.toString:void 0;function XX(e){if(typeof e=="string")return e;if(qTe(e))return UTe(e,XX)+"";if(WTe(e))return D$?D$.call(e):"";var t=e+"";return t=="0"&&1/e==-VTe?"-0":t}var HTe=XX,GTe=HTe;function KTe(e){return e==null?"":GTe(e)}var QX=KTe,YTe=Zs,XTe=M2,QTe=BTe,ZTe=QX;function JTe(e,t){return YTe(e)?e:XTe(e,t)?[e]:QTe(ZTe(e))}var ZX=JTe,eAe=jm,tAe=1/0;function nAe(e){if(typeof e=="string"||eAe(e))return e;var t=e+"";return t=="0"&&1/e==-tAe?"-0":t}var jj=nAe,rAe=ZX,sAe=jj;function aAe(e,t){t=rAe(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[sAe(t[n++])];return n&&n==r?e:void 0}var U2=aAe,iAe=U2;function oAe(e,t,n){var r=e==null?void 0:iAe(e,t);return r===void 0?n:r}var JX=oAe;const wa=$t(JX);function lAe(e){return e==null}var cAe=lAe;const jt=$t(cAe);var uAe=gl,dAe=Zs,hAe=yl,fAe="[object String]";function mAe(e){return typeof e=="string"||!dAe(e)&&hAe(e)&&uAe(e)==fAe}var pAe=mAe;const jx=$t(pAe);var eQ={exports:{}},hn={};/**
843 * @license React
844 * react-is.production.min.js
845 *
846 * Copyright (c) Facebook, Inc. and its affiliates.
847 *
848 * This source code is licensed under the MIT license found in the
849 * LICENSE file in the root directory of this source tree.
850 */var q2=Symbol.for("react.element"),W2=Symbol.for("react.portal"),Nj=Symbol.for("react.fragment"),_j=Symbol.for("react.strict_mode"),Cj=Symbol.for("react.profiler"),Ej=Symbol.for("react.provider"),kj=Symbol.for("react.context"),gAe=Symbol.for("react.server_context"),Pj=Symbol.for("react.forward_ref"),Tj=Symbol.for("react.suspense"),Aj=Symbol.for("react.suspense_list"),Oj=Symbol.for("react.memo"),Rj=Symbol.for("react.lazy"),yAe=Symbol.for("react.offscreen"),tQ;tQ=Symbol.for("react.module.reference");function ii(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case q2:switch(e=e.type,e){case Nj:case Cj:case _j:case Tj:case Aj:return e;default:switch(e=e&&e.$$typeof,e){case gAe:case kj:case Pj:case Rj:case Oj:case Ej:return e;default:return t}}case W2:return t}}}hn.ContextConsumer=kj;hn.ContextProvider=Ej;hn.Element=q2;hn.ForwardRef=Pj;hn.Fragment=Nj;hn.Lazy=Rj;hn.Memo=Oj;hn.Portal=W2;hn.Profiler=Cj;hn.StrictMode=_j;hn.Suspense=Tj;hn.SuspenseList=Aj;hn.isAsyncMode=function(){return!1};hn.isConcurrentMode=function(){return!1};hn.isContextConsumer=function(e){return ii(e)===kj};hn.isContextProvider=function(e){return ii(e)===Ej};hn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===q2};hn.isForwardRef=function(e){return ii(e)===Pj};hn.isFragment=function(e){return ii(e)===Nj};hn.isLazy=function(e){return ii(e)===Rj};hn.isMemo=function(e){return ii(e)===Oj};hn.isPortal=function(e){return ii(e)===W2};hn.isProfiler=function(e){return ii(e)===Cj};hn.isStrictMode=function(e){return ii(e)===_j};hn.isSuspense=function(e){return ii(e)===Tj};hn.isSuspenseList=function(e){return ii(e)===Aj};hn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Nj||e===Cj||e===_j||e===Tj||e===Aj||e===yAe||typeof e=="object"&&e!==null&&(e.$$typeof===Rj||e.$$typeof===Oj||e.$$typeof===Ej||e.$$typeof===kj||e.$$typeof===Pj||e.$$typeof===tQ||e.getModuleId!==void 0)};hn.typeOf=ii;eQ.exports=hn;var nQ=eQ.exports,xAe=gl,vAe=yl,bAe="[object Number]";function wAe(e){return typeof e=="number"||vAe(e)&&xAe(e)==bAe}var rQ=wAe;const SAe=$t(rQ);var jAe=rQ;function NAe(e){return jAe(e)&&e!=+e}var _Ae=NAe;const Nx=$t(_Ae);var ws=function(t){return t===0?0:t>0?1:-1},ju=function(t){return jx(t)&&t.indexOf("%")===t.length-1},ke=function(t){return SAe(t)&&!Nx(t)},Sr=function(t){return ke(t)||jx(t)},CAe=0,km=function(t){var n=++CAe;return"".concat(t||"").concat(n)},Ss=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ke(t)&&!jx(t))return r;var i;if(ju(t)){var o=t.indexOf("%");i=n*parseFloat(t.slice(0,o))/100}else i=+t;return Nx(i)&&(i=r),a&&i>n&&(i=n),i},Wl=function(t){if(!t)return null;var n=Object.keys(t);
vendor: 5,028 bytes, line 850
850return n&&n.length?t[n[0]]:null},EAe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},ha=function(t,n){return ke(t)&&ke(n)?function(r){return t+r*(n-t)}:function(){return n}};function W0(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):wa(r,t))===n})}function Uh(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Fk(e){"@babel/helpers - typeof";return Fk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fk(e)}var kAe=["viewBox","children"],PAe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],L$=["points","pathLength"],a_={svg:kAe,polygon:L$,polyline:L$},V2=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
850ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],V0=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(g.isValidElement(t)&&(r=t.props),!Nm(r))return null;var a={};return Object.keys(r).forEach(function(i){V2.includes(i)&&(a[i]=n||function(o){return r[i](r,o)})}),a},TAe=function(t,n,r){return function(a){return t(n,r,a),null}},rd=function(t,n,r){if(!Nm(t)||Fk(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];V2.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=TAe(o,n,r))}),a},AAe=["children"],OAe=["children"];function $$(e,t){if(e==null)return{};var n=RAe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bk(e){"@babel/helpers - typeof";return Bk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bk(e)}var F$={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Yo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},B$=null,i_=null,H2=function e(t){if(t===B$&&Array.isArray(i_))return i_;var n=[];
vendor: 4,220 bytes, line 850
850return g.Children.forEach(t,function(r){jt(r)||(nQ.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),i_=n,B$=t,n};function Sa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Yo(a)}):r=[Yo(t)],H2(e).forEach(function(a){var i=wa(a,"type.displayName")||wa(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function ua(e,t){var n=Sa(e,t);return n&&n[0]}var z$=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!ke(r)||r<=0||!ke(a)||a<=0)},IAe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],MAe=function(t){return t&&t.type&&jx(t.type)&&IAe.indexOf(t.type)>=0},DAe=function(t){return t&&Bk(t)==="object"&&"clipDot"in t},LAe=function(t,n,r,a){var i,o=(i=a_==null?void 0:a_[a])!==null&&i!==void 0?i:[];return!xt(t)&&(a&&o.includes(n)||PAe.includes(n))||r&&V2.includes(n)},ot=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(g.isValidElement(t)&&(a=t.props),!Nm(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;LAe((l=a)===null||l===void 0?void 0:l[o],o,n,r)&&(i[o]=a[o])}),i},zk=function e(t,n){if(t===n)return!0;var r=g.Children.count(t);if(r!==g.Children.count(n))return!1;if(r===0)return!0;if(r===1)return U$(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],o=n[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!U$(i,o))return!1}return!0},U$=function(t,n){if(jt(t)&&jt(n))return!0;if(!jt(t)&&!jt(n)){var r=t.props||{},a=r.children,i=$$(r,AAe),o=n.props||{},l=o.children,c=$$(o,OAe);return a&&l?Uh(i,c)&&zk(a,l):!a&&!l?Uh(i,c):!1}return!1},q$=function(t,n){var r=[],a={};return H2(t).forEach(function(i,o){if(MAe(i))r.push(i);else if(i){var l=Yo(i.type),c=n[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var h=u(i,l,o);r.push(h),a[l]=!0}}}),r},$Ae=function(t){var n=t&&t.type;return n&&F$[n]?F$[n]:null},FAe=function(t,n){return H2(n).indexOf(t)},BAe=["children","width","height","viewBox","className","style","title","desc"];function Uk(){return Uk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uk.apply(this,arguments)}function zAe(e,t){if(e==null)return{};var n=UAe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qk(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,u=zAe(e,BAe),d=a||{width:n,height:r,x:0,y:0},h=Nt("recharts-surface",i);return z.createElement("svg",Uk({},ot(u,!0,"svg"),{className:h,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),z.createElement("title",null,l),z.createElement("desc",null,c),t)}var qAe=["children","className"];function Wk(){return Wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wk.apply(this,arguments)}function WAe(e,t){if(e==null)return{};var n=VAe(e,t),r,a;
850if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rn=z.forwardRef(function(e,t){var n=e.children,r=e.className,a=WAe(e,qAe),i=Nt("recharts-layer",r);return z.createElement("g",Wk({className:i},ot(a,!0),{ref:t}),n)}),Ai=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]};function HAe(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i}var GAe=HAe,KAe=GAe;function YAe(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:KAe(e,t,n)}var XAe=YAe,QAe="\\ud800-\\udfff",ZAe="\\u0300-\\u036f",JAe="\\ufe20-\\ufe2f",eOe="\\u20d0-\\u20ff",tOe=ZAe+JAe+eOe,nOe="\\ufe0e\\ufe0f",rOe="\\u200d",sOe=RegExp("["+rOe+QAe+tOe+nOe+"]");function aOe(e){return sOe.test(e)}var sQ=aOe;function iOe(e){return e.split("")}var oOe=iOe,aQ="\\ud800-\\udfff",lOe="\\u0300-\\u036f",cOe="\\ufe20-\\ufe2f",uOe="\\u20d0-\\u20ff",dOe=lOe+cOe+uOe,hOe="\\ufe0e\\ufe0f",fOe="["+aQ+"]",Vk="["+dOe+"]",Hk="\\ud83c[\\udffb-\\udfff]",mOe="(?:"+Vk+"|"+Hk+")",iQ="[^"+aQ+"]",oQ="(?:\\ud83c[\\udde6-\\uddff]){2}",lQ="[\\ud800-\\udbff][\\udc00-\\udfff]",pOe="\\u200d",cQ=mOe+"?",uQ="["+hOe+"]?",gOe="(?:"+pOe+"(?:"+[iQ,oQ,lQ].join("|")+")"+uQ+cQ+")*",yOe=uQ+cQ+gOe,xOe="(?:"+[iQ+Vk+"?",Vk,oQ,lQ,fOe].join("|")+")",vOe=RegExp(Hk+"(?="+Hk+")|"+xOe+yOe,"g");function bOe(e){return e.match(vOe)||[]}var wOe=bOe,SOe=oOe,jOe=sQ,NOe=wOe;function _Oe(e){return jOe(e)?NOe(e):SOe(e)}var COe=_Oe,EOe=XAe,kOe=sQ,POe=COe,TOe=QX;function AOe(e){return function(t){t=TOe(t);var n=kOe(t)?POe(t):void 0,r=n?n[0]:t.charAt(0),a=n?EOe(n,1).join(""):t.slice(1);return r[e]()+a}}var OOe=AOe,ROe=OOe,IOe=ROe("toUpperCase"),MOe=IOe;const Ij=$t(MOe);function bn(e){return function(){return e}}const dQ=Math.cos,H0=Math.sin,Bi=Math.sqrt,G0=Math.PI,Mj=2*G0,Gk=Math.PI,Kk=2*Gk,uu=1e-6,DOe=Kk-uu;function hQ(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function LOe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hQ;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class $Oe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?hQ:LOe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,o){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,l=this._y1,c=r-t,u=a-n,d=o-t,h=l-n,f=d*d+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>uu)if(!(Math.abs(h*c-u*d)>uu)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-o,y=a-l,p=c*c+u*u,x=m*m+y*y,v=Math.sqrt(p),b=Math.sqrt(f),w=i*Math.tan((Gk-Math.acos((p+f-x)/(2*v*b)))/2),S=w/b,j=w/v;Math.abs(S-1)>uu&&this._append`L${t+S*d},${n+S*h}`,this._append`A${i},${i},0,0,${+(h*m>d*y)},${this._x1=t+j*c},${this._y1=n+j*u}`}}arc(t,n,r,a,i,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(a),c=r*Math.sin(a),u=t+l,d=n+c,h=1^o,f=o?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>uu||Math.abs(this._y1-d)>uu)&&this._append`L${u},${d}`,r&&(f<0&&(f=f%Kk+Kk),f>DOe?this._append`A${r},${r},0,1,${h},${t-l},${n-c}A${r},${r},0,1,${h},${this._x1=u},${this._y1=d}`:f>uu&&this._append`A${r},${r},0,${+(f>=Gk)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function G2(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new $Oe(t)}function K2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fQ(e){this._context=e}fQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Dj(e){return new fQ(e)}function mQ(e){return e[0]}function pQ(e){return e[1]}function gQ(e,t){var n=bn(!0),r=null,a=Dj,i=null,o=G2(l);e=typeof e=="function"?e:e===void 0?mQ:bn(e),t=typeof t=="function"?t:t===void 0?pQ:bn(t);function l(c){var u,d=(c=K2(c)).length,h,f=!1,m;
vendor: 10,797 bytes, line 850
850for(r==null&&(i=a(m=o())),u=0;u<=d;++u)!(u<d&&n(h=c[u],u,c))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(h,u,c),+t(h,u,c));if(m)return i=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:bn(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:bn(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:bn(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),l):a},l.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),l):r},l}function Gv(e,t,n){var r=null,a=bn(!0),i=null,o=Dj,l=null,c=G2(u);e=typeof e=="function"?e:e===void 0?mQ:bn(+e),t=typeof t=="function"?t:bn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?pQ:bn(+n);function u(h){var f,m,y,p=(h=K2(h)).length,x,v=!1,b,w=new Array(p),S=new Array(p);for(i==null&&(l=o(b=c())),f=0;f<=p;++f){if(!(f<p&&a(x=h[f],f,h))===v)if(v=!v)m=f,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),y=f-1;y>=m;--y)l.point(w[y],S[y]);l.lineEnd(),l.areaEnd()}v&&(w[f]=+e(x,f,h),S[f]=+t(x,f,h),l.point(r?+r(x,f,h):w[f],n?+n(x,f,h):S[f]))}if(b)return l=null,b+""||null}function d(){return gQ().defined(a).curve(o).context(i)}return u.x=function(h){return arguments.length?(e=typeof h=="function"?h:bn(+h),r=null,u):e},u.x0=function(h){return arguments.length?(e=typeof h=="function"?h:bn(+h),u):e},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:bn(+h),u):r},u.y=function(h){return arguments.length?(t=typeof h=="function"?h:bn(+h),n=null,u):t},u.y0=function(h){return arguments.length?(t=typeof h=="function"?h:bn(+h),u):t},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:bn(+h),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(h){return arguments.length?(a=typeof h=="function"?h:bn(!!h),u):a},u.curve=function(h){return arguments.length?(o=h,i!=null&&(l=o(i)),u):o},u.context=function(h){return arguments.length?(h==null?i=l=null:l=o(i=h),u):i},u}class yQ{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function FOe(e){return new yQ(e,!0)}function BOe(e){return new yQ(e,!1)}const Y2={draw(e,t){const n=Bi(t/G0);e.moveTo(n,0),e.arc(0,0,n,0,Mj)}},zOe={draw(e,t){const n=Bi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},xQ=Bi(1/3),UOe=xQ*2,qOe={draw(e,t){const n=Bi(t/UOe),r=n*xQ;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},WOe={draw(e,t){const n=Bi(t),r=-n/2;e.rect(r,r,n,n)}},VOe=.8908130915292852,vQ=H0(G0/10)/H0(7*G0/10),HOe=H0(Mj/10)*vQ,GOe=-dQ(Mj/10)*vQ,KOe={draw(e,t){const n=Bi(t*VOe),r=HOe*n,a=GOe*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const o=Mj*i/5,l=dQ(o),c=H0(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*a,c*r+l*a)}e.closePath()}},o_=Bi(3),YOe={draw(e,t){const n=-Bi(t/(o_*3));e.moveTo(0,n*2),e.lineTo(-o_*n,-n),e.lineTo(o_*n,-n),e.closePath()}},Ta=-.5,Aa=Bi(3)/2,Yk=1/Bi(12),XOe=(Yk/2+1)*3,QOe={draw(e,t){const n=Bi(t/XOe),r=n/2,a=n*Yk,i=r,o=n*Yk+n,l=-i,c=o;e.moveTo(r,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(Ta*r-Aa*a,Aa*r+Ta*a),e.lineTo(Ta*i-Aa*o,Aa*i+Ta*o),e.lineTo(Ta*l-Aa*c,Aa*l+Ta*c),e.lineTo(Ta*r+Aa*a,Ta*a-Aa*r),e.lineTo(Ta*i+Aa*o,Ta*o-Aa*i),e.lineTo(Ta*l+Aa*c,Ta*c-Aa*l),e.closePath()}};function ZOe(e,t){let n=null,r=G2(a);e=typeof e=="function"?e:bn(e||Y2),t=typeof t=="function"?t:bn(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:bn(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:bn(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function K0(){}function Y0(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function bQ(e){this._context=e}bQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Y0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Y0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JOe(e){return new bQ(e)}function wQ(e){this._context=e}wQ.prototype={areaStart:K0,areaEnd:K0,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Y0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e2e(e){return new wQ(e)}function SQ(e){this._context=e}SQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Y0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function t2e(e){return new SQ(e)}function jQ(e){this._context=e}jQ.prototype={areaStart:K0,areaEnd:K0,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function n2e(e){return new jQ(e)}function W$(e){return e<0?-1:1}function V$(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),o=(n-e._y1)/(a||r<0&&-0),l=(i*a+o*r)/(r+a);return(W$(i)+W$(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function H$(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function l_(e,t,n){var r=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,a+l*t,i-l,o-l*n,i,o)}function X0(e){this._context=e}X0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:l_(this,this._t0,H$(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,l_(this,H$(this,n=V$(this,e,t)),n);break;default:l_(this,this._t0,n=V$(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function NQ(e){this._context=new _Q(e)}(NQ.prototype=Object.create(X0.prototype)).point=function(e,t){X0.prototype.point.call(this,t,e)};function _Q(e){this._context=e}_Q.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function r2e(e){return new X0(e)}function s2e(e){return new NQ(e)}function CQ(e){this._context=e}CQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=G$(e),a=G$(t),i=0,o=1;o<n;++i,++o)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function G$(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,o[t]-=r*o[t-1];for(a[n-1]=o[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function a2e(e){return new CQ(e)}function Lj(e,t){this._context=e,this._t=t}Lj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 7,312 bytes, line 850
850default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function i2e(e){return new Lj(e,.5)}function o2e(e){return new Lj(e,0)}function l2e(e){return new Lj(e,1)}function Cf(e,t){if((o=e.length)>1)for(var n=1,r,a,i=e[t[0]],o,l=i.length;n<o;++n)for(a=i,i=e[t[n]],r=0;r<l;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function Xk(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function c2e(e,t){return e[t]}function u2e(e){const t=[];return t.key=e,t}function d2e(){var e=bn([]),t=Xk,n=Cf,r=c2e;function a(i){var o=Array.from(e.apply(this,arguments),u2e),l,c=o.length,u=-1,d;for(const h of i)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(h,o[l].key,u,i)]).data=h;for(l=0,d=K2(t(o));l<c;++l)o[d[l]].index=l;return n(o,d),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:bn(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:bn(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?Xk:typeof i=="function"?i:bn(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??Cf,a):n},a}function h2e(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,o;a<i;++a){for(o=n=0;n<r;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<r;++n)e[n][a][1]/=o}Cf(e,t)}}function f2e(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var o=0,l=0;o<a;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}Cf(e,t)}}function m2e(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,o;r<i;++r){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],h=d[r][1]||0,f=d[r-1][1]||0,m=(h-f)/2,y=0;y<l;++y){var p=e[t[y]],x=p[r][1]||0,v=p[r-1][1]||0;m+=x-v}c+=h,u+=m*h}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,Cf(e,t)}}function Zg(e){"@babel/helpers - typeof";return Zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zg(e)}var p2e=["type","size","sizeType"];function Qk(){return Qk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qk.apply(this,arguments)}function K$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Y$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K$(Object(n),!0).forEach(function(r){g2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g2e(e,t,n){return t=y2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y2e(e){var t=x2e(e,"string");return Zg(t)=="symbol"?t:t+""}function x2e(e,t){if(Zg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v2e(e,t){if(e==null)return{};var n=b2e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var EQ={symbolCircle:Y2,symbolCross:zOe,symbolDiamond:qOe,symbolSquare:WOe,symbolStar:KOe,symbolTriangle:YOe,symbolWye:QOe},w2e=Math.PI/180,S2e=function(t){var n="symbol".concat(Ij(t));return EQ[n]||Y2},j2e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*w2e;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},N2e=function(t,n){EQ["symbol".concat(Ij(t))]=n},X2=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=v2e(t,p2e),u=Y$(Y$({},c),{},{type:r,size:i,sizeType:l}),d=function(){var x=S2e(r),v=ZOe().type(x).size(j2e(i,l,r));return v()},h=u.className,f=u.cx,m=u.cy,y=ot(u,!0);return f===+f&&m===+m&&i===+i?z.createElement("path",Qk({},y,{className:Nt("recharts-symbols",h),transform:"translate(".concat(f,", ").concat(m,")"),d:d()})):null};X2.registerSymbol=N2e;function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function Zk(){return Zk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zk.apply(this,arguments)}function X$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X$(Object(n),!0).forEach(function(r){Jg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E2e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PQ(r.key),r)}}function k2e(e,t,n){return t&&E2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function P2e(e,t,n){return t=Q0(t),T2e(e,kQ()?Reflect.construct(t,n||[],Q0(e).constructor):t.apply(e,n))}function T2e(e,t){if(t&&(Ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A2e(e)}function A2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kQ=function(){return!!e})()}function Q0(e){return Q0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q0(e)}function O2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jk(e,t)}
850function Jk(e,t){return Jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Jk(e,t)}function Jg(e,t,n){return t=PQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PQ(e){var t=R2e(e,"string");return Ef(t)=="symbol"?t:t+""}function R2e(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oa=32,Q2=function(e){function t(){return C2e(this,t),P2e(this,t,arguments)}return O2e(t,e),k2e(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=Oa/2,o=Oa/6,l=Oa/3,c=r.inactive?a:r.color;if(r.type==="plainline")return z.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:Oa,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return z.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
851            A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
852            H`).concat(Oa,"M").concat(2*l,",").concat(i,`
853            A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return z.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Oa/8,"h").concat(Oa,"v").concat(Oa*3/4,"h").concat(-Oa,"z"),className:"recharts-legend-icon"});if(z.isValidElement(r.legendIcon)){var u=_2e({},r);return delete u.legendIcon,z.cloneElement(r.legendIcon,u)}return z.createElement(X2,{fill:c,cx:i,cy:i,size:Oa,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,o=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:Oa,height:Oa},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,y){var p=m.formatter||c,x=Nt(Jg(Jg({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",m.inactive));if(m.type==="none")return null;var v=xt(m.value)?null:m.value;Ai(!xt(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=m.inactive?u:m.color;return z.createElement("li",Zk({className:x,style:h,key:"legend-item-".concat(y)},rd(r.props,m,y)),z.createElement(qk,{width:o,height:o,viewBox:d,style:f},r.renderIcon(m)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},p?p(v,m,y):v))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,o=r.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(g.PureComponent);Jg(Q2,"displayName","Legend");Jg(Q2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var I2e=wj;function M2e(){this.__data__=new I2e,this.size=0}var D2e=M2e;function L2e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var $2e=L2e;function F2e(e){return this.__data__.get(e)}var B2e=F2e;function z2e(e){return this.__data__.has(e)}var U2e=z2e,q2e=wj,W2e=$2,V2e=F2,H2e=200;function G2e(e,t){var n=this.__data__;if(n instanceof q2e){var r=n.__data__;if(!W2e||r.length<H2e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V2e(r)}return n.set(e,t),this.size=n.size,this}var K2e=G2e,Y2e=wj,X2e=D2e,Q2e=$2e,Z2e=B2e,J2e=U2e,eRe=K2e;function Pm(e){var t=this.__data__=new Y2e(e);this.size=t.size}Pm.prototype.clear=X2e;Pm.prototype.delete=Q2e;Pm.prototype.get=Z2e;Pm.prototype.has=J2e;Pm.prototype.set=eRe;var TQ=Pm,tRe="__lodash_hash_undefined__";function nRe(e){return this.__data__.set(e,tRe),this}var rRe=nRe;function sRe(e){return this.__data__.has(e)}var aRe=sRe,iRe=F2,oRe=rRe,lRe=aRe;function Z0(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new iRe;++t<n;)this.add(e[t])}Z0.prototype.add=Z0.prototype.push=oRe;Z0.prototype.has=lRe;var AQ=Z0;function cRe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var OQ=cRe;function uRe(e,t){return e.has(t)}var RQ=uRe,dRe=AQ,hRe=OQ,fRe=RQ,mRe=1,pRe=2;function gRe(e,t,n,r,a,i){var o=n&mRe,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,m=n&pRe?new dRe:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var y=e[h],p=t[h];if(r)var x=o?r(p,y,h,t,e,i):r(y,p,h,e,t,i);if(x!==void 0){if(x)continue;f=!1;break}if(m){if(!hRe(t,function(v,b){if(!fRe(m,b)&&(y===v||a(y,v,n,r,i)))return m.push(b)})){f=!1;break}}else if(!(y===p||a(y,p,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var IQ=gRe,yRe=Co,xRe=yRe.Uint8Array,vRe=xRe;function bRe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}
vendor: 4,599 bytes, line 853
853),n}var wRe=bRe;function SRe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Z2=SRe,Q$=Sx,Z$=vRe,jRe=L2,NRe=IQ,_Re=wRe,CRe=Z2,ERe=1,kRe=2,PRe="[object Boolean]",TRe="[object Date]",ARe="[object Error]",ORe="[object Map]",RRe="[object Number]",IRe="[object RegExp]",MRe="[object Set]",DRe="[object String]",LRe="[object Symbol]",$Re="[object ArrayBuffer]",FRe="[object DataView]",J$=Q$?Q$.prototype:void 0,c_=J$?J$.valueOf:void 0;function BRe(e,t,n,r,a,i,o){switch(n){case FRe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $Re:return!(e.byteLength!=t.byteLength||!i(new Z$(e),new Z$(t)));case PRe:case TRe:case RRe:return jRe(+e,+t);case ARe:return e.name==t.name&&e.message==t.message;case IRe:case DRe:return e==t+"";case ORe:var l=_Re;case MRe:var c=r&ERe;if(l||(l=CRe),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;r|=kRe,o.set(e,t);var d=NRe(l(e),l(t),r,a,i,o);return o.delete(e),d;case LRe:if(c_)return c_.call(e)==c_.call(t)}return!1}var zRe=BRe;function URe(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var MQ=URe,qRe=MQ,WRe=Zs;function VRe(e,t,n){var r=t(e);return WRe(e)?r:qRe(r,n(e))}var HRe=VRe;function GRe(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}var KRe=GRe;function YRe(){return[]}var XRe=YRe,QRe=KRe,ZRe=XRe,JRe=Object.prototype,eIe=JRe.propertyIsEnumerable,eF=Object.getOwnPropertySymbols,tIe=eF?function(e){return e==null?[]:(e=Object(e),QRe(eF(e),function(t){return eIe.call(e,t)}))}:ZRe,nIe=tIe;function rIe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var sIe=rIe,aIe=gl,iIe=yl,oIe="[object Arguments]";function lIe(e){return iIe(e)&&aIe(e)==oIe}var cIe=lIe,tF=cIe,uIe=yl,DQ=Object.prototype,dIe=DQ.hasOwnProperty,hIe=DQ.propertyIsEnumerable,fIe=tF(function(){return arguments}())?tF:function(e){return uIe(e)&&dIe.call(e,"callee")&&!hIe.call(e,"callee")},J2=fIe,J0={exports:{}};function mIe(){return!1}var pIe=mIe;J0.exports;(function(e,t){var n=Co,r=pIe,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u})(J0,J0.exports);var LQ=J0.exports,gIe=9007199254740991,yIe=/^(?:0|[1-9]\d*)$/;function xIe(e,t){var n=typeof e;return t=t??gIe,!!t&&(n=="number"||n!="symbol"&&yIe.test(e))&&e>-1&&e%1==0&&e<t}var eR=xIe,vIe=9007199254740991;function bIe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vIe}var tR=bIe,wIe=gl,SIe=tR,jIe=yl,NIe="[object Arguments]",_Ie="[object Array]",CIe="[object Boolean]",EIe="[object Date]",kIe="[object Error]",PIe="[object Function]",TIe="[object Map]",AIe="[object Number]",OIe="[object Object]",RIe="[object RegExp]",IIe="[object Set]",MIe="[object String]",DIe="[object WeakMap]",LIe="[object ArrayBuffer]",$Ie="[object DataView]",FIe="[object Float32Array]",BIe="[object Float64Array]",zIe="[object Int8Array]",UIe="[object Int16Array]",qIe="[object Int32Array]",WIe="[object Uint8Array]",VIe="[object Uint8ClampedArray]",HIe="[object Uint16Array]",GIe="[object Uint32Array]",En={};En[FIe]=En[BIe]=En[zIe]=En[UIe]=En[qIe]=En[WIe]=En[VIe]=En[HIe]=En[GIe]=!0;En[NIe]=En[_Ie]=En[LIe]=En[CIe]=En[$Ie]=En[EIe]=En[kIe]=En[PIe]=En[TIe]=En[AIe]=En[OIe]=En[RIe]=En[IIe]=En[MIe]=En[DIe]=!1;function KIe(e){return jIe(e)&&SIe(e.length)&&!!En[wIe(e)]}var YIe=KIe;function XIe(e){return function(t){return e(t)}}var $Q=XIe,ew={exports:{}};ew.exports;(function(e,t){var n=VX,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,o=i&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ew,ew.exports);var QIe=ew.exports,ZIe=YIe,JIe=$Q,nF=QIe,rF=nF&&nF.isTypedArray,eMe=rF?JIe(rF):ZIe,FQ=eMe,tMe=sIe,nMe=J2,rMe=Zs,sMe=LQ,aMe=eR,iMe=FQ,oMe=Object.prototype,lMe=oMe.hasOwnProperty;function cMe(e,t){var n=rMe(e),r=!n&&nMe(e),a=!n&&!r&&sMe(e),i=!n&&!r&&!a&&iMe(e),o=n||r||a||i,l=o?tMe(e.length,String):[],c=l.length;for(var u in e)(t||lMe.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||aMe(u,c)))&&l.push(u);return l}var uMe=cMe,dMe=Object.prototype;function hMe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||dMe;return e===n}var fMe=hMe;function mMe(e,t){return function(n){return e(t(n))}}var BQ=mMe,pMe=BQ,gMe=pMe(Object.keys,Object),yMe=gMe,xMe=fMe,vMe=yMe,bMe=Object.prototype,wMe=bMe.hasOwnProperty;function SMe(e){if(!xMe(e))return vMe(e);var t=[];for(var n in Object(e))wMe.call(e,n)&&n!="constructor"&&t.push(n);return t}
vendor: 5,168 bytes, line 853
853var jMe=SMe,NMe=D2,_Me=tR;function CMe(e){return e!=null&&_Me(e.length)&&!NMe(e)}var _x=CMe,EMe=uMe,kMe=jMe,PMe=_x;function TMe(e){return PMe(e)?EMe(e):kMe(e)}var $j=TMe,AMe=HRe,OMe=nIe,RMe=$j;function IMe(e){return AMe(e,RMe,OMe)}var MMe=IMe,sF=MMe,DMe=1,LMe=Object.prototype,$Me=LMe.hasOwnProperty;function FMe(e,t,n,r,a,i){var o=n&DMe,l=sF(e),c=l.length,u=sF(t),d=u.length;if(c!=d&&!o)return!1;for(var h=c;h--;){var f=l[h];if(!(o?f in t:$Me.call(t,f)))return!1}var m=i.get(e),y=i.get(t);if(m&&y)return m==t&&y==e;var p=!0;i.set(e,t),i.set(t,e);for(var x=o;++h<c;){f=l[h];var v=e[f],b=t[f];if(r)var w=o?r(b,v,f,t,e,i):r(v,b,f,e,t,i);if(!(w===void 0?v===b||a(v,b,n,r,i):w)){p=!1;break}x||(x=f=="constructor")}if(p&&!x){var S=e.constructor,j=t.constructor;S!=j&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof j=="function"&&j instanceof j)&&(p=!1)}return i.delete(e),i.delete(t),p}var BMe=FMe,zMe=jd,UMe=Co,qMe=zMe(UMe,"DataView"),WMe=qMe,VMe=jd,HMe=Co,GMe=VMe(HMe,"Promise"),KMe=GMe,YMe=jd,XMe=Co,QMe=YMe(XMe,"Set"),zQ=QMe,ZMe=jd,JMe=Co,eDe=ZMe(JMe,"WeakMap"),tDe=eDe,eP=WMe,tP=$2,nP=KMe,rP=zQ,sP=tDe,UQ=gl,Tm=GX,aF="[object Map]",nDe="[object Object]",iF="[object Promise]",oF="[object Set]",lF="[object WeakMap]",cF="[object DataView]",rDe=Tm(eP),sDe=Tm(tP),aDe=Tm(nP),iDe=Tm(rP),oDe=Tm(sP),du=UQ;(eP&&du(new eP(new ArrayBuffer(1)))!=cF||tP&&du(new tP)!=aF||nP&&du(nP.resolve())!=iF||rP&&du(new rP)!=oF||sP&&du(new sP)!=lF)&&(du=function(e){var t=UQ(e),n=t==nDe?e.constructor:void 0,r=n?Tm(n):"";if(r)switch(r){case rDe:return cF;case sDe:return aF;case aDe:return iF;case iDe:return oF;case oDe:return lF}return t});var lDe=du,u_=TQ,cDe=IQ,uDe=zRe,dDe=BMe,uF=lDe,dF=Zs,hF=LQ,hDe=FQ,fDe=1,fF="[object Arguments]",mF="[object Array]",Kv="[object Object]",mDe=Object.prototype,pF=mDe.hasOwnProperty;function pDe(e,t,n,r,a,i){var o=dF(e),l=dF(t),c=o?mF:uF(e),u=l?mF:uF(t);c=c==fF?Kv:c,u=u==fF?Kv:u;var d=c==Kv,h=u==Kv,f=c==u;if(f&&hF(e)){if(!hF(t))return!1;o=!0,d=!1}if(f&&!d)return i||(i=new u_),o||hDe(e)?cDe(e,t,n,r,a,i):uDe(e,t,c,n,r,a,i);if(!(n&fDe)){var m=d&&pF.call(e,"__wrapped__"),y=h&&pF.call(t,"__wrapped__");if(m||y){var p=m?e.value():e,x=y?t.value():t;return i||(i=new u_),a(p,x,n,r,i)}}return f?(i||(i=new u_),dDe(e,t,n,r,a,i)):!1}var gDe=pDe,yDe=gDe,gF=yl;function qQ(e,t,n,r,a){return e===t?!0:e==null||t==null||!gF(e)&&!gF(t)?e!==e&&t!==t:yDe(e,t,n,r,qQ,a)}var nR=qQ,xDe=TQ,vDe=nR,bDe=1,wDe=2;function SDe(e,t,n,r){var a=n.length,i=a,o=!r;if(e==null)return!i;for(e=Object(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){l=n[a];var c=l[0],u=e[c],d=l[1];if(o&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new xDe;if(r)var f=r(u,d,c,e,t,h);if(!(f===void 0?vDe(d,u,bDe|wDe,r,h):f))return!1}}return!0}var jDe=SDe,NDe=Hc;function _De(e){return e===e&&!NDe(e)}var WQ=_De,CDe=WQ,EDe=$j;function kDe(e){for(var t=EDe(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,CDe(a)]}return t}var PDe=kDe;function TDe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var VQ=TDe,ADe=jDe,ODe=PDe,RDe=VQ;function IDe(e){var t=ODe(e);return t.length==1&&t[0][2]?RDe(t[0][0],t[0][1]):function(n){return n===e||ADe(n,e,t)}}var MDe=IDe;function DDe(e,t){return e!=null&&t in Object(e)}var LDe=DDe,$De=ZX,FDe=J2,BDe=Zs,zDe=eR,UDe=tR,qDe=jj;function WDe(e,t,n){t=$De(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var o=qDe(t[r]);if(!(i=e!=null&&n(e,o)))break;e=e[o]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&UDe(a)&&zDe(o,a)&&(BDe(e)||FDe(e)))}var VDe=WDe,HDe=LDe,GDe=VDe;function KDe(e,t){return e!=null&&GDe(e,t,HDe)}var YDe=KDe,XDe=nR,QDe=JX,ZDe=YDe,JDe=M2,e4e=WQ,t4e=VQ,n4e=jj,r4e=1,s4e=2;function a4e(e,t){return JDe(e)&&e4e(t)?t4e(n4e(e),t):function(n){var r=QDe(n,e);return r===void 0&&r===t?ZDe(n,e):XDe(t,r,r4e|s4e)}}var i4e=a4e;function o4e(e){return e}var Am=o4e;function l4e(e){return function(t){return t==null?void 0:t[e]}}var c4e=l4e,u4e=U2;function d4e(e){return function(t){return u4e(t,e)}}var h4e=d4e,f4e=c4e,m4e=h4e,p4e=M2,g4e=jj;function y4e(e){return p4e(e)?f4e(g4e(e)):m4e(e)}var x4e=y4e,v4e=MDe,b4e=i4e,w4e=Am,S4e=Zs,j4e=x4e;function N4e(e){return typeof e=="function"?e:e==null?w4e:typeof e=="object"?S4e(e)?b4e(e[0],e[1]):v4e(e):j4e(e)}var Eo=N4e;function _4e(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var HQ=_4e;function C4e(e){return e!==e}var E4e=C4e;function k4e(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var P4e=k4e,T4e=HQ,A4e=E4e,O4e=P4e;function R4e(e,t,n){return t===t?O4e(e,t,n):T4e(e,A4e,n)}var I4e=R4e,M4e=I4e;function D4e(e,t){var n=e==null?0:e.length;return!!n&&M4e(e,t,0)>-1}var L4e=D4e;function $4e(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var F4e=$4e;function B4e(){}var z4e=B4e,d_=zQ,U4e=z4e,q4e=Z2,W4e=1/0,V4e=d_&&1/q4e(new d_([,-0]))[1]==W4e?function(e){return new d_(e)}:U4e,H4e=V4e,G4e=AQ,K4e=L4e,Y4e=F4e,X4e=RQ,Q4e=H4e,Z4e=Z2,J4e=200;function eLe(e,t,n){var r=-1,a=K4e,i=e.length,o=!0,l=[],c=l;if(n)o=!1,a=Y4e;else if(i>=J4e){var u=t?null:Q4e(e);if(u)return Z4e(u);o=!1,a=X4e,c=new G4e}else c=t?[]:l;e:for(;++r<i;
vendor: 20,646 bytes, lines 853-854
853){var d=e[r],h=t?t(d):d;if(d=n||d!==0?d:0,o&&h===h){for(var f=c.length;f--;)if(c[f]===h)continue e;t&&c.push(h),l.push(d)}else a(c,h,n)||(c!==l&&c.push(h),l.push(d))}return l}var tLe=eLe,nLe=Eo,rLe=tLe;function sLe(e,t){return e&&e.length?rLe(e,nLe(t)):[]}var aLe=sLe;const yF=$t(aLe);function GQ(e,t,n){return t===!0?yF(e,n):xt(t)?yF(e,t):e}function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}var iLe=["ref"];function xF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xF(Object(n),!0).forEach(function(r){Fj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YQ(r.key),r)}}function lLe(e,t,n){return t&&vF(e.prototype,t),n&&vF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cLe(e,t,n){return t=tw(t),uLe(e,KQ()?Reflect.construct(t,n||[],tw(e).constructor):t.apply(e,n))}function uLe(e,t){if(t&&(kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dLe(e)}function dLe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KQ=function(){return!!e})()}function tw(e){return tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tw(e)}function hLe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aP(e,t)}function aP(e,t){return aP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},aP(e,t)}function Fj(e,t,n){return t=YQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YQ(e){var t=fLe(e,"string");return kf(t)=="symbol"?t:t+""}function fLe(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mLe(e,t){if(e==null)return{};var n=pLe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gLe(e){return e.value}function yLe(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var n=mLe(t,iLe);return z.createElement(Q2,n)}var bF=1,Uu=function(e){function t(){var n;oLe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=cLe(this,t,[].concat(a)),Fj(n,"lastBoundingBox",{width:-1,height:-1}),n}return hLe(t,e),lLe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>bF||Math.abs(a.height-this.lastBoundingBox.height)>bF)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ao({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,o=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,d=a.chartHeight,h,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();h={left:((u||0)-m.width)/2}}else h=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var y=this.getBBoxSnapshot();f={top:((d||0)-y.height)/2}}else f=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Ao(Ao({},h),f)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,o=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,h=Ao(Ao({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return z.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(m){r.wrapperNode=m}},yLe(i,Ao(Ao({},this.props),{},{payload:GQ(d,u,gLe)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Ao(Ao({},this.defaultProps),r.props),o=i.layout;return o==="vertical"&&ke(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||a}:null}}])}(g.PureComponent);Fj(Uu,"displayName","Legend");Fj(Uu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var wF=Sx,xLe=J2,vLe=Zs,SF=wF?wF.isConcatSpreadable:void 0;function bLe(e){return vLe(e)||xLe(e)||!!(SF&&e&&e[SF])}var wLe=bLe,SLe=MQ,jLe=wLe;function XQ(e,t,n,r,a){var i=-1,o=e.length;for(n||(n=jLe),a||(a=[]);++i<o;){var l=e[i];t>0&&n(l)?t>1?XQ(l,t-1,n,r,a):SLe(a,l):r||(a[a.length]=l)}return a}var QQ=XQ;function NLe(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var c=o[e?l:++a];if(n(i[c],c,i)===!1)break}return t}}var _Le=NLe,CLe=_Le,ELe=CLe(),kLe=ELe,PLe=kLe,TLe=$j;function ALe(e,t){return e&&PLe(e,t,TLe)}var ZQ=ALe,OLe=_x;function RLe(e,t){return function(n,r){if(n==null)return n;if(!OLe(n))return e(n,r);for(var a=n.length,i=t?a:-1,o=Object(n);(t?i--:++i<a)&&r(o[i],i,o)!==!1;);return n}}var ILe=RLe,MLe=ZQ,DLe=ILe,LLe=DLe(MLe),rR=LLe,$Le=rR,FLe=_x;function BLe(e,t){var n=-1,r=FLe(e)?Array(e.length):[];return $Le(e,function(a,i,o){r[++n]=t(a,i,o)}),r}var JQ=BLe;function zLe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var ULe=zLe,jF=jm;function qLe(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,i=jF(e),o=t!==void 0,l=t===null,c=t===t,u=jF(t);if(!l&&!u&&!i&&e>t||i&&o&&c&&!l&&!u||r&&o&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e<t||u&&n&&a&&!r&&!i||l&&n&&a||!o&&a||!c)return-1}return 0}var WLe=qLe,VLe=WLe;function HLe(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,o=a.length,l=n.length;++r<o;){var c=VLe(a[r],i[r]);if(c){if(r>=l)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var GLe=HLe,h_=z2,KLe=U2,YLe=Eo,XLe=JQ,QLe=ULe,ZLe=$Q,JLe=GLe,e$e=Am,t$e=Zs;function n$e(e,t,n){t.length?t=h_(t,function(i){return t$e(i)?function(o){return KLe(o,i.length===1?i[0]:i)}:i}):t=[e$e];var r=-1;t=h_(t,ZLe(YLe));var a=XLe(e,function(i,o,l){var c=h_(t,function(u){return u(i)});return{criteria:c,index:++r,value:i}});return QLe(a,function(i,o){return JLe(i,o,n)})}var r$e=n$e;function s$e(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var a$e=s$e,i$e=a$e,NF=Math.max;function o$e(e,t,n){return t=NF(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=NF(r.length-t,0),o=Array(i);++a<i;)o[a]=r[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=r[a];return l[t]=n(o),i$e(e,this,l)}}var l$e=o$e;function c$e(e){return function(){return e}}var u$e=c$e,d$e=jd,h$e=function(){try{var e=d$e(Object,"defineProperty");return e({},"",{}),e}catch{}}(),eZ=h$e,f$e=u$e,_F=eZ,m$e=Am,p$e=_F?function(e,t){return _F(e,"toString",{configurable:!0,enumerable:!1,value:f$e(t),writable:!0})}:m$e,g$e=p$e,y$e=800,x$e=16,v$e=Date.now;function b$e(e){var t=0,n=0;return function(){var r=v$e(),a=x$e-(r-n);if(n=r,a>0){if(++t>=y$e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var w$e=b$e,S$e=g$e,j$e=w$e,N$e=j$e(S$e),_$e=N$e,C$e=Am,E$e=l$e,k$e=_$e;function P$e(e,t){return k$e(E$e(e,t,C$e),e+"")}var T$e=P$e,A$e=L2,O$e=_x,R$e=eR,I$e=Hc;function M$e(e,t,n){if(!I$e(n))return!1;var r=typeof t;return(r=="number"?O$e(n)&&R$e(t,n.length):r=="string"&&t in n)?A$e(n[t],e):!1}var Bj=M$e,D$e=QQ,L$e=r$e,$$e=T$e,CF=Bj,F$e=$$e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&CF(e,t[0],t[1])?t=[]:n>2&&CF(t[0],t[1],t[2])&&(t=[t[0]]),L$e(e,D$e(t,1),[])}),B$e=F$e;const sR=$t(B$e);function ey(e){"@babel/helpers - typeof";return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}function iP(){return iP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iP.apply(this,arguments)}function z$e(e,t){return V$e(e)||W$e(e,t)||q$e(e,t)||U$e()}function U$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
854In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q$e(e,t){if(e){if(typeof e=="string")return EF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EF(e,t)}}function EF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W$e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function V$e(e){if(Array.isArray(e))return e}function kF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function f_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kF(Object(n),!0).forEach(function(r){H$e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H$e(e,t,n){return t=G$e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G$e(e){var t=K$e(e,"string");return ey(t)=="symbol"?t:t+""}function K$e(e,t){if(ey(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ey(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y$e(e){return Array.isArray(e)&&Sr(e[0])&&Sr(e[1])?e.join(" ~ "):e}var X$e=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,h=t.formatter,f=t.itemSorter,m=t.wrapperClassName,y=t.labelClassName,p=t.label,x=t.labelFormatter,v=t.accessibilityLayer,b=v===void 0?!1:v,w=function(){if(d&&d.length){var I={padding:0,margin:0},B=(f?sR(d,f):d).map(function($,q){if($.type==="none")return null;var L=f_({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},l),k=$.formatter||h||Y$e,T=$.value,F=$.name,O=T,E=F;if(k&&O!=null&&E!=null){var D=k(T,F,$,q,d);if(Array.isArray(D)){var M=z$e(D,2);O=M[0],E=M[1]}else O=D}return z.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(q),style:L},Sr(E)?z.createElement("span",{className:"recharts-tooltip-item-name"},E):null,Sr(E)?z.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,z.createElement("span",{className:"recharts-tooltip-item-value"},O),z.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return z.createElement("ul",{className:"recharts-tooltip-item-list",style:I},B)}return null},S=f_({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),j=f_({margin:0},u),N=!jt(p),C=N?p:"",_=Nt("recharts-default-tooltip",m),A=Nt("recharts-tooltip-label",y);N&&x&&d!==void 0&&d!==null&&(C=x(p,d));var P=b?{role:"status","aria-live":"assertive"}:{};return z.createElement("div",iP({className:_,style:S},P),z.createElement("p",{className:A,style:j},z.isValidElement(C)?C:"".concat(C)),w())};function ty(e){"@babel/helpers - typeof";return ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ty(e)}function Yv(e,t,n){return t=Q$e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q$e(e){var t=Z$e(e,"string");return ty(t)=="symbol"?t:t+""}function Z$e(e,t){if(ty(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ap="recharts-tooltip-wrapper",J$e={visibility:"hidden"};function eFe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Nt(ap,Yv(Yv(Yv(Yv({},"".concat(ap,"-right"),ke(n)&&t&&ke(t.x)&&n>=t.x),"".concat(ap,"-left"),ke(n)&&t&&ke(t.x)&&n<t.x),"".concat(ap,"-bottom"),ke(r)&&t&&ke(t.y)&&r>=t.y),"".concat(ap,"-top"),ke(r)&&t&&ke(t.y)&&r<t.y))}function PF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&ke(i[r]))return i[r];var d=n[r]-l-a,h=n[r]+a;if(t[r])return o[r]?d:h;if(o[r]){var f=d,m=c[r];return f<m?Math.max(h,c[r]):Math.max(d,c[r])}var y=h+l,p=c[r]+u;return y>p?Math.max(d,c[r]):Math.max(h,c[r])}function tFe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function nFe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,h;return o.height>0&&o.width>0&&n?(d=PF({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),h=PF({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=tFe({translateX:d,translateY:h,useTranslate3d:l})):u=J$e,{cssProperties:u,cssClasses:eFe({translateX:d,translateY:h,coordinate:n})}}function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function TF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TF(Object(n),!0).forEach(function(r){lP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sFe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nZ(r.key),r)}}function aFe(e,t,n){return t&&sFe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iFe(e,t,n){return t=nw(t),oFe(e,tZ()?Reflect.construct(t,n||[],nw(e).constructor):t.apply(e,n))}function oFe(e,t){if(t&&(Pf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lFe(e)}function lFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tZ=function(){return!!e})()}function nw(e){return nw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nw(e)}function cFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oP(e,t)}function oP(e,t){return oP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},oP(e,t)}function lP(e,t,n){return t=nZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nZ(e){var t=uFe(e,"string");return Pf(t)=="symbol"?t:t+""}function uFe(e,t){if(Pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OF=1,dFe=function(e){function t(){var n;rFe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=iFe(this,t,[].concat(a)),lP(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),lP(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),n}return cFe(t,e),aFe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>OF||Math.abs(r.height-this.state.lastBoundingBox.height)>OF)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,d=a.coordinate,h=a.hasPayload,f=a.isAnimationActive,m=a.offset,y=a.position,p=a.reverseDirection,x=a.useTranslate3d,v=a.viewB
854ox,b=a.wrapperStyle,w=nFe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:m,position:y,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:v}),S=w.cssClasses,j=w.cssProperties,N=AF(AF({transition:f&&i?"transform ".concat(l,"ms ").concat(c):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&h?"visible":"hidden",position:"absolute",top:0,left:0},b);return z.createElement("div",{tabIndex:-1,className:S,style:N,ref:function(_){r.wrapperNode=_}},u)}}])}(g.PureComponent),hFe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},mo={isSsr:hFe(),get:function(t){return mo[t]},set:function(t,n){if(typeof t=="string")mo[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(a){mo[a]=t[a]})}}};function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function RF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function IF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RF(Object(n),!0).forEach(function(r){aR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mFe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sZ(r.key),r)}}function pFe(e,t,n){return t&&mFe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gFe(e,t,n){return t=rw(t),yFe(e,rZ()?Reflect.construct(t,n||[],rw(e).constructor):t.apply(e,n))}function yFe(e,t){if(t&&(Tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xFe(e)}function xFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rZ=function(){return!!e})()}
vendor: 16,017 bytes, lines 854-860
854function rw(e){return rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rw(e)}function vFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cP(e,t)}function cP(e,t){return cP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},cP(e,t)}function aR(e,t,n){return t=sZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sZ(e){var t=bFe(e,"string");return Tf(t)=="symbol"?t:t+""}function bFe(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wFe(e){return e.dataKey}function SFe(e,t){return z.isValidElement(e)?z.cloneElement(e,t):typeof e=="function"?z.createElement(e,t):z.createElement(X$e,t)}var Dr=function(e){function t(){return fFe(this,t),gFe(this,t,arguments)}return vFe(t,e),pFe(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,d=a.coordinate,h=a.filterNull,f=a.isAnimationActive,m=a.offset,y=a.payload,p=a.payloadUniqBy,x=a.position,v=a.reverseDirection,b=a.useTranslate3d,w=a.viewBox,S=a.wrapperStyle,j=y??[];h&&j.length&&(j=GQ(y.filter(function(C){return C.value!=null&&(C.hide!==!0||r.props.includeHidden)}),p,wFe));var N=j.length>0;return z.createElement(dFe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:f,active:i,coordinate:d,hasPayload:N,offset:m,position:x,reverseDirection:v,useTranslate3d:b,viewBox:w,wrapperStyle:S},SFe(u,IF(IF({},this.props),{},{payload:j})))}}])}(g.PureComponent);aR(Dr,"displayName","Tooltip");aR(Dr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!mo.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var jFe=Co,NFe=function(){return jFe.Date.now()},_Fe=NFe,CFe=/\s/;function EFe(e){for(var t=e.length;t--&&CFe.test(e.charAt(t)););return t}var kFe=EFe,PFe=kFe,TFe=/^\s+/;function AFe(e){return e&&e.slice(0,PFe(e)+1).replace(TFe,"")}var OFe=AFe,RFe=OFe,MF=Hc,IFe=jm,DF=NaN,MFe=/^[-+]0x[0-9a-f]+$/i,DFe=/^0b[01]+$/i,LFe=/^0o[0-7]+$/i,$Fe=parseInt;function FFe(e){if(typeof e=="number")return e;if(IFe(e))return DF;if(MF(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=MF(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=RFe(e);var n=DFe.test(e);return n||LFe.test(e)?$Fe(e.slice(2),n?2:8):MFe.test(e)?DF:+e}var aZ=FFe,BFe=Hc,m_=_Fe,LF=aZ,zFe="Expected a function",UFe=Math.max,qFe=Math.min;function WFe(e,t,n){var r,a,i,o,l,c,u=0,d=!1,h=!1,f=!0;if(typeof e!="function")throw new TypeError(zFe);t=LF(t)||0,BFe(n)&&(d=!!n.leading,h="maxWait"in n,i=h?UFe(LF(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function m(N){var C=r,_=a;return r=a=void 0,u=N,o=e.apply(_,C),o}function y(N){return u=N,l=setTimeout(v,t),d?m(N):o}function p(N){var C=N-c,_=N-u,A=t-C;return h?qFe(A,i-_):A}function x(N){var C=N-c,_=N-u;return c===void 0||C>=t||C<0||h&&_>=i}function v(){var N=m_();if(x(N))return b(N);l=setTimeout(v,p(N))}function b(N){return l=void 0,f&&r?m(N):(r=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),u=0,r=c=a=l=void 0}function S(){return l===void 0?o:b(m_())}function j(){var N=m_(),C=x(N);if(r=arguments,a=this,c=N,C){if(l===void 0)return y(c);if(h)return clearTimeout(l),l=setTimeout(v,t),m(c)}return l===void 0&&(l=setTimeout(v,t)),o}return j.cancel=w,j.flush=S,j}var VFe=WFe,HFe=VFe,GFe=Hc,KFe="Expected a function";function YFe(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(KFe);return GFe(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),HFe(e,t,{leading:r,maxWait:t,trailing:a})}var XFe=YFe;const iZ=$t(XFe);function ny(e){"@babel/helpers - typeof";return ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ny(e)}function $F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$F(Object(n),!0).forEach(function(r){QFe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$F(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QFe(e,t,n){return t=ZFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZFe(e){var t=JFe(e,"string");return ny(t)=="symbol"?t:t+""}function JFe(e,t){if(ny(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ny(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e3e(e,t){return s3e(e)||r3e(e,t)||n3e(e,t)||t3e()}function t3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
855In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n3e(e,t){if(e){if(typeof e=="string")return FF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FF(e,t)}}function FF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r3e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function s3e(e){if(Array.isArray(e))return e}var Oc=g.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,o=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,h=e.minHeight,f=e.maxHeight,m=e.children,y=e.debounce,p=y===void 0?0:y,x=e.id,v=e.className,b=e.onResize,w=e.style,S=w===void 0?{}:w,j=g.useRef(null),N=g.useRef();N.current=b,g.useImperativeHandle(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var C=g.useState({containerWidth:a.width,containerHeight:a.height}),_=e3e(C,2),A=_[0],P=_[1],R=g.useCallback(function(B,$){P(function(q){var L=Math.round(B),k=Math.round($);return q.containerWidth===L&&q.containerHeight===k?q:{containerWidth:L,containerHeight:k}})},[]);g.useEffect(function(){var B=function(F){var O,E=F[0].contentRect,D=E.width,M=E.height;R(D,M),(O=N.current)===null||O===void 0||O.call(N,D,M)};p>0&&(B=iZ(B,p,{trailing:!0,leading:!1}));var $=new ResizeObserver(B),q=j.current.getBoundingClientRect(),L=q.width,k=q.height;return R(L,k),$.observe(j.current),function(){$.disconnect()}},[R,p]);var I=g.useMemo(function(){var B=A.containerWidth,$=A.containerHeight;if(B<0||$<0)return null;Ai(ju(o)||ju(c),`The width(%s) and height(%s) are both fixed numbers,
856       maybe you don't need to use a ResponsiveContainer.`,o,c),Ai(!n||n>0,"The aspect(%s) must be greater than zero.",n);var q=ju(o)?B:o,L=ju(c)?$:c;n&&n>0&&(q?L=q/n:L&&(q=L*n),f&&L>f&&(L=f)),Ai(q>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
857       please check the style of container, or the props width(%s) and height(%s),
858       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
859       height and width.`,q,L,o,c,d,h,n);var k=!Array.isArray(m)&&Yo(m.type).endsWith("Chart");return z.Children.map(m,function(T){return nQ.isElement(T)?g.cloneElement(T,Xv({width:q,height:L},k?{style:Xv({height:"100%",width:"100%",maxHeight:L,maxWidth:q},T.props.style)}:{})):T})},[n,m,c,f,h,d,A,o]);return z.createElement("div",{id:x?"".concat(x):void 0,className:Nt("recharts-responsive-container",v),style:Xv(Xv({},S),{},{width:o,height:c,minWidth:d,minHeight:h,maxHeight:f}),ref:j},I)}),Om=function(t){return null};Om.displayName="Cell";function ry(e){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function BF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BF(Object(n),!0).forEach(function(r){a3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a3e(e,t,n){return t=i3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i3e(e){var t=o3e(e,"string");return ry(t)=="symbol"?t:t+""}function o3e(e,t){if(ry(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ry(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kd={widthCache:{},cacheCount:0},l3e=2e3,c3e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},zF="recharts_measurement_span";function u3e(e){var t=uP({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Zp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||mo.isSsr)return{width:0,height:0};var r=u3e(n),a=JSON.stringify({text:t,copyStyle:r});if(Kd.widthCache[a])return Kd.widthCache[a];try{var i=document.getElementById(zF);i||(i=document.createElement("span"),i.setAttribute("id",zF),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=uP(uP({},c3e),r);Object.assign(i.style,o),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Kd.widthCache[a]=c,++Kd.cacheCount>l3e&&(Kd.cacheCount=0,Kd.widthCache={}),c}catch{return{width:0,height:0}}},d3e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function sy(e){"@babel/helpers - typeof";return sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sy(e)}function sw(e,t){return p3e(e)||m3e(e,t)||f3e(e,t)||h3e()}function h3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
860In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f3e(e,t){if(e){if(typeof e=="string")return UF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UF(e,t)}}function UF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m3e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function p3e(e){if(Array.isArray(e))return e}function g3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x3e(r.key),r)}}function y3e(e,t,n){return t&&qF(e.prototype,t),n&&qF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x3e(e){var t=v3e(e,"string");return sy(t)=="symbol"?t:t+""}function v3e(e,t){if(sy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var WF=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VF=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,b3e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,w3e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,oZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},S3e=Object.keys(oZ),_h="NaN";function j3e(e,t){return e*oZ[t]}var Qv=function(){function e(t,n){g3e(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!b3e.test(n)&&(this.num=NaN,this.unit=""),S3e.includes(n)&&(this.num=j3e(t,n),this.unit="px")}return y3e(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=w3e.exec(n))!==null&&r!==void 0?r:[],i=sw(a,3),o=i[1],l=i[2];return new e(parseFloat(o),l??"")}}])}();function lZ(e){if(e.includes(_h))return _h;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=WF.exec(t))!==null&&n!==void 0?n:[],a=sw(r,4),i=a[1],o=a[2],l=a[3],c=Qv.parse(i??""),u=Qv.parse(l??""),d=o==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return _h;t=t.replace(WF,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,f=(h=VF.exec(t))!==null&&h!==void 0?h:[],m=sw(f,4),y=m[1],p=m[2],x=m[3],v=Qv.parse(y??""),b=Qv.parse(x??""),w=p==="+"?v.add(b):v.subtract(b);if(w.isNaN())return _h;t=t.replace(VF,w.toString())}return t}var HF=/\(([^()]*)\)/;function N3e(e){for(var t=e;t.includes("(");){var n=HF.exec(t),r=sw(n,2),a=r[1];t=t.replace(HF,lZ(a))}return t}function _3e(e){var t=e.replace(/\s+/g,"");return t=N3e(t),t=lZ(t),t}function C3e(e){try{return _3e(e)}catch{return _h}}function p_(e){var t=C3e(e.slice(5,-1));return t===_h?"":t}var E3e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],k3e=["dx","dy","angle","className","breakAll"];function dP(){return dP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dP.apply(this,arguments)}function GF(e,t){if(e==null)return{};var n=P3e(e,t),r,a;
860if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function KF(e,t){return R3e(e)||O3e(e,t)||A3e(e,t)||T3e()}function T3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
861In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A3e(e,t){if(e){if(typeof e=="string")return YF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YF(e,t)}}function YF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O3e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function R3e(e){if(Array.isArray(e))return e}var cZ=/[ \f\n\r\t\v\u2028\u2029]+/,uZ=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];jt(n)||(r?i=n.toString().split(""):i=n.toString().split(cZ));var o=i.map(function(c){return{word:c,width:Zp(c,a).width}}),l=r?0:Zp(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},I3e=function(t,n,r,a,i){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=ke(o),h=l,f=function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q.reduce(function(L,k){var T=k.word,F=k.width,O=L[L.length-1];if(O&&(a==null||i||O.width+F+r<Number(a)))O.words.push(T),O.width+=F+r;else{var E={words:[T],width:F};L.push(E)}return L},[])},m=f(n),y=function(q){return q.reduce(function(L,k){return L.width>k.width?L:k})};if(!d)return m;for(var p="…",x=function(q){var L=h.slice(0,q),k=uZ({breakAll:u,style:c,children:L+p}).wordsWithComputedWidth,T=f(k),F=T.length>o||y(T).width>Number(a);return[F,T]},v=0,b=h.length-1,w=0,S;v<=b&&w<=h.length-1;){var j=Math.floor((v+b)/2),N=j-1,C=x(N),_=KF(C,2),A=_[0],P=_[1],R=x(j),I=KF(R,1),B=I[0];if(!A&&!B&&(v=j+1),A&&B&&(b=j-1),!A&&B){S=P;break}w++}return S||m},XF=function(t){var n=jt(t)?[]:t.toString().split(cZ);return[{words:n}]},M3e=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!mo.isSsr){var c,u,d=uZ({breakAll:o,children:a,style:i});if(d){var h=d.wordsWithComputedWidth,f=d.spaceWidth;c=h,u=f}else return XF(a);return I3e({breakAll:o,children:a,maxLines:l,style:i},c,u,n,r)}return XF(a)},QF="#808080",sd=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,h=d===void 0?!1:d,f=t.textAnchor,m=f===void 0?"start":f,y=t.verticalAnchor,p=y===void 0?"end":y,x=t.fill,v=x===void 0?QF:x,b=GF(t,E3e),w=g.useMemo(function(){return M3e({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:h,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,h,b.style,b.width]),S=b.dx,j=b.dy,N=b.angle,C=b.className,_=b.breakAll,A=GF(b,k3e);if(!Sr(r)||!Sr(i))return null;var P=r+(ke(S)?S:0),R=i+(ke(j)?j:0),I;switch(p){case"start":I=p_("calc(".concat(u,")"));break;case"middle":I=p_("calc(".concat((w.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:I=p_("calc(".concat(w.length-1," * -").concat(l,")"));break}var B=[];if(h){var $=w[0].width,q=b.width;B.push("scale(".concat((ke(q)?q/$:1)/$,")"))}return N&&B.push("rotate(".concat(N,", ").concat(P,", ").concat(R,")")),B.length&&(A.transform=B.join(" ")),z.createElement("text",dP({},ot(A,!0),{x:P,y:R,className:Nt("recharts-text",C),textAnchor:m,fill:v.includes("url")?QF:v}),w.map(function(L,k){var T=L.words.join(_?"":" ");return z.createElement("tspan",{x:P,dy:k===0?I:l,key:"".concat(T,"-").concat(k)},T)}))};function bc(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function D3e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iR(e){let t,n,r;e.length!==2?(t=bc,n=(l,c)=>bc(e(l),c),r=(l,c)=>e(l)-c):(t=e===bc||e===D3e?e:L3e,n=e,r=e);function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const h=u+d>>>1;n(l[h],c)<0?u=h+1:d=h}while(u<d)}return u}function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const h=u+d>>>1;n(l[h],c)<=0?u=h+1:d=h}while(u<d)}return u}function o(l,c,u=0,d=l.length){const h=a(l,c,u,d-1);return h>u&&r(l[h-1],c)>-r(l[h],c)?h-1:h}return{left:a,center:o,right:i}}function L3e(){return 0}function dZ(e){return e===null?NaN:+e}function*$3e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const F3e=iR(bc),Cx=F3e.right;iR(dZ).center;class ZF extends Map{constructor(t,n=U3e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(JF(this,t))}has(t){return super.has(JF(this,t))}set(t,n){return super.set(B3e(this,t),n)}delete(t){return super.delete(z3e(this,t))}}function JF({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function B3e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function z3e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function U3e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function q3e(e=bc){if(e===bc)return hZ;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function hZ(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const W3e=Math.sqrt(50),V3e=Math.sqrt(10),H3e=Math.sqrt(2);function aw(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),o=i>=W3e?10:i>=V3e?5:i>=H3e?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?aw(e,t,n*2):[l,c,u]}function hP(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,o]=r?aw(t,e,n):aw(e,t,n);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(i-u)/-o;else for(let u=0;u<l;++u)c[u]=(i-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(a+u)/-o;else for(let u=0;u<l;++u)c[u]=(a+u)*o;return c}function fP(e,t,n){return t=+t,e=+e,n=+n,aw(e,t,n)[2]}function mP(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?fP(t,e,n):fP(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function e3(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function t3(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function fZ(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?hZ:q3e(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),h=.5*Math.exp(2*d/3),f=.5*Math.sqrt(d*h*(c-h)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*h/c+f)),y=Math.min(r,Math.floor(t+(c-u)*h/c+f));fZ(e,t,m,y,a)}const i=e[t];let o=n,l=r;
vendor: 11,206 bytes, line 861
861for(ip(e,n,t),a(e[r],i)>0&&ip(e,n,r);o<l;){for(ip(e,o,l),++o,--l;a(e[o],i)<0;)++o;for(;a(e[l],i)>0;)--l}a(e[n],i)===0?ip(e,n,l):(++l,ip(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function ip(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function G3e(e,t,n){if(e=Float64Array.from($3e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return t3(e);if(t>=1)return e3(e);var r,a=(r-1)*t,i=Math.floor(a),o=e3(fZ(e,i).subarray(0,i+1)),l=t3(e.subarray(i+1));return o+(l-o)*(a-i)}}function K3e(e,t,n=dZ){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return o+(l-o)*(a-i)}}function Y3e(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function oi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xl(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const pP=Symbol("implicit");function oR(){var e=new ZF,t=[],n=[],r=pP;function a(i){let o=e.get(i);if(o===void 0){if(r!==pP)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new ZF;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return oR(t,n).unknown(r)},oi.apply(a,arguments),a}function ay(){var e=oR().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,o,l=!1,c=0,u=0,d=.5;delete e.unknown;function h(){var f=t().length,m=a<r,y=m?a:r,p=m?r:a;i=(p-y)/Math.max(1,f-c+u*2),l&&(i=Math.floor(i)),y+=(p-y-i*(f-c))*d,o=i*(1-c),l&&(y=Math.round(y),o=Math.round(o));var x=Y3e(f).map(function(v){return y+i*v});return n(m?x.reverse():x)}return e.domain=function(f){return arguments.length?(t(f),h()):t()},e.range=function(f){return arguments.length?([r,a]=f,r=+r,a=+a,h()):[r,a]},e.rangeRound=function(f){return[r,a]=f,r=+r,a=+a,l=!0,h()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(l=!!f,h()):l},e.padding=function(f){return arguments.length?(c=Math.min(1,u=+f),h()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),h()):c},e.paddingOuter=function(f){return arguments.length?(u=+f,h()):u},e.align=function(f){return arguments.length?(d=Math.max(0,Math.min(1,f)),h()):d},e.copy=function(){return ay(t(),[r,a]).round(l).paddingInner(c).paddingOuter(u).align(d)},oi.apply(h(),arguments)}function mZ(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return mZ(t())},e}function Jp(){return mZ(ay.apply(null,arguments).paddingInner(1))}function lR(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pZ(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ex(){}var iy=.7,iw=1/iy,qh="\\s*([+-]?\\d+)\\s*",oy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",X3e=/^#([0-9a-f]{3,8})$/,Q3e=new RegExp(`^rgb\\(${qh},${qh},${qh}\\)$`),Z3e=new RegExp(`^rgb\\(${po},${po},${po}\\)$`),J3e=new RegExp(`^rgba\\(${qh},${qh},${qh},${oy}\\)$`),e5e=new RegExp(`^rgba\\(${po},${po},${po},${oy}\\)$`),t5e=new RegExp(`^hsl\\(${oy},${po},${po}\\)$`),n5e=new RegExp(`^hsla\\(${oy},${po},${po},${oy}\\)$`),n3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};lR(Ex,ly,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:r3,formatHex:r3,formatHex8:r5e,formatHsl:s5e,formatRgb:s3,toString:s3});function r3(){return this.rgb().formatHex()}function r5e(){return this.rgb().formatHex8()}function s5e(){return gZ(this).formatHsl()}function s3(){return this.rgb().formatRgb()}function ly(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=X3e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?a3(t):n===3?new Fs(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Q3e.exec(e))?new Fs(t[1],t[2],t[3],1):(t=Z3e.exec(e))?new Fs(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=J3e.exec(e))?Zv(t[1],t[2],t[3],t[4]):(t=e5e.exec(e))?Zv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=t5e.exec(e))?l3(t[1],t[2]/100,t[3]/100,1):(t=n5e.exec(e))?l3(t[1],t[2]/100,t[3]/100,t[4]):n3.hasOwnProperty(e)?a3(n3[e]):e==="transparent"?new Fs(NaN,NaN,NaN,0):null}function a3(e){return new Fs(e>>16&255,e>>8&255,e&255,1)}function Zv(e,t,n,r){return r<=0&&(e=t=n=NaN),new Fs(e,t,n,r)}function a5e(e){return e instanceof Ex||(e=ly(e)),e?(e=e.rgb(),new Fs(e.r,e.g,e.b,e.opacity)):new Fs}function gP(e,t,n,r){return arguments.length===1?a5e(e):new Fs(e,t,n,r??1)}function Fs(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}lR(Fs,gP,pZ(Ex,{brighter(e){return e=e==null?iw:Math.pow(iw,e),new Fs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?iy:Math.pow(iy,e),new Fs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fs(qu(this.r),qu(this.g),qu(this.b),ow(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i3,formatHex:i3,formatHex8:i5e,formatRgb:o3,toString:o3}));function i3(){return`#${Nu(this.r)}${Nu(this.g)}${Nu(this.b)}`}function i5e(){return`#${Nu(this.r)}${Nu(this.g)}${Nu(this.b)}${Nu((isNaN(this.opacity)?1:this.opacity)*255)}`}function o3(){const e=ow(this.opacity);return`${e===1?"rgb(":"rgba("}${qu(this.r)}, ${qu(this.g)}, ${qu(this.b)}${e===1?")":`, ${e})`}`}function ow(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nu(e){return e=qu(e),(e<16?"0":"")+e.toString(16)}function l3(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _i(e,t,n,r)}function gZ(e){if(e instanceof _i)return new _i(e.h,e.s,e.l,e.opacity);if(e instanceof Ex||(e=ly(e)),!e)return new _i;if(e instanceof _i)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,l=i-a,c=(i+a)/2;return l?(t===i?o=(n-r)/l+(n<r)*6:n===i?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?i+a:2-i-a,o*=60):l=c>0&&c<1?0:o,new _i(o,l,c,e.opacity)}function o5e(e,t,n,r){return arguments.length===1?gZ(e):new _i(e,t,n,r??1)}function _i(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}lR(_i,o5e,pZ(Ex,{brighter(e){return e=e==null?iw:Math.pow(iw,e),new _i(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?iy:Math.pow(iy,e),new _i(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Fs(g_(e>=240?e-240:e+120,a,r),g_(e,a,r),g_(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new _i(c3(this.h),Jv(this.s),Jv(this.l),ow(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ow(this.opacity);return`${e===1?"hsl(":"hsla("}${c3(this.h)}, ${Jv(this.s)*100}%, ${Jv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function c3(e){return e=(e||0)%360,e<0?e+360:e}function Jv(e){return Math.max(0,Math.min(1,e||0))}function g_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const cR=e=>()=>e;function l5e(e,t){return function(n){return e+n*t}}function c5e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function u5e(e){return(e=+e)==1?yZ:function(t,n){return n-t?c5e(t,n,e):cR(isNaN(t)?n:t)}}function yZ(e,t){var n=t-e;return n?l5e(e,n):cR(isNaN(e)?t:e)}const u3=function e(t){var n=u5e(t);function r(a,i){var o=n((a=gP(a)).r,(i=gP(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),u=yZ(a.opacity,i.opacity);return function(d){return a.r=o(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return r.gamma=e,r}(1);function d5e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function h5e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function f5e(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),o;for(o=0;o<r;++o)a[o]=Rm(e[o],t[o]);for(;o<n;
vendor: 5,514 bytes, line 861
861++o)i[o]=t[o];return function(l){for(o=0;o<r;++o)i[o]=a[o](l);return i}}function m5e(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function lw(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function p5e(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Rm(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var yP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,y_=new RegExp(yP.source,"g");function g5e(e){return function(){return e}}function y5e(e){return function(t){return e(t)+""}}function x5e(e,t){var n=yP.lastIndex=y_.lastIndex=0,r,a,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=yP.exec(e))&&(a=y_.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),l[o]?l[o]+=i:l[++o]=i),(r=r[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:lw(r,a)})),n=y_.lastIndex;return n<t.length&&(i=t.slice(n),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?y5e(c[0].x):g5e(t):(t=c.length,function(u){for(var d=0,h;d<t;++d)l[(h=c[d]).i]=h.x(u);return l.join("")})}function Rm(e,t){var n=typeof t,r;return t==null||n==="boolean"?cR(t):(n==="number"?lw:n==="string"?(r=ly(t))?(t=r,u3):x5e:t instanceof ly?u3:t instanceof Date?m5e:h5e(t)?d5e:Array.isArray(t)?f5e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?p5e:lw)(e,t)}function uR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function v5e(e,t){t===void 0&&(t=e,e=Rm);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return i[l](o-l)}}function b5e(e){return function(){return e}}function cw(e){return+e}var d3=[0,1];function js(e){return e}function xP(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:b5e(isNaN(t)?NaN:.5)}function w5e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function S5e(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a<r?(r=xP(a,r),i=n(o,i)):(r=xP(r,a),i=n(i,o)),function(l){return i(r(l))}}function j5e(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)a[o]=xP(e[o],e[o+1]),i[o]=n(t[o],t[o+1]);return function(l){var c=Cx(e,l,1,r)-1;return i[c](a[c](l))}}function kx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zj(){var e=d3,t=d3,n=Rm,r,a,i,o=js,l,c,u;function d(){var f=Math.min(e.length,t.length);return o!==js&&(o=w5e(e[0],e[f-1])),l=f>2?j5e:S5e,c=u=null,h}function h(f){return f==null||isNaN(f=+f)?i:(c||(c=l(e.map(r),t,n)))(r(o(f)))}return h.invert=function(f){return o(a((u||(u=l(t,e.map(r),lw)))(f)))},h.domain=function(f){return arguments.length?(e=Array.from(f,cw),d()):e.slice()},h.range=function(f){return arguments.length?(t=Array.from(f),d()):t.slice()},h.rangeRound=function(f){return t=Array.from(f),n=uR,d()},h.clamp=function(f){return arguments.length?(o=f?!0:js,d()):o!==js},h.interpolate=function(f){return arguments.length?(n=f,d()):n},h.unknown=function(f){return arguments.length?(i=f,h):i},function(f,m){return r=f,a=m,d()}}function dR(){return zj()(js,js)}function N5e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function uw(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Af(e){return e=uw(Math.abs(e)),e?e[1]:NaN}function _5e(e,t){return function(n,r){for(var a=n.length,i=[],o=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(n.substring(a-=l,a+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}function C5e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var E5e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cy(e){if(!(t=E5e.exec(e)))throw new Error("invalid format: "+e);var t;return new hR({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}cy.prototype=hR.prototype;function hR(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}hR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function k5e(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var xZ;function P5e(e,t){var n=uw(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(xZ=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+uw(e,Math.max(0,t+i-1))[0]}function h3(e,t){var n=uw(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const f3={"%":(e,t)=>
vendor: 4,803 bytes, line 861
861(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:N5e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>h3(e*100,t),r:h3,s:P5e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function m3(e){return e}var p3=Array.prototype.map,g3=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T5e(e){var t=e.grouping===void 0||e.thousands===void 0?m3:_5e(p3.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?m3:C5e(p3.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(h){h=cy(h);var f=h.fill,m=h.align,y=h.sign,p=h.symbol,x=h.zero,v=h.width,b=h.comma,w=h.precision,S=h.trim,j=h.type;j==="n"?(b=!0,j="g"):f3[j]||(w===void 0&&(w=12),S=!0,j="g"),(x||f==="0"&&m==="=")&&(x=!0,f="0",m="=");var N=p==="$"?n:p==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",C=p==="$"?r:/[%p]/.test(j)?o:"",_=f3[j],A=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function P(R){var I=N,B=C,$,q,L;if(j==="c")B=_(R)+B,R="";else{R=+R;var k=R<0||1/R<0;if(R=isNaN(R)?c:_(Math.abs(R),w),S&&(R=k5e(R)),k&&+R==0&&y!=="+"&&(k=!1),I=(k?y==="("?y:l:y==="-"||y==="("?"":y)+I,B=(j==="s"?g3[8+xZ/3]:"")+B+(k&&y==="("?")":""),A){for($=-1,q=R.length;++$<q;)if(L=R.charCodeAt($),48>L||L>57){B=(L===46?a+R.slice($+1):R.slice($))+B,R=R.slice(0,$);break}}}b&&!x&&(R=t(R,1/0));var T=I.length+R.length+B.length,F=T<v?new Array(v-T+1).join(f):"";switch(b&&x&&(R=t(F+R,F.length?v-B.length:1/0),F=""),m){case"<":R=I+R+B+F;break;case"=":R=I+F+R+B;break;case"^":R=F.slice(0,T=F.length>>1)+I+R+B+F.slice(T);break;default:R=F+I+R+B;break}return i(R)}return P.toString=function(){return h+""},P}function d(h,f){var m=u((h=cy(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(Af(f)/3)))*3,p=Math.pow(10,-y),x=g3[8+y/3];return function(v){return m(p*v)+x}}return{format:u,formatPrefix:d}}var eb,fR,vZ;A5e({thousands:",",grouping:[3],currency:["$",""]});function A5e(e){return eb=T5e(e),fR=eb.format,vZ=eb.formatPrefix,eb}function O5e(e){return Math.max(0,-Af(Math.abs(e)))}function R5e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Af(t)/3)))*3-Af(Math.abs(e)))}function I5e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Af(t)-Af(e))+1}function bZ(e,t,n,r){var a=mP(e,t,n),i;switch(r=cy(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=R5e(a,o))&&(r.precision=i),vZ(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=I5e(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=O5e(a))&&(r.precision=i-(r.type==="%")*2);break}}return fR(r)}function Gc(e){var t=e.domain;return e.ticks=function(n){var r=t();return hP(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return bZ(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,o=r[a],l=r[i],c,u,d=10;for(l<o&&(u=o,o=l,l=u,u=a,a=i,i=u);d-- >0;){if(u=fP(o,l,n),u===c)return r[a]=o,r[i]=l,t(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function dw(){var e=dR();return e.copy=function(){return kx(e,dw())},oi.apply(e,arguments),Gc(e)}function wZ(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,cw),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return wZ(e).unknown(t)},e=arguments.length?Array.from(e,cw):[0,1],Gc(n)}function SZ(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],o;return i<a&&(o=n,n=r,r=o,o=a,a=i,i=o),e[n]=t.floor(a),e[r]=t.ceil(i),e}function y3(e){return Math.log(e)}function x3(e){return Math.exp(e)}function M5e(e){return-Math.log(-e)}function D5e(e){return-Math.exp(-e)}function L5e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function $5e(e){return e===10?L5e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function F5e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function v3(e){return(t,n)=>-e(-t,n)}function mR(e){const t=e(y3,x3),n=t.domain;let r=10,a,i;function o(){return a=F5e(r),i=$5e(r),n()[0]<0?(a=v3(a),i=v3(i),e(M5e,D5e)):e(y3,x3),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],d=c[c.length-1];const h=d<u;h&&([u,d]=[d,u]);let f=a(u),m=a(d),y,p;const x=l==null?10:+l;let v=[];
vendor: 4,136 bytes, line 861
861if(!(r%1)&&m-f<x){if(f=Math.floor(f),m=Math.ceil(m),u>0){for(;f<=m;++f)for(y=1;y<r;++y)if(p=f<0?y/i(-f):y*i(f),!(p<u)){if(p>d)break;v.push(p)}}else for(;f<=m;++f)for(y=r-1;y>=1;--y)if(p=f>0?y/i(-f):y*i(f),!(p<u)){if(p>d)break;v.push(p)}v.length*2<x&&(v=hP(u,d,x))}else v=hP(f,m,Math.min(m-f,x)).map(i);return h?v.reverse():v},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=cy(c)).precision==null&&(c.trim=!0),c=fR(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return d=>{let h=d/i(Math.round(a(d)));return h*r<r-.5&&(h*=r),h<=u?c(d):""}},t.nice=()=>n(SZ(n(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function jZ(){const e=mR(zj()).domain([1,10]);return e.copy=()=>kx(e,jZ()).base(e.base()),oi.apply(e,arguments),e}function b3(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function w3(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function pR(e){var t=1,n=e(b3(t),w3(t));return n.constant=function(r){return arguments.length?e(b3(t=+r),w3(t)):t},Gc(n)}function NZ(){var e=pR(zj());return e.copy=function(){return kx(e,NZ()).constant(e.constant())},oi.apply(e,arguments)}function S3(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function B5e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function z5e(e){return e<0?-e*e:e*e}function gR(e){var t=e(js,js),n=1;function r(){return n===1?e(js,js):n===.5?e(B5e,z5e):e(S3(n),S3(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Gc(t)}function yR(){var e=gR(zj());return e.copy=function(){return kx(e,yR()).exponent(e.exponent())},oi.apply(e,arguments),e}function U5e(){return yR.apply(null,arguments).exponent(.5)}function j3(e){return Math.sign(e)*e*e}function q5e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _Z(){var e=dR(),t=[0,1],n=!1,r;function a(i){var o=q5e(e(i));return isNaN(o)?r:n?Math.round(o):o}return a.invert=function(i){return e.invert(j3(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,cw)).map(j3)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return _Z(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},oi.apply(a,arguments),Gc(a)}function CZ(){var e=[],t=[],n=[],r;function a(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=K3e(e,o/l);return i}function i(o){return o==null||isNaN(o=+o)?r:t[Cx(n,o)]}return i.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(bc),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return CZ().domain(e).range(t).unknown(r)},oi.apply(i,arguments)}function EZ(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function o(c){return c!=null&&c<=c?a[Cx(r,c,0,n)]:i}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return EZ().domain([e,t]).range(a).unknown(i)},oi.apply(Gc(o),arguments)}function kZ(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Cx(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=M
vendor: 6,257 bytes, line 861
861ath.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return kZ().domain(e).range(t).unknown(n)},oi.apply(a,arguments)}const x_=new Date,v_=new Date;function jr(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),l=a.ceil(i);return i-o<l-i?o:l},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<o)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<o);return c},a.filter=i=>jr(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!i(o););else for(;--l>=0;)for(;t(o,1),!i(o););}),n&&(a.count=(i,o)=>(x_.setTime(+i),v_.setTime(+o),e(x_),e(v_),Math.floor(n(x_,v_))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?o=>r(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const hw=jr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hw.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):hw);hw.range;const qo=1e3,Wa=qo*60,Wo=Wa*60,cl=Wo*24,xR=cl*7,N3=cl*30,b_=cl*365,_u=jr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qo)},(e,t)=>(t-e)/qo,e=>e.getUTCSeconds());_u.range;const vR=jr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qo)},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getMinutes());vR.range;const bR=jr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getUTCMinutes());bR.range;const wR=jr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qo-e.getMinutes()*Wa)},(e,t)=>{e.setTime(+e+t*Wo)},(e,t)=>(t-e)/Wo,e=>e.getHours());wR.range;const SR=jr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Wo)},(e,t)=>(t-e)/Wo,e=>e.getUTCHours());SR.range;const Px=jr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wa)/cl,e=>e.getDate()-1);Px.range;const Uj=jr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cl,e=>e.getUTCDate()-1);Uj.range;const PZ=jr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cl,e=>Math.floor(e/cl));PZ.range;function Nd(e){return jr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Wa)/xR)}const qj=Nd(0),fw=Nd(1),W5e=Nd(2),V5e=Nd(3),Of=Nd(4),H5e=Nd(5),G5e=Nd(6);qj.range;fw.range;W5e.range;V5e.range;Of.range;H5e.range;G5e.range;function _d(e){return jr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/xR)}const Wj=_d(0),mw=_d(1),K5e=_d(2),Y5e=_d(3),Rf=_d(4),X5e=_d(5),Q5e=_d(6);Wj.range;mw.range;K5e.range;Y5e.range;Rf.range;X5e.range;Q5e.range;const jR=jr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());jR.range;const NR=jr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());NR.range;const ul=jr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ul.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ul.range;const dl=jr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());dl.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});dl.range;function TZ(e,t,n,r,a,i){const o=[[_u,1,qo],[_u,5,5*qo],[_u,15,15*qo],[_u,30,30*qo],[i,1,Wa],[i,5,5*Wa],[i,15,15*Wa],[i,30,30*Wa],[a,1,Wo],[a,3,3*Wo],[a,6,6*Wo],[a,12,12*Wo],[r,1,cl],[r,2,2*cl],[n,1,xR],[t,1,N3],[t,3,3*N3],[e,1,b_]];function l(u,d,h){const f=d<u;f&&([u,d]=[d,u]);const m=h&&typeof h.range=="function"?h:c(u,d,h),y=m?m.range(u,+d+1):[];return f?y.reverse():y}function c(u,d,h){const f=Math.abs(d-u)/h,m=iR(([,,x])=>x).right(o,f);if(m===o.length)return e.every(mP(u/b_,d/b_,h));if(m===0)return hw.every(Math.max(mP(u,d,h),1));const[y,p]=o[f/o[m-1][2]<o[m][2]/f?m-1:m];return y.every(p)}return[l,c]}const[Z5e,J5e]=TZ(dl,NR,Wj,PZ,SR,bR),[e6e,t6e]=TZ(ul,jR,qj,Px,wR,vR);function w_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function S_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function op(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function n6e(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=lp(a),d=cp(a),h=lp(i),f=cp(i),m=lp(o),y=cp(o),p=lp(l),x=cp(l),v=lp(c),b=cp(c),w={a:k,A:T,b:F,B:O,c:null,d:T3,e:T3,f:_6e,g:M6e,G:L6e,H:S6e,I:j6e,j:N6e,L:AZ,m:C6e,M:E6e,p:E,q:D,Q:R3,s:I3,S:k6e,u:P6e,U:T6e,V:A6e,w:O6e,W:R6e,x:null,X:null,y:I6e,Y:D6e,Z:$6e,"%":O3},S={a:M,A:X,b:W,B:re,c:null,d:A3,e:A3,f:U6e,g:Z6e,G:eBe,H:F6e,I:B6e,j:z6e,L:RZ,m:q6e,M:W6e,p:ne,q:le,Q:R3,s:I3,S:V6e,u:H6e,U:G6e,V:K6e,w:Y6e,W:X6e,x:null,X:null,y:Q6e,Y:J6e,Z:tBe,"%":O3},j={a:P,A:R,b:I,B,c:$,d:k3,e:k3,f:x6e,g:E3,G:C3,H:P3,I:P3,j:m6e,L:y6e,m:f6e,M:p6e,p:A,q:h6e,Q:b6e,s:w6e,S:g6e,u:o6e,U:l6e,V:c6e,w:i6e,W:u6e,x:q,X:L,y:E3,Y:C3,Z:d6e,"%":v6e};w.x=N(n,w),w.X=N(r,w),w.c=N(t,w),S.x=N(n,S),S.X=N(r,S),S.c=N(t,S);function N(ie,ye){return function(pe){var G=[],Pe=-1,J=0,oe=ie.length,se,je,Ce;for(pe instanceof Date||(pe=new Date(+pe));++Pe<oe;)ie.charCodeAt(Pe)===37&&(G.push(ie.slice(J,Pe)),(je=_3[se=ie.charAt(++Pe)]
vendor: 7,537 bytes, line 861
861)!=null?se=ie.charAt(++Pe):je=se==="e"?" ":"0",(Ce=ye[se])&&(se=Ce(pe,je)),G.push(se),J=Pe+1);return G.push(ie.slice(J,Pe)),G.join("")}}function C(ie,ye){return function(pe){var G=op(1900,void 0,1),Pe=_(G,ie,pe+="",0),J,oe;if(Pe!=pe.length)return null;if("Q"in G)return new Date(G.Q);if("s"in G)return new Date(G.s*1e3+("L"in G?G.L:0));if(ye&&!("Z"in G)&&(G.Z=0),"p"in G&&(G.H=G.H%12+G.p*12),G.m===void 0&&(G.m="q"in G?G.q:0),"V"in G){if(G.V<1||G.V>53)return null;"w"in G||(G.w=1),"Z"in G?(J=S_(op(G.y,0,1)),oe=J.getUTCDay(),J=oe>4||oe===0?mw.ceil(J):mw(J),J=Uj.offset(J,(G.V-1)*7),G.y=J.getUTCFullYear(),G.m=J.getUTCMonth(),G.d=J.getUTCDate()+(G.w+6)%7):(J=w_(op(G.y,0,1)),oe=J.getDay(),J=oe>4||oe===0?fw.ceil(J):fw(J),J=Px.offset(J,(G.V-1)*7),G.y=J.getFullYear(),G.m=J.getMonth(),G.d=J.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),oe="Z"in G?S_(op(G.y,0,1)).getUTCDay():w_(op(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+G.W*7-(oe+5)%7:G.w+G.U*7-(oe+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,S_(G)):w_(G)}}function _(ie,ye,pe,G){for(var Pe=0,J=ye.length,oe=pe.length,se,je;Pe<J;){if(G>=oe)return-1;if(se=ye.charCodeAt(Pe++),se===37){if(se=ye.charAt(Pe++),je=j[se in _3?ye.charAt(Pe++):se],!je||(G=je(ie,pe,G))<0)return-1}else if(se!=pe.charCodeAt(G++))return-1}return G}function A(ie,ye,pe){var G=u.exec(ye.slice(pe));return G?(ie.p=d.get(G[0].toLowerCase()),pe+G[0].length):-1}function P(ie,ye,pe){var G=m.exec(ye.slice(pe));return G?(ie.w=y.get(G[0].toLowerCase()),pe+G[0].length):-1}function R(ie,ye,pe){var G=h.exec(ye.slice(pe));return G?(ie.w=f.get(G[0].toLowerCase()),pe+G[0].length):-1}function I(ie,ye,pe){var G=v.exec(ye.slice(pe));return G?(ie.m=b.get(G[0].toLowerCase()),pe+G[0].length):-1}function B(ie,ye,pe){var G=p.exec(ye.slice(pe));return G?(ie.m=x.get(G[0].toLowerCase()),pe+G[0].length):-1}function $(ie,ye,pe){return _(ie,t,ye,pe)}function q(ie,ye,pe){return _(ie,n,ye,pe)}function L(ie,ye,pe){return _(ie,r,ye,pe)}function k(ie){return o[ie.getDay()]}function T(ie){return i[ie.getDay()]}function F(ie){return c[ie.getMonth()]}function O(ie){return l[ie.getMonth()]}function E(ie){return a[+(ie.getHours()>=12)]}function D(ie){return 1+~~(ie.getMonth()/3)}function M(ie){return o[ie.getUTCDay()]}function X(ie){return i[ie.getUTCDay()]}function W(ie){return c[ie.getUTCMonth()]}function re(ie){return l[ie.getUTCMonth()]}function ne(ie){return a[+(ie.getUTCHours()>=12)]}function le(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var ye=N(ie+="",w);return ye.toString=function(){return ie},ye},parse:function(ie){var ye=C(ie+="",!1);return ye.toString=function(){return ie},ye},utcFormat:function(ie){var ye=N(ie+="",S);return ye.toString=function(){return ie},ye},utcParse:function(ie){var ye=C(ie+="",!0);return ye.toString=function(){return ie},ye}}}var _3={"-":"",_:" ",0:"0"},Ar=/^\s*\d+/,r6e=/^%/,s6e=/[\\^$*+?|[\]().{}]/g;function an(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function a6e(e){return e.replace(s6e,"\\$&")}function lp(e){return new RegExp("^(?:"+e.map(a6e).join("|")+")","i")}function cp(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function i6e(e,t,n){var r=Ar.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function o6e(e,t,n){var r=Ar.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function l6e(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function c6e(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function u6e(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function C3(e,t,n){var r=Ar.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function E3(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function d6e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function h6e(e,t,n){var r=Ar.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function f6e(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function k3(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function m6e(e,t,n){var r=Ar.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function P3(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function p6e(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function g6e(e,t,n){var r=Ar.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function y6e(e,t,n){var r=Ar.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function x6e(e,t,n){var r=Ar.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function v6e(e,t,n){var r=r6e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function b6e(e,t,n){var r=Ar.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function w6e(e,t,n){var r=Ar.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function T3(e,t){return an(e.getDate(),t,2)}function S6e(e,t){return an(e.getHours(),t,2)}function j6e(e,t){return an(e.getHours()%12||12,t,2)}function N6e(e,t){return an(1+Px.count(ul(e),e),t,3)}function AZ(e,t){return an(e.getMilliseconds(),t,3)}function _6e(e,t){return AZ(e,t)+"000"}function C6e(e,t){return an(e.getMonth()+1,t,2)}function E6e(e,t){return an(e.getMinutes(),t,2)}function k6e(e,t){return an(e.getSeconds(),t,2)}function P6e(e){var t=e.getDay();return t===0?7:t}function T6e(e,t){return an(qj.count(ul(e)-1,e),t,2)}function OZ(e){var t=e.getDay();return t>=4||t===0?Of(e):Of.ceil(e)}function A6e(e,t){return e=OZ(e),an(Of.count(ul(e),e)+(ul(e).getDay()===4),t,2)}function O6e(e){return e.getDay()}function R6e(e,t){return an(fw.count(ul(e)-1,e),t,2)}function I6e(e,t){return an(e.getFullYear()%100,t,2)}function M6e(e,t){return e=OZ(e),an(e.getFullYear()%100,t,2)}function D6e(e,t){return an(e.getFullYear()%1e4,t,4)}function L6e(e,t){var n=e.getDay();return e=n>=4||n===0?Of(e):Of.ceil(e),an(e.getFullYear()%1e4,t,4)}function $6e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+an(t/60|0,"0",2)+an(t%60,"0",2)}function A3(e,t){return an(e.getUTCDate(),t,2)}function F6e(e,t){return an(e.getUTCHours(),t,2)}function B6e(e,t){return an(e.getUTCHours()%12||12,t,2)}function z6e(e,t){return an(1+Uj.count(dl(e),e),t,3)}function RZ(e,t){return an(e.getUTCMilliseconds(),t,3)}function U6e(e,t){return RZ(e,t)+"000"}function q6e(e,t){return an(e.getUTCMonth()+1,t,2)}function W6e(e,t){return an(e.getUTCMinutes(),t,2)}function V6e(e,t){return an(e.getUTCSeconds(),t,2)}function H6e(e){var t=e.getUTCDay();return t===0?7:t}function G6e(e,t){return an(Wj.count(dl(e)-1,e),t,2)}function IZ(e){var t=e.getUTCDay();return t>=4||t===0?Rf(e):Rf.ceil(e)}function K6e(e,t){return e=IZ(e),an(Rf.count(dl(e),e)+(dl(e).getUTCDay()===4),t,2)}function Y6e(e){return e.getUTCDay()}function X6e(e,t){return an(mw.count(dl(e)-1,e),t,2)}function Q6e(e,t){return an(e.getUTCFullYear()%100,t,2)}function Z6e(e,t){return e=IZ(e),an(e.getUTCFullYear()%100,t,2)}function J6e(e,t){return an(e.getUTCFullYear()%1e4,t,4)}function eBe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Rf(e):Rf.ceil(e),an(e.getUTCFullYear()%1e4,t,4)}function tBe(){return"+0000"}function O3(){return"%"}function R3(e){return+e}function I3(e){return Math.floor(+e/1e3)}var Yd,MZ,DZ;nBe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
861ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function nBe(e){return Yd=n6e(e),MZ=Yd.format,Yd.parse,DZ=Yd.utcFormat,Yd.utcParse,Yd}function rBe(e){return new Date(e)}function sBe(e){return e instanceof Date?+e:+new Date(+e)}function _R(e,t,n,r,a,i,o,l,c,u){var d=dR(),h=d.invert,f=d.domain,m=u(".%L"),y=u(":%S"),p=u("%I:%M"),x=u("%I %p"),v=u("%a %d"),b=u("%b %d"),w=u("%B"),S=u("%Y");function j(N){return(c(N)<N?m:l(N)<N?y:o(N)<N?p:i(N)<N?x:r(N)<N?a(N)<N?v:b:n(N)<N?w:S)(N)}return d.invert=function(N){return new Date(h(N))},d.domain=function(N){return arguments.length?f(Array.from(N,sBe)):f().map(rBe)},d.ticks=function(N){var C=f();return e(C[0],C[C.length-1],N??10)},d.tickFormat=function(N,C){return C==null?j:u(C)},d.nice=function(N){var C=f();return(!N||typeof N.range!="function")&&(N=t(C[0],C[C.length-1],N??10)),N?f(SZ(C,N)):d},d.copy=function(){return kx(d,_R(e,t,n,r,a,i,o,l,c,u))},d}function aBe(){return oi.apply(_R(e6e,t6e,ul,jR,qj,Px,wR,vR,_u,MZ).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function iBe(){return oi.apply(_R(Z5e,J5e,dl,NR,Wj,Uj,SR,bR,_u,DZ).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vj(){var e=0,t=1,n,r,a,i,o=js,l=!1,c;function u(h){return h==null||isNaN(h=+h)?c:o(a===0?.5:(h=(i(h)-n)*a,l?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([e,t]=h,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(h){return arguments.length?(l=!!h,u):l},u.interpolator=function(h){return arguments.length?(o=h,u):o};function d(h){return function(f){var m,y;return arguments.length?([m,y]=f,o=h(m,y),u):[o(0),o(1)]}}return u.range=d(Rm),u.rangeRound=d(uR),u.unknown=function(h){return arguments.length?(c=h,u):c},function(h){return i=h,n=h(e),r=h(t),a=n===r?0:1/(r-n),u}}function Kc(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function LZ(){var e=Gc(Vj()(js));return e.copy=function(){return Kc(e,LZ())},xl.apply(e,arguments)}function $Z(){var e=mR(Vj()).domain([1,10]);return e.copy=function(){return Kc(e,$Z()).base(e.base())},xl.apply(e,arguments)}function FZ(){var e=pR(Vj());return e.copy=function(){return Kc(e,FZ()).constant(e.constant())},xl.apply(e,arguments)}function CR(){var e=gR(Vj());return e.copy=function(){return Kc(e,CR()).exponent(e.exponent())},xl.apply(e,arguments)}function oBe(){return CR.apply(null,arguments).exponent(.5)}function BZ(){var e=[],t=js;function n(r){if(r!=null&&!isNaN(r=+r))return t((Cx(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(bc),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>G3e(e,i/r))},n.copy=function(){return BZ(t).domain(e)},xl.apply(n,arguments)}function Hj(){var e=0,t=.5,n=1,r=1,a,i,o,l,c,u=js,d,h=!1,f;function m(p){return isNaN(p=+p)?f:(p=.5+((p=+d(p))-i)*(r*p<r*i?l:c),u(h?Math.max(0,Math.min(1,p)):p))}m.domain=function(p){return arguments.length?([e,t,n]=p,a=d(e=+e),i=d(t=+t),o=d(n=+n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),r=i<a?-1:1,m):[e,t,n]},m.clamp=function(p){return arguments.length?(h=!!p,m):h},m.interpolator=function(p){return arguments.length?(u=p,m):u};function y(p){return function(x){var v,b,w;return arguments.length?([v,b,w]=x,u=v5e(p,[v,b,w]),m):[u(0),u(.5),u(1)]}}return m.range=y(Rm),m.rangeRound=y(uR),m.unknown=function(p){return arguments.length?(f=p,m):f},function(p){return d=p,a=p(e),i=p(t),o=p(n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),r=i<a?-1:1,m}}function zZ(){var e=Gc(Hj()(js));return e.copy=function(){return Kc(e,zZ())},xl.apply(e,arguments)}function UZ(){var e=mR(Hj()).domain([.1,1,10]);return e.copy=function(){return Kc(e,UZ()).base(e.base())},xl.apply(e,arguments)}function qZ(){var e=pR(Hj());return e.copy=function(){return Kc(e,qZ()).constant(e.constant())},xl.apply(e,arguments)}function ER(){var e=gR(Hj());return e.copy=function(){return Kc(e,ER()).exponent(e.exponent())},xl.apply(e,arguments)}function lBe(){return ER.apply(null,arguments).exponent(.5)}const M3=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ay,scaleDiverging:zZ,scaleDivergingLog:UZ,scaleDivergingPow:ER,scaleDivergingSqrt:lBe,scaleDivergingSymlog:qZ,scaleIdentity:wZ,scaleImplicit:pP,scaleLinear:dw,scaleLog:jZ,scaleOrdinal:oR,scalePoint:Jp,scalePow:yR,scaleQuantile:CZ,scaleQuantize:EZ,scaleRadial:_Z,scaleSequential:LZ,scaleSequentialLog:$Z,scaleSequentialPow:CR,scaleSequentialQuantile:BZ,scaleSequentialSqrt:oBe,scaleSequentialSymlog:FZ,scaleSqrt:U5e,scaleSymlog:NZ,scaleThreshold:kZ,scaleTime:aBe,scaleUtc:iBe,tickFormat:bZ},Symbol.toStringTag,{value:"Module"}));var cBe=jm;function uBe(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],o=t(i);if(o!=null&&(l===void 0?o===o&&!cBe(o):n(o,l)))var l=o,c=i}return c}var Gj=uBe;function dBe(e,t){return e>t}var WZ=dBe,hBe=Gj,fBe=WZ,mBe=Am;function pBe(e){return e&&e.length?hBe(e,mBe,fBe):void 0}var gBe=pBe;const Kj=$t(gBe);function yBe(e,t){return e<t}var VZ=yBe,xBe=Gj,vBe=VZ,bBe=Am;function wBe(e){return e&&e.length?xBe(e,bBe,vBe):void 0}var SBe=wBe;const Yj=$t(SBe);var jBe=z2,NBe=Eo,_Be=JQ,CBe=Zs;function EBe(e,t){var n=CBe(e)?jBe:_Be;return n(e,NBe(t))}var kBe=EBe,PBe=QQ,TBe=kBe;function ABe(e,t){return PBe(TBe(e,t),1)}var OBe=ABe;const RBe=$t(OBe);var IBe=nR;function MBe(e,t){return IBe(e,t)}var DBe=MBe;const Tx=$t(DBe);
vendor: 62,727 bytes, lines 861-888
861var Im=1e9,LBe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},PR,In=!0,si="[DecimalError] ",Wu=si+"Invalid argument: ",kR=si+"Exponent out of range: ",Mm=Math.floor,hu=Math.pow,$Be=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pa,Nr=1e7,kn=7,HZ=9007199254740991,pw=Mm(HZ/kn),Fe={};Fe.absoluteValue=Fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Fe.comparedTo=Fe.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};Fe.decimalPlaces=Fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*kn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Fe.dividedBy=Fe.div=function(e){return Xo(this,new this.constructor(e))};Fe.dividedToIntegerBy=Fe.idiv=function(e){var t=this,n=t.constructor;return pn(Xo(t,new n(e),0,1),n.precision)};Fe.equals=Fe.eq=function(e){return!this.cmp(e)};Fe.exponent=function(){return mr(this)};Fe.greaterThan=Fe.gt=function(e){return this.cmp(e)>0};Fe.greaterThanOrEqualTo=Fe.gte=function(e){return this.cmp(e)>=0};Fe.isInteger=Fe.isint=function(){return this.e>this.d.length-2};Fe.isNegative=Fe.isneg=function(){return this.s<0};Fe.isPositive=Fe.ispos=function(){return this.s>0};Fe.isZero=function(){return this.s===0};Fe.lessThan=Fe.lt=function(e){return this.cmp(e)<0};Fe.lessThanOrEqualTo=Fe.lte=function(e){return this.cmp(e)<1};Fe.logarithm=Fe.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(pa))throw Error(si+"NaN");if(n.s<1)throw Error(si+(n.s?"NaN":"-Infinity"));return n.eq(pa)?new r(0):(In=!1,t=Xo(uy(n,i),uy(e,i),i),In=!0,pn(t,a))};Fe.minus=Fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?YZ(t,e):GZ(t,(e.s=-e.s,e))};Fe.modulo=Fe.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(si+"NaN");return n.s?(In=!1,t=Xo(n,e,0,1).times(e),In=!0,n.minus(t)):pn(new r(n),a)};Fe.naturalExponential=Fe.exp=function(){return KZ(this)};Fe.naturalLogarithm=Fe.ln=function(){return uy(this)};Fe.negated=Fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Fe.plus=Fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GZ(t,e):YZ(t,(e.s=-e.s,e))};Fe.precision=Fe.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wu+e);if(t=mr(a)+1,r=a.d.length-1,n=r*kn+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Fe.squareRoot=Fe.sqrt=function(){var e,t,n,r,a,i,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(si+"NaN")}for(e=mr(l),In=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=so(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Mm((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=o=n+3;;)if(i=r,r=i.plus(Xo(l,i,o+2)).times(.5),so(i.d).slice(0,o)===(t=so(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(pn(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if(t!="9999")break;o+=4}return In=!0,pn(r,n)};Fe.times=Fe.mul=function(e){var t,n,r,a,i,o,l,c,u,d=this,h=d.constructor,f=d.d,m=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,c=f.length,u=m.length,c<u&&(i=f,f=m,m=i,o=c,c=u,u=o),i=[],o=c+u,r=o;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)l=i[a]+m[r]*f[a-r-1]+t,i[a--]=l%Nr|0,t=l/Nr|0;i[a]=(i[a]+t)%Nr|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,In?pn(e,h.precision):e};Fe.toDecimalPlaces=Fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(So(e,0,Im),t===void 0?t=r.rounding:So(t,0,8),pn(n,e+mr(n)+1,t))};Fe.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=ad(r,!0):(So(e,0,Im),t===void 0?t=a.rounding:So(t,0,8),r=pn(new a(r),e+1,t),n=ad(r,!0,e+1)),n};Fe.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?ad(a):(So(e,0,Im),t===void 0?t=i.rounding:So(t,0,8),r=pn(new i(a),e+mr(a)+1,t),n=ad(r.abs(),!1,e+mr(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Fe.toInteger=Fe.toint=function(){var e=this,t=e.constructor;return pn(new t(e),mr(e)+1,t.rounding)};Fe.toNumber=function(){return+this};Fe.toPower=Fe.pow=function(e){var t,n,r,a,i,o,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(pa);if(l=new c(l),!l.s){if(e.s<1)throw Error(si+"Infinity");return l}if(l.eq(pa))return l;if(r=c.precision,e.eq(pa))return pn(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,i=l.s,o){if((n=d<0?-d:d)<=HZ){for(a=new c(pa),t=Math.ceil(r/kn+4),In=!1;n%2&&(a=a.times(l),L3(a.d,t)),n=Mm(n/2),n!==0;)l=l.times(l),L3(l.d,t);return In=!0,e.s<0?new c(pa).div(a):pn(a,r)}}else if(i<0)throw Error(si+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,In=!1,a=e.times(uy(l,r+u)),In=!0,a=KZ(a),a.s=i,a};Fe.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=mr(a),r=ad(a,n<=i.toExpNeg||n>=i.toExpPos)):(So(e,1,Im),t===void 0?t=i.rounding:So(t,0,8),a=pn(new i(a),e,t),n=mr(a),r=ad(a,e<=n||n<=i.toExpNeg,e)),r};Fe.toSignificantDigits=Fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(So(e,1,Im),t===void 0?t=r.rounding:So(t,0,8)),pn(new r(n),e,t)};Fe.toString=Fe.valueOf=Fe.val=Fe.toJSON=Fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=mr(e),n=e.constructor;return ad(e,t<=n.toExpNeg||t>=n.toExpPos)};function GZ(e,t){var n,r,a,i,o,l,c,u,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),In?pn(t,h):t;if(c=e.d,u=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(r=c,i=-i,l=u.length):(r=u,a=o,l=c.length),o=Math.ceil(h/kn),l=o>l?o+1:l+1,i>l&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Nr|0,c[i]%=Nr;for(n&&(c.unshift(n),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,In?pn(t,h):t}function So(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Wu+e)}function so(e){var t,n,r,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)r=e[t]+"",n=kn-r.length,n&&(i+=Fl(n)),i+=r;o=e[t],r=o+"",n=kn-r.length,n&&(i+=Fl(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var Xo=function(){function e(r,a){var i,o=0,l=r.length;for(r=r.slice();l--;)i=r[l]*a+o,r[l]=i%Nr|0,o=i/Nr|0;return o&&r.unshift(o),r}function t(r,a,i,o){var l,c;if(i!=o)c=i>o?1:-1;else for(l=c=0;l<i;l++)if(r[l]!=a[l]){c=r[l]>a[l]?1:-1;break}return c}function n(r,a,i){for(var o=0;i--;)r[i]-=o,o=r[i]<a[i]?1:0,r[i]=o*Nr+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,o){var l,c,u,d,h,f,m,y,p,x,v,b,w,S,j,N,C,_,A=r.constructor,P=r.s==a.s?1:-1,R=r.d,I=a.d;if(!r.s)return new A(r);if(!a.s)throw Error(si+"Division by zero");for(c=r.e-a.e,C=I.length,j=R.length,m=new A(P),y=m.d=[],u=0;I[u]==(R[u]||0);)++u;if(I[u]>(R[u]||0)&&--c,i==null?b=i=A.precision:o?b=i+(mr(r)-mr(a))+1:b=i,b<0)return new A(0);if(b=b/kn+2|0,u=0,C==1)for(d=0,I=I[0],b++;(u<j||d)&&b--;u++)w=d*Nr+(R[u]||0),y[u]=w/I|0,d=w%I|0;else{for(d=Nr/(I[0]+1)|0,d>1&&(I=e(I,d),R=e(R,d),C=I.length,j=R.length),S=C,p=R.slice(0,C),x=p.length;x<C;)p[x++]=0;_=I.slice(),_.unshift(0),N=I[0],I[1]>=Nr/2&&++N;do d=0,l=t(I,p,C,x),l<0?(v=p[0],C!=x&&(v=v*Nr+(p[1]||0)),d=v/N|0,d>1?(d>=Nr&&(d=Nr-1),h=e(I,d),f=h.length,x=p.length,l=t(h,p,f,x),l==1&&(d--,n(h,C<f?_:I,f))):(d==0&&(l=d=1),h=I.slice()),f=h.length,f<x&&h.unshift(0),n(p,h,x),l==-1&&(x=p.length,l=t(I,p,C,x),l<1&&(d++,n(p,C<x?_:I,x))),x=p.length):l===0&&(d++,p=[0]),y[u++]=d,l&&p[0]?p[x++]=R[S]||0:(p=[R[S]],x=1);while((S++<j||p[0]!==void 0)&&b--)}return y[0]||y.shift(),m.e=c,pn(m,o?i+mr(m)+1:i)}}();function KZ(e,t){var n,r,a,i,o,l,c=0,u=0,d=e.constructor,h=d.precision;if(mr(e)>16)throw Error(kR+mr(e));if(!e.s)return new d(pa);for(t==null?(In=!1,l=h):l=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(hu(2,u))/Math.LN10*2+5|0,l+=r,n=a=i=new d(pa),d.precision=l;;){if(a=pn(a.times(e),l),n=n.times(++c),o=i.plus(Xo(a,n,l)),so(o.d).slice(0,l)===so(i.d).slice(0,l)){for(;u--;)i=pn(i.times(i),l);return d.precision=h,t==null?(In=!0,pn(i,h)):i}i=o}}function mr(e){for(var t=e.e*kn,n=e.d[0];n>=10;n/=10)t++;return t}function j_(e,t,n){if(t>e.LN10.sd())throw In=!0,n&&(e.precision=n),Error(si+"LN10 precision limit exceeded");return pn(new e(e.LN10),t)}function Fl(e){for(var t="";e--;)t+="0";return t}function uy(e,t){var n,r,a,i,o,l,c,u,d,h=1,f=10,m=e,y=m.d,p=m.constructor,x=p.precision;if(m.s<1)throw Error(si+(m.s?"NaN":"-Infinity"));if(m.eq(pa))return new p(0);if(t==null?(In=!1,u=x):u=t,m.eq(10))return t==null&&(In=!0),j_(p,u);if(u+=f,p.precision=u,n=so(y),r=n.charAt(0),i=mr(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=so(m.d),r=n.charAt(0),h++;i=mr(m),r>1?(m=new p("0."+n),i++):m=new p(r+"."+n.slice(1))}else return c=j_(p,u+2,x).times(i+""),m=uy(new p(r+"."+n.slice(1)),u-f).plus(c),p.precision=x,t==null?(In=!0,pn(m,x)):m;for(l=o=m=Xo(m.minus(pa),m.plus(pa),u),d=pn(m.times(m),u),a=3;;){if(o=pn(o.times(d),u),c=l.plus(Xo(o,new p(a),u)),so(c.d).slice(0,u)===so(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(j_(p,u+2,x).times(i+""))),l=Xo(l,new p(h),u),p.precision=x,t==null?(In=!0,pn(l,x)):l;l=c,a+=2}}function D3(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Mm(n/kn),e.d=[],r=(n+1)%kn,n<0&&(r+=kn),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=kn;r<a;)e.d.push(+t.slice(r,r+=kn));t=t.slice(r),r=kn-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),In&&(e.e>pw||e.e<-pw))throw Error(kR+n)}else e.s=0,e.e=0,e.d=[0];return e}function pn(e,t,n){var r,a,i,o,l,c,u,d,h=e.d;for(o=1,i=h[0];i>=10;i/=10)o++;if(r=t-o,r<0)r+=kn,a=t,u=h[d=0];else{if(d=Math.ceil((r+1)/kn),i=h.length,d>=i)return e;for(u=i=h[d],o=1;i>=10;i/=10)o++;r%=kn,a=r-kn+o}if(n!==void 0&&(i=hu(10,o-a-1),l=u/i%10|0,c=t<0||h[d+1]!==void 0||u%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?a>0?u/hu(10,o-a):0:h[d-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return c?(i=mr(e),h.length=1,t=t-i-1,h[0]=hu(10,(kn-t%kn)%kn),e.e=Mm(-t/kn)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=d,i=1,d--):(h.length=d+1,i=hu(10,kn-r),h[d]=a>0?(u/hu(10,o-a)%hu(10,a)|0)*i:0),c)for(;;)if(d==0){(h[0]+=i)==Nr&&(h[0]=1,++e.e);break}else{if(h[d]+=i,h[d]!=Nr)break;h[d--]=0,i=1}for(r=h.length;h[--r]===0;)h.pop();if(In&&(e.e>pw||e.e<-pw))throw Error(kR+mr(e));return e}function YZ(e,t){var n,r,a,i,o,l,c,u,d,h,f=e.constructor,m=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),In?pn(t,m):t;if(c=e.d,h=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(d=o<0,d?(n=c,o=-o,l=h.length):(n=h,r=u,l=c.length),a=Math.max(Math.ceil(m/kn),l)+2,o>a&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for(a=c.length,l=h.length,d=a<l,d&&(l=a),a=0;a<l;a++)if(c[a]!=h[a]){d=c[a]<h[a];break}o=0}for(d&&(n=c,c=h,h=n,t.s=-t.s),l=c.length,a=h.length-l;a>0;--a)c[l++]=0;for(a=h.length;a>o;){if(c[--a]<h[a]){for(i=a;i&&c[--i]===0;)c[i]=Nr-1;--c[i],c[a]+=Nr}c[a]-=h[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,In?pn(t,m):t):new f(0)}function ad(e,t,n){var r,a=mr(e),i=so(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+Fl(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Fl(-a-1)+i,n&&(r=n-o)>0&&(i+=Fl(r))):a>=o?(i+=Fl(a+1-o),n&&(r=n-a-1)>0&&(i=i+"."+Fl(r))):((r=a+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(a+1===o&&(i+="."),i+=Fl(r))),e.s<0?"-"+i:i}function L3(e,t){if(e.length>t)return e.length=t,!0}function XZ(e){var t,n,r;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Wu+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return D3(o,i.toString())}else if(typeof i!="string")throw Error(Wu+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,$Be.test(i))D3(o,i);else throw Error(Wu+i)}if(a.prototype=Fe,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=XZ,a.config=a.set=FBe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function FBe(e){if(!e||typeof e!="object")throw Error(si+"Object expected");var t,n,r,a=["precision",1,Im,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(Mm(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Wu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Wu+n+": "+r);return this}var PR=XZ(LBe);pa=new PR(1);const mn=PR;function BBe(e){return WBe(e)||qBe(e)||UBe(e)||zBe()}function zBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
862In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UBe(e,t){if(e){if(typeof e=="string")return vP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vP(e,t)}}function qBe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function WBe(e){if(Array.isArray(e))return vP(e)}function vP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var VBe=function(t){return t},QZ={"@@functional/placeholder":!0},ZZ=function(t){return t===QZ},$3=function(t){return function n(){return arguments.length===0||arguments.length===1&&ZZ(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},HBe=function e(t,n){return t===1?n:$3(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var o=a.filter(function(l){return l!==QZ}).length;return o>=t?n.apply(void 0,a):e(t-o,$3(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=a.map(function(h){return ZZ(h)?c.shift():h});return n.apply(void 0,BBe(d).concat(c))}))})},Xj=function(t){return HBe(t.length,t)},bP=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},GBe=Xj(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),KBe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return VBe;var a=n.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},wP=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},JZ=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n&&i.every(function(l,c){return l===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function YBe(e){var t;return e===0?t=1:t=Math.floor(new mn(e).abs().log(10).toNumber())+1,t}function XBe(e,t,n){for(var r=new mn(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var QBe=Xj(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),ZBe=Xj(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),JBe=Xj(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Qj={rangeStep:XBe,getDigitCount:YBe,interpolateNumber:QBe,uninterpolateNumber:ZBe,uninterpolateTruncation:JBe};function SP(e){return nze(e)||tze(e)||eJ(e)||eze()}function eze(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
863In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tze(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nze(e){if(Array.isArray(e))return jP(e)}function dy(e,t){return aze(e)||sze(e,t)||eJ(e,t)||rze()}function rze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
864In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eJ(e,t){if(e){if(typeof e=="string")return jP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jP(e,t)}}function jP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sze(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(a)throw i}}return n}}function aze(e){if(Array.isArray(e))return e}function tJ(e){var t=dy(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function nJ(e,t,n){if(e.lte(0))return new mn(0);var r=Qj.getDigitCount(e.toNumber()),a=new mn(10).pow(r),i=e.div(a),o=r!==1?.05:.1,l=new mn(Math.ceil(i.div(o).toNumber())).add(n).mul(o),c=l.mul(a);return t?c:new mn(Math.ceil(c))}function ize(e,t,n){var r=1,a=new mn(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new mn(10).pow(Qj.getDigitCount(e)-1),a=new mn(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new mn(Math.floor(e)))}else e===0?a=new mn(Math.floor((t-1)/2)):n||(a=new mn(Math.floor(e)));var o=Math.floor((t-1)/2),l=KBe(GBe(function(c){return a.add(new mn(c-o).mul(r)).toNumber()}),bP);return l(0,t)}function rJ(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new mn(0),tickMin:new mn(0),tickMax:new mn(0)};var i=nJ(new mn(t).sub(e).div(n-1),r,a),o;e<=0&&t>=0?o=new mn(0):(o=new mn(e).add(t).div(2),o=o.sub(new mn(o).mod(i)));var l=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new mn(t).sub(o).div(i).toNumber()),u=l+c+1;return u>n?rJ(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:i,tickMin:o.sub(new mn(l).mul(i)),tickMax:o.add(new mn(c).mul(i))})}function oze(e){var t=dy(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),l=tJ([n,r]),c=dy(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var h=d===1/0?[u].concat(SP(bP(0,a-1).map(function(){return 1/0}))):[].concat(SP(bP(0,a-1).map(function(){return-1/0})),[d]);return n>r?wP(h):h}if(u===d)return ize(u,a,i);var f=rJ(u,d,o,i),m=f.step,y=f.tickMin,p=f.tickMax,x=Qj.rangeStep(y,p.add(new mn(.1).mul(m)),m);return n>r?wP(x):x}function lze(e,t){var n=dy(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=tJ([r,a]),l=dy(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var d=Math.max(t,2),h=nJ(new mn(u).sub(c).div(d-1),i,0),f=[].concat(SP(Qj.rangeStep(new mn(c),new mn(u).sub(new mn(.99).mul(h)),h)),[u]);return r>a?wP(f):f}var cze=JZ(oze),uze=JZ(lze),dze="Invariant failed";function id(e,t){throw new Error(dze)}var hze=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gw.apply(this,arguments)}function fze(e,t){return yze(e)||gze(e,t)||pze(e,t)||mze()}function mze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
865In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pze(e,t){if(e){if(typeof e=="string")return F3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F3(e,t)}}function F3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gze(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function yze(e){if(Array.isArray(e))return e}function xze(e,t){if(e==null)return{};var n=vze(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iJ(r.key),r)}}function Sze(e,t,n){return t&&wze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jze(e,t,n){return t=yw(t),Nze(e,sJ()?Reflect.construct(t,n||[],yw(e).constructor):t.apply(e,n))}function Nze(e,t){if(t&&(If(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _ze(e)}function _ze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sJ=function(){return!!e})()}function yw(e){return yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yw(e)}function Cze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NP(e,t)}function NP(e,t){return NP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},NP(e,t)}function aJ(e,t,n){return t=iJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iJ(e){var t=Eze(e,"string");return If(t)=="symbol"?t:t+""}function Eze(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ax=function(e){function t(){return bze(this,t),jze(this,t,arguments)}return Cze(t,e),Sze(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,o=r.width,l=r.dataKey,c=r.data,u=r.dataPointFormatter,d=r.xAxis,h=r.yAxis,f=xze(r,hze),m=ot(f,!1);this.props.direction==="x"&&d.type!=="number"&&id();var y=c.map(function(p){var x=u(p,l),v=x.x,b=x.y,w=x.value,S=x.errorVal;if(!S)return null;var j=[],N,C;if(Array.isArray(S)){var _=fze(S,2);N=_[0],C=_[1]}else N=C=S;if(i==="vertical"){var A=d.scale,P=b+a,R=P+o,I=P-o,B=A(w-N),$=A(w+C);j.push({x1:$,y1:R,x2:$,y2:I}),j.push({x1:B,y1:P,x2:$,y2:P}),j.push({x1:B,y1:R,x2:B,y2:I})}else if(i==="horizontal"){var q=h.scale,L=v+a,k=L-o,T=L+o,F=q(w-N),O=q(w+C);j.push({x1:k,y1:O,x2:T,y2:O}),j.push({x1:L,y1:F,x2:L,y2:O}),j.push({x1:k,y1:F,x2:T,y2:F})}return z.createElement(rn,gw({className:"recharts-errorBar",key:"bar-".concat(j.map(function(E){return"".concat(E.x1,"-").concat(E.x2,"-").concat(E.y1,"-").concat(E.y2)}))},m),j.map(function(E){return z.createElement("line",gw({},E,{key:"line-".concat(E.x1,"-").concat(E.x2,"-").concat(E.y1,"-").concat(E.y2)}))}))});return z.createElement(rn,{className:"recharts-errorBars"},y)}}])}(z.Component);aJ(Ax,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});aJ(Ax,"displayName","ErrorBar");function hy(e){"@babel/helpers - typeof";return hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hy(e)}function B3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B3(Object(n),!0).forEach(function(r){kze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kze(e,t,n){return t=Pze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pze(e){var t=Tze(e,"string");return hy(t)=="symbol"?t:t+""}function Tze(e,t){if(hy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(hy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oJ=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=ua(n,Uu);if(!o)return null;var l=Uu.defaultProps,c=l!==void 0?tu(tu({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(r||[]).reduce(function(d,h){var f=h.item,m=h.props,y=m.sectors||m.data||[];return d.concat(y.map(function(p){return{type:o.props.iconType||f.props.legendType,value:p.name,color:p.fill,payload:p}}))},[]):u=(r||[]).map(function(d){var h=d.item,f=h.type.defaultProps,m=f!==void 0?tu(tu({},f),h.props):{},y=m.dataKey,p=m.name,x=m.legendType,v=m.hide;return{inactive:v,dataKey:y,type:c.iconType||x||"square",color:TR(h),value:p||y,payload:m}}),tu(tu(tu({},c),Uu.getWithHeight(o,a)),{},{payload:u,item:o})};function fy(e){"@babel/helpers - typeof";return fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fy(e)}function z3(e){return Ize(e)||Rze(e)||Oze(e)||Aze()}function Aze(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
866In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oze(e,t){if(e){if(typeof e=="string")return _P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _P(e,t)}}function Rze(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ize(e){if(Array.isArray(e))return _P(e)}function _P(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U3(Object(n),!0).forEach(function(r){Wh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wh(e,t,n){return t=Mze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mze(e){var t=Dze(e,"string");return fy(t)=="symbol"?t:t+""}function Dze(e,t){if(fy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function br(e,t,n){return jt(e)||jt(t)?n:Sr(t)?wa(e,t,n):xt(t)?t(e):n}function eg(e,t,n,r){var a=RBe(e,function(l){return br(l,t)});if(n==="number"){var i=a.filter(function(l){return ke(l)||parseFloat(l)});return i.length?[Yj(i),Kj(i)]:[1/0,-1/0]}var o=r?a.filter(function(l){return!jt(l)}):a;return o.map(function(l){return Sr(l)||l instanceof Date?l:""})}var Lze=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var d=u>0?a[u-1].coordinate:a[l-1].coordinate,h=a[u].coordinate,f=u>=l-1?a[0].coordinate:a[u+1].coordinate,m=void 0;if(ws(h-d)!==ws(f-h)){var y=[];if(ws(f-h)===ws(c[1]-c[0])){m=f;var p=h+c[1]-c[0];y[0]=Math.min(p,(p+d)/2),y[1]=Math.max(p,(p+d)/2)}else{m=d;var x=f+c[1]-c[0];y[0]=Math.min(h,(x+h)/2),y[1]=Math.max(h,(x+h)/2)}var v=[Math.min(h,(m+h)/2),Math.max(h,(m+h)/2)];if(t>v[0]&&t<=v[1]||t>=y[0]&&t<=y[1]){o=a[u].index;break}}else{var b=Math.min(d,f),w=Math.max(d,f);if(t>(b+h)/2&&t<=(w+h)/2){o=a[u].index;break}}}else for(var S=0;S<l;S++)if(S===0&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<l-1&&t>(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===l-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){o=r[S].index;break}return o},TR=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Yn(Yn({},t.type.defaultProps),t.props):t.props,o=i.stroke,l=i.fill,c;switch(a){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},$ze=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var d=i[l[c]].stackGroups,h=Object.keys(d),f=0,m=h.length;f<m;f++){var y=d[h[f]],p=y.items,x=y.cateAxisId,v=p.filter(function(C){return Yo(C.type).indexOf("Bar")>=0});if(v&&v.length){var b=v[0].type.defaultProps,w=b!==void 0?Yn(Yn({},b),v[0].props):v[0].props,S=w.barSize,j=w[x];o[j]||(o[j]=[]);var N=jt(S)?n:S;o[j].push({item:v[0],stackList:v.slice(1),barSize:jt(N)?void 0:Ss(N,r,0)})}}return o},Fze=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=Ss(n,a,0,!0),d,h=[];if(o[0].barSize===+o[0].barSize){var f=!1,m=a/c,y=o.reduce(function(S,j){return S+j.barSize||0},0);y+=(c-1)*u,y>=a&&(y-=(c-1)*u,u=0),y>=a&&m>0&&(f=!0,m*=.9,y=c*m);var p=(a-y)/2>>0,x={offset:p-u,size:0};d=o.reduce(function(S,j){var N={item:j.item,position:{offset:x.offset+x.size+u,size:f?m:j.barSize}},C=[].concat(z3(S),[N]);return x=C[C.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(_){C.push({item:_,position:x})}),C},h)}else{var v=Ss(r,a,0,!0);a-2*v-(c-1)*u<=0&&(u=0);var b=(a-2*v-(c-1)*u)/c;b>1&&(b>>=0);var w=l===+l?Math.min(b,l):b;d=o.reduce(function(S,j,N){var C=[].concat(z3(S),[{item:j.item,position:{offset:v+(b+u)*N+(b-w)/2,size:w}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(_){C.push({item:_,position:C[C.length-1].position})}),C},h)}return d},Bze=function(t,n,r,a){var i=r.children,o=r.width,l=r.margin,c=o-(l.left||0)-(l.right||0),u=oJ({children:i,legendWidth:c});if(u){var d=a||{},h=d.width,f=d.height,m=u.align,y=u.verticalAlign,p=u.layout;if((p==="vertical"||p==="horizontal"&&y==="middle")&&m!=="center"&&ke(t[m]))return Yn(Yn({},t),{},Wh({},m,t[m]+(h||0)));if((p==="horizontal"||p==="vertical"&&m==="center")&&y!=="middle"&&ke(t[y]))return Yn(Yn({},t),{},Wh({},y,t[y]+(f||0)))}return t},zze=function(t,n,r){return jt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},lJ=function(t,n,r,a,i){var o=n.props.children,l=Sa(o,Ax).filter(function(u){return zze(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var h=br(d,r);if(jt(h))return u;var f=Array.isArray(h)?[Yj(h),Kj(h)]:[h,h],m=c.reduce(function(y,p){var x=br(d,p,0),v=f[0]-Math.abs(Array.isArray(x)?x[0]:x),b=f[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(v,y[0]),Math.max(b,y[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Uze=function(t,n,r,a,i){var o=n.map(function(l){return lJ(t,l,r,i,a)}).filter(function(l){return!jt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},cJ=function(t,n,r,a,i){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&lJ(t,c,u,a)||eg(t,u,r,i)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var d=0,h=u.length;d<h;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},uJ=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},dJ=function(t,n,r,a){if(a)return t.map(function(c){return c.coordinate});var i,o,l=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate});return i||l.push(n),o||l.push(r),l},Vo=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&o==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?ws(l[0]-l[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(h){var f=i?i.indexOf(h):h;return{coordinate:a(f)+u,value:h,offset:u}});return d.filter(function(h){return!Nx(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,f){return{coordinate:a(h)+u,value:h,index:f,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(h){return{coordinate:a(h)+u,value:h,offset:u}}):a.domain().map(function(h,f){return{coordinate:a(h)+u,value:i?i[h]:h,index:f,offset:u}})},N_=new WeakMap,tb=function(t,n){if(typeof n!="function")return t;N_.has(t)||N_.set(t,new WeakMap);var r=N_.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},hJ=function(t,n,r){var a=t.scale,i=t.type,o=t.layout,l=t.axisType;if(a==="auto")return o==="radial"&&l==="radiusAxis"?{scale:ay(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:dw(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Jp(),realScaleType:"point"}:i==="category"?{scale:ay(),realScaleType:"band"}:{scale:dw(),realScaleType:"linear"};if(jx(a)){var c="scale".concat(Ij(a));return{scale:(M3[c]||Jp)(),realScaleType:M3[c]?c:"point"}}return xt(a)?{scale:a}:{scale:Jp(),realScaleType:"point"}},q3=1e-4,fJ=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-q3,o=Math.max(a[0],a[1])+q3,l=t(n[0]),c=t(n[r-1]);(l<i||l>o||c<i||c>o)&&t.domain([n[0],n[r-1]])}},qze=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},Wze=function(t,n){if(!n||n.length!==2||!ke(n[0])||!ke(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!ke(t[0])||t[0]<r)&&(i[0]=r),(!ke(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},Vze=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,o=0,l=0;l<n;++l){var c=Nx(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=i,t[l][r][1]=i+c,i=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1])}},Hze=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,o=0;o<n;++o){var l=Nx(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=i,t[o][r][1]=i+l,i=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},Gze={sign:Vze,expand:h2e,none:Cf,silhouette:f2e,wiggle:m2e,positive:Hze},Kze=function(t,n,r){var a=n.map(function(l){return l.props.dataKey}),i=Gze[r],o=d2e().keys(a).value(function(l,c){return+br(l,c,0)}).order(Xk).offset(i);return o(t)},Yze=function(t,n,r,a,i,o){if(!t)return null;var l=o?n.reverse():n,c={},u=l.reduce(function(h,f){var m,y=(m=f.type)!==null&&m!==void 0&&m.defaultProps?Yn(Yn({},f.type.defaultProps),f.props):f.props,p=y.stackId,x=y.hide;if(x)return h;var v=y[r],b=h[v]||{hasStack:!1,stackGroups:{}};if(Sr(p)){var w=b.stackGroups[p]||{numericAxisId:r,cateAxisId:a,items:[]};w.items.push(f),b.hasStack=!0,b.stackGroups[p]=w}else b.stackGroups[km("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[f]};return Yn(Yn({},h),{},Wh({},v,b))},c),d={};return Object.keys(u).reduce(function(h,f){var m=u[f];if(m.hasStack){var y={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(p,x){var v=m.stackGroups[x];return Yn(Yn({},p),{},Wh({},x,{numericAxisId:r,cateAxisId:a,items:v.items,stackedData:Kze(t,v.items,i)}))},y)}return Yn(Yn({},h),{},Wh({},f,m))},d)},mJ=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,o=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=cze(u,i,l);return t.domain([Yj(d),Kj(d)]),{niceTicks:d}}if(i&&a==="number"){var h=t.domain(),f=uze(h,i,l);return{niceTicks:f}}return null};function W3(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!jt(a[t.dataKey])){var l=W0(n,"value",a[t.dataKey]);if(l)return l.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=br(a,jt(o)?t.dataKey:o);return jt(c)?null:t.scale(c)}var V3=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+a:null;var c=br(o,n.dataKey,n.domain[l]);return jt(c)?null:n.scale(c)-i/2+a},Xze=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},Qze=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Yn(Yn({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Sr(i)){var o=n[i];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},Zze=function(t){return t.reduce(function(n,r){return[Yj(r.concat([n[0]]).filter(ke)),Kj(r.concat([n[1]]).filter(ke))]},[1/0,-1/0])},pJ=function(t,n,r){return Object.keys(t).reduce(function(a,i){var o=t[i],l=o.stackedData,c=l.reduce(function(u,d){var h=Zze(d.slice(n,r+1));return[Math.min(u[0],h[0]),Math.max(u[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},H3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,CP=function(t,n,r){if(xt(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(ke(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(H3.test(t[0])){var i=+H3.exec(t[0])[1];a[0]=n[0]-i}else xt(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(ke(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(G3.test(t[1])){var o=+G3.exec(t[1])[1];a[1]=n[1]+o}else xt(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},xw=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=sR(n,function(h){return h.coordinate}),o=1/0,l=1,c=i.length;l<c;l++){var u=i[l],d=i[l-1];o=Math.min((u.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},K3=function(t,n,r){return!t||!t.length||Tx(t,wa(r,"type.defaultProps.domain"))?n:t},gJ=function(t,n){var r=t.type.defaultProps?Yn(Yn({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,o=r.unit,l=r.formatter,c=r.tooltipType,u=r.chartType,d=r.hide;return Yn(Yn({},ot(t,!1)),{},{dataKey:a,unit:o,formatter:l,name:i||a,color:TR(t),value:br(n,a),type:c,payload:n,chartType:u,hide:d})};function my(e){"@babel/helpers - typeof";return my=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(e)}function Y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y3(Object(n),!0).forEach(function(r){yJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yJ(e,t,n){return t=Jze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jze(e){var t=eUe(e,"string");return my(t)=="symbol"?t:t+""}function eUe(e,t){if(my(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(my(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tUe(e,t){return aUe(e)||sUe(e,t)||rUe(e,t)||nUe()}function nUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
867In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rUe(e,t){if(e){if(typeof e=="string")return X3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X3(e,t)}}function X3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sUe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function aUe(e){if(Array.isArray(e))return e}var vw=Math.PI/180,iUe=function(t){return t*180/Math.PI},Sn=function(t,n,r,a){return{x:t+Math.cos(-vw*a)*r,y:n+Math.sin(-vw*a)*r}},xJ=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},oUe=function(t,n,r,a,i){var o=t.width,l=t.height,c=t.startAngle,u=t.endAngle,d=Ss(t.cx,o,o/2),h=Ss(t.cy,l,l/2),f=xJ(o,l,r),m=Ss(t.innerRadius,f,0),y=Ss(t.outerRadius,f,f*.8),p=Object.keys(n);return p.reduce(function(x,v){var b=n[v],w=b.domain,S=b.reversed,j;if(jt(b.range))a==="angleAxis"?j=[c,u]:a==="radiusAxis"&&(j=[m,y]),S&&(j=[j[1],j[0]]);else{j=b.range;var N=j,C=tUe(N,2);c=C[0],u=C[1]}var _=hJ(b,i),A=_.realScaleType,P=_.scale;P.domain(w).range(j),fJ(P);var R=mJ(P,Lo(Lo({},b),{},{realScaleType:A})),I=Lo(Lo(Lo({},b),R),{},{range:j,radius:y,realScaleType:A,scale:P,cx:d,cy:h,innerRadius:m,outerRadius:y,startAngle:c,endAngle:u});return Lo(Lo({},x),{},yJ({},v,I))},{})},lUe=function(t,n){var r=t.x,a=t.y,i=n.x,o=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-o,2))},cUe=function(t,n){var r=t.x,a=t.y,i=n.cx,o=n.cy,l=lUe({x:r,y:a},{x:i,y:o});if(l<=0)return{radius:l};var c=(r-i)/l,u=Math.acos(c);return a>o&&(u=2*Math.PI-u),{radius:l,angle:iUe(u),angleInRadian:u}},uUe=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),o=Math.min(a,i);return{startAngle:n-o*360,endAngle:r-o*360}},dUe=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),o=Math.floor(a/360),l=Math.min(i,o);return t+l*360},Q3=function(t,n){var r=t.x,a=t.y,i=cUe({x:r,y:a},n),o=i.radius,l=i.angle,c=n.innerRadius,u=n.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var d=uUe(n),h=d.startAngle,f=d.endAngle,m=l,y;if(h<=f){for(;m>f;)m-=360;for(;m<h;)m+=360;y=m>=h&&m<=f}else{for(;m>h;)m-=360;for(;m<f;)m+=360;y=m>=f&&m<=h}return y?Lo(Lo({},n),{},{radius:o,angle:dUe(m,n)}):null},vJ=function(t){return!g.isValidElement(t)&&!xt(t)&&typeof t!="boolean"?t.className:""};function py(e){"@babel/helpers - typeof";return py=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},py(e)}var hUe=["offset"];function fUe(e){return yUe(e)||gUe(e)||pUe(e)||mUe()}function mUe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
868In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pUe(e,t){if(e){if(typeof e=="string")return EP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EP(e,t)}}function gUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yUe(e){if(Array.isArray(e))return EP(e)}function EP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xUe(e,t){if(e==null)return{};var n=vUe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Z3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z3(Object(n),!0).forEach(function(r){bUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bUe(e,t,n){return t=wUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wUe(e){var t=SUe(e,"string");return py(t)=="symbol"?t:t+""}function SUe(e,t){if(py(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(py(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(this,arguments)}var jUe=function(t){var n=t.value,r=t.formatter,a=jt(t.children)?n:t.children;return xt(r)?r(a):a},NUe=function(t,n){var r=ws(n-t),a=Math.min(Math.abs(n-t),360);return r*a},_Ue=function(t,n,r){var a=t.position,i=t.viewBox,o=t.offset,l=t.className,c=i,u=c.cx,d=c.cy,h=c.innerRadius,f=c.outerRadius,m=c.startAngle,y=c.endAngle,p=c.clockWise,x=(h+f)/2,v=NUe(m,y),b=v>=0?1:-1,w,S;a==="insideStart"?(w=m+b*o,S=p):a==="insideEnd"?(w=y-b*o,S=!p):a==="end"&&(w=y+b*o,S=p),S=v<=0?S:!S;var j=Sn(u,d,x,w),N=Sn(u,d,x,w+(S?1:-1)*359),C="M".concat(j.x,",").concat(j.y,`
869    A`).concat(x,",").concat(x,",0,1,").concat(S?0:1,`,
870    `).concat(N.x,",").concat(N.y),_=jt(t.id)?km("recharts-radial-line-"):t.id;return z.createElement("text",gy({},r,{dominantBaseline:"central",className:Nt("recharts-radial-bar-label",l)}),z.createElement("defs",null,z.createElement("path",{id:_,d:C})),z.createElement("textPath",{xlinkHref:"#".concat(_)},n))},CUe=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,o=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,d=i.startAngle,h=i.endAngle,f=(d+h)/2;if(a==="outside"){var m=Sn(o,l,u+r,f),y=m.x,p=m.y;return{x:y,y:p,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var x=(c+u)/2,v=Sn(o,l,x,f),b=v.x,w=v.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},EUe=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,o=n,l=o.x,c=o.y,u=o.width,d=o.height,h=d>=0?1:-1,f=h*a,m=h>0?"end":"start",y=h>0?"start":"end",p=u>=0?1:-1,x=p*a,v=p>0?"end":"start",b=p>0?"start":"end";if(i==="top"){var w={x:l+u/2,y:c-h*a,textAnchor:"middle",verticalAnchor:m};return gr(gr({},w),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var S={x:l+u/2,y:c+d+f,textAnchor:"middle",verticalAnchor:y};return gr(gr({},S),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(i==="left"){var j={x:l-x,y:c+d/2,textAnchor:v,verticalAnchor:"middle"};return gr(gr({},j),r?{width:Math.max(j.x-r.x,0),height:d}:{})}if(i==="right"){var N={x:l+u+x,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return gr(gr({},N),r?{width:Math.max(r.x+r.width-N.x,0),height:d}:{})}var C=r?{width:u,height:d}:{};return i==="insideLeft"?gr({x:l+x,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},C):i==="insideRight"?gr({x:l+u-x,y:c+d/2,textAnchor:v,verticalAnchor:"middle"},C):i==="insideTop"?gr({x:l+u/2,y:c+f,textAnchor:"middle",verticalAnchor:y},C):i==="insideBottom"?gr({x:l+u/2,y:c+d-f,textAnchor:"middle",verticalAnchor:m},C):i==="insideTopLeft"?gr({x:l+x,y:c+f,textAnchor:b,verticalAnchor:y},C):i==="insideTopRight"?gr({x:l+u-x,y:c+f,textAnchor:v,verticalAnchor:y},C):i==="insideBottomLeft"?gr({x:l+x,y:c+d-f,textAnchor:b,verticalAnchor:m},C):i==="insideBottomRight"?gr({x:l+u-x,y:c+d-f,textAnchor:v,verticalAnchor:m},C):Nm(i)&&(ke(i.x)||ju(i.x))&&(ke(i.y)||ju(i.y))?gr({x:l+Ss(i.x,u),y:c+Ss(i.y,d),textAnchor:"end",verticalAnchor:"end"},C):gr({x:l+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},C)},kUe=function(t){return"cx"in t&&ke(t.cx)};function Cr(e){var t=e.offset,n=t===void 0?5:t,r=xUe(e,hUe),a=gr({offset:n},r),i=a.viewBox,o=a.position,l=a.value,c=a.children,u=a.content,d=a.className,h=d===void 0?"":d,f=a.textBreakAll;if(!i||jt(l)&&jt(c)&&!g.isValidElement(u)&&!xt(u))return null;if(g.isValidElement(u))return g.cloneElement(u,a);var m;if(xt(u)){if(m=g.createElement(u,a),g.isValidElement(m))return m}else m=jUe(a);var y=kUe(i),p=ot(a,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return _Ue(a,m,p);var x=y?CUe(a):EUe(a);return z.createElement(sd,gy({className:Nt("recharts-label",h)},p,x,{breakAll:f}),m)}Cr.displayName="Label";var bJ=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,h=t.x,f=t.y,m=t.top,y=t.left,p=t.width,x=t.height,v=t.clockWise,b=t.labelViewBox;if(b)return b;if(ke(p)&&ke(x)){if(ke(h)&&ke(f))return{x:h,y:f,width:p,height:x};if(ke(m)&&ke(y))return{x:m,y,width:p,height:x}}return ke(h)&&ke(f)?{x:h,y:f,width:0,height:0}:ke(n)&&ke(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:d||c||l||0,clockWise:v}:t.viewBox?t.viewBox:{}},PUe=function(t,n){return t?t===!0?z.createElement(Cr,{key:"label-implicit",viewBox:n}):Sr(t)?z.createElement(Cr,{key:"label-implicit",viewBox:n,value:t}):g.isValidElement(t)?t.type===Cr?g.cloneElement(t,{key:"label-implicit",viewBox:n}):z.createElement(Cr,{key:"label-implicit",content:t,viewBox:n}):xt(t)?z.createElement(Cr,{key:"label-implicit",content:t,viewBox:n}):Nm(t)?z.createElement(Cr,gy({viewBox:n},t,{key:"label-implicit"})):null:null},TUe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,i=bJ(t),o=Sa(a,Cr).map(function(c,u){return g.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return o;var l=PUe(t.label,n||i);return[l].concat(fUe(o))};Cr.parseViewBox=bJ;Cr.renderCallByParent=TUe;function AUe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var OUe=AUe;const RUe=$t(OUe);function yy(e){"@babel/helpers - typeof";return yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yy(e)}var IUe=["valueAccessor"],MUe=["data","dataKey","clockWise","id","textBreakAll"];function DUe(e){return BUe(e)||FUe(e)||$Ue(e)||LUe()}function LUe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
871In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ue(e,t){if(e){if(typeof e=="string")return kP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kP(e,t)}}function FUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BUe(e){if(Array.isArray(e))return kP(e)}function kP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bw.apply(this,arguments)}function J3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function e5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J3(Object(n),!0).forEach(function(r){zUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zUe(e,t,n){return t=UUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UUe(e){var t=qUe(e,"string");return yy(t)=="symbol"?t:t+""}function qUe(e,t){if(yy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(yy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t5(e,t){if(e==null)return{};var n=WUe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var VUe=function(t){return Array.isArray(t.value)?RUe(t.value):t.value};function Qo(e){var t=e.valueAccessor,n=t===void 0?VUe:t,r=t5(e,IUe),a=r.data,i=r.dataKey,o=r.clockWise,l=r.id,c=r.textBreakAll,u=t5(r,MUe);return!a||!a.length?null:z.createElement(rn,{className:"recharts-label-list"},a.map(function(d,h){var f=jt(i)?n(d,h):br(d&&d.payload,i),m=jt(l)?{}:{id:"".concat(l,"-").concat(h)};return z.createElement(Cr,bw({},ot(d,!0),u,m,{parentViewBox:d.parentViewBox,value:f,textBreakAll:c,viewBox:Cr.parseViewBox(jt(o)?d:e5(e5({},d),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}Qo.displayName="LabelList";function HUe(e,t){return e?e===!0?z.createElement(Qo,{key:"labelList-implicit",data:t}):z.isValidElement(e)||xt(e)?z.createElement(Qo,{key:"labelList-implicit",data:t,content:e}):Nm(e)?z.createElement(Qo,bw({data:t},e,{key:"labelList-implicit"})):null:null}function GUe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=Sa(r,Qo).map(function(o,l){return g.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return a;var i=HUe(e.label,t);return[i].concat(DUe(a))}Qo.renderCallByParent=GUe;function xy(e){"@babel/helpers - typeof";return xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xy(e)}function PP(){return PP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PP.apply(this,arguments)}function n5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function r5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n5(Object(n),!0).forEach(function(r){KUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KUe(e,t,n){return t=YUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YUe(e){var t=XUe(e,"string");return xy(t)=="symbol"?t:t+""}function XUe(e,t){if(xy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QUe=function(t,n){var r=ws(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},nb=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+a,h=Math.asin(c/d)/vw,f=u?i:i+o*h,m=Sn(n,r,d,f),y=Sn(n,r,a,f),p=u?i-o*h:i,x=Sn(n,r,d*Math.cos(h*vw),p);return{center:m,circleTangency:y,lineTangency:x,theta:h}},wJ=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,l=t.endAngle,c=QUe(o,l),u=o+c,d=Sn(n,r,i,o),h=Sn(n,r,i,u),f="M ".concat(d.x,",").concat(d.y,`
872    A `).concat(i,",").concat(i,`,0,
873    `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`,
874    `).concat(h.x,",").concat(h.y,`
875  `);if(a>0){var m=Sn(n,r,a,o),y=Sn(n,r,a,u);f+="L ".concat(y.x,",").concat(y.y,`
876            A `).concat(a,",").concat(a,`,0,
877            `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`,
878            `).concat(m.x,",").concat(m.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},ZUe=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,h=ws(d-u),f=nb({cx:n,cy:r,radius:i,angle:u,sign:h,cornerRadius:o,cornerIsExternal:c}),m=f.circleTangency,y=f.lineTangency,p=f.theta,x=nb({cx:n,cy:r,radius:i,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:c}),v=x.circleTangency,b=x.lineTangency,w=x.theta,S=c?Math.abs(u-d):Math.abs(u-d)-p-w;if(S<0)return l?"M ".concat(y.x,",").concat(y.y,`
879        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
880        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
881      `):wJ({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d});var j="M ".concat(y.x,",").concat(y.y,`
882    A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(m.x,",").concat(m.y,`
883    A`).concat(i,",").concat(i,",0,").concat(+(S>180),",").concat(+(h<0),",").concat(v.x,",").concat(v.y,`
884    A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(b.x,",").concat(b.y,`
885  `);if(a>0){var N=nb({cx:n,cy:r,radius:a,angle:u,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),C=N.circleTangency,_=N.lineTangency,A=N.theta,P=nb({cx:n,cy:r,radius:a,angle:d,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),R=P.circleTangency,I=P.lineTangency,B=P.theta,$=c?Math.abs(u-d):Math.abs(u-d)-A-B;if($<0&&o===0)return"".concat(j,"L").concat(n,",").concat(r,"Z");j+="L".concat(I.x,",").concat(I.y,`
886      A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,`
887      A`).concat(a,",").concat(a,",0,").concat(+($>180),",").concat(+(h>0),",").concat(C.x,",").concat(C.y,`
888      A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(_.x,",").concat(_.y,"Z")}else j+="L".concat(n,",").concat(r,"Z");return j},JUe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},SJ=function(t){var n=r5(r5({},JUe),t),r=n.cx,a=n.cy,i=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,h=n.endAngle,f=n.className;if(o<i||d===h)return null;var m=Nt("recharts-sector",f),y=o-i,p=Ss(l,y,0,!0),x;return p>0&&Math.abs(d-h)<360?x=ZUe({cx:r,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(p,y/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:h}):x=wJ({cx:r,cy:a,innerRadius:i,outerRadius:o,startAngle:d,endAngle:h}),z.createElement("path",PP({},ot(n,!0),{className:m,d:x,role:"img"}))};function vy(e){"@babel/helpers - typeof";return vy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vy(e)}function TP(){return TP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TP.apply(this,arguments)}function s5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function a5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
888t%2?s5(Object(n),!0).forEach(function(r){e8e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e8e(e,t,n){return t=t8e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t8e(e){var t=n8e(e,"string");return vy(t)=="symbol"?t:t+""}function n8e(e,t){if(vy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(vy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i5={curveBasisClosed:e2e,curveBasisOpen:t2e,curveBasis:JOe,curveBumpX:FOe,curveBumpY:BOe,curveLinearClosed:n2e,curveLinear:Dj,curveMonotoneX:r2e,curveMonotoneY:s2e,curveNatural:a2e,curveStep:i2e,curveStepAfter:l2e,curveStepBefore:o2e},rb=function(t){return t.x===+t.x&&t.y===+t.y},up=function(t){return t.x},dp=function(t){return t.y},r8e=function(t,n){if(xt(t))return t;var r="curve".concat(Ij(t));return(r==="curveMonotone"||r==="curveBump")&&n?i5["".concat(r).concat(n==="vertical"?"Y":"X")]:i5[r]||Dj},s8e=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=r8e(r,l),h=u?i.filter(function(p){return rb(p)}):i,f;if(Array.isArray(o)){var m=u?o.filter(function(p){return rb(p)}):o,y=h.map(function(p,x){return a5(a5({},p),{},{base:m[x]})});return l==="vertical"?f=Gv().y(dp).x1(up).x0(function(p){return p.base.x}):f=Gv().x(up).y1(dp).y0(function(p){return p.base.y}),f.defined(rb).curve(d),f(y)}return l==="vertical"&&ke(o)?f=Gv().y(dp).x1(up).x0(o):ke(o)?f=Gv().x(up).y1(dp).y0(o):f=gQ().x(up).y(dp),f.defined(rb).curve(d),f(h)},ww=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var o=r&&r.length?s8e(t):a;return z.createElement("path",TP({},ot(t,!1),V0(t),{className:Nt("recharts-curve",n),d:o,ref:i}))},jJ={exports:{}},a8e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i8e=a8e,o8e=i8e;function NJ(){}function _J(){}_J.resetWarningCache=NJ;var l8e=function(){function e(r,a,i,o,l,c){if(c!==o8e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_J,resetWarningCache:NJ};return n.PropTypes=n,n};jJ.exports=l8e();var c8e=jJ.exports;const ce=$t(c8e);var u8e=Object.getOwnPropertyNames,d8e=Object.getOwnPropertySymbols,h8e=Object.prototype.hasOwnProperty;function o5(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function sb(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);var i=a.cache,o=i.get(n),l=i.get(r);if(o&&l)return o===r&&l===n;i.set(n,r),i.set(r,n);var c=e(n,r,a);return i.delete(n),i.delete(r),c}}function l5(e){return u8e(e).concat(d8e(e))}var CJ=Object.hasOwn||function(e,t){return h8e.call(e,t)};function Dm(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var EJ="_owner",c5=Object.getOwnPropertyDescriptor,u5=Object.keys;function f8e(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function m8e(e,t){return Dm(e.getTime(),t.getTime())}function d5(e,t,n){if(e.size!==t.size)return!1;for(var r={},a=e.entries(),i=0,o,l;(o=a.next())&&!o.done;){for(var c=t.entries(),u=!1,d=0;(l=c.next())&&!l.done;){var h=o.value,f=h[0],m=h[1],y=l.value,p=y[0],x=y[1];!u&&!r[d]&&(u=n.equals(f,p,i,d,e,t,n)&&n.equals(m,x,f,p,e,t,n))&&(r[d]=!0),d++}if(!u)return!1;i++}return!0}function p8e(e,t,n){var r=u5(e),a=r.length;if(u5(t).length!==a)return!1;for(var i;a-- >0;)if(i=r[a],i===EJ&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!CJ(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function hp(e,t,n){var r=l5(e),a=r.length;if(l5(t).length!==a)return!1;for(var i,o,l;a-- >0;)if(i=r[a],i===EJ&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!CJ(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(o=c5(e,i),l=c5(t,i),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function g8e(e,t){return Dm(e.valueOf(),t.valueOf())}function y8e(e,t){return e.source===t.source&&e.flags===t.flags}function h5(e,t,n){if(e.size!==t.size)return!1;for(var r={},a=e.values(),i,o;(i=a.next())&&!i.done;){for(var l=t.values(),c=!1,u=0;(o=l.next())&&!o.done;)!c&&!r[u]&&(c=n.equals(i.value,o.value,i.value,o.value,e,t,n))&&
888(r[u]=!0),u++;if(!c)return!1}return!0}function x8e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var v8e="[object Arguments]",b8e="[object Boolean]",w8e="[object Date]",S8e="[object Map]",j8e="[object Number]",N8e="[object Object]",_8e="[object RegExp]",C8e="[object Set]",E8e="[object String]",k8e=Array.isArray,f5=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,m5=Object.assign,P8e=Object.prototype.toString.call.bind(Object.prototype.toString);function T8e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,a=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,l=e.areSetsEqual,c=e.areTypedArraysEqual;return function(d,h,f){if(d===h)return!0;if(d==null||h==null||typeof d!="object"||typeof h!="object")return d!==d&&h!==h;var m=d.constructor;if(m!==h.constructor)return!1;if(m===Object)return a(d,h,f);if(k8e(d))return t(d,h,f);if(f5!=null&&f5(d))return c(d,h,f);if(m===Date)return n(d,h,f);if(m===RegExp)return o(d,h,f);if(m===Map)return r(d,h,f);if(m===Set)return l(d,h,f);var y=P8e(d);return y===w8e?n(d,h,f):y===_8e?o(d,h,f):y===S8e?r(d,h,f):y===C8e?l(d,h,f):y===N8e?typeof d.then!="function"&&typeof h.then!="function"&&a(d,h,f):y===v8e?a(d,h,f):y===b8e||y===j8e||y===E8e?i(d,h,f):!1}}function A8e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,a={areArraysEqual:r?hp:f8e,areDatesEqual:m8e,areMapsEqual:r?o5(d5,hp):d5,areObjectsEqual:r?hp:p8e,arePrimitiveWrappersEqual:g8e,areRegExpsEqual:y8e,areSetsEqual:r?o5(h5,hp):h5,areTypedArraysEqual:r?hp:x8e};if(n&&(a=m5({},a,n(a))),t){var i=sb(a.areArraysEqual),o=sb(a.areMapsEqual),l=sb(a.areObjectsEqual),c=sb(a.areSetsEqual);a=m5({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return a}function O8e(e){return function(t,n,r,a,i,o,l){return e(t,n,l)}}function R8e(e){var t=e.circular,n=e.comparator,r=e.createState,a=e.equals,i=e.strict;if(r)return function(c,u){var d=r(),h=d.cache,f=h===void 0?t?new WeakMap:void 0:h,m=d.meta;return n(c,u,{cache:f,equals:a,meta:m,strict:i})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,u){return n(c,u,o)}}var I8e=Yc();Yc({strict:!0});Yc({circular:!0});Yc({circular:!0,strict:!0});Yc({createInternalComparator:function(){return Dm}});Yc({strict:!0,createInternalComparator:function(){return Dm}});Yc({circular:!0,createInternalComparator:function(){return Dm}});Yc({circular:!0,createInternalComparator:function(){return Dm},strict:!0});function Yc(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,l=A8e(e),c=T8e(l),u=r?r(c):O8e(c);return R8e({circular:n,comparator:c,createState:a,equals:u,strict:o})}function M8e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function p5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):M8e(a)};requestAnimationFrame(r)}function AP(e){"@babel/helpers - typeof";return AP=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},AP(e)}function D8e(e){return B8e(e)||F8e(e)||$8e(e)||L8e()}function L8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
889In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8e(e,t){if(e){if(typeof e=="string")return g5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g5(e,t)}}function g5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F8e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B8e(e){if(Array.isArray(e))return e}function z8e(){var e={},t=function(){return null}
vendor: 59,765 bytes, lines 889-907
889,n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var o=i,l=D8e(o),c=l[0],u=l.slice(1);if(typeof c=="number"){p5(a.bind(null,u),c);return}a(c),p5(a.bind(null,u));return}AP(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function by(e){"@babel/helpers - typeof";return by=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},by(e)}function y5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function x5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(n),!0).forEach(function(r){kJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kJ(e,t,n){return t=U8e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U8e(e){var t=q8e(e,"string");return by(t)==="symbol"?t:String(t)}function q8e(e,t){if(by(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(by(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W8e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},V8e=function(t){return t},H8e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},tg=function(t,n){return Object.keys(n).reduce(function(r,a){return x5(x5({},r),{},kJ({},a,t(a,n[a])))},{})},v5=function(t,n,r){return t.map(function(a){return"".concat(H8e(a)," ").concat(n,"ms ").concat(r)}).join(",")};function G8e(e,t){return X8e(e)||Y8e(e,t)||PJ(e,t)||K8e()}function K8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
890In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y8e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function X8e(e){if(Array.isArray(e))return e}function Q8e(e){return eqe(e)||J8e(e)||PJ(e)||Z8e()}function Z8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
891In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PJ(e,t){if(e){if(typeof e=="string")return OP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OP(e,t)}}function J8e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eqe(e){if(Array.isArray(e))return OP(e)}function OP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Sw=1e-4,TJ=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},AJ=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},b5=function(t,n){return function(r){var a=TJ(t,n);return AJ(a,r)}},tqe=function(t,n){return function(r){var a=TJ(t,n),i=[].concat(Q8e(a.map(function(o,l){return o*l}).slice(1)),[0]);return AJ(i,r)}},w5=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,o=1,l=1;break;case"ease":a=.25,i=.1,o=.25,l=1;break;case"ease-in":a=.42,i=0,o=1,l=1;break;case"ease-out":a=.42,i=0,o=.58,l=1;break;case"ease-in-out":a=0,i=0,o=.58,l=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(x){return parseFloat(x)}),d=G8e(u,4);a=d[0],i=d[1],o=d[2],l=d[3]}}}var h=b5(a,o),f=b5(i,l),m=tqe(a,o),y=function(v){return v>1?1:v<0?0:v},p=function(v){for(var b=v>1?1:v,w=b,S=0;S<8;++S){var j=h(w)-b,N=m(w);if(Math.abs(j-b)<Sw||N<Sw)return f(w);w=y(w-j/N)}return f(w)};return p.isStepper=!1,p},nqe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,o=t.dt,l=o===void 0?17:o,c=function(d,h,f){var m=-(d-h)*r,y=f*i,p=f+(m-y)*l/1e3,x=f*l/1e3+d;return Math.abs(x-h)<Sw&&Math.abs(p)<Sw?[h,0]:[x,p]};return c.isStepper=!0,c.dt=l,c},rqe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return w5(a);case"spring":return nqe();default:if(a.split("(")[0]==="cubic-bezier")return w5(a)}return typeof a=="function"?a:null};function wy(e){"@babel/helpers - typeof";return wy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wy(e)}function S5(e){return iqe(e)||aqe(e)||OJ(e)||sqe()}function sqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
892In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iqe(e){if(Array.isArray(e))return IP(e)}function j5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j5(Object(n),!0).forEach(function(r){RP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RP(e,t,n){return t=oqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oqe(e){var t=lqe(e,"string");return wy(t)==="symbol"?t:String(t)}function lqe(e,t){if(wy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cqe(e,t){return hqe(e)||dqe(e,t)||OJ(e,t)||uqe()}function uqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
893In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OJ(e,t){if(e){if(typeof e=="string")return IP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IP(e,t)}}function IP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function hqe(e){if(Array.isArray(e))return e}var jw=function(t,n,r){return t+(n-t)*r},MP=function(t){var n=t.from,r=t.to;return n!==r},fqe=function e(t,n,r){var a=tg(function(i,o){if(MP(o)){var l=t(o.from,o.to,o.velocity),c=cqe(l,2),u=c[0],d=c[1];return Rr(Rr({},o),{},{from:u,velocity:d})}return o},n);return r<1?tg(function(i,o){return MP(o)?Rr(Rr({},o),{},{velocity:jw(o.velocity,a[i].velocity,r),from:jw(o.from,a[i].from,r)}):o},n):e(t,a,r-1)};const mqe=function(e,t,n,r,a){var i=W8e(e,t),o=i.reduce(function(x,v){return Rr(Rr({},x),{},RP({},v,[e[v],t[v]]))},{}),l=i.reduce(function(x,v){return Rr(Rr({},x),{},RP({},v,{from:e[v],velocity:0,to:t[v]}))},{}),c=-1,u,d,h=function(){return null},f=function(){return tg(function(v,b){return b.from},l)},m=function(){return!Object.values(l).filter(MP).length},y=function(v){u||(u=v);var b=v-u,w=b/n.dt;l=fqe(n,l,w),a(Rr(Rr(Rr({},e),t),f())),u=v,m()||(c=requestAnimationFrame(h))},p=function(v){d||(d=v);var b=(v-d)/r,w=tg(function(j,N){return jw.apply(void 0,S5(N).concat([n(b)]))},o);if(a(Rr(Rr(Rr({},e),t),w)),b<1)c=requestAnimationFrame(h);else{var S=tg(function(j,N){return jw.apply(void 0,S5(N).concat([n(1)]))},o);a(Rr(Rr(Rr({},e),t),S))}};return h=n.isStepper?y:p,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}};function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}var pqe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function gqe(e,t){if(e==null)return{};var n=yqe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yqe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function __(e){return wqe(e)||bqe(e)||vqe(e)||xqe()}function xqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
894In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vqe(e,t){if(e){if(typeof e=="string")return DP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DP(e,t)}}function bqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wqe(e){if(Array.isArray(e))return DP(e)}function DP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N5(Object(n),!0).forEach(function(r){Ap(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ap(e,t,n){return t=RJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jqe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RJ(r.key),r)}}function Nqe(e,t,n){return t&&jqe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RJ(e){var t=_qe(e,"string");return Mf(t)==="symbol"?t:String(t)}function _qe(e,t){if(Mf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LP(e,t)}function LP(e,t){return LP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},LP(e,t)}function Eqe(e){var t=kqe();return function(){var r=Nw(e),a;if(t){var i=Nw(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return $P(this,a)}}function $P(e,t){if(t&&(Mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FP(e)}function FP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kqe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nw(e){return Nw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nw(e)}var jo=function(e){Cqe(n,e);var t=Eqe(n);function n(r,a){var i;Sqe(this,n),i=t.call(this,r,a);var o=i.props,l=o.isActive,c=o.attributeName,u=o.from,d=o.to,h=o.steps,f=o.children,m=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(FP(i)),i.changeStyle=i.changeStyle.bind(FP(i)),!l||m<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:d}),$P(i);if(h&&h.length)i.state={style:h[0].style};else if(u){if(typeof f=="function")return i.state={style:u},$P(i);i.state={style:c?Ap({},c,u):u}}else i.state={style:{}};return i}return Nqe(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,d=i.to,h=i.from,f=this.state.style;if(l){if(!o){var m={style:c?Ap({},c,d):d};this.state&&f&&(c&&f[c]!==d||!c&&f!==d)&&this.setState(m);return}if(!(I8e(a.to,d)&&a.canBegin&&a.isActive)){var y=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=y||u?h:a.to;if(this.state&&f){var x={style:c?Ap({},c,p):p};(c&&f[c]!==p||!c&&f!==p)&&this.setState(x)}this.runAnimation(ui(ui({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,l=a.to,c=a.duration,u=a.easing,d=a.begin,h=a.onAnimationEnd,f=a.onAnimationStart,m=mqe(o,l,rqe(u),c,this.changeStyle),y=function(){i.stopJSAnimation=m()};this.manager.start([f,d,y,c,h])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,l=a.begin,c=a.onAnimationStart,u=o[0],d=u.style,h=u.duration,f=h===void 0?0:h,m=function(p,x,v){if(v===0)return p;var b=x.duration,w=x.easing,S=w===void 0?"ease":w,j=x.style,N=x.properties,C=x.onAnimationEnd,_=v>0?o[v-1]:x,A=N||Object.keys(j);if(typeof S=="function"||S==="spring")return[].concat(__(p),[i.runJSAnimation.bind(i,{from:_.style,to:j,duration:b,easing:S}),b]);var P=v5(A,b,S),R=ui(ui(ui({},_.style),j),{},{transition:P});return[].concat(__(p),[R,b,C]).filter(V8e)};return this.manager.start([c].concat(__(o.reduce(m,[d,Math.max(f,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=z8e());var i=a.begin,o=a.duration,l=a.attributeName,c=a.to,u=a.easing,d=a.onAnimationStart,h=a.onAnimationEnd,f=a.steps,m=a.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(a);return}if(f.length>1){this.runStepAnimation(a);return}var p=l?Ap({},l,c):c,x=v5(Object.keys(p),o,u);y.start([d,i,ui(ui({},p),{},{transition:x}),o,h])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=gqe(a,pqe),u=g.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!l||u===0||o<=0)return i;var h=function(m){var y=m.props,p=y.style,x=p===void 0?{}:p,v=y.className,b=g.cloneElement(m,ui(ui({},c),{},{style:ui(ui({},x),d),className:v}));return b};return u===1?h(g.Children.only(i)):z.createElement("div",null,g.Children.map(i,function(f){return h(f)}))}}]),n}(g.PureComponent);jo.displayName="Animate";jo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};jo.propTypes={from:ce.oneOfType([ce.object,ce.string]),to:ce.oneOfType([ce.object,ce.string]),attributeName:ce.string,duration:ce.number,begin:ce.number,easing:ce.oneOfType([ce.string,ce.func]),steps:ce.arrayOf(ce.shape({duration:ce.number.isRequired,style:ce.object.isRequired,easing:ce.oneOfType([ce.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ce.func]),properties:ce.arrayOf("string"),onAnimationEnd:ce.func})),children:ce.oneOfType([ce.node,ce.func]),isActive:ce.bool,canBegin:ce.bool,onAnimationEnd:ce.func,shouldReAnimate:ce.bool,onAnimationStart:ce.func,onAnimationReStart:ce.func};ce.object,ce.object,ce.object,ce.element;ce.object,ce.object,ce.object,ce.oneOfType([ce.array,ce.element]),ce.any;function Sy(e){"@babel/helpers - typeof";return Sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sy(e)}function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_w.apply(this,arguments)}function Pqe(e,t){return Rqe(e)||Oqe(e,t)||Aqe(e,t)||Tqe()}function Tqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
895In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aqe(e,t){if(e){if(typeof e=="string")return _5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _5(e,t)}}function _5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Rqe(e){if(Array.isArray(e))return e}function C5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function E5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C5(Object(n),!0).forEach(function(r){Iqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iqe(e,t,n){return t=Mqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mqe(e){var t=Dqe(e,"string");return Sy(t)=="symbol"?t:t+""}function Dqe(e,t){if(Sy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Sy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k5=function(t,n,r,a,i){var o=Math.min(Math.abs(r)/2,Math.abs(a)/2),l=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,d;if(o>0&&i instanceof Array){for(var h=[0,0,0,0],f=0,m=4;f<m;f++)h[f]=i[f]>o?o:i[f];d="M".concat(t,",").concat(n+l*h[0]),h[0]>0&&(d+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(u,",").concat(t+c*h[0],",").concat(n)),d+="L ".concat(t+r-c*h[1],",").concat(n),h[1]>0&&(d+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(u,`,
896        `).concat(t+r,",").concat(n+l*h[1])),d+="L ".concat(t+r,",").concat(n+a-l*h[2]),h[2]>0&&(d+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(u,`,
897        `).concat(t+r-c*h[2],",").concat(n+a)),d+="L ".concat(t+c*h[3],",").concat(n+a),h[3]>0&&(d+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(u,`,
898        `).concat(t,",").concat(n+a-l*h[3])),d+="Z"}else if(o>0&&i===+i&&i>0){var y=Math.min(o,i);d="M ".concat(t,",").concat(n+l*y,`
899            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+c*y,",").concat(n,`
900            L `).concat(t+r-c*y,",").concat(n,`
901            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+r,",").concat(n+l*y,`
902            L `).concat(t+r,",").concat(n+a-l*y,`
903            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+r-c*y,",").concat(n+a,`
904            L `).concat(t+c*y,",").concat(n+a,`
905            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(n+a-l*y," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return d},Lqe=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,o=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),d=Math.max(i,i+l),h=Math.min(o,o+c),f=Math.max(o,o+c);return r>=u&&r<=d&&a>=h&&a<=f}return!1},$qe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},AR=function(t){var n=E5(E5({},$qe),t),r=g.useRef(),a=g.useState(-1),i=Pqe(a,2),o=i[0],l=i[1];g.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&l(S)}catch{}},[]);var c=n.x,u=n.y,d=n.width,h=n.height,f=n.radius,m=n.className,y=n.animationEasing,p=n.animationDuration,x=n.animationBegin,v=n.isAnimationActive,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||h!==+h||d===0||h===0)return null;var w=Nt("recharts-rectangle",m);return b?z.createElement(jo,{canBegin:o>0,from:{width:d,height:h,x:c,y:u},to:{width:d,height:h,x:c,y:u},duration:p,animationEasing:y,isActive:b},function(S){var j=S.width,N=S.height,C=S.x,_=S.y;return z.createElement(jo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:p,isActive:v,easing:y},z.createElement("path",_w({},ot(n,!0),{className:w,d:k5(C,_,j,N,f),ref:r})))}):z.createElement("path",_w({},ot(n,!0),{className:w,d:k5(c,u,d,h,f)}))},Fqe=["points","className","baseLinePoints","connectNulls"];function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ch.apply(this,arguments)}function Bqe(e,t){if(e==null)return{};var n=zqe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function P5(e){return Vqe(e)||Wqe(e)||qqe(e)||Uqe()}function Uqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
906In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qqe(e,t){if(e){if(typeof e=="string")return BP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BP(e,t)}}function Wqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vqe(e){if(Array.isArray(e))return BP(e)}function BP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T5=function(t){return t&&t.x===+t.x&&t.y===+t.y},Hqe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){T5(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),T5(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ng=function(t,n){var r=Hqe(t);n&&(r=[r.reduce(function(i,o){return[].concat(P5(i),P5(o))},[])]);var a=r.map(function(i){return i.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},Gqe=function(t,n,r){var a=ng(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ng(n.reverse(),r).slice(1))},Kqe=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,o=Bqe(t,Fqe);if(!n||!n.length)return null;var l=Nt("recharts-polygon",r);if(a&&a.length){var c=o.stroke&&o.stroke!=="none",u=Gqe(n,a,i);return z.createElement("g",{className:l},z.createElement("path",Ch({},ot(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),c?z.createElement("path",Ch({},ot(o,!0),{fill:"none",d:ng(n,i)})):null,c?z.createElement("path",Ch({},ot(o,!0),{fill:"none",d:ng(a,i)})):null)}var d=ng(n,i);return z.createElement("path",Ch({},ot(o,!0),{fill:d.slice(-1)==="Z"?o.fill:"none",className:l,d}))};function zP(){return zP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zP.apply(this,arguments)}var Zj=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,o=Nt("recharts-dot",i);return n===+n&&r===+r&&a===+a?z.createElement("circle",zP({},ot(t,!1),V0(t),{className:o,cx:n,cy:r,r:a})):null};function jy(e){"@babel/helpers - typeof";return jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jy(e)}var Yqe=["x","y","top","left","width","height","className"];function UP(){return UP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UP.apply(this,arguments)}function A5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xqe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A5(Object(n),!0).forEach(function(r){Qqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qqe(e,t,n){return t=Zqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zqe(e){var t=Jqe(e,"string");return jy(t)=="symbol"?t:t+""}function Jqe(e,t){if(jy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e9e(e,t){if(e==null)return{};var n=t9e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var n9e=function(t,n,r,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(n,"h").concat(r)},r9e=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,d=t.width,h=d===void 0?0:d,f=t.height,m=f===void 0?0:f,y=t.className,p=e9e(t,Yqe),x=Xqe({x:r,y:i,top:l,left:u,width:h,height:m},p);return!ke(r)||!ke(i)||!ke(h)||!ke(m)||!ke(l)||!ke(u)?null:z.createElement("path",UP({},ot(x,!0),{className:Nt("recharts-cross",y),d:n9e(r,i,h,m,l,u)}))},s9e=Gj,a9e=WZ,i9e=Eo;function o9e(e,t){return e&&e.length?s9e(e,i9e(t),a9e):void 0}var l9e=o9e;const c9e=$t(l9e);var u9e=Gj,d9e=Eo,h9e=VZ;function f9e(e,t){return e&&e.length?u9e(e,d9e(t),h9e):void 0}var m9e=f9e;const p9e=$t(m9e);var g9e=["cx","cy","angle","ticks","axisLine"],y9e=["ticks","tick","angle","tickFormatter","stroke"];function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rg.apply(this,arguments)}function O5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O5(Object(n),!0).forEach(function(r){Jj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R5(e,t){if(e==null)return{};var n=x9e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function v9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MJ(r.key),r)}}function b9e(e,t,n){return t&&I5(e.prototype,t),n&&I5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w9e(e,t,n){return t=Cw(t),S9e(e,IJ()?Reflect.construct(t,n||[],Cw(e).constructor):t.apply(e,n))}function S9e(e,t){if(t&&(Df(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j9e(e)}function j9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IJ=function(){return!!e})()}function Cw(e){return Cw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cw(e)}function N9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qP(e,t)}function qP(e,t){return qP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},qP(e,t)}function Jj(e,t,n){return t=MJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MJ(e){var t=_9e(e,"string");return Df(t)=="symbol"?t:t+""}function _9e(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e1=function(e){function t(){return v9e(this,t),w9e(this,t,arguments)}return N9e(t,e),b9e(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,o=i.angle,l=i.cx,c=i.cy;return Sn(l,c,a,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,i=r.cy,o=r.angle,l=r.ticks,c=c9e(l,function(d){return d.coordinate||0}),u=p9e(l,function(d){return d.coordinate||0});return{cx:a,cy:i,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,o=r.angle,l=r.ticks,c=r.axisLine,u=R5(r,g9e),d=l.reduce(function(y,p){return[Math.min(y[0],p.coordinate),Math.max(y[1],p.coordinate)]},[1/0,-1/0]),h=Sn(a,i,d[0],o),f=Sn(a,i,d[1],o),m=nu(nu(nu({},ot(u,!1)),{},{fill:"none"},ot(c,!1)),{},{x1:h.x,y1:h.y,x2:f.x,y2:f.y});return z.createElement("line",rg({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,o=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,d=R5(a,y9e),h=this.getTickTextAnchor(),f=ot(d,!1),m=ot(o,!1),y=i.map(function(p,x){var v=r.getTickValueCoord(p),b=nu(nu(nu(nu({textAnchor:h,transform:"rotate(".concat(90-l,", ").concat(v.x,", ").concat(v.y,")")},f),{},{stroke:"none",fill:u},m),{},{index:x},v),{},{payload:p});return z.createElement(rn,rg({className:Nt("recharts-polar-radius-axis-tick",vJ(o)),key:"tick-".concat(p.coordinate)},rd(r.props,p,x)),t.renderTickItem(o,b,c?c(p.value,x):p.value))});return z.createElement(rn,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.axisLine,o=r.tick;return!a||!a.length?null:z.createElement(rn,{className:Nt("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),o&&this.renderTicks(),Cr.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var o;return z.isValidElement(r)?o=z.cloneElement(r,a):xt(r)?o=r(a):o=z.createElement(sd,rg({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),o}}])}(g.PureComponent);Jj(e1,"displayName","PolarRadiusAxis");Jj(e1,"axisType","radiusAxis");Jj(e1,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pu.apply(this,arguments)}function M5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ru(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M5(Object(n),!0).forEach(function(r){t1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LJ(r.key),r)}}function E9e(e,t,n){return t&&D5(e.prototype,t),n&&D5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k9e(e,t,n){return t=Ew(t),P9e(e,DJ()?Reflect.construct(t,n||[],Ew(e).constructor):t.apply(e,n))}function P9e(e,t){if(t&&(Lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T9e(e)}function T9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DJ=function(){return!!e})()}function Ew(e){return Ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ew(e)}function A9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WP(e,t)}function WP(e,t){return WP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},WP(e,t)}function t1(e,t,n){return t=LJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LJ(e){var t=O9e(e,"string");return Lf(t)=="symbol"?t:t+""}function O9e(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var R9e=Math.PI/180,L5=1e-5,n1=function(e){function t(){return C9e(this,t),k9e(this,t,arguments)}return A9e(t,e),E9e(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,o=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,d=u||8,h=Sn(i,o,l,r.coordinate),f=Sn(i,o,l+(c==="inner"?-1:1)*d,r.coordinate);return{x1:h.x,y1:h.y,x2:f.x,y2:f.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*R9e),o;return i>L5?o=a==="outer"?"start":"end":i<-L5?o=a==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,o=r.radius,l=r.axisLine,c=r.axisLineType,u=ru(ru({},ot(this.props,!1)),{},{fill:"none"},ot(l,!1));if(c==="circle")return z.createElement(Zj,pu({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:o}));var d=this.props.ticks,h=d.map(function(f){return Sn(a,i,o,f.coordinate)});return z.createElement(Kqe,pu({className:"recharts-polar-angle-axis-line"},u,{points:h}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,o=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,d=ot(this.props,!1),h=ot(o,!1),f=ru(ru({},d),{},{fill:"none"},ot(l,!1)),m=i.map(function(y,p){var x=r.getTickLineCoord(y),v=r.getTickTextAnchor(y),b=ru(ru(ru({textAnchor:v},d),{},{stroke:"none",fill:u},h),{},{index:p,payload:y,x:x.x2,y:x.y2});return z.createElement(rn,pu({className:Nt("recharts-polar-angle-axis-tick",vJ(o)),key:"tick-".concat(y.coordinate)},rd(r.props,y,p)),l&&z.createElement("line",pu({className:"recharts-polar-angle-axis-tick-line"},f,x)),o&&t.renderTickItem(o,b,c?c(y.value,p):y.value))});return z.createElement(rn,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,o=r.axisLine;return i<=0||!a||!a.length?null:z.createElement(rn,{className:Nt("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var o;return z.isValidElement(r)?o=z.cloneElement(r,a):xt(r)?o=r(a):o=z.createElement(sd,pu({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),o}}])}(g.PureComponent);t1(n1,"displayName","PolarAngleAxis");t1(n1,"axisType","angleAxis");t1(n1,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var I9e=BQ,M9e=I9e(Object.getPrototypeOf,Object),D9e=M9e,L9e=gl,$9e=D9e,F9e=yl,B9e="[object Object]",z9e=Function.prototype,U9e=Object.prototype,$J=z9e.toString,q9e=U9e.hasOwnProperty,W9e=$J.call(Object);function V9e(e){if(!F9e(e)||L9e(e)!=B9e)return!1;var t=$9e(e);if(t===null)return!0;var n=q9e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$J.call(n)==W9e}var H9e=V9e;const G9e=$t(H9e);var K9e=gl,Y9e=yl,X9e="[object Boolean]";function Q9e(e){return e===!0||e===!1||Y9e(e)&&K9e(e)==X9e}var Z9e=Q9e;const J9e=$t(Z9e);function Ny(e){"@babel/helpers - typeof";return Ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ny(e)}function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kw.apply(this,arguments)}function eWe(e,t){return sWe(e)||rWe(e,t)||nWe(e,t)||tWe()}function tWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
907In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nWe(e,t){if(e){if(typeof e=="string")return $5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $5(e,t)}}function $5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rWe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function sWe(e){if(Array.isArray(e))return e}function F5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function B5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(n),!0).forEach(function(r){aWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aWe(e,t,n){return t=iWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iWe(e){var t=oWe(e,"string");return Ny(t)=="symbol"?t:t+""}function oWe(e,t){if(Ny(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ny(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var z5=function(t,n,r,a,i){var o=r-a,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+i),l+="L ".concat(t+r-o/2-a,",").concat(n+i),l+="L ".concat(t,",").concat(n," Z"),l},lWe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cWe=function(t){var n=B5(B5({},lWe),t),r=g.useRef(),a=g.useState(-1),i=eWe(a,2),o=i[0],l=i[1];g.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&l(w)}catch{}},[]);var c=n.x,u=n.y,d=n.upperWidth,h=n.lowerWidth,f=n.height,m=n.className,y=n.animationEasing,p=n.animationDuration,x=n.animationBegin,v=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||h!==+h||f!==+f||d===0&&h===0||f===0)return null;var b=Nt("recharts-trapezoid",m);return v?z.createElement(jo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:f,x:c,y:u},to:{upperWidth:d,lowerWidth:h,height:f,x:c,y:u},duration:p,animationEasing:y,isActive:v},function(w){var S=w.upperWidth,j=w.lowerWidth,N=w.height,C=w.x,_=w.y;return z.createElement(jo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:p,easing:y},z.createElement("path",kw({},ot(n,!0),{className:b,d:z5(C,_,S,j,N),ref:r})))}):z.createElement("g",null,z.createElement("path",kw({},ot(n,!0),{className:b,d:z5(c,u,d,h,f)})))},uWe=["option","shapeType","propTransformer","activeClassName","isActive"];function _y(e){"@babel/helpers - typeof";return _y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_y(e)}function dWe(e,t){if(e==null)return{};var n=hWe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hWe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function U5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U5(Object(n),!0).forEach(function(r){fWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fWe(e,t,n){return t=mWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mWe(e){var t=pWe(e,"string");return _y(t)=="symbol"?t:t+""}function pWe(e,t){if(_y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gWe(e,t){return Pw(Pw({},t),e)}function yWe(e,t){return e==="symbols"}function q5(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return z.createElement(AR,n);case"trapezoid":return z.createElement(cWe,n);case"sector":return z.createElement(SJ,n);case"symbols":if(yWe(t))return z.createElement(X2,n);break;default:return null}}function xWe(e){return g.isValidElement(e)?e.props:e}function FJ(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?gWe:r,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,l=e.isActive,c=dWe(e,uWe),u;if(g.isValidElement(t))u=g.cloneElement(t,Pw(Pw({},c),xWe(t)));else if(xt(t))u=t(c);else if(G9e(t)&&!J9e(t)){var d=a(t,c);u=z.createElement(q5,{shapeType:n,elementProps:d})}else{var h=c;u=z.createElement(q5,{shapeType:n,elementProps:h})}return l?z.createElement(rn,{className:o},u):u}function r1(e,t){return t!=null&&"trapezoids"in e.props}function s1(e,t){return t!=null&&"sectors"in e.props}function Cy(e,t){return t!=null&&"points"in e.props}function vWe(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function bWe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function wWe(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function SWe(e,t){var n;return r1(e,t)?n=vWe:s1(e,t)?n=bWe:Cy(e,t)&&(n=wWe),n}function jWe(e,t){var n;return r1(e,t)?n="trapezoids":s1(e,t)?n="sectors":Cy(e,t)&&(n="points"),n}function NWe(e,t){if(r1(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(s1(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Cy(e,t)?t.payload:{}}function _We(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=jWe(n,t),i=NWe(n,t),o=r.filter(function(c,u){var d=Tx(i,c),h=n.props[a].filter(function(y){var p=SWe(n,t);return p(y,t)}),f=n.props[a].indexOf(h[h.length-1]),m=u===f;return d&&m}),l=r.indexOf(o[o.length-1]);return l}var Ub;function $f(e){"@babel/helpers - typeof";return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eh.apply(this,arguments)}function W5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W5(Object(n),!0).forEach(function(r){za(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zJ(r.key),r)}}function EWe(e,t,n){return t&&V5(e.prototype,t),n&&V5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kWe(e,t,n){return t=Tw(t),PWe(e,BJ()?Reflect.construct(t,n||[],Tw(e).constructor):t.apply(e,n))}function PWe(e,t){if(t&&($f(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TWe(e)}function TWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BJ=function(){return!!e})()}function Tw(e){return Tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tw(e)}function AWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VP(e,t)}function VP(e,t){return VP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},VP(e,t)}function za(e,t,n){return t=zJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zJ(e){var t=OWe(e,"string");return $f(t)=="symbol"?t:t+""}function OWe(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zi=function(e){function t(n){var r;return CWe(this,t),r=kWe(this,t,[n]),za(r,"pieRef",null),za(r,"sectorRefs",[]),za(r,"id",km("recharts-pie-")),za(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),xt(a)&&a()}),za(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),xt(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return AWe(t,e),EWe(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.label,l=i.labelLine,c=i.dataKey,u=i.valueKey,d=ot(this.props,!1),h=ot(o,!1),f=ot(l,!1),m=o&&o.offsetRadius||20,y=r.map(function(p,x){var v=(p.startAngle+p.endAngle)/2,b=Sn(p.cx,p.cy,p.outerRadius+m,v),w=vn(vn(vn(vn({},d),p),{},{stroke:"none"},h),{},{index:x,textAnchor:t.getTextAnchor(b.x,p.cx)},b),S=vn(vn(vn(vn({},d),p),{},{fill:"none",stroke:p.fill},f),{},{index:x,points:[Sn(p.cx,p.cy,p.outerRadius,v),b]}),j=c;return jt(c)&&jt(u)?j="value":jt(c)&&(j=u),z.createElement(rn,{key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(x)},l&&t.renderLabelLineItem(l,S,"line"),t.renderLabelItem(o,w,br(p,j)))});return z.createElement(rn,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,o=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return r.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var h=a.isActiveIndex(d),f=c&&a.hasActiveIndex()?c:null,m=h?o:f,y=vn(vn({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return z.createElement(rn,Eh({ref:function(x){x&&!a.sectorRefs.includes(x)&&a.sectorRefs.push(x)},tabIndex:-1,className:"recharts-pie-sector"},rd(a.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),z.createElement(FJ,Eh({option:m,isActive:h,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,o=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,h=this.state,f=h.prevSectors,m=h.prevIsAnimationActive;return z.createElement(jo,{begin:l,duration:c,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var p=y.t,x=[],v=i&&i[0],b=v.startAngle;return i.forEach(function(w,S){var j=f&&f[S],N=S>0?wa(w,"paddingAngle",0):0;if(j){var C=ha(j.endAngle-j.startAngle,w.endAngle-w.startAngle),_=vn(vn({},w),{},{startAngle:b+N,endAngle:b+C(p)+N});x.push(_),b=_.endAngle}else{var A=w.endAngle,P=w.startAngle,R=ha(0,A-P),I=R(p),B=vn(vn({},w),{},{startAngle:b+N,endAngle:b+I+N});x.push(B),b=B.endAngle}}),z.createElement(rn,null,r.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var o=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,i=r.isAnimationActive,o=this.state.prevSectors;return i&&a&&a.length&&(!o||!Tx(o,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,i=a.hide,o=a.sectors,l=a.className,c=a.label,u=a.cx,d=a.cy,h=a.innerRadius,f=a.outerRadius,m=a.isAnimationActive,y=this.state.isAnimationFinished;if(i||!o||!o.length||!ke(u)||!ke(d)||!ke(h)||!ke(f))return null;var p=Nt("recharts-pie",l);return z.createElement(rn,{tabIndex:this.props.rootTabIndex,className:p,ref:function(v){r.pieRef=v}},this.renderSectors(),c&&this.renderLabels(o),Cr.renderCallByParent(this.props,null,!1),(!m||y)&&Qo.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,i){if(z.isValidElement(r))return z.cloneElement(r,a);if(xt(r))return r(a);var o=Nt("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return z.createElement(ww,Eh({},a,{key:i,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,a,i){if(z.isValidElement(r))return z.cloneElement(r,a);var o=i;if(xt(r)&&(o=r(a),z.isValidElement(o)))return o;var l=Nt("recharts-pie-label-text",typeof r!="boolean"&&!xt(r)?r.className:"");return z.createElement(sd,Eh({},a,{alignmentBaseline:"middle",className:l}),o)}}])}(g.PureComponent);Ub=zi;za(zi,"displayName","Pie");za(zi,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!mo.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});za(zi,"parseDeltaAngle",function(e,t){var n=ws(t-e),r=Math.min(Math.abs(t-e),360);return n*r});za(zi,"getRealPieData",function(e){var t=e.data,n=e.children,r=ot(e,!1),a=Sa(n,Om);return t&&t.length?t.map(function(i,o){return vn(vn(vn({payload:i},r),i),a&&a[o]&&a[o].props)}):a&&a.length?a.map(function(i){return vn(vn({},r),i.props)}):[]});za(zi,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,o=xJ(a,i),l=r+Ss(e.cx,a,a/2),c=n+Ss(e.cy,i,i/2),u=Ss(e.innerRadius,o,0),d=Ss(e.outerRadius,o,o*.8),h=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:h}});za(zi,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?vn(vn({},t.type.defaultProps),t.props):t.props,a=Ub.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,o=r.startAngle,l=r.endAngle,c=r.paddingAngle,u=r.dataKey,d=r.nameKey,h=r.valueKey,f=r.tooltipType,m=Math.abs(r.minAngle),y=Ub.parseCoordinateOfPie(r,n),p=Ub.parseDeltaAngle(o,l),x=Math.abs(p),v=u;jt(u)&&jt(h)?(Ai(!1,`Use "dataKey" to specify the value of pie,
908      the props "valueKey" will be deprecated in 1.1.0`),v="value"):jt(u)&&(Ai(!1,`Use "dataKey" to specify the value of pie,
909      the props "valueKey" will be deprecated in 1.1.0`),v=h);var b=a.filter(function(_){return br(_,v,0)!==0}).length,w=(x>=360?b:b-1)*c,S=x-b*m-w,j=a.reduce(function(_,A){var P=br(A,v,0);return _+(ke(P)?P:0)},0),N;if(j>0){var C;N=a.map(function(_,A){var P=br(_,v,0),R=br(_,d,A),I=(ke(P)?P:0)/j,B;A?B=C.endAngle+ws(p)*c*(P!==0?1:0):B=o;var $=B+ws(p)*((P!==0?m:0)+I*S),q=(B+$)/2,L=(y.innerRadius+y.outerRadius)/2,k=[{name:R,value:P,payload:_,dataKey:v,type:f}],T=Sn(y.cx,y.cy,L,q);return C=vn(vn(vn({percent:I,cornerRadius:i,name:R,tooltipPayload:k,midAngle:q,middleRadius:L,tooltipPosition:T},_),y),{},{value:br(_,v),startAngle:B,endAngle:$,payload:_,paddingAngle:ws(p)*c}),C})}return vn(vn({},y),{},{sectors:N,data:a})});var RWe=Math.ceil,IWe=Math.max;function MWe(e,t,n,r){for(var a=-1,i=IWe(RWe((t-e)/(n||1)),0),o=Array(i);i--;)o[r?i:++a]=e,e+=n;return o}var DWe=MWe,LWe=aZ,H5=1/0,$We=17976931348623157e292;function FWe(e){if(!e)return e===0?e:0;if(e=LWe(e),e===H5||e===-H5){var t=e<0?-1:1;return t*$We}return e===e?e:0}var UJ=FWe,BWe=DWe,zWe=Bj,C_=UJ;function UWe(e){return function(t,n,r){return r&&typeof r!="number"&&zWe(t,n,r)&&(n=r=void 0),t=C_(t),n===void 0?(n=t,t=0):n=C_(n),r=r===void 0?t<n?1:-1:C_(r),BWe(t,n,r,e)}}var qWe=UWe,WWe=qWe,VWe=WWe(),HWe=VWe;const Aw=$t(HWe);function Ey(e){"@babel/helpers - typeof";return Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ey(e)}function G5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function K5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G5(Object(n),!0).forEach(function(r){qJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qJ(e,t,n){return t=GWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GWe(e){var t=KWe(e,"string");return Ey(t)=="symbol"?t:t+""}function KWe(e,t){if(Ey(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ey(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YWe=["Webkit","Moz","O","ms"],XWe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=YWe.reduce(function(i,o){return K5(K5({},i),{},qJ({},o+r,n))},{});return a[t]=n,a};function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}function Ow(){return Ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ow.apply(this,arguments)}function Y5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function E_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y5(Object(n),!0).forEach(function(r){ia(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VJ(r.key),r)}}
vendor: 10,859 bytes, line 909
909function ZWe(e,t,n){return t&&X5(e.prototype,t),n&&X5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JWe(e,t,n){return t=Rw(t),eVe(e,WJ()?Reflect.construct(t,n||[],Rw(e).constructor):t.apply(e,n))}function eVe(e,t){if(t&&(Ff(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tVe(e)}function tVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WJ=function(){return!!e})()}function Rw(e){return Rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rw(e)}function nVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HP(e,t)}function HP(e,t){return HP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},HP(e,t)}function ia(e,t,n){return t=VJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VJ(e){var t=rVe(e,"string");return Ff(t)=="symbol"?t:t+""}function rVe(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sVe=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Jp().domain(Aw(0,c)).range([i,i+o-l]),d=u.domain().map(function(h){return u(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:d}},Q5=function(t){return t.changedTouches&&!!t.changedTouches.length},Bf=function(e){function t(n){var r;return QWe(this,t),r=JWe(this,t,[n]),ia(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),ia(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),ia(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,o=a.onDragEnd,l=a.startIndex;o==null||o({endIndex:i,startIndex:l})}),r.detachDragEndListener()}),ia(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ia(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ia(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ia(r,"handleSlideDragStart",function(a){var i=Q5(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return nVe(t,e),ZWe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,d=u.length-1,h=Math.min(a,i),f=Math.max(a,i),m=t.getIndexInRange(o,h),y=t.getIndexInRange(o,f);return{startIndex:m-m%c,endIndex:y===d?d:y-y%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,o=a.tickFormatter,l=a.dataKey,c=br(i[r],l,r);return xt(o)?o(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,i=a.slideMoveStartX,o=a.startX,l=a.endX,c=this.props,u=c.x,d=c.width,h=c.travellerWidth,f=c.startIndex,m=c.endIndex,y=c.onChange,p=r.pageX-i;p>0?p=Math.min(p,u+d-h-l,u+d-h-o):p<0&&(p=Math.max(p,u-o,u-l));var x=this.getIndex({startX:o+p,endX:l+p});(x.startIndex!==f||x.endIndex!==m)&&y&&y(x),this.setState({startX:o+p,endX:l+p,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=Q5(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[o],d=this.props,h=d.x,f=d.width,m=d.travellerWidth,y=d.onChange,p=d.gap,x=d.data,v={startX:this.state.startX,endX:this.state.endX},b=r.pageX-i;b>0?b=Math.min(b,h+f-m-u):b<0&&(b=Math.max(b,h-u)),v[o]=u+b;var w=this.getIndex(v),S=w.startIndex,j=w.endIndex,N=function(){var _=x.length-1;return o==="startX"&&(l>c?S%p===0:j%p===0)||l<c&&j===_||o==="endX"&&(l>c?j%p===0:S%p===0)||l>c&&j===_};this.setState(ia(ia({},o,u+b),"brushMoveStartX",r.pageX),function(){y&&N()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,d=this.state[a],h=l.indexOf(d);if(h!==-1){var f=h+r;if(!(f===-1||f>=l.length)){var m=l[f];a==="startX"&&m>=u||a==="endX"&&m<=c||this.setState(ia({},a,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.fill,u=r.stroke;return z.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.data,u=r.children,d=r.padding,h=g.Children.only(u);return h?z.cloneElement(h,{x:a,y:i,width:o,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,o,l=this,c=this.props,u=c.y,d=c.travellerWidth,h=c.height,f=c.traveller,m=c.ariaLabel,y=c.data,p=c.startIndex,x=c.endIndex,v=Math.max(r,this.props.x),b=E_(E_({},ot(this.props,!1)),{},{x:v,y:u,width:d,height:h}),w=m||"Min value: ".concat((i=y[p])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=y[x])===null||o===void 0?void 0:o.name);return z.createElement(rn,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),l.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,b))}},{key:"renderSlide",value:function(r,a){var i=this.props,o=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,d=Math.min(r,a)+u,h=Math.max(Math.abs(a-r)-u,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:o,width:h,height:l})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,o=r.y,l=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,h=d.startX,f=d.endX,m=5,y={pointerEvents:"none",fill:u};return z.createElement(rn,{className:"recharts-brush-texts"},z.createElement(sd,Ow({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,f)-m,y:o+l/2},y),this.getTextOfTick(a)),z.createElement(sd,Ow({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,f)+c+m,y:o+l/2},y),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,o=r.children,l=r.x,c=r.y,u=r.width,d=r.height,h=r.alwaysShowText,f=this.state,m=f.startX,y=f.endX,p=f.isTextActive,x=f.isSlideMoving,v=f.isTravellerMoving,b=f.isTravellerFocused;if(!a||!a.length||!ke(l)||!ke(c)||!ke(u)||!ke(d)||u<=0||d<=0)return null;var w=Nt("recharts-brush",i),S=z.Children.count(o)===1,j=XWe("userSelect","none");return z.createElement(rn,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(m,y),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(y,"endX"),(p||x||v||b||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,o=r.width,l=r.height,c=r.stroke,u=Math.floor(i+l/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:a,y:i,width:o,height:l,fill:c,stroke:"none"}),z.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return z.isValidElement(r)?i=z.cloneElement(r,a):xt(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,o=r.width,l=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,h=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return E_({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},i&&i.length?sVe({data:i,width:o,x:l,travellerWidth:c,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+o-c]);var f=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,o=0,l=i-1;l-o>1;){var c=Math.floor((o+l)/2);r[c]>a?l=c:o=c}return a>=r[l]?l:o}}])}(g.PureComponent);ia(Bf,"displayName","Brush");ia(Bf,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var aVe=rR;function iVe(e,t){var n;return aVe(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var oVe=iVe,lVe=OQ,cVe=Eo,uVe=oVe,dVe=Zs,hVe=Bj;function fVe(e,t,n){var r=dVe(e)?lVe:uVe;return n&&hVe(e,t,n)&&(t=void 0),r(e,cVe(t))}var mVe=fVe;
909const pVe=$t(mVe);var go=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},Z5=eZ;function gVe(e,t,n){t=="__proto__"&&Z5?Z5(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var yVe=gVe,xVe=yVe,vVe=ZQ,bVe=Eo;function wVe(e,t){var n={};return t=bVe(t),vVe(e,function(r,a,i){xVe(n,a,t(r,a,i))}),n}var SVe=wVe;const jVe=$t(SVe);function NVe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var _Ve=NVe,CVe=rR;function EVe(e,t){var n=!0;return CVe(e,function(r,a,i){return n=!!t(r,a,i),n}),n}var kVe=EVe,PVe=_Ve,TVe=kVe,AVe=Eo,OVe=Zs,RVe=Bj;function IVe(e,t,n){var r=OVe(e)?PVe:TVe;return n&&RVe(e,t,n)&&(t=void 0),r(e,AVe(t))}var MVe=IVe;const HJ=$t(MVe);var DVe=["x","y"];function ky(e){"@babel/helpers - typeof";return ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ky(e)}function GP(){return GP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GP.apply(this,arguments)}function J5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J5(Object(n),!0).forEach(function(r){LVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LVe(e,t,n){return t=$Ve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Ve(e){var t=FVe(e,"string");return ky(t)=="symbol"?t:t+""}function FVe(e,t){if(ky(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ky(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BVe(e,t){if(e==null)return{};var n=zVe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zVe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UVe(e,t){var n=e.x,r=e.y,a=BVe(e,DVe),i="".concat(n),o=parseInt(i,10),l="".concat(r),c=parseInt(l,10),u="".concat(t.height||a.height),d=parseInt(u,10),h="".concat(t.width||a.width),f=parseInt(h,10);return fp(fp(fp(fp(fp({},t),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:d,width:f,name:t.name,radius:t.radius})}function e6(e){return z.createElement(FJ,GP({shapeType:"rectangle",propTransformer:UVe,activeClassName:"recharts-active-bar"},e))}var qVe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,a):(i||id(),n)}},WVe=["value","background"],GJ;function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function VVe(e,t){if(e==null)return{};var n=HVe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HVe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iw.apply(this,arguments)}function t6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 107,228 bytes, lines 909-914
909t%2?t6(Object(n),!0).forEach(function(r){nc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YJ(r.key),r)}}function KVe(e,t,n){return t&&n6(e.prototype,t),n&&n6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YVe(e,t,n){return t=Mw(t),XVe(e,KJ()?Reflect.construct(t,n||[],Mw(e).constructor):t.apply(e,n))}function XVe(e,t){if(t&&(zf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QVe(e)}function QVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KJ=function(){return!!e})()}function Mw(e){return Mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mw(e)}function ZVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&KP(e,t)}function KP(e,t){return KP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},KP(e,t)}function nc(e,t,n){return t=YJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YJ(e){var t=JVe(e,"string");return zf(t)=="symbol"?t:t+""}function JVe(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ko=function(e){function t(){var n;GVe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=YVe(this,t,[].concat(a)),nc(n,"state",{isAnimationFinished:!1}),nc(n,"id",km("recharts-bar-")),nc(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),nc(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return ZVe(t,e),KVe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,o=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,d=ot(this.props,!1);return r&&r.map(function(h,f){var m=f===c,y=m?u:o,p=or(or(or({},d),h),{},{isActive:m,option:y,index:f,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return z.createElement(rn,Iw({className:"recharts-bar-rectangle"},rd(a.props,h,f),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value)}),z.createElement(e6,p))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,o=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,d=a.animationEasing,h=a.animationId,f=this.state.prevData;return z.createElement(jo,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var y=m.t,p=i.map(function(x,v){var b=f&&f[v];if(b){var w=ha(b.x,x.x),S=ha(b.y,x.y),j=ha(b.width,x.width),N=ha(b.height,x.height);return or(or({},x),{},{x:w(y),y:S(y),width:j(y),height:N(y)})}if(o==="horizontal"){var C=ha(0,x.height),_=C(y);return or(or({},x),{},{y:x.y+x.height-_,height:_})}var A=ha(0,x.width),P=A(y);return or(or({},x),{},{width:P})});return z.createElement(rn,null,r.renderRectanglesStatically(p))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Tx(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,o=a.dataKey,l=a.activeIndex,c=ot(this.props.background,!1);return i.map(function(u,d){u.value;var h=u.background,f=VVe(u,WVe);if(!h)return null;var m=or(or(or(or(or({},f),{},{fill:"#eee"},h),c),rd(r.props,u,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return z.createElement(e6,Iw({key:"background-bar-".concat(d),option:r.props.background,isActive:d===l},m))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,h=Sa(d,Ax);if(!h)return null;var f=u==="vertical"?o[0].height/2:o[0].width/2,m=function(x,v){var b=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:b,errorVal:br(x,v)}},y={clipPath:r?"url(#clipPath-".concat(a,")"):null};return z.createElement(rn,y,h.map(function(p){return z.cloneElement(p,{key:"error-bar-".concat(a,"-").concat(p.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:f,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,o=r.className,l=r.xAxis,c=r.yAxis,u=r.left,d=r.top,h=r.width,f=r.height,m=r.isAnimationActive,y=r.background,p=r.id;if(a||!i||!i.length)return null;var x=this.state.isAnimationFinished,v=Nt("recharts-bar",o),b=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,S=b||w,j=jt(p)?this.id:p;return z.createElement(rn,{className:v},b||w?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(j)},z.createElement("rect",{x:b?u:u-h/2,y:w?d:d-f/2,width:b?h:h*2,height:w?f:f*2}))):null,z.createElement(rn,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(j,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,j),(!m||x)&&Qo.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])}(g.PureComponent);GJ=ko;nc(ko,"displayName","Bar");nc(ko,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!mo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});nc(ko,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,h=e.displayedData,f=e.offset,m=qze(r,n);if(!m)return null;var y=t.layout,p=n.type.defaultProps,x=p!==void 0?or(or({},p),n.props):n.props,v=x.dataKey,b=x.children,w=x.minPointSize,S=y==="horizontal"?o:i,j=u?S.scale.domain():null,N=Xze({numericAxis:S}),C=Sa(b,Om),_=h.map(function(A,P){var R,I,B,$,q,L;u?R=Wze(u[d+P],j):(R=br(A,v),Array.isArray(R)||(R=[N,R]));var k=qVe(w,GJ.defaultProps.minPointSize)(R[1],P);if(y==="horizontal"){var T,F=[o.scale(R[0]),o.scale(R[1])],O=F[0],E=F[1];I=V3({axis:i,ticks:l,bandSize:a,offset:m.offset,entry:A,index:P}),B=(T=E??O)!==null&&T!==void 0?T:void 0,$=m.size;var D=O-E;if(q=Number.isNaN(D)?0:D,L={x:I,y:o.y,width:$,height:o.height},Math.abs(k)>0&&Math.abs(q)<Math.abs(k)){var M=ws(q||k)*(Math.abs(k)-Math.abs(q));B-=M,q+=M}}else{var X=[i.scale(R[0]),i.scale(R[1])],W=X[0],re=X[1];if(I=W,B=V3({axis:o,ticks:c,bandSize:a,offset:m.offset,entry:A,index:P}),$=re-W,q=m.size,L={x:i.x,y:B,width:i.width,height:q},Math.abs(k)>0&&Math.abs($)<Math.abs(k)){var ne=ws($||k)*(Math.abs(k)-Math.abs($));$+=ne}}return or(or(or({},A),{},{x:I,y:B,width:$,height:q,value:u?R:R[1],payload:A,background:L},C&&C[P]&&C[P].props),{},{tooltipPayload:[gJ(n,A)],tooltipPosition:{x:I+$/2,y:B+q/2}})});return or({data:_,layout:y},f)});function Py(e){"@babel/helpers - typeof";return Py=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Py(e)}function e7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XJ(r.key),r)}}function t7e(e,t,n){return t&&r6(e.prototype,t),n&&r6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s6(Object(n),!0).forEach(function(r){a1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a1(e,t,n){return t=XJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XJ(e){var t=n7e(e,"string");return Py(t)=="symbol"?t:t+""}function n7e(e,t){if(Py(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Py(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QJ=function(t,n,r,a,i){var o=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(n),h={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},f=!!ua(u,ko);return d.reduce(function(m,y){var p=n[y],x=p.orientation,v=p.domain,b=p.padding,w=b===void 0?{}:b,S=p.mirror,j=p.reversed,N="".concat(x).concat(S?"Mirror":""),C,_,A,P,R;if(p.type==="number"&&(p.padding==="gap"||p.padding==="no-gap")){var I=v[1]-v[0],B=1/0,$=p.categoricalDomain.sort();if($.forEach(function(X,W){W>0&&(B=Math.min((X||0)-($[W-1]||0),B))}),Number.isFinite(B)){var q=B/I,L=p.layout==="vertical"?r.height:r.width;if(p.padding==="gap"&&(C=q*L/2),p.padding==="no-gap"){var k=Ss(t.barCategoryGap,q*L),T=q*L/2;C=T-k-(T-k)/L*k}}}a==="xAxis"?_=[r.left+(w.left||0)+(C||0),r.left+r.width-(w.right||0)-(C||0)]:a==="yAxis"?_=c==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(C||0),r.top+r.height-(w.bottom||0)-(C||0)]:_=p.range,j&&(_=[_[1],_[0]]);var F=hJ(p,i,f),O=F.scale,E=F.realScaleType;O.domain(v).range(_),fJ(O);var D=mJ(O,bi(bi({},p),{},{realScaleType:E}));a==="xAxis"?(R=x==="top"&&!S||x==="bottom"&&S,A=r.left,P=h[N]-R*p.height):a==="yAxis"&&(R=x==="left"&&!S||x==="right"&&S,A=h[N]-R*p.width,P=r.top);var M=bi(bi(bi({},p),D),{},{realScaleType:E,x:A,y:P,scale:O,width:a==="xAxis"?r.width:p.width,height:a==="yAxis"?r.height:p.height});return M.bandSize=xw(M,D),!p.hide&&a==="xAxis"?h[N]+=(R?-1:1)*M.height:p.hide||(h[N]+=(R?-1:1)*M.width),bi(bi({},m),{},a1({},y,M))},{})},ZJ=function(t,n){var r=t.x,a=t.y,i=n.x,o=n.y;return{x:Math.min(r,i),y:Math.min(a,o),width:Math.abs(i-r),height:Math.abs(o-a)}},r7e=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return ZJ({x:n,y:r},{x:a,y:i})},JJ=function(){function e(t){e7e(this,e),this.scale=t}return t7e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();a1(JJ,"EPS",1e-4);var OR=function(t){var n=Object.keys(t).reduce(function(r,a){return bi(bi({},r),{},a1({},a,JJ.create(t[a])))},{});return bi(bi({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,l=i.position;return jVe(a,function(c,u){return n[u].apply(c,{bandAware:o,position:l})})},isInRange:function(a){return HJ(a,function(i,o){return n[o].isInRange(i)})}})};function s7e(e){return(e%180+180)%180}var a7e=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=s7e(a),o=i*Math.PI/180,l=Math.atan(r/n),c=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},i7e=Eo,o7e=_x,l7e=$j;function c7e(e){return function(t,n,r){var a=Object(t);if(!o7e(t)){var i=i7e(n);t=l7e(t),n=function(l){return i(a[l],l,a)}}var o=e(t,n,r);return o>-1?a[i?t[o]:o]:void 0}}var u7e=c7e,d7e=UJ;function h7e(e){var t=d7e(e),n=t%1;return t===t?n?t-n:t:0}var f7e=h7e,m7e=HQ,p7e=Eo,g7e=f7e,y7e=Math.max;function x7e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:g7e(n);return a<0&&(a=y7e(r+a,0)),m7e(e,p7e(t),a)}var v7e=x7e,b7e=u7e,w7e=v7e,S7e=b7e(w7e),j7e=S7e;const N7e=$t(j7e);var _7e=ATe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),RR=g.createContext(void 0),IR=g.createContext(void 0),eee=g.createContext(void 0),tee=g.createContext({}),nee=g.createContext(void 0),ree=g.createContext(0),see=g.createContext(0),a6=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,d=_7e(i);return z.createElement(RR.Provider,{value:r},z.createElement(IR.Provider,{value:a},z.createElement(tee.Provider,{value:i},z.createElement(eee.Provider,{value:d},z.createElement(nee.Provider,{value:o},z.createElement(ree.Provider,{value:u},z.createElement(see.Provider,{value:c},l)))))))},C7e=function(){return g.useContext(nee)},aee=function(t){var n=g.useContext(RR);n==null&&id();var r=n[t];return r==null&&id(),r},E7e=function(){var t=g.useContext(RR);return Wl(t)},k7e=function(){var t=g.useContext(IR),n=N7e(t,function(r){return HJ(r.domain,Number.isFinite)});return n||Wl(t)},iee=function(t){var n=g.useContext(IR);n==null&&id();var r=n[t];return r==null&&id(),r},P7e=function(){var t=g.useContext(eee);return t},T7e=function(){return g.useContext(tee)},MR=function(){return g.useContext(see)},DR=function(){return g.useContext(ree)};function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function A7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O7e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lee(r.key),r)}}function R7e(e,t,n){return t&&O7e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function I7e(e,t,n){return t=Dw(t),M7e(e,oee()?Reflect.construct(t,n||[],Dw(e).constructor):t.apply(e,n))}function M7e(e,t){if(t&&(Uf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D7e(e)}function D7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oee=function(){return!!e})()}function Dw(e){return Dw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dw(e)}function L7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YP(e,t)}function YP(e,t){return YP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},YP(e,t)}function i6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function o6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i6(Object(n),!0).forEach(function(r){LR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LR(e,t,n){return t=lee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lee(e){var t=$7e(e,"string");return Uf(t)=="symbol"?t:t+""}function $7e(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F7e(e,t){return q7e(e)||U7e(e,t)||z7e(e,t)||B7e()}function B7e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
910In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z7e(e,t){if(e){if(typeof e=="string")return l6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l6(e,t)}}function l6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U7e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function q7e(e){if(Array.isArray(e))return e}function XP(){return XP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XP.apply(this,arguments)}var W7e=function(t,n){var r;return z.isValidElement(t)?r=z.cloneElement(t,n):xt(t)?r=t(n):r=z.createElement("line",XP({},n,{className:"recharts-reference-line-line"})),r},V7e=function(t,n,r,a,i,o,l,c,u){var d=i.x,h=i.y,f=i.width,m=i.height;if(r){var y=u.y,p=t.y.apply(y,{position:o});if(go(u,"discard")&&!t.y.isInRange(p))return null;var x=[{x:d+f,y:p},{x:d,y:p}];return c==="left"?x.reverse():x}if(n){var v=u.x,b=t.x.apply(v,{position:o});if(go(u,"discard")&&!t.x.isInRange(b))return null;var w=[{x:b,y:h+m},{x:b,y:h}];return l==="top"?w.reverse():w}if(a){var S=u.segment,j=S.map(function(N){return t.apply(N,{position:o})});return go(u,"discard")&&pVe(j,function(N){return!t.isInRange(N)})?null:j}return null};function H7e(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=C7e(),d=aee(a),h=iee(i),f=P7e();if(!u||!f)return null;Ai(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=OR({x:d.scale,y:h.scale}),y=Sr(t),p=Sr(n),x=r&&r.length===2,v=V7e(m,y,p,x,f,e.position,d.orientation,h.orientation,e);if(!v)return null;var b=F7e(v,2),w=b[0],S=w.x,j=w.y,N=b[1],C=N.x,_=N.y,A=go(e,"hidden")?"url(#".concat(u,")"):void 0,P=o6(o6({clipPath:A},ot(e,!0)),{},{x1:S,y1:j,x2:C,y2:_});return z.createElement(rn,{className:Nt("recharts-reference-line",l)},W7e(o,P),Cr.renderCallByParent(e,r7e({x1:S,y1:j,x2:C,y2:_})))}var $R=function(e){function t(){return A7e(this,t),I7e(this,t,arguments)}return L7e(t,e),R7e(t,[{key:"render",value:function(){return z.createElement(H7e,this.props)}}])}(z.Component);LR($R,"displayName","ReferenceLine");LR($R,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function QP(){return QP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QP.apply(this,arguments)}function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function c6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function u6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c6(Object(n),!0).forEach(function(r){i1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K7e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uee(r.key),r)}}function Y7e(e,t,n){return t&&K7e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X7e(e,t,n){return t=Lw(t),Q7e(e,cee()?Reflect.construct(t,n||[],Lw(e).constructor):t.apply(e,n))}function Q7e(e,t){if(t&&(qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z7e(e)}function Z7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cee=function(){return!!e})()}function Lw(e){return Lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lw(e)}function J7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZP(e,t)}function ZP(e,t){return ZP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ZP(e,t)}function i1(e,t,n){return t=uee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uee(e){var t=eHe(e,"string");return qf(t)=="symbol"?t:t+""}function eHe(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tHe=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,o=OR({x:a.scale,y:i.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return go(t,"discard")&&!o.isInRange(l)?null:l},o1=function(e){function t(){return G7e(this,t),X7e(this,t,arguments)}return J7e(t,e),Y7e(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,o=r.r,l=r.alwaysShow,c=r.clipPathId,u=Sr(a),d=Sr(i);if(Ai(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var h=tHe(this.props);if(!h)return null;var f=h.x,m=h.y,y=this.props,p=y.shape,x=y.className,v=go(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=u6(u6({clipPath:v},ot(this.props,!0)),{},{cx:f,cy:m});return z.createElement(rn,{className:Nt("recharts-reference-dot",x)},t.renderDot(p,b),Cr.renderCallByParent(this.props,{x:f-o,y:m-o,width:2*o,height:2*o}))}}])}(z.Component);i1(o1,"displayName","ReferenceDot");i1(o1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});i1(o1,"renderDot",function(e,t){var n;return z.isValidElement(e)?n=z.cloneElement(e,t):xt(e)?n=e(t):n=z.createElement(Zj,QP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function JP(){return JP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JP.apply(this,arguments)}function Wf(e){"@babel/helpers - typeof";return Wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wf(e)}function d6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function h6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d6(Object(n),!0).forEach(function(r){l1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rHe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hee(r.key),r)}}function sHe(e,t,n){return t&&rHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aHe(e,t,n){return t=$w(t),iHe(e,dee()?Reflect.construct(t,n||[],$w(e).constructor):t.apply(e,n))}function iHe(e,t){if(t&&(Wf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oHe(e)}function oHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dee=function(){return!!e})()}function $w(e){return $w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$w(e)}function lHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eT(e,t)}function eT(e,t){return eT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},eT(e,t)}function l1(e,t,n){return t=hee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hee(e){var t=cHe(e,"string");return Wf(t)=="symbol"?t:t+""}function cHe(e,t){if(Wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uHe=function(t,n,r,a,i){var o=i.x1,l=i.x2,c=i.y1,u=i.y2,d=i.xAxis,h=i.yAxis;if(!d||!h)return null;var f=OR({x:d.scale,y:h.scale}),m={x:t?f.x.apply(o,{position:"start"}):f.x.rangeMin,y:r?f.y.apply(c,{position:"start"}):f.y.rangeMin},y={x:n?f.x.apply(l,{position:"end"}):f.x.rangeMax,y:a?f.y.apply(u,{position:"end"}):f.y.rangeMax};return go(i,"discard")&&(!f.isInRange(m)||!f.isInRange(y))?null:ZJ(m,y)},c1=function(e){function t(){return nHe(this,t),aHe(this,t,arguments)}return lHe(t,e),sHe(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,o=r.y1,l=r.y2,c=r.className,u=r.alwaysShow,d=r.clipPathId;Ai(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Sr(a),f=Sr(i),m=Sr(o),y=Sr(l),p=this.props.shape;if(!h&&!f&&!m&&!y&&!p)return null;var x=uHe(h,f,m,y,this.props);if(!x&&!p)return null;var v=go(this.props,"hidden")?"url(#".concat(d,")"):void 0;return z.createElement(rn,{className:Nt("recharts-reference-area",c)},t.renderRect(p,h6(h6({clipPath:v},ot(this.props,!0)),x)),Cr.renderCallByParent(this.props,x))}}])}(z.Component);l1(c1,"displayName","ReferenceArea");l1(c1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});l1(c1,"renderRect",function(e,t){var n;return z.isValidElement(e)?n=z.cloneElement(e,t):xt(e)?n=e(t):n=z.createElement(AR,JP({},t,{className:"recharts-reference-area-rect"})),n});function fee(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function dHe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return a7e(r,n)}function hHe(e,t,n){var r=n==="width",a=e.x,i=e.y,o=e.width,l=e.height;return t===1?{start:r?a:i,end:r?a+o:i+l}:{start:r?a+o:i+l,end:r?a:i}}function Fw(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function fHe(e,t){return fee(e,t+1)}function mHe(e,t,n,r,a){for(var i=(r||[]).slice(),o=t.start,l=t.end,c=0,u=1,d=o,h=function(){var y=r==null?void 0:r[c];if(y===void 0)return{v:fee(r,u)};var p=c,x,v=function(){return x===void 0&&(x=n(y,p)),x},b=y.coordinate,w=c===0||Fw(e,b,v,d,l);w||(c=0,d=o,u+=1),w&&(d=b+e*(v()/2+a),c+=u)},f;u<=i.length;)if(f=h(),f)return f.v;return[]}function Ty(e){"@babel/helpers - typeof";return Ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ty(e)}function f6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f6(Object(n),!0).forEach(function(r){pHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pHe(e,t,n){return t=gHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gHe(e){var t=yHe(e,"string");return Ty(t)=="symbol"?t:t+""}function yHe(e,t){if(Ty(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xHe(e,t,n,r,a){for(var i=(r||[]).slice(),o=i.length,l=t.start,c=t.end,u=function(f){var m=i[f],y,p=function(){return y===void 0&&(y=n(m,f)),y};if(f===o-1){var x=e*(m.coordinate+e*p()/2-c);i[f]=m=Jr(Jr({},m),{},{tickCoord:x>0?m.coordinate-x*e:m.coordinate})}else i[f]=m=Jr(Jr({},m),{},{tickCoord:m.coordinate});var v=Fw(e,m.tickCoord,p,l,c);v&&(c=m.tickCoord-e*(p()/2+a),i[f]=Jr(Jr({},m),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return i}function vHe(e,t,n,r,a,i){var o=(r||[]).slice(),l=o.length,c=t.start,u=t.end;if(i){var d=r[l-1],h=n(d,l-1),f=e*(d.coordinate+e*h/2-u);o[l-1]=d=Jr(Jr({},d),{},{tickCoord:f>0?d.coordinate-f*e:d.coordinate});var m=Fw(e,d.tickCoord,function(){return h},c,u);m&&(u=d.tickCoord-e*(h/2+a),o[l-1]=Jr(Jr({},d),{},{isShow:!0}))}for(var y=i?l-1:l,p=function(b){var w=o[b],S,j=function(){return S===void 0&&(S=n(w,b)),S};if(b===0){var N=e*(w.coordinate-e*j()/2-c);o[b]=w=Jr(Jr({},w),{},{tickCoord:N<0?w.coordinate-N*e:w.coordinate})}else o[b]=w=Jr(Jr({},w),{},{tickCoord:w.coordinate});var C=Fw(e,w.tickCoord,j,c,u);C&&(c=w.tickCoord+e*(j()/2+a),o[b]=Jr(Jr({},w),{},{isShow:!0}))},x=0;x<y;x++)p(x);return o}function FR(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,h=e.angle;if(!a||!a.length||!r)return[];if(ke(c)||mo.isSsr)return fHe(a,typeof c=="number"&&ke(c)?c:0);var f=[],m=l==="top"||l==="bottom"?"width":"height",y=d&&m==="width"?Zp(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},p=function(w,S){var j=xt(u)?u(w.value,S):w.value;return m==="width"?dHe(Zp(j,{fontSize:t,letterSpacing:n}),y,h):Zp(j,{fontSize:t,letterSpacing:n})[m]},x=a.length>=2?ws(a[1].coordinate-a[0].coordinate):1,v=hHe(i,x,m);return c==="equidistantPreserveStart"?mHe(x,v,p,a,o):(c==="preserveStart"||c==="preserveStartEnd"?f=vHe(x,v,p,a,o,c==="preserveStartEnd"):f=xHe(x,v,p,a,o),f.filter(function(b){return b.isShow}))}var bHe=["viewBox"],wHe=["viewBox"],SHe=["ticks"];function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vf(e)}function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kh.apply(this,arguments)}function m6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m6(Object(n),!0).forEach(function(r){BR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k_(e,t){if(e==null)return{};var n=jHe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pee(r.key),r)}}function _He(e,t,n){return t&&p6(e.prototype,t),n&&p6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CHe(e,t,n){return t=Bw(t),EHe(e,mee()?Reflect.construct(t,n||[],Bw(e).constructor):t.apply(e,n))}function EHe(e,t){if(t&&(Vf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kHe(e)}function kHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mee=function(){return!!e})()}function Bw(e){return Bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bw(e)}function PHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tT(e,t)}function tT(e,t){return tT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},tT(e,t)}function BR(e,t,n){return t=pee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pee(e){var t=THe(e,"string");return Vf(t)=="symbol"?t:t+""}function THe(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lm=function(e){function t(n){var r;return NHe(this,t),r=CHe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return PHe(t,e),_He(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,o=k_(r,bHe),l=this.props,c=l.viewBox,u=k_(l,wHe);return!Uh(i,c)||!Uh(o,u)||!Uh(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,o=a.y,l=a.width,c=a.height,u=a.orientation,d=a.tickSize,h=a.mirror,f=a.tickMargin,m,y,p,x,v,b,w=h?-1:1,S=r.tickSize||d,j=ke(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=y=r.coordinate,x=o+ +!h*c,p=x-w*S,b=p-w*f,v=j;break;case"left":p=x=r.coordinate,y=i+ +!h*l,m=y-w*S,v=m-w*f,b=j;break;case"right":p=x=r.coordinate,y=i+ +h*l,m=y+w*S,v=m+w*f,b=j;break;default:m=y=r.coordinate,x=o+ +h*c,p=x+w*S,b=p+w*f,v=j;break}return{line:{x1:m,y1:p,x2:y,y2:x},tick:{x:v,y:b}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.orientation,u=r.mirror,d=r.axisLine,h=hs(hs(hs({},ot(this.props,!1)),ot(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var f=+(c==="top"&&!u||c==="bottom"&&u);h=hs(hs({},h),{},{x1:a,y1:i+f*l,x2:a+o,y2:i+f*l})}else{var m=+(c==="left"&&!u||c==="right"&&u);h=hs(hs({},h),{},{x1:a+m*o,y1:i,x2:a+m*o,y2:i+l})}return z.createElement("line",kh({},h,{className:Nt("recharts-cartesian-axis-line",wa(d,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var o=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,h=l.tickFormatter,f=l.unit,m=FR(hs(hs({},this.props),{},{ticks:r}),a,i),y=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),x=ot(this.props,!1),v=ot(d,!1),b=hs(hs({},x),{},{fill:"none"},ot(c,!1)),w=m.map(function(S,j){var N=o.getTickLineCoord(S),C=N.line,_=N.tick,A=hs(hs(hs(hs({textAnchor:y,verticalAnchor:p},x),{},{stroke:"none",fill:u},v),_),{},{index:j,payload:S,visibleTicksCount:m.length,tickFormatter:h});return z.createElement(rn,kh({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},rd(o.props,S,j)),c&&z.createElement("line",kh({},b,C,{className:Nt("recharts-cartesian-axis-tick-line",wa(c,"className"))})),d&&t.renderTickItem(d,A,"".concat(xt(h)?h(S.value,j):S.value).concat(f||"")))});return z.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,o=a.width,l=a.height,c=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var h=this.props,f=h.ticks,m=k_(h,SHe),y=f;return xt(c)&&(y=f&&f.length>0?c(this.props):c(m)),o<=0||l<=0||!y||!y.length?null:z.createElement(rn,{className:Nt("recharts-cartesian-axis",u),ref:function(x){r.layerReference=x}},i&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Cr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var o;return z.isValidElement(r)?o=z.cloneElement(r,a):xt(r)?o=r(a):o=z.createElement(sd,kh({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(g.Component);BR(Lm,"displayName","CartesianAxis");BR(Lm,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var AHe=["x1","y1","x2","y2","key"],OHe=["offset"];function od(e){"@babel/helpers - typeof";return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}function g6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ns(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g6(Object(n),!0).forEach(function(r){RHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RHe(e,t,n){return t=IHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IHe(e){var t=MHe(e,"string");return od(t)=="symbol"?t:t+""}function MHe(e,t){if(od(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(od(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cu(){return Cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cu.apply(this,arguments)}function y6(e,t){if(e==null)return{};var n=DHe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var LHe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,o=t.width,l=t.height,c=t.ry;return z.createElement("rect",{x:a,y:i,ry:c,width:o,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function gee(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(xt(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,o=t.y2,l=t.key,c=y6(t,AHe),u=ot(c,!1);u.offset;var d=y6(u,OHe);n=z.createElement("line",Cu({},d,{x1:r,y1:a,x2:i,y2:o,fill:"none",key:l}))}return n}function $He(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var u=ns(ns({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(c),index:c});return gee(a,u)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function FHe(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var u=ns(ns({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(c),index:c});return gee(a,u)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function BHe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(f){return Math.round(f+a-a)}).sort(function(f,m){return f-m});a!==d[0]&&d.unshift(0);var h=d.map(function(f,m){var y=!d[m+1],p=y?a+o-f:d[m+1]-f;if(p<=0)return null;var x=m%t.length;return z.createElement("rect",{key:"react-".concat(m),y:f,x:r,height:p,width:i,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function zHe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(function(f){return Math.round(f+i-i)}).sort(function(f,m){return f-m});i!==d[0]&&d.unshift(0);var h=d.map(function(f,m){var y=!d[m+1],p=y?i+l-f:d[m+1]-f;if(p<=0)return null;var x=m%r.length;return z.createElement("rect",{key:"react-".concat(m),x:f,y:o,width:p,height:c,stroke:"none",fill:r[x],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var UHe=function(t,n){var r=t.xAxis,a=t.width,i=t.height,o=t.offset;return dJ(FR(ns(ns(ns({},Lm.defaultProps),r),{},{ticks:Vo(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,n)},qHe=function(t,n){var r=t.yAxis,a=t.width,i=t.height,o=t.offset;return dJ(FR(ns(ns(ns({},Lm.defaultProps),r),{},{ticks:Vo(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,n)},Xd={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function u1(e){var t,n,r,a,i,o,l=MR(),c=DR(),u=T7e(),d=ns(ns({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Xd.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Xd.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Xd.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Xd.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Xd.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Xd.verticalFill,x:ke(e.x)?e.x:u.left,y:ke(e.y)?e.y:u.top,width:ke(e.width)?e.width:u.width,height:ke(e.height)?e.height:u.height}),h=d.x,f=d.y,m=d.width,y=d.height,p=d.syncWithTicks,x=d.horizontalValues,v=d.verticalValues,b=E7e(),w=k7e();if(!ke(m)||m<=0||!ke(y)||y<=0||!ke(h)||h!==+h||!ke(f)||f!==+f)return null;var S=d.verticalCoordinatesGenerator||UHe,j=d.horizontalCoordinatesGenerator||qHe,N=d.horizontalPoints,C=d.verticalPoints;if((!N||!N.length)&&xt(j)){var _=x&&x.length,A=j({yAxis:w?ns(ns({},w),{},{ticks:_?x:w.ticks}):void 0,width:l,height:c,offset:u},_?!0:p);Ai(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(od(A),"]")),Array.isArray(A)&&(N=A)}if((!C||!C.length)&&xt(S)){var P=v&&v.length,R=S({xAxis:b?ns(ns({},b),{},{ticks:P?v:b.ticks}):void 0,width:l,height:c,offset:u},P?!0:p);Ai(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(od(R),"]")),Array.isArray(R)&&(C=R)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(LHe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),z.createElement($He,Cu({},d,{offset:u,horizontalPoints:N,xAxis:b,yAxis:w})),z.createElement(FHe,Cu({},d,{offset:u,verticalPoints:C,xAxis:b,yAxis:w})),z.createElement(BHe,Cu({},d,{horizontalPoints:N})),z.createElement(zHe,Cu({},d,{verticalPoints:C})))}u1.displayName="CartesianGrid";var WHe=["type","layout","connectNulls","ref"],VHe=["key"];function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function x6(e,t){if(e==null)return{};var n=HHe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sg(){return sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sg.apply(this,arguments)}function v6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ra(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v6(Object(n),!0).forEach(function(r){wi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qd(e){return XHe(e)||YHe(e)||KHe(e)||GHe()}function GHe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
911In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KHe(e,t){if(e){if(typeof e=="string")return nT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nT(e,t)}}function YHe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XHe(e){if(Array.isArray(e))return nT(e)}function nT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function QHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xee(r.key),r)}}function ZHe(e,t,n){return t&&b6(e.prototype,t),n&&b6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JHe(e,t,n){return t=zw(t),eGe(e,yee()?Reflect.construct(t,n||[],zw(e).constructor):t.apply(e,n))}function eGe(e,t){if(t&&(Hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tGe(e)}function tGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yee=function(){return!!e})()}function zw(e){return zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zw(e)}function nGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rT(e,t)}function rT(e,t){return rT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},rT(e,t)}function wi(e,t,n){return t=xee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xee(e){var t=rGe(e,"string");return Hf(t)=="symbol"?t:t+""}function rGe(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ox=function(e){function t(){var n;QHe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=JHe(this,t,[].concat(a)),wi(n,"state",{isAnimationFinished:!0,totalLength:0}),wi(n,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),wi(n,"getStrokeDasharray",function(o,l,c){var u=c.reduce(function(v,b){return v+b});if(!u)return n.generateSimpleStrokeDasharray(l,o);for(var d=Math.floor(o/u),h=o%u,f=l-o,m=[],y=0,p=0;y<c.length;p+=c[y],++y)if(p+c[y]>h){m=[].concat(Qd(c.slice(0,y)),[h-p]);break}var x=m.length%2===0?[0,f]:[f];return[].concat(Qd(t.repeat(c,d)),Qd(m),x).map(function(v){return"".concat(v,"px")}).join(", ")}),wi(n,"id",km("recharts-line-")),wi(n,"pathRef",function(o){n.mainCurve=o}),wi(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),wi(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return nGe(t,e),ZHe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,h=Sa(d,Ax);if(!h)return null;var f=function(p,x){return{x:p.x,y:p.y,value:p.value,errorVal:br(p.payload,x)}},m={clipPath:r?"url(#clipPath-".concat(a,")"):null};return z.createElement(rn,m,h.map(function(y){return z.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,h=ot(this.props,!1),f=ot(c,!0),m=u.map(function(p,x){var v=ra(ra(ra({key:"dot-".concat(x),r:3},h),f),{},{value:p.value,dataKey:d,cx:p.x,cy:p.y,index:x,payload:p.payload});return t.renderDotItem(c,v)}),y={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return z.createElement(rn,sg({className:"recharts-line-dots",key:"dots"},y),m)}},{key:"renderCurveStatically",value:function(r,a,i,o){var l=this.props,c=l.type,u=l.layout,d=l.connectNulls;l.ref;var h=x6(l,WHe),f=ra(ra(ra({},ot(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},o),{},{type:c,layout:u,connectNulls:d});return z.createElement(ww,sg({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,o=this.props,l=o.points,c=o.strokeDasharray,u=o.isAnimationActive,d=o.animationBegin,h=o.animationDuration,f=o.animationEasing,m=o.animationId,y=o.animateNewValues,p=o.width,x=o.height,v=this.state,b=v.prevPoints,w=v.totalLength;return z.createElement(jo,{begin:d,duration:h,isActive:u,easing:f,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var j=S.t;if(b){var N=b.length/l.length,C=l.map(function(I,B){var $=Math.floor(B*N);if(b[$]){var q=b[$],L=ha(q.x,I.x),k=ha(q.y,I.y);return ra(ra({},I),{},{x:L(j),y:k(j)})}if(y){var T=ha(p*2,I.x),F=ha(x/2,I.y);return ra(ra({},I),{},{x:T(j),y:F(j)})}return ra(ra({},I),{},{x:I.x,y:I.y})});return i.renderCurveStatically(C,r,a)}var _=ha(0,w),A=_(j),P;if(c){var R="".concat(c).split(/[,\s]+/gim).map(function(I){return parseFloat(I)});P=i.getStrokeDasharray(A,w,R)}else P=i.generateSimpleStrokeDasharray(w,A);return i.renderCurveStatically(l,r,a,{strokeDasharray:P})})}},{key:"renderCurve",value:function(r,a){var i=this.props,o=i.points,l=i.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return l&&o&&o.length&&(!u&&d>0||!Tx(u,o))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(o,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,o=a.dot,l=a.points,c=a.className,u=a.xAxis,d=a.yAxis,h=a.top,f=a.left,m=a.width,y=a.height,p=a.isAnimationActive,x=a.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,b=l.length===1,w=Nt("recharts-line",c),S=u&&u.allowDataOverflow,j=d&&d.allowDataOverflow,N=S||j,C=jt(x)?this.id:x,_=(r=ot(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=_.r,P=A===void 0?3:A,R=_.strokeWidth,I=R===void 0?2:R,B=DAe(o)?o:{},$=B.clipDot,q=$===void 0?!0:$,L=P*2+I;return z.createElement(rn,{className:w},S||j?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(C)},z.createElement("rect",{x:S?f:f-m/2,y:j?h:h-y/2,width:S?m:m*2,height:j?y:y*2})),!q&&z.createElement("clipPath",{id:"clipPath-dots-".concat(C)},z.createElement("rect",{x:f-L/2,y:h-L/2,width:m+L,height:y+L}))):null,!b&&this.renderCurve(N,C),this.renderErrorBar(N,C),(b||o)&&this.renderDots(N,q,C),(!p||v)&&Qo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,a){for(var i=r.length%2!==0?[].concat(Qd(r),[0]):r,o=[],l=0;l<a;++l)o=[].concat(Qd(o),Qd(i));return o}},{key:"renderDotItem",value:function(r,a){var i;if(z.isValidElement(r))i=z.cloneElement(r,a);else if(xt(r))i=r(a);else{var o=a.key,l=x6(a,VHe),c=Nt("recharts-line-dot",typeof r!="boolean"?r.className:"");i=z.createElement(Zj,sg({key:o},l,{className:c}))}return i}}])}(g.PureComponent);wi(Ox,"displayName","Line");wi(Ox,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!mo.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});wi(Ox,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,h=c.map(function(f,m){var y=br(f,o);return d==="horizontal"?{x:W3({axis:n,ticks:a,bandSize:l,entry:f,index:m}),y:jt(y)?null:r.scale(y),value:y,payload:f}:{x:jt(y)?null:n.scale(y),y:W3({axis:r,ticks:i,bandSize:l,entry:f,index:m}),value:y,payload:f}});return ra({points:h,layout:d},u)});function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function sGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aGe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wee(r.key),r)}}function iGe(e,t,n){return t&&aGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oGe(e,t,n){return t=Uw(t),lGe(e,vee()?Reflect.construct(t,n||[],Uw(e).constructor):t.apply(e,n))}function lGe(e,t){if(t&&(Gf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cGe(e)}function cGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vee=function(){return!!e})()}function Uw(e){return Uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uw(e)}function uGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sT(e,t)}function sT(e,t){return sT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},sT(e,t)}function bee(e,t,n){return t=wee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wee(e){var t=dGe(e,"string");return Gf(t)=="symbol"?t:t+""}function dGe(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aT(){return aT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aT.apply(this,arguments)}function hGe(e){var t=e.xAxisId,n=MR(),r=DR(),a=aee(t);return a==null?null:z.createElement(Lm,aT({},a,{className:Nt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Vo(o,!0)}}))}var vl=function(e){function t(){return sGe(this,t),oGe(this,t,arguments)}return uGe(t,e),iGe(t,[{key:"render",value:function(){return z.createElement(hGe,this.props)}}])}(z.Component);bee(vl,"displayName","XAxis");bee(vl,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function fGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mGe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nee(r.key),r)}}function pGe(e,t,n){return t&&mGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gGe(e,t,n){return t=qw(t),yGe(e,See()?Reflect.construct(t,n||[],qw(e).constructor):t.apply(e,n))}function yGe(e,t){if(t&&(Kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xGe(e)}function xGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function See(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(See=function(){return!!e})()}function qw(e){return qw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qw(e)}function vGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iT(e,t)}function iT(e,t){return iT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},iT(e,t)}function jee(e,t,n){return t=Nee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nee(e){var t=bGe(e,"string");return Kf(t)=="symbol"?t:t+""}function bGe(e,t){if(Kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oT(){return oT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oT.apply(this,arguments)}var wGe=function(t){var n=t.yAxisId,r=MR(),a=DR(),i=iee(n);return i==null?null:z.createElement(Lm,oT({},i,{className:Nt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(l){return Vo(l,!0)}}))},bl=function(e){function t(){return fGe(this,t),gGe(this,t,arguments)}return vGe(t,e),pGe(t,[{key:"render",value:function(){return z.createElement(wGe,this.props)}}])}(z.Component);jee(bl,"displayName","YAxis");jee(bl,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function w6(e){return _Ge(e)||NGe(e)||jGe(e)||SGe()}function SGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
912In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jGe(e,t){if(e){if(typeof e=="string")return lT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lT(e,t)}}function NGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Ge(e){if(Array.isArray(e))return lT(e)}function lT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var cT=function(t,n,r,a,i){var o=Sa(t,$R),l=Sa(t,o1),c=[].concat(w6(o),w6(l)),u=Sa(t,c1),d="".concat(a,"Id"),h=a[0],f=n;if(c.length&&(f=c.reduce(function(p,x){if(x.props[d]===r&&go(x.props,"extendDomain")&&ke(x.props[h])){var v=x.props[h];return[Math.min(p[0],v),Math.max(p[1],v)]}return p},f)),u.length){var m="".concat(h,"1"),y="".concat(h,"2");f=u.reduce(function(p,x){if(x.props[d]===r&&go(x.props,"extendDomain")&&ke(x.props[m])&&ke(x.props[y])){var v=x.props[m],b=x.props[y];return[Math.min(p[0],v,b),Math.max(p[1],v,b)]}return p},f)}return i&&i.length&&(f=i.reduce(function(p,x){return ke(x)?[Math.min(p[0],x),Math.max(p[1],x)]:p},f)),f},_ee={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,h,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new a(d,h||c,f),y=n?n+u:u;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],m]:c._events[y].push(m):(c._events[y]=m,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,h;if(this._eventsCount===0)return u;for(h in d=this._events)t.call(d,h)&&u.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=n?n+u:u,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var f=0,m=h.length,y=new Array(m);f<m;f++)y[f]=h[f].fn;return y},l.prototype.listenerCount=function(u){var d=n?n+u:u,h=this._events[d];return h?h.fn?1:h.length:0},l.prototype.emit=function(u,d,h,f,m,y){var p=n?n+u:u;if(!this._events[p])return!1;var x=this._events[p],v=arguments.length,b,w;if(x.fn){switch(x.once&&this.removeListener(u,x.fn,void 0,!0),v){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,d),!0;case 3:return x.fn.call(x.context,d,h),!0;case 4:return x.fn.call(x.context,d,h,f),!0;case 5:return x.fn.call(x.context,d,h,f,m),!0;case 6:return x.fn.call(x.context,d,h,f,m,y),!0}for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];x.fn.apply(x.context,b)}else{var S=x.length,j;for(w=0;w<S;w++)switch(x[w].once&&this.removeListener(u,x[w].fn,void 0,!0),v){case 1:x[w].fn.call(x[w].context);break;case 2:x[w].fn.call(x[w].context,d);break;case 3:x[w].fn.call(x[w].context,d,h);break;case 4:x[w].fn.call(x[w].context,d,h,f);break;default:if(!b)for(j=1,b=new Array(v-1);j<v;j++)b[j-1]=arguments[j];x[w].fn.apply(x[w].context,b)}}return!0},l.prototype.on=function(u,d,h){return i(this,u,d,h,!1)},l.prototype.once=function(u,d,h){return i(this,u,d,h,!0)},l.prototype.removeListener=function(u,d,h,f){var m=n?n+u:u;if(!this._events[m])return this;if(!d)return o(this,m),this;var y=this._events[m];if(y.fn)y.fn===d&&(!f||y.once)&&(!h||y.context===h)&&o(this,m);else{for(var p=0,x=[],v=y.length;p<v;p++)(y[p].fn!==d||f&&!y[p].once||h&&y[p].context!==h)&&x.push(y[p]);x.length?this._events[m]=x.length===1?x[0]:x:o(this,m)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(_ee);var CGe=_ee.exports;const EGe=$t(CGe);var P_=new EGe,T_="recharts.syncMouseEvents";function Ay(e){"@babel/helpers - typeof";return Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ay(e)}function kGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PGe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cee(r.key),r)}}function TGe(e,t,n){return t&&PGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function A_(e,t,n){return t=Cee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cee(e){var t=AGe(e,"string");return Ay(t)=="symbol"?t:t+""}function AGe(e,t){if(Ay(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ay(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OGe=function(){function e(){kGe(this,e),A_(this,"activeIndex",0),A_(this,"coordinateList",[]),A_(this,"layout","horizontal")}return TGe(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,o=n.container,l=o===void 0?null:o,c=n.layout,u=c===void 0?null:c,d=n.offset,h=d===void 0?null:d,f=n.mouseHandlerCallback,m=f===void 0?null:f;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=i+c+u,f=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:h,pageY:f})}}}])}();function RGe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&ke(r)&&ke(a))return!0}return!1}function IGe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Eee(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,o=Sn(t,n,r,a),l=Sn(t,n,r,i);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function MGe(e,t,n){var r,a,i,o;if(e==="horizontal")r=t.x,i=r,a=n.top,o=n.top+n.height;else if(e==="vertical")a=t.y,o=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,h=t.angle,f=Sn(l,c,u,h),m=Sn(l,c,d,h);r=f.x,a=f.y,i=m.x,o=m.y}else return Eee(t);return[{x:r,y:a},{x:i,y:o}]}function Oy(e){"@babel/helpers - typeof";return Oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oy(e)}function S6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ab(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S6(Object(n),!0).forEach(function(r){DGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DGe(e,t,n){return t=LGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LGe(e){var t=$Ge(e,"string");return Oy(t)=="symbol"?t:t+""}function $Ge(e,t){if(Oy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Oy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FGe(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,h=e.layout,f=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!i||!o||f!=="ScatterChart"&&a!=="axis")return null;var y,p=ww;if(f==="ScatterChart")y=o,p=r9e;else if(f==="BarChart")y=IGe(h,o,c,d),p=AR;else if(h==="radial"){var x=Eee(o),v=x.cx,b=x.cy,w=x.radius,S=x.startAngle,j=x.endAngle;y={cx:v,cy:b,startAngle:S,endAngle:j,innerRadius:w,outerRadius:w},p=SJ}else y={points:MGe(h,o,c)},p=ww;var N=ab(ab(ab(ab({stroke:"#ccc",pointerEvents:"none"},c),y),ot(m,!1)),{},{payload:l,payloadIndex:u,className:Nt("recharts-tooltip-cursor",m.className)});return g.isValidElement(m)?g.cloneElement(m,N):g.createElement(p,N)}var BGe=["item"],zGe=["children","className","width","height","style","compact","title","desc"];function Yf(e){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yf(e)}function ag(){return ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ag.apply(this,arguments)}function j6(e,t){return WGe(e)||qGe(e,t)||Pee(e,t)||UGe()}function UGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
913In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qGe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function WGe(e){if(Array.isArray(e))return e}function N6(e,t){if(e==null)return{};var n=VGe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GGe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tee(r.key),r)}}function KGe(e,t,n){return t&&GGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YGe(e,t,n){return t=Ww(t),XGe(e,kee()?Reflect.construct(t,n||[],Ww(e).constructor):t.apply(e,n))}function XGe(e,t){if(t&&(Yf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QGe(e)}function QGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kee=function(){return!!e})()}function Ww(e){return Ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ww(e)}function ZGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uT(e,t)}function uT(e,t){return uT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},uT(e,t)}function Xf(e){return tKe(e)||eKe(e)||Pee(e)||JGe()}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
914In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pee(e,t){if(e){if(typeof e=="string")return dT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dT(e,t)}}function eKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tKe(e){if(Array.isArray(e))return dT(e)}function dT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_6(Object(n),!0).forEach(function(r){ht(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ht(e,t,n){return t=Tee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tee(e){var t=nKe(e,"string");return Yf(t)=="symbol"?t:t+""}function nKe(e,t){if(Yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rKe={xAxis:["bottom","top"],yAxis:["left","right"]},sKe={width:"100%",height:"100%"},Aee={x:0,y:0};function ib(e){return e}var aKe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},iKe=function(t,n,r,a){var i=n.find(function(d){return d&&d.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,l=a.radius;return de(de(de({},a),Sn(a.cx,a.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,u=a.angle;return de(de(de({},a),Sn(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return Aee},d1=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,o=(r??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(Xf(l),Xf(u)):l},[]);return o.length>0?o:t&&t.length&&ke(a)&&ke(i)?t.slice(a,i+1):[]};function Oee(e){return e==="number"?[0,"auto"]:void 0}var hT=function(t,n,r,a){var i=t.graphicalItems,o=t.tooltipAxis,l=d1(n,t);return r<0||!i||!i.length||r>=l.length?null:i.reduce(function(c,u){var d,h=(d=u.props.data)!==null&&d!==void 0?d:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(o.dataKey&&!o.allowDuplicatedCategory){var m=h===void 0?l:h;f=W0(m,o.dataKey,a)}else f=h&&h[r]||l[r];return f?[].concat(Xf(c),[gJ(u,f)]):c},[])},C6=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},o=aKe(i,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=Lze(o,l,u,c);if(d>=0&&u){var h=u[d]&&u[d].value,f=hT(t,n,d,h),m=iKe(r,l,d,i);return{activeTooltipIndex:d,activeLabel:h,activePayload:f,activeCoordinate:m}}return null},oKe=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,h=t.children,f=t.stackOffset,m=uJ(d,i);return r.reduce(function(y,p){var x,v=p.type.defaultProps!==void 0?de(de({},p.type.defaultProps),p.props):p.props,b=v.type,w=v.dataKey,S=v.allowDataOverflow,j=v.allowDuplicatedCategory,N=v.scale,C=v.ticks,_=v.includeHidden,A=v[o];if(y[A])return y;var P=d1(t.data,{graphicalItems:a.filter(function(D){var M,X=o in D.props?D.props[o]:(M=D.type.defaultProps)===null||M===void 0?void 0:M[o];return X===A}),dataStartIndex:c,dataEndIndex:u}),R=P.length,I,B,$;RGe(v.domain,S,b)&&(I=CP(v.domain,null,S),m&&(b==="number"||N!=="auto")&&($=eg(P,w,"category")));var q=Oee(b);if(!I||I.length===0){var L,k=(L=v.domain)!==null&&L!==void 0?L:q;if(w){if(I=eg(P,w,b),b==="category"&&m){var T=EAe(I);j&&T?(B=I,I=Aw(0,R)):j||(I=K3(k,I,p).reduce(function(D,M){return D.indexOf(M)>=0?D:[].concat(Xf(D),[M])},[]))}else if(b==="category")j?I=I.filter(function(D){return D!==""&&!jt(D)}):I=K3(k,I,p).reduce(function(D,M){return D.indexOf(M)>=0||M===""||jt(M)?D:[].concat(Xf(D),[M])},[]);else if(b==="number"){var F=Uze(P,a.filter(function(D){var M,X,W=o in D.props?D.props[o]:(M=D.type.defaultProps)===null||M===void 0?void 0:M[o],re="hide"in D.props?D.props.hide:(X=D.type.defaultProps)===null||X===void 0?void 0:X.hide;return W===A&&(_||!re)}),w,i,d);F&&(I=F)}m&&(b==="number"||N!=="auto")&&($=eg(P,w,"category"))}else m?I=Aw(0,R):l&&l[A]&&l[A].hasStack&&b==="number"?I=f==="expand"?[0,1]:pJ(l[A].stackGroups,c,u):I=cJ(P,a.filter(function(D){var M=o in D.props?D.props[o]:D.type.defaultProps[o],X="hide"in D.props?D.props.hide:D.type.defaultProps.hide;return M===A&&(_||!X)}),b,d,!0);if(b==="number")I=cT(h,I,A,i,C),k&&(I=CP(k,I,S));else if(b==="category"&&k){var O=k,E=I.every(function(D){return O.indexOf(D)>=0});E&&(I=O)}}return de(de({},y),{},ht({},A,de(de({},v),{},{axisType:i,domain:I,categoricalDomain:$,duplicateDomain:B,originalDomain:(x=v.domain)!==null&&x!==void 0?x:q,isCategorical:m,layout:d})))},{})},lKe=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,h=t.children,f=d1(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),m=f.length,y=uJ(d,i),p=-1;return r.reduce(function(x,v){var b=v.type.defaultProps!==void 0?de(de({},v.type.defaultProps),v.props):v.props,w=b[o],S=Oee("number");if(!x[w]){p++;var j;return y?j=Aw(0,m):l&&l[w]&&l[w].hasStack?(j=pJ(l[w].stackGroups,c,u),j=cT(h,j,w,i)):(j=CP(S,cJ(f,r.filter(function(N){var C,_,A=o in N.props?N.props[o]:(C=N.type.defaultProps)===null||C===void 0?void 0:C[o],P="hide"in N.props?N.props.hide:(_=N.type.defaultProps)===null||_===void 0?void 0:_.hide;return A===w&&!P}),"number",d),a.defaultProps.allowDataOverflow),j=cT(h,j,w,i)),de(de({},x),{},ht({},w,de(de({axisType:i},a.defaultProps),{},{hide:!0,orientation:wa(rKe,"".concat(i,".").concat(p%2),null),domain:j,originalDomain:S,isCategorical:y,layout:d})))}return x},{})},cKe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,h="".concat(a,"Id"),f=Sa(d,i),m={};return f&&f.length?m=oKe(t,{axes:f,graphicalItems:o,axisType:a,axisIdKey:h,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(m=lKe(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:h,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),m},uKe=function(t){var n=Wl(t),r=Vo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:sR(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:xw(n,r)}},E6=function(t){var n=t.children,r=t.defaultShowTooltip,a=ua(n,Bf),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},dKe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Yo(n&&n.type);return r&&r.indexOf("Bar")>=0})},k6=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},hKe=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=r.width,d=r.height,h=r.children,f=r.margin||{},m=ua(h,Bf),y=ua(h,Uu),p=Object.keys(c).reduce(function(j,N){var C=c[N],_=C.orientation;return!C.mirror&&!C.hide?de(de({},j),{},ht({},_,j[_]+C.width)):j},{left:f.left||0,right:f.right||0}),x=Object.keys(o).reduce(function(j,N){var C=o[N],_=C.orientation;return!C.mirror&&!C.hide?de(de({},j),{},ht({},_,wa(j,"".concat(_))+C.height)):j},{top:f.top||0,bottom:f.bottom||0}),v=de(de({},x),p),b=v.bottom;m&&(v.bottom+=m.props.height||Bf.defaultProps.height),y&&n&&(v=Bze(v,a,r,n));var w=u-v.left-v.right,S=d-v.top-v.bottom;return de(de({brushBottom:b},v),{},{width:Math.max(w,0),height:Math.max(S,0)})},fKe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},zR=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,f=function(x,v){var b=v.graphicalItems,w=v.stackGroups,S=v.offset,j=v.updateId,N=v.dataStartIndex,C=v.dataEndIndex,_=x.barSize,A=x.layout,P=x.barGap,R=x.barCategoryGap,I=x.maxBarSize,B=k6(A),$=B.numericAxisName,q=B.cateAxisName,L=dKe(b),k=[];return b.forEach(function(T,F){var O=d1(x.data,{graphicalItems:[T],dataStartIndex:N,dataEndIndex:C}),E=T.type.defaultProps!==void 0?de(de({},T.type.defaultProps),T.props):T.props,D=E.dataKey,M=E.maxBarSize,X=E["".concat($,"Id")],W=E["".concat(q,"Id")],re={},ne=c.reduce(function(Ze,Ye){var Zt=v["".concat(Ye.axisType,"Map")],Yt=E["".concat(Ye.axisType,"Id")];Zt&&Zt[Yt]||Ye.axisType==="zAxis"||id();var Nn=Zt[Yt];return de(de({},Ze),{},ht(ht({},Ye.axisType,Nn),"".concat(Ye.axisType,"Ticks"),Vo(Nn)))},re),le=ne[q],ie=ne["".concat(q,"Ticks")],ye=w&&w[X]&&w[X].hasStack&&Qze(T,w[X].stackGroups),pe=Yo(T.type).indexOf("Bar")>=0,G=xw(le,ie),Pe=[],J=L&&$ze({barSize:_,stackGroups:w,totalSize:fKe(ne,q)});if(pe){var oe,se,je=jt(M)?I:M,Ce=(oe=(se=xw(le,ie,!0))!==null&&se!==void 0?se:je)!==null&&oe!==void 0?oe:0;Pe=Fze({barGap:P,barCategoryGap:R,bandSize:Ce!==G?Ce:G,sizeList:J[W],maxBarSize:je}),Ce!==G&&(Pe=Pe.map(function(Ze){return de(de({},Ze),{},{position:de(de({},Ze.position),{},{offset:Ze.position.offset-Ce/2})})}))}var ut=T&&T.type&&T.type.getComposedData;ut&&k.push({props:de(de({},ut(de(de({},ne),{},{displayedData:O,props:x,dataKey:D,item:T,bandSize:G,barPosition:Pe,offset:S,stackedData:ye,layout:A,dataStartIndex:N,dataEndIndex:C}))),{},ht(ht(ht({key:T.key||"item-".concat(F)},$,ne[$]),q,ne[q]),"animationId",j)),childIndex:FAe(T,x.children),item:T})}),k},m=function(x,v){var b=x.props,w=x.dataStartIndex,S=x.dataEndIndex,j=x.updateId;if(!z$({props:b}))return null;var N=b.children,C=b.layout,_=b.stackOffset,A=b.data,P=b.reverseStackOrder,R=k6(C),I=R.numericAxisName,B=R.cateAxisName,$=Sa(N,r),q=Yze(A,$,"".concat(I,"Id"),"".concat(B,"Id"),_,P),L=c.reduce(function(E,D){var M="".concat(D.axisType,"Map");return de(de({},E),{},ht({},M,cKe(b,de(de({},D),{},{graphicalItems:$,stackGroups:D.axisType===I&&q,dataStartIndex:w,dataEndIndex:S}))))},{}),k=hKe(de(de({},L),{},{props:b,graphicalItems:$}),v==null?void 0:v.legendBBox);Object.keys(L).forEach(function(E){L[E]=d(b,L[E],k,E.replace("Map",""),n)});var T=L["".concat(B,"Map")],F=uKe(T),O=f(b,de(de({},L),{},{dataStartIndex:w,dataEndIndex:S,updateId:j,graphicalItems:$,stackGroups:q,offset:k}));return de(de({formattedGraphicalItems:O,graphicalItems:$,offset:k,stackGroups:q},F),L)},y=function(p){function x(v){var b,w,S;return HGe(this,x),S=YGe(this,x,[v]),ht(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ht(S,"accessibilityManager",new OGe),ht(S,"handleLegendBBoxUpdate",function(j){if(j){var N=S.state,C=N.dataStartIndex,_=N.dataEndIndex,A=N.updateId;S.setState(de({legendBBox:j},m({props:S.props,dataStartIndex:C,dataEndIndex:_,updateId:A},de(de({},S.state),{},{legendBBox:j}))))}}),ht(S,"handleReceiveSyncEvent",function(j,N,C){if(S.props.syncId===j){if(C===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(N)}}),ht(S,"handleBrushChange",function(j){var N=j.startIndex,C=j.endIndex;if(N!==S.state.dataStartIndex||C!==S.state.dataEndIndex){var _=S.state.updateId;S.setState(function(){return de({dataStartIndex:N,dataEndIndex:C},m({props:S.props,dataStartIndex:N,dataEndIndex:C,updateId:_},S.state))}),S.triggerSyncEvent({dataStartIndex:N,dataEndIndex:C})}}),ht(S,"handleMouseEnter",function(j){var N=S.getMouseInfo(j);if(N){var C=de(de({},N),{},{isTooltipActive:!0});S.setState(C),S.triggerSyncEvent(C);var _=S.props.onMouseEnter;xt(_)&&_(C,j)}}),ht(S,"triggeredAfterMouseMove",function(j){var N=S.getMouseInfo(j),C=N?de(de({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(C),S.triggerSyncEvent(C);var _=S.props.onMouseMove;xt(_)&&_(C,j)}),ht(S,"handleItemMouseEnter",function(j){S.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ht(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),ht(S,"handleMouseMove",function(j){j.persist(),S.throttleTriggeredAfterMouseMove(j)}),ht(S,"handleMouseLeave",function(j){S.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};S.setState(N),S.triggerSyncEvent(N);var C=S.props.onMouseLeave;xt(C)&&C(N,j)}),ht(S,"handleOuterEvent",function(j){var N=$Ae(j),C=wa(S.props,"".concat(N));if(N&&xt(C)){var _,A;/.*touch.*/i.test(N)?A=S.getMouseInfo(j.changedTouches[0]):A=S.getMouseInfo(j),C((_=A)!==null&&_!==void 0?_:{},j)}}),ht(S,"handleClick",function(j){var N=S.getMouseInfo(j);if(N){var C=de(de({},N),{},{isTooltipActive:!0});S.setState(C),S.triggerSyncEvent(C);var _=S.props.onClick;xt(_)&&_(C,j)}}),ht(S,"handleMouseDown",function(j){var N=S.props.onMouseDown;if(xt(N)){var C=S.getMouseInfo(j);N(C,j)}}),ht(S,"handleMouseUp",function(j){var N=S.props.onMouseUp;if(xt(N)){var C=S.getMouseInfo(j);N(C,j)}}),ht(S,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ht(S,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseDown(j.changedTouches[0])}),ht(S,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseUp(j.changedTouches[0])}),ht(S,"triggerSyncEvent",function(j){S.props.syncId!==void 0&&P_.emit(T_,S.props.syncId,j,S.eventEmitterSymbol)}),ht(S,"applySyncEvent",function(j){var N=S.props,C=N.layout,_=N.syncMethod,A=S.state.updateId,P=j.dataStartIndex,R=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)S.setState(de({dataStartIndex:P,dataEndIndex:R},m({props:S.props,dataStartIndex:P,dataEndIndex:R,updateId:A},S.state)));else if(j.activeTooltipIndex!==void 0){var I=j.chartX,B=j.chartY,$=j.activeTooltipIndex,q=S.state,L=q.offset,k=q.tooltipTicks;if(!L)return;if(typeof _=="function")$=_(k,j);else if(_==="value"){$=-1;for(var T=0;T<k.length;T++)if(k[T].value===j.activeLabel){$=T;break}}var F=de(de({},L),{},{x:L.left,y:L.top}),O=Math.min(I,F.x+F.width),E=Math.min(B,F.y+F.height),D=k[$]&&k[$].value,M=hT(S.state,S.props.data,$),X=k[$]?{x:C==="horizontal"?k[$].coordinate:O,y:C==="horizontal"?E:k[$].coordinate}:Aee;S.setState(de(de({},j),{},{activeLabel:D,activeCoordinate:X,activePayload:M,activeTooltipIndex:$}))}else S.setState(j)}),ht(S,"renderCursor",function(j){var N,C=S.state,_=C.isTooltipActive,A=C.activeCoordinate,P=C.activePayload,R=C.offset,I=C.activeTooltipIndex,B=C.tooltipAxisBandSize,$=S.getTooltipEventType(),q=(N=j.props.active)!==null&&N!==void 0?N:_,L=S.props.layout,k=j.key||"_recharts-cursor";return z.createElement(FGe,{key:k,activeCoordinate:A,activePayload:P,activeTooltipIndex:I,chartName:n,element:j,isActive:q,layout:L,offset:R,tooltipAxisBandSize:B,tooltipEventType:$})}),ht(S,"renderPolarAxis",function(j,N,C){var _=wa(j,"type.axisType"),A=wa(S.state,"".concat(_,"Map")),P=j.type.defaultProps,R=P!==void 0?de(de({},P),j.props):j.props,I=A&&A[R["".concat(_,"Id")]];return g.cloneElement(j,de(de({},I),{},{className:Nt(_,I.className),key:j.key||"".concat(N,"-").concat(C),ticks:Vo(I,!0)}))}),ht(S,"renderPolarGrid",function(j){var N=j.props,C=N.radialLines,_=N.polarAngles,A=N.polarRadius,P=S.state,R=P.radiusAxisMap,I=P.angleAxisMap,B=Wl(R),$=Wl(I),q=$.cx,L=$.cy,k=$.innerRadius,T=$.outerRadius;return g.cloneElement(j,{polarAngles:Array.isArray(_)?_:Vo($,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(A)?A:Vo(B,!0).map(function(F){return F.coordinate}),cx:q,cy:L,innerRadius:k,outerRadius:T,key:j.key||"polar-grid",radialLines:C})}),ht(S,"renderLegend",function(){var j=S.state.formattedGraphicalItems,N=S.props,C=N.children,_=N.width,A=N.height,P=S.props.margin||{},R=_-(P.left||0)-(P.right||0),I=oJ({children:C,formattedGraphicalItems:j,legendWidth:R,legendContent:u});if(!I)return null;var B=I.item,$=N6(I,BGe);return g.cloneElement(B,de(de({},$),{},{chartWidth:_,chartHeight:A,margin:P,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),ht(S,"renderTooltip",function(){var j,N=S.props,C=N.children,_=N.accessibilityLayer,A=ua(C,Dr);if(!A)return null;var P=S.state,R=P.isTooltipActive,I=P.activeCoordinate,B=P.activePayload,$=P.activeLabel,q=P.offset,L=(j=A.props.active)!==null&&j!==void 0?j:R;return g.cloneElement(A,{viewBox:de(de({},q),{},{x:q.left,y:q.top}),active:L,label:$,payload:L?B:[],coordinate:I,accessibilityLayer:_})}),ht(S,"renderBrush",function(j){var N=S.props,C=N.margin,_=N.data,A=S.state,P=A.offset,R=A.dataStartIndex,I=A.dataEndIndex,B=A.updateId;return g.cloneElement(j,{key:j.key||"_recharts-brush",onChange:tb(S.handleBrushChange,j.props.onChange),data:_,x:ke(j.props.x)?j.props.x:P.left,y:ke(j.props.y)?j.props.y:P.top+P.height+P.brushBottom-(C.bottom||0),width:ke(j.props.width)?j.props.width:P.width,startIndex:R,endIndex:I,updateId:"brush-".concat(B)})}),ht(S,"renderReferenceElement",function(j,N,C){if(!j)return null;var _=S,A=_.clipPathId,P=S.state,R=P.xAxisMap,I=P.yAxisMap,B=P.offset,$=j.type.defaultProps||{},q=j.props,L=q.xAxisId,k=L===void 0?$.xAxisId:L,T=q.yAxisId,F=T===void 0?$.yAxisId:T;return g.cloneElement(j,{key:j.key||"".concat(N,"-").concat(C),xAxis:R[k],yAxis:I[F],viewBox:{x:B.left,y:B.top,width:B.width,height:B.height},clipPathId:A})}),ht(S,"renderActivePoints",function(j){var N=j.item,C=j.activePoint,_=j.basePoint,A=j.childIndex,P=j.isRange,R=[],I=N.props.key,B=N.item.type.defaultProps!==void 0?de(de({},N.item.type.defaultProps),N.item.props):N.item.props,$=B.activeDot,q=B.dataKey,L=de(de({index:A,dataKey:q,cx:C.x,cy:C.y,r:4,fill:TR(N.item),strokeWidth:2,stroke:"#fff",payload:C.payload,value:C.value},ot($,!1)),V0($));return R.push(x.renderActiveDot($,L,"".concat(I,"-activePoint-").concat(A))),_?R.push(x.renderActiveDot($,de(de({},L),{},{cx:_.x,cy:_.y}),"".concat(I,"-basePoint-").concat(A))):P&&R.push(null),R}),ht(S,"renderGraphicChild",function(j,N,C){var _=S.filterFormatItem(j,N,C);if(!_)return null;var A=S.getTooltipEventType(),P=S.state,R=P.isTooltipActive,I=P.tooltipAxis,B=P.activeTooltipIndex,$=P.activeLabel,q=S.props.children,L=ua(q,Dr),k=_.props,T=k.points,F=k.isRange,O=k.baseLine,E=_.item.type.defaultProps!==void 0?de(de({},_.item.type.defaultProps),_.item.props):_.item.props,D=E.activeDot,M=E.hide,X=E.activeBar,W=E.activeShape,re=!!(!M&&R&&L&&(D||X||W)),ne={};A!=="axis"&&L&&L.props.trigger==="click"?ne={onClick:tb(S.handleItemMouseEnter,j.props.onClick)}:A!=="axis"&&(ne={onMouseLeave:tb(S.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:tb(S.handleItemMouseEnter,j.props.onMouseEnter)});var le=g.cloneElement(j,de(de({},_.props),ne));function ie(Ye){return typeof I.dataKey=="function"?I.dataKey(Ye.payload):null}if(re)if(B>=0){var ye,pe;if(I.dataKey&&!I.allowDuplicatedCategory){var G=typeof I.dataKey=="function"?ie:"payload.".concat(I.dataKey.toString());ye=W0(T,G,$),pe=F&&O&&W0(O,G,$)}else ye=T==null?void 0:T[B],pe=F&&O&&O[B];if(W||X){var Pe=j.props.activeIndex!==void 0?j.props.activeIndex:B;return[g.cloneElement(j,de(de(de({},_.props),ne),{},{activeIndex:Pe})),null,null]}if(!jt(ye))return[le].concat(Xf(S.renderActivePoints({item:_,activePoint:ye,basePoint:pe,childIndex:B,isRange:F})))}else{var J,oe=(J=S.getItemByXY(S.state.activeCoordinate))!==null&&J!==void 0?J:{graphicalItem:le},se=oe.graphicalItem,je=se.item,Ce=je===void 0?j:je,ut=se.childIndex,Ze=de(de(de({},_.props),ne),{},{activeIndex:ut});return[g.cloneElement(Ce,Ze),null,null]}return F?[le,null,null]:[le,null]}),ht(S,"renderCustomized",function(j,N,C){return g.cloneElement(j,de(de({key:"recharts-customized-".concat(C)},S.props),S.state))}),ht(S,"renderMap",{CartesianGrid:{handler:ib,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:ib},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:ib},YAxis:{handler:ib},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=v.id)!==null&&b!==void 0?b:km("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=iZ(S.triggeredAfterMouseMove,(w=v.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return ZGe(x,p),KGe(x,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,S=b.data,j=b.height,N=b.layout,C=ua(w,Dr);if(C){var _=C.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,P=hT(this.state,S,_,A),R=this.state.tooltipTicks[_].coordinate,I=(this.state.offset.top+j)/2,B=N==="horizontal",$=B?{x:R,y:I}:{y:R,x:I},q=this.state.formattedGraphicalItems.find(function(k){var T=k.item;return T.type.name==="Scatter"});q&&($=de(de({},$),q.props.points[_].tooltipPosition),P=q.props.points[_].tooltipPayload);var L={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:A,activePayload:P,activeCoordinate:$};this.setState(L),this.renderCursor(C),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,j;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(b){zk([ua(b.children,Dr)],[ua(this.props.children,Dr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=ua(this.props.children,Dr);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return l.indexOf(w)>=0?w:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),j=d3e(S),N={chartX:Math.round(b.pageX-j.left),chartY:Math.round(b.pageY-j.top)},C=S.width/w.offsetWidth||1,_=this.inRange(N.chartX,N.chartY,C);if(!_)return null;var A=this.state,P=A.xAxisMap,R=A.yAxisMap,I=this.getTooltipEventType();if(I!=="axis"&&P&&R){var B=Wl(P).scale,$=Wl(R).scale,q=B&&B.invert?B.invert(N.chartX):null,L=$&&$.invert?$.invert(N.chartY):null;return de(de({},N),{},{xValue:q,yValue:L})}var k=C6(this.state,this.props.data,this.props.layout,_);return k?de(de({},N),k):null}},{key:"inRange",value:function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,N=b/S,C=w/S;if(j==="horizontal"||j==="vertical"){var _=this.state.offset,A=N>=_.left&&N<=_.left+_.width&&C>=_.top&&C<=_.top+_.height;return A?{x:N,y:C}:null}var P=this.state,R=P.angleAxisMap,I=P.radiusAxisMap;if(R&&I){var B=Wl(R);return Q3({x:N,y:C},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),S=ua(b,Dr),j={};S&&w==="axis"&&(S.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var N=V0(this.props,this.handleOuterEvent);return de(de({},N),j)}},{key:"addListener",value:function(){P_.on(T_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){P_.removeListener(T_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,S){for(var j=this.state.formattedGraphicalItems,N=0,C=j.length;N<C;N++){var _=j[N];if(_.item===b||_.props.key===b.key||w===Yo(_.item.type)&&S===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,w=this.state.offset,S=w.left,j=w.top,N=w.height,C=w.width;return z.createElement("defs",null,z.createElement("clipPath",{id:b},z.createElement("rect",{x:S,y:j,height:N,width:C})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(w,S){var j=j6(S,2),N=j[0],C=j[1];return de(de({},w),{},ht({},N,C.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(w,S){var j=j6(S,2),N=j[0],C=j[1];return de(de({},w),{},ht({},N,C.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(b){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(b){var w=this.state,S=w.formattedGraphicalItems,j=w.activeItem;if(S&&S.length)for(var N=0,C=S.length;N<C;N++){var _=S[N],A=_.props,P=_.item,R=P.type.defaultProps!==void 0?de(de({},P.type.defaultProps),P.props):P.props,I=Yo(P.type);if(I==="Bar"){var B=(A.data||[]).find(function(k){return Lqe(b,k)});if(B)return{graphicalItem:_,payload:B}}else if(I==="RadialBar"){var $=(A.data||[]).find(function(k){return Q3(b,k)});if($)return{graphicalItem:_,payload:$}}else if(r1(_,j)||s1(_,j)||Cy(_,j)){var q=_We({graphicalItem:_,activeTooltipItem:j,itemData:R.data}),L=R.activeIndex===void 0?q:R.activeIndex;return{graphicalItem:de(de({},_),{},{childIndex:L}),payload:Cy(_,j)?R.data[q]:_.props.data[q]}}}return null}},{key:"render",value:function(){var b=this;if(!z$(this))return null;var w=this.props,S=w.children,j=w.className,N=w.width,C=w.height,_=w.style,A=w.compact,P=w.title,R=w.desc,I=N6(w,zGe),B=ot(I,!1);if(A)return z.createElement(a6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},z.createElement(qk,ag({},B,{width:N,height:C,title:P,desc:R}),this.renderClipPath(),q$(S,this.renderMap)));if(this.props.accessibilityLayer){var $,q;B.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,B.role=(q=this.props.role)!==null&&q!==void 0?q:"application",B.onKeyDown=function(k){b.accessibilityManager.keyboardEvent(k)},B.onFocus=function(){b.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return z.createElement(a6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},z.createElement("div",ag({className:Nt("recharts-wrapper",j),style:de({position:"relative",cursor:"default",width:N,height:C},_)},L,{ref:function(T){b.container=T}}),z.createElement(qk,ag({},B,{width:N,height:C,title:P,desc:R,style:sKe}),this.renderClipPath(),q$(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(g.Component);return ht(y,"displayName",n),ht(y,"defaultProps",de({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),ht(y,"getDerivedStateFromProps",function(p,x){var v=p.dataKey,b=p.data,w=p.children,S=p.width,j=p.height,N=p.layout,C=p.stackOffset,_=p.margin,A=x.dataStartIndex,P=x.dataEndIndex;if(x.updateId===void 0){var R=E6(p);return de(de(de({},R),{},{updateId:0},m(de(de({props:p},R),{},{updateId:0}),x)),{},{prevDataKey:v,prevData:b,prevWidth:S,prevHeight:j,prevLayout:N,prevStackOffset:C,prevMargin:_,prevChildren:w})}if(v!==x.prevDataKey||b!==x.prevData||S!==x.prevWidth||j!==x.prevHeight||N!==x.prevLayout||C!==x.prevStackOffset||!Uh(_,x.prevMargin)){var I=E6(p),B={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},$=de(de({},C6(x,b,N)),{},{updateId:x.updateId+1}),q=de(de(de({},I),B),$);return de(de(de({},q),m(de({props:p},q),x)),{},{prevDataKey:v,prevData:b,prevWidth:S,prevHeight:j,prevLayout:N,prevStackOffset:C,prevMargin:_,prevChildren:w})}
914if(!zk(w,x.prevChildren)){var L,k,T,F,O=ua(w,Bf),E=O&&(L=(k=O.props)===null||k===void 0?void 0:k.startIndex)!==null&&L!==void 0?L:A,D=O&&(T=(F=O.props)===null||F===void 0?void 0:F.endIndex)!==null&&T!==void 0?T:P,M=E!==A||D!==P,X=!jt(b),W=X&&!M?x.updateId:x.updateId+1;return de(de({updateId:W},m(de(de({props:p},x),{},{updateId:W,dataStartIndex:E,dataEndIndex:D}),x)),{},{prevChildren:w,dataStartIndex:E,dataEndIndex:D})}return null}),ht(y,"renderActiveDot",function(p,x,v){var b;return g.isValidElement(p)?b=g.cloneElement(p,x):xt(p)?b=p(x):b=z.createElement(Zj,x),z.createElement(rn,{className:"recharts-active-dot",key:v},b)}),function(x){return z.createElement(y,x)}},mKe=zR({chartName:"LineChart",GraphicalChild:Ox,axisComponents:[{axisType:"xAxis",AxisComp:vl},{axisType:"yAxis",AxisComp:bl}],formatAxisMap:QJ}),h1=zR({chartName:"BarChart",GraphicalChild:ko,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:vl},{axisType:"yAxis",AxisComp:bl}],formatAxisMap:QJ}),UR=zR({chartName:"PieChart",GraphicalChild:zi,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:n1},{axisType:"radiusAxis",AxisComp:e1}],formatAxisMap:oUe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const P6=["#ea552b","#3b82f6","#10b981","#f59e0b","#8b5cf6"],pKe=()=>{const{user:e}=Ie(),t=cs();g.useEffect(()=>{e||t("/auth")},[e,t]);const{data:n}=ct({queryKey:["reveal-history",e==null?void 0:e.id],queryFn:async()=>{if(!e)return[];const i=new Date;i.setDate(i.getDate()-30);const{data:o,error:l}=await K.from("contact_reveals").select("revealed_at").eq("user_id",e.id).gte("revealed_at",i.toISOString()).order("revealed_at",{ascending:!0});if(l)throw l;const c=o.reduce((u,d)=>{const h=kt(new Date(d.revealed_at),"yyyy-MM-dd");return u[h]=(u[h]||0)+1,u},{});return Object.entries(c).map(([u,d])=>({date:u,reveals:d}))},enabled:!!e}),{data:r}=ct({queryKey:["folder-stats",e==null?void 0:e.id],queryFn:async()=>{if(!e)return[];const{data:i,error:o}=await K.from("saved_contacts").select("folder_name").eq("user_id",e.id);if(o)throw o;const l=i.reduce((c,u)=>{const d=u.folder_name||"default";return c[d]=(c[d]||0)+1,c},{});return Object.entries(l).map(([c,u])=>({name:c,value:u}))},enabled:!!e}),{data:a}=ct({queryKey:["top-companies-contacts",e==null?void 0:e.id],queryFn:async()=>{if(!e)return[];const{data:i,error:o}=await K.from("saved_contacts").select("contact_company").eq("user_id",e.id).not("contact_company","is",null);if(o)throw o;const l=i.reduce((c,u)=>{const d=u.contact_company||"Unknown";return c[d]=(c[d]||0)+1,c},{});return Object.entries(l).map(([c,u])=>({company:c,count:u})).sort((c,u)=>u.count-c.count).slice(0,10)},enabled:!!e});return e?s.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[s.jsx(Ee,{}),s.jsx("main",{className:"flex-1 pt-24 pb-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[s.jsxs("div",{className:"mb-8 text-center",children:[s.jsx("h1",{className:"text-4xl font-bold mb-2",children:"Contact Analytics"}),s.jsx("p",{className:"text-muted-foreground text-lg",children:"Track your contact reveals, saved contacts, and outreach performance"})]}),s.jsx(WX,{userId:e.id}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[s.jsxs(Y,{className:"p-6",children:[s.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[s.jsx(zr,{className:"w-5 h-5 text-blue-600"}),"Email Reveals (Last 30 Days)"]}),s.jsx(Oc,{width:"100%",height:250,children:s.jsxs(h1,{data:n,children:[s.jsx(u1,{strokeDasharray:"3 3"}),s.jsx(vl,{dataKey:"date",fontSize:12}),s.jsx(bl,{}),s.jsx(Dr,{}),s.jsx(ko,{dataKey:"reveals",fill:"rgb(234,85,43)"})]})})]}),s.jsxs(Y,{className:"p-6",children:[s.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[s.jsx(tn,{className:"w-5 h-5 text-purple-600"}),"Contacts by Folder"]}),s.jsx(Oc,{width:"100%",height:250,children:s.jsxs(UR,{children:[s.jsx(zi,{data:r,cx:"50%",cy:"50%",labelLine:!1,label:i=>`${i.name} (${i.value})`,outerRadius:80,fill:"#8884d8",dataKey:"value",children:r==null?void 0:r.map((i,o)=>s.jsx(Om,{fill:P6[o%P6.length]},`cell-${o}`))}),s.jsx(Dr,{})]})})]})]}),s.jsxs(Y,{className:"p-6",children:[s.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[s.jsx(ze,{className:"w-5 h-5 text-green-600"}),"Top Companies by Saved Contacts"]}),s.jsxs("div",{className:"space-y-2",children:[a==null?void 0:a.map((i,o)=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted/50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"font-semibold text-muted-foreground",children:["#",o+1]}),s.jsx("span",{className:"font-medium",children:i.company})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(At,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"font-bold text-[rgb(234,85,43)]",children:i.count})]})]},o)),(!a||a.length===0)&&s.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No contact data available yet. Start saving contacts to see analytics."})]})]})]})}),s.jsx(wt,{})]}):null},gKe={"Marketing & Growth":["digital marketing","seo","content marketing","social media","brand strategy","growth marketing","demand generation","marketing automation","email marketing","influencer marketing","affiliate marketing","viral marketing","community growth","organic growth","brand awareness","content strategy"],"Sales & Revenue":["s
914ales enablement","outbound sales","account-based","crm","sales training","revenue operations","lead generation","sales strategy","sales development","account management","pipeline","prospecting","cold outreach","warm outreach","sales automation","revenue optimization"],"Product & Technology":["product development","ai integration","platform","ux/ui","software development","tech stack","api","cloud","ai","ml","devops","infrastructure","engineering","product management","technical architecture","integration","automation","scalability"],"Operations & Efficiency":["workflow automation","process optimization","supply chain","project management","operational excellence","efficiency","resource management","business operations","process improvement"],"Compliance & Legal":["compliance audit","gdpr","privacy","regulatory","legal","data protection","security compliance","risk management","policy","governance","audit","certification"],"HR & Talent":["recruiting","training","culture","onboarding","performance","talent acquisition","employee","workforce","retention","hr","people","team building","organizational development"],"Finance & Accounting":["financial planning","accounting","budgeting","forecasting","fundraising","financial operations","fp&a","financial analysis","cfo","investment","capital","financial strategy","funding"],"Customer Success & Support":["customer success","support","retention","customer onboarding","engagement","customer experience","customer service","help desk","ticketing","customer satisfaction","churn reduction","customer relationship"],"Analytics & Data":["analytics","data analysis","business intelligence","reporting","data science","metrics","kpi","dashboard","insights","data engineering","data visualization","predictive analytics"],"Creative & Design":["design","creative","branding","video","graphics","visual","illustration","photography","motion graphics","creative direction","art direction","multimedia"]},qR=e=>{const t=e.toLowerCase();for(const[n,r]of Object.entries(gKe))if(r.some(a=>t.includes(a)))return n;return t.includes("consult")||t.includes("advisor")||t.includes("strategy")||t.includes("planning")?"Operations & Efficiency":t.includes("design")||t.includes("creative")||t.includes("brand")?"Creative & Design":t.includes("develop")||t.includes("engineer")||t.includes("software")||t.includes("code")?"Product & Technology":t.includes("train")||t.includes("education")||t.includes("coaching")?"HR & Talent":t.includes("legal")||t.includes("contract")||t.includes("regulation")?"Compliance & Legal":t.includes("customer")||t.includes("client")||t.includes("support")||t.includes("service")?"Customer Success & Support":t.includes("sales")||t.includes("revenue")||t.includes("business development")?"Sales & Revenue":t.includes("data")||t.includes("analytics")||t.includes("insight")||t.includes("metric")?"Analytics & Data":t.includes("financ")||t.includes("account")||t.includes("budget")||t.includes("fund")?"Finance & Accounting":"Other Services"},yKe=(e,t)=>{if(t==="all")return e;const n=new Date;let r;switch(t){case"today":r=new Date(n.setHours(0,0,0,0));break;case"week":r=new Date(n.setDate(n.getDate()-7));break;case"month":r=new Date(n.setMonth(n.getMonth()-1));break;case"year":r=new Date(n.setFullYear(n.getFullYear()-1));break;default:return e}return e.filter(a=>new Date(a.created_at)>=r)},xKe=(e,t)=>{if(e.length===0)return{start:new Date,end:new Date};const n=new Date;let r;switch(t){case"today":r=new Date(n.setHours(0,0,0,0));break;case"week":r=new Date(n.setDate(n.getDate()-7));break;case"month":r=new Date(n.setMonth(n.getMonth()-1));break;case"year":r=new Date(n.setFullYear(n.getFullYear()-1));break;case"all":const a=e.map(i=>new Date(i.created_at)).filter(i=>!isNaN(i.getTime()));r=a.length>0?new Date(Math.min(...a.map(i=>i.getTime()))):new Date;break;default:r=new Date}return{start:r,end:new Date}},O_=e=>{const t=new Set;return e.forEach(n=>{if(n.potential_services){const r=typeof n.potential_services=="string"?n.potential_services:n.potentialServices||"";N2(r).forEach(i=>t.add(i.toLowerCase()))}}),t.size},T6={"Marketing & Growth":"hsl(25, 95%, 53%)","Sales & Revenue":"hsl(142, 71%, 45%)","Product & Technology":"hsl(221, 83%, 53%)","Operations & Efficiency":"hsl(262, 83%, 58%)","Compliance & Legal":"hsl(346, 77%, 50%)","HR & Talent":"hsl(47, 95%, 53%)","Finance & Accounting":"hsl(173, 58%, 39%)","Customer Success & Support":"hsl(197, 37%, 50%)","Analytics & Data":"hsl(43, 74%, 50%)","Creative & Design":"hsl(280, 65%, 60%)","Other Services":"hsl(215, 16%, 47%)"},vKe=()=>{var Zt,Yt,Nn,Z,V;const e=ml(),[t]=yd(),[n,r]=g.useState(t.get("service")||""),[a,i]=g.useState(""),[o,l]=g.useState([]),[c,u]=g.useState("all"),[d,h]=g.useState("all"),[f,m]=g.useState("all"),[y,p]=g.useState("all"),[x,v]=g.useState("newest"),[b,w]=g.useState(1),[S,j]=g.useState(!1),{user:N,subscribed:C}=Ie(),{toast:_}=Ve(),A=pr(),{showCaptcha:P,currentProblem:R,isLoading:I,initiateCaptcha:B,solveCaptcha:$,resetCaptcha:q}=Rt(),L=12,k=7,T=new Date(new Date().setHours(0,0,0,0)).toISOString(),F=new Date;F.setDate(1),F.setHours(0,0,0,0);const O=F.toISOString(),{data:E}=ct({queryKey:["total-services"],queryFn:async()=>{const{data:H,error:ae}=await K.from("company_overview").select("potential_services").not("potential_services","is",null);if(ae)throw ae;return O_(H||[])},refetchInterval:6e4,staleTime:0}),{data:D}=ct({queryKey:["monthly-services",O],queryFn:async()=>{const{data:H,error:ae}=await K.from("company_overview").select("potential_services").not("potential_services","is",null).gte("added_date",O.split("T")[0]);if(ae)throw ae;return O_(H||[])},refetchInterval:6e4,staleTime:0}),{data:M}=ct({queryKey:["daily-services",T],queryFn:async()=>{const{data:H,error:ae}=await K.from("company_overview").select("potential_services").not("potential_services","is",null).gte("added_date",T.split("T")[0]);if(ae)throw ae;return O_(H||[])},refetchInterval:6e4,staleTime:0}),{data:X,isLoading:W,isFetching:re}=ct({queryKey:["pitch-companies",{serviceSearch:n,searchTerm:a,selectedFilters:o,sortBy:x,scoreRange:c,dateRange:d,companySize:f,companyLocation:y,currentPage:b}],queryFn:async()=>(console.log("Fetching pitch companies for page:",b),await jX.fetchCompaniesByService({serviceSearch:n||void 0,search:a,industry:o.find(ae=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(ae)),fundingStage:o.find(ae=>["Series A","Series B","Seed","Pre-seed"].includes(ae)),scoreRange:c,dateRange:d,companySize:f,location:y,sortBy:x,page:b,pageSize:L})),staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),ne=async()=>{j(!0);
914try{await A.invalidateQueries({queryKey:["pitch-companies"]}),await A.invalidateQueries({queryKey:["total-services"]}),await A.invalidateQueries({queryKey:["monthly-services"]}),await A.invalidateQueries({queryKey:["daily-services"]}),_({title:"Refreshed Successfully",description:"Fetched the latest pitch opportunities."})}catch{_({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{j(!1)}},le=H=>{const ae=o.includes(H)?o.filter(be=>be!==H):[...o,H];l(ae),w(1)},ie=H=>{u(H),w(1)},ye=()=>{r(""),i(""),l([]),u("all"),h("all"),m("all"),p("all"),w(1)},pe=H=>{if(console.log("Page change requested:",H),!C&&H>k){_({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}B("pitch_page_change")?(console.log("Captcha needed, storing target page:",H),sessionStorage.setItem("targetPage",H.toString())):(console.log("No captcha needed, setting page to:",H),w(H))},G=()=>{const H=sessionStorage.getItem("targetPage");H&&(console.log("Captcha success, setting page to:",H),w(parseInt(H)),sessionStorage.removeItem("targetPage"),_({title:"Correct! 🎉",description:"Loading the requested page..."}))},Pe=()=>{sessionStorage.removeItem("targetPage"),_({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},J=kX("Service Pitch Opportunities",o,n||a),oe=PX("pitch opportunities",o,n||a,(Zt=X==null?void 0:X.pagination)==null?void 0:Zt.totalRecords),se=TX("pitch, service opportunities",o,["sales","prospecting","services",n||""]),je=OX(e.pathname),Ce=X!=null&&X.records?AX("Pitch Opportunities",X.records):null,ut=[{title:"Company Database",href:"/companies",description:"Browse our complete company intelligence database",icon:ze},{title:"Recently Funded",href:"/recently-funded",description:"Companies with fresh funding rounds",icon:tt},{title:"Pitch Analytics",href:"/pitch-analytics",description:"View analytics on service opportunities",icon:Tt},{title:"View All Pitches",href:"/pitch",description:"Search companies by service opportunities",icon:st}],Ze=[{name:"Service Pitch Search"}],Ye=[{title:"Total Pitches",value:(E||0).toLocaleString(),icon:tt,color:"text-blue-600"},{title:"Pitches Added This Month",value:(D||0).toLocaleString(),icon:ze,color:"text-green-600"},{title:"Pitches Added Today",value:(M||0).toLocaleString(),icon:st,color:"text-purple-600"}];return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx(ri,{title:J,description:oe,keywords:se,canonicalUrl:je,structuredData:Ce}),s.jsx(Ee,{}),s.jsx("div",{className:"pt-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-16",children:[s.jsx(NX,{items:Ze,className:"mb-6"}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Search Pitch Opportunities"}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Find companies needing specific services and pitch your solutions"}),s.jsxs("div",{className:"flex justify-center items-center gap-4 mb-8",children:[s.jsxs(U,{onClick:ne,disabled:S||W,variant:"outline",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${S?"animate-spin":""}`}),S?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:Ye.map((H,ae)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:ae*.1},className:"bg-white rounded-lg p-6 shadow-sm border border-gray-200",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:H.title}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:H.value})]}),s.jsx(H.icon,{className:`w-8 h-8 ${H.color}`})]})},ae))}),s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"relative max-w-2xl mx-auto mb-6",children:[s.jsx(st,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),s.jsx("input",{type:"text",placeholder:"Search by service name (e.g., SEO, Content Marketing, AI Integration)...",value:n,onChange:H=>{r(H.target.value),w(1)},className:"w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-transparent"})]}),s.jsx(zt,{searchTerm:a,onSearchChange:H=>{i(H),w(1)},sortBy:x,onSortChange:v,selectedFilters:o,onFilterToggle:le,scoreRange:c,onScoreRangeChange:ie,dateRange:d,onDateRangeChange:h,companySize:f,onCompanySizeChange:m,location:y,onLocationChange:p,onClearFilters:ye}),!W&&s.jsx("div",{className:"mt-4 text-gray-600 text-center",children:n?s.jsxs(s.Fragment,{children:["Found ",((Yt=X==null?void 0:X.pagination)==null?void 0:Yt.totalRecords)||0," companies needing ",s.jsx("span",{className:"font-semibold",children:n})]}):s.jsxs(s.Fragment,{children:["Found ",((Nn=X==null?void 0:X.pagination)==null?void 0:Nn.totalRecords)||0," companies with pitch opportunities"]})})]}),s.jsx("section",{className:"pb-16",children:W&&b===1?s.jsxs("div",{className:"flex justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600"}),s.jsx("span",{className:"ml-2 text-gray-600",children:"Loading companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(Z=X==null?void 0:X.records)==null?void 0:Z.map((H,ae)=>s.jsx(he.div,{initial:{opacity:0,y:20}
914,animate:{opacity:1,y:0},transition:{duration:.5,delay:ae*.1},children:s.jsx(Bt,{startup:H,index:ae})},`${H.id}-${b}-${ae}`))}),(X==null?void 0:X.pagination)&&s.jsx(Ut,{currentPage:X.pagination.currentPage,totalPages:C?X.pagination.totalPages:Math.min(k,X.pagination.totalPages),totalRecords:X.pagination.totalRecords,isSubscribed:C,isAuthenticated:!!N,onPageChange:pe,isLoading:re}),((V=X==null?void 0:X.records)==null?void 0:V.length)===0&&!W&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:n?s.jsxs(s.Fragment,{children:['No companies found needing "',n,'". Try a different service or adjust your filters.']}):s.jsx(s.Fragment,{children:"No companies found matching your criteria."})})})]})}),s.jsx(_X,{links:ut,title:"Explore More Opportunities"})]})}),P&&R&&s.jsx(Ot,{isOpen:P,question:R.question,isLoading:I,onSolve:H=>$(H,G,Pe),onClose:q}),s.jsx(wt,{})]})},bKe="https://wjqeqokemkpcmvuwwbqo.supabase.co/functions/v1/fetch-airtable-data";class wKe{async makeRequest(t,n={}){try{const{data:{session:r}}=await K.auth.getSession(),a={"Content-Type":"application/json"};r!=null&&r.access_token&&(a.Authorization=`Bearer ${r.access_token}`),localStorage.getItem("userEmail")&&(a["x-email-submitted"]="true");const o={filters:{search:n.search,industry:n.industry,fundingStage:n.fundingStage,signalType:n.signalType,scoreRange:n.scoreRange,dateRange:n.dateRange,companySize:n.companySize,location:n.location},page:n.page||1,pageSize:Math.min(n.pageSize||12,15),sortBy:n.sortBy||"newest",view:n.view,fetchAll:!1},l=await fetch(bKe,{method:"POST",headers:a,body:JSON.stringify(o)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const c=await l.json(),u=c.records||[],d=c.pagination||{currentPage:n.page||1,totalPages:1,totalRecords:u.length,hasMore:!1};return{records:u,pagination:{currentPage:d.currentPage,totalPages:d.totalPages,totalRecords:d.totalRecords,hasMore:d.hasMore||!1},hasMore:d.hasMore||!1}}catch(r){throw console.error("❌ Airtable request failed:",r),r}}async fetchStartups(t){return this.makeRequest("companies",{search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async getEnhancedStats(){return this.makeRequest("stats",{})}async fetchUXUIStartups(t){return this.makeRequest("companies",{view:"UX/UI",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchPaidAdsStartups(t){return this.makeRequest("companies",{view:"Paid Ads",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchOutboundSalesStartups(t){return this.makeRequest("companies",{view:"Outbound Sales",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchProductLaunchStartups(t){return this.makeRequest("companies",{view:"Product Launch",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchHiringSpikeStartups(t){return this.makeRequest("companies",{view:"Hiring Spike",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchGeographicExpansionStartups(t){return this.makeRequest("companies",{view:"Geographic Expansion",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}
914async fetchGTMPositioningStartups(t){return this.makeRequest("companies",{view:"GTM Positioning",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchAIIntegrationStartups(t){return this.makeRequest("companies",{view:"AI Integration",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchGrowthMarketingStartups(t){return this.makeRequest("companies",{view:"Growth Marketing",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchRevenueOperationsStartups(t){return this.makeRequest("companies",{view:"Revenue Operations",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchConversionRateOptimizationStartups(t){return this.makeRequest("companies",{view:"Conversion Rate Optimization",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchProductMarketingAnalyticsStartups(t){return this.makeRequest("companies",{view:"Product & Marketing Analytics",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchCustomerSuccessStartups(t){return this.makeRequest("companies",{view:"Customer Success",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchContentMarketingStartups(t){return this.makeRequest("companies",{view:"Content Marketing",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchDemandGenerationStartups(t){return this.makeRequest("companies",{view:"Demand Generation",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchSocialMediaCommunityGrowthStartups(t){return this.makeRequest("companies",{view:"Social Media & Community Growth",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchSecurityDataPrivacyStartups(t){return this.makeRequest("companies",{view:"Security & Data Privacy",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchDevOpsPlatformEnablementStartups(t){return this.makeRequest("companies",{view:"DevOps & Platform Enablement",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchRecentlyFundedStartups(t){return this.makeRequest("companies",{view:"Recently Funded",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}
914async fetchSEOOrganicStartups(t){return this.makeRequest("companies",{view:"SEO & Organic Growth",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchPitchStartups(t){return this.makeRequest("companies",{view:"Pitch/Funding",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchLeadershipChangeStartups(t){return this.makeRequest("companies",{view:"Leadership Change",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchTechStackChangeStartups(t){return this.makeRequest("companies",{view:"Tech Stack Change",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchPressCoverageStartups(t){return this.makeRequest("companies",{view:"Press Coverage",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchMAAcitivityStartups(t){return this.makeRequest("companies",{view:"M&A Activity",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchNewsletterSponsorStartups(t){return this.makeRequest("companies",{view:"Newsletter Sponsor",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchSocialBuzzStartups(t){return this.makeRequest("companies",{view:"Social Buzz",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchStrategicPartnershipStartups(t){return this.makeRequest("companies",{view:"Strategic Partnership",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchEventActivityStartups(t){return this.makeRequest("companies",{view:"Event Activity",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchCostCuttingStartups(t){return this.makeRequest("companies",{view:"Cost Cutting",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchLegalChallengeStartups(t){return this.makeRequest("companies",{view:"Legal Challenge",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchMajorCustomerAnnouncementsStartups(t){return this.makeRequest("companies",{view:"Major Customer Announcements",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}
914async fetchBudgetIncreaseStartups(t){return this.makeRequest("companies",{view:"Budget Increase",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchIncreasedAdSpendStartups(t){return this.makeRequest("companies",{view:"Increased Ad Spend",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchAwardsRecognitionStartups(t){return this.makeRequest("companies",{view:"Awards & Recognition",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}async fetchIPOFilingStartups(t){return this.makeRequest("companies",{view:"IPO Filing",search:t.search,industry:t.industry,fundingStage:t.fundingStage,scoreRange:t.scoreRange,dateRange:t.dateRange,companySize:t.companySize,location:t.location,sortBy:t.sortBy,page:t.page||1,pageSize:t.pageSize||15})}}
914const Kt=new wKe,SKe=()=>{var Pe;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState("all"),[d,h]=g.useState("all"),[f,m]=g.useState("all"),[y,p]=g.useState(1),[x,v]=g.useState(!1),{toast:b}=Ve(),w=pr(),{user:S,subscribed:j}=Ie(),{incrementRequestCount:N,showEmailSignup:C,resetRequestCount:_}=us(),{showCaptcha:A,currentProblem:P,isLoading:R,initiateCaptcha:I,solveCaptcha:B,resetCaptcha:$}=Rt(),q=12,L=8,{data:k,isLoading:T,error:F,isFetching:O}=ct({queryKey:["recently-funded",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,dateRange:c,companySize:d,companyLocation:f,currentPage:y}],queryFn:async()=>{var oe,se;console.log("🔍 Fetching recently funded for page:",y);const J=await Kt.fetchRecentlyFundedStartups({search:e,industry:n.find(je=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(je)),fundingStage:n.find(je=>["Series A","Series B","Seed","Pre-seed"].includes(je)),scoreRange:o,dateRange:c,companySize:d,location:f,sortBy:a,page:y,pageSize:q});return console.log("✅ Recently funded fetched:",{recordCount:((oe=J.records)==null?void 0:oe.length)||0,hasMore:J.hasMore}),!S&&((se=J.records)==null?void 0:se.length)>0&&N(),J},staleTime:15*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1}),E=J=>{r(oe=>oe.includes(J)?oe.filter(se=>se!==J):[...oe,J]),p(1)},D=async()=>{v(!0);try{await w.invalidateQueries({queryKey:["recently-funded"]}),p(1),await w.refetchQueries({queryKey:["recently-funded"]}),b({title:"Refreshed Successfully",description:"Fetched the latest recently funded company data."})}catch{b({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{v(!1)}},M=J=>{if(console.log("Page change requested:",J),!j&&J>L){b({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}I("recently_funded_page_change")?(console.log("Captcha needed, storing target page:",J),sessionStorage.setItem("targetPage",J.toString())):(console.log("No captcha needed, setting page to:",J),p(J))},X=()=>{const J=sessionStorage.getItem("targetPage");J&&(console.log("Captcha success, setting page to:",J),p(parseInt(J)),sessionStorage.removeItem("targetPage"),b({title:"Correct! 🎉",description:"Loading the requested page..."}))},W=()=>{sessionStorage.removeItem("targetPage"),b({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},re=()=>{r([]),l("all"),u("all"),h("all"),m("all"),t(""),p(1)},ne=J=>{i(J),p(1)},le=J=>{l(J),p(1)},ie=J=>{u(J),p(1)},ye=J=>{h(J),p(1)},pe=J=>{m(J),p(1)};if(F)return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Recently Funded Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]});const G=()=>{_()};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(ze,{className:"w-10 h-10 text-green-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Recently Funded Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies that have recently secured funding"}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsxs(U,{onClick:D,disabled:x||T,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${x?"animate-spin":""}`}),x?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:ne,selectedFilters:n,onFilterToggle:E,scoreRange:o,onScoreRangeChange:le,dateRange:c,onDateRangeChange:ie,companySize:d,onCompanySizeChange:ye,location:f,onLocationChange:pe,onClearFilters:re})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((Pe=k==null?void 0:k.pagination)==null?void 0:Pe.totalRecords)||0," recently funded companies"]})}),T?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading recently funded companies..."})]}):k!=null&&k.records&&k.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:k.records.map((J,oe)=>s.jsx(Bt,{startup:J,index:oe},`${J.id}-${y}-${oe}`))}),(k==null?void 0:k.pagination)&&s.jsx(Ut,{currentPage:k.pagination.currentPage,totalPages:j?k.pagination.totalPages:Math.min(L,k.pagination.totalPages),totalRecords:k.pagination.totalRecords,isSubscribed:j,isAuthenticated:!!S,onPageChange:M,isLoading:O})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Recently Funded Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:re,children:"Clear All Filters"})]})]})}),A&&P&&s.jsx(Ot,{isOpen:A,question:P.question,isLoading:R,onSolve:J=>B(J,X,W),onClose:$}),s.jsx(Sd,{isOpen:C&&!S,onAuthSuccess:G})]})})},jKe=()=>{var X,W,re;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("all"),[c,u]=g.useState("all"),[d,h]=g.useState("all"),[f,m]=g.useState("newest"),[y,p]=g.useState(1),{user:x,subscribed:v}=Ie(),{toast:b}=Ve(),{incrementRequestCount:w,showEmailSignup:S,resetRequestCount:j}=us(),{showCaptcha:N,currentProblem:C,isLoading:_,initiateCaptcha:A,solveCaptcha:P,resetCaptcha:R}=Rt(),I=12,B=7,{data:$,isLoading:q,isFetching:L}=ct({queryKey:["hiring-spike",{searchTerm:e,selectedFilters:n,sortBy:f,scoreRange:a,dateRange:o,companySize:c,companyLocation:d,currentPage:y}],queryFn:async()=>{var le,ie;console.log("🔍 Fetching hiring spike for page:",y);const ne=await Kt.fetchHiringSpikeStartups({search:e,industry:n.find(ye=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(ye)),fundingStage:n.find(ye=>["Series A","Series B","Seed","Pre-seed"].includes(ye)),scoreRange:a,dateRange:o,companySize:c,location:d,sortBy:f,page:y,pageSize:I});return console.log("✅ Hiring spike fetched:",{recordCount:((le=ne.records)==null?void 0:le.length)||0,hasMore:ne.hasMore}),!x&&((ie=ne.records)==null?void 0:ie.length)>0&&w(),ne},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),k=ne=>{const le=n.includes(ne)?n.filter(ie=>ie!==ne):[...n,ne];r(le),p(1)},T=ne=>{i(ne),p(1)},F=()=>{r([]),i("all"),t(""),p(1)},O=ne=>{if(console.log("Page change requested:",ne),!v&&ne>B){b({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}A("hiring_spike_page_change")?(console.log("Captcha needed, storing target page:",ne),sessionStorage.setItem("targetPage",ne.toString())):(console.log("No captcha needed, setting page to:",ne),p(ne))},E=()=>{const ne=sessionStorage.getItem("targetPage");ne&&(console.log("Captcha success, setting page to:",ne),p(parseInt(ne)),sessionStorage.removeItem("targetPage"),b({title:"Correct! 🎉",description:"Loading the requested page..."}))},D=()=>{sessionStorage.removeItem("targetPage"),b({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},M=()=>{j()};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
914,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Hiring Spike",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Discover companies experiencing rapid growth and actively hiring, offering opportunities for recruitment services and talent acquisition."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:f,onSortChange:m,selectedFilters:n,onFilterToggle:k,scoreRange:a,onScoreRangeChange:T,dateRange:o,onDateRangeChange:l,companySize:c,onCompanySizeChange:u,location:d,onLocationChange:h,onClearFilters:F}),!q&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((X=$==null?void 0:$.pagination)==null?void 0:X.totalRecords)||0," hiring spike companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:q?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading hiring spike companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(W=$==null?void 0:$.records)==null?void 0:W.map((ne,le)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:le*.1},children:s.jsx(Bt,{startup:ne,index:le})},`${ne.id}-${y}-${le}`))}),($==null?void 0:$.pagination)&&s.jsx(Ut,{currentPage:$.pagination.currentPage,totalPages:v?$.pagination.totalPages:Math.min(B,$.pagination.totalPages),totalRecords:$.pagination.totalRecords,isSubscribed:v,isAuthenticated:!!x,onPageChange:O,isLoading:L}),((re=$==null?void 0:$.records)==null?void 0:re.length)===0&&!q&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),N&&C&&s.jsx(Ot,{isOpen:N,question:C.question,isLoading:_,onSolve:ne=>P(ne,E,D),onClose:R}),s.jsx(Sd,{isOpen:S&&!x,onAuthSuccess:M}),s.jsx(wt,{})]})})},NKe=()=>{var X;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{incrementRequestCount:x,showEmailSignup:v,resetRequestCount:b}=us(),{showCaptcha:w,currentProblem:S,isLoading:j,initiateCaptcha:N,solveCaptcha:C,resetCaptcha:_}=Rt(),A=12,P=7,{data:R,isLoading:I,error:B,isFetching:$}=ct({queryKey:["product-launch",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var re,ne;console.log("🔍 Fetching product launch for page:",c);const W=await Kt.fetchProductLaunchStartups({search:e,industry:n.find(le=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(le)),fundingStage:n.find(le=>["Series A","Series B","Seed","Pre-seed"].includes(le)),scoreRange:o,sortBy:a,page:c,pageSize:A});return console.log("✅ Product launch fetched:",{recordCount:((re=W.records)==null?void 0:re.length)||0,hasMore:W.hasMore}),!y&&((ne=W.records)==null?void 0:ne.length)>0&&x(),W},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),q=W=>{r(re=>re.includes(W)?re.filter(ne=>ne!==W):[...re,W]),u(1)},L=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["product-launch"]}),u(1),await m.refetchQueries({queryKey:["product-launch"]}),f({title:"Refreshed Successfully",description:"Fetched the latest product launch company data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},k=W=>{if(console.log("Page change requested:",W),!p&&W>P){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}N("product_launch_page_change")?(console.log("Captcha needed, storing target page:",W),sessionStorage.setItem("targetPage",W.toString())):(console.log("No captcha needed, setting page to:",W),u(W))},T=()=>{const W=sessionStorage.getItem("targetPage");W&&(console.log("Captcha success, setting page to:",W),u(parseInt(W)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},F=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},O=()=>{r([]),l("all"),t(""),u(1)},E=W=>{i(W),u(1)},D=W=>{l(W),u(1)},M=()=>{b()};return B?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Product Launch Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(ble,{className:"w-10 h-10 text-purple-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Product Launch Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies that have recently launched new products"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:L,disabled:d||I,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:E,selectedFilters:n,onFilterToggle:q,scoreRange:o,onScoreRangeChange:D,onClearFilters:O})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((X=R==null?void 0:R.pagination)==null?void 0:X.totalRecords)||0," product launch companies"]})}),I?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading product launch companies..."})]}):R!=null&&R.records&&R.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:R.records.map((W,re)=>s.jsx(Bt,{startup:W,index:re},`${W.id}-${c}-${re}`))}),(R==null?void 0:R.pagination)&&s.jsx(Ut,{currentPage:R.pagination.currentPage,totalPages:p?R.pagination.totalPages:Math.min(P,R.pagination.totalPages),totalRecords:R.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:k,isLoading:$})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Product Launch Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:O,children:"Clear All Filters"})]})]})}),w&&S&&s.jsx(Ot,{isOpen:w,question:S.question,isLoading:j,onSolve:W=>C(W,T,F),onClose:_}),s.jsx(Sd,{isOpen:v&&!y,onAuthSuccess:M})]})})},Ui=({isOpen:e,onEmailSubmit:t,onClose:n})=>{const r=()=>{t("[email protected]")};return s.jsx(Sd,{isOpen:e,onClose:n,onAuthSuccess:r})},A6=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=8,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["geographic-expansion",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D,M;console.log("🔍 Fetching geographic expansion for page:",c);const E=await Kt.fetchGeographicExpansionStartups({search:e,industry:n.find(X=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(X)),fundingStage:n.find(X=>["Series A","Series B","Seed","Pre-seed"].includes(X)),scoreRange:a,sortBy:o,page:c,pageSize:N});return console.log("✅ Geographic expansion fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),!d&&((M=E.records)==null?void 0:M.length)>0&&m(),E},staleTime:15*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];
914r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{p()},q=E=>{if(console.log("Page change requested:",E),!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("geographic_expansion_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},L=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},k=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Geographic Expansion",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Connect with companies expanding into new markets and regions, seeking local expertise and market entry strategies."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," geographic expansion companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading geographic expansion companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:q,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,L,k),onClose:j}),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:$}),s.jsx(wt,{})]})})},_Ke=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=12,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["seo-organic",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching SEO organic for page:",c);const k=await Kt.fetchSEOOrganicStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ SEO organic fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("seo_organic_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
914,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["SEO & Organic Growth",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Discover companies actively seeking SEO optimization and organic growth strategies to enhance their digital presence and search visibility."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," SEO & organic growth companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading SEO & organic growth companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},CKe=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["paid-ads",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D,M;console.log("🔍 Fetching paid ads for page:",c);const E=await Kt.fetchPaidAdsStartups({search:e,industry:n.find(X=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(X)),fundingStage:n.find(X=>["Series A","Series B","Seed","Pre-seed"].includes(X)),scoreRange:a,sortBy:o,page:c,pageSize:N});return console.log("✅ Paid ads fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),!d&&((M=E.records)==null?void 0:M.length)>0&&m(),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{p()},q=E=>{if(console.log("Page change requested:",E),!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("paid_ads_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},L=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},k=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
914,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Paid Advertising",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Connect with companies looking to scale their paid advertising campaigns across Google Ads, Facebook, LinkedIn, and other platforms."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," paid advertising companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading paid advertising companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:q,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,L,k),onClose:j}),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:$}),s.jsx(wt,{})]})})},EKe=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["outbound-sales",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D,M;console.log("🔍 Fetching outbound sales for page:",c);const E=await Kt.fetchOutboundSalesStartups({search:e,industry:n.find(X=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(X)),fundingStage:n.find(X=>["Series A","Series B","Seed","Pre-seed"].includes(X)),scoreRange:a,sortBy:o,page:c,pageSize:N});return console.log("✅ Outbound sales fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),!d&&((M=E.records)==null?void 0:M.length)>0&&m(),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{p()},q=E=>{if(console.log("Page change requested:",E),!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("outbound_sales_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},L=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},k=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
914,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Outbound Sales",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to build or optimize their outbound sales processes, lead generation, and sales development strategies."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," outbound sales companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading outbound sales companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:q,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,L,k),onClose:j}),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:$}),s.jsx(wt,{})]})})},kKe=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=8,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["gtm-positioning",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D,M;console.log("🔍 Fetching GTM positioning for page:",c);const E=await Kt.fetchGTMPositioningStartups({search:e,industry:n.find(X=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(X)),fundingStage:n.find(X=>["Series A","Series B","Seed","Pre-seed"].includes(X)),scoreRange:a,sortBy:o,page:c,pageSize:N});return console.log("✅ GTM positioning fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),!d&&((M=E.records)==null?void 0:M.length)>0&&m(),E},staleTime:15*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{p()},q=E=>{if(console.log("Page change requested:",E),!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("gtm_positioning_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},L=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},k=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
914,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["GTM Positioning",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Discover companies seeking go-to-market strategy and positioning expertise to effectively launch and scale their products."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," GTM positioning companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading GTM positioning companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:q,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,L,k),onClose:j}),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:$}),s.jsx(wt,{})]})})},PKe=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}
914=Rt(),N=15,C=7,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["ai-integration",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D;const E=await Kt.fetchAIIntegrationStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:a,sortBy:o,page:c,pageSize:N});return!d&&((D=E.records)==null?void 0:D.length)>0&&m(),E},staleTime:10*60*1e3}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{p()},q=E=>{if(!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 100.",variant:"destructive"});return}w("ai_integration_page_change")?sessionStorage.setItem("targetPage",E.toString()):u(E)},L=()=>{const E=sessionStorage.getItem("targetPage");E&&(u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},k=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["AI Integration",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Connect with companies looking to integrate AI and machine learning solutions into their products and operations."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," AI integration companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading AI integration companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},E.id))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:q,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,L,k),onClose:j}
914),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:$}),s.jsx(wt,{})]})})},TKe=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=15,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["uxui",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>await Kt.fetchUXUIStartups({search:e,industry:n.find(T=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(T)),fundingStage:n.find(T=>["Series A","Series B","Seed","Pre-seed"].includes(T)),scoreRange:a,sortBy:o,page:c,pageSize:w}),staleTime:10*60*1e3}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 100.",variant:"destructive"});return}x("uxui_page_change")?sessionStorage.setItem("targetPage",k.toString()):u(k)},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["UX/UI Design",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking user experience design, interface improvements, and product design services to enhance their digital products."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," UX/UI design companies",!h&&` (showing first ${S*w} as free user)`]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading UX/UI design companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},k.id))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},AKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["leadership-change",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching leadership change for page:",c);const E=await Kt.fetchLeadershipChangeStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Leadership change fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["leadership-change"]}),u(1),await m.refetchQueries({queryKey:["leadership-change"]}),f({title:"Refreshed Successfully",description:"Fetched the latest leadership change data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("leadership_change_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Leadership Change Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(At,{className:"w-10 h-10 text-blue-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Leadership Change Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies experiencing leadership changes"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with leadership changes"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading leadership change companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Leadership Change Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},OKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["tech-stack-change",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching tech stack change for page:",c);const E=await Kt.fetchTechStackChangeStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Tech stack change fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["tech-stack-change"]}),u(1),await m.refetchQueries({queryKey:["tech-stack-change"]}),f({title:"Refreshed Successfully",description:"Fetched the latest tech stack change data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("tech_stack_change_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Tech Stack Change Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(Tn,{className:"w-10 h-10 text-purple-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Tech Stack Change Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies evolving their technology stack"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with tech stack changes"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading tech stack change companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Tech Stack Change Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},RKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["press-coverage",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching press coverage for page:",c);const E=await Kt.fetchPressCoverageStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Press coverage fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["press-coverage"]}),u(1),await m.refetchQueries({queryKey:["press-coverage"]}),f({title:"Refreshed Successfully",description:"Fetched the latest press coverage data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("press_coverage_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Press Coverage Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(va,{className:"w-10 h-10 text-green-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Press Coverage Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies gaining media attention"}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with recent press coverage"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading press coverage companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Press Coverage Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},IKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["ma-activity",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching M&A activity for page:",c);const E=await Kt.fetchMAAcitivityStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ M&A activity fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["ma-activity"]}),u(1),await m.refetchQueries({queryKey:["ma-activity"]}),f({title:"Refreshed Successfully",description:"Fetched the latest M&A activity data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("ma_activity_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading M&A Activity Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(ze,{className:"w-10 h-10 text-orange-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"M&A Activity Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies involved in mergers and acquisitions"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with M&A activity"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading M&A activity companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No M&A Activity Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},MKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["newsletter-sponsor",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching newsletter sponsor for page:",c);const E=await Kt.fetchNewsletterSponsorStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Newsletter sponsor fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["newsletter-sponsor"]}),u(1),await m.refetchQueries({queryKey:["newsletter-sponsor"]}),f({title:"Refreshed Successfully",description:"Fetched the latest newsletter sponsor data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("newsletter_sponsor_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Newsletter Sponsor Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(_a,{className:"w-10 h-10 text-indigo-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Newsletter Sponsor Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies sponsoring newsletters"}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," newsletter sponsor companies"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading newsletter sponsor companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Newsletter Sponsor Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},DKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["social-buzz",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching social buzz for page:",c);const E=await Kt.fetchSocialBuzzStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Social buzz fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["social-buzz"]}),u(1),await m.refetchQueries({queryKey:["social-buzz"]}),f({title:"Refreshed Successfully",description:"Fetched the latest social buzz data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("social_buzz_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Social Buzz Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(ti,{className:"w-10 h-10 text-pink-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Social Buzz Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies creating social media buzz"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with social buzz"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading social buzz companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Social Buzz Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},LKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["strategic-partnership",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching strategic partnership for page:",c);const E=await Kt.fetchStrategicPartnershipStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Strategic partnership fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);
914try{await m.invalidateQueries({queryKey:["strategic-partnership"]}),u(1),await m.refetchQueries({queryKey:["strategic-partnership"]}),f({title:"Refreshed Successfully",description:"Fetched the latest strategic partnership data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("strategic_partnership_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Strategic Partnership Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(mE,{className:"w-10 h-10 text-teal-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Strategic Partnership Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies forming strategic partnerships"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with strategic partnerships"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading strategic partnership companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Strategic Partnership Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},$Ke=()=>{var X;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{incrementRequestCount:x,showEmailSignup:v,resetRequestCount:b}=us(),{showCaptcha:w,currentProblem:S,isLoading:j,initiateCaptcha:N,solveCaptcha:C,resetCaptcha:_}=Rt(),A=12,P=7,{data:R,isLoading:I,error:B,isFetching:$}=ct({queryKey:["event-activity",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var re,ne;console.log("🔍 Fetching event activity for page:",c);const W=await Kt.fetchEventActivityStartups({search:e,industry:n.find(le=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(le)),fundingStage:n.find(le=>["Series A","Series B","Seed","Pre-seed"].includes(le)),scoreRange:o,sortBy:a,page:c,pageSize:A});return console.log("✅ Event activity fetched:",{recordCount:((re=W.records)==null?void 0:re.length)||0,hasMore:W.hasMore}
914),!y&&((ne=W.records)==null?void 0:ne.length)>0&&x(),W},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),q=W=>{r(re=>re.includes(W)?re.filter(ne=>ne!==W):[...re,W]),u(1)},L=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["event-activity"]}),u(1),await m.refetchQueries({queryKey:["event-activity"]}),f({title:"Refreshed Successfully",description:"Fetched the latest event activity data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},k=W=>{if(console.log("Page change requested:",W),!p&&W>P){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}N("event_activity_page_change")?(console.log("Captcha needed, storing target page:",W),sessionStorage.setItem("targetPage",W.toString())):(console.log("No captcha needed, setting page to:",W),u(W))},T=()=>{const W=sessionStorage.getItem("targetPage");W&&(console.log("Captcha success, setting page to:",W),u(parseInt(W)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},F=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},O=()=>{r([]),l("all"),t(""),u(1)},E=W=>{b()},D=W=>{i(W),u(1)},M=W=>{l(W),u(1)};return B?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Event Activity Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(sn,{className:"w-10 h-10 text-violet-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Event Activity Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies with notable event activity"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:L,disabled:d||I,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:D,selectedFilters:n,onFilterToggle:q,scoreRange:o,onScoreRangeChange:M,onClearFilters:O})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((X=R==null?void 0:R.pagination)==null?void 0:X.totalRecords)||0," companies with event activity"]})}),I?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading event activity companies..."})]}):R!=null&&R.records&&R.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:R.records.map((W,re)=>s.jsx(Bt,{startup:W,index:re},`${W.id}-${c}-${re}`))}),(R==null?void 0:R.pagination)&&s.jsx(Ut,{currentPage:R.pagination.currentPage,totalPages:p?R.pagination.totalPages:Math.min(P,R.pagination.totalPages),totalRecords:R.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:k,isLoading:$})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Event Activity Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:O,children:"Clear All Filters"})]})]})}),w&&S&&s.jsx(Ot,{isOpen:w,question:S.question,isLoading:j,onSolve:W=>C(W,T,F),onClose:_}),s.jsx(Ui,{isOpen:v&&!y,onEmailSubmit:E})]})})},FKe=()=>{var X;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{incrementRequestCount:x,showEmailSignup:v,resetRequestCount:b}=us(),{showCaptcha:w,currentProblem:S,isLoading:j,initiateCaptcha:N,solveCaptcha:C,resetCaptcha:_}=Rt(),A=12,P=7,{data:R,isLoading:I,error:B,isFetching:$}=ct({queryKey:["cost-cutting",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var re,ne;console.log("🔍 Fetching cost cutting for page:",c);const W=await Kt.fetchCostCuttingStartups({search:e,industry:n.find(le=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(le)),fundingStage:n.find(le=>["Series A","Series B","Seed","Pre-seed"].includes(le)),scoreRange:o,sortBy:a,page:c,pageSize:A});return console.log("✅ Cost cutting fetched:",{recordCount:((re=W.records)==null?void 0:re.length)||0,hasMore:W.hasMore}
914),!y&&((ne=W.records)==null?void 0:ne.length)>0&&x(),W},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),q=W=>{r(re=>re.includes(W)?re.filter(ne=>ne!==W):[...re,W]),u(1)},L=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["cost-cutting"]}),u(1),await m.refetchQueries({queryKey:["cost-cutting"]}),f({title:"Refreshed Successfully",description:"Fetched the latest cost cutting data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},k=W=>{if(console.log("Page change requested:",W),!p&&W>P){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}N("cost_cutting_page_change")?(console.log("Captcha needed, storing target page:",W),sessionStorage.setItem("targetPage",W.toString())):(console.log("No captcha needed, setting page to:",W),u(W))},T=()=>{const W=sessionStorage.getItem("targetPage");W&&(console.log("Captcha success, setting page to:",W),u(parseInt(W)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},F=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},O=()=>{r([]),l("all"),t(""),u(1)},E=W=>{i(W),u(1)},D=W=>{l(W),u(1)},M=W=>{b()};return B?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Cost Cutting Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(Xq,{className:"w-10 h-10 text-red-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Cost Cutting Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies implementing cost-cutting measures"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:L,disabled:d||I,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:E,selectedFilters:n,onFilterToggle:q,scoreRange:o,onScoreRangeChange:D,onClearFilters:O})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((X=R==null?void 0:R.pagination)==null?void 0:X.totalRecords)||0," companies with cost cutting initiatives"]})}),I?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading cost cutting companies..."})]}):R!=null&&R.records&&R.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:R.records.map((W,re)=>s.jsx(Bt,{startup:W,index:re},`${W.id}-${c}-${re}`))}),(R==null?void 0:R.pagination)&&s.jsx(Ut,{currentPage:R.pagination.currentPage,totalPages:p?R.pagination.totalPages:Math.min(P,R.pagination.totalPages),totalRecords:R.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:k,isLoading:$})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Cost Cutting Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:O,children:"Clear All Filters"})]})]})}),w&&S&&s.jsx(Ot,{isOpen:w,question:S.question,isLoading:j,onSolve:W=>C(W,T,F),onClose:_}),s.jsx(Ui,{isOpen:v&&!y,onEmailSubmit:M})]})})},BKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}
914=Rt(),N=15,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["legal-challenge",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching legal challenge for page:",c);const E=await Kt.fetchLegalChallengeStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Legal challenge fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:10*60*1e3}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["legal-challenge"]}),u(1),await m.refetchQueries({queryKey:["legal-challenge"]}),f({title:"Refreshed Successfully",description:"Fetched the latest legal challenge data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("legal_challenge_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Legal Challenge Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(MA,{className:"w-10 h-10 text-amber-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Legal Challenge Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies facing legal challenges"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with legal challenges"]})}),A?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((E,D)=>s.jsx("div",{className:"animate-pulse",children:s.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded mb-4"}),s.jsx("div",{className:"h-3 bg-gray-200 rounded mb-2"}),s.jsx("div",{className:"h-3 bg-gray-200 rounded mb-4"}),s.jsx("div",{className:"h-8 bg-gray-200 rounded"})]})},D))}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Legal Challenge Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},zKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}
914=Rt(),N=15,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["major-customer-announcements",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching major customer announcements for page:",c);const E=await Kt.fetchMajorCustomerAnnouncementsStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Major customer announcements fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:10*60*1e3}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["major-customer-announcements"]}),u(1),await m.refetchQueries({queryKey:["major-customer-announcements"]}),f({title:"Refreshed Successfully",description:"Fetched the latest major customer announcements data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("major_customer_announcements_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Major Customer Announcements Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(At,{className:"w-10 h-10 text-emerald-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Major Customer Announcements"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies announcing major customer wins"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with major customer announcements"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading major customer announcement companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Major Customer Announcements Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},UKe=()=>{var X;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{incrementRequestCount:x,showEmailSignup:v,resetRequestCount:b}=us(),{showCaptcha:w,currentProblem:S,isLoading:j,initiateCaptcha:N,solveCaptcha:C,resetCaptcha:_}=Rt(),A=15,P=7,{data:R,isLoading:I,error:B,isFetching:$}=ct({queryKey:["budget-increase",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var re,ne;const W=await Kt.fetchBudgetIncreaseStartups({search:e,industry:n.find(le=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(le)),fundingStage:n.find(le=>["Series A","Series B","Seed","Pre-seed"].includes(le)),scoreRange:o,sortBy:a,page:c,pageSize:A});return console.log("✅ Budget increase fetched:",{recordCount:((re=W.records)==null?void 0:re.length)||0,hasMore:W.hasMore}
914),!y&&((ne=W.records)==null?void 0:ne.length)>0&&x(),W},staleTime:10*60*1e3}),q=W=>{r(re=>re.includes(W)?re.filter(ne=>ne!==W):[...re,W]),u(1)},L=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["budget-increase"]}),u(1),await m.refetchQueries({queryKey:["budget-increase"]}),f({title:"Refreshed Successfully",description:"Fetched the latest budget increase data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},k=W=>{if(console.log("Page change requested:",W),!p&&W>P){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}N("budget_increase_page_change")?(console.log("Captcha needed, storing target page:",W),sessionStorage.setItem("targetPage",W.toString())):(console.log("No captcha needed, setting page to:",W),u(W))},T=()=>{const W=sessionStorage.getItem("targetPage");W&&(console.log("Captcha success, setting page to:",W),u(parseInt(W)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},F=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},O=()=>{r([]),l("all"),t(""),u(1)},E=W=>{i(W),u(1)},D=W=>{l(W),u(1)},M=W=>{b()};return B?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Budget Increase Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(ze,{className:"w-10 h-10 text-blue-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Budget Increase Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies increasing their budget allocation"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:L,disabled:d||I,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:E,selectedFilters:n,onFilterToggle:q,scoreRange:o,onScoreRangeChange:D,onClearFilters:O})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((X=R==null?void 0:R.pagination)==null?void 0:X.totalRecords)||0," companies with budget increases"]})}),I?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading budget increase companies..."})]}):R!=null&&R.records&&R.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:R.records.map((W,re)=>s.jsx(Bt,{startup:W,index:re},`${W.id}-${c}-${re}`))}),(R==null?void 0:R.pagination)&&s.jsx(Ut,{currentPage:R.pagination.currentPage,totalPages:p?R.pagination.totalPages:Math.min(P,R.pagination.totalPages),totalRecords:R.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:k,isLoading:$})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Budget Increase Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:O,children:"Clear All Filters"})]})]})}),w&&S&&s.jsx(Ot,{isOpen:w,question:S.question,isLoading:j,onSolve:W=>C(W,T,F),onClose:_}),s.jsx(Ui,{isOpen:v&&!y,onEmailSubmit:M})]})})},qKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}
914=Rt(),N=15,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["increased-ad-spend",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching increased ad spend for page:",c);const E=await Kt.fetchIncreasedAdSpendStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ Increased ad spend fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:10*60*1e3}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["increased-ad-spend"]}),u(1),await m.refetchQueries({queryKey:["increased-ad-spend"]}),f({title:"Refreshed Successfully",description:"Fetched the latest increased ad spend data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("increased_ad_spend_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Increased Ad Spend Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(Fn,{className:"w-10 h-10 text-green-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Increased Ad Spend"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies increasing their advertising spend"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with increased ad spend"]})}),A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading increased ad spend companies..."})]}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Increased Ad Spend Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})},WKe=()=>{var X;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{incrementRequestCount:x,showEmailSignup:v,resetRequestCount:b}=us(),{showCaptcha:w,currentProblem:S,isLoading:j,initiateCaptcha:N,solveCaptcha:C,resetCaptcha:_}=Rt(),A=15,P=7,{data:R,isLoading:I,error:B,isFetching:$}=ct({queryKey:["awards-recognition",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var re,ne;const W=await Kt.fetchAwardsRecognitionStartups({search:e,industry:n.find(le=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(le)),fundingStage:n.find(le=>["Series A","Series B","Seed","Pre-seed"].includes(le)),scoreRange:o,sortBy:a,page:c,pageSize:A});
914return console.log("✅ Awards recognition fetched:",{recordCount:((re=W.records)==null?void 0:re.length)||0,hasMore:W.hasMore}),!y&&((ne=W.records)==null?void 0:ne.length)>0&&x(),W},staleTime:10*60*1e3}),q=W=>{r(re=>re.includes(W)?re.filter(ne=>ne!==W):[...re,W]),u(1)},L=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["awards-recognition"]}),u(1),await m.refetchQueries({queryKey:["awards-recognition"]}),f({title:"Refreshed Successfully",description:"Fetched the latest awards recognition data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},k=W=>{if(console.log("Page change requested:",W),!p&&W>P){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}N("awards_recognition_page_change")?(console.log("Captcha needed, storing target page:",W),sessionStorage.setItem("targetPage",W.toString())):(console.log("No captcha needed, setting page to:",W),u(W))},T=()=>{const W=sessionStorage.getItem("targetPage");W&&(console.log("Captcha success, setting page to:",W),u(parseInt(W)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},F=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},O=()=>{r([]),l("all"),t(""),u(1)},E=W=>{i(W),u(1)},D=W=>{l(W),u(1)},M=W=>{b()};return B?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading Awards & Recognition Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(Mn,{className:"w-10 h-10 text-yellow-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Awards & Recognition"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies receiving awards and recognition"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:L,disabled:d||I,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:E,selectedFilters:n,onFilterToggle:q,scoreRange:o,onScoreRangeChange:D,onClearFilters:O})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((X=R==null?void 0:R.pagination)==null?void 0:X.totalRecords)||0," companies with awards and recognition"]})}),I?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(dt,{className:"w-8 h-8 animate-spin text-blue-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading awards & recognition companies..."})]}):R!=null&&R.records&&R.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:R.records.map((W,re)=>s.jsx(Bt,{startup:W,index:re},`${W.id}-${c}-${re}`))}),(R==null?void 0:R.pagination)&&s.jsx(Ut,{currentPage:R.pagination.currentPage,totalPages:p?R.pagination.totalPages:Math.min(P,R.pagination.totalPages),totalRecords:R.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:k,isLoading:$})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Awards & Recognition Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:O,children:"Clear All Filters"})]})]})}),w&&S&&s.jsx(Ot,{isOpen:w,question:S.question,isLoading:j,onSolve:W=>C(W,T,F),onClose:_}),s.jsx(Ui,{isOpen:v&&!y,onEmailSubmit:M})]})})},VKe=()=>{var O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("newest"),[o,l]=g.useState("all"),[c,u]=g.useState(1),[d,h]=g.useState(!1),{toast:f}=Ve(),m=pr(),{user:y,subscribed:p}=Ie(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}
914=Rt(),N=15,C=7,{data:_,isLoading:A,error:P,isFetching:R}=ct({queryKey:["ipo-filing",{searchTerm:e,selectedFilters:n,sortBy:a,scoreRange:o,currentPage:c}],queryFn:async()=>{var D;console.log("🔍 Fetching IPO filing for page:",c);const E=await Kt.fetchIPOFilingStartups({search:e,industry:n.find(M=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(M)),fundingStage:n.find(M=>["Series A","Series B","Seed","Pre-seed"].includes(M)),scoreRange:o,sortBy:a,page:c,pageSize:N});return console.log("✅ IPO filing fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),E},staleTime:10*60*1e3}),I=E=>{r(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E]),u(1)},B=async()=>{h(!0);try{await m.invalidateQueries({queryKey:["ipo-filing"]}),u(1),await m.refetchQueries({queryKey:["ipo-filing"]}),f({title:"Refreshed Successfully",description:"Fetched the latest IPO filing data."})}catch{f({title:"Refresh Failed",description:"Failed to refresh data. Please try again.",variant:"destructive"})}finally{h(!1)}},$=E=>{if(console.log("Page change requested:",E),!p&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("ipo_filing_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=()=>{r([]),l("all"),t(""),u(1)},T=E=>{i(E),u(1)},F=E=>{l(E),u(1)};return P?s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading IPO Filing Companies"}),s.jsx("p",{className:"text-gray-600",children:"Please try again later"})]})})]}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-4",children:[s.jsx(gd,{className:"w-10 h-10 text-purple-600"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"IPO Filing Companies"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Discover companies filing for IPO"}),s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs(U,{onClick:B,disabled:d||A,variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${d?"animate-spin":""}`}),d?"Refreshing...":"Refresh"]}),s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:a,onSortChange:T,selectedFilters:n,onFilterToggle:I,scoreRange:o,onScoreRangeChange:F,onClearFilters:k})}),s.jsx("div",{className:"mb-6",children:s.jsxs("p",{className:"text-gray-600",children:["Found ",((O=_==null?void 0:_.pagination)==null?void 0:O.totalRecords)||0," companies with IPO filings"]})}),A?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((E,D)=>s.jsx("div",{className:"animate-pulse",children:s.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded mb-4"}),s.jsx("div",{className:"h-3 bg-gray-200 rounded mb-2"}),s.jsx("div",{className:"h-3 bg-gray-200 rounded mb-4"}),s.jsx("div",{className:"h-8 bg-gray-200 rounded"})]})},D))}):_!=null&&_.records&&_.records.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.records.map((E,D)=>s.jsx(Bt,{startup:E,index:D},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:p?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:p,isAuthenticated:!!y,onPageChange:$,isLoading:R})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(tt,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No IPO Filing Companies Found"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search or filters"}),(n.length>0||o!=="all"||e)&&s.jsx(U,{variant:"outline",onClick:k,children:"Clear All Filters"})]})]})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j})]})};class HKe{parseQuery(t){const n=t.toLowerCase(),r={tables:["company_overview"],filters:{},limit:500};if(n.includes("series a")&&(r.filters.fundingStage=["Series A"]),n.includes("series b")&&(r.filters.fundingStage=["Series B"]),n.includes("series c")&&(r.filters.fundingStage=["Series C"]),n.includes("seed")&&(r.filters.fundingStage=["Seed"]),n.includes("recently funded")||n.includes("recent funding")||n.includes("just raised")){const a=new Date;a.setMonth(a.getMonth()-6),r.filters.fundingDateRange={start:a,end:new Date}}return(n.includes("tech")||n.includes("technology"))&&(r.filters.industry=["Technology","Software","SaaS"]),n.includes("saas")&&(r.filters.industry=["SaaS"]),n.includes("fintech")&&(r.filters.industry=["Fintech","Financial Services"]),(n.includes("healthcare")||n.includes("health tech"))&&(r.filters.industry=["Healthcare","Health Technology"]),(n.includes("ecommerce")||n.includes("e-commerce"))&&(r.filters.industry=["E-commerce","Retail"]),(n.includes("hiring")||n.includes("recruiting")||n.includes("job opening"))&&(r.filters.hiringSignals=!0),(n.includes("high growth")||n.includes("fast growing")||n.includes("scaling"))&&(r.filters.growthIndicators=!0,r.filters.employeeGrowth=!0),(n.includes("50-200")||n.includes("small company"))&&(r.filters.employeeCountMin=50,r.filters.employeeCountMax=200),(n.includes("200-1000")||n.includes("mid-size"))&&(r.filters.employeeCountMin=200,r.filters.employeeCountMax=1e3),(n.includes("international")||n.includes("global"))&&(r.filters.location=["international"]),(n.includes("us")||n.includes("united states"))&&(r.filters.location=["United States"]),(n.includes("tech stack")||n.includes("technology"))&&(r.filters.techStack=[]),(n.includes("recent")||n.includes("signal")||n.includes("activity")||n.includes("news")||n.includes("announcement"))&&(r.tables.includes("signals_feed")||r.tables.push("signals_feed")),r}async fetchRelevantCompanies(t){console.log("Fetching companies with intent:",t);let n=K.from("company_overview").select("*");if(t.filters.fundingStage&&t.filters.fundingStage.length>0&&(n=n.in("funding_stage",t.filters.fundingStage)),t.filters.industry&&t.filters.industry.length>0){const i=t.filters.industry.map(o=>`industry.ilike.%${o}%`).join(",");n=n.or(i)}if(t.filters.fundingDateRange&&(n=n.gte("latest_funding_date",t.filters.fundingDateRange.start.toISOString().split("T")[0])),t.filters.employeeCountMin&&(n=n.gte("employee_count_approx",t.filters.employeeCountMin.toString())),t.filters.employeeCountMax&&(n=n.lte("employee_count_approx",t.filters.employeeCountMax.toString())),t.filters.location&&t.filters.location.length>0){const i=t.filters.location.map(o=>`hq_country.ilike.%${o}%`).join(",");n=n.or(i)}n=n.limit(t.limit);const{data:r,error:a}=await n;if(a)throw console.error("Error fetching companies:",a),a;return console.log(`Fetched ${(r==null?void 0:r.length)||0} companies matching criteria`),r||[]}async enrichWithSignals(t){if(t.length===0)return t;const n=t.map(u=>
914u.id).filter(Boolean),r=t.map(u=>u.domain).filter(Boolean);if(n.length===0&&r.length===0)return t;const a=new Date;a.setMonth(a.getMonth()-6);let i=K.from("signals_feed").select("*").gte("signal_date",a.toISOString()).order("signal_date",{ascending:!1});n.length>0&&(i=i.in("company_id",n));const{data:o,error:l}=await i;if(l)return console.error("Error fetching signals:",l),t;const c={};return o==null||o.forEach(u=>{const d=u.company_id||u.company_domain;d&&(c[d]||(c[d]=[]),c[d].push(u))}),t.map(u=>{const d=u.id||u.domain,h=c[d]||[];return{...u,recentSignals:h,signalSummary:this.generateSignalSummary(h),signalCount:h.length}})}generateSignalSummary(t){if(t.length===0)return"";const n=t.map(a=>a.signal_type);return`${[...new Set(n)].slice(0,3).join(", ")} (${t.length} signals in last 6 months)`}extractCompanyNames(t){const n=[],r=t.matchAll(/^([A-Z][a-zA-Z0-9\s&.-]+):/gm);for(const a of r)a[1]&&n.push(a[1].toLowerCase().trim());return n}extractCompanyMentions(t,n){const r=[];return n.forEach(a=>{if(!a.name)return;new RegExp(`\\b${a.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi").test(t)&&r.push({name:a.name,company:a})}),r}}const ob=new HKe;class GKe{constructor(){E1(this,"cache",new Map);E1(this,"TTL",5*60*1e3)}get(t){const n=this.cache.get(t);return n?Date.now()-n.timestamp>this.TTL?(this.cache.delete(t),null):n.data:null}set(t,n){this.cache.set(t,{data:n,timestamp:Date.now()})}generateKey(t){return JSON.stringify({tables:t.tables,filters:t.filters,limit:t.limit})}clearExpired(){const t=Date.now();for(const[n,r]of this.cache.entries())t-r.timestamp>this.TTL&&this.cache.delete(n)}clearAll(){this.cache.clear()}}const R_=new GKe;function KKe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const YKe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XKe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QKe={};function O6(e,t){return(QKe.jsx?XKe:YKe).test(e)}const ZKe=/[ \t\n\f\r]/g;function JKe(e){return typeof e=="object"?e.type==="text"?R6(e.value):!1:R6(e)}function R6(e){return e.replace(ZKe,"")===""}class Rx{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Rx.prototype.normal={};Rx.prototype.property={};Rx.prototype.space=void 0;function Ree(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Rx(n,r,t)}function fT(e){return e.toLowerCase()}class Js{constructor(t,n){this.attribute=n,this.property=t}}Js.prototype.attribute="";Js.prototype.booleanish=!1;Js.prototype.boolean=!1;Js.prototype.commaOrSpaceSeparated=!1;Js.prototype.commaSeparated=!1;Js.prototype.defined=!1;Js.prototype.mustUseProperty=!1;Js.prototype.number=!1;Js.prototype.overloadedBoolean=!1;Js.prototype.property="";Js.prototype.spaceSeparated=!1;Js.prototype.space=void 0;let eYe=0;const Et=Cd(),lr=Cd(),mT=Cd(),_e=Cd(),xn=Cd(),Vh=Cd(),sa=Cd();function Cd(){return 2**++eYe}const pT=Object.freeze(Object.defineProperty({__proto__:null,boolean:Et,booleanish:lr,commaOrSpaceSeparated:sa,commaSeparated:Vh,number:_e,overloadedBoolean:mT,spaceSeparated:xn},Symbol.toStringTag,{value:"Module"})),I_=Object.keys(pT);class WR extends Js{constructor(t,n,r,a){let i=-1;if(super(t,n),I6(this,"space",a),typeof r=="number")for(;++i<I_.length;){const o=I_[i];I6(this,I_[i],(r&pT[o])===pT[o])}}}WR.prototype.defined=!0;function I6(e,t,n){n&&(e[t]=n)}function $m(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new WR(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[fT(r)]=r,n[fT(i.attribute)]=r}return new Rx(t,n,e.space)}const Iee=$m({properties:{ariaActiveDescendant:null,ariaAtomic:lr,ariaAutoComplete:null,ariaBusy:lr,ariaChecked:lr,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:xn,ariaCurrent:null,ariaDescribedBy:xn,ariaDetails:null,ariaDisabled:lr,ariaDropEffect:xn,ariaErrorMessage:null,ariaExpanded:lr,ariaFlowTo:xn,ariaGrabbed:lr,ariaHasPopup:null,ariaHidden:lr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xn,ariaLevel:_e,ariaLive:null,ariaModal:lr,ariaMultiLine:lr,ariaMultiSelectable:lr,ariaOrientation:null,ariaOwns:xn,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:lr,ariaReadOnly:lr,ariaRelevant:null,ariaRequired:lr,ariaRoleDescription:xn,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:lr,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Mee(e,t){return t in e?e[t]:t}function Dee(e,t){return Mee(e,t.toLowerCase())}const tYe=$m({attributes:{acceptcharset:"accept-charset",classname:"
914class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vh,acceptCharset:xn,accessKey:xn,action:null,allow:null,allowFullScreen:Et,allowPaymentRequest:Et,allowUserMedia:Et,alt:null,as:null,async:Et,autoCapitalize:null,autoComplete:xn,autoFocus:Et,autoPlay:Et,blocking:xn,capture:null,charSet:null,checked:Et,cite:null,className:xn,cols:_e,colSpan:null,content:null,contentEditable:lr,controls:Et,controlsList:xn,coords:_e|Vh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Et,defer:Et,dir:null,dirName:null,disabled:Et,download:mT,draggable:lr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Et,formTarget:null,headers:xn,height:_e,hidden:mT,high:_e,href:null,hrefLang:null,htmlFor:xn,httpEquiv:xn,id:null,imageSizes:null,imageSrcSet:null,inert:Et,inputMode:null,integrity:null,is:null,isMap:Et,itemId:null,itemProp:xn,itemRef:xn,itemScope:Et,itemType:xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Et,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:Et,muted:Et,name:null,nonce:null,noModule:Et,noValidate:Et,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Et,optimum:_e,pattern:null,ping:xn,placeholder:null,playsInline:Et,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Et,referrerPolicy:null,rel:xn,required:Et,reversed:Et,rows:_e,rowSpan:_e,sandbox:xn,scope:null,scoped:Et,seamless:Et,selected:Et,shadowRootClonable:Et,shadowRootDelegatesFocus:Et,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spell
914Check:lr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:Et,useMap:null,value:lr,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xn,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Et,declare:Et,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:Et,noHref:Et,noShade:Et,noWrap:Et,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:lr,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Et,disableRemotePlayback:Et,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:Dee}),nYe=$m({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
914-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sa,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:xn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:Et,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vh,g2:Vh,glyphName:Vh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:sa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:_e,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 4,502 bytes, lines 914-915
914Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sa,rev:sa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sa,requiredFeatures:sa,requiredFonts:sa,requiredFormats:sa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:sa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sa,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Mee}),Lee=$m({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$ee=$m({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Dee}),Fee=$m({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rYe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},sYe=/[A-Z]/g,M6=/-[a-z]/g,aYe=/^data[-\w.:]+$/i;function iYe(e,t){const n=fT(t);let r=t,a=Js;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&aYe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(M6,lYe);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!M6.test(i)){let o=i.replace(sYe,oYe);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=WR}return new a(r,t)}function oYe(e){return"-"+e.toLowerCase()}function lYe(e){return e.charAt(1).toUpperCase()}const cYe=Ree([Iee,tYe,Lee,$ee,Fee],"html"),VR=Ree([Iee,nYe,Lee,$ee,Fee],"svg");function uYe(e){return e.join(" ").trim()}var HR={},D6=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,dYe=/\n/g,hYe=/^\s*/,fYe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mYe=/^:\s*/,pYe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gYe=/^[;\s]*/,yYe=/^\s+|\s+$/g,xYe=`
915`,L6="/",$6="*",gu="",vYe="comment",bYe="declaration",wYe=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(y){var p=y.match(dYe);p&&(n+=p.length);var x=y.lastIndexOf(xYe);r=~x?y.length-x:r+y.length}function i(){var y={line:n,column:r};return function(p){return p.position=new o(y),u(),p}}function o(y){this.start=y,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function l(y){var p=new Error(t.source+":"+n+":"+r+": "+y);if(p.reason=y,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}
vendor: 1,918 bytes, line 915
915function c(y){var p=y.exec(e);if(p){var x=p[0];return a(x),e=e.slice(x.length),p}}function u(){c(hYe)}function d(y){var p;for(y=y||[];p=h();)p!==!1&&y.push(p);return y}function h(){var y=i();if(!(L6!=e.charAt(0)||$6!=e.charAt(1))){for(var p=2;gu!=e.charAt(p)&&($6!=e.charAt(p)||L6!=e.charAt(p+1));)++p;if(p+=2,gu===e.charAt(p-1))return l("End of comment missing");var x=e.slice(2,p-2);return r+=2,a(x),e=e.slice(p),r+=2,y({type:vYe,comment:x})}}function f(){var y=i(),p=c(fYe);if(p){if(h(),!c(mYe))return l("property missing ':'");var x=c(pYe),v=y({type:bYe,property:F6(p[0].replace(D6,gu)),value:x?F6(x[0].replace(D6,gu)):gu});return c(gYe),v}}function m(){var y=[];d(y);for(var p;p=f();)p!==!1&&(y.push(p),d(y));return y}return u(),m()};function F6(e){return e?e.replace(yYe,gu):gu}var SYe=Bo&&Bo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(HR,"__esModule",{value:!0});HR.default=NYe;var jYe=SYe(wYe);function NYe(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,jYe.default)(e),a=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var o=i.property,l=i.value;a?t(o,l,i):l&&(n=n||{},n[o]=l)}}),n}var f1={};Object.defineProperty(f1,"__esModule",{value:!0});f1.camelCase=void 0;var _Ye=/^--[a-zA-Z0-9_-]+$/,CYe=/-([a-z])/g,EYe=/^[^-]+$/,kYe=/^-(webkit|moz|ms|o|khtml)-/,PYe=/^-(ms)-/,TYe=function(e){return!e||EYe.test(e)||_Ye.test(e)},AYe=function(e,t){return t.toUpperCase()},B6=function(e,t){return"".concat(t,"-")},OYe=function(e,t){return t===void 0&&(t={}),TYe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(PYe,B6):e=e.replace(kYe,B6),e.replace(CYe,AYe))};f1.camelCase=OYe;var RYe=Bo&&Bo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},IYe=RYe(HR),MYe=f1;function gT(e,t){var n={};return!e||typeof e!="string"||(0,IYe.default)(e,function(r,a){r&&a&&(n[(0,MYe.camelCase)(r,t)]=a)}),n}gT.default=gT;var DYe=gT;
vendor: 2,611 bytes, line 915
915const LYe=$t(DYe),Bee=zee("end"),GR=zee("start");function zee(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function $Ye(e){const t=GR(e),n=Bee(e);if(t&&n)return{start:t,end:n}}function ig(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?z6(e.position):"start"in e||"end"in e?z6(e):"line"in e||"column"in e?yT(e):""}function yT(e){return U6(e&&e.line)+":"+U6(e&&e.column)}function z6(e){return yT(e&&e.start)+"-"+yT(e&&e.end)}function U6(e){return e&&typeof e=="number"?e:1}class ds extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=ig(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ds.prototype.file="";ds.prototype.name="";ds.prototype.reason="";ds.prototype.message="";ds.prototype.stack="";ds.prototype.column=void 0;ds.prototype.line=void 0;ds.prototype.ancestors=void 0;ds.prototype.cause=void 0;ds.prototype.fatal=void 0;ds.prototype.place=void 0;ds.prototype.ruleId=void 0;ds.prototype.source=void 0;const KR={}.hasOwnProperty,FYe=new Map,BYe=/[A-Z]/g,zYe=new Set(["table","tbody","thead","tfoot","tr"]),UYe=new Set(["td","th"]),Uee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qYe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=QYe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,360 bytes, line 915
915if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=XYe(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?VR:cYe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=qee(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function qee(e,t,n){if(t.type==="element")return WYe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return VYe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return GYe(e,t,n);if(t.type==="mdxjsEsm")return HYe(e,t);if(t.type==="root")return KYe(e,t,n);if(t.type==="text")return YYe(e,t)}function WYe(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=VR,e.schema=a),e.ancestors.push(t);const i=Vee(e,t.tagName,!1),o=ZYe(e,t);let l=XR(e,t);return zYe.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!JKe(c):!0})),Wee(e,o,i,t),YR(o,l),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function VYe(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ry(e,t.position)}function HYe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ry(e,t.position)}function GYe(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=VR,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:Vee(e,t.name,!0),o=JYe(e,t),l=XR(e,t);return Wee(e,o,i,t),YR(o,l),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function KYe(e,t,n){const r={};return YR(r,XR(e,t)),e.create(t,e.Fragment,r,n)}function YYe(e,t){return t.value}function Wee(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function YR(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function XYe(e,t,n){return r;function r(a,i,o,l){const u=Array.isArray(o.children)?n:t;return l?u(i,o,l):u(i,o)}}function QYe(e,t){return n;function n(r,a,i,o){const l=Array.isArray(i.children),c=GR(r);return t(a,i,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ZYe(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&KR.call(t.properties,a)){const i=eXe(e,a,t.properties[a]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&UYe.has(t.tagName)?r=l:n[o]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function JYe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Ry(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else Ry(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function XR(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:FYe;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=a.get(c)||0;o=c+"-"+u,a.set(c,u+1)}}const l=qee(e,i,o);l!==void 0&&n.push(l)}return n}function eXe(e,t,n){const r=iYe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?KKe(n):uYe(n)),r.property==="style"){let a=typeof n=="object"?n:tXe(e,String(n));return e.stylePropertyNameCase==="css"&&(a=nXe(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?rYe[r.property]||r.property:r.attribute,n]}}function tXe(e,t){try{return LYe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new ds("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Uee+"#cannot-parse-style-attribute",a}}function Vee(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,o;for(;++i<a.length;){const l=O6(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=o}else r=O6(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return KR.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ry(e)}function Ry(e,t){const n=new ds("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Uee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nXe(e){const t={};let n;for(n in e)KR.call(e,n)&&(t[rXe(n)]=e[n]);return t}function rXe(e){let t=e.replace(BYe,sXe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function sXe(e){return"-"+e.toLowerCase()}const M_={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},aXe={};function QR(e,t){const n=aXe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hee(e,r,a)}function Hee(e,t,n){if(iXe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return q6(e.children,t,n)}return Array.isArray(e)?q6(e,t,n):""}function q6(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Hee(e[a],t,n);return r.join("")}function iXe(e){return!!(e&&typeof e=="object")}const W6=document.createElement("i");function ZR(e){const t="&"+e+";";W6.innerHTML=t;const n=W6.textContent;
vendor: 10,926 bytes, line 915
915return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ja(e,t,n,r){const a=e.length;let i=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Fa(e,t){return e.length>0?(ja(e,e.length,0,t),e):t}const V6={}.hasOwnProperty;function Gee(e){const t={};let n=-1;for(;++n<e.length;)oXe(t,e[n]);return t}function oXe(e,t){let n;for(n in t){const a=(V6.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){V6.call(a,o)||(a[o]=[]);const l=i[o];lXe(a[o],Array.isArray(l)?l:l?[l]:[])}}}function lXe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ja(e,0,0,r)}function Kee(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Oi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vs=Xc(/[A-Za-z]/),is=Xc(/[\dA-Za-z]/),cXe=Xc(/[#-'*+\--9=?A-Z^-~]/);function Vw(e){return e!==null&&(e<32||e===127)}const xT=Xc(/\d/),uXe=Xc(/[\dA-Fa-f]/),dXe=Xc(/[!-/:-@[-`{-~]/);function it(e){return e!==null&&e<-2}function gn(e){return e!==null&&(e<0||e===32)}function Lt(e){return e===-2||e===-1||e===32}const m1=Xc(new RegExp("\\p{P}|\\p{S}","u")),ld=Xc(/\s/);function Xc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Fm(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&is(e.charCodeAt(n+1))&&is(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(o=String.fromCharCode(i,l),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Qt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(c){return Lt(c)?(e.enter(n),l(c)):t(c)}function l(c){return Lt(c)&&i++<a?(e.consume(c),l):(e.exit(n),t(c))}}const hXe={tokenize:fXe};function fXe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Qt(e,t,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return it(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),o)}}const mXe={tokenize:pXe},H6={tokenize:gXe};function pXe(e){const t=this,n=[];let r=0,a,i,o;return l;function l(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&b();const S=t.events.length;let j=S,N;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){N=t.events[j][1].end;break}v(r);let C=S;for(;C<t.events.length;)t.events[C][1].end={...N},C++;return ja(t.events,j+1,0,t.events.slice(S)),t.events.length=C,u(w)}return l(w)}function u(w){if(r===n.length){if(!a)return f(w);if(a.currentConstruct&&a.currentConstruct.concrete)return y(w);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(H6,d,h)(w)}function d(w){return a&&b(),v(r),f(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,y(w)}function f(w){return t.containerState={},e.attempt(H6,m,y)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function y(w){if(w===null){a&&b(),v(0),e.consume(w);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),p(w)}function p(w){if(w===null){x(e.exit("chunkFlow"),!0),v(0),e.consume(w);return}return it(w)?(e.consume(w),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),p)}function x(w,S){const j=t.sliceStream(w);if(S&&j.push(null),w.previous=i,i&&(i.next=w),i=w,a.defineSkip(w.start),a.write(j),t.parser.lazy[w.start.line]){let N=a.events.length;for(;N--;)if(a.events[N][1].start.offset<o&&(!a.events[N][1].end||a.events[N][1].end.offset>o))return;const C=t.events.length;let _=C,A,P;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(A){P=t.events[_][1].end;break}A=!0}for(v(r),N=C;N<t.events.length;)t.events[N][1].end={...P},N++;ja(t.events,_+1,0,t.events.slice(C)),t.events.length=N}}function v(w){let S=n.length;for(;S-- >w;){const j=n[S];t.containerState=j[1],j[0].exit.call(t,e)}n.length=w}function b(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function gXe(e,t,n){return Qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qf(e){if(e===null||gn(e)||ld(e))return 1;if(m1(e))return 2}function p1(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const vT={name:"attention",resolveAll:yXe,tokenize:xXe};function yXe(e,t){let n=-1,r,a,i,o,l,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},f={...e[n][1].start};G6(h,-c),G6(f,c),o={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Fa(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Fa(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Fa(u,p1(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Fa(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Fa(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ja(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function xXe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Qf(r);let i;return o;function o(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=Qf(c),h=!d||d===2&&a||n.includes(c),f=!a||a===2&&d||n.includes(r);return u._open=!!(i===42?h:h&&(a||!f)),u._close=!!(i===42?f:f&&(d||!h)),t(c)}}function G6(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vXe={name:"autolink",tokenize:bXe};function bXe(e,t,n){let r=0;return a;function a(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return vs(m)?(e.consume(m),o):m===64?n(m):u(m)}function o(m){return m===43||m===45||m===46||is(m)?(r=1,l(m)):u(m)}function l(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||is(m))&&r++<32?(e.consume(m),l):(r=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Vw(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):cXe(m)?(e.consume(m),u):n(m)}function d(m){return is(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):f(m)}function f(m){if((m===45||is(m))&&r++<63){const y=m===45?f:h;return e.consume(m),y}return n(m)}}const Ix={partial:!0,tokenize:wXe};function wXe(e,t,n){return r;function r(i){return Lt(i)?Qt(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||it(i)?t(i):n(i)}}const Yee={continuation:{tokenize:jXe},exit:NXe,name:"blockQuote",tokenize:SXe};function SXe(e,t,n){const r=this;return a;function a(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return Lt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function jXe(e,t,n){const r=this;return a;function a(o){return Lt(o)?Qt(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(Yee,t,n)(o)}}function NXe(e){e.exit("blockQuote")}const Xee={name:"characterEscape",tokenize:_Xe};function _Xe(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return dXe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Qee={name:"characterReference",tokenize:CXe};function CXe(e,t,n){const r=this;let a=0,i,o;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=is,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=uXe,d):(e.enter("characterReferenceValue"),i=7,o=xT,d(h))}function d(h){if(h===59&&a){const f=e.exit("characterReferenceValue");return o===is&&!ZR(r.sliceSerialize(f))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(h)&&a++<i?(e.consume(h),d):n(h)}}const K6={partial:!0,tokenize:kXe},Y6={concrete:!0,name:"codeFenced",tokenize:EXe};function EXe(e,t,n){const r=this,a={partial:!0,tokenize:j};let i=0,o=0,l;return c;function c(N){return u(N)}function u(N){const C=r.events[r.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=N,e.enter("co
915deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===l?(o++,e.consume(N),d):o<3?n(N):(e.exit("codeFencedFenceSequence"),Lt(N)?Qt(e,h,"whitespace")(N):h(N))}function h(N){return N===null||it(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(K6,p,S)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(N))}function f(N){return N===null||it(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(N)):Lt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qt(e,m,"whitespace")(N)):N===96&&N===l?n(N):(e.consume(N),f)}function m(N){return N===null||it(N)?h(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(N))}function y(N){return N===null||it(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(N)):N===96&&N===l?n(N):(e.consume(N),y)}function p(N){return e.attempt(a,S,x)(N)}function x(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),v}function v(N){return i>0&&Lt(N)?Qt(e,b,"linePrefix",i+1)(N):b(N)}function b(N){return N===null||it(N)?e.check(K6,p,S)(N):(e.enter("codeFlowValue"),w(N))}function w(N){return N===null||it(N)?(e.exit("codeFlowValue"),b(N)):(e.consume(N),w)}function S(N){return e.exit("codeFenced"),t(N)}function j(N,C,_){let A=0;return P;function P(q){return N.enter("lineEnding"),N.consume(q),N.exit("lineEnding"),R}function R(q){return N.enter("codeFencedFence"),Lt(q)?Qt(N,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):I(q)}function I(q){return q===l?(N.enter("codeFencedFenceSequence"),B(q)):_(q)}function B(q){return q===l?(A++,N.consume(q),B):A>=o?(N.exit("codeFencedFenceSequence"),Lt(q)?Qt(N,$,"whitespace")(q):$(q)):_(q)}function $(q){return q===null||it(q)?(N.exit("codeFencedFence"),C(q)):_(q)}}}function kXe(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const D_={name:"codeIndented",tokenize:TXe},PXe={partial:!0,tokenize:AXe};function TXe(e,t,n){const r=this;return a;function a(u){return e.enter("codeIndented"),Qt(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?c(u):it(u)?e.attempt(PXe,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||it(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function AXe(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):it(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):Qt(e,i,"linePrefix",5)(o)}function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):it(o)?a(o):n(o)}}const OXe={name:"codeText",previous:IXe,resolve:RXe,tokenize:MXe};function RXe(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function IXe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function MXe(e,t,n){let r=0,a,i;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(i=e.enter("codeTextSequence"),a=0,d(h)):it(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||it(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),a++,d):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(i.type="codeTextData",u(h))}}class DXe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&mp(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),mp(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mp(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);mp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mp(this.left,n.reverse())}}}function mp(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Zee(e){const t={};let n=-1,r,a,i,o,l,c,u;const d=new DXe(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,LXe(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=d.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...d.get(a)[1].start},l=d.slice(a,n),l.unshift(r),d.splice(a,n-a+1,l))}}return ja(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function LXe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let d,h,f=-1,m=n,y=0,p=0;const x=[p];for(;m;){for(;e.get(++a)[1]!==m;);i.push(a),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),h&&o.defineSki
vendor: 18,639 bytes, line 915
915p(m.start),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(p=f+1,x.push(p),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(o.events=[],m?(m._tokenizer=void 0,m.previous=void 0):x.pop(),f=x.length;f--;){const v=l.slice(x[f],x[f+1]),b=i.pop();c.push([b,b+v.length-1]),e.splice(b,2,v)}for(c.reverse(),f=-1;++f<c.length;)u[y+c[f][0]]=y+c[f][1],y+=c[f][1]-c[f][0]-1;return u}const $Xe={resolve:BXe,tokenize:zXe},FXe={partial:!0,tokenize:UXe};function BXe(e){return Zee(e),e}function zXe(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(l)}function a(l){return l===null?i(l):it(l)?e.check(FXe,o,i)(l):(e.consume(l),a)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function UXe(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Qt(e,i,"linePrefix")}function i(o){if(o===null||it(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Jee(e,t,n,r,a,i,o,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(v){return v===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(v),e.exit(i),f):v===null||v===32||v===41||Vw(v)?n(v):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(v))}function f(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(l),f(v)):v===null||v===60||it(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function p(v){return!d&&(v===null||v===41||gn(v))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(v)):d<u&&v===40?(e.consume(v),d++,p):v===41?(e.consume(v),d--,p):v===null||v===32||v===40||Vw(v)?n(v):(e.consume(v),v===92?x:p)}function x(v){return v===40||v===41||v===92?(e.consume(v),p):p(v)}}function ete(e,t,n,r,a,i){const o=this;let l=0,c;return u;function u(m){return e.enter(r),e.enter(a),e.consume(m),e.exit(a),e.enter(i),d}function d(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):it(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||it(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Lt(m)),m===92?f:h)}function f(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function tte(e,t,n,r,a,i){let o;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(a),e.consume(f),e.exit(a),o=f===40?41:f,c):n(f)}function c(f){return f===o?(e.enter(a),e.consume(f),e.exit(a),e.exit(r),t):(e.enter(i),u(f))}function u(f){return f===o?(e.exit(i),c(o)):f===null?n(f):it(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Qt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===o||f===null||it(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?h:d)}function h(f){return f===o||f===92?(e.consume(f),d):d(f)}}function og(e,t){let n;return r;function r(a){return it(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):Lt(a)?Qt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const qXe={name:"definition",tokenize:VXe},WXe={partial:!0,tokenize:HXe};function VXe(e,t,n){const r=this;let a;return i;function i(m){return e.enter("definition"),o(m)}function o(m){return ete.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return a=Oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return gn(m)?og(e,u)(m):u(m)}function u(m){return Jee(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(WXe,h,h)(m)}function h(m){return Lt(m)?Qt(e,f,"whitespace")(m):f(m)}function f(m){return m===null||it(m)?(e.exit("definition"),r.parser.defined.push(a),t(m)):n(m)}}function HXe(e,t,n){return r;function r(l){return gn(l)?og(e,a)(l):n(l)}function a(l){return tte(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Lt(l)?Qt(e,o,"whitespace")(l):o(l)}function o(l){return l===null||it(l)?t(l):n(l)}}const GXe={name:"hardBreakEscape",tokenize:KXe};function KXe(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return it(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const YXe={name:"headingAtx",resolve:XXe,tokenize:QXe};function XXe(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ja(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function QXe(e,t,n){let r=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||gn(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||it(d)?(e.exit("atxHeading"),t(d)):Lt(d)?Qt(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||gn(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const ZXe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],X6=["pre","script","style","textarea"],JXe={concrete:!0,name:"htmlFlow",resolveTo:nQe,tokenize:rQe},eQe={partial:!0,tokenize:aQe},tQe={partial:!0,tokenize:sQe};function nQe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function rQe(e,t,n){const r=this;let a,i,o,l,c;return u;function u(M){return d(M)}function d(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),h}function h(M){return M===33?(e.consume(M),f):M===47?(e.consume(M),i=!0,p):M===63?(e.consume(M),a=3,r.interrupt?t:O):vs(M)?(e.consume(M),o=String.fromCharCode(M),x):n(M)}function f(M){return M===45?(e.consume(M),a=2,m):M===91?(e.consume(M),a=5,l=0,y):vs(M)?(e.consume(M),a=4,r.interrupt?t:O):n(M)}function m(M){return M===45?(e.consume(M),r.interrupt?t:O):n(M)}function y(M){const X="CDATA[";return M===X.charCodeAt(l++)?(e.consume(M),l===X.length?r.interrupt?t:I:y):n(M)}function p(M){return vs(M)?(e.consume(M),o=String.fromCharCode(M),x):n(M)}function x(M){if(M===null||M===47||M===62||gn(M)){const X=M===47,W=o.toLowerCase();return!X&&!i&&X6.includes(W)?(a=1,r.interrupt?t(M):I(M)):ZXe.includes(o.toLowerCase())?(a=6,X?(e.consume(M),v):r.interrupt?t(M):I(M)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):i?b(M):w(M))}return M===45||is(M)?(e.consume(M),o+=String.fromCharCode(M),x):n(M)}function v(M){return M===62?(e.consume(M),r.interrupt?t:I):n(M)}function b(M){return Lt(M)?(e.consume(M),b):P(M)}function w(M){return M===47?(e.consume(M),P):M===58||M===95||vs(M)?(e.consume(M),S):Lt(M)?(e.consume(M),w):P(M)}function S(M){return M===45||M===46||M===58||M===95||is(M)?(e.consume(M),S):j(M)}function j(M){return M===61?(e.consume(M),N):Lt(M)?(e.consume(M),j):w(M)}function N(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),c=M,C):Lt(M)?(e.consume(M),N):_(M)}function C(M){return M===c?(e.consume(M),c=null,A):M===null||it(M)?n(M):(e.consume(M),C)}function _(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||gn(M)?j(M):(e.consume(M),_)}function A(M){return M===47||M===62||Lt(M)?w(M):n(M)}function P(M){return M===62?(e.consume(M),R):n(M)}function R(M){return M===null||it(M)?I(M):Lt(M)?(e.consume(M),R):n(M)}function I(M){return M===45&&a===2?(e.consume(M),L):M===60&&a===1?(e.consume(M),k):M===62&&a===4?(e.consume(M),E):M===63&&a===3?(e.consume(M),O):M===93&&a===5?(e.consume(M),F):it(M)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(eQe,D,B)(M)):M===null||it(M)?(e.exit("htmlFlowData"),B(M)):(e.consume(M),I)}function B(M){return e.check(tQe,$,D)(M)}function $(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),q}function q(M){return M===null||it(M)?B(M):(e.enter("htmlFlowData"),I(M))}function L(M){return M===45?(e.consume(M),O):I(M)}function k(M){return M===47?(e.consume(M),o="",T):I(M)}function T(M){if(M===62){const X=o.toLowerCase();return X6.includes(X)?(e.consume(M),E):I(M)}return vs(M)&&o.length<8?(e.consume(M),o+=String.fromCharCode(M),T):I(M)}function F(M){return M===93?(e.consume(M),O):I(M)}function O(M){return M===62?(e.consume(M),E):M===45&&a===2?(e.consume(M),O):I(M)}function E(M){return M===null||it(M)?(e.exit("htmlFlowData"),D(M)):(e.consume(M),E)}function D(M){return e.exit("htmlFlow"),t(M)}}function sQe(e,t,n){const r=this;return a;function a(o){return it(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function aQe(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Ix,t,n)}}const iQe={name:"htmlText",tokenize:oQe};function oQe(e,t,n){const r=this;let a,i,o;return l;function l(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),c}function c(O){return O===33?(e.consume(O),u):O===47?(e.consume(O),j):O===63?(e.consume(O),w):vs(O)?(e.consume(O),_):n(O)}function u(O){return O===45?(e.consume(O),d):O===91?(e.consume(O),i=0,y):vs(O)?(e.consume(O),b):n(O)}function d(O){return O===45?(e.consume(O),m):n(O)}function h(O){return O===null?n(O):O===45?(e.consume(O),f):it(O)?(o=h,k(O)):(e.consume(O),h)}function f(O){return O===45?(e.consume(O),m):h(O)}function m(O){return O===62?L(O):O===45?f(O):h(O)}function y(O){const E="CDATA[";return O===E.charCodeAt(i++)?(e.consume(O),i===E.length?p:y):n(O)}function p(O){return O===null?n(O):O===93?(e.consume(O),x):it(O)?(o=p,k(O)):(e.consume(O),p)}function x(O){return O===93?(e.consume(O),v):p(O)}function v(O){return O===62?L(O):O===93?(e.consume(O),v):p(O)}function b(O){return O===null||O===62?L(O):it(O)?(o=b,k(O)):(e.consume(O),b)}function w(O){return O===null?n(O):O===63?(e.consume(O),S):it(O)?(o=w,k(O)):(e.consume(O),w)}function S(O){return O===62?L(O):w(O)}function j(O){return vs(O)?(e.consume(O),N):n(O)}function N(O){return O===45||is(O)?(e.consume(O),N):C(O)}function C(O){return it(O)?(o=C,k(O)):Lt(O)?(e.consume(O),C):L(O)}function _(O){return O===45||is(O)?(e.consume(O),_):O===47||O===62||gn(O)?A(O):n(O)}function A(O){return O===47?(e.consume(O),L):O===58||O===95||vs(O)?(e.consume(O),P):it(O)?(o=A,k(O)):Lt(O)?(e.consume(O),A):L(O)}function P(O){return O===45||O===46||O===58||O===95||is(O)?(e.consume(O),P):R(O)}function R(O){return O===61?(e.consume(O),I):it(O)?(o=R,k(O)):Lt(O)?(e.consume(O),R):A(O)}function I(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),a=O,B):it(O)?(o=I,k(O)):Lt(O)?(e.consume(O),I):(e.consume(O),$)}function B(O){return O===a?(e.consume(O),a=void 0,q):O===null?n(O):it(O)?(o=B,k(O)):(e.consume(O),B)}function $(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||gn(O)?A(O):(e.consume(O),$)}function q(O){return O===47||O===62||gn(O)?A(O):n(O)}function L(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function k(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),T}function T(O){return Lt(O)?Qt(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):F(O)}function F(O){return e.enter("htmlTextData"),o(O)}}const JR={name:"labelEnd",resolveAll:dQe,resolveTo:hQe,tokenize:fQe},lQe={tokenize:mQe},cQe={tokenize:pQe},uQe={tokenize:gQe};function dQe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&ja(e,0,e.length,n),e}function hQe(e,t){let n=e.length,r=0,a,i,o,l;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=Fa(l,e.slice(i+1,i+r+3)),l=Fa(l,[["enter",d,t]]),l=Fa(l,p1(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),l=Fa(l,[["exit",d,t],e[o-2],e[o-1],["exit",u,t]]),l=Fa(l,e.slice(o+1)),l=Fa(l,[["exit",c,t]]),ja(e,i,e.length,l),e}function fQe(e,t,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return l;function l(f){return i?i._inactive?h(f):(o=r.parser.defined.includes(Oi(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(lQe,d,o?d:h)(f):f===91?e.attempt(cQe,d,o?u:h)(f):o?d(f):h(f)}function u(f){return e.attempt(uQe,d,h)(f)}function d(f){return t(f)}function h(f){return i._balanced=!0,n(f)}}function mQe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),a}function a(h){return gn(h)?og(e,i)(h):i(h)}function i(h){return h===41?d(h):Jee(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return gn(h)?og(e,c)(h):d(h)}function l(h){return n(h)}function c(h){return h===34||h===39||h===40?tte(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return gn(h)?og(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function pQe(e,t,n){const r=this;return a;function a(l){return ete.call(r,e,i,o,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(Oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function gQe(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const yQe={name:"labelStartImage",resolveAll:JR.resolveAll,tokenize:xQe};function xQe(e,t,n){const r=this;return a;function a(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const vQe={name:"labelStartLink",resolveAll:JR.resolveAll,tokenize:bQe};function bQe(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const L_={name:"lineEnding",tokenize:wQe};function wQe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qt(e,t,"linePrefix")}}const qb={name:"thematicBreak",tokenize:SQe};function SQe(e,t,n){let r=0,a;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return a=u,l(u)}function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||it(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===a?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Lt(u)?Qt(e,l,"whitespace")(u):l(u))}}const Rs={continuation:{tokenize:CQe},exit:kQe,name:"list",tokenize:_Qe},jQe={partial:!0,tokenize:PQe},NQe={partial:!0,tokenize:EQe};function _Qe(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return l;function l(m){const y=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:xT(m)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(qb,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return xT(m)&&++o<10?(e.consume(m),c):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Ix,r.interrupt?n:d,e.attempt(jQe,f,h))}
vendor: 5,296 bytes, line 915
915function d(m){return r.containerState.initialBlankLine=!0,i++,f(m)}function h(m){return Lt(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),f):n(m)}function f(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function CQe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ix,a,i);function a(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qt(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!Lt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(NQe,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qt(e,e.attempt(Rs,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function EQe(e,t,n){const r=this;return Qt(e,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function kQe(e){e.exit(this.containerState.type)}function PQe(e,t,n){const r=this;return Qt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!Lt(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Q6={name:"setextUnderline",resolveTo:TQe,tokenize:AQe};function TQe(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function AQe(e,t,n){const r=this;let a;return i;function i(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),a=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===a?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Lt(u)?Qt(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||it(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const OQe={tokenize:RQe};function RQe(e){const t=this,n=e.attempt(Ix,r,e.attempt(this.parser.constructs.flowInitial,a,Qt(e,e.attempt(this.parser.constructs.flow,a,e.attempt($Xe,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const IQe={resolveAll:rte()},MQe=nte("string"),DQe=nte("text");function nte(e){return{resolveAll:rte(e==="text"?LQe:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,o,l);return o;function o(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=a[d];let f=-1;if(h)for(;++f<h.length;){const m=h[f];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function rte(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function LQe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,o=-1,l=0,c;for(;i--;){const u=a[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const $Qe={42:Rs,43:Rs,45:Rs,48:Rs,49:Rs,50:Rs,51:Rs,52:Rs,53:Rs,54:Rs,55:Rs,56:Rs,57:Rs,62:Yee},FQe={91:qXe},BQe={[-2]:D_,[-1]:D_,32:D_},zQe={35:YXe,42:qb,45:[Q6,qb],60:JXe,61:Q6,95:qb,96:Y6,126:Y6},UQe={38:Qee,92:Xee},qQe={[-5]:L_,[-4]:L_,[-3]:L_,33:yQe,38:Qee,42:vT,60:[vXe,iQe],91:vQe,92:[GXe,Xee],93:JR,95:vT,96:OXe},WQe={null:[vT,IQe]},VQe={null:[42,95]},HQe={null:[]},GQe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:VQe,contentInitial:FQe,disable:HQe,document:$Qe,flow:zQe,flowInitial:BQe,insideSpan:WQe,string:U
vendor: 19,259 bytes, lines 915-921
915Qe,text:qQe},Symbol.toStringTag,{value:"Module"}));function KQe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let o=[],l=[];const c={attempt:C(j),check:C(N),consume:b,enter:w,exit:S,interrupt:C(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:p,events:[],now:y,parser:e,previous:null,sliceSerialize:f,sliceStream:m,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function h(R){return o=Fa(o,R),x(),o[o.length-1]!==null?[]:(_(t,0),u.events=p1(i,u.events,u),u.events)}function f(R,I){return XQe(m(R),I)}function m(R){return YQe(o,R)}function y(){const{_bufferIndex:R,_index:I,line:B,column:$,offset:q}=r;return{_bufferIndex:R,_index:I,line:B,column:$,offset:q}}function p(R){a[R.line]=R.column,P()}function x(){let R;for(;r._index<o.length;){const I=o[r._index];if(typeof I=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<I.length;)v(I.charCodeAt(r._bufferIndex));else v(I)}}function v(R){d=d(R)}function b(R){it(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,P()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function w(R,I){const B=I||{};return B.type=R,B.start=y(),u.events.push(["enter",B,u]),l.push(B),B}function S(R){const I=l.pop();return I.end=y(),u.events.push(["exit",I,u]),I}function j(R,I){_(R,I.from)}function N(R,I){I.restore()}function C(R,I){return B;function B($,q,L){let k,T,F,O;return Array.isArray($)?D($):"tokenize"in $?D([$]):E($);function E(re){return ne;function ne(le){const ie=le!==null&&re[le],ye=le!==null&&re.null,pe=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return D(pe)(le)}}function D(re){return k=re,T=0,re.length===0?L:M(re[T])}function M(re){return ne;function ne(le){return O=A(),F=re,re.partial||(u.currentConstruct=re),re.name&&u.parser.constructs.disable.null.includes(re.name)?W():re.tokenize.call(I?Object.assign(Object.create(u),I):u,c,X,W)(le)}}function X(re){return R(F,O),q}function W(re){return O.restore(),++T<k.length?M(k[T]):L}}}function _(R,I){R.resolveAll&&!i.includes(R)&&i.push(R),R.resolve&&ja(u.events,I,u.events.length-I,R.resolve(u.events.slice(I),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function A(){const R=y(),I=u.previous,B=u.currentConstruct,$=u.events.length,q=Array.from(l);return{from:$,restore:L};function L(){r=R,u.previous=I,u.currentConstruct=B,u.events.length=$,l=q,P()}}function P(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function YQe(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,i)];else{if(o=e.slice(n,a),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}i>0&&o.push(e[a].slice(0,i))}return o}function XQe(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
916`;break}case-3:{o=`\r
917`;break}case-2:{o=t?" ":"	";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function QQe(e){const r={constructs:Gee([GQe,...(e||{}).extensions||[]]),content:a(hXe),defined:[],document:a(mXe),flow:a(OQe),lazy:{},string:a(MQe),text:a(DQe)};return r;function a(i){return o;function o(l){return KQe(r,i,l)}}}function ZQe(e){for(;!Zee(e););return e}const Z6=/[\0\t\n\r]/g;function JQe(){let e=1,t="",n=!0,r;return a;function a(i,o,l){const c=[];let u,d,h,f,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),h=0,t="",n&&(i.charCodeAt(0)===65279&&h++,n=void 0);h<i.length;){if(Z6.lastIndex=h,u=Z6.exec(i),f=u&&u.index!==void 0?u.index:i.length,m=i.charCodeAt(f),!u){t=i.slice(h);break}if(m===10&&h===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<f&&(c.push(i.slice(h,f)),e+=f-h),m){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=f+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const eZe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tZe(e){return e.replace(eZe,nZe)}function nZe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return Kee(n.slice(i?2:1),i?16:10)}return ZR(n)||e}const ste={}.hasOwnProperty;function rZe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),sZe(n)(ZQe(QQe(n).document().write(JQe()(e,t,!0))))}function sZe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ut),autolinkProtocol:A,autolinkEmail:A,atxHeading:i(oe),blockQuote:i(ye),characterEscape:A,characterReference:A,codeFenced:i(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(pe,o),codeText:i(G,o),codeTextData:A,data:A,codeFlowValue:A,definition:i(Pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(J),hardBreakEscape:i(se),hardBreakTrailing:i(se),htmlFlow:i(je,o),htmlFlowData:A,htmlText:i(je,o),htmlTextData:A,image:i(Ce),label:o,link:i(ut),listItem:i(Ye),listItemValue:f,listOrdered:i(Ze,h),listUnordered:i(Ze),paragraph:i(Zt),reference:M,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(oe),strong:i(Yt),thematicBreak:i(Z)},exit:{atxHeading:c(),atxHeadingSequence:j,autolink:c(),autolinkEmail:ie,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:re,characterReference:ne,codeFenced:c(x),codeFencedFence:p,codeFencedFenceInfo:m,codeFencedFenceMeta:y,codeFlowValue:P,codeIndented:c(v),codeText:c(q),codeTextData:P,data:P,definition:c(),definitionDestinationString:S,definitionLabelString:b,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(I),hardBreakTrailing:c(I),htmlFlow:c(B),htmlFlowData:P,htmlText:c($),htmlTextData:P,image:c(k),label:F,labelText:T,lineEnding:R,link:c(L),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:X,resourceDestinationString:O,resourceTitleString:E,resource:D,setextHeading:c(_),setextHeadingLineSequence:C,setextHeadingText:N,strong:c(),thematicBreak:c()}};ate(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(V){let H={type:"root",children:[]};const ae={stack:[H],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:d,data:n},be=[];let Re=-1;for(;++Re<V.length;)if(V[Re][1].type==="listOrdered"||V[Re][1].type==="listUnordered")if(V[Re][0]==="enter")be.push(Re);else{const Oe=be.pop();Re=a(V,Oe,Re)}for(Re=-1;++Re<V.length;){const Oe=t[V[Re][0]];ste.call(Oe,V[Re][1].type)&&Oe[V[Re][1].type].call(Object.assign({sliceSerialize:V[Re][2].sliceSerialize},ae),V[Re][1])}if(ae.tokenStack.length>0){const Oe=ae.tokenStack[ae.tokenStack.length-1];(Oe[1]||J6).call(ae,void 0,Oe[0])}for(H.position={start:kl(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:kl(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)H=t.transforms[Re](H)||H;return H}function a(V,H,ae){let be=H-1,Re=-1,Oe=!1,vt,qt,li,Me;for(;++be<=ae;){const Xe=V[be];switch(Xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xe[0]==="enter"?Re++:Re--,Me=void 0;break}case"lineEndingBlank":{Xe[0]==="enter"&&(vt&&!Me&&!Re&&!li&&(li=be),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!Re&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||Re===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(vt){let ir=be;for(qt=void 0;ir--;){const He=V[ir];if(He[1].type==="lineEnding"||He[1].type==="lineEndingBlank"){if(He[0]==="exit")continue;qt&&(V[qt][1].type="lineEndingBlank",Oe=!0),He[1].type="lineEnding",qt=ir}else if(!(He[1].type==="linePrefix"||He[1].type==="blockQuotePrefix"||He[1].type==="blockQuotePrefixWhitespace"||He[1].type==="blockQuoteMarker"||He[1].type==="listItemIndent"))break}li&&(!qt||li<qt)&&(vt._spread=!0),vt.end=Object.assign({},qt?V[qt][1].start:Xe[1].end),V.splice(qt||be,0,["exit",vt,Xe[2]]),be++,ae++}if(Xe[1].type==="listItemPrefix"){const ir={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start),end:void 0};vt=ir,V.splice(be,0,["enter",ir,Xe[2]]),be++,ae++,li=void 0,Me=!0}}}return V[H][1]._spread=Oe,ae}function i(V,H){return ae;function ae(be){l.call(this,V(be),be),H&&H.call(this,be)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(V,H,ae){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([H,ae||void 0]),V.position={start:kl(H.start),end:void 0}}function c(V){return H;function H(ae){V&&V.call(this,ae),u.call(this,ae)}}function u(V,H){const ae=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==V.type&&(H?H.call(this,V,be[0]):(be[1]||J6).call(this,V,be[0]));else throw new Error("Cannot close `"+V.type+"` ("+ig({start:V.start,end:V.end})+"): it’s not open");ae.position.end=kl(V.end)}function d(){return QR(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function f(V){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function m(){const V=this.resume(),H=this.stack[this.stack.length-1];H.lang=V}function y(){const V=this.resume(),H=this.stack[this.stack.length-1];H.meta=V}function p(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const V=this.resume(),H=this.stack[this.stack.length-1];H.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const V=this.resume(),H=this.stack[this.stack.length-1];H.value=V.replace(/(\r?\n|\r)$/g,"")}function b(V){const H=this.resume(),ae=this.stack[this.stack.length-1];ae.label=H,ae.identifier=Oi(this.sliceSerialize(V)).toLowerCase()}function w(){const V=this.resume(),H=this.stack[this.stack.length-1];H.title=V}function S(){const V=this.resume(),H=this.stack[this.stack.length-1];H.url=V}function j(V){const H=this.stack[this.stack.length-1];if(!H.depth){const ae=this.sliceSerialize(V).length;H.depth=ae}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function C(V){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function A(V){const ae=this.stack[this.stack.length-1].children;let be=ae[ae.length-1];(!be||be.type!=="text")&&(be=Nn(),be.position={start:kl(V.start),end:void 0},ae.push(be)),this.stack.push(be)}function P(V){const H=this.stack.pop();H.value+=this.sliceSerialize(V),H.position.end=kl(V.end)}function R(V){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ae=H.children[H.children.length-1];ae.position.end=kl(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(A.call(this,V),P.call(this,V))}function I(){this.data.atHardBreak=!0}function B(){const V=this.resume(),H=this.stack[this.stack.length-1];H.value=V}function $(){const V=this.resume(),H=this.stack[this.stack.length-1];H.value=V}function q(){const V=this.resume(),H=this.stack[this.stack.length-1];H.value=V}function L(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=H,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function k(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=H,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function T(V){const H=this.sliceSerialize(V),ae=this.stack[this.stack.length-2];ae.label=tZe(H),ae.identifier=Oi(H).toLowerCase()}function F(){const V=this.stack[this.stack.length-1],H=this.resume(),ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,ae.type==="link"){const be=V.children;ae.children=be}else ae.alt=H}function O(){const V=this.resume(),H=this.stack[this.stack.length-1];H.url=V}function E(){const V=this.resume(),H=this.stack[this.stack.length-1];H.title=V}function D(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function X(V){const H=this.resume(),ae=this.stack[this.stack.length-1];ae.label=H,ae.identifier=Oi(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function W(V){this.data.characterReferenceType=V.type}function re(V){const H=this.sliceSerialize(V),ae=this.data.characterReferenceType;let be;ae?(be=Kee(H,ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=ZR(H);const Re=this.stack[this.stack.length-1];Re.value+=be}function ne(V){const H=this.stack.pop();H.position.end=kl(V.end)}function le(V){P.call(this,V);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(V)}function ie(V){P.call(this,V);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(V)}function ye(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function oe(){return{type:"heading",depth:0,children:[]}}function se(){return{type:"break"}}function je(){return{type:"html",value:""}}function Ce(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function Ze(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function Ye(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function Zt(){return{type:"paragraph",children:[]}}function Yt(){return{type:"strong",children:[]}}function Nn(){return{type:"text",value:""}}function Z(){return{type:"thematicBreak"}}}function kl(e){return{line:e.line,column:e.column,offset:e.offset}}function ate(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ate(e,r):aZe(e,r)}}function aZe(e,t){let n;for(n in t)if(ste.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function J6(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ig({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ig({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ig({start:t.start,end:t.end})+") is still open")}function iZe(e){const t=this;t.parser=n;function n(r){return rZe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oZe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function lZe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
918`}]}function cZe(e,t){const n=t.value?t.value+`
919`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function uZe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dZe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hZe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Fm(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function fZe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mZe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ite(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const o=a[a.length-1];return o&&o.type==="text"?o.value+=r:a.push({type:"text",value:r}),a}function pZe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ite(e,t);const a={src:Fm(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function gZe(e,t){const n={src:Fm(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function yZe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function xZe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ite(e,t);const a={href:Fm(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function vZe(e,t){const n={href:Fm(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bZe(e,t,n){const r=e.all(t),a=n?wZe(n):ote(t),i={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(a||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
920`}),d.type==="element"&&d.tagName==="p"&&!a?o.push(...d.children):o.push(d)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
921`});const u={type:"element",tagName:"li",properties:i,children:o};
vendor: 4,613 bytes, line 921
921return e.patch(t,u),e.applyData(t,u)}function wZe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ote(n[r])}return t}function ote(e){const t=e.spread;return t??e.children.length>1}function SZe(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const o=r[a];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function jZe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NZe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _Ze(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CZe(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),a.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=GR(t.children[1]),c=Bee(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),a.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function EZe(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const h=t.children[c],f={},m=o?o[c]:void 0;m&&(f.align=m);let y={type:"element",tagName:i,properties:f,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),u.push(y)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function kZe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const eB=9,tB=32;function PZe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(nB(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(nB(t.slice(a),a>0,!1)),i.join("")}function nB(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===eB||i===tB;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===eB||i===tB;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function TZe(e,t){const n={type:"text",value:PZe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function AZe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const OZe={blockquote:oZe,break:lZe,code:cZe,delete:uZe,emphasis:dZe,footnoteReference:hZe,heading:fZe,html:mZe,imageReference:pZe,image:gZe,inlineCode:yZe,linkReference:xZe,link:vZe,listItem:bZe,list:SZe,paragraph:jZe,root:NZe,strong:_Ze,table:CZe,tableCell:kZe,tableRow:EZe,text:TZe,thematicBreak:AZe,toml:lb,yaml:lb,definition:lb,footnoteDefinition:lb};function lb(){}const lte=-1,g1=0,lg=1,Hw=2,eI=3,tI=4,nI=5,rI=6,cte=7,ute=8,rB=typeof self=="object"?self:globalThis,RZe=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,o]=t[a];switch(i){case g1:case lte:return n(o,a);case lg:{const l=n([],a);for(const c of o)l.push(r(c));return l}case Hw:{const l=n({},a);for(const[c,u]of o)l[r(c)]=r(u);return l}case eI:return n(new Date(o),a);case tI:{const{source:l,flags:c}=o;return n(new RegExp(l,c),a)}case nI:{const l=n(new Map,a);for(const[c,u]of o)l.set(r(c),r(u));return l}case rI:{const l=n(new Set,a);for(const c of o)l.add(r(c));return l}case cte:{const{name:l,message:c}=o;return n(new rB[l](c),a)}case ute:return n(BigInt(o),a);case"BigInt":return n(Object(BigInt(o)),a);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new rB[i](o),a)};return r},sB=e=>RZe(new Map,e)(0),Zd="",{toString:IZe}={},{keys:MZe}=Object,pp=e=>{const t=typeof e;if(t!=="object"||!e)return[g1,t];const n=IZe.call(e).slice(8,-1);switch(n){case"Array":return[lg,Zd];case"Object":return[Hw,Zd];case"Date":return[eI,Zd];case"RegExp":return[tI,Zd];case"Map":return[nI,Zd];case"Set":return[rI,Zd];case"DataView":return[lg,n]}return n.includes("Array")?[lg,n]:n.includes("Error")?[cte,n]:[Hw,n]},cb=([e,t])=>e===g1&&(t==="function"||t==="symbol"),DZe=(e,t,n,r)=>{const a=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},i=o=>
vendor: 4,231 bytes, lines 921-923
921{if(n.has(o))return n.get(o);let[l,c]=pp(o);switch(l){case g1:{let d=o;switch(c){case"bigint":l=ute,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return a([lte],o)}return a([l,d],o)}case lg:{if(c){let f=o;return c==="DataView"?f=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(o)),a([c,[...f]],o)}const d=[],h=a([l,d],o);for(const f of o)d.push(i(f));return h}case Hw:{if(c)switch(c){case"BigInt":return a([c,o.toString()],o);case"Boolean":case"Number":case"String":return a([c,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());const d=[],h=a([l,d],o);for(const f of MZe(o))(e||!cb(pp(o[f])))&&d.push([i(f),i(o[f])]);return h}case eI:return a([l,o.toISOString()],o);case tI:{const{source:d,flags:h}=o;return a([l,{source:d,flags:h}],o)}case nI:{const d=[],h=a([l,d],o);for(const[f,m]of o)(e||!(cb(pp(f))||cb(pp(m))))&&d.push([i(f),i(m)]);return h}case rI:{const d=[],h=a([l,d],o);for(const f of o)(e||!cb(pp(f)))&&d.push(i(f));return h}}const{message:u}=o;return a([l,{name:c,message:u}],o)};return i},aB=(e,{json:t,lossy:n}={})=>{const r=[];return DZe(!(t||n),!!t,new Map,r)(e),r},Gw=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?sB(aB(e,t)):structuredClone(e):(e,t)=>sB(aB(e,t));function LZe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function $Ze(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function FZe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||LZe,r=e.options.footnoteBackLabel||$Ze,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),f=Fm(h.toLowerCase());let m=0;const y=[],p=e.footnoteCounts.get(h);for(;p!==void 0&&++m<=p;){y.length>0&&y.push({type:"text",value:" "});let b=typeof n=="string"?n:n(c,m);typeof b=="string"&&(b={type:"text",value:b}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const b=x.children[x.children.length-1];b&&b.type==="text"?b.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...y)}else d.push(...y);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Gw(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
922`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
923`}]}}const Mx=function(e){if(e==null)return qZe;if(typeof e=="function")return y1(e);if(typeof e=="object")return Array.isArray(e)?BZe(e):zZe(e);if(typeof e=="string")return UZe(e);throw new Error("Expected function, string, or object as test")};function BZe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Mx(e[n]);return y1(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function zZe(e){const t=e;return y1(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function UZe(e){return y1(t);function t(n){return n&&n.type===e}}function y1(e){return t;function t(n,r,a){return!!(WZe(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function qZe(){return!0}function WZe(e){return e!==null&&typeof e=="object"&&"type"in e}const dte=[],VZe=!0,bT=!1,HZe="skip";function hte(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Mx(a),o=r?-1:1;l(e,void 0,[])();function l(c,u,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;
vendor: 16,992 bytes, lines 923-927
923Object.defineProperty(f,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=dte,y,p,x;if((!t||i(c,u,d[d.length-1]||void 0))&&(m=GZe(n(c,d)),m[0]===bT))return m;if("children"in c&&c.children){const v=c;if(v.children&&m[0]!==HZe)for(p=(r?v.children.length:-1)+o,x=d.concat(v);p>-1&&p<v.children.length;){const b=v.children[p];if(y=l(b,p,x)(),y[0]===bT)return y;p=typeof y[1]=="number"?y[1]:p+o}}return m}}}function GZe(e){return Array.isArray(e)?e:typeof e=="number"?[VZe,e]:e==null?dte:[e]}function x1(e,t,n,r){let a,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,a=n):(i=t,o=n,a=r),hte(e,i,l,a);function l(c,u){const d=u[u.length-1],h=d?d.children.indexOf(c):void 0;return o(c,h,d)}}const wT={}.hasOwnProperty,KZe={};function YZe(e,t){const n=t||KZe,r=new Map,a=new Map,i=new Map,o={...OZe,...n.handlers},l={all:u,applyData:QZe,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:o,one:c,options:n,patch:XZe,wrap:JZe};return x1(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:a,f=String(d.identifier).toUpperCase();h.has(f)||h.set(f,d)}}),l;function c(d,h){const f=d.type,m=l.handlers[f];if(wT.call(l.handlers,f)&&m)return m(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in d){const{children:p,...x}=d,v=Gw(x);return v.children=l.all(d),v}return Gw(d)}return(l.options.unknownHandler||ZZe)(l,d,h)}function u(d){const h=[];if("children"in d){const f=d.children;let m=-1;for(;++m<f.length;){const y=l.one(f[m],d);if(y){if(m&&f[m-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=iB(y.value)),!Array.isArray(y)&&y.type==="element")){const p=y.children[0];p&&p.type==="text"&&(p.value=iB(p.value))}Array.isArray(y)?h.push(...y):h.push(y)}}}return h}}function XZe(e,t){e.position&&(t.position=$Ye(e))}function QZe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&i&&Object.assign(n.properties,Gw(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function ZZe(e,t){const n=t.data||{},r="value"in t&&!(wT.call(n,"hProperties")||wT.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function JZe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
924`});++r<e.length;)r&&n.push({type:"text",value:`
925`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
926`}),n}function iB(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oB(e,t){const n=YZe(e,t),r=n.one(e,void 0),a=FZe(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
927`},a),i}function eJe(e,t){return e&&"run"in e?async function(n,r){const a=oB(n,{file:r,...t});await e.run(a,r)}:function(n,r){return oB(n,{file:r,...e||t})}}function lB(e){if(e)throw e}var Wb=Object.prototype.hasOwnProperty,fte=Object.prototype.toString,cB=Object.defineProperty,uB=Object.getOwnPropertyDescriptor,dB=function(t){return typeof Array.isArray=="function"?Array.isArray(t):fte.call(t)==="[object Array]"},hB=function(t){if(!t||fte.call(t)!=="[object Object]")return!1;var n=Wb.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Wb.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var a;for(a in t);return typeof a>"u"||Wb.call(t,a)},fB=function(t,n){cB&&n.name==="__proto__"?cB(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},mB=function(t,n){if(n==="__proto__")if(Wb.call(t,n)){if(uB)return uB(t,n).value}else return;return t[n]},tJe=function e(){var t,n,r,a,i,o,l=arguments[0],c=1,u=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=mB(l,n),a=mB(t,n),l!==a&&(d&&a&&(hB(a)||(i=dB(a)))?(i?(i=!1,o=r&&dB(r)?r:[]):o=r&&hB(r)?r:{},fB(l,{name:n,newValue:e(d,o,a)})):typeof a<"u"&&fB(l,{name:n,newValue:a}));return l};const $_=$t(tJe);function ST(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nJe(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const o=a.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...a);function l(c,...u){const d=e[++i];let h=-1;if(c){o(c);return}for(;++h<a.length;)(u[h]===null||u[h]===void 0)&&(u[h]=a[h]);a=u,d?rJe(d,l)(...u):o(null,...u)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function rJe(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(a);try{c=e.apply(this,o)}catch(u){const d=u;if(l&&n)throw d;return a(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(o,...l){n||(n=!0,t(o,...l))}function i(o){a(null,o)}}const Yi={basename:sJe,dirname:aJe,extname:iJe,join:oJe,sep:"/"};function sJe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Dx(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else o<0&&(i=!0,o=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(r=a):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function aJe(e){if(Dx(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function iJe(e){Dx(e);let t=e.length,n=-1,r=0,a=-1,i=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function oJe(...e){let t=-1,n;for(;++t<e.length;)Dx(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":lJe(n)}function lJe(e){Dx(e);const t=e.codePointAt(0)===47;let n=cJe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function cJe(e,t){let n="",r=0,a=-1,i=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(a===o-1||i===1))if(a!==o-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=o,i=0;continue}}else if(n.length>0){n="",r=0,a=o,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),r=o-a-1;a=o,i=0}else l===46&&i>-1?i++:i=-1}return n}function Dx(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uJe={cwd:dJe};function dJe(){return"/"}function jT(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hJe(e){if(typeof e=="string")e=new URL(e);else if(!jT(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fJe(e)}function fJe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const F_=["history","path","basename","stem","extname","dirname"];class mte{constructor(t){let n;t?jT(t)?n={path:t}:typeof t=="string"||mJe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":uJe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<F_.length;){const i=F_[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)F_.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Yi.basename(this.path):void 0}set basename(t){z_(t,"basename"),B_(t,"basename"),this.path=Yi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yi.dirname(this.path):void 0}set dirname(t){pB(this.basename,"dirname"),this.path=Yi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yi.extname(this.path):void 0}set extname(t){if(B_(t,"extname"),pB(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jT(t)&&(t=hJe(t)),z_(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yi.basename(this.path,this.extname):void 0}set stem(t){z_(t,"stem"),B_(t,"stem"),this.path=Yi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new ds(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function B_(e,t){if(e&&e.includes(Yi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yi.sep+"`")}function z_(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pB(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function mJe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pJe=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},gJe={}.hasOwnProperty;class sI extends pJe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=nJe()}copy(){const t=new sI;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($_(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(W_("data",this.frozen),this.namespace[t]=n,this):gJe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(W_("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ub(t),r=this.parser||this.Parser;return U_("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),U_("process",this.parser||this.Parser),q_("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,o){const l=ub(t),c=r.parse(l);r.run(c,l,function(d,h,f){if(d||!h||!f)return u(d);const m=h,y=r.stringify(m,f);vJe(y)?f.value=y:f.result=y,u(d,f)});function u(d,h){d||!h?o(d):i?i(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),U_("processSync",this.parser||this.Parser),q_("processSync",this.compiler||this.Compiler),this.process(t,a),yB("processSync","process",n),r;function a(i,o){n=!0,lB(i),r=o}}run(t,n,r){gB(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(o,l){const c=ub(n);a.run(t,c,u);function u(d,h,f){const m=h||t;d?l(d):o?o(m):r(void 0,m,f)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),yB("runSync","run",r),a;function i(o,l){lB(o),a=l,r=!0}}stringify(t,n){this.freeze();const r=ub(n),a=this.compiler||this.Compiler;return q_("stringify",a),gB(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(W_("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;c(d,h)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(a.settings=$_(!0,a.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];i(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let h=-1,f=-1;for(;++h<r.length;)if(r[h][0]===u){f=h;break}if(f===-1)r.push([u,...d]);else if(d.length>0){let[m,...y]=d;const p=r[f][1];ST(p)&&ST(m)&&(m=$_(!0,p,m)),r[f]=[u,m,...y]}}}}const yJe=new sI().freeze();function U_(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function q_(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function W_(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gB(e){if(!ST(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function yB(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ub(e){return xJe(e)?e:new mte(e)}function xJe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vJe(e){return typeof e=="string"||bJe(e)}function bJe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wJe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xB=[],vB={allowDangerousHtml:!0},SJe=/^(https?|ircs?|mailto|xmpp)$/i,jJe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function pte(e){const t=NJe(e),n=_Je(e);return CJe(t.runSync(t.parse(n),n),e)}function NJe(e){const t=e.rehypePlugins||xB,n=e.remarkPlugins||xB,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vB}:vB;return yJe().use(iZe).use(n).use(eJe,r).use(t)}function _Je(e){const t=e.children||"",n=new mte;return typeof t=="string"&&(n.value=t),n}function CJe(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||EJe;for(const d of jJe)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+wJe+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),x1(e,u),qYe(e,{Fragment:s.Fragment,components:a,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(d,h,f){if(d.type==="raw"&&f&&typeof h=="number")return o?f.children.splice(h,1):f.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let m;
927for(m in M_)if(Object.hasOwn(M_,m)&&Object.hasOwn(d.properties,m)){const y=d.properties[m],p=M_[m];(p===null||p.includes(d.tagName))&&(d.properties[m]=c(String(y||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(d,h,f)),m&&f&&typeof h=="number")return l&&d.children?f.children.splice(h,1,...d.children):f.children.splice(h,1),h}}}function EJe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||SJe.test(e.slice(0,t))?e:""}const kJe=({content:e,companiesInContext:t=[]})=>{const n=z.useMemo(()=>{const r=new Map;return t.forEach(a=>{a.name&&r.set(a.name.toLowerCase(),a)}),r},[t]);return s.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:s.jsx(pte,{components:{p:({children:r})=>{const a=z.Children.map(r,i=>typeof i=="string"?bB(i,n):i);return s.jsx("p",{className:"mb-2 last:mb-0 leading-relaxed",children:a})},ul:({children:r})=>s.jsx("ul",{className:"list-disc pl-5 mb-3 space-y-1",children:r}),ol:({children:r})=>s.jsx("ol",{className:"list-decimal pl-5 mb-3 space-y-1",children:r}),li:({children:r})=>{const a=z.Children.map(r,i=>typeof i=="string"?bB(i,n):i);return s.jsx("li",{className:"mb-1",children:a})},strong:({children:r})=>s.jsx("strong",{className:"font-semibold text-foreground",children:r}),em:({children:r})=>s.jsx("em",{className:"italic text-foreground/90",children:r}),code:({children:r})=>s.jsx("code",{className:"px-1.5 py-0.5 rounded bg-muted text-sm font-mono text-foreground",children:r}),h1:({children:r})=>s.jsx("h1",{className:"text-xl font-bold mb-2 mt-4",children:r}),h2:({children:r})=>s.jsx("h2",{className:"text-lg font-bold mb-2 mt-3",children:r}),h3:({children:r})=>s.jsx("h3",{className:"text-base font-semibold mb-2 mt-2",children:r}),blockquote:({children:r})=>s.jsx("blockquote",{className:"border-l-4 border-primary/30 pl-4 py-2 my-2 italic bg-muted/30 rounded-r",children:r}),a:({href:r,children:a})=>s.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline underline-offset-2 inline-flex items-center gap-1 transition-colors",children:[a,s.jsx(ar,{className:"w-3 h-3"})]})},children:e})})},bB=(e,t)=>{if(t.size===0)return e;const n=Array.from(t.keys()).sort((o,l)=>l.length-o.length);let r=[],a=e,i=0;for(;a.length>0;){let o=!1,l=a.length,c="",u=null;for(const d of n){const h=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i"),f=a.match(h);f&&f.index!==void 0&&f.index<l&&(l=f.index,c=f[0],u=t.get(d),o=!0)}if(o&&u)l>0&&r.push(a.slice(0,l)),r.push(s.jsxs(ee,{to:`/companies?search=${encodeURIComponent(u.domain||u.name)}`,className:"inline-flex items-center gap-1 text-primary font-medium hover:text-primary/80 hover:underline transition-colors px-1 py-0.5 rounded bg-primary/5",onClick:d=>d.stopPropagation(),children:[s.jsx(tt,{className:"w-3 h-3"}),c]},`company-link-${u.id}-${i++}`)),a=a.slice(l+c.length);else{r.push(a);break}}return r.length>0?r:e},PJe=({content:e,companies:t=[]})=>{const[n,r]=z.useState(!1),{toast:a}=Ve(),i=async()=>{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3),a({title:"Copied to clipboard",duration:2e3})},o=()=>{const c=new Blob([e],{type:"text/plain"}),u=URL.createObjectURL(c),d=document.createElement("a");d.href=u,d.download=`slaygent-response-${Date.now()}.txt`,d.click(),URL.revokeObjectURL(u),a({title:"Response exported",duration:2e3})},l=async()=>{if(navigator.share)try{await navigator.share({title:"Slaygent AI Response",text:e})}catch(c){console.error("Error sharing:",c)}else i()};return s.jsxs("div",{className:"flex items-center gap-1 mt-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(U,{variant:"ghost",size:"sm",onClick:i,className:"h-7 px-2 text-xs",children:n?s.jsxs(s.Fragment,{children:[s.jsx(Ko,{className:"w-3 h-3 mr-1"}),"Copied"]}):s.jsxs(s.Fragment,{children:[s.jsx(RA,{className:"w-3 h-3 mr-1"}),"Copy"]})}),t.length>0&&s.jsxs(U,{variant:"ghost",size:"sm",onClick:o,className:"h-7 px-2 text-xs",children:[s.jsx(Ka,{className:"w-3 h-3 mr-1"}),"Export"]}),s.jsxs(U,{variant:"ghost",size:"sm",onClick:l,className:"h-7 px-2 text-xs",children:[s.jsx(ex,{className:"w-3 h-3 mr-1"}),"Share"]})]})},TJe=({companiesInContext:e,onExport:t})=>{if(e.length===0)return null;const n=Array.from(new Map(e.map(r=>[r.id||r.name,r])).values()).slice(0,5);return s.jsxs(Y,{className:"w-80 h-fit sticky top-4",children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(Se,{className:"text-sm flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),"Companies in Context"]})}),s.jsxs(te,{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[s.jsxs("span",{children:[e.length," companies analyzed"]}),s.jsxs(fe,{variant:"secondary",className:"text-xs",children:[s.jsx(rl,{className:"w-3 h-3 mr-1"}),"AI Matched"]})]}),s.jsx("div",{className:"space-y-2",children:n.map((r,a)=>s.jsx(ee,{to:`/companies?search=${encodeURIComponent(r.domain||r.name)}`,className:"block p-2 rounded-lg border border-border hover:bg-accent transition-colors group",children:s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate group-hover:text-primary transition-colors",children:r.name}),r.industry&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r.industry})]}),s.jsx(ar,{className:"w-3 h-3 text-muted-foreground flex-shrink-0 mt-0.5"})]})},r.id||a))}),e.length>5&&s.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["+",e.length-5," more companies"]}),s.jsxs(U,{onClick:t,className:"w-full",variant:"outline",size:"sm",children:[s.jsx(Ka,{className:"w-4 h-4 mr-2"}),"Export All Companies"]})]})]})},AJe=[{icon:s.jsx(ze,{className:"w-5 h-5"}),title:"High-Growth Prospects",prompt:"Show me companies that recently raised Series B funding and are hiring aggressively in the tech sector",category:"Growth",color:"text-green-600 bg-green-50"},{icon:s.jsx(tn,{className:"w-5 h-5"}),title:"Ideal Customer Profile",prompt:"Find SaaS companies with 50-200 employees that need better SEO and have high website traffic but low conversions",category:"Targeting",color:"text-blue-600 bg-blue-50"},{icon:s.jsx(Ba,{className:"w-5 h-5"}),title:"Sales Triggers",prompt:"Identify companies that just hired a new CMO and have increased their marketing budget",category:"Sales Intel",color:"text-purple-600 bg-purple-50"},{icon:s.jsx(Fn,{className:"w-5 h-5"}),title:"Recent Funding",prompt:"Find companies that raised funding in the last 3 months and are likely to invest in marketing",category:"Funding",color:"text-yellow-600 bg-yellow-50"},{icon:s.jsx(Dn,{className:"w-5 h-5"}),title:"Market Expansion",prompt:"Analyze companies in the fintech space that are expanding to new geographic markets",category:"Expansion",color:"text-indigo-600 bg-indigo-50"},{icon:s.jsx(At,{className:"w-5 h-5"}),title:"Hiring Spree",prompt:"Show me companies with 50+ open positions in sales and marketing roles",category:"Hiring",color:"text-pink-600 bg-pink-50"},{icon:s.jsx(st,{className:"w-5 h-5"}),title:"Competitor Analysis",prompt:"Compare top 3 companies in the marketing automation space by their tech stack and funding",category:"Research",color:"text-orange-600 bg-orange-50"},{icon:s.jsx(rl,{className:"w-5 h-5"}),title:"Service Match",prompt:"Find companies with poor SEO metrics but strong product offerings that could benefit from digital marketing services",category:"Matching",color:"text-cyan-600 bg-cyan-50"},{icon:s.jsx(Tn,{className:"w-5 h-5"}),title:"Quick Wins",prompt:"Identify companies with strong product-market fit but low online visibility",category:"Opportunity",color:"text-red-600 bg-red-50"},{icon:s.jsx(v0,{className:"w-5 h-5"}
927),title:"Partnership Opportunities",prompt:"Find companies that recently announced strategic partnerships in my industry",category:"Partnerships",color:"text-teal-600 bg-teal-50"}],OJe=({onSelectTemplate:e})=>s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:AJe.map((t,n)=>s.jsx(Y,{onClick:()=>e(t.prompt),className:"cursor-pointer hover:shadow-lg hover:border-primary/50 transition-all duration-200 group",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:`p-2.5 rounded-lg ${t.color} group-hover:scale-110 transition-transform`,children:t.icon}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("h4",{className:"font-semibold text-sm truncate",children:t.title}),s.jsx(fe,{variant:"secondary",className:"text-xs",children:t.category})]}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:t.prompt})]})]})})},n))}),RJe=()=>{const[e,t]=g.useState([{id:"1",role:"assistant",content:"Hello! I'm your AI assistant. I can help you with questions about business development, sales strategies, marketing, and more. How can I assist you today?",timestamp:new Date}]),[n,r]=g.useState(""),[a,i]=g.useState(!1),[o,l]=g.useState(null),[c,u]=g.useState([]),d=g.useRef(null),{toast:h}=Ve(),f=()=>{var x;(x=d.current)==null||x.scrollIntoView({behavior:"smooth"})};g.useEffect(()=>{f()},[e]);const m=x=>{r(x);const v=document.querySelector('input[type="text"]');v==null||v.focus()},y=()=>{if(c.length===0){h({title:"No companies to export",description:"Ask a question first to get company data.",variant:"destructive"});return}const x=[["Company Name","Domain","Industry","Employee Count","Location"],...c.map(S=>[S.name||"",S.domain||"",S.industry||"",S.employee_count||"",S.hq_location||""])].map(S=>S.join(",")).join(`
928`),v=new Blob([x],{type:"text/csv"}),b=URL.createObjectURL(v),w=document.createElement("a");w.href=b,w.download=`slaygent-companies-${Date.now()}.csv`,w.click(),URL.revokeObjectURL(b),h({title:"Companies exported",description:`Exported ${c.length} companies to CSV`})},p=async(x,v)=>{x.preventDefault();const b=n.trim();if(!b||a)return;const w={id:Date.now().toString(),role:"user",content:b,timestamp:new Date};t(S=>[...S,w]),r(""),i(!0);try{const{data:{session:S}}=await K.auth.getSession();if(!S)throw new Error("Please sign in to use the chat feature");console.log("Parsing query intent...");const j=ob.parseQuery(b);console.log("Query intent:",j);const N=R_.generateKey(j);let C=R_.get(N);C?console.log(`Using cached data: ${C.length} companies`):(console.log("Fetching companies from database..."),C=await ob.fetchRelevantCompanies(j),console.log(`Fetched ${C.length} companies`),j.tables.includes("signals_feed")&&(console.log("Enriching with signals data..."),C=await ob.enrichWithSignals(C)),R_.set(N,C)),u(C);const _=e.filter(I=>I.role==="assistant").flatMap(I=>ob.extractCompanyNames(I.content));console.log("Previously mentioned companies:",_);const{data:A,error:P}=await K.functions.invoke("chat-ai",{body:{query:b,companies:C,conversationHistory:e.slice(-10),previousCompanies:_,queryIntent:j},headers:{Authorization:`Bearer ${S.access_token}`}});if(P)throw P;const R={id:(Date.now()+1).toString(),role:"assistant",content:A.response||"I apologize, but I encountered an error processing your request.",timestamp:new Date,using_byok:A.using_byok||!1,service_used:A.service_used||"DeepSeek"};l({using_byok:A.using_byok||!1,service_used:A.service_used||"DeepSeek"}),t(I=>[...I,R])}catch(S){console.error("Chat error:",S),h({title:"Error",description:S instanceof Error?S.message:"Failed to get response from AI assistant",variant:"destructive"})}finally{i(!1)}};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-background via-background to-muted/20",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-20 px-4 sm:px-6 lg:px-8 pb-8",children:s.jsxs("div",{className:"max-w-[1600px] mx-auto",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-3",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-xl",children:s.jsx(va,{className:"w-6 h-6 text-primary"})}),s.jsx("h1",{className:"text-3xl font-bold bg-gradient-to-r from-foreground to-foreground
928/70 bg-clip-text text-transparent",children:"Slaygent AI Assistant"})]}),s.jsxs("p",{className:"text-base text-muted-foreground max-w-2xl mx-auto",children:["AI-powered business intelligence for sales and marketing teams",(o==null?void 0:o.using_byok)&&s.jsxs(fe,{variant:"outline",className:"ml-2 bg-green-50 text-green-700 border-green-200",children:[s.jsx(pf,{className:"w-3 h-3 mr-1"}),"BYOK Active"]})]}),o&&!o.using_byok&&s.jsxs(fe,{variant:"secondary",className:"mt-2",children:[s.jsx(Tn,{className:"w-3 h-3 mr-1"}),"Powered by ",o.service_used]})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsxs(Y,{className:"flex-1 flex flex-col bg-card/80 backdrop-blur-sm border-border/60 shadow-lg",children:[s.jsx(te,{className:"flex-1 overflow-y-auto p-6 space-y-4",children:e.length===1?s.jsxs("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 bg-gradient-to-br from-primary/20 to-primary/5 rounded-2xl mb-4 shadow-lg",children:s.jsx(rl,{className:"w-10 h-10 text-primary"})}),s.jsx("h2",{className:"text-3xl font-bold mb-3 bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent",children:"Welcome to Slaygent AI"}),s.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto text-lg",children:"Your intelligent co-pilot for prospecting, lead generation, and competitive intelligence."})]}),s.jsxs("div",{className:"w-full mb-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Sales & Marketing Templates"}),s.jsxs(fe,{variant:"secondary",className:"text-xs",children:[s.jsx(rl,{className:"w-3 h-3 mr-1"}),"AI-Powered"]})]}),s.jsx(OJe,{onSelectTemplate:m})]})]}):s.jsxs(s.Fragment,{children:[e.map(x=>s.jsxs("div",{className:`flex gap-4 ${x.role==="user"?"justify-end":"justify-start"} group`,children:[x.role==="assistant"&&s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(hE,{className:"w-5 h-5 text-primary"})})}),s.jsx("div",{className:`max-w-[75%] rounded-2xl px-4 py-3 ${x.role==="user"?"bg-primary text-primary-foreground shadow-md":"bg-muted/50 border border-border/50"}`,children:x.role==="assistant"?s.jsxs("div",{className:"space-y-2",children:[s.jsx(kJe,{content:x.content,companiesInContext:c}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[x.using_byok&&s.jsxs(fe,{variant:"outline",className:"text-xs bg-green-50 text-green-700 border-green-200",children:[s.jsx(pf,{className:"w-3 h-3 mr-1"}),"BYOK"]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[x.timestamp.toLocaleTimeString(),x.service_used&&!x.using_byok&&s.jsxs("span",{className:"ml-2",children:["• ",x.service_used]})]})]}),s.jsx(PJe,{content:x.content,companies:c})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",children:x.content}),s.jsx("span",{className:"text-xs opacity-80 block",children:x.timestamp.toLocaleTimeString()})]})}),x.role==="user"&&s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground",children:s.jsx(Ti,{className:"w-5 h-5"})})})]},x.id)),a&&s.jsxs("div",{className:"flex gap-4 justify-start",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(hE,{className:"w-5 h-5 text-primary"})})}),s.jsx("div",{className:"bg-muted/50 border border-border/50 rounded-2xl px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Pt,{className:"w-4 h-4 animate-spin text-primary"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Analyzing ",c.length>0?`${c.length} companies`:"your query","..."]})]})})]}),s.jsx("div",{ref:d})]})}),s.jsxs("div",{className:"border-t bg-background/50 p-4",children:[s.jsxs("form",{onSubmit:x=>p(x),className:"flex gap-3",children:[s.jsx(at,{value:n,onChange:x=>r(x.target.value),placeholder:"Ask about companies, prospects, market intelligence...",disabled:a,className:"flex-1 h-11 px-4 roun
928ded-xl border-border/60 focus-visible:ring-primary/20"}),s.jsx(U,{type:"submit",disabled:a||!n.trim(),className:"h-11 px-6 rounded-xl shadow-md hover:shadow-lg transition-shadow",size:"lg",children:a?s.jsx(Pt,{className:"w-5 h-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(TS,{className:"w-5 h-5 mr-2"}),"Send"]})})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 text-center",children:"Powered by advanced AI • Real-time company data • Sales intelligence"})]})]}),s.jsx(TJe,{companiesInContext:c,onExport:y})]})]})})]})},IJe=()=>s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsxs("div",{className:"pt-32 pb-16",children:[s.jsxs("div",{className:"text-center mb-12 px-6",children:[s.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Choose Your Plan"}),s.jsx("p",{className:"text-xl text-gray-600",children:"Get the intelligence tools you need to accelerate your business growth"})]}),s.jsx(BK,{}),s.jsx("div",{className:"mt-16",children:s.jsx(FK,{})})]})]}),MJe=pd("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Cs=g.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:ve(MJe({variant:t}),e),...n}));Cs.displayName="Alert";const DJe=g.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:ve("mb-1 font-medium leading-none tracking-tight",e),...t}));DJe.displayName="AlertTitle";const Es=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ve("text-sm [&_p]:leading-relaxed",e),...t}));Es.displayName="AlertDescription";const LJe=["0-mail.com","0815.ru","0clickemail.com","10mail.org","10minemail.com","10minutemail.com","123-m.com","1pad.de","20email.eu","20mail.in","20mail.it","21cn.com","2prong.com","30minutemail.com","33mail.com","3d-painting.com","4warding.com","4warding.net","4warding.org","60minutemail.com","6ip.us","75hosting.com","75hosting.net","75hosting.org","7tags.com","9ox.net","a-bc.net","addy.io","afrobacon.com","ajaxapp.net","amilegit.com","anonaddy.com","anonbox.net","anonymbox.com","antichef.com","antispam.de","aol.com","bareed.ws","binkmail.com","bio-muesli.net","bk.ru","bobmail.info","bofthew.com","bol.com.br","brefmail.com","brennendesreich.de","bsnow.net","bugmenot.com","bumpymail.com","byom.de","c2.hu","card.zp.ua","casualdx.com","centermail.com","centermail.net","chogmail.com","choicemail1.com","clrmail.com","cmail.net","cock.email","cool.fr.nf","correo.blogos.net","dispostable.com","docomo.ne.jp","easytrashmail.com","email.com","emailondeck.com","emailtemp.org","ezweb.ne.jp","fakeinbox.com","fakemailbox.com","fastmail.com","fastmail.fm","freenet.de","getnada.com","gmail.com","gmx.com","gmx.net","guerrillamail.com","harakirimail.com","hotmail.com","hushmail.com","icloud.com","ig.com.br","inbox.com","inbox.ru","inboxalias.com","inboxbear.com","inboxkitten.com","indiatimes.com","juno.com","keemail.me","laposte.net","list.ru","live.com","mac.com","mail.com","mail.ru","mail2world.com","mailcatch.com","maildrop.cc","mailinator.com","mailna.co","mailna.me","mailnesia.com","mailsac.com","mailsac.me","me.com","mintemail.com","moakt.com","mohmal.com","msn.com","mytemp.email","mytempmail.com","myway.com","nada.ltd","netzero.com","neverbox.com","openmailbox.org","orange.fr","outlook.com","owlymail.com","pm.me","protonmail.com","rediffmail.com","rocketmail.com","runbox.com","sharklasers.com","shortmail.com","sify.com","simplelogin.co","slmail.me","spambog.com","spambog.de","spambog.ru","spamgourmet.com","t-online.de","temp-mail.org","tempail.com","tempmail.lol","tempmail.plus","terra.com.br","throwawaymail.com","tmail.io","tmail.ws","trashmail.com","trashmail.net","tutanota.com","uol.com.br","usa.com","voila.fr","web.de","yahoo.co.jp","yahoo.com","yandex.com","yandex.ru","ymail.com","yopmail.com","yopmail.fr","zoho.com","zombie-mail.com","eagereverest.com"],$Je=()=>{const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(""),[d,h]=g.useState(!1),[f,m]=g.useState(""),[y,p]=g.useState(""),[x,v]=g.useState(""),[b,w]=g.useState(!1),{user:S,signIn:j,signUp:N}=Ie(),C=cs(),[_]=yd(),A=_.get("tab")||"signin";g.useEffect(()=>{const O=_.get("access_token"),E=_.get("refresh_token");_.get("type")==="recovery"&&O&&E&&l(!0)},[_]),g.useEffect(()=>{S&&!o&&C("/")}
928,[S,C,o]);const[P,R]=g.useState({email:"",password:""}),[I,B]=g.useState({email:"",password:"",confirmPassword:"",fullName:""}),$=O=>{var D;const E=(D=O.split("@")[1])==null?void 0:D.toLowerCase();return E?!LJe.includes(E):!1},q=async O=>{O.preventDefault(),r(!0);const{error:E}=await j(P.email,P.password);E||C("/"),r(!1)},L=async O=>{if(O.preventDefault(),r(!0),m(""),I.password!==I.confirmPassword){r(!1);return}if(!$(I.email)){m("Please use your business email address. Generic email providers are not allowed."),r(!1);return}const{error:E}=await N(I.email,I.password,I.fullName);E||B({email:"",password:"",confirmPassword:"",fullName:""}),r(!1)},k=async O=>{O.preventDefault(),r(!0);try{const{error:E}=await K.auth.resetPasswordForEmail(c,{redirectTo:`${window.location.origin}/reset-password`});E&&console.error("Password reset error:",E),h(!0)}catch(E){console.error("Password reset error:",E),h(!0)}r(!1)},T=async O=>{if(O.preventDefault(),r(!0),y!==x){r(!1);return}try{const{error:E}=await K.auth.updateUser({password:y});E?console.error("Password update error:",E):(w(!0),setTimeout(()=>{C("/dashboard")},2e3))}catch(E){console.error("Password update error:",E)}r(!1)},F=(O,E=!1)=>{E?(B(D=>({...D,email:O})),m(""),O&&O.includes("@")&&($(O)||m("Please use your business email address. Generic email providers are not allowed."))):R(D=>({...D,email:O}))};return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-md mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs(U,{variant:"outline",onClick:()=>C("/"),className:"mb-6",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"Back to Home"]}),s.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"rgb(234, 85, 43)"},children:"Welcome to Slay"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Sign in to your account or create a new one"}),s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 text-sm text-blue-800",children:[s.jsx("p",{className:"font-medium mb-2",children:"🎉 Free Account Benefits:"}),s.jsxs("ul",{className:"text-left space-y-1",children:[s.jsx("li",{children:"• View up to 10 company profiles daily"}),s.jsx("li",{children:"• Scrape up to 5 domains daily"}),s.jsx("li",{children:"• 10 Slaygent chat queries daily"}),s.jsx("li",{children:"• Usage resets every day at midnight"})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{className:"text-center",children:"Authentication"})}),s.jsx(te,{children:o?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Set New Password"}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Enter your new password below."})]}),b?s.jsxs(Cs,{children:[s.jsx(ks,{className:"h-4 w-4"}),s.jsx(Es,{children:"Password updated successfully! Redirecting to dashboard..."})]}):s.jsxs("form",{onSubmit:T,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"new-password",children:"New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"new-password",type:e?"text":"password",placeholder:"Enter new password",value:y,onChange:O=>p(O.target.value),required:!0}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>t(!e),children:e?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"confirm-new-password",children:"Confirm New Password"}),s.jsx(at,{id:"confirm-new-password",type:e?"text":"password",placeholder:"Confirm new password",value:x,onChange:O=>v(O.target.value),required:!0})]}),y&&x&&y!==x&&s.jsx("p",{className:"text-sm text-red-600",children:"Passwords do not match"}),s.jsx(U,{type:"submit",className:"w-full",style:{backgroundColor:"rgb(234, 85, 43)"},disabled:n||y!==x,children:n?"Updating Password...":"Update Password"})]})]}):a?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Reset Your Password"}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Enter your email address and we'll send you a link to reset your password."})]}),d?s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Cs,{children:[s.jsx(ks,{className:"h-4 w-4"}),s.jsx(Es,{children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"Email sent!"}),s.jsx("p",{children:"If a user account is associated with this email address, you will receive a reset link. The reset link will be valid for 10 minutes."}),s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"font-semibold mb-2",children:"Don't see an email?"}),s.jsxs("ul",{className:"text-sm space-y-1 list-disc list-inside",children:[s.jsx("li",{children:"Check your spam folder for an email from [email protected]"}),s.jsx("li",{children:"Try a different login email"}),s.jsx("li",{children:"Still no email? Contact Support at [email protected]"})]})]})]})})]}),s.jsx(U,{type:"button",variant:"ghost",className:"w-full",onClick:()=>{i(!1),h(!1),u("")},children:"Back to Sign In"})]}):s.jsxs("form",{onSubmit:k,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"reset-email",children:"Email Address"}),s.jsx(at,{id:"reset-email",type:"email",placeholder:"Enter your email",value:c,onChange:O=>u(O.target.value),required:!0})]}),s.jsx(U,{type:"submit",className:"w-full",style:{backgroundColor:"rgb(234, 85, 43)"},disabled:n,children:n?"Sending...":s.jsxs(s.Fragment,{children:[s.jsx(_a,{className:"w-4 h-4 mr-2"}),"Send Reset Link"]})}),s.jsx(U,{type:"button",variant:"ghost",className:"w-full",onClick:()=>i(!1),children:"Back to Sign In"})]})]}):s.jsxs(_o,{defaultValue:A,className:"w-full",children:[s.jsxs(Fi,{className:"grid w-full grid-cols-2",children:[s.jsx(yt,{value:"signin",children:"Sign In"}),s.jsx(yt,{value:"signup",children:"Sign Up"})]}),s.jsx(nn,{value:"signin",children:s.jsxs("form",{onSubmit:q,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signin-email",children:"Business Email"}),s.jsx(at,{id:"signin-email",type:"email",placeholder:"Enter your business email",value:P.email,onChange:O=>F(O.target.value,!1),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signin-password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"signin-password",type:e?"text":"password",placeholder:"Enter your password",value:P.password,onChange:O=>R(E=>({...E,password:O.target.value})),required:!0}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>t(!e),children:e?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsx("div",{className:"text-right",children:s.jsx(U,{type:"button",variant:"link",className:"text-sm p-0 h-auto",onClick:()=>i(!0),style:{color:"rgb(234, 85, 43)"},children:"Forgot your password?"})}),s.jsx(U,{type:"submit",className:"w-full text-white",style:{backgroundColor:"rgb(234, 85, 43)"},disabled:n,children:n?"Signing in...":s.jsxs(s.Fragment,{children:[s.jsx(IA,{className:"w-4 h-4 mr-2"}),"Sign In"]})})]})}),s.jsx(nn,{value:"signup",children:s.jsxs("form",{onSubmit:L,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-name",children:"Full Name"}),s.jsx(at,{id:"signup-name",type:"text",placeholder:"Enter your full name",value:I.fullName,onChange:O=>B(E=>({...E,fullName:O.target.value})),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-email",children:"Business Email"}),s.jsx(at,{id:"signup-email",type:"email",placeholder:"Enter your business email (company domains only)",value:I.email,onChange:O=>F(O.target.value,!0),required:!0}),f&&s.jsxs(Cs,{variant:"destructive",children:[s.jsx(Gs,{className:"h-4 w-4"}),s.jsx(Es,{children:f})]}),s.jsx("p",{className:"text-xs text-gray-500",children:"Only company domains accepted"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"signup-password",type:e?"text":"password",placeholder:"Create a password",value:I.password,onChange:O=>B(E=>({...E,password:O.target.value})),required:!0}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>t(!e),children:e?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"signup-confirm",children:"Confirm Password"}),s.jsx(at,{id:"signup-confirm",type:e?"text":"password",placeholder:"Confirm your password",value:I.confirmPassword,onChange:O=>B(E=>({...E,confirmPassword:O.target.value})),required:!0})]}),I.password&&I.confirmPassword&&I.password!==I.confirmPassword&&s.jsx("p",{className:"text-sm text-red-600",children:"Passwords do not match"}),s.jsx(U,{type:"submit",className:"w-full text-white",style:{backgroundColor:"rgb(234, 85, 43)"},disabled:n||I.password!==I.confirmPassword||!!f,children:n?"Creating account...":s.jsxs(s.Fragment,{children:[s.jsx(n9,{className:"w-4 h-4 mr-2"}),"Create Account"]})}),s.jsx("p",{className:"text-xs text-gray-500 text-center mt-4",children:"By registering, you agree to the Terms of Service and Privacy Policy"})]})})]})})]})]})})]})};
928function FJe(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];function u(h){const{scope:f,children:m,...y}=h,p=(f==null?void 0:f[e][c])||l,x=g.useMemo(()=>y,Object.values(y));return s.jsx(p.Provider,{value:x,children:m})}function d(h,f){const m=(f==null?void 0:f[e][c])||l,y=g.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,BJe(a,...t)]}function BJe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var aI="Progress",iI=100,[zJe,hht]=FJe(aI),[UJe,qJe]=zJe(aI),gte=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:i=WJe,...o}=e;(a||a===0)&&!wB(a)&&console.error(VJe(`${a}`,"Progress"));const l=wB(a)?a:iI;r!==null&&!SB(r,l)&&console.error(HJe(`${r}`,"Progress"));const c=SB(r,l)?r:null,u=Kw(c)?i(c,l):void 0;return s.jsx(UJe,{scope:n,value:c,max:l,children:s.jsx(Te.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Kw(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":vte(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});gte.displayName=aI;var yte="ProgressIndicator",xte=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=qJe(yte,n);return s.jsx(Te.div,{"data-state":vte(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});xte.displayName=yte;function WJe(e,t){return`${Math.round(e/t*100)}%`}function vte(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Kw(e){return typeof e=="number"}function wB(e){return Kw(e)&&!isNaN(e)&&e>0}function SB(e,t){return Kw(e)&&!isNaN(e)&&e<=t&&e>=0}function VJe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${iI}\`.`}function HJe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
929  - a positive number
930  - less than the value passed to \`max\` (or ${iI} if no \`max\` prop is set)
931  - \`null\` or \`undefined\` if the progress is indeterminate.
932
933Defaulting to \`null\`.`}var bte=gte,GJe=xte;const ur=g.forwardRef(({className:e,value:t,...n},r)=>s.jsx(bte,{ref:r,className:ve("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:s.jsx(GJe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ur.displayName=bte.displayName;const cg=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:n,className:ve("w-full caption-bottom text-sm",e),...t})}));cg.displayName="Table";const ug=g.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:ve("[&_tr]:border-b",e),...t}));ug.displayName="TableHeader";const dg=g.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:ve("[&_tr:last-child]:border-0",e),...t}));dg.displayName="TableBody";const KJe=g.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:ve("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));KJe.displayName="TableFooter";const Fo=g.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:ve("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Fo.displayName="TableRow";const Zn=g.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:ve("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Zn.displayName="TableHead";const Jn=g.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:ve("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Jn.displayName="TableCell";const YJe=g.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:ve("mt-4 text-sm text-muted-foreground",e),...t}));YJe.displayName="TableCaption";const XJe=()=>{const{isAdmin:e}=Ie(),{toast:t}=Ve(),[n,r]=g.useState([]),[a,i]=g.useState([]),[o,l]=g.useState([]),[c,u]=g.useState(""),[d,h]=g.useState(!0);g.useEffect(()=>{e&&f()},[e]);const f=async()=>{try{h(!0);const{data:S,error:j}=await K.from("scraping_logs").select("*").order("scraped_at",{ascending:!1}).limit(100);
933j?console.error("Error fetching scraping logs:",j):r(S||[]);const{data:N,error:C}=await K.from("company_views_logs").select("*").order("viewed_at",{ascending:!1}).limit(100);C?console.error("Error fetching company view logs:",C):i(N||[]);const{data:_,error:A}=await K.from("subscribers").select("*").order("created_at",{ascending:!1});A?console.error("Error fetching users:",A):l(_||[])}catch(S){console.error("Error fetching admin data:",S),t({title:"Error",description:"Failed to fetch admin data.",variant:"destructive"})}finally{h(!1)}};if(!e)return s.jsx(Y,{children:s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(Ya,{className:"w-16 h-16 mx-auto text-gray-400 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Access Denied"}),s.jsx("p",{className:"text-gray-600",children:"You need admin privileges to access this dashboard."})]})});const m=o.filter(S=>S.email.toLowerCase().includes(c.toLowerCase())),y=n.filter(S=>S.domain.toLowerCase().includes(c.toLowerCase())),p=a.filter(S=>S.company_name.toLowerCase().includes(c.toLowerCase())),x=o.length,v=o.filter(S=>S.subscribed).length,b=n.length,w=a.length;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[s.jsx(Ya,{className:"w-6 h-6 text-blue-600"}),s.jsx("h1",{className:"text-2xl font-bold",children:"Admin Dashboard"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(Y,{children:s.jsxs(te,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(At,{className:"w-4 h-4 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Total Users"})]}),s.jsx("p",{className:"text-2xl font-bold mt-2",children:x})]})}),s.jsx(Y,{children:s.jsxs(te,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ya,{className:"w-4 h-4 text-green-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Subscribed Users"})]}),s.jsx("p",{className:"text-2xl font-bold mt-2",children:v})]})}),s.jsx(Y,{children:s.jsxs(te,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"w-4 h-4 text-purple-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Total Scrapes"})]}),s.jsx("p",{className:"text-2xl font-bold mt-2",children:b})]})}),s.jsx(Y,{children:s.jsxs(te,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(zr,{className:"w-4 h-4 text-orange-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Company Views"})]}),s.jsx("p",{className:"text-2xl font-bold mt-2",children:w})]})})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4 text-gray-500"}),s.jsx(at,{placeholder:"Search users, domains, or companies...",value:c,onChange:S=>u(S.target.value),className:"max-w-md"}),s.jsxs(U,{onClick:f,variant:"outline",children:[s.jsx(Br,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),s.jsxs(_o,{defaultValue:"users",children:[s.jsxs(Fi,{children:[s.jsx(yt,{value:"users",children:"Users"}),s.jsx(yt,{value:"scraping",children:"Scraping Logs"}),s.jsx(yt,{value:"company-views",children:"Company Views"})]}),s.jsx(nn,{value:"users",children:s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"User Management"})}),s.jsx(te,{children:s.jsxs(cg,{children:[s.jsx(ug,{children:s.jsxs(Fo,{children:[s.jsx(Zn,{children:"Email"}),s.jsx(Zn,{children:"Status"}),s.jsx(Zn,{children:"Tier"}),s.jsx(Zn,{children:"Daily Scrapes"}),s.jsx(Zn,{children:"Daily Views"}),s.jsx(Zn,{children:"Chat Usage"}),s.jsx(Zn,{children:"Joined"})]})}),s.jsx(dg,{children:m.map(S=>s.jsxs(Fo,{children:[s.jsx(Jn,{className:"font-medium",children:S.email}),s.jsx(Jn,{children:s.jsx(fe,{variant:S.subscribed?"default":"secondary",children:S.subscribed?"Premium":"Free"})}),s.jsx(Jn,{children:s.jsx(fe,{variant:"outline",children:S.subscription_tier||"free"})}),s.jsxs(Jn,{children:[S.daily_scrapes_count,"/5"]}),s.jsxs(Jn,{children:[S.daily_profiles_viewed,"/10"]}),s.jsxs(Jn,{children:[S.usage_count,"/",S.usage_limit]}),s.jsx(Jn,{children:new Date(S.created_at).toLocaleDateString()})]},S.id))})]})})]})}),s.jsx(nn,{value:"scraping",children:s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Scraping Activity"})}),s.jsx(te,{children:s.jsxs(cg,{children:[s.jsx(ug,{children:s.jsxs(Fo,{children:[s.jsx(Zn,{children:"User ID"}),s.jsx(Zn,{children:"Domain"}),s.jsx(Zn,{children:"Status"}),s.jsx(Zn,{children:"Error"}),s.jsx(Zn,{children:"Timestamp"})]})}),s.jsx(dg,{children:y.map(S=>s.jsxs(Fo,{children:[s.jsxs(Jn,{className:"font-mono text-xs",children:[S.user_id.substring(0,8),"..."]}),s.jsx(Jn,{children:S.domain}),s.jsx(Jn,{children:s.jsx(fe,{variant:S.success?"default":"destructive",children:S.success?"Success":"Failed"})}),s.jsx(Jn,{className:"max-w-xs truncate",children:S.error_message||"-"}
933),s.jsx(Jn,{children:new Date(S.scraped_at).toLocaleString()})]},S.id))})]})})]})}),s.jsx(nn,{value:"company-views",children:s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Company View Activity"})}),s.jsx(te,{children:s.jsxs(cg,{children:[s.jsx(ug,{children:s.jsxs(Fo,{children:[s.jsx(Zn,{children:"User ID"}),s.jsx(Zn,{children:"Company"}),s.jsx(Zn,{children:"Domain"}),s.jsx(Zn,{children:"Timestamp"})]})}),s.jsx(dg,{children:p.map(S=>s.jsxs(Fo,{children:[s.jsxs(Jn,{className:"font-mono text-xs",children:[S.user_id.substring(0,8),"..."]}),s.jsx(Jn,{children:S.company_name}),s.jsx(Jn,{children:S.company_domain||"-"}),s.jsx(Jn,{children:new Date(S.viewed_at).toLocaleString()})]},S.id))})]})})]})})]})]})},Yw=SK,Xw=p2,Qw=y2;var pt=function(){return pt=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pt.apply(this,arguments)};function QJe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function wte(e,t,n){for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Lx(e){return e.mode==="multiple"}function $x(e){return e.mode==="range"}function v1(e){return e.mode==="single"}var ZJe={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function JJe(e,t){return kt(e,"LLLL y",t)}function eet(e,t){return kt(e,"d",t)}function tet(e,t){return kt(e,"LLLL",t)}function net(e){return"".concat(e)}function ret(e,t){return kt(e,"cccccc",t)}function set(e,t){return kt(e,"yyyy",t)}var aet=Object.freeze({__proto__:null,formatCaption:JJe,formatDay:eet,formatMonthCaption:tet,formatWeekNumber:net,formatWeekdayName:ret,formatYearCaption:set}),iet=function(e,t,n){return kt(e,"do MMMM (EEEE)",n)},oet=function(){return"Month: "},cet=function(){return"Go to next month"},uet=function(){return"Go to previous month"},det=function(e,t){return kt(e,"cccc",t)},het=function(e){return"Week n. ".concat(e)},fet=function(){return"Year: "},met=Object.freeze({__proto__:null,labelDay:iet,labelMonthDropdown:oet,labelNext:cet,labelPrevious:uet,labelWeekNumber:het,labelWeekday:det,labelYearDropdown:fet});function pet(){var e="buttons",t=ZJe,n=l2,r={},a={},i=1,o={},l=new Date;return{captionLayout:e,classNames:t,formatters:aet,labels:met,locale:n,modifiersClassNames:r,modifiers:a,numberOfMonths:i,styles:o,today:l,mode:"default"}}function get(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,a=e.toMonth,i=e.fromDate,o=e.toDate;return r?i=Ur(r):t&&(i=new Date(t,0,1)),a?o=tj(a):n&&(o=new Date(n,11,31)),{fromDate:i?wo(i):void 0,toDate:o?wo(o):void 0}}var Ste=g.createContext(void 0);function yet(e){var t,n=e.initialProps,r=pet(),a=get(n),i=a.fromDate,o=a.toDate,l=(t=n.captionLayout)!==null&&t!==void 0?t:r.captionLayout;l!=="buttons"&&(!i||!o)&&(l="buttons");var c;(v1(n)||Lx(n)||$x(n))&&(c=n.onSelect);var u=pt(pt(pt({},r),n),{captionLayout:l,classNames:pt(pt({},r.classNames),n.classNames),components:pt({},n.components),formatters:pt(pt({},r.formatters),n.formatters),fromDate:i,labels:pt(pt({},r.labels),n.labels),mode:n.mode||r.mode,modifiers:pt(pt({},r.modifiers),n.modifiers),modifiersClassNames:pt(pt({},r.modifiersClassNames),n.modifiersClassNames),onSelect:c,styles:pt(pt({},r.styles),n.styles),toDate:o});return s.jsx(Ste.Provider,{value:u,children:e.children})}function jn(){var e=g.useContext(Ste);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function jte(e){var t=jn(),n=t.locale,r=t.classNames,a=t.styles,i=t.formatters.formatCaption;return s.jsx("div",{className:r.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:n})})}function xet(e){return s.jsx("svg",pt({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:s.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.7
93378175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Nte(e){var t,n,r=e.onChange,a=e.value,i=e.children,o=e.caption,l=e.className,c=e.style,u=jn(),d=(n=(t=u.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:xet;return s.jsxs("div",{className:l,style:c,children:[s.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),s.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:a,onChange:r,children:i}),s.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[o,s.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function vet(e){var t,n=jn(),r=n.fromDate,a=n.toDate,i=n.styles,o=n.locale,l=n.formatters.formatMonthCaption,c=n.classNames,u=n.components,d=n.labels.labelMonthDropdown;if(!r)return s.jsx(s.Fragment,{});if(!a)return s.jsx(s.Fragment,{});var h=[];if(ZSe(r,a))for(var f=Ur(r),m=r.getMonth();m<=a.getMonth();m++)h.push(UN(f,m));else for(var f=Ur(new Date),m=0;m<=11;m++)h.push(UN(f,m));var y=function(x){var v=Number(x.target.value),b=UN(Ur(e.displayMonth),v);e.onChange(b)},p=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:Nte;return s.jsx(p,{name:"months","aria-label":d(),className:c.dropdown_month,style:i.dropdown_month,onChange:y,value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:o}),children:h.map(function(x){return s.jsx("option",{value:x.getMonth(),children:l(x,{locale:o})},x.getMonth())})})}function bet(e){var t,n=e.displayMonth,r=jn(),a=r.fromDate,i=r.toDate,o=r.locale,l=r.styles,c=r.classNames,u=r.components,d=r.formatters.formatYearCaption,h=r.labels.labelYearDropdown,f=[];if(!a)return s.jsx(s.Fragment,{});if(!i)return s.jsx(s.Fragment,{});for(var m=a.getFullYear(),y=i.getFullYear(),p=m;p<=y;p++)f.push(zL(nj(new Date),p));var x=function(b){var w=zL(Ur(n),Number(b.target.value));e.onChange(w)},v=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:Nte;return s.jsx(v,{name:"years","aria-label":h(),className:c.dropdown_year,style:l.dropdown_year,onChange:x,value:n.getFullYear(),caption:d(n,{locale:o}),children:f.map(function(b){return s.jsx("option",{value:b.getFullYear(),children:d(b,{locale:o})},b.getFullYear())})})}function wet(e,t){var n=g.useState(e),r=n[0],a=n[1],i=t===void 0?r:t;return[i,a]}function jet(e){var t=e.month,n=e.defaultMonth,r=e.today,a=t||n||r||new Date,i=e.toDate,o=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(i&&Nf(i,a)<0){var u=-1*(c-1);a=Di(i,u)}return o&&Nf(a,o)<0&&(a=o),Ur(a)}function Net(){var e=jn(),t=jet(e),n=wet(t,e.month),r=n[0],a=n[1],i=function(o){var l;if(!e.disableNavigation){var c=Ur(o);a(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[r,i]}function _et(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,a=Ur(e),i=Ur(Di(a,r)),o=Nf(i,a),l=[],c=0;c<o;c++){var u=Di(a,c);l.push(u)}return n&&(l=l.reverse()),l}function Cet(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=r?i:1,l=Ur(e);if(!n)return Di(l,o);var c=Nf(n,e);if(!(c<i))return Di(l,o)}}function Eet(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=r?i:1,l=Ur(e);if(!n)return Di(l,-o);var c=Nf(l,n);if(!(c<=0))return Di(l,-o)}}var _te=g.createContext(void 0);function ket(e){var t=jn(),n=Net(),r=n[0],a=n[1],i=_et(r,t),o=Cet(r,t),l=Eet(r,t),c=function(h){return i.some(function(f){return c2(h,f)})},u=function(h,f){c(h)||(f&&EG(h,f)?a(Di(h,1+t.numberOfMonths*-1)):a(h))},d={currentMonth:r,displayMonths:i,goToMonth:a,goToDate:u,previousMonth:l,nextMonth:o,isDateDisplayed:c};return s.jsx(_te.Provider,{value:d,children:e.children})}function Fx(){var e=g.useContext(_te);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function jB(e){var t,n=jn(),r=n.classNames,a=n.styles,i=n.components,o=Fx().goToMonth,l=function(d){o(Di(d,e.displayIndex?-e.dis
933playIndex:0))},c=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:jte,u=s.jsx(c,{id:e.id,displayMonth:e.displayMonth});return s.jsxs("div",{className:r.caption_dropdowns,style:a.caption_dropdowns,children:[s.jsx("div",{className:r.vhidden,children:u}),s.jsx(vet,{onChange:l,displayMonth:e.displayMonth}),s.jsx(bet,{onChange:l,displayMonth:e.displayMonth})]})}function Pet(e){return s.jsx("svg",pt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Tet(e){return s.jsx("svg",pt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Zw=g.forwardRef(function(e,t){var n=jn(),r=n.classNames,a=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var o=i.join(" "),l=pt(pt({},a.button_reset),a.button);return e.style&&Object.assign(l,e.style),s.jsx("button",pt({},e,{ref:t,type:"button",className:o,style:l}))});function Aet(e){var t,n,r=jn(),a=r.dir,i=r.locale,o=r.classNames,l=r.styles,c=r.labels,u=c.labelPrevious,d=c.labelNext,h=r.components;if(!e.nextMonth&&!e.previousMonth)return s.jsx(s.Fragment,{});var f=u(e.previousMonth,{locale:i}),m=[o.nav_button,o.nav_button_previous].join(" "),y=d(e.nextMonth,{locale:i}),p=[o.nav_button,o.nav_button_next].join(" "),x=(t=h==null?void 0:h.IconRight)!==null&&t!==void 0?t:Tet,v=(n=h==null?void 0:h.IconLeft)!==null&&n!==void 0?n:Pet;return s.jsxs("div",{className:o.nav,style:l.nav,children:[!e.hidePrevious&&s.jsx(Zw,{name:"previous-month","aria-label":f,className:m,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?s.jsx(x,{className:o.nav_icon,style:l.nav_icon}):s.jsx(v,{className:o.nav_icon,style:l.nav_icon})}),!e.hideNext&&s.jsx(Zw,{name:"next-month","aria-label":y,className:p,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?s.jsx(v,{className:o.nav_icon,style:l.nav_icon}):s.jsx(x,{className:o.nav_icon,style:l.nav_icon})})]})}function NB(e){var t=jn().numberOfMonths,n=Fx(),r=n.previousMonth,a=n.nextMonth,i=n.goToMonth,o=n.displayMonths,l=o.findIndex(function(y){return c2(e.displayMonth,y)}),c=l===0,u=l===o.length-1,d=t>1&&(c||!u),h=t>1&&(u||!c),f=function(){r&&i(r)},m=function(){a&&i(a)};return s.jsx(Aet,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:h,nextMonth:a,previousMonth:r,onPreviousClick:f,onNextClick:m})}function Oet(e){var t,n=jn(),r=n.classNames,a=n.disableNavigation,i=n.styles,o=n.captionLayout,l=n.components,c=(t=l==null?void 0:l.CaptionLabel)!==null&&t!==void 0?t:jte,u;return a?u=s.jsx(c,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?u=s.jsx(jB,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?u=s.jsxs(s.Fragment,{children:[s.jsx(jB,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),s.jsx(NB,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=s.jsxs(s.Fragment,{children:[s.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(NB,{displayMonth:e.displayMonth,id:e.id})]}),s.jsx("div",{className:r.caption,style:i.caption,children:u})}function Ret(e){var t=jn(),n=t.footer,r=t.styles,a=t.classNames.tfoot;return n?s.jsx("tfoot",{className:a,style:r.tfoot,children:s.jsx("tr",{children:s.jsx("td",{colSpan:8,children:n})})}):s.jsx(s.Fragment,{})}function Iet(e,t,n){for(var r=n?ed(new Date):as(new Date,{locale:e,weekStartsOn:t}),a=[],i=0;i<7;i++){var o=ys(r,i);a.push(o)}return a}function Met(){var e=jn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,a=e.locale,i=e.weekStartsOn,o=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,u=Iet(a,i,o);return s.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&s.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(d,h){return s.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(d,{locale:a}),children:l(d,{locale:a})},h)})]})}function Det(){var e,t=jn(),n=t.classNames,r=t.styles,a=t.components,i=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:Met;return s.jsx("thead",{style:r.head,className:n.head,children:s.jsx(i,{})})}function Let(e){var t=jn(),n=t.locale,r=t.formatters.formatDay;return s.jsx(s.Fragment,{children:r(e.date,{locale:n})})}var oI=g.createContext(void 0);function $et(e){if(!Lx(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return s.jsx(oI.Provider,{value:t,children:e.children})}return s.jsx(Fet,{initialProps:e.initialProps,children:e.children})}function Fet(e){var t=e.initialProps,n=e.children,r=t.selected,a=t.min,i=t.max,o=function(u,d,h){var f,m;(f=t.onDayClick)===null||f===void 0||f.call(t,u,d,h);var y=!!(d.selected&&a&&(r==null?void 0:r.length)===a);if(!y){var p=!!(!d.selected&&i&&(r==null?void 0:r.length)===i);if(!p){var x=r?wte([],r):[];if(d.selected){var v=x.findIndex(function(b){return $s(u,b)});x.splice(v,1)}else x.push(u);(m=t.onSelect)===null||m===void 0||m.call(t,x,u,d,h)}}},l={disabled:[]};r&&l.disabled.push(function(u){var d=i&&r.length>i-1,h=r.some(function(f){return $s(f,u)});return!!(d&&!h)});var c={selected:r,onDayClick:o,modifiers:l};return s.jsx(oI.Provider,{value:c,children:n})}function lI(){var e=g.useContext(oI);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Bet(e,t){var n=t||{},r=n.from,a=n.to;return r&&a?$s(a,e)&&$s(r,e)?void 0:$s(a,e)?{from:a,to:void 0}:$s(r,e)?void 0:Ck(r,e)?{from:e,to:a}:{from:r,to:e}:a?Ck(e,a)?{from:a,to:e}:{from:e,to:a}:r?EG(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var cI=g.createContext(void 0);function zet(e){if(!$x(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return s.jsx(cI.Provider,{value:t,children:e.children})}return s.jsx(Uet,{initialProps:e.initialProps,children:e.children})}function Uet(e){var t=e.initialProps,n=e.children,r=t.selected,a=r||{},i=a.from,o=a.to,l=t.min,c=t.max,u=function(m,y,p){var x,v;(x=t.onDayClick)===null||x===void 0||x.call(t,m,y,p);var b=Bet(m,r);(v=t.onSelect)===null||v===void 0||v.call(t,b,m,y,p)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(d.range_start=[i],o?(d.range_end=[o],$s(i,o)||(d.range_middle=[{after:i,before:o}])):d.range_end=[i]):o&&(d.range_start=[o],d.range_end=[o]),l&&(i&&!o&&d.disabled.push({after:$r(i,l-1),before:ys(i,l-1)}),i&&o&&d.disabled.push({after:i,before:ys(i,l-1)}),!i&&o&&d.disabled.push({after:$r(o,l-1),before:ys(o,l-1)})),c){if(i&&!o&&(d.disabled.push({before:ys(i,-c+1)}),d.disabled.push({after:ys(i,c-1)})),i&&o){var h=ro(o,i)+1,f=c-h;d.disabled.push({before:$r(i,f)}),d.disabled.push({after:ys(o,f)})}!i&&o&&(d.disabled.push({before:ys(o,-c+1)}),d.disabled.push({after:ys(o,c-1)}))}return s.jsx(cI.Provider,{value:{selected:r,onDayClick:u,modifiers:d},children:n})}function uI(){var e=g.useContext(cI);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Vb(e){return Array.isArray(e)?wte([],e):e!==void 0?[e]:[]}function qet(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],a=n[1];t[r]=Vb(a)}),t}var Li;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Li||(Li={}));var Wet=Li.Selected,Oo=Li.Disabled,Vet=Li.Hidden,Het=Li.Today,V_=Li.RangeEnd,H_=Li.RangeMiddle,G_=Li.RangeStart,Get=Li.Outside;function Ket(e,t,n){var r,a=(r={},r[Wet]=Vb(e.selected),r[Oo]=Vb(e.disabled),r[Vet]=Vb(e.hidden),r[Het]=[e.today],r[V_]=[],r[H_]=[],r[G_]=[],r[Get]=[],r);return e.fromDate&&a[Oo].push({before:e.fromDate}),e.toDate&&a[Oo].push({after:e.toDate}),Lx(e)?a[Oo]=a[Oo].concat(t.modifiers[Oo]):$x(e)&&(a[Oo]=a[Oo].concat(n.modifiers[Oo]),a[G_]=n.modifiers[G_],a[H_]=n.modifiers[H_],a[V_]=n.modifiers[V_]),a}var Cte=g.createContext(void 0);function Yet(e){var t=jn(),n=lI(),r=uI(),a=Ket(t,n,r),i=qet(t.modifiers),o=pt(pt({},a),i);return s.jsx(Cte.Provider,{value:o,children:e.children})}function Ete(){var e=g.useContext(Cte);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Xet(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Qet(e){return!!(e&&typeof e=="object"&&"from"in e)}function Zet(e){return!!(e&&typeof e=="object"&&"after"in e)}function Jet(e){return!!(e&&typeof e=="object"&&"before"in e)}function ett(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ttt(e,t){var n,r=t.from,a=t.to;if(r&&a){var i=ro(a,r)<0;i&&(n=[a,r],r=n[0],a=n[1]);var o=ro(e,r)>=0&&ro(a,e)>=0;return o}return a?$s(a,e):r?$s(r,e):!1}function ntt(e){return i2(e)}function rtt(e){return Array.isArray(e)&&e.every(i2)}function stt(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(ntt(n))return $s(e,n);if(rtt(n))return n.includes(e);if(Qet(n))return ttt(e,n);if(ett(n))return n.dayOfWeek.includes(e.getDay());if(Xet(n)){var r=ro(n.before,e),a=ro(n.after,e),i=r>0,o=a<0,l=Ck(n.before,n.after);return l?o&&i:i||o}return Zet(n)?ro(e,n.after)>0:Jet(n)?ro(n.before,e)>0:typeof n=="function"?n(e):!1})}
933function dI(e,t,n){var r=Object.keys(t).reduce(function(i,o){var l=t[o];return stt(e,l)&&i.push(o),i},[]),a={};return r.forEach(function(i){return a[i]=!0}),n&&!c2(e,n)&&(a.outside=!0),a}function att(e,t){for(var n=Ur(e[0]),r=tj(e[e.length-1]),a,i,o=n;o<=r;){var l=dI(o,t),c=!l.disabled&&!l.hidden;if(!c){o=ys(o,1);continue}if(l.selected)return o;l.today&&!i&&(i=o),a||(a=o),o=ys(o,1)}return i||a}var itt=365;function kte(e,t){var n=t.moveBy,r=t.direction,a=t.context,i=t.modifiers,o=t.retry,l=o===void 0?{count:0,lastFocused:e}:o,c=a.weekStartsOn,u=a.fromDate,d=a.toDate,h=a.locale,f={day:ys,week:Yg,month:Di,year:Fwe,startOfWeek:function(x){return a.ISOWeek?ed(x):as(x,{locale:h,weekStartsOn:c})},endOfWeek:function(x){return a.ISOWeek?wG(x):o2(x,{locale:h,weekStartsOn:c})}},m=f[n](e,r==="after"?1:-1);r==="before"&&u?m=Bwe([u,m]):r==="after"&&d&&(m=zwe([d,m]));var y=!0;if(i){var p=dI(m,i);y=!p.disabled&&!p.hidden}return y?m:l.count>itt?l.lastFocused:kte(m,{moveBy:n,direction:r,context:a,modifiers:i,retry:pt(pt({},l),{count:l.count+1})})}var Pte=g.createContext(void 0);function ott(e){var t=Fx(),n=Ete(),r=g.useState(),a=r[0],i=r[1],o=g.useState(),l=o[0],c=o[1],u=att(t.displayMonths,n),d=a??(l&&t.isDateDisplayed(l))?l:u,h=function(){c(a),i(void 0)},f=function(x){i(x)},m=jn(),y=function(x,v){if(a){var b=kte(a,{moveBy:x,direction:v,context:m,modifiers:n});$s(a,b)||(t.goToDate(b,a),f(b))}},p={focusedDay:a,focusTarget:d,blur:h,focus:f,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return s.jsx(Pte.Provider,{value:p,children:e.children})}function hI(){var e=g.useContext(Pte);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function ltt(e,t){var n=Ete(),r=dI(e,n,t);return r}var fI=g.createContext(void 0);function ctt(e){if(!v1(e.initialProps)){var t={selected:void 0};return s.jsx(fI.Provider,{value:t,children:e.children})}return s.jsx(utt,{initialProps:e.initialProps,children:e.children})}function utt(e){var t=e.initialProps,n=e.children,r=function(i,o,l){var c,u,d;if((c=t.onDayClick)===null||c===void 0||c.call(t,i,o,l),o.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,i,o,l);return}(d=t.onSelect)===null||d===void 0||d.call(t,i,i,o,l)},a={selected:t.selected,onDayClick:r};return s.jsx(fI.Provider,{value:a,children:n})}function Tte(){var e=g.useContext(fI);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function dtt(e,t){var n=jn(),r=Tte(),a=lI(),i=uI(),o=hI(),l=o.focusDayAfter,c=o.focusDayBefore,u=o.focusWeekAfter,d=o.focusWeekBefore,h=o.blur,f=o.focus,m=o.focusMonthBefore,y=o.focusMonthAfter,p=o.focusYearBefore,x=o.focusYearAfter,v=o.focusStartOfWeek,b=o.focusEndOfWeek,w=function(k){var T,F,O,E;v1(n)?(T=r.onDayClick)===null||T===void 0||T.call(r,e,t,k):Lx(n)?(F=a.onDayClick)===null||F===void 0||F.call(a,e,t,k):$x(n)?(O=i.onDayClick)===null||O===void 0||O.call(i,e,t,k):(E=n.onDayClick)===null||E===void 0||E.call(n,e,t,k)},S=function(k){var T;f(e),(T=n.onDayFocus)===null||T===void 0||T.call(n,e,t,k)},j=function(k){var T;h(),(T=n.onDayBlur)===null||T===void 0||T.call(n,e,t,k)},N=function(k){var T;(T=n.onDayMouseEnter)===null||T===void 0||T.call(n,e,t,k)},C=function(k){var T;(T=n.onDayMouseLeave)===null||T===void 0||T.call(n,e,t,k)},_=function(k){var T;(T=n.onDayPointerEnter)===null||T===void 0||T.call(n,e,t,k)},A=function(k){var T;(T=n.onDayPointerLeave)===null||T===void 0||T.call(n,e,t,k)},P=function(k){var T;(T=n.onDayTouchCancel)===null||T===void 0||T.call(n,e,t,k)},R=function(k){var T;(T=n.onDayTouchEnd)===null||T===void 0||T.call(n,e,t,k)},I=function(k){var T;(T=n.onDayTouchMove)===null||T===void 0||T.call(n,e,t,k)},B=function(k){var T;(T=n.onDayTouchStart)===null||T===void 0||T.call(n,e,t,k)},$=function(k){var T;(T=n.onDayKeyUp)===null||T===void 0||T.call(n,e,t,k)},q=function(k){var T;switch(k.key){case"ArrowLeft":k.preventDefault(),k.stopPropagation(),n.dir==="rtl"?l(
933):c();break;case"ArrowRight":k.preventDefault(),k.stopPropagation(),n.dir==="rtl"?c():l();break;case"ArrowDown":k.preventDefault(),k.stopPropagation(),u();break;case"ArrowUp":k.preventDefault(),k.stopPropagation(),d();break;case"PageUp":k.preventDefault(),k.stopPropagation(),k.shiftKey?p():m();break;case"PageDown":k.preventDefault(),k.stopPropagation(),k.shiftKey?x():y();break;case"Home":k.preventDefault(),k.stopPropagation(),v();break;case"End":k.preventDefault(),k.stopPropagation(),b();break}(T=n.onDayKeyDown)===null||T===void 0||T.call(n,e,t,k)},L={onClick:w,onFocus:S,onBlur:j,onKeyDown:q,onKeyUp:$,onMouseEnter:N,onMouseLeave:C,onPointerEnter:_,onPointerLeave:A,onTouchCancel:P,onTouchEnd:R,onTouchMove:I,onTouchStart:B};return L}function htt(){var e=jn(),t=Tte(),n=lI(),r=uI(),a=v1(e)?t.selected:Lx(e)?n.selected:$x(e)?r.selected:void 0;return a}function ftt(e){return Object.values(Li).includes(e)}function mtt(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var a=e.modifiersClassNames[r];if(a)n.push(a);else if(ftt(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function ptt(e,t){var n=pt({},e.styles.day);return Object.keys(t).forEach(function(r){var a;n=pt(pt({},n),(a=e.modifiersStyles)===null||a===void 0?void 0:a[r])}),n}function gtt(e,t,n){var r,a,i,o=jn(),l=hI(),c=ltt(e,t),u=dtt(e,c),d=htt(),h=!!(o.onDayCl
933ick||o.mode!=="default");g.useEffect(function(){var N;c.outside||l.focusedDay&&h&&$s(l.focusedDay,e)&&((N=n.current)===null||N===void 0||N.focus())},[l.focusedDay,e,n,h,c.outside]);var f=mtt(o,c).join(" "),m=ptt(o,c),y=!!(c.outside&&!o.showOutsideDays||c.hidden),p=(i=(a=o.components)===null||a===void 0?void 0:a.DayContent)!==null&&i!==void 0?i:Let,x=s.jsx(p,{date:e,displayMonth:t,activeModifiers:c}),v={style:m,className:f,children:x,role:"gridcell"},b=l.focusTarget&&$s(l.focusTarget,e)&&!c.outside,w=l.focusedDay&&$s(l.focusedDay,e),S=pt(pt(pt({},v),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=w||b?0:-1,r)),u),j={isButton:h,isHidden:y,activeModifiers:c,selectedDays:d,buttonProps:S,divProps:v};return j}function ytt(e){var t=g.useRef(null),n=gtt(e.date,e.displayMonth,t);return n.isHidden?s.jsx("div",{role:"gridcell"}):n.isButton?s.jsx(Zw,pt({name:"day",ref:t},n.buttonProps)):s.jsx("div",pt({},n.divProps))}function xtt(e){var t=e.number,n=e.dates,r=jn(),a=r.onWeekNumberClick,i=r.styles,o=r.classNames,l=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,d=u(Number(t),{locale:l});if(!a)return s.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:d});var h=c(Number(t),{locale:l}),f=function(m){a(t,n,m)};return s.jsx(Zw,{name:"week-number","aria-label":h,className:o.weeknumber,style:i.weeknumber,onClick:f,children:d})}function vtt(e){var t,n,r=jn(),a=r.styles,i=r.classNames,o=r.showWeekNumber,l=r.components,c=(t=l==null?void 0:l.Day)!==null&&t!==void 0?t:ytt,u=(n=l==null?void 0:l.WeekNumber)!==null&&n!==void 0?n:xtt,d;return o&&(d=s.jsx("td",{className:i.cell,style:a.cell,children:s.jsx(u,{number:e.weekNumber,dates:e.dates})})),s.jsxs("tr",{className:i.row,style:a.row,children:[d,e.dates.map(function(h){return s.jsx("td",{className:i.cell,style:a.cell,role:"presentation",children:s.jsx(c,{displayMonth:e.displayMonth,date:h})},YSe(h))})]})}function _B(e,t,n){for(var r=n!=null&&n.ISOWeek?wG(t):o2(t,n),a=n!=null&&n.ISOWeek?ed(e):as(e,n),i=ro(r,a),o=[],l=0;l<=i;l++)o.push(ys(a,l));var c=o.reduce(function(u,d){var h=n!=null&&n.ISOWeek?SG(d):NG(d,n),f=u.find(function(m){return m.weekNumber===h});return f?(f.dates.push(d),u):(u.push({weekNumber:h,dates:[d]}),u)},[]);return c}function btt(e,t){var n=_B(Ur(e),tj(e),t);if(t!=null&&t.useFixedWeeks){var r=QSe(e,t);if(r<6){var a=n[n.length-1],i=a.dates[a.dates.length-1],o=Yg(i,6-r),l=_B(Yg(i,1),o,t);n.push.apply(n,l)}}return n}function wtt(e){var t,n,r,a=jn(),i=a.locale,o=a.classNames,l=a.styles,c=a.hideHead,u=a.fixedWeeks,d=a.components,h=a.weekStartsOn,f=a.firstWeekContainsDate,m=a.ISOWeek,y=btt(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:m,locale:i,weekStartsOn:h,firstWeekContainsDate:f}),p=(t=d==null?void 0:d.Head)!==null&&t!==void 0?t:Det,x=(n=d==null?void 0:d.Row)!==null&&n!==void 0?n:vtt,v=(r=d==null?void 0:d.Footer)!==null&&r!==void 0?r:Ret;return s.jsxs("table",{id:e.id,className:o.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&s.jsx(p,{}),s.jsx("tbody",{className:o.tbody,style:l.tbody,children:y.map(function(b){return s.jsx(x,{displayMonth:e.displayMonth,dates:b.dates,weekNumber:b.weekNumber},b.weekNumber)})}),s.jsx(v,{displayMonth:e.displayMonth})]})}function Stt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jtt=Stt()?g.useLayoutEffect:g.useEffect,K_=!1,Ntt=0;function CB(){return"react-day-picker-".concat(++Ntt)}function _tt(e){var t,n=e??(K_?CB():null),r=g.useState(n),a=r[0],i=r[1];return jtt(function(){a===null&&i(CB())},[]),g.useEffect(function(){K_===!1&&(K_=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function Ctt(e){var t,n,r=jn(),a=r.dir,i=r.classNames,o=r.styles,l=r.components,c=Fx().displayMonths,u=_tt(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),d=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,h=[i.month],f=o.month,m=e.displayIndex===0,y=e.displayIndex===c.length-1,p=!m&&!y;a==="rtl"&&(t=[m,y],y=t[0],m=t[1]),m&&(h.push(i.caption_start),f=pt(pt({},f),o.caption_start)),y&&(h.push(i.caption_end),f=pt(pt({},f),o.caption_end)),p&&(h.push(i.caption_between),f=pt(pt({},f),o.caption_between));var x=(n=l==null?void 0:l.Caption)!==null&&n!==void 0?n:Oet;return s.jsxs("div",{className:h.join(" "),style:f,children:[s.jsx(x,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(wtt,{id:d,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function Ett(e){var t=jn(),n=t.classNames,r=t.styles;return s.jsx("div",{className:n.months,style:r.months,children:e.children})}function ktt(e){var t,n,r=e.initialProps,a=jn(),i=hI(),o=Fx(),l=g.useState(!1),c=l[0],u=l[1];g.useEffect(function(){a.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[a.initialFocus,c,i.focus,i.focusTarget,i]);var d=[a.classNames.root,a.className];a.numberOfMonths>1&&d.push(a.classNames.multiple_months),a.showWeekNumber&&d.push(a.classNames.with_weeknumber);var h=pt(pt({},a.styles.root),a.style),f=Object.keys(r).filter(function(y){return y.startsWith("data-")}).reduce(function(y,p){var x;return pt(pt({},y),(x={},x[p]=r[p],x))},{}),m=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:Ett;return s.jsx("div",pt({className:d.join(" "),style:h,dir:a.dir,id:a.id,nonce:r.nonce,title:r.title,lang:r.lang},f,{children:s.jsx(m,{children:o.displayMonths.map(function(y,p){return s.jsx(Ctt,{displayIndex:p,displayMonth:y},p)})})}))}function Ptt(e){var t=e.children,n=QJe(e,["children"]);return s.jsx(yet,{initialProps:n,children:s.jsx(ket,{children:s.jsx(ctt,{initialProps:n,children:s.jsx($et,{initialProps:n,children:s.jsx(zet,{initialProps:n,children:s.jsx(Yet,{children:s.jsx(ott,{children:t})})})})})})})}function Ttt(e){return s.jsx(Ptt,pt({},e,{children:s.jsx(ktt,{initialProps:e})}))}function cd({className:e,classNames:t,showOutsideDays:n=!0,...r}){return s.jsx(Ttt,{showOutsideDays:n,className:ve("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
933ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ve(Sf({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ve(Sf({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>s.jsx(kS,{className:"h-4 w-4"}),IconRight:({...a})=>s.jsx(lm,{className:"h-4 w-4"})},...r})}cd.displayName="Calendar";const Att=({trigger:e})=>{const{toast:t}=Ve(),[n,r]=g.useState(!1),[a,i]=g.useState(!1),[o,l]=g.useState("companies"),[c,u]=g.useState("unknown"),[d,h]=g.useState(!1),[f,m]=g.useState(null),[y,p]=g.useState({}),[x,v]=g.useState([]),[b,w]=g.useState(!1),[S,j]=g.useState(null),[N,C]=g.useState([]),[_,A]=g.useState(null),[P,R]=g.useState(""),[I,B]=g.useState(!1),$={companies:[{id:"company_name",label:"Company Name"},{id:"company_domain",label:"Domain"},{id:"saved_date",label:"Saved Date"},{id:"folder_name",label:"Folder"},{id:"notes",label:"Notes"},{id:"matchmaking_score",label:"Matchmaking Score"},{id:"ice_breaker",label:"Ice Breaker"},{id:"pitch_suggestions",label:"Pitch Suggestions"}],matchmaking:[{id:"company_name",label:"Company Name"},{id:"company_domain",label:"Domain"},{id:"score",label:"Match Score"},{id:"ice_breaker",label:"Ice Breaker"},{id:"pitch_suggestions",label:"Pitch Suggestions"},{id:"target_positions",label:"Target Positions"},{id:"created_at",label:"Match Date"}],signals:[{id:"company_name",label:"Company Name"},{id:"company_domain",label:"Domain"},{id:"signal_type",label:"Signal Type"},{id:"signal_title",label:"Signal Title"},{id:"signal_description",label:"Description"},{id:"signal_date",label:"Signal Date"},{id:"upvote_count",label:"Upvotes"},{id:"created_at",label:"Added Date"}]},q=["hiring_signals","product_signals","funding_signals","leadership_change_signals","tech_stack_change_signals","geographic_expansion_signals","press_coverage_signals","ai_integration_signals","security_privacy_signals","growth_marketing_signals"],L=E=>{v(D=>D.includes(E)?D.filter(M=>M!==E):[...D,E])},k=async E=>{try{i(!0);let D="",M={selected_fields:x,date_range:y.start&&y.end?{start:y.start.toISOString().split("T")[0],end:y.end.toISOString().split("T")[0]}:null};switch(E){case"companies":D="export-saved-companies",M.include_all_fields=b;break;case"matchmaking":D="export-matchmaking",M.min_score=S;break;case"signals":D="export-signals",M.signal_types=N,M.min_upvotes=_;break}const X=await K.functions.invoke(D,{body:M});if(X.error)throw new Error(X.error.message||"Export failed");const W=X.data,re=new Blob([W],{type:"text/csv"}),ne=window.URL.createObjectURL(re),le=document.createElement("a");le.href=ne,le.download=`${E}-export-${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(le),le.click(),document.body.removeChild(le),window.URL.revokeObjectURL(ne),t({title:"Export successful",description:`${E} data exported to CSV.`}),r(!1)}catch(D){console.error("Export error:",D),t({title:"Export failed",description:D instanceof Error?D.message:"Failed to export data.",variant:"destructive"})}finally{i(!1)}},T=async()=>{try{u("checking");const{count:E,error:D}=await K.from("airtable_companies_cache").select("*",{count:"exact",head:!0});if(D){console.error("Error checking cache:",D),u("unknown");return}u(E&&E>0?"populated":"empty");const{data:M}=await K.from("airtable_sync_status").select("last_sync_end").eq("sync_status","completed").order("last_sync_end",{ascending:!1}).limit(1);M&&M.length>0&&m(M[0].last_sync_end)}catch(E){console.error("Error checking cache status:",E),u("unknown")}},F=async()=>{var E,D;try{h(!0),console.log("Starting cache sync...");const M=await K.functions.invoke("sync-airtable-cache");if(console.log("Sync response:",M),M.error)throw console.error("Sync function error:",M.error),(E=M.error.message)!=null&&E.includes("compute resources")?new Error("Sync failed due to large dataset size. Please contact support for assistance."):(D=M.error.message)!=null&&D.includes("WORKER_LIMIT")?new Error("The sync process requires more resources than currently available. Please try again later."):new Error(M.error.message||"Cache sync failed");const X=M.data;if(X&&X.success&&X.syncedRecords>0)t({title:"Cache sync successful",description:`Synced ${X.syncedRecords} company records with intelligence data.`}),X.totalRecords&&X.syncedRecords<X.totalRecords&&t({title:"Partial sync completed",description:`Synced ${X.syncedRecords} out of ${X.totalRecords} records. Run sync again to continue from where it left off.`,variant:"default"}),await T();else throw console.error("Sync function returned unexpected result:",X),new Error((X==null?void 0:X.error)||"Sync completed but returned unexpected result")}catch(M){console.error("Cache sync error:",M),t({title:"Cache sync failed",description:M instanceof Error?M.message:"Failed to sync company intelligence data.",variant:"destructive"})}finally{h(!1)}};g.useEffect(()=>{n&&T()},[n]);const O=async()=>{t({title:"Scheduled export",description:"Scheduled exports will be available soon."})};return s.jsxs(Wr,{open:n,onOpenChange:r,children:[s.jsx(wd,{asChild:!0,children:e}),s.jsxs(Pr,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Vr,{children:[s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(Ka,{className:"w-5 h-5"}),"Advanced Export Options"]}),s.jsx(Uc,{children:"Export your data with custom field selection, filtering, and scheduling options."})]}),s.jsxs(_o,{value:o,onValueChange:l,className:"space-y-4",children:[s.jsxs(Fi,{className:"grid w-full grid-cols-3",children:[s.jsxs(yt,{value:"companies",className:"flex items-center gap-2",children:[s.jsx(gd,{className:"w-4 h-4"}),"Saved Companies"]}),s.jsxs(yt,{value:"matchmaking",className:"flex items-center gap-2",children:[s.jsx(tn,{className:"w-4 h-4"}),"Matchmaking"]}),s.jsxs(yt,{value:"signals",className:"flex items-center gap-2",children:[s.jsx(ze,{className:"w-4 h-4"}),"Signals"]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ke,{className:"font-medium",children:"Select Fields to Export"}),o==="companies"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"p-3 border rounded-lg bg-blue-50/50 space-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(vr,{id:"include-all-fields",checked:b,onCheckedChange:E=>w(E===!0),disabled:c==="empty"}),s.jsx(Ke,{htmlFor:"include-all-fields",className:"font-medium text-blue-900",children:"Include All Company Intelligence Fields"})]}),s.jsx("p",{className:"text-xs text-blue-700 ml-6",children:"Export comprehensive company data including industry, funding, tech stack, employee count, CEO info, and 30+ signal types. Results in larger files but complete business intelligence."})]}),s.jsxs("div",{className:"p-3 border rounded-lg space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nl,{className:"w-4 h-4"}),s.jsx(Ke,{className:"font-medium",children:"Company Intelligence Cache"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c==="checking"&&s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(dt,{className:"w-3 h-3 animate-spin"}),"Checking..."]}),c==="populated"&&s.jsx(fe,{variant:"secondary",className:"text-xs bg-green-50 text-green-700",children:"✓ Ready"}),c==="empty"&&s.jsx(fe,{variant:"destructive",className:"text-xs",children:"⚠ Empty"})]})]}),c==="empty"&&s.jsxs("div",{className:"flex items-start gap-2 p-2 bg-yellow-50 rounded border border-yellow-200",children:[s.jsx(t9,{className:"w-4 h-4 text-yellow-600 mt-0.5 flex-shrink-0"}),s.jsxs("div",{className:"text-xs text-yellow-800",children:[s.jsx("p",{className:"font-medium",children:"Intelligence data not available"}),s.jsx("p",{children:"Sync company data to enable enhanced export with detailed business intelligence fields."})]})]}),f&&c==="populated"&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last synced: ",new Date(f).toLocaleDateString()," at ",new Date(f).toLocaleTimeString()]}),s.jsxs(U,{onClick:F,disabled:d,variant:c==="empty"?"default":"outline",size:"sm",className:"w-full flex items-center gap-2",children:[s.jsx(dt,{className:`w-3 h-3 ${d?"animate-spin":""}`}),d?"Syncing Company Data...":"Sync Company Data"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 gap-2 p-3 border rounded-lg",children:$[o].map(E=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(vr,{id:E.id,checked:x.includes(E.id),onCheckedChange:()=>L(E.id)}),s.jsx(Ke,{htmlFor:E.id,className:"text-sm font-normal",children:E.label})]},E.id))}),x.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:x.map(E=>{const D=$[o].find(M=>M.id===E);return D?s.jsx(fe,{variant:"secondary",className:"text-xs",children:D.label},E):null})})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs(Ke,{className:"font-medium flex items-center gap-2",children:[s.jsx(Qu,{className:"w-4 h-4"}),"Filters"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{className:"text-sm",children:"Start Date"}),s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"w-full justify-start text-left font-normal",children:[s.jsx(sn,{className:"mr-2 h-4 w-4"}),y.start?kt(y.start,"MMM dd, yyyy"):"Pick start date"]})}),s.jsx(ll,{className:"w-auto p-0",align:"start",children:s.jsx(cd,{mode:"single",selected:y.start,onSelect:E=>p(D=>({...D,start:E})),initialFocus:!0})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{className:"text-sm",children:"End Date"}),s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"w-full justify-start text-left font-normal",children:[s.jsx(sn,{className:"mr-2 h-4 w-4"}),y.end?kt(y.end,"MMM dd, yyyy"):"Pick end date"]})}),s.jsx(ll,{className:"w-auto p-0",align:"start",children:s.jsx(cd,{mode:"single",selected:y.end,onSelect:E=>p(D=>({...D,end:E})),initialFocus:!0})})]})]})]})]}),s.jsx(nn,{value:"matchmaking",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{className:"text-sm",children:"Minimum Match Score"}),s.jsx(at,{type:"number",placeholder:"e.g., 70",min:"0",max:"100",value:S||"",onChange:E=>j(E.target.value?parseInt(E.target.value):null)})]})}),s.jsxs(nn,{value:"signals",className:"space-y-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{className:"text-sm",children:"Signal Types"}),s.jsxs(hr,{onValueChange:E=>C(D=>[...D,E]),children:[s.jsx(nr,{children:s.jsx(fr,{placeholder:"Select signal types"})}),s.jsx(rr,{children:q.map(E=>
933s.jsx(bt,{value:E,children:E.split("_").map(D=>D.charAt(0).toUpperCase()+D.slice(1)).join(" ")},E))})]}),N.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:N.map(E=>s.jsx(fe,{variant:"secondary",className:"text-xs",children:E.split("_").map(D=>D.charAt(0).toUpperCase()+D.slice(1)).join(" ")},E))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{className:"text-sm",children:"Minimum Upvotes"}),s.jsx(at,{type:"number",placeholder:"e.g., 5",min:"0",value:_||"",onChange:E=>A(E.target.value?parseInt(E.target.value):null)})]})]}),s.jsxs("div",{className:"space-y-3 border-t pt-4",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(vr,{id:"schedule-enabled",checked:I,onCheckedChange:E=>B(E===!0)}),s.jsxs(Ke,{htmlFor:"schedule-enabled",className:"font-medium flex items-center gap-2",children:[s.jsx(Xn,{className:"w-4 h-4"}),"Schedule Recurring Export"]})]}),I&&s.jsxs("div",{className:"space-y-2 ml-6",children:[s.jsx(Ke,{className:"text-sm",children:"Frequency"}),s.jsxs(hr,{value:P,onValueChange:R,children:[s.jsx(nr,{className:"w-48",children:s.jsx(fr,{placeholder:"Select frequency"})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"daily",children:"Daily"}),s.jsx(bt,{value:"weekly",children:"Weekly"}),s.jsx(bt,{value:"monthly",children:"Monthly"})]})]})]})]}),s.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[s.jsx(U,{variant:"outline",onClick:()=>r(!1),disabled:a,children:"Cancel"}),s.jsxs("div",{className:"flex gap-2",children:[I&&s.jsxs(U,{variant:"outline",onClick:O,disabled:a||!P,className:"flex items-center gap-2",children:[s.jsx(Xn,{className:"w-4 h-4"}),"Schedule Export"]}),s.jsxs(U,{onClick:()=>k(o),disabled:a,className:"flex items-center gap-2",children:[s.jsx(Ka,{className:"w-4 h-4"}),a?"Exporting...":"Export Now"]})]})]})]})]})]})},Ate=({onConnectionChange:e})=>{const{user:t}=Ie(),n=cs(),[r,a]=g.useState(!1),[i,o]=g.useState(!0),[l,c]=g.useState(!1);g.useEffect(()=>{t?u():o(!1)},[t]),g.useEffect(()=>{const f=m=>{var y;((y=m.data)==null?void 0:y.type)==="google_oauth_complete"&&(m.data.success?(Ae.success("Google account connected!"),u()):Ae.error("Failed to connect Google account"))};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[]);const u=async()=>{var f;if(t)try{o(!0);const y=(f=(await K.auth.getSession()).data.session)==null?void 0:f.access_token;if(!y){console.warn("No access token found; skipping status check"),Ae.error("Your session expired. Please sign in again."),a(!1),e==null||e(!1);return}const{data:p,error:x}=await K.functions.invoke("google-oauth-status",{headers:{Authorization:`Bearer ${y}`}});if(x)throw console.error("Error checking Google connection:",x,p),Ae.error((p==null?void 0:p.error)||x.message||"Failed to check connection"),x;const v=(p==null?void 0:p.connected)||!1;a(v),e==null||e(v)}catch(m){console.error("Error checking Google connection:",m),a(!1),e==null||e(!1)}finally{o(!1)}},d=async()=>{var f;if(!t){Ae.error("Please sign in first");return}try{c(!0);const y=(f=(await K.auth.getSession()).data.session)==null?void 0:f.access_token;if(!y){Ae.error("Your session expired. Please sign in again.");return}const{data:p,error:x}=await K.functions.invoke("google-oauth-init",{body:{origin:window.location.origin},headers:{Authorization:`Bearer ${y}`}});if(x)throw console.error("Error initiating Google OAuth:",x,p),Ae.error((p==null?void 0:p.error)||x.message||"Failed to initiate Google connection"),x;if(p!=null&&p.authUrl){const w=window.screen.width/2-250,S=window.screen.height/2-600/2;window.open(p.authUrl,"Google OAuth",`width=500,height=600,left=${w},top=${S}`),Ae.info("Complete the authorization in the popup window")}}catch(m){console.error("Error initiating Google OAuth:",m),Ae.error((m==null?void 0:m.message)||"Failed to initiate Google connection")}finally{c(!1)}},h=async()=>{var f;if(t)try{o(!0);const y=(f=(await K.auth.getSession()).data.session)==null?void 0:f.access_token;if(!y){Ae.error("Your session expired. Please sign in again.");return}const{data:p,error:x}=await K.functions.invoke("google-oauth-disconnect",{headers:{Authorization:`Bearer ${y}`}});if(x)throw console.error("Error disconnecting Google:",x,p),Ae.error((p==null?void 0:p.error)||x.message||"Failed to disconnect Google account"),x;a(!1),e==null||e(!1),Ae.success("Google account disconnected")}catch(m){console.error("Error disconnecting Google:",m),Ae.error((m==null?void 0:m.message)||"Failed to disconnect Google account")}finally{o(!1)}};return t?i?s.jsxs("div",{className:"flex items-center gap-2 p-4 border rounded-lg",children:[s.jsx(Pt,{className:"h-4 w-4 animate-spin"}),s.jsx("span",{className:"text-sm",children:"Checking connection..."})]}):r?s.jsxs("div",{className:"space-y-3",children:[s.jsxs(Cs,{className:"border-green-500/50 bg-green-500/10",children:[s.jsx(Zy,{className:"h-4 w-4 text-green-500"}),s.jsx(Es,{className:"text-green-700 dark:text-green-300",children:"Google account connected successfully"})]}),s.jsx(U,{variant:"outline",size:"sm",onClick:h,disabled:i,children:"Disconnect Google Account"})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Cs,{children:[s.jsx(mf,{className:"h-4 w-4"}),s.jsx(Es,{children:"Connect your Google account to export data to Google Sheets"})]}),s.jsx(U,{onClick:d,disabled:l,className:"w-full",children:l?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"h-4 w-4 mr-2 animate-spin"}),"Connecting..."]}):"Connect Google Account"})]}):s.jsxs("div",{className:"space-y-3",children:[s.jsxs(Cs,{children:[s.jsx(mf,{className:"h-4 w-4"}),s.jsx(Es,{children:"Sign in to connect your Google account for exporting to Google Sheets"})]}),s.jsx(U,{onClick:()=>n("/auth"),className:"w-full",children:"Sign In to Connect"})]})},Ote=({open:e,onOpenChange:t,selectedCompanies:n,exportAll:r,searchTerm:a,scoreFilter:i,statusFilter:o,source:l})=>{const{toast:c}=Ve(),[u,d]=g.useState(""),[h,f]=g.useState("Sheet1"),[m,y]=g.useState(!1),[p,x]=g.useState(!1),[v,b]=g.useState(["company_name","company_domain","match_score","ice_breaker","pitch_suggestions"]);g.useEffect(()=>{const A=localStorage.getItem("sheets_sheet_id"),P=localStorage.getItem("sheets_tab_name");A&&d(A),P&&f(P),w()},[]);const w=async()=>{var A;try{const R=(A=(await K.auth.getSession()).data.session)==null?void 0:A.access_token;if(!R){x(!1);return}const{data:I}=await K.functions.invoke("google-oauth-status",{headers:{Authorization:`Bearer ${R}`}});x((I==null?void 0:I.connected)||!1)}catch{x(!1)}},S=A=>{const P=A.trim(),R=P.match(/\/spreadsheets\/d\/([a-zA-Z0-9-_]+)/);return R?R[1]:P},j=A=>{const P=S(A);d(P),localStorage.setItem("sheets_sheet_id",P)},N=l==="auto-prospecting"?[{id:"company_name",label:"Company Name"},{id:"company_domain",label:"Domain"},{id:"match_score",label:"Match Score"},{id:"ice_breaker",label:"Ice Breaker"},{id:"pitch_suggestions",label:"Pitch Suggestions"},{id:"target_positions",label:"Target Positions"},{id:"matched_at",label:"Match Date"},{id:"is_reviewed",label:"Review Status"},{id:"is_saved",label:"Save Status"}]:[{id:"company_name",label:"Company Name"},{id:"company_domain",label:"Domain"},{id:"saved_at",label:"Saved Date"},{id:"notes",label:"Notes"},{id:"folder_name",label:"Folder"}],C=A=>{b(P=>P.includes(A)?P.filter(R=>R!==A):[...P,A])},_=async()=>{var A;if(!u.trim()){c({title:"Sheet ID required",description:"Please enter your Google Sheet ID",variant:"destructive"});return}if(v.length===0){c({title:"No fields selected",description:"Please select at least one field to export",variant:"destructive"});return}try{y(!0);const R=(A=(await K.auth.getSession()).data.session)==null?void 0:A.access_token;if(!R){c({title:"Session expired",description:"Please sign in again to export",variant:"destructive"}),x(!1),y(!1);return}const I=l==="auto-prospecting"?"export-auto-prospecting-to-sheets":"export-saved-companies-to-s
933heets",B=r?{sheet_id:u,tab_name:h,export_all:!0,search_term:a||null,score_filter:i!=="all"?i:null,status_filter:o!=="all"?o:null,selected_fields:v}:{sheet_id:u,tab_name:h,export_all:!1,company_ids:Array.from(n),selected_fields:v},{data:$,error:q}=await K.functions.invoke(I,{body:B,headers:{Authorization:`Bearer ${R}`}});if(q)throw q;c({title:"Export successful",description:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Data exported to Google Sheets"}),s.jsx(U,{variant:"link",size:"sm",className:"p-0 h-auto",onClick:()=>window.open(`https://docs.google.com/spreadsheets/d/${u}`,"_blank"),children:"Open Sheet"})]})}),t(!1),d("")}catch(P){console.error("Export error:",P);const R=P,I=(R==null?void 0:R.message)||"Unknown error",B=R==null?void 0:R.code;B==="GOOGLE_NOT_CONNECTED"?c({title:"Google Account Not Connected",description:"Please connect your Google account first using the button above",variant:"destructive"}):B==="TOKEN_REFRESH_FAILED"?(c({title:"Connection Expired",description:"Your Google connection has expired. Please reconnect your account.",variant:"destructive"}),x(!1)):I.includes("permission")||I.includes("access")?c({title:"Permission denied",description:"Make sure you have edit access to the sheet and the tab exists",variant:"destructive"}):c({title:"Export failed",description:I,variant:"destructive"})}finally{y(!1)}};return s.jsx(Wr,{open:e,onOpenChange:t,children:s.jsxs(Pr,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Vr,{children:[s.jsx(Tr,{children:"Export to Google Sheets"}),s.jsxs(Uc,{children:["Export ",r?"all companies":`${n.size} selected companies`," to your Google Sheet"]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ate,{onConnectionChange:x}),!p&&s.jsxs(Cs,{children:[s.jsx(mf,{className:"w-4 h-4"}),s.jsx(Es,{children:"You need to connect your Google account before exporting. Click the button above to get started."})]}),p&&s.jsxs(Cs,{children:[s.jsx(mf,{className:"w-4 h-4"}),s.jsxs(Es,{className:"text-sm",children:[s.jsx("strong",{children:"How to export:"}),s.jsxs("ol",{className:"list-decimal pl-4 mt-2 space-y-1",children:[s.jsx("li",{children:"Create a new Google Sheet or open an existing one"}),s.jsx("li",{children:"Copy the Sheet ID from the URL (the long string after /d/)"}),s.jsx("li",{children:'Paste it below and click "Export to Sheets"'})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"sheetId",children:"Google Sheet ID *"}),s.jsx(at,{id:"sheetId",placeholder:"e.g., 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms or full URL",value:u,onChange:A=>j(A.target.value)}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Find this in your sheet URL: docs.google.com/spreadsheets/d/",s.jsx("strong",{children:"[SHEET_ID]"}),"/edit"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"tabName",children:"Tab / Worksheet Name"}),s.jsx(at,{id:"tabName",placeholder:"Sheet1",value:h,onChange:A=>{f(A.target.value),localStorage.setItem("sheets_tab_name",A.target.value)},disabled:!p}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Defaults to Sheet1. The tab must exist in your sheet."})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ke,{children:"Select Fields to Export"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:N.map(A=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(vr,{id:A.id,checked:v.includes(A.id),onCheckedChange:()=>C(A.id)}),s.jsx("label",{htmlFor:A.id,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:A.label})]},A.id))})]})]}),s.jsxs(dj,{children:[s.jsx(U,{variant:"outline",onClick:()=>t(!1),disabled:m,children:"Cancel"}),s.jsxs(U,{onClick:_,disabled:m||!p||!u,children:[m&&s.jsx(Pt,{className:"w-4 h-4 mr-2 animate-spin"}),"Export to Sheets"]})]})]})})},Rte=()=>{const{user:e}=Ie(),{toast:t}=Ve(),{pipelineValue:n,settings:r,showRevenueToast:a,calculateDealValue:i}=gm(),[o,l]=g.useState([]),[c,u]=g.useState([]),[d,h]=g.useState(""),[f,m]=g.useState(!0),[y,p]=g.useState(new Set),[x,v]=g.useState(!1),[b,w]=g.useState(!1),[S,j]=g.useState(!1);g.useEffect(()=>{e&&N()},[e]),g.useEffect(()=>{const O=o.filter(E=>E.company_name.toLowerCase().includes(d.toLowerCase())||E.company_domain&&E.company_domain.toLowerCase().includes(d.toLowerCase()));u(O)},[o,d]);const N=async()=>
933{if(e)try{m(!0);const{data:O,error:E}=await K.from("saved_companies").select("*").eq("user_id",e.id).order("saved_at",{ascending:!1});if(E)throw E;l(O||[])}catch(O){console.error("Error fetching saved companies:",O),t({title:"Error",description:"Failed to load saved companies.",variant:"destructive"})}finally{m(!1)}},C=async(O,E)=>{try{const{error:D}=await K.from("saved_companies").delete().eq("id",O);if(D)throw D;if(l(M=>M.filter(X=>X.id!==O)),r&&o.find(X=>X.id===O)){const X=i();a(X,"remove")}t({title:"Company removed",description:`${E} has been removed from your saved companies.`})}catch(D){console.error("Error removing company:",D),t({title:"Error",description:"Failed to remove company.",variant:"destructive"})}},_=O=>O?O.charAt(0).toUpperCase():"?",A=O=>{var D;return!O||O==="null"||O.trim()===""?null:((D=O.split(`
934`).filter(M=>M.trim()!=="")[0])==null?void 0:D.trim())||null},P=O=>{try{return new Date(O).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return O}},R=O=>`/companies?search=${encodeURIComponent(O)}`,I=O=>{if(!O||!O.includes("Matchmaking Score:"))return null;const E=O.match(/Matchmaking Score:\s*(\d+)\/100/),D=O.match(/Ice Breaker:\s*([^\n]+(?:\n(?!Pitch:)[^\n]+)*)/),M=O.match(/Pitch:\s*([\s\S]+)/);return{score:E?parseInt(E[1]):null,iceBreaker:D?D[1].trim():null,pitch:M?M[1].trim():null}},B=O=>O>=80?"bg-green-100 text-green-800":O>=60?"bg-yellow-100 text-yellow-800":O>=40?"bg-orange-100 text-orange-800":"bg-red-100 text-red-800",$=O=>{p(E=>{const D=new Set(E);return D.has(O)?D.delete(O):D.add(O),D})},q=()=>{y.size===c.length?p(new Set):p(new Set(c.map(O=>O.id)))},L=()=>{p(new Set)},k=async O=>{try{v(!0);const E=await K.functions.invoke("export-saved-companies",{body:{company_ids:O||null}});if(E.error)throw new Error(E.error.message||"Export failed");const D=E.data,M=new Blob([D],{type:"text/csv"}),X=window.URL.createObjectURL(M),W=document.createElement("a");W.href=X,W.download=`saved-companies-${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(W),W.click(),document.body.removeChild(W),window.URL.revokeObjectURL(X),t({title:"Export successful",description:`${(O==null?void 0:O.length)||o.length} companies exported to CSV.`}),L()}catch(E){console.error("Export error:",E),t({title:"Export failed",description:E instanceof Error?E.message:"Failed to export companies.",variant:"destructive"})}finally{v(!1)}},T=()=>{y.size!==0&&k(Array.from(y))},F=()=>{k()};return f?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"w-5 h-5 text-red-500"}),"Saved Companies"]})}),s.jsx(te,{children:s.jsx("div",{className:"text-center py-8",children:s.jsx("p",{className:"text-gray-500",children:"Loading saved companies..."})})})]}):o.length===0?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"w-5 h-5 text-red-500"}),"Saved Companies"]})}),s.jsx(te,{children:s.jsxs("div",{className:"text-center py-8",children:[s.jsx(zn,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No saved companies yet"}),s.jsx("p",{className:"text-gray-500",children:"Start saving companies by clicking the heart icon on company cards."})]})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(Y,{children:[s.jsxs(xe,{children:[n&&r&&s.jsx("div",{className:"mb-4 p-4 bg-green-50 dark:bg-green-950/20 rounded-lg border border-green-200 dark:border-green-800",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Fn,{className:"w-5 h-5 text-green-600"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Total Pipeline Value"})]}),s.jsx("div",{className:"text-2xl font-bold text-green-600",children:rs(n.projected_revenue,r.currency_symbol)}),s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Expected: ",rs(n.expected_revenue,r.currency_symbol)," (",r.close_rate,"% close rate)"]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Active Companies"}),s.jsx("div",{className:"text-2xl font-bold",children:n.saved_companies})]})]})}),s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"w-5 h-5 text-red-500"}
934),"Saved Companies (",o.length,")"]}),c.length>0&&s.jsxs("div",{className:"flex items-center justify-between gap-4 p-3 bg-gray-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(vr,{checked:y.size===c.length&&c.length>0,onCheckedChange:q,className:"border-gray-300"}),s.jsx("span",{className:"text-sm text-gray-600",children:y.size>0?`${y.size} selected`:"Select all"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[y.size>0&&s.jsx(U,{variant:"outline",size:"sm",onClick:L,className:"text-gray-600",children:"Clear Selection"}),s.jsxs(U,{variant:"outline",size:"sm",onClick:T,disabled:y.size===0||x,className:"flex items-center gap-2",children:[s.jsx(Ka,{className:"w-4 h-4"}),x?"Exporting...":`Export Selected CSV (${y.size})`]}),s.jsxs(U,{variant:"outline",size:"sm",onClick:F,disabled:x,className:"flex items-center gap-2",children:[s.jsx(Ka,{className:"w-4 h-4"}),x?"Exporting...":"Export All CSV"]}),s.jsxs(U,{variant:"default",size:"sm",onClick:()=>{j(!1),w(!0)},disabled:y.size===0,className:"flex items-center gap-2",children:[s.jsx(Up,{className:"w-4 h-4"}),"Export to Sheets (",y.size,")"]}),s.jsxs(U,{variant:"default",size:"sm",onClick:()=>{j(!0),w(!0)},className:"flex items-center gap-2",children:[s.jsx(Up,{className:"w-4 h-4"}),"Export All to Sheets"]}),s.jsx(Att,{trigger:s.jsxs(U,{variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(vo,{className:"w-4 h-4"}),"Advanced Export"]})})]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(st,{className:"w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),s.jsx(at,{placeholder:"Search saved companies...",value:d,onChange:O=>h(O.target.value),className:"pl-10"})]})]}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:c.map(O=>{const E=A(O.company_logo_url),D=I(O.notes);return s.jsxs("div",{className:"border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-4 p-4",children:[s.jsx(vr,{checked:y.has(O.id),onCheckedChange:()=>$(O.id),className:"border-gray-300"}),s.jsxs(Ks,{className:"h-12 w-12 flex-shrink-0",children:[s.jsx(ni,{src:E||void 0,alt:`${O.company_name} logo`}),s.jsx(Ys,{className:"bg-agency-accent/10 text-agency-accent font-semibold",children:_(O.company_name)})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("a",{href:R(O.company_name),target:"_blank",rel:"noopener noreferrer",className:"font-medium text-gray-900 hover:text-orange-600 transition-colors cursor-pointer inline-flex items-center gap-1 group",children:[s.jsx("span",{className:"truncate",children:O.company_name}),s.jsx(ar,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]}),O.company_domain&&s.jsxs("div",{className:"flex items-center text-sm text-gray-600 mt-1",children:[s.jsx(ar,{className:"w-3 h-3 mr-1 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:O.company_domain})]}),s.jsxs("div",{className:"flex items-center text-xs text-gray-400 mt-1",children:[s.jsx(sn,{className:"w-3 h-3 mr-1"}),s.jsxs("span",{children:["Saved: ",P(O.saved_at)]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[(D==null?void 0:D.score)&&s.jsxs(fe,{className:`${B(D.score)} flex items-center gap-1`,children:[s.jsx(An,{className:"w-3 h-3"}),D.score,"%"]}),s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:[s.jsx(tt,{className:"w-3 h-3"}),"Saved"]}),s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>C(O.id,O.company_name),className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:s.jsx(co,{className:"w-4 h-4"})})]})]}),D&&s.jsxs(Yw,{children:[s.jsx(Xw,{asChild:!0,children:s.jsxs(U,{variant:"ghost",className:"w-full justify-between p-4 border-t border-gray-100 rounded-none hover:bg-gray-100",children:[s.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(An,{className:"w-4 h-4 text-yellow-500"}),"View Matchmaking Insights"]}),s.jsx("span",{className:"text-xs text-gray-500",children:"Click to expand"})]})}),s.jsx(Qw,{className:"px-4 pb-4 border-t border-gray-100",children:s.jsxs("div",{className:"space-y-3 pt-3",children:[D.iceBreaker&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(va,{className:"w-4 h-4 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Ice Breaker"})]}),s.jsx("p",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded-lg",children:D.iceBreaker})]}),D.pitch&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(tn,{className:"w-4 h-4 text-green-500"}),s.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Pitch Suggestions"})]}),s.jsx("p",{className:"text-sm text-gray-600 bg-green-50 p-3 rounded-lg whitespace-pre-line",children:D.pitch})]})]})})]})]},O.id)})})})]}),s.jsx(Ote,{open:b,onOpenChange:w,selectedCompanies:y,exportAll:S,searchTerm:d,source:"saved-companies"})]})},Ott=()=>{const{toast:e}=Ve(),[t,n]=g.useState(""),[r,a]=g.useState(!1),[i,o]=g.useState(!1),[l,c]=g.useState(null),[u,d]=g.useState(!1),h=async()=>{try{const{data:x,error:v}=await K.functions.invoke("manage-api-key",{body:{action:"get_status"}});if(v)throw v;c(x)}catch(x){console.error("Failed to fetch BYOK status:",x)}};g.useEffect(()=>{h()},[]);const f=async()=>
934{if(!t.trim()){e({title:"Error",description:"Please enter your OpenAI API key",variant:"destructive"});return}o(!0);try{const{data:x,error:v}=await K.functions.invoke("manage-api-key",{body:{action:"store",api_key:t.trim()}});if(v)throw v;x.valid?(e({title:"Success",description:`API key validated and stored. Last 4 characters: ${x.last_4_chars}`}),n(""),await h()):e({title:"Invalid Key",description:"The API key is invalid. Please check and try again.",variant:"destructive"})}catch(x){e({title:"Error",description:x instanceof Error?x.message:"Failed to store API key",variant:"destructive"})}finally{o(!1)}},m=async()=>{d(!0);try{const{data:x,error:v}=await K.functions.invoke("manage-api-key",{body:{action:"validate"}});if(v)throw v;e({title:x.valid?"Valid":"Invalid",description:x.valid?"Your API key is working correctly":"Your API key is invalid or expired",variant:x.valid?"default":"destructive"}),await h()}catch{e({title:"Error",description:"Failed to validate API key",variant:"destructive"})}finally{d(!1)}},y=async()=>{if(confirm("Are you sure you want to delete your API key? This will disable unlimited matchmaking.")){o(!0);try{const{error:x}=await K.functions.invoke("manage-api-key",{body:{action:"delete"}});if(x)throw x;e({title:"Deleted",description:"Your API key has been removed"}),await h()}catch{e({title:"Error",description:"Failed to delete API key",variant:"destructive"})}finally{o(!1)}}},p=()=>{if(!(l!=null&&l.byok_enabled))return s.jsx(fe,{variant:"secondary",children:"Inactive"});switch(l.byok_status){case"active":return s.jsxs(fe,{variant:"default",className:"bg-green-500",children:[s.jsx(ks,{className:"w-3 h-3 mr-1"}),"Valid"]});case"invalid":return s.jsxs(fe,{variant:"destructive",children:[s.jsx(Jy,{className:"w-3 h-3 mr-1"}),"Invalid"]});default:return s.jsx(fe,{variant:"secondary",children:"Unknown"})}};return s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(pf,{className:"w-5 h-5"}),"Bring Your Own Key (BYOK)"]}),s.jsx(Za,{children:"Use your own OpenAI API key for unlimited matchmaking. Your key is encrypted and secure."})]}),s.jsxs(te,{className:"space-y-6",children:[l&&s.jsxs("div",{className:"p-4 border rounded-lg bg-muted/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"font-medium",children:"Current Status:"}),p()]}),l.byok_enabled&&l.byok_last_4_chars&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsxs("span",{children:["Key ending in: ****",l.byok_last_4_chars]}),l.unlimited_matchmaking&&s.jsx(fe,{variant:"outline",className:"text-xs",children:"Unlimited"})]})]}),s.jsx(Cs,{children:s.jsxs(Es,{children:[s.jsx("strong",{children:"Benefits:"})," Unlimited matchmaking runs, unlimited Slaygent chat queries, direct OpenAI billing, enhanced rate limits, and premium features."]})}),(l==null?void 0:l.unlimited_matchmaking)&&s.jsxs("div",{className:"p-4 border rounded-lg bg-green-50 border-green-200",children:[s.jsx("h4",{className:"font-medium text-green-800 mb-2",children:"🚀 Unlimited Features Enabled:"}),s.jsxs("ul",{className:"text-sm text-green-700 space-y-1",children:[s.jsx("li",{children:"✅ Matchmaking Runs (normally 50/day, 1000/month)"}),s.jsx("li",{children:"✅ Slaygent Chat Queries (normally limited by plan)"}),s.jsx("li",{children:"✅ Premium AI Model Access (GPT-4o-mini)"}),s.jsx("li",{children:"✅ Direct OpenAI Billing (your costs, your control)"})]})]}),(l==null?void 0:l.unlimited_matchmaking)&&s.jsxs("div",{className:"p-4 border rounded-lg bg-blue-50 border-blue-200",children:[s.jsx("h4",{className:"font-medium text-blue-800 mb-2",children:"🔮 Coming Soon with BYOK:"}),s.jsxs("ul",{className:"text-sm text-blue-700 space-y-1",children:[s.jsx("li",{children:"🚧 AI-Powered Company Research"}),s.jsx("li",{children:"🚧 Automated Email Generation"}),s.jsx("li",{children:"🚧 Voice AI Chat (Realtime API)"}),s.jsx("li",{children:"🚧 Advanced Analytics & Insights"})]})]}),(!(l!=null&&l.byok_enabled)||(l==null?void 0:l.byok_status)==="invalid")&&s.jsxs("div",{className:"space-y-4",children:[s.jsx(Ke,{htmlFor:"api-key",children:"OpenAI API Key"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"api-key",type:r?"text":"password",placeholder:"sk-...",value:t,onChange:x=>n(x.target.value),className:"pr-10"}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>a(!r),children:r?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]}),s.jsx(U,{onClick:f,disabled:i,className:"w-full",children:i?"Validating...":"Store & Validate Key"})]}),(l==null?void 0:l.byok_enabled)&&s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(U,{variant:"outline",onClick:m,disabled:u,className:"flex-1",children:[s.jsx(wle,{className:"w-4 h-4 mr-2"}),u?"Validating...":"Re-validate"]}),s.jsxs(U,{variant:"destructive",onClick:y,disabled:i,children:[s.jsx(co,{className:"w-4 h-4 mr-2"}),"Remove"]})]}),s.jsxs("div",{className:"text-xs text-muted-foreground p-3 bg-muted rounded-md space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Security:"})," Your API key is encrypted before storage and never exposed to the frontend or logs. O
934nly backend functions can decrypt and use it for your requests."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"AI Services:"})," Matchmaking uses OpenAI GPT-4o-mini, Slaygent chat uses GPT-4o-mini (with DeepSeek fallback for non-BYOK users)."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Usage:"})," All usage with BYOK bypasses platform limits and bills directly to your OpenAI account."]})]})]})]})},mI=g.forwardRef((e,t)=>{var f,m;const{user:n}=Ie(),{toast:r}=Ve(),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState({fullName:((f=n==null?void 0:n.user_metadata)==null?void 0:f.full_name)||((m=n==null?void 0:n.user_metadata)==null?void 0:m.name)||"",email:(n==null?void 0:n.email)||"",currentPassword:"",newPassword:"",confirmPassword:""});g.useImperativeHandle(t,()=>({openDialog:()=>i(!0)}));const d=async()=>{if(n){l(!0);try{const{error:y}=await K.from("profiles").update({full_name:c.fullName}).eq("id",n.id);if(y)throw y;const{error:p}=await K.auth.updateUser({data:{full_name:c.fullName}});if(p)throw p;r({title:"Profile updated",description:"Your profile has been updated successfully."})}catch(y){console.error("Error updating profile:",y),r({title:"Error",description:"Failed to update profile. Please try again.",variant:"destructive"})}finally{l(!1)}}},h=async()=>{if(c.newPassword!==c.confirmPassword){r({title:"Error",description:"New passwords don't match.",variant:"destructive"});return}if(c.newPassword.length<6){r({title:"Error",description:"Password must be at least 6 characters long.",variant:"destructive"});return}l(!0);try{const{error:y}=await K.auth.updateUser({password:c.newPassword});if(y)throw y;r({title:"Password changed",description:"Your password has been updated successfully."}),u(p=>({...p,currentPassword:"",newPassword:"",confirmPassword:""}))}catch(y){console.error("Error changing password:",y),r({title:"Error",description:"Failed to change password. Please try again.",variant:"destructive"})}finally{l(!1)}};return s.jsxs(Wr,{open:a,onOpenChange:i,children:[s.jsx(wd,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"w-full justify-start",children:[s.jsx(vo,{className:"w-4 h-4 mr-2"}),"Account Settings"]})}),s.jsxs(Pr,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsx(Vr,{children:s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(vo,{className:"w-5 h-5"}),"Account Settings"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Y,{children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(Se,{className:"text-sm flex items-center gap-2",children:[s.jsx(Ti,{className:"w-4 h-4"}),"Profile Information"]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"fullName",children:"Full Name"}),s.jsx(at,{id:"fullName",value:c.fullName,onChange:y=>u(p=>({...p,fullName:y.target.value})),placeholder:"Enter your full name"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"email",children:"Email"}),s.jsx(at,{id:"email",value:c.email,disabled:!0,className:"bg-gray-100"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Email cannot be changed"})]}),s.jsxs(U,{onClick:d,disabled:o,className:"w-full",children:[s.jsx(PS,{className:"w-4 h-4 mr-2"}),"Update Profile"]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(Se,{className:"text-sm flex items-center gap-2",children:[s.jsx(Tg,{className:"w-4 h-4"}),"Change Password"]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"newPassword",children:"New Password"}),s.jsx(at,{id:"newPassword",type:"password",value:c.newPassword,onChange:y=>u(p=>({...p,newPassword:y.target.value})),placeholder:"Enter new password"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"confirmPassword",children:"Confirm Password"}),s.jsx(at,{id:"confirmPassword",type:"password",value:c.confirmPassword,onChange:y=>u(p=>({...p,confirmPassword:y.target.value})),placeholder:"Confirm new password"})]}),s.jsxs(U,{onClick:h,disabled:o||!c.newPassword||!c.confirmPassword,className:"w-full",children:[s.jsx(Tg,{className:"w-4 h-4 mr-2"}),"Change Password"]})]})]})]}),s.jsx("div",{className:"space-y-6",children:s.jsx(Ott,{})})]})]})]})});mI.displayName="AccountSettings";const Ite=({trigger:e})=>{const{user:t}=Ie(),[n,r]=g.useState(!1),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(""),[d,h]=g.useState("");g.useEffect(()=>{n&&t&&f()},[n,t]);const f=async()=>
934{if(t){i(!0);try{const{data:p,error:x}=await K.from("matchmaking_profiles").select("company_description, ideal_customer_profile").eq("user_id",t.id).single();p&&(u(p.company_description||""),h(p.ideal_customer_profile||""))}catch{console.log("No existing profile found")}finally{i(!1)}}},m=async()=>{if(t){if(!c.trim()||!d.trim()){Ae.error("Please fill in both fields");return}l(!0);try{const{error:p}=await K.from("matchmaking_profiles").upsert({user_id:t.id,company_description:c.trim(),ideal_customer_profile:d.trim(),updated_at:new Date().toISOString()},{onConflict:"user_id"});if(p)throw p;Ae.success("Matchmaking profile saved successfully"),r(!1)}catch(p){console.error("Error saving profile:",p),Ae.error("Failed to save profile")}finally{l(!1)}}},y=s.jsxs(U,{variant:"outline",size:"sm",className:"gap-2",children:[s.jsx(zn,{className:"h-4 w-4"}),"Matchmaking Profile"]});return s.jsxs(Wr,{open:n,onOpenChange:r,children:[s.jsx(wd,{asChild:!0,children:e||y}),s.jsxs(Pr,{className:"max-w-2xl",children:[s.jsx(Vr,{children:s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"h-5 w-5 text-red-500"}),"Matchmaking Profile"]})}),a?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"company-description",children:"Company Description"}),s.jsx(Xg,{id:"company-description",placeholder:"Describe your company, what you do, your services/products, target market, etc.",value:c,onChange:p=>u(p.target.value),rows:4,className:"resize-none"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Help our AI understand your business to find better matches."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"ideal-customer",children:"Ideal Customer Profile"}),s.jsx(Xg,{id:"ideal-customer",placeholder:"Describe your ideal customer: company size, industry, pain points, buying behavior, decision makers, etc.",value:d,onChange:p=>h(p.target.value),rows:4,className:"resize-none"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"The more specific you are, the better matches you'll get."})]}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(U,{variant:"outline",onClick:()=>r(!1),disabled:o,children:"Cancel"}),s.jsxs(U,{onClick:m,disabled:o||!c.trim()||!d.trim(),className:"gap-2",children:[o?s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):s.jsx(PS,{className:"h-4 w-4"}),"Save Profile"]})]})]})]})]})},Rtt=()=>{var E,D;const{user:e,signOut:t,subscribed:n,subscriptionTier:r,usageCount:a,usageLimit:i,dailyScrapes:o,dailyProfiles:l,dailyScrapeLimit:c,dailyProfileLimit:u,refreshSubscription:d,openCustomerPortal:h,isAdmin:f,monthlyResearch:m,monthlyResearchLimit:y,monthlySlaygent:p,monthlySlaygentLimit:x,monthlyMatchmaking:v,monthlyMatchmakingLimit:b,getMonthlyResearchLimit:w,getMonthlySlaygentLimit:S,getMonthlyMatchmakingLimit:j}=Ie(),[N,C]=g.useState(!1),[_,A]=g.useState(!1),[P,R]=g.useState(!1),[I,B]=g.useState(!1),[$,q]=g.useState(0),{toast:L}=Ve();g.useEffect(()=>{(async()=>{if(e)try{const{data:X,error:W}=await K.rpc("get_user_saved_companies_count",{p_user_id:e.id});if(W)throw W;q(X||0)}catch(X){console.error("Error fetching saved companies count:",X)}})()},[e]);const k=async()=>{C(!0),await d(),C(!1),L({title:"Subscription refreshed",description:"Your subscription status has been updated."})},T=async()=>{A(!0);try{const M=await h();M&&window.open(M,"_blank")}catch(M){console.error("Error opening customer portal:",M)}finally{A(!1)}},F=M=>{switch(M){case"starter":return"bg-gradient-to-r from-blue-400 to-blue-600";case"growth":return"bg-gradient-to-r from-green-400 to-green-600";case"pro":return"bg-gradient-to-r from-purple-500 to-purple-700";default:return"bg-gradient-to-r from-gray-400 to-gray-600"}};if(!e)return null;const O=((E=e.user_metadata)==null?void 0:E.full_name)||((D=e.user_metadata)==null?void 0:D.name)||"";return P&&f?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-xl font-semibold",children:"Admin Dashboard"}),s.jsx(U,{variant:"outline",onClick:()=>R(!1),children:"Back to Profile"})]}),s.jsx(XJe,{})]}):I?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-xl font-semibold",children:"Saved Companies"}),s.jsx(U,{variant:"outline",onClick:()=>B(!1),children:"Back to Profile"})]}),s.jsx(Rte,{})]}):s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[f&&s.jsx(Y,{className:"border-blue-200 bg-blue-50",children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ya,{className:"w-5 h-5 text-blue-600"}),s.jsx("span",{className:"font-medium text-blue-900",children:"Admin Access Available"})]}),s.jsx(U,{onClick:()=>R(!0),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Open Admin Dashboard"})]})})}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(Ti,{className:"w-5 h-5"}),"Profile Overview"]})}),s.jsxs(te,{className:"space-y-4",children:[O&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Name"}),s.jsx("p",{className:"font-medium",children:O})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Email"}),s.jsx("p",{className:"font-medium",children:e.email})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Account Status"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(fe,{variant:n?"default":"secondary",children:n?"Premium":"Free"}),f&&s.jsxs(fe,{variant:"destructive",className:"flex items-center gap-1",children:[s.jsx(Ya,{className:"w-3 h-3"}),"Admin"]})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Subscription Tier"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(fe,{className:`${F(r)} text-white capitalize`,children:r||"Free"}),s.jsxs(U,{variant:"outline",size:"sm",onClick:k,disabled:N,children:[s.jsx(dt,{className:`w-4 h-4 mr-1 ${N?"animate-spin":""}`}),"Refresh"]})]})]})]})]}),s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:r==="starter"?"Daily Usage":n?"Monthly Usage":"Daily Usage"}),s.jsx("p",{className:"text-sm text-gray-500",children:r==="starter"?"Resets every day at midnight CET":n?"Re
934sets monthly":"Resets every day at midnight CET"})]}),s.jsx(te,{className:"space-y-6",children:n&&r!=="starter"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"w-4 h-4 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Research Companies"})]}),s.jsxs("span",{className:"text-sm",children:[m||0," / ",w()]})]}),s.jsx(ur,{value:(m||0)/w()*100,className:"h-2"}),(m||0)>=w()&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Monthly research limit reached. Upgrade for more research queries."})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(va,{className:"w-4 h-4 text-purple-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Slaygent Queries"})]}),s.jsxs("span",{className:"text-sm",children:[p||0," / ",S()]})]}),s.jsx(ur,{value:(p||0)/S()*100,className:"h-2"}),(p||0)>=S()&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Monthly Slaygent limit reached. Upgrade for more queries."})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{className:"w-4 h-4 text-yellow-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Matchmaking Runs"})]}),s.jsxs("span",{className:"text-sm",children:[v||0," / ",j()]})]}),s.jsx(ur,{value:(v||0)/j()*100,className:"h-2"}),(v||0)>=j()&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Monthly matchmaking limit reached. Upgrade for more matches."})})]})]}):r==="starter"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"w-4 h-4 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Daily Scrapes"})]}),s.jsxs("span",{className:"text-sm",children:[o," / Unlimited"]})]}),s.jsx(ur,{value:0,className:"h-2"}),s.jsx("p",{className:"text-sm text-green-600",children:"Unlimited daily scraping available"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(zr,{className:"w-4 h-4 text-green-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Company Views"})]}),s.jsxs("span",{className:"text-sm",children:[l," / Unlimited"]})]}),s.jsx(ur,{value:0,className:"h-2"}),s.jsx("p",{className:"text-sm text-green-600",children:"Unlimited daily company views available"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(va,{className:"w-4 h-4 text-purple-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Monthly Slaygent Queries"})]}),s.jsxs("span",{className:"text-sm",children:[p||0," / ",S()]})]}),s.jsx(ur,{value:(p||0)/S()*100,className:"h-2"}),(p||0)>=S()&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Monthly Slaygent limit reached. Upgrade for more queries."})})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"w-4 h-4 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Daily Scrapes"})]}),s.jsxs("span",{className:"text-sm",children:[o," / ",c]})]}),s.jsx(ur,{value:o/c*100,className:"h-2"}),o>=c&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Daily scrape limit reached. Upgrade for unlimited scraping."})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(zr,{className:"w-4 h-4 text-green-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Company Views"})]}),s.jsxs("span",{className:"text-sm",children:[l," / ",u]})]}),s.jsx(ur,{value:l/u*100,className:"h-2"}),l>=u&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Daily company view limit reached. Upgrade for unlimited viewing."})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(va,{className:"w-4 h-4 text-purple-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Slaygent Chat"})]}),s.jsxs("span",{className:"text-sm",children:[a," / ",i]})]}),s.jsx(ur,{value:a/i*100,className:"h-2"}),a>=i&&s.jsx("p",{className:"text-sm text-red-600",children:s.jsx(ee,{to:"/pricing",className:"hover:underline",children:"Daily chat limit reached. Upgrade for unlimited queries."})})]})]})})]}),s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(An,{className:"w-5 h-5 text-yellow-600"}),"AI Matchmaking Profile"]}),s.jsx("p",{className:"text-sm text-gray-500",children:"Set up your company details for AI-powered matchmaking"})]}),s.jsx(te,{children:s.jsx(Ite,{})})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"w-5 h-5 text-red-500"}
934),"Saved Companies"]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:$}),s.jsx("p",{className:"text-sm text-gray-500",children:"Companies saved"})]}),s.jsxs(U,{onClick:()=>B(!0),variant:"outline",className:"flex items-center gap-2",children:[s.jsx(zn,{className:"w-4 h-4"}),"View All"]})]}),$===0&&s.jsx("p",{className:"text-sm text-gray-500",children:"Start saving companies by clicking the heart icon on company cards."})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Account Actions"})}),s.jsxs(te,{className:"space-y-3",children:[s.jsx(mI,{}),s.jsxs(U,{variant:"outline",className:"w-full justify-start",onClick:()=>B(!0),children:[s.jsx(zn,{className:"w-4 h-4 mr-2"}),"Saved Companies (",$,")"]}),f&&s.jsxs(U,{variant:"outline",className:"w-full justify-start",onClick:()=>R(!0),children:[s.jsx(Ya,{className:"w-4 h-4 mr-2"}),"Admin Dashboard"]}),s.jsxs(U,{variant:"outline",className:"w-full justify-start",onClick:T,disabled:_||!n,children:[s.jsx(lle,{className:"w-4 h-4 mr-2"}),_?"Opening...":"Manage Subscription",!_&&s.jsx(ar,{className:"w-4 h-4 ml-auto"})]}),s.jsxs(U,{className:"w-full justify-start text-white hover:opacity-90",style:{backgroundColor:"rgb(234, 85, 43)"},onClick:t,children:[s.jsx(Vq,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]})]})]})]})},Itt=({className:e=""})=>{const[t,n]=g.useState([]),[r,a]=g.useState(!0),[i,o]=g.useState(1),[l,c]=g.useState(0),[u,d]=g.useState(!1),{user:h}=Ie(),{toast:f}=Ve(),m=10,y=async(b=1)=>{if(h)try{a(!0);const{data:w,error:S}=await K.functions.invoke("get-user-upvotes",{body:{page:b,limit:m}});if(S)throw S;w&&w.success&&(n(b===1?w.upvotes:j=>[...j,...w.upvotes]),c(w.pagination.total),d(w.pagination.hasMore),o(b))}catch{f({title:"Error",description:"Failed to load your upvote history.",variant:"destructive"})}finally{a(!1)}};g.useEffect(()=>{h&&y(1)},[h]);const p=()=>{u&&!r&&y(i+1)},x=b=>new Date(b).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),v=b=>{const w={funding:"bg-green-100 text-green-800",product:"bg-blue-100 text-blue-800",hiring:"bg-purple-100 text-purple-800",partnership:"bg-orange-100 text-orange-800",default:"bg-gray-100 text-gray-800"};return w[b.toLowerCase()]||w.default};return h?s.jsxs("div",{className:e,children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(zn,{className:"w-6 h-6 text-red-500"}),s.jsx("h2",{className:"text-2xl font-bold",children:"Your Upvoted Signals"}),s.jsxs(fe,{variant:"secondary",children:[l," total"]})]}),r&&t.length===0?s.jsx("div",{className:"space-y-4",children:[...Array(5)].map((b,w)=>s.jsx(Y,{className:"p-4",children:s.jsx("div",{className:"animate-pulse",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"w-12 h-12 bg-gray-200 rounded-lg"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/2"}),s.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/4"})]})]})})},w))}):t.length>0?s.jsxs("div",{className:"space-y-4",children:[t.map(b=>s.jsx(Y,{className:"p-4 hover:shadow-md transition-shadow",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg bg-gray-100 flex items-center justify-center overflow-hidden flex-shrink-0",children:b.signal.company_logo_url?s.jsx("img",{src:b.signal.company_logo_url,alt:b.signal.company_name,className:"w-full h-full object-cover"}):s.jsx(tt,{className:"w-6 h-6 text-gray-400"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[s.jsx("h3",{className:"font-semibold text-gray-900 truncate",children:b.signal.company_name}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 flex-shrink-0",children:[s.jsx(zn,{className:"w-4 h-4 text-red-500 fill-current"}),s.jsx("span",{children:b.signal.upvote_count})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(fe,{className:v(b.signal.signal_type),children:b.signal.signal_type}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-500",children:[s.jsx(sn,{className:"w-3 h-3"}),s.jsx("span",{children:x(b.signal.signal_date)})]})]}
934),s.jsx("h4",{className:"font-medium text-gray-800 mb-1",children:b.signal.signal_title}),b.signal.signal_description&&s.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 mb-2",children:b.signal.signal_description}),s.jsxs("div",{className:"text-xs text-gray-500",children:["Upvoted on ",x(b.upvoted_at)]})]})]})},b.upvote_id)),u&&s.jsx("div",{className:"text-center pt-4",children:s.jsx(U,{onClick:p,disabled:r,variant:"outline",children:r?"Loading...":"Load More"})})]}):s.jsxs(Y,{className:"p-8 text-center",children:[s.jsx(zn,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No upvoted signals yet"}),s.jsx("p",{className:"text-gray-600",children:"Start exploring signals and upvote the ones you find interesting!"})]})]}):s.jsx(Y,{className:`p-6 text-center ${e}`,children:s.jsx("p",{className:"text-gray-600",children:"Please sign in to view your upvote history."})})},b1=({children:e,requireSubscription:t=!1,allowPublic:n=!1})=>{const{user:r,loading:a,subscribed:i,usageCount:o,usageLimit:l}=Ie();return a?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin mx-auto mb-4 text-agency-accent"}),s.jsx("p",{className:"text-gray-600",children:"Loading..."})]})}):n?s.jsx(s.Fragment,{children:e}):r?!i&&o>=l?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 px-6",children:s.jsxs("div",{className:"max-w-md text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Usage Limit Reached"}),s.jsxs("p",{className:"text-gray-600 mb-6",children:["You've reached your free tier limit of ",l," API calls. Upgrade to a premium plan to continue using our services."]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("button",{onClick:()=>window.location.href="/pricing",className:"w-full bg-agency-accent text-white px-4 py-2 rounded-lg hover:bg-agency-accent/90 transition-colors",children:"Upgrade Now"}),s.jsx("button",{onClick:()=>window.location.href="/",className:"w-full bg-gray-200 text-gray-800 px-4 py-2 rounded-lg hover:bg-gray-300 transition-colors",children:"Go Home"})]})]})}):t&&!i?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 px-6",children:s.jsxs("div",{className:"max-w-md text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Premium Feature"}),s.jsx("p",{className:"text-gray-600 mb-6",children:"This feature requires a premium subscription. Upgrade to access all features."}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("button",{onClick:()=>window.location.href="/pricing",className:"w-full bg-agency-accent text-white px-4 py-2 rounded-lg hover:bg-agency-accent/90 transition-colors",children:"Upgrade Now"}),s.jsx("button",{onClick:()=>window.location.href="/",className:"w-full bg-gray-200 text-gray-800 px-4 py-2 rounded-lg hover:bg-gray-300 transition-colors",children:"Go Home"})]})]})}):s.jsx(s.Fragment,{children:e}):s.jsx(Mhe,{to:"/auth",replace:!0})};var pI="Switch",[Mtt,fht]=Qs(pI),[Dtt,Ltt]=Mtt(pI),Mte=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,m]=g.useState(null),y=lt(t,w=>m(w)),p=g.useRef(!1),x=f?d||!!f.closest("form"):!0,[v=!1,b]=Hs({prop:a,defaultProp:i,onChange:u});return s.jsxs(Dtt,{scope:n,checked:v,disabled:l,children:[s.jsx(Te.button,{type:"button",role:"switch","aria-checked":v,"aria-required":o,"data-state":$te(v),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:y,onClick:we(e.onClick,w=>{b(S=>!S),x&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),x&&s.jsx($tt,{control:f,bubbles:!p.current,name:r,value:c,checked:v,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});Mte.displayName=pI;var Dte="SwitchThumb",Lte=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=Ltt(Dte,n);return s.jsx(Te.span,{"data-state":$te(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Lte.displayName=Dte;var $tt=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,i=g.useRef(null),o=_2(n),l=VA(t);return g.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&h){const f=new Event("click",{bubbles:r});h.call(c,n),c.dispatchEvent(f)}},[o,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function $te(e){return e?"checked":"unchecked"}var Fte=Mte,Ftt=Lte;const Bte=g.forwardRef(({className:e,...t},n)=>s.jsx(Fte,{className:ve("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(Ftt,{className:ve("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
934));Bte.displayName=Fte.displayName;const Btt=["Technology","Healthcare","Finance","E-commerce","SaaS","Marketing","Education","Manufacturing","Real Estate","Media","Food & Beverage","Transportation","Energy","Retail","Telecommunications","Other"],ztt=["Pre-Seed","Seed","Series A","Series B","Series C","Series D+","Growth","Public","Bootstrapped","Unknown"],Utt=["San Francisco","New York","London","Berlin","Tel Aviv","Toronto","Austin","Seattle","Boston","Los Angeles","Chicago","Miami"],zte=()=>{const{user:e,hasAutoProspectingAccess:t}=Ie(),{toast:n}=Ve(),[r,a]=g.useState({is_active:!1,score_threshold:80,max_companies_per_day:10,max_total_companies:100,industries:[],employee_count_min:void 0,employee_count_max:void 0,funding_stages:[],locations:[]}),[i,o]=g.useState(!0),[l,c]=g.useState(!1),[u,d]=g.useState(!1),[h,f]=g.useState(!1);g.useState(!1),g.useState("today"),g.useState(""),g.useEffect(()=>{e&&(y(),m())},[e]);const m=async()=>{if(e)try{const{data:b,error:w}=await K.from("matchmaking_profiles").select("*").eq("user_id",e.id).single();if(w||!b){d(!1),f(!1);return}const S=!!(b.company_description&&b.ideal_customer_profile);d(S);const{data:j}=await K.from("profiles").select("byok_enabled").eq("id",e.id).single();f(!!(j!=null&&j.byok_enabled))}catch(b){console.error("Error checking prerequisites:",b),d(!1),f(!1)}},y=async()=>{if(e)try{const{data:b,error:w}=await K.from("auto_prospecting_settings").select("*").eq("user_id",e.id).single();if(w&&w.code!=="PGRST116")throw w;b&&a({id:b.id,is_active:b.is_active,score_threshold:b.score_threshold,max_companies_per_day:b.max_companies_per_day,max_total_companies:b.max_total_companies,industries:b.industries||[],employee_count_min:b.employee_count_min,employee_count_max:b.employee_count_max,funding_stages:b.funding_stages||[],locations:b.locations||[]})}catch(b){console.error("Error loading settings:",b),n({title:"Error",description:"Failed to load auto-prospecting settings",variant:"destructive"})}finally{o(!1)}},p=async()=>{if(e){c(!0);try{const b={user_id:e.id,is_active:r.is_active,score_threshold:r.score_threshold,max_companies_per_day:r.max_companies_per_day,max_total_companies:r.max_total_companies,industries:r.industries,employee_count_min:r.employee_count_min,employee_count_max:r.employee_count_max,funding_stages:r.funding_stages,locations:r.locations};if(r.id){const{error:w}=await K.from("auto_prospecting_settings").update(b).eq("id",r.id);if(w)throw w}else{const{data:w,error:S}=await K.from("auto_prospecting_settings").insert([b]).select().single();if(S)throw S;a(j=>({...j,id:w.id}))}n({title:"Settings Saved",description:"Your auto-prospecting settings have been updated successfully"})}catch(b){console.error("Error saving settings:",b),n({title:"Error",description:"Failed to save settings",variant:"destructive"})}finally{c(!1)}}},x=async()=>{const b=!r.is_active;a(w=>({...w,is_active:b})),c(!0);try{if(r.id){const{error:w}=await K.from("auto_prospecting_settings").update({is_active:b}).eq("id",r.id);if(w)throw w;n({title:b?"Auto-Prospecting Started":"Auto-Prospecting Stopped",description:b?"Auto-prospecting is now running and will match new companies automatically":"Auto-prospecting has been paused"})}}catch(w){console.error("Error toggling automation:",w),a(S=>({...S,is_active:!b})),n({title:"Error",description:"Failed to update automation status",variant:"destructive"})}finally{c(!1)}},v=u&&h&&t();return i?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(tn,{className:"w-5 h-5"}),"Auto-Prospecting"]})}),s.jsx(te,{children:s.jsxs("div",{className:"animate-pulse space-y-4",children:[s.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),s.jsx("div",{className:"h-10 bg-muted rounded"}),s.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})})]}):s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(tn,{className:"w-5 h-5"}),"Auto-Prospecting",r.is_active&&s.jsx(fe,{variant:"secondary",className:"bg-green-100 text-green-800",children:"Active"})]}),s.jsx(Za,{children:"Automatically find and match potential customers as new companies enter our system"})]}),s.jsxs(te,{className:"space-y-6",children:[!v&&s.jsxs(Cs,{children:[s.jsx(mf,{className:"h-4 w-4"}),s.jsx(Es,{children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-medium",children:"Requirements to enable Auto-Prospecting:"}),s.jsxs("ul",{className:"space-y-1 text-sm",children:[!u&&s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"w-4 h-4 rounded-full bg-red-100 text-red-600 text-xs flex items-center justify-center",children:"✕"}),"Create a matchmaking profile with company description and ideal customer profile"]}),!h&&s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(fc,{className:"w-4 h-4 text-yellow-600"}),"Enable BYOK (Bring Your Own Key) with your OpenAI API key in Account Settings"]}),!t()&&s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(fc,{className:"w-4 h-4 text-yellow-600"}),"Upgrade to Growth or Pro plan for auto-prospecting access"]})]})]})})]}),s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"font-medium",children:"Automation Status"}),r.is_active?s.jsx(Kq,{className:"w-4 h-4 text-green-600"}):s.jsx(xle,{className:"w-4 h-4 text-gray-400"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:r.is_active?"Auto-prospecting is running. New companies will be automatically matched against your criteria.":"Auto-prospecting is paused. Enable to start automatically matching new companies."})]}),s.jsx(Bte,{checked:r.is_active,onCheckedChange:x,disabled:l||!v})]}),s.jsx(qa,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"score-threshold",children:"Minimum Match Score"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(at,{id:"score-threshold",type:"number",min:"1",max:"100",value:r.score_threshold,onChange:b=>a(w=>({...w,score_threshold:parseInt(b.target.value)||80})),className:"w-24"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Only companies scoring ",r.score_threshold,"+ will be saved"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ke,{htmlFor:"daily-limit",className:"flex items-center gap-2",children:[s.jsx(sn,{className:"w-4 h-4"}),"Daily Match Limit"]}),s.jsx(at,{id:"daily-limit",type:"number",min:"1",max:"50",value:r.max_companies_per_day,onChange:b=>a(w=>({...w,max_companies_per_day:parseInt(b.target.value)||10}))}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Max companies to match per day"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ke,{htmlFor:"total-limit",className:"flex items-center gap-2",children:[s.jsx(tn,{className:"w-4 h-4"}),"Total Match Limit"]}),s.jsx(at,{id:"total-limit",type:"number",min:"1",max:"1000",value:r.max_total_companies,onChange:b=>a(w=>({...w,max_total_companies:parseInt(b.target.value)||100}))}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Max total companies to store"})]})]}),s.jsx(qa,{}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Qu,{className:"w-4 h-4"}),s.jsx("h3",{className:"font-medium",children:"Filters (Optional)"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{children:"Industries"}),s.jsxs(hr,{onValueChange:b=>{b==="clear"?a(w=>({...w,industries:[]})):r.industries.includes(b)||a(w=>({...w,industries:[...w.industries,b]}))},children:[s.jsx(nr,{children:s.jsx(fr,{placeholder:"Add industry filter"})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"clear",children:"Clear all"}),Btt.map(b=>s.jsx(bt,{value:b,children:b},b))]})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:r.industries.map(b=>s.jsxs(fe,{variant:"secondary",className:"cursor-pointer",onClick:()=>{a(w=>({...w,industries:w.industries.filter(S=>S!==b)}))},children:[b," ×"]},b))})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"emp-min",children:"Min Employees"}),s.jsx(at,{id:"emp-min",type:"number",placeholder:"Any",value:r.employee_count_min||"",onChange:b=>a(w=>({...w,employee_count_min:b.target.value?parseInt(b.target.value):void 0}))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"emp-max",children:"Max Employees"}),s.jsx(at,{id:"emp-max",type:"number",placeholder:"Any",value:r.employee_count_max||"",onChange:b=>a(w=>({...w,employee_count_max:b.target.value?parseInt(b.target.value):void 0}))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{children:"Funding Stages"}),s.jsxs(hr,{onValueChange:b=>{b==="clear"?a(w=>({...w,funding_stages:[]})):r.funding_stages.includes(b)||a(w=>({...w,funding_stages:[...w.funding_stages,b]}))},children:[s.jsx(nr,{children:s.jsx(fr,{placeholder:"Add funding stage filter"})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"clear",children:"Clear all"}),ztt.map(b=>s.jsx(bt,{value:b,children:b},b))]})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:r.funding_stages.map(b=>s.jsxs(fe,{variant:"secondary",className:"cursor-pointer",onClick:()=>{a(w=>({...w,funding_stages:w.funding_stages.filter(S=>S!==b)}))},children:[b," ×"]},b))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{children:"Locations"}),s.jsxs(hr,{onValueChange:b=>{b==="clear"?a(w=>({...w,locations:[]})):r.locations.includes(b)||a(w=>({...w,locations:[...w.locations,b]}))},children:[s.jsx(nr,{children:s.jsx(fr,{placeholder:"Add location filter"})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"clear",children:"Clear all"}),Utt.map(b=>s.jsx(bt,{value:b,children:b},b))]})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:r.locations.map(b=>s.jsxs(fe,{variant:"secondary",className:"cursor-pointer",onClick:()=>{a(w=>({...w,locations:w.locations.filter(S=>S!==b)}))},children:[b," ×"]},b))})]})]}),s.jsx(qa,{}),s.jsx("div",{className:"flex justify-end pt-4",children:s.jsxs(U,{onClick:p,disabled:l||!v,className:"flex items-center gap-2",children:[s.jsx(vo,{className:"w-4 h-4"}),l?"Saving...":"Save Settings"]})})]})]})};function qtt(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}
vendor: 18,560 bytes, lines 934-941
934var Wtt="DismissableLayer",NT="dismissableLayer.update",Vtt="dismissableLayer.pointerDownOutside",Htt="dismissableLayer.focusOutside",EB,Ute=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qte=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(Ute),[d,h]=g.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),y=lt(t,C=>h(C)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(x),b=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,j=Ytt(C=>{const _=C.target,A=[...u.branches].some(P=>P.contains(_));!S||A||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),N=Xtt(C=>{const _=C.target;[...u.branches].some(P=>P.contains(_))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return qtt(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(EB=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),kB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=EB)}},[d,f,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),kB())},[d,u]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(NT,C),()=>document.removeEventListener(NT,C)},[]),s.jsx(Te.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,j.onPointerDownCapture)})});qte.displayName=Wtt;var Gtt="DismissableLayerBranch",Ktt=g.forwardRef((e,t)=>{const n=g.useContext(Ute),r=g.useRef(null),a=lt(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Te.div,{...e,ref:a})});Ktt.displayName=Gtt;function Ytt(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){Wte(Vtt,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Xtt(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&Wte(Htt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kB(){const e=new CustomEvent(NT);document.dispatchEvent(e)}function Wte(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lc(a,i):a.dispatchEvent(i)}var Y_="focusScope.autoFocusOnMount",X_="focusScope.autoFocusOnUnmount",PB={bubbles:!1,cancelable:!0},Qtt="FocusScope",Vte=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=Dt(a),d=Dt(i),h=g.useRef(null),f=lt(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:Ml(h.current,{select:!0})},x=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||Ml(h.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Ml(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const b=new MutationObserver(v);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),b.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){AB.add(m);const p=document.activeElement;if(!l.contains(p)){const v=new CustomEvent(Y_,PB);l.addEventListener(Y_,u),l.dispatchEvent(v),v.defaultPrevented||(Ztt(rnt(Hte(l)),{select:!0}),document.activeElement===p&&Ml(l))}return()=>{l.removeEventListener(Y_,u),setTimeout(()=>{const v=new CustomEvent(X_,PB);l.addEventListener(X_,d),l.dispatchEvent(v),v.defaultPrevented||Ml(p??document.body,{select:!0}),l.removeEventListener(X_,d),AB.remove(m)},0)}}},[l,u,d,m]);const y=g.useCallback(p=>{if(!n&&!r||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,v=document.activeElement;if(x&&v){const b=p.currentTarget,[w,S]=Jtt(b);w&&S?!p.shiftKey&&v===S?(p.preventDefault(),n&&Ml(w,{select:!0})):p.shiftKey&&v===w&&(p.preventDefault(),n&&Ml(S,{select:!0})):v===b&&p.preventDefault()}},[n,r,m.paused]);return s.jsx(Te.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});Vte.displayName=Qtt;function Ztt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ml(r,{select:t}),document.activeElement!==n)return}function Jtt(e){const t=Hte(e),n=TB(t,e),r=TB(t.reverse(),e);return[n,r]}function Hte(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function TB(e,t){for(const n of e)if(!ent(n,{upTo:t}))return n}function ent(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tnt(e){return e instanceof HTMLInputElement&&"select"in e}function Ml(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tnt(e)&&t&&e.select()}}var AB=nnt();function nnt(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=OB(e,t),e.unshift(t)},remove(t){var n;e=OB(e,t),(n=e[0])==null||n.resume()}}}function OB(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rnt(e){return e.filter(t=>t.tagName!=="A")}var snt="Portal",Gte=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);Vn(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Pi.createPortal(s.jsx(Te.div,{...r,ref:t}),o):null});Gte.displayName=snt;var Q_=0;function ant(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??RB()),document.body.insertAdjacentElement("beforeend",e[1]??RB()),Q_++,()=>{Q_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Q_--}},[])}function RB(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Kte=hx(),Z_=function(){},w1=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Z_,onWheelCapture:Z_,onTouchMoveCapture:Z_}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noIsolation,y=e.inert,p=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,b=e.gapMode,w=ai(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,j=dx([n,t]),N=Vt(Vt({},w),a);return g.createElement(g.Fragment,null,d&&g.createElement(S,{sideCar:Kte,removeScrollBar:u,shards:h,noIsolation:m,inert:y,setCallbacks:i,allowPinchZoom:!!p,lockRef:n,gapMode:b}),o?g.cloneElement(g.Children.only(l),Vt(Vt({},N),{ref:j})):g.createElement(v,Vt({},N,{className:c,ref:j}),l))});w1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};w1.classNames={fullWidth:yc,zeroRight:gc};var _T=!1;if(typeof window<"u")try{var db=Object.defineProperty({},"passive",{get:function(){return _T=!0,!0}});window.addEventListener("test",db,db),window.removeEventListener("test",db,db)}catch{_T=!1}var Jd=_T?{passive:!1}:!1,int=function(e){return e.tagName==="TEXTAREA"},Yte=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!int(e)&&n[t]==="visible")},ont=function(e){return Yte(e,"overflowY")},lnt=function(e){return Yte(e,"overflowX")},IB=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Xte(e,r);if(a){var i=Qte(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},cnt=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},unt=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xte=function(e,t){return e==="v"?ont(t):lnt(t)},Qte=function(e,t){return e==="v"?cnt(t):unt(t)},dnt=function(e,t){return e==="h"&&t==="rtl"?-1:1},hnt=function(e,t,n,r,a){var i=dnt(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{var m=Qte(e,l),y=m[0],p=m[1],x=m[2],v=p-x-i*y;(y||v)&&Xte(e,l)&&(h+=v,f+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!a)||!d&&(Math.abs(f)<1||!a))&&(u=!0),u},hb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},MB=function(e){return[e.deltaX,e.deltaY]},DB=function(e){return e&&"current"in e?e.current:e},fnt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mnt=function(e){return`
935  .block-interactivity-`.concat(e,` {pointer-events: none;}
936  .allow-interactivity-`).concat(e,` {pointer-events: all;}
937`)},pnt=0,eh=[];function gnt(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(pnt++)[0],i=g.useState(bm)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=xd([e.lockRef.current],(e.shards||[]).map(DB),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var v=hb(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-v[0],S="deltaY"in p?p.deltaY:b[1]-v[1],j,N=p.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&C==="h"&&N.type==="range")return!1;var _=IB(C,N);if(!_)return!0;if(_?j=C:(j=C==="v"?"h":"v",_=IB(C,N)),!_)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=j),!j)return!0;var A=r.current||j;return hnt(A,x,p,A==="h"?w:S,!0)},[]),c=g.useCallback(function(p){var x=p;if(!(!eh.length||eh[eh.length-1]!==i)){var v="deltaY"in x?MB(x):hb(x),b=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&fnt(j.delta,v)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(DB).filter(Boolean).filter(function(j){return j.contains(x.target)}),S=w.length>0?l(x,w[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(p,x,v,b){var w={name:p,delta:x,target:v,should:b,shadowParent:ynt(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=g.useCallback(function(p){n.current=hb(p),r.current=void 0},[]),h=g.useCallback(function(p){u(p.type,MB(p),p.target,l(p,e.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,hb(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return eh.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Jd),document.addEventListener("touchmove",c,Jd),document.addEventListener("touchstart",d,Jd),function(){eh=eh.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,Jd),document.removeEventListener("touchmove",c,Jd),document.removeEventListener("touchstart",d,Jd)}},[]);var m=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(i,{styles:mnt(a)}):null,m?g.createElement(mx,{gapMode:e.gapMode}):null)}function ynt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xnt=fx(Kte,gnt);var Zte=g.forwardRef(function(e,t){return g.createElement(w1,Vt({},e,{ref:t,sideCar:xnt}))});Zte.classNames=w1.classNames;var gI="Dialog",[Jte,ene]=Qs(gI),[vnt,qi]=Jte(gI),tne=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=g.useRef(null),c=g.useRef(null),[u=!1,d]=Hs({prop:r,defaultProp:a,onChange:i});return s.jsx(vnt,{scope:t,triggerRef:l,contentRef:c,contentId:Vs(),titleId:Vs(),descriptionId:Vs(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};tne.displayName=gI;var nne="DialogTrigger",rne=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=qi(nne,n),i=lt(t,a.triggerRef);return s.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":vI(a.open),...r,ref:i,onClick:we(e.onClick,a.onOpenToggle)})});rne.displayName=nne;var yI="DialogPortal",[bnt,sne]=Jte(yI,{forceMount:void 0}),ane=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=qi(yI,t);return s.jsx(bnt,{scope:t,forceMount:n,children:g.Children.map(r,o=>s.jsx(As,{present:n||i.open,children:s.jsx(Gte,{asChild:!0,container:a,children:o})}))})};ane.displayName=yI;var Jw="DialogOverlay",ine=g.forwardRef((e,t)=>{const n=sne(Jw,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=qi(Jw,e.__scopeDialog);return i.modal?s.jsx(As,{present:r||i.open,children:s.jsx(wnt,{...a,ref:t})}):null});ine.displayName=Jw;var wnt=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=qi(Jw,n);return s.jsx(Zte,{as:yo,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(Te.div,{"data-state":vI(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ud="DialogContent",one=g.forwardRef((e,t)=>{const n=sne(ud,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=qi(ud,e.__scopeDialog);return s.jsx(As,{present:r||i.open,children:i.modal?s.jsx(Snt,{...a,ref:t}):s.jsx(jnt,{...a,ref:t})})});one.displayName=ud;var Snt=g.forwardRef((e,t)=>{const n=qi(ud,e.__scopeDialog),r=g.useRef(null),a=lt(t,n.contentRef,r);return g.useEffect(()=>{const i=r.current;if(i)return ux(i)},[]),s.jsx(lne,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:we(e.onFocusOutside,i=>i.preventDefault())})}),jnt=g.forwardRef((e,t)=>{const n=qi(ud,e.__scopeDialog),r=g.useRef(!1),a=g.useRef(!1);return s.jsx(lne,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),lne=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=qi(ud,n),c=g.useRef(null),u=lt(t,c);return ant(),s.jsxs(s.Fragment,{children:[s.jsx(Vte,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(qte,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":vI(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(_nt,{titleId:l.titleId}),s.jsx(Ent,{contentRef:c,descriptionId:l.descriptionId})]})]})}),xI="DialogTitle",cne=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=qi(xI,n);return s.jsx(Te.h2,{id:a.titleId,...r,ref:t})});cne.displayName=xI;var une="DialogDescription",dne=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=qi(une,n);return s.jsx(Te.p,{id:a.descriptionId,...r,ref:t})});dne.displayName=une;var hne="DialogClose",fne=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=qi(hne,n);return s.jsx(Te.button,{type:"button",...r,ref:t,onClick:we(e.onClick,()=>a.onOpenChange(!1))})});fne.displayName=hne;function vI(e){return e?"open":"closed"}var mne="DialogTitleWarning",[Nnt,pne]=yoe(mne,{contentName:ud,titleName:xI,docsSlug:"dialog"}),_nt=({titleId:e})=>{const t=pne(mne),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
938
939If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
940
941For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Cnt="DialogDescriptionWarning",Ent=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pne(Cnt).contentName}}.`;return g.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},knt=tne,Pnt=rne,Tnt=ane,Ant=ine,Ont=one,Rnt=cne,Int=dne,gne=fne,yne="AlertDialog",[Mnt,mht]=Qs(yne,[ene]),wl=ene(),xne=e=>{const{__scopeAlertDialog:t,...n}=e,r=wl(t);return s.jsx(knt,{...r,...n,modal:!0})};xne.displayName=yne;var Dnt="AlertDialogTrigger",Lnt=g.forwardRef((e,t)=>
941{const{__scopeAlertDialog:n,...r}=e,a=wl(n);return s.jsx(Pnt,{...a,...r,ref:t})});Lnt.displayName=Dnt;var $nt="AlertDialogPortal",vne=e=>{const{__scopeAlertDialog:t,...n}=e,r=wl(t);return s.jsx(Tnt,{...r,...n})};vne.displayName=$nt;var Fnt="AlertDialogOverlay",bne=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=wl(n);return s.jsx(Ant,{...a,...r,ref:t})});bne.displayName=Fnt;var Hh="AlertDialogContent",[Bnt,znt]=Mnt(Hh),wne=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,i=wl(n),o=g.useRef(null),l=lt(t,o),c=g.useRef(null);return s.jsx(Nnt,{contentName:Hh,titleName:Sne,docsSlug:"alert-dialog",children:s.jsx(Bnt,{scope:n,cancelRef:c,children:s.jsxs(Ont,{role:"alertdialog",...i,...a,ref:l,onOpenAutoFocus:we(a.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[s.jsx(PA,{children:r}),s.jsx(qnt,{contentRef:o})]})})})});wne.displayName=Hh;var Sne="AlertDialogTitle",jne=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=wl(n);return s.jsx(Rnt,{...a,...r,ref:t})});jne.displayName=Sne;var Nne="AlertDialogDescription",_ne=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=wl(n);return s.jsx(Int,{...a,...r,ref:t})});_ne.displayName=Nne;var Unt="AlertDialogAction",Cne=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=wl(n);return s.jsx(gne,{...a,...r,ref:t})});Cne.displayName=Unt;var Ene="AlertDialogCancel",kne=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=znt(Ene,n),i=wl(n),o=lt(t,a);return s.jsx(gne,{...i,...r,ref:o})});kne.displayName=Ene;var qnt=({contentRef:e})=>{const t=`\`${Hh}\` requires a description for the component to be accessible for screen reader users.
942
943You can add a description to the \`${Hh}\` by passing a \`${Nne}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
944
945Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Hh}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
946
947For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Wnt=xne,Vnt=vne,Pne=bne,Tne=wne,Ane=Cne,One=kne,Rne=jne,Ine=_ne;const Hnt=Wnt,Gnt=Vnt,Mne=g.forwardRef(({className:e,...t},n)=>s.jsx(Pne,{className:ve("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Mne.displayName=Pne.displayName;const Dne=g.forwardRef(({className:e,...t},n)=>s.jsxs(Gnt,{children:[s.jsx(Mne,{}),s.jsx(Tne,{ref:n,className:ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Dne.displayName=Tne.displayName;const Lne=({className:e,...t})=>s.jsx("div",{className:ve("flex flex-col space-y-2 text-center sm:text-left",e),...t});Lne.displayName="AlertDialogHeader";const $ne=({className:e,...t})=>s.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$ne.displayName="AlertDialogFooter";const Fne=g.forwardRef(({className:e,...t},n)=>s.jsx(Rne,{ref:n,className:ve("text-lg font-semibold",e),...t}));Fne.displayName=Rne.displayName;const Bne=g.forwardRef(({className:e,...t},n)=>s.jsx(Ine,{ref:n,className:ve("text-sm text-muted-foreground",e),...t}));Bne.displayName=Ine.displayName;const zne=g.forwardRef(({className:e,...t},n)=>
947s.jsx(Ane,{ref:n,className:ve(Sf(),e),...t}));zne.displayName=Ane.displayName;const Une=g.forwardRef(({className:e,...t},n)=>s.jsx(One,{ref:n,className:ve(Sf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Une.displayName=One.displayName;const J_=(e,t,n="N/A")=>{if(!e)return n;try{const r=new Date(e);return isNaN(r.getTime())?n:kt(r,t)}catch{return console.warn("Invalid date value:",e),n}},qne=()=>{const{user:e}=Ie(),{toast:t}=Ve(),{settings:n,calculateDealValue:r,showRevenueToast:a}=gm(),[i,o]=g.useState([]),[l,c]=g.useState(!0),[u,d]=g.useState(""),[h,f]=g.useState("all"),[m,y]=g.useState("all"),[p,x]=g.useState(new Set),[v,b]=g.useState(!1),[w,S]=g.useState(!1),[j,N]=g.useState(["company_name","company_domain","match_score","ice_breaker","pitch_suggestions"]),[C,_]=g.useState(1),[A,P]=g.useState(10),[R,I]=g.useState(!1),[B,$]=g.useState(),[q,L]=g.useState(),[k,T]=g.useState("date-new"),[F,O]=g.useState("card"),[E,D]=g.useState(!1),[M,X]=g.useState(!1);g.useEffect(()=>{e&&W()},[e]);const W=async()=>{if(e)try{c(!0);let Z=[],V=0;const H=1e3;let ae=!0;for(;ae;){const{data:be,error:Re}=await K.from("auto_matched_companies").select("*").eq("user_id",e.id).order("matched_at",{ascending:!1}).range(V,V+H-1);if(Re)throw console.error("Error loading matches:",Re),Re;if(be&&be.length>0){const Oe=be.map(vt=>({...vt,signals_data:vt.signals_data,match_reasoning:vt.match_reasoning}));Z=[...Z,...Oe],V+=H,ae=be.length===H}else ae=!1}o(Z)}catch(Z){console.error("Error loading auto-prospecting matches:",Z),t({title:"Error loading matches",description:"Failed to load auto-prospecting results. Please try again.",variant:"destructive"})}finally{c(!1)}},re=async Z=>{try{const{error:V}=await K.from("auto_matched_companies").update({is_reviewed:!0}).eq("id",Z);if(V)throw V;o(i.map(H=>H.id===Z?{...H,is_reviewed:!0}:H)),t({title:"Success",description:"Company marked as reviewed"})}catch(V){console.error("Error marking as reviewed:",V),t({title:"Error",description:"Failed to update company status",variant:"destructive"})}},ne=async(Z,V)=>{try{const H=i.find(ae=>ae.id===Z);if(!H)return;if(V){const[ae,be]=await Promise.all([K.from("auto_matched_companies").update({is_saved:!1}).eq("id",Z).eq("user_id",e==null?void 0:e.id),K.from("saved_companies").delete().eq("company_id",H.company_id).eq("user_id",e==null?void 0:e.id)]);if(ae.error)throw ae.error;if(be.error)throw be.error}else{const ae=r(H.match_score),[be,Re]=await Promise.all([K.from("auto_matched_companies").update({is_saved:!0}).eq("id",Z).eq("user_id",e==null?void 0:e.id),K.from("saved_companies").insert({company_id:H.company_id,company_name:H.company_name,company_domain:H.company_domain,folder_name:"auto-prospecting",notes:`Match Score: ${H.match_score}%
948
949Ice Breaker: ${H.ice_breaker||"N/A"}
950
951Pitch: ${H.pitch_suggestions||"N/A"}`,user_id:e==null?void 0:e.id,cycle_number:(n==null?void 0:n.current_cycle_number)||1,deal_probability:(n==null?void 0:n.close_rate)||50,potential_deal_value:ae})]);if(be.error)throw be.error;if(Re.error&&!Re.error.message.includes("duplicate"))throw Re.error}if(o(i.map(ae=>ae.id===Z?{...ae,is_saved:!V}:ae)),!V&&n){const ae=r(H.match_score);a(ae,"add")}t({title:V?"Company unsaved":"Company saved",description:V?"Company has been removed from your saved companies.":s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Company added to saved companies."}),s.jsx(U,{variant:"link",size:"sm",className:"p-0 h-auto",onClick:()=>window.location.href="/saved-companies",children:"View all"})]})})}catch(H){console.error("Error toggling saved status:",H),t({title:"Error",description:"Failed to update saved status. Please try again.",variant:"destructive"})}},le=async Z=>{try{const{error:V}=await K.from("auto_matched_companies").delete().eq("id",Z).eq("user_id",e==null?void 0:e.id);if(V)throw V;o(i.filter(H=>H.id!==Z)),x(H=>{const ae=new Set(H);return ae.delete(Z),ae}),t({title:"Success",description:"Company match deleted"})}catch(V){console.error("Error deleting match:",V),t({title:"Error",description:"Failed to delete company match",variant:"destructive"})}},ie=async()=>{try{const Z=Array.from(p),{error:V}=await K.from("auto_matched_companies").delete().in("id",Z).eq("user_id",e==null?void 0:e.id);if(V)throw V;o(i.filter(H=>!p.has(H.id))),x(new Set),I(!1),t({title:"Success",description:`Deleted ${Z.length} companies`})}catch(Z){console.error("Error deleting matches:",Z),t({title:"Error",description:"Failed to delete company matches",variant:"destructive"})}},ye=Z=>{x(V=>{const H=new Set(V);return H.has(Z)?H.delete(Z):H.add(Z),H})},pe=[{id:"company_name",label:"Company Name"},{id:"company_domain",label:"Domain"},{id:"match_score",label:"Match Score"},{id:"ice_breaker",label:"Ice Breaker"},{id:"pitch_suggestions",label:"Pitch Suggestions"},{id:"target_positions",label:"Target Positions"},{id:"matched_at",label:"Match Date"},{id:"is_reviewed",label:"Review Status"},{id:"is_saved",label:"Save Status"},{id:"signals_data",label:"Recent Signals"},{id:"match_reasoning",label:"Match Reasoning"}],G=Z=>{N(V=>V.includes(Z)?V.filter(H=>H!==Z):[...V,Z])},Pe=async Z=>{try{S(!0);const V=Z?{export_all:!0,search_term:u||null,score_filter:h!=="all"?h:null,status_filter:m!=="all"?m:null,selected_fields:j}:{export_all:!1,company_ids:Array.from(p),selected_fields:j};if(!Z&&V.company_ids.length===0){t({title:"No companies selected",description:"Please select companies to export or use Export All.",variant:"destructive"});return}if(!Z&&V.company_ids.length>100){t({title:"Too many companies selected",description:"Please select up to 100 companies, or use Export All with filters instead.",variant:"destructive"});return}const H=await K.functions.invoke("export-auto-prospecting",{body:V});if(H.error)throw new Error(H.error.message||"Export failed");const ae=new Blob([H.data],{type:"text/csv"}),be=window.URL.createObjectURL(ae),Re=document.createElement("a");Re.href=be,Re.download=`auto-prospecting-export-${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(Re),Re.click(),window.URL.revokeObjectURL(be),document.body.removeChild(Re);const Oe=Z?oe.length:V.company_ids.length;t({title:"Export successful",description:`Exported ${Oe} companies to CSV.`}),b(!1),x(new Set)}catch(V){console.error("Export error:",V),t({title:"Export failed",description:V 
951instanceof Error?V.message:"Failed to export companies. Please try again.",variant:"destructive"})}finally{S(!1)}},oe=[...i.filter(Z=>{var qt;const V=u.toLowerCase(),H=!u||Z.company_name.toLowerCase().includes(V)||((qt=Z.company_domain)==null?void 0:qt.toLowerCase().includes(V)),ae=h==="all"||Z.match_score>=parseInt(h);let be=!0;m==="new"?be=!Z.is_reviewed:m==="reviewed"?be=Z.is_reviewed:m==="saved"&&(be=Z.is_saved);const Re=new Date(Z.matched_at),Oe=!B||Re>=wo(B),vt=!q||Re<=bG(q);return H&&ae&&be&&Oe&&vt})].sort((Z,V)=>{switch(k){case"score":return V.match_score-Z.match_score;case"date-new":return new Date(V.matched_at).getTime()-new Date(Z.matched_at).getTime();case"date-old":return new Date(Z.matched_at).getTime()-new Date(V.matched_at).getTime();case"name":return Z.company_name.localeCompare(V.company_name);default:return 0}}),se=Math.ceil(oe.length/A),je=oe.slice((C-1)*A,C*A);g.useEffect(()=>{_(1)},[u,h,m,B,q,k]);const Ce=i.length,ut=i.filter(Z=>!Z.is_reviewed).length,Ze=i.filter(Z=>Z.is_reviewed).length,Ye=i.filter(Z=>Z.is_saved).length,Zt=oe.reduce((Z,V)=>{const H=V.potential_deal_value||r(V.match_score);return Z+H},0),Yt=oe.length>0?Zt/oe.length:0,Nn=Z=>Z>=90?"text-green-600 bg-green-50":Z>=80?"text-blue-600 bg-blue-50":Z>=70?"text-yellow-600 bg-yellow-50":"text-gray-600 bg-gray-50";return l?s.jsx("div",{className:"space-y-4",children:[1,2,3].map(Z=>s.jsx(Y,{className:"p-6",children:s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"h-6 w-48 bg-muted animate-pulse rounded"}),s.jsx("div",{className:"h-4 w-full bg-muted animate-pulse rounded"}),s.jsx("div",{className:"h-4 w-3/4 bg-muted animate-pulse rounded"})]})},Z))}):i.length===0?s.jsxs(Y,{className:"p-12 text-center",children:[s.jsx(tn,{className:"w-12 h-12 mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Matches Yet"}),s.jsx("p",{className:"text-muted-foreground",children:"Configure your auto-prospecting settings to start receiving company matches automatically."})]}):s.jsxs("div",{className:"space-y-6",children:[n&&oe.length>0&&s.jsx(Y,{className:"bg-gradient-to-r from-green-50 to-emerald-50 dark:from-green-950/20 dark:to-emerald-950/20 border-green-200 dark:border-green-800",children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-green-700 dark:text-green-300 mb-1",children:"Total Pipeline Value"}),s.jsx("p",{className:"text-2xl font-bold text-green-900 dark:text-green-100",children:rs(Zt,n.currency_symbol)}),s.jsxs("p",{className:"text-xs text-green-600 dark:text-green-400 mt-1",children:["From ",oe.length," ",oe.length===1?"prospect":"prospects"]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-green-700 dark:text-green-300 mb-1",children:"Average Deal Value"}),s.jsx("p",{className:"text-2xl font-bold text-green-900 dark:text-green-100",children:rs(Yt,n.currency_symbol)}),s.jsx("p",{className:"text-xs text-green-600 dark:text-green-400 mt-1",children:"Per company"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-green-700 dark:text-green-300 mb-1",children:"Expected Revenue"}),s.jsx("p",{className:"text-2xl font-bold text-green-900 dark:text-green-100",children:rs(Zt*(n.close_rate/100),n.currency_symbol)}),s.jsxs("p",{className:"text-xs text-green-600 dark:text-green-400 mt-1",children:["At ",n.close_rate,"% close rate"]})]})]})})}),s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-semibold mb-2",children:["Auto-Prospecting Results (",Ce.toLocaleString(),")"]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(fe,{variant:"secondary",className:"text-xs",children:[ut," Unreviewed"]}),s.jsxs(fe,{variant:"secondary",className:"text-xs",children:[Ze," Reviewed"]}),s.jsxs(fe,{variant:"secondary",className:"text-xs",children:[Ye," Saved"]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[p.size>0&&s.jsxs(U,{variant:"destructive",size:"sm",onClick:()=>I(!0),children:[s.jsx(co,{className:"w-4 h-4 mr-2"}),"Delete Selected (",p.size,")"]}),s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>b(!0),disabled:p.size===0,children:[s.jsx(Ka,{className:"w-4 h-4 mr-2"}),"Export Selected CSV (",p.size,")"]}),s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>b(!0),children:[s.jsx(Up,{className:"w-4 h-4 mr-2"}),"Export All CSV"]}),s.jsxs(U,{variant:"default",size:"sm",onClick:()=>{X(!1),D(!0)},disabled:p.size===0,children:[s.jsx(Up,{className:"w-4 h-4 mr-2"}),"Export to Sheets (",p.size,")"]}),s.jsxs(U,{variant:"default",size:"sm",onClick:()=>{X(!0),D(!0)},children:[s.jsx(Up,{className:"w-4 h-4 mr-2"}),"Export All to Sheets"]})]})]})}),s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vr,{id:"select-all",checked:p.size===je.length&&je.length>0,onCheckedChange:()=>{p.size===je.length?x(new Set):x(new Set(je.map(Z=>Z.id)))}}),s.jsxs(Ke,{htmlFor:"select-all",className:"text-sm font-medium cursor-pointer",children:["Select Page (",je.length,")"]})]}),s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"relative",children:[s.jsx(st,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(at,{placeholder:"Search by company name or domain...",value:u,onChange:Z=>d(Z.target.value),className:"pl-10"})]})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(hr,{value:h,onValueChange:f,children:[s.jsxs(nr,{className:"w-[180px]",children:[s.jsx(Qu,{className:"w-4 h-4 mr-2"}),s.jsx(fr,{placeholder:"Filter by score"})]}),s.jsxs(rr,{children:[s.jsx(bt,{value:"all",children:"All Scores"}),s.jsx(bt,{value:"90",children:"90%+ (Excellent)"}),s.jsx(bt,{value:"80",children:"80%+ (Great)"}),s.jsx(bt,{value:"70",children:"70%+ (Good)"})]})]}),s.jsxs(hr,{value:m,onValueChange:y,children:[s.jsxs(nr,{className:"w-[180px]",children:[s.jsx(Qu,{className:"w-4 h-4 mr-2"}),s.jsx(fr,{placeholder:"Filter by status"})]}),s.jsxs(rr,{children:[s.jsx(bt,{value:"all",children:"All Status"}),s.jsx(bt,{value:"new",children:"New"}),s.jsx(bt,{value:"reviewed",children:"Reviewed"}),s.jsx(bt,{value:"saved",children:"Saved"})]})]})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",size:"sm",className:"w-[200px] justify-start",children:[s.jsx(sn,{className:"w-4 h-4 mr-2"}),B?kt(B,"MMM dd, yyyy"):"From date"]})}),s.jsx(ll,{className:"w-auto p-0",align:"start",children:s.jsx(cd,{mode:"single",selected:B,onSelect:$,initialFocus:!0,className:"pointer-events-auto"})})]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"to"}),s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",size:"sm",className:"w-[200px] justify-start",children:[s.jsx(sn,{className:"w-4 h-4 mr-2"}),q?kt(q,"MMM dd, yyyy"):"To date"]})}),s.jsx(ll,{className:"w-auto p-0",align:"start",children:s.jsx(cd,{mode:"single",selected:q,onSelect:L,initialFocus:!0,className:"pointer-events-auto"})})]}),(B||q)&&s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>{$(void 0),L(void 0)},children:"Clear dates"}),s.jsxs("div",{className:"flex gap-1 ml-auto",children:[s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{$($r(new Date,7)),L(new Date)},children:"Last 7 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{$($r(new Date,30)),L(new Date)},children:"Last 30 days"})]}),s.jsxs(hr,{value:k,onValueChange:Z=>T(Z),children:[s.jsxs(nr,{className:"w-[180px]",children:[s.jsx(sle,{className:"w-4 h-4 mr-2"}),s.jsx(fr,{})]}),s.jsxs(rr,{children:[s.jsx(bt,{value:"date-new",children:"Newest First"}),s.jsx(bt,{value:"date-old",children:"Oldest First"}),s.jsx(bt,{value:"score",children:"Score (High to Low)"}),s.jsx(bt,{value:"name",children:"Name (A-Z)"})]})]}),s.jsxs("div",{className:"flex gap-1 border rounded-md p-1",children:[s.jsx(U,{variant:F==="card"?"default":"ghost",size:"sm",onClick:()=>O("card"),children:s.jsx(cle,{className:"w-4 h-4"})}),s.jsx(U,{variant:F==="table"?"default":"ghost",size:"sm",onClick:()=>O("table"),children:s.jsx(fle,{className:"w-4 h-4"})})]})]})]})}),oe.length===0?s.jsxs(Y,{className:"p-12 text-center",children:[s.jsx(Gs,{className:"w-12 h-12 mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No matches found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to 
951see more results."})]}):F==="table"?s.jsx(Y,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b",children:s.jsxs("tr",{className:"text-left text-sm font-medium text-muted-foreground",children:[s.jsx("th",{className:"p-4 w-12",children:s.jsx(vr,{checked:p.size===je.length&&je.length>0,onCheckedChange:()=>{p.size===je.length?x(new Set):x(new Set(je.map(Z=>Z.id)))}})}),s.jsx("th",{className:"p-4",children:"Company"}),s.jsx("th",{className:"p-4",children:"Score"}),s.jsx("th",{className:"p-4",children:"Matched"}),s.jsx("th",{className:"p-4",children:"Signals"}),s.jsx("th",{className:"p-4 text-right",children:"Actions"})]})}),s.jsx("tbody",{children:je.map(Z=>{var V,H,ae,be,Re,Oe;return s.jsxs("tr",{className:"border-b hover:bg-muted/50 transition-colors",children:[s.jsx("td",{className:"p-4",children:s.jsx(vr,{checked:p.has(Z.id),onCheckedChange:()=>ye(Z.id)})}),s.jsx("td",{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(tt,{className:"w-5 h-5 text-primary flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:Z.company_name}),Z.company_domain&&s.jsxs("a",{href:`https://${Z.company_domain}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-primary flex items-center gap-1",children:[Z.company_domain,s.jsx(ar,{className:"w-3 h-3"})]})]})]})}),s.jsx("td",{className:"p-4",children:s.jsx("div",{className:"space-y-1",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ur,{value:Z.match_score,className:"w-20 h-2"}),s.jsxs("span",{className:ve("text-sm font-medium px-2 py-0.5 rounded",Nn(Z.match_score)),children:[Z.match_score,"%"]})]})})}),s.jsx("td",{className:"p-4",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:J_(Z.matched_at,"MMM dd, yyyy")})}),s.jsx("td",{className:"p-4",children:s.jsxs("div",{className:"flex flex-wrap gap-1",children:[(H=(V=Z.signals_data)==null?void 0:V.signal_types)==null?void 0:H.slice(0,2).map((vt,qt)=>s.jsx(fe,{variant:"outline",className:"text-xs",children:vt},qt)),(((be=(ae=Z.signals_data)==null?void 0:ae.signal_types)==null?void 0:be.length)||0)>2&&s.jsxs(fe,{variant:"outline",className:"text-xs",children:["+",(((Oe=(Re=Z.signals_data)==null?void 0:Re.signal_types)==null?void 0:Oe.length)||0)-2]})]})}),s.jsx("td",{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[!Z.is_reviewed&&s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>re(Z.id),children:s.jsx(zr,{className:"w-4 h-4"})}),s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>ne(Z.id,Z.is_saved),children:Z.is_saved?s.jsx(sN,{className:"w-4 h-4 text-primary"}):s.jsx(x0,{className:"w-4 h-4"})}),s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>le(Z.id),children:s.jsx(co,{className:"w-4 h-4 text-destructive"})})]})})]},Z.id)})})]})})}):s.jsx("div",{className:"space-y-4",children:je.map(Z=>{var V;return s.jsx(Y,{className:"p-6 hover:shadow-lg transition-shadow",children:s.jsx("div",{className:"space-y-4",children:s.jsx("div",{className:"flex items-start justify-between gap-4",children:s.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[s.jsx(vr,{id:`select-${Z.id}`,checked:p.has(Z.id),onCheckedChange:()=>ye(Z.id),className:"mt-1"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(tt,{className:"w-5 h-5 text-primary"}),s.jsx("h3",{className:"text-xl font-semibold",children:Z.company_name})]}),s.jsx("div",{className:"mb-3",children:s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsx("div",{className:"flex-1 min-w-[120px]",children:s.jsx(ur,{value:Z.match_score,className:"h-2"})}),s.jsxs(fe,{className:ve("",Nn(Z.match_score)),children:[s.jsx(gf,{className:"w-3 h-3 mr-1"}),Z.match_score,"% Match"]}),n&&s.jsxs(fe,{className:"bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300 border-green-200 dark:border-green-800",children:[s.jsx(Fn,{className:"w-3 h-3 mr-1"}),rs(Z.potential_deal_value||r(Z.match_score),n.currency_symbol)]})]})}),Z.company_domain&&s.jsxs("a",{href:`https://${Z.company_domain}`,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-muted-foreground hover:text-primary flex items-center gap-1",children:[Z.company_domain,s.jsx(ar,{className:"w-3 h-3"})]}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[!Z.is_reviewed&&s.jsxs(fe,{variant:"outline",className:"text-xs bg-blue-50",children:[s.jsx(An,{className:"w-3 h-3 mr-1"}),"New"]}),Z.is_saved&&s.jsxs(fe,{variant:"outline",className:"text-xs bg-green-50",children:[s.jsx(sN,{className:"w-3 h-3 mr-1"}),"Saved"]})]})]}),s.jsxs(Fu,{children:[s.jsx(Bu,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",children:s.jsx(qq,{className:"w-4 h-4"})})}),s.jsxs(xc,{align:"end",children:[!Z.is_reviewed&&s.jsxs(Qe,{onClick:()=>re(Z.id),children:[s.jsx(zr,{className:"w-4 h-4 mr-2"}),"Mark as Reviewed"]}),s.jsx(Qe,{onClick:()=>ne(Z.id,Z.is_saved),children:Z.is_saved?s.jsxs(s.Fragment,{children:[s.jsx(x0,{className:"w-4 h-4 mr-2"}),"Unsave Company"]}):s.jsxs(s.Fragment,{children:[s.jsx(sN,{className:"w-4 h-4 mr-2"}),"Save Company"]})}),s.jsxs(Qe,{onClick:()=>le(Z.id),className:"text-destructive",children:[s.jsx(co,{className:"w-4 h-4 mr-2"}),"Delete Match"]})]})]})]}),Z.ice_breaker&&s.jsx("div",{className:"mb-4 p-4 bg-blue-50 rounded-lg border border-blue-200",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(ti,{className:"w-4 h-4 text-blue-600 mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-blue-900 mb-1",children:"Ice Breaker"}),s.jsx("p",{className:"text-sm text-blue-700",children:Z.ice_breaker})]})]})}),Z.pitch_suggestions&&s.jsx("div",{className:"mb-4 p-4 bg-purple-50 rounded-lg border border-purple-200",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Tn,{className:"w-4 h-4 text-purple-600 mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-purple-900 mb-1",children:"Pitch Suggestions"}),s.jsx("p",{className:"text-sm text-purple-700",children:Z.pitch_suggestions})]})]})}),Z.target_positions&&Z.target_positions.length>0&&s.jsxs("div",{className:"mb-4",children:[s.jsxs("p",{className:"text-sm font-medium text-muted-foreground mb-2 flex items-center gap-2",children:[s.jsx(tn,{className:"w-4 h-4"}),"Target Positions"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Z.target_positions.map((H,ae)=>s.jsx(fe,{variant:"outline",className:"text-xs",children:H},ae))}),Z.company_domain&&s.jsxs(U,{variant:"outline",size:"sm",className:"mt-3 gap-2",onClick:()=>window.location.href=`/people?domain=${Z.company_domain}`,children:[s.jsx(At,{className:"w-4 h-4"}),"Find Contacts at ",Z.company_name]})]}),((V=Z.signals_data)==null?void 0:V.latest_signals)&&Z.signals_data.latest_signals.length>0&&s.jsxs("div",{className:"mb-4",children:[s.jsxs("p",{className:"text-sm font-medium text-muted-foreground mb-2 flex items-center gap-2",children:[s.jsx(os,{className:"w-4 h-4"}),"Recent Signals"]}),s.jsx("div",{className:"space-y-2",children:Z.signals_data.latest_signals.slice(0,3).map((H,ae)=>s.jsxs("div",{className:"p-3 bg-muted rounded-lg",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium",children:H.title}),H.description&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:H.description})]}),s.jsx(fe,{variant:"outline",className:"text-xs whitespace-nowrap",children:H.type})]}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-2 flex items-center gap-1",children:[s.jsx(sn,{className:"w-3 h-3"}),J_(H.date,"MMM dd, yyyy")]})]},ae))})]}),Z.match_reasoning&&s.jsxs(Yw,{children:[s.jsx(Xw,{asChild:!0,children:s.jsxs(U,{variant:"outline",size:"sm",className:"w-full justify-between",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(mf,{className:"w-4 h-4"}),"Why This Match?"]}),s.jsx(hc,{className:"w-4 h-4"})]})}),s.jsxs(Qw,{className:"mt-4 space-y-4",children:[Z.match_reasoning.business_fit_analysis&&s.jsxs("div",{className:"p-4 bg-green-50 rounded-lg border border-green-200",children:[s.jsxs("h4",{className:"text-sm font-semibold text-green-900 mb-2 flex items-center gap-2",children:[s.jsx(Ko,{className:"w-4 h-4"}),"Business Fit"]}),s.jsx("p",{className:"text-sm text-green-700",children:Z.match_reasoning.business_fit_analysis})]}),Z.match_reasoning.signal_based_opportunities&&Z.match_reasoning.signal_based_opportunities.length>0&&s.jsxs("div",{className:"p-4 bg-orange-50 rounded-lg border border-orange-200",children:[s.jsxs("h4",{className:"text-sm font-semibold text-orange-900 mb-2 flex items-center gap-2",children:[s.jsx(Xn,{className:"w-4 h-4"}),"Timing Opportunities"]}),s.jsx("ul",{className:"space-y-1",children:Z.match_reasoning.signal_based_opportunities.map((H,ae)=>s.jsxs("li",{className:"text-sm text-orange-700 flex items-start gap-2",children:[s.jsx(Ws,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:H})]},ae))})]}),Z.match_reasoning.conversation_starters&&Z.match_reasoning.conversation_starters.length>0&&s.jsxs("div",{className:"p-4 bg-purple-50 rounded-lg border border-purple-200",children:[s.jsxs("h4",{className:"text-sm font-semibold text-purple-900 mb-2 flex items-center gap-2",children:[s.jsx(ti,{className:"w-4 h-4"}),"Conversation Starters"]}),s.jsx("ul",{className:"space-y-1",children:Z.match_reasoning.conversation_starters.map((H,ae)=>s.jsxs("li",{className:"text-sm text-purple-700 flex items-start gap-2",children:[s.jsx(Ws,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:H})]},ae))})]}),Z.match_reasoning.score_breakdown&&s.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg border border-blue-200",children:[s.jsxs("h4",{className:"text-sm font-semibold text-blue-900 mb-3 flex items-center gap-2",children:[s.jsx(os,{className:"w-4 h-4"}),"Score Breakdown"]}),s.jsxs("div",{className:"space-y-2",children:[(Z.match_reasoning.score_breakdown.base_business_fit||Z.match_reasoning.score_breakdown.base_score)&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-blue-700",children:"Base Business Fit:"}),s.jsxs("span",{className:"font-medium text-blue-900",children:[Z.match_reasoning.score_breakdown.base_business_fit||Z.match_reasoning.score_breakdown.base_score,"%"]})]}),(Z.match_reasoning.score_breakdown.signal_timing_boost||Z.match_reasoning.score_breakdown.signal_boost)&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-blue-700",children:"Signal Timing Boost:"}),s.jsxs("span",{className:"font-medium text-blue-900",children:["+",Z.match_reasoning.score_breakdown.signal_timing_boost||Z.match_reasoning.score_breakdown.signal_boost,"%"]})]}),Z.match_reasoning.score_breakdown.final_score&&s.jsxs("div",{className:"flex justify-between text-sm pt-2 border-t border-blue-200",children:[s.jsx("span",{className:"text-blue-900 font-medium",children:"Final Score:"}),s.jsxs("span",{className:"font-bold text-blue-900",children:[Z.match_reasoning.score_breakdown.final_score,"%"]})]})]})]})]})]}),s.jsxs("div",{className:"mt-4 flex items-center justify-between text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(sn,{className:"w-3 h-3"}),"Matched ",J_(Z.matched_at,"MMM dd, yyyy")]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(gf,{className:"w-3 h-3"}),Z.match_score,"% compatibility"]})]})]})]})})})},Z.id)})}),oe.length>0&&se>1&&s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",(C-1)*A+1," to ",Math.min(C*A,oe.length)," of ",oe.length," results"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>_(Z=>Math.max(1,Z-1)),disabled:C===1,children:[s.jsx(kS,{className:"w-4 h-4 mr-1"}),"Previous"]}),s.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,se)},(Z,V)=>{let H;return se<=5||C<=3?H=V+1:C>=se-2?H=se-4+V:H=C-2+V,s.jsx(U,{variant:C===H?"default":"outline",size:"sm",onClick:()=>_(H),className:"w-9",children:H},H)})}),s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>_(Z=>Math.min(se,Z+1)),disabled:C===se,children:["Next",s.jsx(lm,{className:"w-4 h-4 ml-1"})]})]}),s.jsxs(hr,{value:A.toString(),onValueChange:Z=>{P(parseInt(Z)),_(1)},children:[s.jsx(nr,{className:"w-[120px]",children:s.jsx(fr,{})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"5",children:"5 per page"}),s.jsx(bt,{value:"10",children:"10 per page"}),s.jsx(bt,{value:"25",children:"25 per page"}),s.jsx(bt,{value:"50",children:"50 per page"})]})]})]})}),s.jsx(Hnt,{open:R,onOpenChange:I,children:s.jsxs(Dne,{children:[s.jsxs(Lne,{children:[s.jsx(Fne,{children:"Delete Selected Companies?"}),s.jsxs(Bne,{children:["Are you sure you want to delete ",p.size," selected ",p.size===1?"company":"companies","? This action cannot be undone."]})]}),s.jsxs($ne,{children:[s.jsx(Une,{children:"Cancel"}),s.jsxs(zne,{onClick:ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",p.size," ",p.size===1?"Company":"Companies"]})]})]})}),s.jsx(Wr,{open:v,onOpenChange:b,children:s.jsxs(Pr,{className:"max-w-2xl",children:[s.jsxs(Vr,{children:[s.jsxs(Tr,{className:"flex items-center gap-2",children:[s.jsx(Ka,{className:"w-5 h-5"}),"Export Auto-Prospecting Results"]}),s.jsxs(Uc,{children:["Select fields to include in your CSV export. ",p.size>0?`Exporting ${p.size} selected companies.`:`Exporting all ${oe.length} filtered companies.`]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ke,{className:"font-medium",children:"Select Fields to Export"}),s.jsx("div",{className:"grid grid-cols-2 gap-2 p-3 border rounded-lg max-h-[300px] overflow-y-auto",children:pe.map(Z=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(vr,{id:`export-${Z.id}`,checked:j.includes(Z.id),onCheckedChange:()=>G(Z.id)}),s.jsx(Ke,{htmlFor:`export-${Z.id}`,className:"text-sm font-normal cursor-pointer",children:Z.label})]}
951,Z.id))}),j.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(Z=>{const V=pe.find(H=>H.id===Z);return V?s.jsx(fe,{variant:"secondary",className:"text-xs",children:V.label},Z):null})})]}),s.jsxs("div",{className:"flex gap-2 justify-end pt-4 border-t",children:[s.jsx(U,{variant:"outline",onClick:()=>b(!1),disabled:w,children:"Cancel"}),s.jsxs(U,{onClick:()=>Pe(p.size===0),disabled:w||j.length===0,children:[s.jsx(Ka,{className:"w-4 h-4 mr-2"}),w?"Exporting...":p.size>0?`Export Selected (${p.size})`:`Export All (${oe.length})`]})]})]})]})}),s.jsx(Ote,{open:E,onOpenChange:D,selectedCompanies:p,exportAll:M,searchTerm:u,scoreFilter:h,statusFilter:m,source:"auto-prospecting"})]})},Knt=()=>{const{user:e}=Ie(),[t,n]=g.useState([]),[r,a]=g.useState(!0),[i,o]=g.useState({totalRuns:0,successfulRuns:0,totalMatches:0,averageProcessingTime:0,averageMatchRate:0}),l=async()=>{if(e)try{const{data:c,error:u}=await K.from("auto_prospecting_analytics").select("*").eq("user_id",e.id).order("started_at",{ascending:!1}).limit(50);if(u)throw u;if(n(c||[]),c&&c.length>0){const d=c.filter(p=>p.success),h=c.reduce((p,x)=>p+x.companies_matched,0),f=d.length>0?d.reduce((p,x)=>p+(x.processing_time_ms||0),0)/d.length:0,m=c.reduce((p,x)=>p+x.companies_processed,0),y=m>0?h/m*100:0;o({totalRuns:c.length,successfulRuns:d.length,totalMatches:h,averageProcessingTime:Math.round(f),averageMatchRate:Math.round(y*100)/100})}}catch(c){console.error("Error loading analytics:",c)}finally{a(!1)}};return g.useEffect(()=>{l()},[e]),r?s.jsx("div",{className:"space-y-4",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((c,u)=>s.jsx(Y,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"animate-pulse space-y-2",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/2"})]})})},u))})}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(Y,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Runs"}),s.jsx("p",{className:"text-2xl font-bold",children:i.totalRuns})]}),s.jsx(Br,{className:"h-8 w-8 text-blue-600"})]})})}),s.jsx(Y,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Success Rate"}),s.jsxs("p",{className:"text-2xl font-bold",children:[i.totalRuns>0?Math.round(i.successfulRuns/i.totalRuns*100):0,"%"]})]}),s.jsx(ze,{className:"h-8 w-8 text-green-600"})]})})}),s.jsx(Y,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Matches"}),s.jsx("p",{className:"text-2xl font-bold",children:i.totalMatches})]}),s.jsx(tn,{className:"h-8 w-8 text-orange-600"})]})})}),s.jsx(Y,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Avg Processing"}),s.jsxs("p",{className:"text-2xl font-bold",children:[i.averageProcessingTime,"ms"]})]}),s.jsx(Xn,{className:"h-8 w-8 text-purple-600"})]})})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(os,{className:"h-5 w-5"}),"Recent Auto-Prospecting Runs"]})}),s.jsx(te,{children:t.length===0?s.jsx("p",{className:"text-gray-500 text-center py-8",children:"No analytics data available yet."}):s.jsx("div",{className:"space-y-4",children:t.map(c=>s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[c.success?s.jsx(ks,{className:"h-5 w-5 text-green-600"}
951):s.jsx(Jy,{className:"h-5 w-5 text-red-600"}),s.jsx("span",{className:"font-medium",children:CG(new Date(c.started_at),{addSuffix:!0})})]}),s.jsx(fe,{variant:c.success?"default":"destructive",children:c.success?"Success":"Failed"})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Processed:"}),s.jsx("span",{className:"ml-1 font-medium",children:c.companies_processed})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Matched:"}),s.jsx("span",{className:"ml-1 font-medium text-green-600",children:c.companies_matched})]}),c.average_score&&s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Avg Score:"}),s.jsx("span",{className:"ml-1 font-medium",children:Math.round(c.average_score)})]}),c.processing_time_ms&&s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Duration:"}),s.jsxs("span",{className:"ml-1 font-medium",children:[c.processing_time_ms,"ms"]})]})]}),c.error_message&&s.jsx("div",{className:"mt-2 p-2 bg-red-50 border border-red-200 rounded",children:s.jsx("p",{className:"text-sm text-red-700",children:c.error_message})})]},c.id))})})]})]})},eC=({onComplete:e})=>{const{settings:t,updateSettings:n}=gm(),[r,a]=g.useState(!1),[i,o]=g.useState(""),[l,c]=g.useState({average_deal_size:(t==null?void 0:t.average_deal_size)||5e3,close_rate:(t==null?void 0:t.close_rate)||2,currency:(t==null?void 0:t.currency)||"USD",currency_symbol:(t==null?void 0:t.currency_symbol)||"$",monthly_revenue_target:(t==null?void 0:t.monthly_revenue_target)||void 0,sales_cycle_days:(t==null?void 0:t.sales_cycle_days)||90,industry:(t==null?void 0:t.industry)||""}),u=h=>{const f=c4.find(m=>m.code===h);f&&(f.code==="CUSTOM"?c({...l,currency:h,currency_symbol:i}):c({...l,currency:h,currency_symbol:f.symbol}))},d=async h=>{h.preventDefault(),a(!0);try{await n(l),e==null||e()}catch(f){console.error("Error saving revenue settings:",f)}finally{a(!1)}};return s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Revenue Tracking Setup"}),s.jsx(Za,{children:"Configure your deal parameters to track pipeline value and revenue progress"})]}),s.jsx(te,{children:s.jsxs("form",{onSubmit:d,className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"average_deal_size",children:"Average Deal Size"}),s.jsx(at,{id:"average_deal_size",type:"number",min:"0",step:"100",value:l.average_deal_size,onChange:h=>c({...l,average_deal_size:parseFloat(h.target.value)}),required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Typical value of a closed deal"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"currency",children:"Currency"}),s.jsxs(hr,{value:l.currency,onValueChange:u,children:[s.jsx(nr,{children:s.jsx(fr,{})}),s.jsx(rr,{children:c4.map(h=>s.jsxs(bt,{value:h.code,children:[h.symbol?`${h.symbol} - `:"",h.name]},h.code))})]}),l.currency==="CUSTOM"&&s.jsx(at,{placeholder:"Enter currency symbol (e.g., ₹, £)",value:i,onChange:h=>{o(h.target.value),c({...l,currency_symbol:h.target.value})},className:"mt-2"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"close_rate",children:"Close Rate (%)"}),s.jsx(at,{id:"close_rate",type:"number",min:"0",max:"100",step:"0.1",value:l.close_rate,onChange:h=>c({...l,close_rate:parseFloat(h.target.value)}),required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Percentage of deals you typically close (default: 2%)"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"monthly_revenue_target",children:"Monthly Revenue Target (Optional)"}),s.jsx(at,{id:"monthly_revenue_target",type:"number",min:"0",step:"1000",value:l.monthly_revenue_target||"",onChange:h=>c({...l,monthly_revenue_target:h.target.value?parseFloat(h.target.value):void 0})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Your monthly revenue goal"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"sales_cycle_days",children:"Sales Cycle Length (Days)"}),s.jsxs(hr,{value:l.sales_cycle_days.toString(),onValueChange:h=>c({...l,sales_cycle_days:parseInt(h)}),children:[s.jsx(nr,{children:s.jsx(fr,{})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"30",children:"30 days (1 month)"}),s.jsx(bt,{value:"60",children:"60 days (2 months)"}),s.jsx(bt,{value:"90",children:"90 days (3 months)"}),s.jsx(bt,{value:"120",children:"120 days (4 months)"}),s.jsx(bt,{value:"180",children:"180 days (6 months)"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Average time from first contact to close"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"industry",children:"Industry (Optional)"}),s.jsx(at,{id:"industry",type:"text",value:l.industry,onChange:h=>c({...l,industry:h.target.value}
951),placeholder:"e.g., SaaS, E-commerce"})]})]}),s.jsx("div",{className:"flex justify-end gap-3",children:s.jsx(U,{type:"submit",disabled:r,children:r?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Settings"})})]})})]})},Ynt=({pipelineValue:e,compact:t=!0})=>{const n=gV(e.cycle_progress),r=e.cycle_progress>=100;return t?s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-muted/50 rounded-lg",children:[s.jsx(sn,{className:`h-5 w-5 ${n.color}`}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsxs("span",{className:"text-sm font-medium",children:[n.label," Cycle"]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.days_remaining," days left"]})]}),s.jsx(ur,{value:Math.min(e.cycle_progress,100),className:"h-1.5"})]}),r&&s.jsx(Gs,{className:"h-5 w-5 text-orange-500"})]}):s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(sn,{className:`h-5 w-5 ${n.color}`}),s.jsxs("span",{className:"font-medium",children:[n.label," Cycle"]})]}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Day ",e.days_in_cycle," of ",e.sales_cycle_days]})]}),s.jsx(ur,{value:Math.min(e.cycle_progress,100),className:"h-2"}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"text-muted-foreground",children:[e.days_remaining," days remaining"]}),s.jsxs("span",{className:`font-medium ${n.color}`,children:[Math.round(e.cycle_progress),"% complete"]})]}),e.cycle_extensions_used>0&&s.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.cycle_extensions_used," extension(s) used"]}),r&&s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-orange-50 dark:bg-orange-950/20 rounded border border-orange-200 dark:border-orange-800",children:[s.jsx(Gs,{className:"h-4 w-4 text-orange-600"}),s.jsx("span",{className:"text-sm text-orange-800 dark:text-orange-300",children:"Cycle expired - refresh recommended"})]})]})},Xnt=({alwaysShow:e=!1,needsRefresh:t=!1,cycleProgress:n=0})=>{const[r,a]=g.useState(!1),[i,o]=g.useState(!1),[l,c]=g.useState(null),{settings:u,refreshCycle:d}=gm(),h=async()=>{if(l){o(!0);try{const y=await d(l);y.success?(l==="extend_cycle"?Ae.success("Cycle extended by 7 days!"):l==="full_reset"?Ae.success("Pipeline refreshed! Starting fresh cycle."):l==="smart_refresh"&&Ae.success("Smart refresh complete! Pipeline optimized."),a(!1),c(null)):Ae.error(y.error||"Failed to refresh cycle")}catch{Ae.error("An error occurred while refreshing the cycle")}finally{o(!1)}}},m=!e&&!t?null:t?{variant:"default",className:"w-full bg-gradient-to-r from-orange-500 to-red-500 hover:from-orange-600 hover:to-red-600 text-white",icon:dt,text:"Refresh Sales Cycle"}:{variant:"outline",className:"w-full",icon:vo,text:"Manage Sales Cycle"};return m?s.jsxs(Wr,{open:r,onOpenChange:a,children:[s.jsx(wd,{asChild:!0,children:s.jsxs(U,{variant:m.variant,className:m.className,children:[s.jsx(m.icon,{className:"w-4 h-4 mr-2"}),m.text]})}),s.jsxs(Pr,{className:"max-w-2xl",children:[s.jsxs(Vr,{children:[s.jsx(Tr,{className:"flex items-center gap-2",children:t?s.jsxs(s.Fragment,{children:[s.jsx(Gs,{className:"h-5 w-5 text-orange-500"}),"Sales Cycle Complete"]}):s.jsxs(s.Fragment,{children:[s.jsx(vo,{className:"h-5 w-5 text-blue-500"}),"Manage Sales Cycle"]})}),s.jsx(Uc,{children:t?`Your ${(u==null?void 0:u.sales_cycle_days)||90}-day sales cycle has ended. Choose how to proceed with your pipeline.`:n>=90?`Your cycle is ${Math.round(n)}% complete. You can extend the cycle or prepare to refresh.`:`Your cycle is ${Math.round(n)}% complete and progressing well.`})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[!t&&n<90&&s.jsx("div",{className:"p-4 bg-blue-50 dark:bg-blue-950/20 rounded-lg border border-blue-200 dark:border-blue-800",children:s.jsxs("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:["Your sales cycle is on track. Come back when your cycle is closer to completion (",Math.round(100-n),"% remaining) to refresh or extend it."]})}),s.jsx("div",{className:`p-4 rounded-lg border-2 cursor-pointer transition-all ${l==="smart_refresh"?"border-primary bg-primary/5":"border-border hover:border-primary/50"} ${!t&&n<90?"opacity-50 cursor-not-allowed":""}`,onClick:()=>{(t||n>=90)&&c("smart_refresh")},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(dt,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-semibold mb-1",children:"Smart Refresh (Recommended)"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Keep high-value prospects, archive stale leads"}),s.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1",children:[s.jsx("li",{children:"✓ Preserves leads with recent activity"}),s.jsx("li",{children:"✓ Archives companies with no engagement"}),s.jsx("li",{children:"✓ Maintains pipeline momentum"})]})]})]})}),s.jsx("div",{className:`p-4 rounded-lg border-2 cursor-pointer transition-all ${l==="full_reset"?"border-destructive bg-destructive/5":"border-border hover:border-destructive/50"} ${!t&&n<90?"opacity-50 cursor-not-allowed":""}`,onClick:()=>{(t||n>=90)&&c("full_reset")},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(co,{className:"w-5 h-5 text-destructive flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-semibold mb-1",children:"Full Reset"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Archive all leads and start completely fresh"}),s.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1",children:[s.jsx("li",{children:"⚠️ Archives all pipeline companies"}),s.jsx("li",{children:"⚠️ Clean slate for new cycle"}),s.jsx("li",{children:"⚠️ Cannot be undone"})]})]})]})}),s.jsx("div",{className:`p-4 rounded-lg border-2 cursor-pointer transition-all ${l==="extend_cycle"?"border-blue-500 bg-blue-50 dark:bg-blue-950/20":"border-border hover:border-blue-500/50"}`,onClick:()=>c("extend_cycle"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Xn,{className:"w-5 h-5 text-blue-500 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-semibold mb-1",children:"Extend Cycle"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Add 7 more days to close pending deals"}),s.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1",children:[s.jsx("li",{children:"• Extends current cycle by 7 days"}),s.jsx("li",{children:"• Maximum 2 extensions per cycle"}),s.jsx("li",{children:"• No changes to pipeline"})]})]})]})})]}),s.jsxs(dj,{children:[s.jsx(U,{variant:"outline",onClick:()=>a(!1),children:t||n>=90?"Cancel":"Close"}),(t||n>=90||l==="extend_cycle")&&s.jsx(U,{onClick:h,disabled:!l||i,variant:l==="full_reset"?"destructive":"default",children:i?"Processing...":"Confirm"})]})]})]}):null};
951function Qnt(){const[e,t]=g.useState([]),[n,r]=g.useState(!0),[a,i]=g.useState("$");g.useEffect(()=>{o()},[]);const o=async()=>{try{const{data:{user:l}}=await K.auth.getUser();if(!l)return;const{data:c}=await K.from("revenue_settings").select("currency_symbol").eq("user_id",l.id).single();c&&i(c.currency_symbol);const{data:u,error:d}=await K.from("sales_cycles").select("*").eq("user_id",l.id).order("cycle_number",{ascending:!1}).limit(5);if(d)throw d;t(u||[])}catch(l){console.error("Error fetching cycle history:",l)}finally{r(!1)}};return n?s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Je,{className:"h-6 w-48"}),s.jsx(Je,{className:"h-4 w-64 mt-2"})]}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:[1,2,3].map(l=>s.jsx(Je,{className:"h-24 w-full"},l))})})]}):e.length===0?s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(sn,{className:"h-5 w-5"}),"Cycle History"]}),s.jsx(Za,{children:"Your completed sales cycles will appear here"})]}),s.jsx(te,{children:s.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No completed cycles yet. Keep building your pipeline!"})})]}):s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(sn,{className:"h-5 w-5"}),"Cycle History"]}),s.jsxs(Za,{children:["Performance across your past ",e.length," sales cycles"]})]}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:e.map(l=>{const c=l.target_revenue?l.actual_revenue>=l.target_revenue:!1,u=l.deals_won+l.deals_lost>0?(l.deals_won/(l.deals_won+l.deals_lost)*100).toFixed(0):0;return s.jsxs("div",{className:"border rounded-lg p-4 hover:bg-accent/5 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsxs("div",{children:[s.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:["Cycle ",l.cycle_number,c&&s.jsx("span",{className:"text-xs bg-green-500/10 text-green-600 px-2 py-0.5 rounded-full",children:"Target Met"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[new Date(l.start_date).toLocaleDateString()," - "," ",l.end_date?new Date(l.end_date).toLocaleDateString():"In Progress"]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"font-semibold text-lg",children:rs(l.actual_revenue,a)}),l.target_revenue&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["of ",rs(l.target_revenue,a)," target"]})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-muted-foreground mb-1",children:"Companies"}),s.jsx("p",{className:"font-medium",children:l.companies_added})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted-foreground mb-1",children:"Win Rate"}),s.jsxs("p",{className:"font-medium flex items-center gap-1",children:[u,"%",Number(u)>=50?s.jsx(ze,{className:"h-3 w-3 text-green-600"}):s.jsx(DA,{className:"h-3 w-3 text-orange-600"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted-foreground mb-1",children:"Deals"}),s.jsxs("p",{className:"font-medium",children:[l.deals_won,"W / ",l.deals_lost,"L"]})]})]}),l.refresh_action&&s.jsx("div",{className:"mt-3 pt-3 border-t",children:s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Ended with: ",s.jsx("span",{className:"font-medium capitalize",children:l.refresh_action.replace("_"," ")})]})})]},l.id)})})})]})}var Hb={linear:function(e,t,n,r){var a=n-t;return a*e/r+t},easeInQuad:function(e,t,n,r){var a=n-t;return a*(e/=r)*e+t},easeOutQuad:function(e,t,n,r){var a=n-t;return-a*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e+t:-a/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,n,r){var a=n-t;return a*(e/=r)*e*e+t},easeOutCubic:function(e,t,n,r){var a=n-t;return a*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,n,r){var a=n-t;return a*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,n,r){var a=n-t;return-a*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e*e*e+t:-a/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,n,r){var a=n-t;return a*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,n,r){var a=n-t;return a*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e*e*e*e+t:a/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,n,r){var a=n-t;
951return-a*Math.cos(e/r*(Math.PI/2))+a+t},easeOutSine:function(e,t,n,r){var a=n-t;return a*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,n,r){var a=n-t;return-a/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,n,r){var a=n-t;return e==0?t:a*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,n,r){var a=n-t;return e==r?t+a:a*(-Math.pow(2,-10*e/r)+1)+t},easeInOutExpo:function(e,t,n,r){var a=n-t;return e===0?t:e===r?t+a:(e/=r/2)<1?a/2*Math.pow(2,10*(e-1))+t:a/2*(-Math.pow(2,-10*--e)+2)+t},easeInCirc:function(e,t,n,r){var a=n-t;return-a*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,n,r){var a=n-t;return a*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?-a/2*(Math.sqrt(1-e*e)-1)+t:a/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,n,r){var a=n-t,i,o,l;return l=1.70158,o=0,i=a,e===0?t:(e/=r)===1?t+a:(o||(o=r*.3),i<Math.abs(a)?(i=a,l=o/4):l=o/(2*Math.PI)*Math.asin(a/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-l)*(2*Math.PI)/o))+t)},easeOutElastic:function(e,t,n,r){var a=n-t,i,o,l;return l=1.70158,o=0,i=a,e===0?t:(e/=r)===1?t+a:(o||(o=r*.3),i<Math.abs(a)?(i=a,l=o/4):l=o/(2*Math.PI)*Math.asin(a/i),i*Math.pow(2,-10*e)*Math.sin((e*r-l)*(2*Math.PI)/o)+a+t)},easeInOutElastic:function(e,t,n,r){var a=n-t,i,o,l;return l=1.70158,o=0,i=a,e===0?t:(e/=r/2)===2?t+a:(o||(o=r*(.3*1.5)),i<Math.abs(a)?(i=a,l=o/4):l=o/(2*Math.PI)*Math.asin(a/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-l)*(2*Math.PI)/o))+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-l)*(2*Math.PI)/o)*.5+a+t)},easeInBack:function(e,t,n,r,a){var i=n-t;return a===void 0&&(a=1.70158),i*(e/=r)*e*((a+1)*e-a)+t},easeOutBack:function(e,t,n,r,a){var i=n-t;return a===void 0&&(a=1.70158),i*((e=e/r-1)*e*((a+1)*e+a)+1)+t},easeInOutBack:function(e,t,n,r,a){var i=n-t;return a===void 0&&(a=1.70158),(e/=r/2)<1?i/2*(e*e*(((a*=1.525)+1)*e-a))+t:i/2*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)+t},easeInBounce:function(e,t,n,r){var a=n-t,i;return i=Hb.easeOutBounce(r-e,0,a,r),a-i+t},easeOutBounce:function(e,t,n,r){var a=n-t;return(e/=r)<1/2.75?a*(7.5625*e*e)+t:e<2/2.75?a*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?a*(7.5625*(e-=2.25/2.75)*e+.9375)+t:a*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(e,t,n,r){var a=n-t,i;return e<r/2?(i=Hb.easeInBounce(e*2,0,a,r),i*.5+t):(i=Hb.easeOutBounce(e*2-r,0,a,r),i*.5+a*.5+t)}},Znt=Hb;function Jnt(e){return e*Math.PI/180}function aa(e,t){return e+Math.random()*(t-e)}function ert(e,t){return Math.floor(e+Math.random()*(t-e+1))}var hg;(function(e){e[e.Circle=0]="Circle",e[e.Square=1]="Square",e[e.Strip=2]="Strip"})(hg||(hg={}));var Bl;(function(e){e[e.Positive=1]="Positive",e[e.Negative=-1]="Negative"})(Bl||(Bl={}));const trt=1e3/60;class nrt{constructor(t,n,r,a){this.getOptions=n;const{colors:i,initialVelocityX:o,initialVelocityY:l}=this.getOptions();this.context=t,this.x=r,this.y=a,this.w=aa(5,20),this.h=aa(5,20),this.radius=aa(5,10),this.vx=typeof o=="number"?aa(-o,o):aa(o.min,o.max),this.vy=typeof l=="number"?aa(-l,0):aa(l.min,l.max),this.shape=ert(0,2),this.angle=Jnt(aa(0,360)),this.angularSpin=aa(-.2,.2),this.color=i[Math.floor(Math.random()*i.length)],this.rotateY=aa(0,1),this.rotationDirection=aa(0,1)?Bl.Positive:Bl.Negative}update(t){const{gravity:n,wind:r,friction:a,opacity:i,drawShape:o}=this.getOptions(),l=t/trt;this.x+=this.vx*l,this.y+=this.vy*l,this.vy+=n*l,this.vx+=r*l,this.vx*=a**l,this.vy*=a**l,this.rotateY>=1&&this.rotationDirection===Bl.Positive?this.rotationDirection=Bl.Negative:this.rotateY<=-1&&this.rotationDirection===Bl.Negative&&(this.rotationDirection=Bl.Positive);const c=.1*this.rotationDirection*l;if(this.rotateY+=c,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=i,this.context.lineCap="round",this.context.lineWidth=2,o&&typeof o=="function")o.call(this,this.context);else switch(this.shape){case hg.Circle:{this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break}case hg.Square:{this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break}case hg.Strip:{this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h);break}}
951this.context.closePath(),this.context.restore()}}class rrt{constructor(t,n){this.x=0,this.y=0,this.w=0,this.h=0,this.lastNumberOfPieces=0,this.tweenProgress=0,this.tweenFrom=0,this.particles=[],this.particlesGenerated=0,this.removeParticleAt=a=>{this.particles.splice(a,1)},this.getParticle=()=>{const a=aa(this.x,this.w+this.x),i=aa(this.y,this.h+this.y);return new nrt(this.context,this.getOptions,a,i)},this.animate=a=>{const{canvas:i,context:o,particlesGenerated:l,lastNumberOfPieces:c}=this,{run:u,recycle:d,numberOfPieces:h,debug:f,tweenFunction:m,tweenDuration:y}=this.getOptions();if(!u)return!1;const p=this.particles.length,x=d?p:l;if(x<h){c!==h&&(this.tweenProgress=0,this.tweenFrom=x,this.lastNumberOfPieces=h),this.tweenProgress=Math.min(y,Math.max(0,this.tweenProgress+a));const v=m(this.tweenProgress,this.tweenFrom,h,y),b=Math.round(v-x);for(let w=0;w<b;w++)this.particles.push(this.getParticle());this.particlesGenerated+=b}f&&(o.font="12px sans-serif",o.fillStyle="#333",o.textAlign="right",o.fillText(`Particles: ${p}`,i.width-10,i.height-20));for(let v=this.particles.length-1;v>=0;v--){const b=this.particles[v];b.update(a),(b.y>i.height||b.y<-100||b.x>i.width+100||b.x<-100)&&(d&&x<=h?this.particles[v]=this.getParticle():this.removeParticleAt(v))}return p>0||x<h},this.canvas=t;const r=this.canvas.getContext("2d");if(!r)throw new Error("Could not get canvas context");this.context=r,this.getOptions=n}}const bI={width:typeof window<"u"?window.innerWidth:300,height:typeof window<"u"?window.innerHeight:200,numberOfPieces:200,friction:.99,wind:0,gravity:.1,initialVelocityX:4,initialVelocityY:10,colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548"],opacity:1,debug:!1,tweenFunction:Znt.easeInOutQuad,tweenDuration:5e3,recycle:!0,run:!0};class srt{constructor(t,n){this.lastFrameTime=0,this.setOptionsWithDefaults=a=>{const i={confettiSource:{x:0,y:0,w:this.canvas.width,h:0}};this._options={...i,...bI,...a},Object.assign(this,a.confettiSource)},this.update=(a=0)=>{const{options:{run:i,onConfettiComplete:o,frameRate:l},canvas:c,context:u}=this,d=Math.min(a-this.lastFrameTime,50);if(l&&d<1e3/l){this.rafId=requestAnimationFrame(this.update);return}this.lastFrameTime=a-(l?d%l:0),i&&(u.fillStyle="white",u.clearRect(0,0,c.width,c.height)),this.generator.animate(d)?this.rafId=requestAnimationFrame(this.update):(o&&typeof o=="function"&&this.generator.particlesGenerated>0&&o.call(this,this),this._options.run=!1)},this.reset=()=>{this.generator&&this.generator.particlesGenerated>0&&(this.generator.particlesGenerated=0,this.generator.particles=[],this.generator.lastNumberOfPieces=0)},this.stop=()=>{this.options={run:!1},this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)},this.canvas=t;const r=this.canvas.getContext("2d");if(!r)throw new Error("Could not get canvas context");this.context=r,this.generator=new rrt(this.canvas,()=>this.options),this.options=n,this.update()}get options(){return this._options}set options(t){var a,i;const n=(a=this._options)==null?void 0:a.run,r=(i=this._options)==null?void 0:i.recycle;this.setOptionsWithDefaults(t),this.generator&&(Object.assign(this.generator,this.options.confettiSource),typeof t.recycle=="boolean"&&t.recycle&&r===!1&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),typeof t.run=="boolean"&&t.run&&n===!1&&this.update()}}const art=z.createRef();class wI extends z.Component{constructor(t){super(t),this.canvas=z.createRef(),this.canvas=t.canvasRef||art}componentDidMount(){if(this.canvas.current){const t=tC(this.props)[0];this.confetti=new srt(this.canvas.current,t)}}componentDidUpdate(){const t=tC(this.props)[0];this.confetti&&(this.confetti.options=t)}componentWillUnmount(){this.confetti&&this.confetti.stop(),this.confetti=void 0}render(){const[t,n]=tC(this.props),r={zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0,...n.style};return s.jsx("canvas",{width:t.width,height:t.height,ref:this.canvas,...n,style:r})}}wI.defaultProps={...bI};wI.displayName="ReactConfetti";function tC(e){const t={},n={},r={},a=[...Object.keys(bI),"confettiSource","drawShape","onConfettiComplete","frameRate"],i=["canvasRef"];for(const o in e){const l=e[o];a.includes(o)?t[o]=l:i.includes(o)?i[o]=l:r[o]=l}return[t,r,n]}const Wne=z.forwardRef((e,t)=>
951s.jsx(wI,{canvasRef:t,...e}));function irt({milestone:e,onClose:t}){const[n,r]=g.useState(!1),[a,i]=g.useState({width:window.innerWidth,height:window.innerHeight});if(g.useEffect(()=>{const l=()=>{i({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),g.useEffect(()=>{if(e){r(!0);const l=setTimeout(()=>r(!1),5e3);return()=>clearTimeout(l)}},[e]),!e)return null;const o=()=>{switch(e.type){case"target_reached":return s.jsx(tn,{className:"h-16 w-16 text-green-600"});case"cycle_complete":return s.jsx(gf,{className:"h-16 w-16 text-yellow-600"});case"deals_won":return s.jsx(ze,{className:"h-16 w-16 text-blue-600"});case"high_conversion":return s.jsx(Tn,{className:"h-16 w-16 text-purple-600"});default:return s.jsx(gf,{className:"h-16 w-16"})}};return s.jsxs(s.Fragment,{children:[n&&s.jsx(Wne,{width:a.width,height:a.height,recycle:!1,numberOfPieces:500,gravity:.3}),s.jsx(Wr,{open:!!e,onOpenChange:t,children:s.jsxs(Pr,{className:"sm:max-w-md",children:[s.jsx(Vr,{children:s.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[s.jsx("div",{className:"animate-bounce",children:o()}),s.jsx(Tr,{className:"text-2xl text-center",children:e.title})]})}),s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("p",{className:"text-muted-foreground",children:e.message}),e.value&&s.jsx("div",{className:"text-3xl font-bold text-primary animate-pulse",children:e.value}),s.jsx(U,{onClick:t,className:"w-full",size:"lg",children:"Keep Going! 🚀"})]})]})})]})}function ort(e){const[t,n]=g.useState(null),[r,a]=g.useState(new Set);return g.useEffect(()=>{if(!e)return;(()=>{e.monthly_target&&e.progress_percentage>=100&&!r.has("target_reached")&&(n({type:"target_reached",title:"🎯 Target Reached!",message:"Congratulations! You've hit your monthly revenue target!",value:rs(e.expected_revenue,e.currency_symbol)}),a(o=>new Set(o).add("target_reached"))),e.cycle_progress>=90&&e.progress_percentage>=80&&!r.has("cycle_strong_finish")&&(n({type:"cycle_complete",title:"🏆 Strong Finish!",message:"You're closing your cycle strong with excellent pipeline health!",value:`${e.total_companies} companies`}),a(o=>new Set(o).add("cycle_strong_finish"))),e.close_rate>25&&e.total_companies>=10&&!r.has("high_conversion")&&(n({type:"high_conversion",title:"⚡ Exceptional Conversion!",message:"Your close rate is outstanding! Keep up the great work!",value:`${e.close_rate}% close rate`}),a(o=>new Set(o).add("high_conversion")))})()},[e,r]),{milestone:t,clearMilestone:()=>n(null)}}const lrt=()=>{const{settings:e,pipelineValue:t,loading:n,refreshPipeline:r,hasSettings:a}=gm(),{milestone:i,clearMilestone:o}=ort(t);if(g.useEffect(()=>{a&&r()},[a,r]),n)return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Je,{className:"h-32 w-full"}),s.jsx(Je,{className:"h-64 w-full"})]});if(!a)return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Y,{className:"border-2 border-dashed",children:s.jsxs(te,{className:"text-center py-12",children:[s.jsx(tn,{className:"h-16 w-16 mx-auto mb-4 text-muted-foreground"}),s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Welcome to Revenue Insights"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-2xl mx-auto",children:"Transform your prospecting into projected revenue. Track your sales cycle, monitor pipeline health, and forecast your deals with AI-powered probability scoring."})]})}),s.jsx(eC,{})]});if(!t)return s.jsx("div",{className:"text-center py-8",children:s.jsx("p",{className:"text-muted-foreground",children:"Loading pipeline data..."})});if(t.total_companies===0)return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Y,{className:"border-2 border-dashed",children:s.jsxs(te,{className:"text-center py-16",children:[s.jsx(tt,{className:"h-20 w-20 mx-auto mb-6 text-muted-foreground opacity-50"}),s.jsx("h3",{className:"text-2xl font-bold mb-3",children:"Build Your Revenue Pipeline"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:"Start adding qualified prospects to see your projected revenue, track your sales cycle, and hit your monthly targets."}),s.jsxs("div",{className:"flex gap-3 justify-center flex-wrap",children:[s.jsx("a",{href:"/profile?tab=auto-prospecting",children:s.jsx("button",{className:"px-6 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:"Set Up Auto-Prospecting"})}),s.jsx("a",{href:"/companies",children:s.jsx("button",{className:"px-6 py-2 border border-border rounded-md hover:bg-accent",children:"Browse Companies"})})]})]})}),s.jsx(eC,{})]});const l=gV(t.cycle_progress),c=t.cycle_progress>=100,u=t.cycle_progress>=90&&t.cycle_progress<100;return s.jsxs("div",{className:"space-y-6",children:[u&&s.jsx(Y,{className:"bg-gradient-to-r from-orange-50 to-red-50 dark:from-orange-950/20 dark:to-red-950/20 border-orange-200 dark:border-orange-800",children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"text-2xl",children:t.cycle_progress>=95?"⏰":"🔥"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-orange-900 dark:text-orange-100",children:t.cycle_progress>=95?`Final ${t.days_remaining} days of your sales cycle!`:`Only ${Math.round(100-t.cycle_progress)}% of your cycle left`}),s.jsx("p",{className:"text-sm text-orange-700 dark:text-orange-300",children:t.cycle_progress>=95?"Time to finalize hot leads and close pending deals":"Focus on high-priority prospects to finish strong"})]})]})})}),s.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(Y,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Se,{className:"text-sm font-medium",children:"Projected Revenue"}),s.jsx(Fn,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:rs(t.projected_revenue,t.currency_symbol)}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.total_companies," companies in pipeline"]})]})]}),s.jsxs(Y,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Se,{className:"text-sm font-medium",children:"Expected Revenue"}),s.jsx(ze,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:rs(t.expected_revenue,t.currency_symbol)}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Based on ",t.close_rate,"% close rate"]})]})]}),s.jsxs(Y,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Se,{className:"text-sm font-medium",children:"Monthly Target"}),s.jsx(tn,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:t.monthly_target?rs(t.monthly_target,t.currency_symbol):"Not set"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.monthly_target&&t.progress_percentage>0?`${Math.round(t.progress_percentage)}% progress`:"Set a target in settings"})]})]}),s.jsxs(Y,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Se,{className:"text-sm font-medium",children:"Active Companies"}),s.jsx(tt,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:t.saved_companies}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.stale_companies>0&&`${t.stale_companies} stale`})]})]})]}),t.monthly_target&&s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Revenue Goal Progress"}
951),s.jsxs(Za,{children:["You're ",Math.round(t.progress_percentage),"% of the way to your monthly target"]})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx(ur,{value:Math.min(t.progress_percentage,100),className:"h-3"}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"text-muted-foreground",children:["Current: ",rs(t.expected_revenue,t.currency_symbol)]}),s.jsxs("span",{className:"text-muted-foreground",children:["Target: ",rs(t.monthly_target,t.currency_symbol)]})]}),t.progress_percentage<100&&s.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[s.jsx("p",{className:"text-sm font-medium mb-1",children:"💡 Tip to reach your goal:"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Add ",Math.ceil((t.monthly_target-t.expected_revenue)/t.average_deal_size)," more qualified companies to hit your target."]})]})]})]}),s.jsxs("div",{className:"grid gap-6 grid-cols-1 md:grid-cols-2",children:[s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Sales Cycle Progress"}),s.jsxs(Za,{children:["Cycle #",t.cycle_number," • ",t.days_remaining," days remaining"]})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx(Ynt,{pipelineValue:t,compact:!1}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Stage"}),s.jsx("span",{className:`font-medium ${l.color}`,children:l.label})]}),s.jsx("div",{className:"bg-muted/50 p-3 rounded-lg",children:s.jsx("p",{className:"text-sm",children:l.message})})]}),s.jsx(Xnt,{alwaysShow:!0,needsRefresh:c,cycleProgress:t.cycle_progress})]})]}),s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Pipeline Health"}),s.jsx(Za,{children:"Overview of your current pipeline composition"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Active prospects"}),s.jsx("span",{className:"text-lg font-semibold",children:t.saved_companies})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Stale leads"}),s.jsx("span",{className:"text-lg font-semibold text-orange-600",children:t.stale_companies})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Auto-matched"}),s.jsx("span",{className:"text-lg font-semibold text-blue-600",children:t.auto_matched_companies})]})]}),t.stale_companies>0&&s.jsx("div",{className:"bg-orange-50 dark:bg-orange-950/20 p-3 rounded-lg border border-orange-200 dark:border-orange-800",children:s.jsxs("p",{className:"text-sm text-orange-800 dark:text-orange-300",children:["You have ",t.stale_companies," stale ",t.stale_companies===1?"lead":"leads",". Consider refreshing your pipeline to stay focused."]})})]})]})]}),s.jsx(Qnt,{}),s.jsx(eC,{}),s.jsx(irt,{milestone:i,onClose:o})]})},crt=()=>{const[e]=yd(),[t,n]=g.useState("profile"),r=g.useRef(null);return g.useEffect(()=>{const a=e.get("tab");a&&["profile","auto-prospecting","results","analytics","revenue-insights","upvotes","settings"].includes(a)&&(n(a),a==="settings"&&setTimeout(()=>{var i;(i=r.current)==null||i.openDialog()},100))},[e]),s.jsx(b1,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"My Profile"}),s.jsx("p",{className:"text-gray-600",children:"Manage your account and subscription settings"})]}),s.jsxs(_o,{value:t,onValueChange:n,className:"space-y-6",children:[s.jsxs(Fi,{className:"grid w-full grid-cols-7",children:[s.jsxs(yt,{value:"profile",className:"flex items-center gap-2",children:[s.jsx(Ti,{className:"w-4 h-4"}),"Profile"]}),s.jsxs(yt,{value:"auto-prospecting",className:"flex items-center gap-2",children:[s.jsx(tn,{className:"w-4 h-4"}),"Auto-Prospecting"]}),s.jsxs(yt,{value:"results",className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),"Results"]}),s.jsxs(yt,{value:"analytics",className:"flex items-center gap-2",children:[s.jsx(os,{className:"w-4 h-4"}),"Analytics"]}),s.jsxs(yt,{value:"revenue-insights",className:"flex items-center gap-2",children:[s.jsx(Fn,{className:"w-4 h-4"}),"Revenue"]}),s.jsxs(yt,{value:"upvotes",className:"flex items-center gap-2",children:[s.jsx(ze,{className:"w-4 h-4"}),"Upvotes"]}),s.jsxs(yt,{value:"settings",className:"flex items-center gap-2",children:[s.jsx(vo,{className:"w-4 h-4"}),"Settings"]})]}),s.jsx(nn,{value:"profile",className:"space-y-6",children:s.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-8",children:s.jsx("div",{className:"xl:col-span-3",children:s.jsx(Rtt,{})})})}),s.jsx(nn,{value:"auto-prospecting",className:"space-y-6",children:s.jsx(zte,{})}),s.jsx(nn,{value:"results",className:"space-y-6",children:s.jsx(qne,{})}),s.jsx(nn,{value:"analytics",className:"space-y-6",children:s.jsx(Knt,{})}),s.jsx(nn,{value:"revenue-insights",className:"space-y-6",children:s.jsx(lrt,{})}),s.jsx(nn,{value:"upvotes",className:"space-y-6",children:s.jsx("div",{className:"max-w-2xl mx-auto",children:s.jsx(Itt,{})})}),s.jsx(nn,{value:"settings",className:"space-y-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Account Settings"}),s.jsx("p",{className:"text-gray-600",children:"Manage your account settings and API keys"})]}),s.jsx(mI,{ref:r})]})})]})]})})]})})},urt=()=>{const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[a,i]=g.useState(""),[o,l]=g.useState(""),[c,u]=g.useState(!1),[d,h]=g.useState(""),f=cs(),[m]=yd();g.useEffect(()=>{const p=m.get("access_token"),x=m.get("refresh_token");(m.get("type")!=="recovery"||!p||!x)&&h("Invalid or expired reset link. Please request a new password reset.")},[m]);const y=async p=>{if(p.preventDefault(),r(!0),h(""),a!==o){h("Passwords do not match"),r(!1);return}if(a.length<6){h("Password must be at least 6 characters long"),r(!1);return}try{const{error:x}=await K.auth.updateUser({password:a});x?h(x.message):(u(!0),setTimeout(()=>{f("/auth")},3e3))}catch(x){h("An unexpected error occurred. Please try again."),console.error("Password update error:",x)}r(!1)};return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-md mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs(U,{variant:"outline",onClick:()=>f("/"),className:"mb-6",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"Back to Home"]}),s.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"rgb(234, 85, 43)"},children:"Reset Your Password"}),s.jsx("p",{className:"text-gray-600",children:"Enter your new password below"})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{className:"text-center",children:"Set New Password"})}),s.jsxs(te,{children:[d?s.jsxs(Cs,{variant:"destructive",className:"mb-6",children:[s.jsx(Gs,{className:"h-4 w-4"}),s.jsx(Es,{children:d})]}):null,c?s.jsxs(Cs,{className:"mb-6",children:[s.jsx(ks,{className:"h-4 w-4"}),s.jsx(Es,{children:"Password updated successfully! Redirecting to sign in..."})]}):s.jsxs("form",{onSubmit:y,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"new-password",children:"New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(at,{id:"new-password",type:e?"text":"password",placeholder:"Enter new password",value:a,onChange:p=>i(p.target.value),required:!0,minLength:6}),s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>t(!e),children:e?s.jsx(mc,{className:"h-4 w-4"}):s.jsx(zr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ke,{htmlFor:"confirm-new-password",children:"Confirm New Password"}),s.jsx(at,{id:"confirm-new-password",type:e?"text":"password",placeholder:"Confirm new password",value:o,onChange:p=>l(p.target.value),required:!0,minLength:6})]}),a&&o&&a!==o&&s.jsx("p",{className:"text-sm text-red-600",children:"Passwords do not match"}),s.jsx(U,{type:"submit",className:"w-full",style:{backgroundColor:"rgb(234, 85, 43)"},disabled:n||a!==o||a.length<6,children:n?"Updating Password...":"Update Password"})]})]})]})]})})]})},drt=()=>{const e=ml();return g.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),s.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},hrt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=12,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["growth-marketing",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching growth marketing for page:",c);const k=await Kt.fetchGrowthMarketingStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Growth marketing fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("growth_marketing_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Growth Marketing",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to scale their growth marketing efforts, optimize acquisition channels, and drive sustainable user growth."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," growth marketing companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading growth marketing companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},frt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=12,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["revenue-operations",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching revenue operations for page:",c);const k=await Kt.fetchRevenueOperationsStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Revenue operations fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("revenue_operations_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Revenue Operations",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to optimize their revenue operations, streamline sales processes, and enhance forecasting capabilities."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," revenue operations companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading revenue operations companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},mrt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=15,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["conversion-rate-optimization",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;const k=await Kt.fetchConversionRateOptimizationStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Conversion rate optimization fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:10*60*1e3}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("cro_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Conversion Rate Optimization",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to optimize their conversion funnels, improve user experience, and increase website conversion rates."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," conversion optimization companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading conversion rate optimization companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},prt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=15,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["product-marketing-analytics",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching product marketing analytics for page:",c);const k=await Kt.fetchProductMarketingAnalyticsStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Product marketing analytics fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:10*60*1e3}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("product_marketing_analytics_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Product & Marketing Analytics",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to enhance their product analytics, marketing attribution, and data-driven decision making capabilities."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," product marketing analytics companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading product marketing analytics companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},grt=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["customer-success",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D,M;const E=await Kt.fetchCustomerSuccessStartups({search:e,industry:n.find(X=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(X)),fundingStage:n.find(X=>["Series A","Series B","Seed","Pre-seed"].includes(X)),scoreRange:a,sortBy:o,page:c,pageSize:N});return console.log("✅ Customer success fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),!d&&((M=E.records)==null?void 0:M.length)>0&&m(),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{if(console.log("Page change requested:",E),!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("customer_success_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=E=>{p()};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Customer Success",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to enhance their customer success strategies, reduce churn, and improve customer lifetime value."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," customer success companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading customer success companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:$,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j}),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:k}),s.jsx(wt,{})]})})},yrt=()=>{var T,F,O;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{incrementRequestCount:m,showEmailSignup:y,resetRequestCount:p}=us(),{showCaptcha:x,currentProblem:v,isLoading:b,initiateCaptcha:w,solveCaptcha:S,resetCaptcha:j}=Rt(),N=12,C=7,{data:_,isLoading:A,isFetching:P}=ct({queryKey:["content-marketing",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var D,M;const E=await Kt.fetchContentMarketingStartups({search:e,industry:n.find(X=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(X)),fundingStage:n.find(X=>["Series A","Series B","Seed","Pre-seed"].includes(X)),scoreRange:a,sortBy:o,page:c,pageSize:N});return console.log("✅ Content marketing fetched:",{recordCount:((D=E.records)==null?void 0:D.length)||0,hasMore:E.hasMore}),!d&&((M=E.records)==null?void 0:M.length)>0&&m(),E},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),R=E=>{const D=n.includes(E)?n.filter(M=>M!==E):[...n,E];r(D),u(1)},I=E=>{i(E),u(1)},B=()=>{r([]),i("all"),t(""),u(1)},$=E=>{if(console.log("Page change requested:",E),!h&&E>C){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}w("content_marketing_page_change")?(console.log("Captcha needed, storing target page:",E),sessionStorage.setItem("targetPage",E.toString())):(console.log("No captcha needed, setting page to:",E),u(E))},q=()=>{const E=sessionStorage.getItem("targetPage");E&&(console.log("Captcha success, setting page to:",E),u(parseInt(E)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},L=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})},k=E=>{p()};return s.jsx(kr,{children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Content Marketing",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to enhance their content strategy, improve content marketing ROI, and build stronger brand authority."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:R,scoreRange:a,onScoreRangeChange:I,onClearFilters:B}),!A&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",((T=_==null?void 0:_.pagination)==null?void 0:T.totalRecords)||0," content marketing companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:A?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading content marketing companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(F=_==null?void 0:_.records)==null?void 0:F.map((E,D)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:D*.1},children:s.jsx(Bt,{startup:E,index:D})},`${E.id}-${c}-${D}`))}),(_==null?void 0:_.pagination)&&s.jsx(Ut,{currentPage:_.pagination.currentPage,totalPages:h?_.pagination.totalPages:Math.min(C,_.pagination.totalPages),totalRecords:_.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:$,isLoading:P}),((O=_==null?void 0:_.records)==null?void 0:O.length)===0&&!A&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),x&&v&&s.jsx(Ot,{isOpen:x,question:v.question,isLoading:b,onSolve:E=>S(E,q,L),onClose:j}),s.jsx(Ui,{isOpen:y&&!d,onEmailSubmit:k}),s.jsx(wt,{})]})})},xrt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=12,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["demand-generation",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching demand generation for page:",c);const k=await Kt.fetchDemandGenerationStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Demand generation fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:15*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("demand_generation_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Demand Generation",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to build effective demand generation strategies, improve lead quality, and accelerate pipeline growth."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," demand generation companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading demand generation companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},vrt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=15,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["social-media-community-growth",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching social media community growth for page:",c);const k=await Kt.fetchSocialMediaCommunityGrowthStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Social media community growth fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:10*60*1e3}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("social_media_community_growth_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Social Media & Community Growth",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to build vibrant communities, enhance social media presence, and drive engagement-led growth."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," social media community growth companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading social media community growth companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},brt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=15,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["security-data-privacy",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching security data privacy for page:",c);const k=await Kt.fetchSecurityDataPrivacyStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ Security data privacy fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:10*60*1e3}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("security_data_privacy_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["Security & Data Privacy",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to enhance their cybersecurity posture, ensure data privacy compliance, and protect against evolving threats."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," security data privacy companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading security data privacy companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},wrt=()=>{var $,q,L;const[e,t]=g.useState(""),[n,r]=g.useState([]),[a,i]=g.useState("all"),[o,l]=g.useState("newest"),[c,u]=g.useState(1),{user:d,subscribed:h}=Ie(),{toast:f}=Ve(),{showCaptcha:m,currentProblem:y,isLoading:p,initiateCaptcha:x,solveCaptcha:v,resetCaptcha:b}=Rt(),w=15,S=7,{data:j,isLoading:N,isFetching:C}=ct({queryKey:["devops-platform-enablement",{searchTerm:e,selectedFilters:n,sortBy:o,scoreRange:a,currentPage:c}],queryFn:async()=>{var T;console.log("🔍 Fetching devops platform enablement for page:",c);const k=await Kt.fetchDevOpsPlatformEnablementStartups({search:e,industry:n.find(F=>["Technology","Healthcare","FinTech","SaaS","E-commerce"].includes(F)),fundingStage:n.find(F=>["Series A","Series B","Seed","Pre-seed"].includes(F)),scoreRange:a,sortBy:o,page:c,pageSize:w});return console.log("✅ DevOps platform enablement fetched:",{recordCount:((T=k.records)==null?void 0:T.length)||0,hasMore:k.hasMore}),k},staleTime:10*60*1e3}),_=k=>{const T=n.includes(k)?n.filter(F=>F!==k):[...n,k];r(T),u(1)},A=k=>{i(k),u(1)},P=()=>{r([]),i("all"),t(""),u(1)},R=k=>{if(console.log("Page change requested:",k),!h&&k>S){f({title:"Upgrade Required",description:"Upgrade to access more companies beyond the first 700.",variant:"destructive"});return}x("devops_platform_enablement_page_change")?(console.log("Captcha needed, storing target page:",k),sessionStorage.setItem("targetPage",k.toString())):(console.log("No captcha needed, setting page to:",k),u(k))},I=()=>{const k=sessionStorage.getItem("targetPage");k&&(console.log("Captcha success, setting page to:",k),u(parseInt(k)),sessionStorage.removeItem("targetPage"),f({title:"Correct! 🎉",description:"Loading the requested page..."}))},B=()=>{sessionStorage.removeItem("targetPage"),f({title:"Try again",description:"That's not quite right. Please try the new problem.",variant:"destructive"})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50",children:[s.jsx(Ee,{}),s.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs(he.div,{initial:{opacity:0,y:20}
951,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 mb-6",children:["DevOps & Platform Enablement",s.jsx("span",{className:"text-orange-600",children:" Opportunities"})]}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mb-6",children:"Find companies seeking to streamline their development operations, improve deployment pipelines, and enhance platform reliability."}),s.jsxs("div",{className:"flex justify-center items-center gap-4",children:[s.jsx(ee,{to:"/pitch",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(st,{className:"w-4 h-4"}),"Search Pitches"]})}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{variant:"default",size:"sm",className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"Pitch Analytics"]})})]})]})})}),s.jsx("section",{className:"pb-8 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx(zt,{searchTerm:e,onSearchChange:t,sortBy:o,onSortChange:l,selectedFilters:n,onFilterToggle:_,scoreRange:a,onScoreRangeChange:A,onClearFilters:P}),!N&&s.jsxs("div",{className:"mt-4 text-gray-600",children:["Found ",(($=j==null?void 0:j.pagination)==null?void 0:$.totalRecords)||0," DevOps platform enablement companies"]})]})}),s.jsx("section",{className:"pb-16 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:N?s.jsxs("div",{className:"flex flex-col justify-center items-center py-12",children:[s.jsx(Pt,{className:"w-8 h-8 animate-spin text-orange-600 mb-3"}),s.jsx("p",{className:"text-gray-600",children:"Loading DevOps platform enablement companies..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:(q=j==null?void 0:j.records)==null?void 0:q.map((k,T)=>s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},children:s.jsx(Bt,{startup:k,index:T})},`${k.id}-${c}-${T}`))}),(j==null?void 0:j.pagination)&&s.jsx(Ut,{currentPage:j.pagination.currentPage,totalPages:h?j.pagination.totalPages:Math.min(S,j.pagination.totalPages),totalRecords:j.pagination.totalRecords,isSubscribed:h,isAuthenticated:!!d,onPageChange:R,isLoading:C}),((L=j==null?void 0:j.records)==null?void 0:L.length)===0&&!N&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 text-lg",children:"No companies found matching your criteria."})})]})})}),m&&y&&s.jsx(Ot,{isOpen:m,question:y.question,isLoading:p,onSolve:k=>v(k,I,B),onClose:b}),s.jsx(wt,{})]})},Srt=({className:e})=>{const{user:t}=Ie(),[n,r]=g.useState({totalMatches:0,averageScore:0,topCompanies:[],feedbackStats:{thumbsUp:0,thumbsDown:0},usageStats:{daily:0,monthly:0}}),[a,i]=g.useState(!0);g.useEffect(()=>{t&&o()},[t]);const o=async()=>{if(t)try{i(!0);const{data:u}=await K.from("company_matches").select("match_score, company_name, created_at").eq("user_id",t.id),{data:d}=await K.from("match_feedback").select("feedback_type").eq("user_id",t.id),{data:h}=await K.from("matchmaking_usage").select("daily_count, monthly_count").eq("user_id",t.id).single(),f=(u==null?void 0:u.length)||0,m=f>0?Math.round(u.reduce((v,b)=>v+(b.match_score||0),0)/f):0,y=(u==null?void 0:u.sort((v,b)=>(b.match_score||0)-(v.match_score||0)).slice(0,5))||[],p={thumbsUp:(d==null?void 0:d.filter(v=>v.feedback_type==="thumbs_up").length)||0,thumbsDown:(d==null?void 0:d.filter(v=>v.feedback_type==="thumbs_down").length)||0},x={daily:(h==null?void 0:h.daily_count)||0,monthly:(h==null?void 0:h.monthly_count)||0};r({totalMatches:f,averageScore:m,topCompanies:y,feedbackStats:p,usageStats:x})}catch(u){console.error("Error loading analytics:",u)}finally{i(!1)}},l=u=>u>=80?"text-green-600 bg-green-50":u>=60?"text-yellow-600 bg-yellow-50":"text-red-600 bg-red-50",c=u=>u>=80?"Excellent":u>=60?"Good":"Poor";return a?s.jsxs(Y,{className:e,children:[s.jsx(xe,{children:s.jsx(Se,{children:"Matchmaking Analytics"})}),s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})})]}):s.jsxs("div",{className:`space-y-6 ${e}`,children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(Y,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Matches"}),s.jsx("p",{className:"text-2xl font-bold",children:n.totalMatches})]}),s.jsx(tn,{className:"h-8 w-8 text-blue-500"})]})})}),s.jsx(Y,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Avg Score"}),s.jsxs("p",{className:"text-2xl font-bold",children:[n.averageScore,"/100"]})]}),s.jsx(An,{className:"h-8 w-8 text-yellow-500"})]})})}),s.jsx(Y,{children:s.jsxs(te,{className:"pt-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Daily Usage"}),s.jsxs("p",{className:"text-2xl font-bold",children:[n.usageStats.daily,"/50"]})]}),s.jsx(sn,{className:"h-8 w-8 text-green-500"})]}),s.jsx(ur,{value:n.usageStats.daily/50*100,className:"mt-2 h-2"})]})}),s.jsx(Y,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Positive Feedback"}),s.jsxs("p",{className:"text-2xl font-bold",children:[n.feedbackStats.thumbsUp+n.feedbackStats.thumbsDown>0?Math.round(n.feedbackStats.thumbsUp/(n.feedbackStats.thumbsUp+n.feedbackStats.thumbsDown)*100):0,"%"]})]}),s.jsx(ze,{className:"h-8 w-8 text-purple-500"})]})})})]}),s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Top Scoring Companies"}),s.jsx(Za,{children:"Your highest compatibility matches from recent sessions"})]}),s.jsx(te,{children:n.topCompanies.length>0?s.jsx("div",{className:"space-y-3",children:n.topCompanies.map((u,d)=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center justify-center w-8 h-8 bg-primary/10 text-primary rounded-full text-sm font-medium",children:["#",d+1]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:u.company_name}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Matched ",new Date(u.created_at).toLocaleDateString()]})]})]}),s.jsxs(fe,{className:`${l(u.score)}`,children:[u.score,"/100 - ",c(u.score)]})]},d))}):s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(An,{className:"h-12 w-12 mx-auto mb-3 opacity-50"}),s.jsx("p",{children:"No matches yet. Start using matchmaking to see your top companies here!"})]})})]}),s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Feedback Summary"}),s.jsx(Za,{children:"Help us improve matchmaking with your feedback"})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"text-center p-4 bg-green-50 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-bold text-green-600",children:n.feedbackStats.thumbsUp}),s.jsx("p",{className:"text-sm text-green-700",children:"Positive Feedback"})]}),s.jsxs("div",{className:"text-center p-4 bg-red-50 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-bold text-red-600",children:n.feedbackStats.thumbsDown}),s.jsx("p",{className:"text-sm text-red-700",children:"Improvement Needed"})]})]}),n.feedbackStats.thumbsUp+n.feedbackStats.thumbsDown>0&&s.jsxs("div",{className:"mt-4",children:[s.jsx(ur,{value:n.feedbackStats.thumbsUp/(n.feedbackStats.thumbsUp+n.feedbackStats.thumbsDown)*100,className:"h-3"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1 text-center",children:[Math.round(n.feedbackStats.thumbsUp/(n.feedbackStats.thumbsUp+n.feedbackStats.thumbsDown)*100),"% satisfaction rate"]})]})]})]})]})},jrt=()=>{const{subscribed:e,subscriptionTier:t,dailyMatchmaking:n,monthlyMatchmaking:r,dailyMatchmakingLimit:a,monthlyMatchmakingLimit:i,hasMatchmakingAccess:o}=Ie(),l=o();return s.jsx(b1,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[s.jsx(zn,{className:"h-8 w-8 text-red-500"}),s.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"AI Matchmaking"})]}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:"Find your perfect customers with AI-powered compatibility scoring"}),!l&&s.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-8",children:s.jsx("p",{className:"text-blue-800",children:"Set up your company details for AI-powered matchmaking. Upgrade to Growth or Pro plan to unlock the full matchmaking feature."})})]}),s.jsx("div",{className:"text-center mb-8",children:s.jsx(Ite,{trigger:s.jsxs(U,{size:"lg",className:"gap-2",children:[s.jsx(zn,{className:"h-5 w-5"}),l?"Manage Matchmaking Profile":"Set Up Matchmaking Profile"]})})}),s.jsxs(_o,{defaultValue:"overview",className:"w-full",children:[s.jsxs(Fi,{className:"grid w-full grid-cols-2",children:[s.jsx(yt,{value:"overview",children:"Overview"}),s.jsx(yt,{value:"analytics",children:"Analytics"})]}),s.jsxs(nn,{value:"overview",className:"mt-8",children:[s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 mb-12",children:[s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(An,{className:"h-5 w-5 text-yellow-500"}),"AI Compatibility Score"]})}),s.jsx(te,{children:s.jsx("p",{className:"text-gray-600",children:"Get a 0-100 compatibility score based on your ICP and the target company's profile."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(tn,{className:"h-5 w-5 text-green-500"}
951),"Smart Targeting"]})}),s.jsx(te,{children:s.jsx("p",{className:"text-gray-600",children:"AI suggests the best job titles and decision makers to contact at each company."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"h-5 w-5 text-blue-500"}),"Personalized Outreach"]})}),s.jsx(te,{children:s.jsx("p",{className:"text-gray-600",children:"Get custom ice breakers and pitch suggestions tailored to each prospect."})})]})]}),s.jsxs("div",{className:"bg-white rounded-lg border p-6 mb-8",children:[s.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"How It Works"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(fe,{variant:"secondary",className:"mt-1",children:"1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Set Up Your Profile"}),s.jsx("p",{className:"text-gray-600",children:"Describe your company and ideal customer profile."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(fe,{variant:"secondary",className:"mt-1",children:"2"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Browse Companies"}),s.jsx("p",{className:"text-gray-600",children:"Look for the star icon on company cards to trigger matchmaking."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(fe,{variant:"secondary",className:"mt-1",children:"3"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Get AI Insights"}),s.jsx("p",{className:"text-gray-600",children:"Receive compatibility scores, outreach suggestions, and target contacts."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(fe,{variant:"secondary",className:"mt-1",children:"4"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Save & Learn"}),s.jsx("p",{className:"text-gray-600",children:"Save matches and provide feedback to improve future recommendations."})]})]})]})]}),l?s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Usage Limits & Status"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-blue-800",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Daily Usage:"})," ",n,"/",a]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Monthly Usage:"})," ",r,"/",i]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Plan:"})," ",t||"Free"]})]})]}):s.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-purple-50 border border-blue-200 rounded-lg p-6 text-center",children:[s.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Ready to unlock AI Matchmaking?"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Complete your profile above, then upgrade to start finding your perfect customers with AI-powered compatibility scoring."}),s.jsxs(U,{onClick:()=>window.location.href="/pricing",className:"gap-2",children:[s.jsx(Tn,{className:"h-4 w-4"}),"Upgrade to Unlock Matchmaking"]})]})]}),s.jsx(nn,{value:"analytics",className:"mt-8",children:s.jsx(Srt,{})})]})]})}),s.jsx(wt,{})]})})},Nrt=()=>s.jsx(b1,{children:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Auto-Prospecting"}),s.jsx("p",{className:"text-gray-600",children:"Automatically find and match potential customers as new companies enter our system"})]}),s.jsxs(_o,{defaultValue:"results",className:"space-y-6",children:[s.jsxs(Fi,{className:"grid w-full grid-cols-2",children:[s.jsxs(yt,{value:"results",className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),"Results"]}),s.jsxs(yt,{value:"settings",className:"flex items-center gap-2",children:[s.jsx(vo,{className:"w-4 h-4"}),"Settings"]})]}),s.jsx(nn,{value:"results",className:"space-y-6",children:s.jsx(qne,{})}),s.jsx(nn,{value:"settings",className:"space-y-6",children:s.jsx(zte,{})})]})]})})]})}),_rt=({percentage:e,size:t=120,strokeWidth:n=8})=>{const r=(t-n)/2,a=r*2*Math.PI,i=a-e/100*a;return s.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[s.jsxs("svg",{width:t,height:t,className:"transform -rotate-90",children:[s.jsx("circle",{cx:t/2,cy:t/2,r,stroke:"hsl(var(--muted))",strokeWidth:n,fill:"none"}),s.jsx("circle",{cx:t/2,cy:t/2,r,stroke:"hsl(var(--primary))",strokeWidth:n,fill:"none",strokeDasharray:a,strokeDashoffset:i,strokeLinecap:"round",className:"transition-all duration-500 ease-out"})]}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsxs("span",{className:"text-2xl font-bold text-foreground",children:[e,"%"]})})]})},LB=({id:e,title:t,description:n,completed:r,link:a,tier:i,icon:o,onMarkComplete:l})=>s.jsx(Y,{className:`p-6 transition-all duration-300 hover:shadow-lg ${r?"bg-muted/50 border-primary/50":"hover:border-primary/30"}`,children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`text-4xl ${r?"grayscale opacity-50":""}`,children:o}),s.jsxs("div",{className:"flex-1 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h3",{className:`font-semibold ${r?"text-muted-foreground line-through":"text-foreground"}`,children:t}),i==="paid"&&s.jsx(fe,{variant:"secondary",className:"text-xs",children:"Pro"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),r?s.jsx(Zy,{className:"h-6 w-6 text-primary flex-shrink-0"}):s.jsx(Uq,{className:"h-6 w-6 text-muted-foreground flex-shrink-0"})]}),!r&&a&&s.jsx(s.Fragment,{children:a.startsWith("http")?s.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:s.jsxs(U,{variant:"outline",size:"sm",className:"group",children:["Get Started",s.jsx(Ws,{className:"ml-2 h-4 w-4 transition-transform group-hover:translate-x-1"})]})}):s.jsx(ee,{to:a,children:s.jsxs(U,{variant:"outline",size:"sm",className:"group",children:["Get Started",s.jsx(Ws,{className:"ml-2 h-4 w-4 transition-transform group-hover:translate-x-1"})]})})})]})]})}),$B={beginner:{icon:Tn,title:"Beginner",color:"text-blue-500",bgColor:"bg-blue-500/10",nextCredits:5,nextMilestone:"Complete 3 tasks to unlock +5 free scrapes"},explorer:{icon:An,title:"Explorer",color:"text-purple-500",bgColor:"bg-purple-500/10",nextCredits:10,nextMilestone:"Complete 5 tasks to unlock +10 free scrapes"},pro_user:{icon:gf,title:"Pro User",color:"text-yellow-500",bgColor:"bg-yellow-500/10",nextCredits:20,nextMilestone:"Complete all tasks to unlock +20 free scrapes"},master:{icon:fc,title:"Master",color:"text-amber-500",bgColor:"bg-
951amber-500/10",nextCredits:0,nextMilestone:"All milestones completed! 🎉"}},Crt=({milestone:e,creditsAwarded:t,completionPercentage:n})=>{const r=$B[e]||$B.beginner,a=r.icon;return s.jsx(Y,{className:"p-6 bg-gradient-to-br from-primary/5 to-primary/10 border-primary/20",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`p-3 rounded-full ${r.bgColor}`,children:s.jsx(a,{className:`h-6 w-6 ${r.color}`})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Current Milestone"}),s.jsx(fe,{variant:"secondary",className:r.color,children:r.title})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:r.nextMilestone}),t>0&&s.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-background/50 border",children:[s.jsx(gf,{className:"h-5 w-5 text-primary"}),s.jsxs("span",{className:"text-sm font-medium",children:["Total Credits Earned: ",s.jsx("span",{className:"text-primary font-bold",children:t})," free scrapes"]})]})]})]})})},Ert=()=>{const[e,t]=g.useState({width:window.innerWidth,height:window.innerHeight});return g.useEffect(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e},krt=()=>{const e=cs(),{user:t}=Ie(),{width:n,height:r}=Ert(),{tasks:a,progress:i,loading:o,markTaskComplete:l,showConfetti:c,setShowConfetti:u}=s2();if(g.useEffect(()=>{t||e("/auth")},[t,e]),g.useEffect(()=>{if(c){const m=setTimeout(()=>u(!1),5e3);return()=>clearTimeout(m)}},[c,u]),o)return s.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[s.jsx(Ee,{}),s.jsx("main",{className:"flex-grow container mx-auto px-4 py-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[s.jsx(Je,{className:"h-12 w-64"}),s.jsx(Je,{className:"h-32 w-full"}),s.jsx(Je,{className:"h-24 w-full"}),s.jsx(Je,{className:"h-24 w-full"})]})}),s.jsx(wt,{})]});const d=a.filter(m=>m.tier==="free"),h=a.filter(m=>m.tier==="paid"),f=(i==null?void 0:i.completionPercentage)===100;return s.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[s.jsx(Ee,{}),c&&s.jsx(Wne,{width:n,height:r,recycle:!1,numberOfPieces:500,gravity:.3}),s.jsx("main",{className:"flex-grow container mx-auto px-4 py-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto space-y-8",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx(ee,{to:"/profile",children:s.jsxs(U,{variant:"ghost",size:"sm",children:[s.jsx(xo,{className:"mr-2 h-4 w-4"}),"Back to Profile"]})}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(rl,{className:"h-8 w-8 text-primary"}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Getting Started Checklist"}),s.jsx("p",{className:"text-muted-foreground",children:"Complete these tasks to get the most out of the platform"})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs(Y,{className:"p-6 flex flex-col items-center text-center space-y-4",children:[s.jsx(_rt,{percentage:(i==null?void 0:i.completionPercentage)||0}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Your Progress"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[(i==null?void 0:i.completedTasks)||0," of ",(i==null?void 0:i.totalTasks)||0," tasks completed"]})]})]}),i&&s.jsx(Crt,{milestone:i.milestone,creditsAwarded:i.creditsAwarded,completionPercentage:i.completionPercentage})]}),f&&s.jsx(Y,{className:"p-6 bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ks,{className:"h-12 w-12 text-primary flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-1",children:"🎉 Congratulations! All tasks completed!"}),s.jsxs("p",{className:"text-muted-foreground",children:["You've mastered the platform and earned ",i==null?void 0:i.creditsAwarded," free scrapes!"]})]})]})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Essential Tasks"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[d.filter(m=>m.completed).length,"/",d.length," completed"]})]}),s.jsx("div",{className:"grid gap-4",children:d.map(m=>s.jsx(LB,{...m,onMarkComplete:l},m.id))})]}),h.length>0&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Pro User Tasks"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[h.filter(m=>m.completed).length,"/",h.length," completed"]})]}),s.jsx("div",{className:"grid gap-4",children:h.map(m=>s.jsx(LB,{...m,onMarkComplete:l},m.id))})]}),s.jsxs(Y,{className:"p-6 bg-muted/50",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Need Help?"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"If you have any questions or need assistance completing these tasks, check out our help center or contact support."}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(ee,{to:"/help",children:s.jsx(U,{variant:"outline",size:"sm",children:"Help Center"})}),s.jsx(ee,{to:"/pricing",children:s.jsx(U,{variant:"outline",size:"sm",children:"Upgrade to Pro"})})]})]})]})}),s.jsx(wt,{})]})}
951,Vne=g.createContext(void 0),Prt=({children:e})=>{const[t,n]=g.useState(!1),[r,a]=g.useState(0),[i,o]=g.useState({}),[l,c]=g.useState(!0),{toast:u}=Ve();g.useEffect(()=>{(async()=>{try{const{data:{user:b}}=await K.auth.getUser();if(b){const{data:w}=await K.from("onboarding_progress").select("*").eq("user_id",b.id).single(),S=(w==null?void 0:w.completion_percentage)||0;o({signals_tour_completed:S>=100,signals_tour_step:0})}}catch(b){console.error("Error checking tour status:",b)}finally{c(!1)}})()},[]);const d=g.useCallback(()=>{const v=i.signals_tour_step||0;a(v),n(!0),setTimeout(()=>{document.querySelector('[data-tour="first-card-upvote"]')||u({title:"Loading signals...",description:"Tour will start once signals are ready"})},500)},[u,i]),h=(v,b=8e3)=>new Promise(w=>{const S=Date.now(),j=setInterval(()=>{document.querySelector(v)?(clearInterval(j),w(!0)):Date.now()-S>b&&(clearInterval(j),w(!1))},100)}),f=g.useCallback(async()=>{try{const{data:{user:w}}=await K.auth.getUser();w&&(await K.from("onboarding_progress").upsert({user_id:w.id,completion_percentage:10},{onConflict:"user_id"}),o(S=>({...S,signals_tour_step:0})))}catch(w){console.error("Error resetting tour:",w)}a(0);const v=await h('[data-tour="first-card-upvote"]'),b=await h('[data-tour="analytics-link"]');v||b?(n(!0),u({title:"Tour started!",description:"Follow the guide to learn about signals."})):u({title:"Loading signals...",description:"Tour will start once signals are ready. Please try again in a moment.",variant:"destructive"})},[i,u]),m=g.useCallback(async()=>{try{const{data:{user:v}}=await K.auth.getUser();v&&(await K.from("onboarding_progress").upsert({user_id:v.id,completion_percentage:100,checklist_completed:!0},{onConflict:"user_id"}),o(b=>({...b,signals_tour_completed:!0})))}catch(v){console.error("Error completing tour:",v)}n(!1)},[i]),y=g.useCallback(()=>{n(!1)},[]),p=g.useCallback(async v=>{try{const{data:{user:b}}=await K.auth.getUser();b&&(o(w=>({...w,signals_tour_step:v})),o(w=>({...w,signals_tour_step:v})))}catch(b){console.error("Error updating step progress:",b)}},[i]),x=g.useCallback(v=>{a(v),p(v)},[p]);return s.jsx(Vne.Provider,{value:{run:t,stepIndex:r,loading:l,hasCompletedTour:i.signals_tour_completed||!1,startTour:d,startTourFresh:f,completeTour:m,skipTour:y,setStepIndex:x},children:e})},Hne=()=>{const e=g.useContext(Vne);if(e===void 0)throw new Error("useTour must be used within a TourProvider");return e},CT=["Recently Funded","Hiring Spike","Leadership Change","Tech Stack Change","Event Activity","Geographic Expansion","Product Launch","Cost Cutting","Social Buzz","Budget Increase","IPO Filing","M&A Activity","Strategic Partnership","Patent Filing","Awards & Recognition","Infrastructure Expansion","Major Customer Announcements","Increased Revenue Trend","Press Coverage","Decreased Website Traffic","Negative Customer Sentiments","Legal Challenge","Increased Ad Spend","Regulatory and Compliance Milestones","Brand and Market Repositioning","Market Entry","Sustainability and CSR Initiatives","Operational Risk","Channel and Distribution Expansion"],Trt={"Recently Funded":"Companies that have secured new funding rounds","Hiring Spike":"Organizations rapidly expanding their workforce","Leadership Change":"Executive transitions and leadership appointments","Tech Stack Change":"Technology infrastructure updates and migrations","Event Activity":"Companies participating in conferences and events","Geographic Expansion":"Market expansion into new regions or countries","Product Launch":"New product releases and feature announcements","Cost Cutting":"Organizations implementing cost reduction strategies","Social Buzz":"Companies generating significant social media attention","Budget Increase":"Organizations increasing spending in specific areas","IPO Filing":"Companies preparing for public offerings","M&A Activity":"Merger, acquisition, and strategic transaction activity","Strategic Partnership":"New business partnerships and collaborations","Patent Filing":"Intellectual property applications and grants","Awards & Recognition":"Industry awards and recognition achievements","Infrastru
951cture Expansion":"Physical or digital infrastructure investments","Major Customer Announcements":"Significant client wins and partnerships","Increased Revenue Trend":"Companies showing strong revenue growth","Press Coverage":"Significant media coverage and news mentions","Decreased Website Traffic":"Notable decline in web traffic metrics","Negative Customer Sentiments":"Poor customer feedback or review trends","Legal Challenge":"Legal disputes, lawsuits, or regulatory issues","Increased Ad Spend":"Companies increasing advertising investments","Regulatory and Compliance Milestones":"Compliance achievements and regulatory updates","Brand and Market Repositioning":"Rebranding or market positioning changes","Market Entry":"Entry into new markets or industry segments","Sustainability and CSR Initiatives":"Environmental and social responsibility programs","Operational Risk":"Operational challenges or risk factors","Channel and Distribution Expansion":"New distribution channels and partnerships"},Zf=e=>{if(!e)return"Other";const t=e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase()).trim(),n={Funding:"Recently Funded",Hiring:"Hiring Spike",Leadership:"Leadership Change","Tech Stack":"Tech Stack Change",Events:"Event Activity",Geographic:"Geographic Expansion",Product:"Product Launch",Costs:"Cost Cutting",Social:"Social Buzz",Budget:"Budget Increase",Ipo:"IPO Filing","Ma Activity":"M&A Activity",Partnership:"Strategic Partnership",Patents:"Patent Filing",Awards:"Awards & Recognition",Infrastructure:"Infrastructure Expansion",Customer:"Major Customer Announcements",Revenue:"Increased Revenue Trend",Press:"Press Coverage",Traffic:"Decreased Website Traffic","Customer Sentiment":"Negative Customer Sentiments",Legal:"Legal Challenge","Ad Spend":"Increased Ad Spend",Regulatory:"Regulatory and Compliance Milestones",Branding:"Brand and Market Repositioning",Market:"Market Entry",Sustainability:"Sustainability and CSR Initiatives",Risk:"Operational Risk",Distribution:"Channel and Distribution Expansion"};if(CT.includes(t))return t;for(const[r,a]of Object.entries(n))if(t.includes(r))return a;return t.includes("Recently Funded")||t.includes("Funding")||t.includes("Series Unknown")||t.includes("Venture")?"Recently Funded":t==="Other"||t==="Unknown"?"Other":t},dd=(e,t)=>{if(t==="all"||!(e!=null&&e.length))return e||[];const n=new Date,r=kt(n,"yyyy-MM-dd");let a;switch(t){case"today":a=r;break;case"week":a=kt(as(n),"yyyy-MM-dd");break;case"month":a=kt(Ur(n),"yyyy-MM-dd");break;case"year":a=kt(nj(n),"yyyy-MM-dd");break;default:return e}return e.filter(i=>{const o=String(i.signal_date||"").slice(0,10);return o>=a&&o<=r})},Gne=(e,t)=>{if(!(e!=null&&e.length))return{start:new Date,end:new Date};if(t==="all"){const a=e.map(i=>new Date(String(i.signal_date||"").slice(0,10)));return{start:new Date(Math.min(...a.map(i=>i.getTime()))),end:new Date(Math.max(...a.map(i=>i.getTime())))}}const n=new Date;let r;switch(t){case"today":r=wo(n);break;case"week":r=as(n);break;case"month":r=Ur(n);break;case"year":r=nj(n);break;default:r=Ur(n)}return{start:r,end:n}},Art="rgb(234, 88, 12)",Ort="25 95% 53%",S1=()=>({primary:Art,primaryHSL:`hsl(${Ort})`,light:"hsl(25 95% 65%)",lighter:"hsl(25 95% 85%)",lightest:"hsl(25 95% 95%)",opacity20:"hsla(25, 95%, 53%, 0.2)",opacity40:"hsla(25, 95%, 53%, 0.4)",opacity60:"hsla(25, 95%, 53%, 0.6)",opacity80:"hsla(25, 95%, 53%, 0.8)"}),Rrt=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(!0),[a,i]=g.useState("weekly"),{subscriptionTier:o}=Ie(),l=S1();g.useEffect(()=>{(async()=>{try{const d=new Date,h=o==="free"?d:$r(d,30),{data:f,error:m}=await K.from("signals_feed").select("signal_type, signal_date").gte("signal_date",kt(h,"yyyy-MM-dd")).lte("signal_date",kt(d,"yyyy-MM-dd")).order("signal_date",{ascending:!1}).limit(2e3);if(m)throw m;t(f||[])}catch(d){console.error("Error fetching signals for sidebar charts:",d)}finally{r(!1)}})()},[o]);const c=g.useMemo(()=>{if(!(e!=null&&e.length))return[];const u=new Date,d=o==="free"?u:$r(u,30),f=[...new Set(e.map(y=>y.signal_type))].filter(Boolean).map(Zf);return[...new Set(f)].filter(y=>y!=="Other"&&!y.includes("Recently Funded - Venture - Series Unknown")&&!y.includes("Unknown")).map(y=>{const p=e.filter(b=>Zf(b.signal_type)===y),x=p.reduce((b,w)=>{const S=String(w.signal_date||"").slice(0,10);return b[S]=(b[S]||0)+1,b},{});let v;return a==="weekly"?v=Xwe({start:gje(u,7),end:u},{weekStartsOn:1}
951).map(w=>{let S=0;for(let j=0;j<7;j++){const N=kt(new Date(w.getTime()+j*24*60*60*1e3),"yyyy-MM-dd");S+=x[N]||0}return{date:kt(w,"yyyy-MM-dd"),displayDate:kt(w,"MMM dd"),count:S}}):v=yx({start:d,end:u}).map(w=>{const S=kt(w,"yyyy-MM-dd");return{date:S,displayDate:kt(w,"MMM dd"),count:x[S]||0}}),{signalType:y,displayName:y,chartData:v,totalCount:p.length}}).sort((y,p)=>p.totalCount-y.totalCount).slice(0,8)},[e,o,a]);return n?s.jsx("div",{className:"space-y-3 mb-6",children:[...Array(3)].map((u,d)=>s.jsx(Y,{className:"animate-pulse",children:s.jsx(te,{className:"pt-4",children:s.jsx("div",{className:"h-24 bg-muted rounded"})})},d))}):c.length?s.jsxs("div",{className:"space-y-4 mb-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[s.jsx(os,{className:"w-4 h-4"}),"Top Signal Types"]}),s.jsxs(ee,{to:"/signal-analytics",className:"text-xs text-primary hover:underline flex items-center gap-1","data-tour":"analytics-link",children:["View All",s.jsx(ze,{className:"w-3 h-3"})]})]}),s.jsxs("div",{className:"flex gap-1 p-1 bg-muted rounded-md",children:[s.jsx(U,{variant:a==="weekly"?"default":"ghost",size:"sm",className:"flex-1 h-7 text-xs",onClick:()=>i("weekly"),children:"Weekly"}),s.jsx(U,{variant:a==="daily"?"default":"ghost",size:"sm",className:"flex-1 h-7 text-xs",onClick:()=>i("daily"),children:"Daily"})]}),c.map((u,d)=>s.jsx(ee,{to:"/signal-analytics",children:s.jsxs(Y,{className:"transition-all hover:shadow-md hover:border-primary/50 cursor-pointer",children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(Se,{className:"text-sm font-medium flex items-center justify-between",children:[s.jsx("span",{className:"truncate",children:u.displayName}),s.jsx("span",{className:"text-primary font-bold ml-2",children:u.totalCount})]})}),s.jsx(te,{className:"pb-3",children:s.jsx(Oc,{width:"100%",height:160,children:s.jsxs(h1,{data:u.chartData,margin:{top:5,right:5,left:-10,bottom:5},children:[s.jsx(vl,{dataKey:"displayDate",tick:{fontSize:9,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),s.jsx(bl,{tick:{fontSize:9,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:25}),s.jsx(Dr,{labelFormatter:h=>`${a==="weekly"?"Week of":"Date"}: ${h}`,formatter:h=>[h,"Signals"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",fontSize:"11px",padding:"4px 8px"}}),s.jsx(ko,{dataKey:"count",fill:l.primary,radius:[4,4,0,0],maxBarSize:40})]})})})]})},d))]}):null}
951,FB=({currentDate:e,viewMode:t="daily",onViewModeChange:n,onDateChange:r,selectedMonth:a=7,selectedYear:i=2025,onMonthChange:o,onYearChange:l,isMobile:c=!1})=>{const{startTourFresh:u,hasCompletedTour:d}=Hne(),{subscribed:h}=Ie(),[f,m]=g.useState([]),[y,p]=g.useState([]),[x,v]=g.useState(!0),b=S=>{Ae.error(`${S} is a premium feature`,{description:"Upgrade to access monthly and yearly views",action:{label:"Upgrade",onClick:()=>window.open("/pricing","_blank")}})},w=async()=>{try{v(!0);const S=e.toISOString().split("T")[0],{data:j,error:N}=await K.functions.invoke("fetch-signals",{body:{date:S,limit:100}});if(N)throw N;const{signals:C}=j||{signals:[]},_={},A={};(C||[]).forEach(I=>{const B=new Date(I.signal_date),$=new Date(e.getFullYear(),e.getMonth(),e.getDate());new Date(B.getFullYear(),B.getMonth(),B.getDate()).getTime()===$.getTime()&&(_[I.signal_type]=(_[I.signal_type]||0)+1),B.getMonth()===e.getMonth()&&B.getFullYear()===e.getFullYear()&&(A[I.signal_type]=(A[I.signal_type]||0)+1)});const P=Object.entries(_).map(([I,B])=>({signal_type:I,count:B})).sort((I,B)=>B.count-I.count),R=Object.entries(A).map(([I,B])=>({signal_type:I,count:B})).sort((I,B)=>B.count-I.count);m(P),p(R)}catch(S){console.error("Error fetching stats:",S),m([]),p([])}finally{v(!1)}};return g.useEffect(()=>{w()},[e]),x?s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"h-64 bg-muted animate-pulse rounded-lg"}),s.jsx("div",{className:"h-64 bg-muted animate-pulse rounded-lg"})]}):s.jsxs("div",{className:"space-y-6",children:[n&&s.jsxs(Y,{className:"p-6",children:[s.jsx("h3",{className:"font-semibold text-lg mb-4",children:"View Mode"}),s.jsx("div",{className:"grid grid-cols-3 gap-2",children:["daily","monthly","yearly"].map(S=>s.jsx("button",{onClick:()=>n(S),className:`px-3 py-2 text-sm font-medium rounded-md transition-colors ${t===S?"bg-orange-100 text-orange-700 border border-orange-200":"bg-gray-50 text-gray-700 hover:bg-gray-100"}`,children:S.charAt(0).toUpperCase()+S.slice(1)},S))})]}),r&&s.jsxs(Y,{className:"p-6",children:[s.jsx("h3",{className:"font-semibold text-lg mb-4",children:t==="daily"?"Select Date":t==="monthly"?"Select Month":"Select Year"}),t==="daily"&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("input",{type:"date",value:e.toISOString().split("T")[0],onChange:S=>{if(!h){const j=new Date(S.target.value),N=new Date;if(N.setHours(0,0,0,0),j.setHours(0,0,0,0),j.getTime()!==N.getTime()){b("Historical Dates");return}}r(new Date(S.target.value))},max:h?void 0:new Date().toISOString().split("T")[0],min:h?void 0:new Date().toISOString().split("T")[0],className:"w-full p-2 border border-gray-300 rounded-md"}),!h&&s.jsx("p",{className:"text-sm text-orange-600",children:"Upgrade to access historical signals"})]}),t==="monthly"&&o&&l&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("select",{value:a,onChange:S=>{if(!h){b("Monthly View");return}o(Number(S.target.value))},className:"w-full p-2 border border-gray-300 rounded-md",disabled:!h,children:Array.from({length:12},(S,j)=>s.jsx("option",{value:j,children:new Date(2023,j).toLocaleString("default",{month:"long"})},j))}),s.jsx("select",{value:i,onChange:S=>{if(!h){b("Yearly Selection");return}l(Number(S.target.value))},className:"w-full p-2 border border-gray-300 rounded-md",disabled:!h,children:Array.from({length:10},(S,j)=>2025+j).map(S=>s.jsx("option",{value:S,children:S},S))}),!h&&s.jsx("p",{className:"text-sm text-orange-600 mt-2",children:"Upgrade to access historical data"})]}),t==="yearly"&&l&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("select",{value:i,onChange:S=>{if(!h){b("Yearly View");return}l(Number(S.target.value))},className:"w-full p-2 border border-gray-300 rounded-md",disabled:!h,children:Array.from({length:10},(S,j)=>2025+j).map(S=>s.jsx("option",{value:S,children:S},S))}),!h&&s.jsx("p",{className:"text-sm text-orange-600 mt-2",children:"Upgrade to access yearly data"})]})]}),s.jsxs(Y,{className:"p-4 bg-gradient-to-br from-primary/10 to-primary/5 border-primary/20",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/20",children:s.jsx(Kq,{className:"w-4 h-4 text-primary"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-sm",children:"Product Tour"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Learn how to use signals"})]})]}),s.jsx(U,{onClick:u,variant:"outline",size:"sm",className:"w-full",children:"Start Tour"})]}),s.jsx(Rrt,{}),s.jsxs(Y,{className:"p-6",children:[s.jsx("h3",{className:"font-semibold text-lg mb-4",children:"Signal Categories"}),s.jsx("div",{className:"space-y-2","data-tour":"signal-categories",children:[{icon:"~",label:"Recently Funded",href:"/recently-funded"},{icon:"%",label:"Hiring Spikes",href:"/hiring-spike"},{icon:"🚀",label:"Product Launches",href:"/product-launch"},{icon:"👥",label:"Leadership Change",href:"/leadership-change"},{icon:"⚡",label:"Tech Stack Change",href:"/tech-stack-change"},{icon:"📰",label:"Press Coverage",href:"/press-coverage"},{icon:"^",label:"M&A Activity",href:"/ma-activity"},{icon:"&",label:"Newsletter Sponsor",href:"/newsletter-sponsor"},{icon:"💬",label:"Social Buzz",href:"/social-buzz"},{icon:"🤝",label:"Strategic Partnership",href:"/strategic-partnership"},{icon:"📅",label:"Event Activity",href:"/event-activity"},{icon:"✂️",label:"Cost Cutting",href:"/cost-cutting"},{icon:"⚖️",label:"Legal Challenge",href:"/legal-challenge"},{icon:"📢",label:"Major Customer Announcements",href:"/major-customer-announcements"},{icon:"~",label:"Budget Increase",href:"/budget-increase"},{icon:"$",label:"Increased Ad Spend",href:"/increased-ad-spend"},{icon:"🏆",label:"Awards & Recognition",href:"/awards-recognition"},{icon:"💰",label:"IPO Filing",href:"/ipo-filing"},{icon:"🌍",label:"Geographic Expansion",href:"/geographic-expansion"}].map(({icon:S,label:j,href:N})=>s.jsxs("a",{href:N,className:"flex items-center gap-2 p-2 rounded-md hover:bg-gray-50 transition-colors",children:[s.jsx("span",{className:"text-sm",children:S}),s.jsx("span",{className:"text-sm font-medium text-gray-700 hover:text-orange-600",children:j})]},N))})]})]})},Irt=({currentPage:e,totalPages:t,totalRecords:n,isSubscribed:r,isAuthenticated:a=!0,onPageChange:i,isLoading:o=!1})=>{const l=cs();if(t<=1||n===0)return null;if(!a&&e>=2)return s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-gray-600 mb-2",children:"Sign in to browse more signals"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Create a free account to access more pages"})]}),s.jsxs(U,{onClick:()=>l("/auth"),className:"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-3 rounded-lg font-semibold shadow-lg hover:shadow-xl transition-all duration-300",children:["Sign In / Sign Up",s.jsx(Ws,{className:"w-4 h-4 ml-2"})]})]});if(a&&!r&&e>=25)return s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-gray-600 mb-2",children:"Upgrade to view more signals"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Upgrade to Pro to access all available signals"})]}),s.jsxs(U,{onClick:()=>l("/pricing"),className:"bg-gradient-to-r from-orange-600 to-red-600 hover:from-orange-700 hover:to-red-700 text-white px-6 py-3 rounded-lg font-semibold shadow-lg hover:shadow-xl transition-all duration-300",children:[s.jsx(fc,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro",s.jsx(Ws,{className:"w-4 h-4 ml-2"})]})]});const u=(()=>{const d=[];if(t<=7)for(let f=1;f<=t;f++)d.push(f);else if(e<=4){for(let f=1;f<=5;f++)d.push(f);d.push("ellipsis"),d.push(t)}else if(e>=t-3){d.push(1),d.push("ellipsis");for(let f=t-4;f<=t;f++)d.push(f)}else{d.push(1),d.push("ellipsis");for(let f=e-1;f<=e+1;f++)d.push(f);d.push("ellipsis"),d.push(t)}return d})();return s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsxs("div",{className:"text-center text-sm text-gray-600",children:["Showing page ",e," of ",t]}),s.jsx(P2,{children:s.jsxs(T2,{children:[s.jsx(zu,{children:s.jsx(A2,{onClick:()=>i(e-1),disabled:e===1||o,className:e===1?"opacity-50 cursor-not-allowed":""})}),u.map((d,h)=>s.jsx(zu,{children:d==="ellipsis"?s.jsx(R2,{}):s.jsx(wx,{onClick:()=>i(d),isActive:e===d,disabled:o,className:o?"opacity-50 cursor-not-allowed":"",children:d})},h)),s.jsx(zu,{children:s.jsx(O2,{onClick:()=>i(e+1),disabled:e===t||o,className:e===t?"opacity-50 cursor-not-allowed":""})})]})})]})},Mrt=["Recently Funded","Hiring Spike","Leadership Change","Tech Stack Change","Event Activity","Geographic Expansion","Product Launch","Cost Cutting","Social Buzz","Budget Increase","IPO Filing","M&A Activity","Strategic Partnership","Patent Filing","Awards & Recognition","Infrastru
951cture Expansion","Major Customer Announcements","Increased Revenue Trend","Press Coverage","Decreased Website Traffic","Negative Customer Sentiments","Legal Challenge","Increased Ad Spend","Regulatory and Compliance Milestones","Brand and Market Repositioning","Market Entry","Sustainability and CSR Initiatives","Operational Risk","Channel and Distribution Expansion"],BB=[{value:"newest",label:"Newest First",icon:sn},{value:"highest_upvoted",label:"Highest Upvoted",icon:ze},{value:"alphabetical",label:"Company A-Z",icon:tt},{value:"oldest",label:"Oldest First",icon:sn}],zB=({selectedSignalType:e,selectedSortBy:t,onSignalTypeChange:n,onSortByChange:r,onClearFilters:a})=>{var o;const i=e!=="all"||t!=="newest";return s.jsx(Y,{className:"mb-6",children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex flex-col space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Qu,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("h3",{className:"text-lg font-semibold",children:"Filter & Sort Signals"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Signal Type"}),s.jsxs(hr,{value:e,onValueChange:n,children:[s.jsx(nr,{className:"w-full",children:s.jsx(fr,{placeholder:"All Signal Types"})}),s.jsxs(rr,{children:[s.jsx(bt,{value:"all",children:"All Signal Types"}),Mrt.map(l=>s.jsx(bt,{value:l,children:l},l))]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Sort By"}),s.jsxs(hr,{value:t,onValueChange:r,children:[s.jsx(nr,{className:"w-full",children:s.jsx(fr,{placeholder:"Sort by..."})}),s.jsx(rr,{children:BB.map(l=>{const c=l.icon;return s.jsx(bt,{value:l.value,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(c,{className:"w-4 h-4"}),l.label]})},l.value)})})]})]}),i&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-5"})," ",s.jsxs(U,{variant:"outline",onClick:a,className:"w-full sm:w-auto flex items-center justify-center gap-2",children:[s.jsx(tr,{className:"w-4 h-4"}),"Clear Filters"]})]})]}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-4 border-t",children:[s.jsx("span",{className:"text-sm text-muted-foreground font-medium",children:"Active Filters:"}),e!=="all"&&s.jsxs(fe,{variant:"secondary",className:"flex items-center gap-1",children:[e,s.jsx("button",{onClick:()=>n("all"),className:"ml-1 hover:bg-secondary/80 rounded-full p-0.5 transition-colors",children:s.jsx(tr,{className:"w-3 h-3"})})]}),t!=="newest"&&s.jsxs(fe,{variant:"outline",className:"flex items-center gap-1",children:["Sort: ",(o=BB.find(l=>l.value===t))==null?void 0:o.label]})]})]})})})},UB=({value:e,onChange:t,resultsCount:n,isSearching:r=!1,className:a})=>s.jsxs("div",{className:ve("relative",a),children:[s.jsxs("div",{className:"relative",children:[r?s.jsx(Pt,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground animate-spin"}):s.jsx(st,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),s.jsx(at,{type:"text",placeholder:"Search across all signals...",value:e,onChange:i=>t(i.target.value),className:"pl-10 pr-10"}),e&&s.jsx(U,{variant:"ghost",size:"sm",onClick:()=>t(""),className:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7 p-0",children:s.jsx(tr,{className:"w-4 h-4"})})]}),e&&n!==void 0&&s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:r?"Searching...":`${n} ${n===1?"result":"results"} found`})]}),Drt=()=>{const[e,t]=g.useState(null),[n,r]=g.useState(!0),[a,i]=g.useState(!1),[o,l]=g.useState(!1),{user:c}=Ie(),{toast:u}=Ve();g.useEffect(()=>{if(!c){l(!1);return}l(c.email==="[email protected]")},[c]);const d=async()=>{try{const{data:x,error:v}=await K.from("signals_sync_log").select("*").order("sync_started_at",{ascending:!1}).limit(1).maybeSingle();if(v&&v.code!=="PGRST116"){console.error("Error fetching sync status:",v);return}x&&t(x)}catch(x){console.error("Error fetching sync status:",x)}finally{r(!1)}};g.useEffect(()=>{d();const x=K.channel("sync-status-updates").on("postgres_changes",{event:"*",schema:"public",table:"signals_sync_log"},v=>{console.log("Sync status update:",v),v.new&&t(v.new)}).subscribe();return()=>{K.removeChannel(x)}},[]);const h=async()=>
951{if(!o){u({title:"Access Denied",description:"Only administrators can trigger manual sync.",variant:"destructive"});return}i(!0);try{const{data:x,error:v}=await K.functions.invoke("sync-signals",{body:{type:"manual",trigger:"admin_force_sync",user_id:c==null?void 0:c.id}});if(v)throw v;u({title:"Sync Triggered",description:"Manual sync started successfully. Status will update automatically.",variant:"default"}),setTimeout(d,2e3)}catch(x){console.error("Error triggering sync:",x),u({title:"Sync Failed",description:x.message||"Failed to trigger manual sync. Please try again.",variant:"destructive"})}finally{i(!1)}},f=x=>new Date(x).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),m=()=>e?e.sync_status==="running"?{icon:dt,label:"Sync in progress",color:"text-blue-600",bgColor:"bg-blue-100"}:e.error_message?{icon:Gs,label:"Sync failed",color:"text-destructive",bgColor:"bg-destructive/10"}:{icon:ks,label:"Sync successful",color:"text-green-600",bgColor:"bg-green-100"}:{icon:Gs,label:"No sync data",color:"text-muted-foreground",bgColor:"bg-muted"};if(n)return s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"animate-spin",children:s.jsx(dt,{className:"w-4 h-4 text-muted-foreground"})}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading sync status..."})]})});const y=m(),p=y.icon;return o?s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"w-4 h-4 text-primary"}),s.jsx("h3",{className:"font-medium",children:"Sync Status"})]}),o&&s.jsx(U,{variant:"outline",size:"sm",onClick:h,disabled:a||(e==null?void 0:e.sync_status)==="running",className:"flex items-center gap-2",children:a||(e==null?void 0:e.sync_status)==="running"?s.jsxs(s.Fragment,{children:[s.jsx(dt,{className:"w-3 h-3 animate-spin"}),"Syncing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(dt,{className:"w-3 h-3"}),"Force Sync"]})})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`p-2 rounded-full ${y.bgColor}`,children:s.jsx(p,{className:`w-4 h-4 ${y.color} ${(e==null?void 0:e.sync_status)==="running"?"animate-spin":""}`})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:y.label}),(e==null?void 0:e.sync_type)==="manual"&&s.jsxs(fe,{variant:"outline",className:"text-xs",children:[s.jsx(Ya,{className:"w-3 h-3 mr-1"}),"Manual"]})]}),e&&s.jsxs("div",{className:"text-xs text-muted-foreground",children:[s.jsx(Xn,{className:"w-3 h-3 inline mr-1"}),e.sync_completed_at?`Completed: ${f(e.sync_completed_at)}`:`Started: ${f(e.sync_started_at)}`]})]})]}),e&&e.sync_completed_at&&s.jsxs("div",{className:"text-xs text-muted-foreground space-y-1 pt-2 border-t",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Records synced:"}),s.jsx("span",{className:"font-medium",children:e.records_synced||0})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Records processed:"}),s.jsx("span",{className:"font-medium",children:e.records_processed||0})]})]}),(e==null?void 0:e.error_message)&&s.jsxs("div",{className:"p-2 bg-destructive/10 rounded-md",children:[s.jsx("div",{className:"text-xs text-destructive font-medium",children:"Error:"}),s.jsx("div",{className:"text-xs text-destructive/80 mt-1",children:e.error_message})]})]})}):null},Lrt=({viewMode:e,selectedDate:t,selectedMonth:n,selectedYear:r,onRefresh:a,isRefreshing:i=!1})=>{const l=(()=>{switch(e){case"daily":return{title:"No signals for today",description:`No startup signals were found for ${t==null?void 0:t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}. This could mean:`,reasons:["No new signals were generated today","Signals are still being processed","The sync hasn't run recently"]};case"monthly":return{title:"No signals this month",description:`No startup signals were found for ${`${["January","February","March","April","May","June","July","August","September","October","November","December"][n||0]} ${r}`}.`,reasons:["No signals were generated this month","Try checking a different month","Data might still be syncing"]};case"yearly":return{title:"No signals this year",description:`No startup signals were found for ${r}.`,reasons:["No signals were generated this year","Try checking a different year","Data might be limited for this period"]};default:return{title:"No signals available",description:"No startup signals were found.",reasons:["Try refreshing the page","Check your filters"]}}})();return s.jsx(Y,{className:"p-8 text-center",children:s.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ze,{className:"w-8 h-8 text-muted-foreground"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-semibold",children:l.title}),s.jsx("p",{className:"text-muted-foreground max-w-md",children:l.description})]}),s.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 max-w-md",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Gs,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:"Possible reasons:"})]}),s.jsx("ul",{className:"text-sm text-muted-foreground space-y-1",children:l.reasons.map((c,u)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-primary mt-0.5",children:"•"}),s.jsx("span",{children:c})]},u))})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[s.jsxs(U,{onClick:a,disabled:i,className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${i?"animate-spin":""}`}),i?"Refreshing...":"Refresh Signals"]}),e==="daily"&&s.jsxs(U,{variant:"outline",onClick:()=>{const c=new Date;c.setDate(c.getDate()-1)},className:"flex items-center gap-2",children:[s.jsx(sn,{className:"w-4 h-4"}),"Try Yesterday"]})]}),s.jsx("div",{className:"text-xs text-muted-foreground pt-4 border-t max-w-md",children:s.jsxs("p",{children:[s.jsx("strong",{children:"Tip:"})," Signals are automatically synced every 15 minutes. The sync status is shown in the top-right corner."]})})]})})},$rt=()=>s.jsx(Y,{className:"p-6 hover:shadow-md transition-shadow duration-200",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx(Je,{className:"w-10 h-10 rounded-full"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx(Je,{className:"h-5 w-32"}),s.jsx(Je,{className:"h-4 w-24"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Je,{className:"h-4 w-20 ml-auto"}),s.jsx(Je,{className:"h-3 w-16 ml-auto"})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Je,{className:"h-6 w-28 rounded-full"}),s.jsx(Je,{className:"h-8 w-16"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Je,{className:"h-5 w-full"}),s.jsx(Je,{className:"h-4 w-full"}),s.jsx(Je,{className:"h-4 w-3/4"})]}),s.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Je,{className:"h-4 w-4 roun
951ded"}),s.jsx(Je,{className:"h-4 w-8"})]}),s.jsx(Je,{className:"h-8 w-20 rounded"})]})]})}),Frt=({isLoading:e,progress:t=0,className:n})=>!e&&t===0?null:s.jsx("div",{className:ve("fixed top-0 left-0 right-0 z-50 h-1 bg-background/80 backdrop-blur-sm",n),children:s.jsx("div",{className:"relative h-full",children:e&&t===0?s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/50 via-primary to-primary/50 animate-pulse",children:s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-primary/30 to-transparent animate-bounce",style:{animationDuration:"1.5s"}})}):s.jsx(ur,{value:t,className:"h-full rounded-none"})})}),Brt=({isLoading:e,isError:t=!1,count:n,filterName:r,className:a})=>e?s.jsxs(fe,{variant:"outline",className:ve("animate-pulse",a),children:[s.jsx(Pt,{className:"w-3 h-3 mr-1 animate-spin"}),"Filtering ",r,"..."]}):t?s.jsxs(fe,{variant:"destructive",className:a,children:[s.jsx(Jy,{className:"w-3 h-3 mr-1"}),"Filter Error"]}):n!==void 0?s.jsxs(fe,{variant:"secondary",className:a,children:[s.jsx(ks,{className:"w-3 h-3 mr-1 text-green-500"}),n," ",r.toLowerCase()," found"]}):null;function Kne(e){return t=>typeof t===e}var zrt=Kne("function"),Urt=e=>e===null,qB=e=>Object.prototype.toString.call(e).slice(8,-1)==="RegExp",WB=e=>!qrt(e)&&!Urt(e)&&(zrt(e)||typeof e=="object"),qrt=Kne("undefined");function Wrt(e,t){const{length:n}=e;if(n!==t.length)return!1;for(let r=n;r--!==0;)if(!Ns(e[r],t[r]))return!1;return!0}function Vrt(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new DataView(e.buffer),r=new DataView(t.buffer);let a=e.byteLength;for(;a--;)if(n.getUint8(a)!==r.getUint8(a))return!1;return!0}function Hrt(e,t){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!Ns(n[1],t.get(n[0])))return!1;return!0}function Grt(e,t){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}function Ns(e,t){if(e===t)return!0;if(e&&WB(e)&&t&&WB(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return Wrt(e,t);if(e instanceof Map&&t instanceof Map)return Hrt(e,t);if(e instanceof Set&&t instanceof Set)return Grt(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return Vrt(e,t);if(qB(e)&&qB(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=n.length;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;for(let a=n.length;a--!==0;){const i=n[a];if(!(i==="_owner"&&e.$$typeof)&&!Ns(e[i],t[i]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var Krt=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],Yrt=["bigint","boolean","null","number","string","symbol","undefined"];function j1(e){const t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(Xrt(t))return t}function Wi(e){return t=>j1(t)===e}function Xrt(e){return Krt.includes(e)}function Bm(e){return t=>typeof t===e}function Qrt(e){return Yrt.includes(e)}var Zrt=["innerHTML","ownerDocument","style","attributes","nodeValue"];function De(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(De.array(e))return"Array";if(De.plainFunction(e))return"Function";const t=j1(e);return t||"Object"}De.array=Array.isArray;De.arrayOf=(e,t)=>!De.array(e)&&!De.function(t)?!1:e.every(n=>t(n));De.asyncGeneratorFunction=e=>j1(e)==="AsyncGeneratorFunction";De.asyncFunction=Wi("AsyncFunction");De.bigint=Bm("bigint");De.boolean=e=>e===!0||e===!1;De.date=Wi("Date");De.defined=e=>!De.undefined(e);De.domElement=e=>De.object(e)&&!De.plainObject(e)&&e.nodeType===1&&De.string(e.nodeName)&&Zrt.every(t=>t in e);De.empty=e=>De.string(e)&&e.length===0||De.array(e)&&e.length===0||De.object(e)&&!De.map(e)&&!De.set(e)&&Object.keys(e).length===0||De.set(e)&&e.size===0||De.map(e)&&e.size===0;De.error=Wi("Error");De.function=Bm("function");De.generator=e=>De.iterable(e)&&De.function(e.next)&&De.function(e.throw);De.generatorFunction=Wi("GeneratorFunction");De.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;De.iterable=e=>!De.nullOrUndefined(e)&&De.function(e[Symbol.iterator]);De.map=Wi("Map");De.nan=e=>Number.isNaN(e);De.null=e=>e===null;De.nullOrUndefined=e=>De.null(e)||De.undefined(e);De.number=e=>Bm("number")(e)&&!De.nan(e);De.numericString=e=>De.string(e)&&e.length>0&&!Number.isNaN(Number(e));De.object=e=>!De.nullOrUndefined(e)&&(De.function(e)||typeof e=="object");De.oneOf=(e,t)=>De.array(e)?e.indexOf(t)>-1:!1;De.plainFunction=Wi("Function");De.plainObject=e=>{if(j1(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};De.primitive=e=>De.null(e)||Qrt(typeof e);De.promise=Wi("Promise");De.propertyOf=(e,t,n)=>{if(!De.object(e)||!t)return!1;const r=e[t];return De.function(n)?n(r):De.defined(r)};De.regexp=Wi("RegExp");De.set=Wi("Set");De.string=Bm("string");De.symbol=Bm("symbol");De.undefined=Bm("undefined");De.weakMap=Wi("WeakMap");De.weakSet=Wi("WeakSet");var qe=De;function Jrt(...e){return e.every(t=>qe.string(t)||qe.array(t)||qe.plainObject(t))}function est(e,t,n){return Yne(e,t)?[e,t].every(qe.array)?!e.some(YB(n))&&t.some(YB(n)):[e,t].every(qe.plainObject)?!Object.entries(e).some(KB(n))&&Object.entries(t).some(KB(n)):t===n:!1}function VB(e,t,n){const{actual:r,key:a,previous:i,type:o}=n,l=ao(e,a),c=ao(t,a);let u=[l,c].every(qe.number)&&(o==="increased"?l<c:l>c);return qe.undefined(r)||(u=u&&c===r),qe.undefined(i)||(u=u&&l===i),u}
951function HB(e,t,n){const{key:r,type:a,value:i}=n,o=ao(e,r),l=ao(t,r),c=a==="added"?o:l,u=a==="added"?l:o;if(!qe.nullOrUndefined(i)){if(qe.defined(c)){if(qe.array(c)||qe.plainObject(c))return est(c,u,i)}else return Ns(u,i);return!1}return[o,l].every(qe.array)?!u.every(SI(c)):[o,l].every(qe.plainObject)?tst(Object.keys(c),Object.keys(u)):![o,l].every(d=>qe.primitive(d)&&qe.defined(d))&&(a==="added"?!qe.defined(o)&&qe.defined(l):qe.defined(o)&&!qe.defined(l))}function GB(e,t,{key:n}={}){let r=ao(e,n),a=ao(t,n);if(!Yne(r,a))throw new TypeError("Inputs have different types");if(!Jrt(r,a))throw new TypeError("Inputs don't have length");return[r,a].every(qe.plainObject)&&(r=Object.keys(r),a=Object.keys(a)),[r,a]}function KB(e){return([t,n])=>qe.array(e)?Ns(e,n)||e.some(r=>Ns(r,n)||qe.array(n)&&SI(n)(r)):qe.plainObject(e)&&e[t]?!!e[t]&&Ns(e[t],n):Ns(e,n)}function tst(e,t){return t.some(n=>!e.includes(n))}function YB(e){return t=>qe.array(e)?e.some(n=>Ns(n,t)||qe.array(t)&&SI(t)(n)):Ns(e,t)}function gp(e,t){return qe.array(e)?e.some(n=>Ns(n,t)):Ns(e,t)}function SI(e){return t=>e.some(n=>Ns(n,t))}function Yne(...e){return e.every(qe.array)||e.every(qe.number)||e.every(qe.plainObject)||e.every(qe.string)}function ao(e,t){return qe.plainObject(e)||qe.array(e)?qe.string(t)?t.split(".").reduce((r,a)=>r&&r[a],e):qe.number(t)?e[t]:e:e}function eS(e,t){if([e,t].some(qe.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(d=>qe.plainObject(d)||qe.array(d)))throw new Error("Expected plain objects or array");return{added:(d,h)=>{try{return HB(e,t,{key:d,type:"added",value:h})}catch{return!1}},changed:(d,h,f)=>{try{const m=ao(e,d),y=ao(t,d),p=qe.defined(h),x=qe.defined(f);if(p||x){const v=x?gp(f,m):!gp(h,m),b=gp(h,y);return v&&b}return[m,y].every(qe.array)||[m,y].every(qe.plainObject)?!Ns(m,y):m!==y}catch{return!1}},changedFrom:(d,h,f)=>{if(!qe.defined(d))return!1;try{const m=ao(e,d),y=ao(t,d),p=qe.defined(f);return gp(h,m)&&(p?gp(f,y):!p)}catch{return!1}},decreased:(d,h,f)=>{if(!qe.defined(d))return!1;try{return VB(e,t,{key:d,actual:h,previous:f,type:"decreased"})}catch{return!1}},emptied:d=>{try{const[h,f]=GB(e,t,{key:d});return!!h.length&&!f.length}catch{return!1}},filled:d=>{try{const[h,f]=GB(e,t,{key:d});return!h.length&&!!f.length}catch{return!1}},increased:(d,h,f)=>{if(!qe.defined(d))return!1;try{return VB(e,t,{key:d,actual:h,previous:f,type:"increased"})}catch{return!1}},removed:(d,h)=>{try{return HB(e,t,{key:d,type:"removed",value:h})}catch{return!1}}}}var nst=new Error("Element already at target scroll position"),rst=new Error("Scroll cancelled"),sst=Math.min,XB=Date.now,ast={left:QB("scrollLeft"),top:QB("scrollTop")};function QB(e){return function(n,r,a,i){a=a||{},typeof a=="function"&&(i=a,a={}),typeof i!="function"&&(i=ost);var o=XB(),l=n[e],c=a.ease||ist,u=isNaN(a.duration)?350:+a.duration,d=!1;return l===r?i(nst,n[e]):requestAnimationFrame(f),h;function h(){d=!0}function f(m){if(d)return i(rst,n[e]);var y=XB(),p=sst(1,(y-o)/u),x=c(p);n[e]=x*(r-l)+l,p<1?requestAnimationFrame(f):requestAnimationFrame(function(){i(null,n[e])})}}}function ist(e){return .5*(1-Math.cos(Math.PI*e))}function ost(){}const lst=$t(ast);var Xne={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.Scrollparent=n()})(Bo,function(){function t(r){var a=getComputedStyle(r,null).getPropertyValue("overflow");return a.indexOf("scroll")>-1||a.indexOf("auto")>-1}function n(r){if(r instanceof HTMLElement||r instanceof SVGElement){for(var a=r.parentNode;a.parentNode;){if(t(a))return a;a=a.parentNode}return document.scrollingElement||document.documentElement}}return n})})(Xne);var cst=Xne.exports;const Qne=$t(cst);var ust=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},dst=function(e,t){return e+Iy(t)},Iy=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(dst,""):ust(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?Iy(e.props.children):""};Iy.default=Iy;var hst=Iy;const ZB=$t(hst);var fst=function(t){return mst(t)&&!pst(t)};function mst(e){return!!e&&typeof e=="object"}function pst(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xst(e)}var gst=typeof Symbol=="function"&&Symbol.for,yst=gst?Symbol.for("react.element"):60103;function xst(e){return e.$$typeof===yst}function vst(e){return Array.isArray(e)?[]:{}}function My(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Jf(vst(e),e,t):e}function bst(e,t,n){return e.concat(t).map(function(r){return My(r,n)})}function wst(e,t){if(!t.customMerge)return Jf;var n=t.customMerge(e);return typeof n=="function"?n:Jf}function Sst(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function JB(e){return Object.keys(e).concat(Sst(e))}function Zne(e,t){try{return t in e}catch{return!1}}function jst(e,t){return Zne(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Nst(e,t,n){var r={};return n.isMergeableObject(e)&&JB(e).forEach(function(a){r[a]=My(e[a],n)}),JB(t).forEach(function(a){jst(e,a)||(Zne(e,a)&&n.isMergeableObject(t[a])?r[a]=wst(a,n)(e[a],t[a],n):r[a]=My(t[a],n))}),r}function Jf(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bst,n.isMergeableObject=n.isMergeableObject||fst,n.cloneUnlessOtherwiseSpecified=My;var r=Array.isArray(t),a=Array.isArray(e),i=r===a;return i?r?n.arrayMerge(e,t,n):Nst(e,t,n):My(t,n)}Jf.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return Jf(r,a,n)},{})};var _st=Jf,Cst=_st;const Ci=$t(Cst);/**!
952 * @fileOverview Kickass library to create and place poppers near their reference elements.
953 * @version 1.16.1
954 * @license
955 * Copyright (c) 2016 Federico Zivolo and contributors
956 *
957 * Permission is hereby granted, free of charge, to any person obtaining a copy
958 * of this software and associated documentation files (the "Software"), to deal
959 * in the Software without restriction, including without limitation the rights
960 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
961 * copies of the Software, and to permit persons to whom the Software is
962 * furnished to do so, subject to the following conditions:
963 *
964 * The above copyright notice and this permission notice shall be included in all
965 * copies or substantial portions of the Software.
966 *
967 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
968 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
969 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
970 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
971 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
972 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
973 * SOFTWARE.
974 */var Bx=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Est=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Bx&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();function kst(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function Pst(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Est))}}var Tst=Bx&&window.Promise,Ast=Tst?kst:Pst;function Jne(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Ed(e,t){if(e.nodeType!==1)return[];var n=e.ownerDocument.defaultView,r=n.getComputedStyle(e,null);return t?r[t]:r}
vendor: 4,472 bytes, line 974
974function jI(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function zx(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Ed(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(n+a+r)?e:zx(jI(e))}function ere(e){return e&&e.referenceNode?e.referenceNode:e}var ez=Bx&&!!(window.MSInputMethodContext&&document.documentMode),tz=Bx&&/MSIE 10/.test(navigator.userAgent);function zm(e){return e===11?ez:e===10?tz:ez||tz}function em(e){if(!e)return document.documentElement;for(var t=zm(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return!r||r==="BODY"||r==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(n.nodeName)!==-1&&Ed(n,"position")==="static"?em(n):n}function Ost(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||em(e.firstElementChild)===e}function ET(e){return e.parentNode!==null?ET(e.parentNode):e}function tS(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,a=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(a,0);var o=i.commonAncestorContainer;if(e!==o&&t!==o||r.contains(a))return Ost(o)?o:em(o);var l=ET(e);return l.host?tS(l.host,t):tS(e,ET(t).host)}function tm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",n=t==="top"?"scrollTop":"scrollLeft",r=e.nodeName;if(r==="BODY"||r==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[n]}return e[n]}function Rst(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=tm(t,"top"),a=tm(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=a*i,e.right+=a*i,e}function nz(e,t){var n=t==="x"?"Left":"Top",r=n==="Left"?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function rz(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],zm(10)?parseInt(n["offset"+e])+parseInt(r["margin"+(e==="Height"?"Top":"Left")])+parseInt(r["margin"+(e==="Height"?"Bottom":"Right")]):0)}function tre(e){var t=e.body,n=e.documentElement,r=zm(10)&&getComputedStyle(n);return{height:rz("Height",t,n,r),width:rz("Width",t,n,r)}}var Ist=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Mst=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),nm=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Va=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function Rc(e){return Va({},e,{right:e.left+e.width,bottom:e.top+e.height})}function kT(e){var t={};try{if(zm(10)){t=e.getBoundingClientRect();var n=tm(e,"top"),r=tm(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch{}var a={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i=e.nodeName==="HTML"?tre(e.ownerDocument):{},o=i.width||e.clientWidth||a.width,l=i.height||e.clientHeight||a.height,c=e.offsetWidth-o,u=e.offsetHeight-l;if(c||u){var d=Ed(e);c-=nz(d,"x"),u-=nz(d,"y"),a.width-=c,a.height-=u}return Rc(a)}function NI(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=zm(10),a=t.nodeName==="HTML",i=kT(e),o=kT(t),l=zx(e),c=Ed(t),u=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);n&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var h=Rc({top:i.top-o.top-u,left:i.left-o.left-d,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!r&&a){var f=parseFloat(c.marginTop),m=parseFloat(c.marginLeft);h.top-=u-f,h.bottom-=u-f,h.left-=d-m,h.right-=d-m,h.marginTop=f,h.marginLeft=m}return(r&&!n?t.contains(l):t===l&&l.nodeName!=="BODY")&&(h=Rst(h,t)),h}function Dst(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.ownerDocument.documentElement,r=NI(e,n),a=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),o=t?0:tm(n),l=t?0:tm(n,"left"),c={top:o-r.top+r.marginTop,left
vendor: 12,881 bytes, line 974
974:l-r.left+r.marginLeft,width:a,height:i};return Rc(c)}function nre(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Ed(e,"position")==="fixed")return!0;var n=jI(e);return n?nre(n):!1}function rre(e){if(!e||!e.parentElement||zm())return document.documentElement;for(var t=e.parentElement;t&&Ed(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function _I(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},o=a?rre(e):tS(e,ere(t));if(r==="viewport")i=Dst(o,a);else{var l=void 0;r==="scrollParent"?(l=zx(jI(t)),l.nodeName==="BODY"&&(l=e.ownerDocument.documentElement)):r==="window"?l=e.ownerDocument.documentElement:l=r;var c=NI(l,o,a);if(l.nodeName==="HTML"&&!nre(o)){var u=tre(e.ownerDocument),d=u.height,h=u.width;i.top+=c.top-c.marginTop,i.bottom=d+c.top,i.left+=c.left-c.marginLeft,i.right=h+c.left}else i=c}n=n||0;var f=typeof n=="number";return i.left+=f?n:n.left||0,i.top+=f?n:n.top||0,i.right-=f?n:n.right||0,i.bottom-=f?n:n.bottom||0,i}function Lst(e){var t=e.width,n=e.height;return t*n}function sre(e,t,n,r,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=_I(n,r,i,a),l={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},c=Object.keys(l).map(function(f){return Va({key:f},l[f],{area:Lst(l[f])})}).sort(function(f,m){return m.area-f.area}),u=c.filter(function(f){var m=f.width,y=f.height;return m>=n.clientWidth&&y>=n.clientHeight}),d=u.length>0?u[0].key:c[0].key,h=e.split("-")[1];return d+(h?"-"+h:"")}function are(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=r?rre(t):tS(t,ere(n));return NI(n,a,r)}function ire(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),r=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),a=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+r};return i}function nS(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(n){return t[n]})}function ore(e,t,n){n=n.split("-")[0];var r=ire(e),a={width:r.width,height:r.height},i=["right","left"].indexOf(n)!==-1,o=i?"top":"left",l=i?"left":"top",c=i?"height":"width",u=i?"width":"height";return a[o]=t[o]+t[c]/2-r[c]/2,n===l?a[l]=t[l]-r[u]:a[l]=t[nS(l)],a}function Ux(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function $st(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===n});var r=Ux(e,function(a){return a[t]===n});return e.indexOf(r)}function lre(e,t,n){var r=n===void 0?e:e.slice(0,$st(e,"name",n));return r.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&Jne(i)&&(t.offsets.popper=Rc(t.offsets.popper),t.offsets.reference=Rc(t.offsets.reference),t=i(t,a))}),t}function Fst(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=are(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=sre(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=ore(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=lre(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function cre(e,t){return e.some(function(n){var r=n.name,a=n.enabled;return a&&r===t})}function CI(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var a=t[r],i=a?""+a+n:e;if(typeof document.body.style[i]<"u")return i}return null}function Bst(){return this.state.isDestroyed=!0,cre(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[CI("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function ure(e){var t=e.ownerDocument;return t?t.defaultView:window}function dre(e,t,n,r){var a=e.nodeName==="BODY",i=a?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),a||dre(zx(i.parentNode),t,n,r),r.push(i)}function zst(e,t,n,r){n.updateBound=r,ure(e).addEventListener("resize",n.updateBound,{passive:!0});var a=zx(e);return dre(a,"scroll",n.updateBound,n.scrollParents),n.scrollElement=a,n.eventsEnabled=!0,n}function Ust(){this.state.eventsEnabled||(this.state=zst(this.reference,this.options,this.state,this.scheduleUpdate))}function qst(e,t){return ure(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function Wst(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=qst(this.reference,this.state))}function EI(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function PT(e,t){Object.keys(t).forEach(function(n){var r="";["width","height","top","right","bottom","left"].indexOf(n)!==-1&&EI(t[n])&&(r="px"),e.style[n]=t[n]+r})}function Vst(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function Hst(e){return PT(e.instance.popper,e.styles),Vst(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&PT(e.arrowElement,e.arrowStyles),e}function Gst(e,t,n,r,a){var i=are(a,t,e,n.positionFixed),o=sre(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",o),PT(t,{position:n.positionFixed?"fixed":"absolute"}),n}function Kst(e,t){var n=e.offsets,r=n.popper,a=n.reference,i=Math.round,o=Math.floor,l=function(v){return v},c=i(a.width),u=i(r.width),d=["left","right"].indexOf(e.placement)!==-1,h=e.placement.indexOf("-")!==-1,f=c%2===u%2,m=c%2===1&&u%2===1,y=t?d||h||f?i:o:l,p=t?i:l;return{left:y(m&&!h&&t?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:y(r.right)}}var Yst=Bx&&/Firefox/i.test(navigator.userAgent);function Xst(e,t){var n=t.x,r=t.y,a=e.offsets.popper,i=Ux(e.instance.modifiers,function(w){return w.name==="applyStyle"}).gpuAcceleration;i!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=i!==void 0?i:t.gpuAcceleration,l=em(e.instance.popper),c=kT(l),u={position:a.position},d=Kst(e,window.devicePixelRatio<2||!Yst),h=n==="bottom"?"top":"bottom",f=r==="right"?"left":"right",m=CI("transform"),y=void 0,p=void 0;if(h==="bottom"?l.nodeName==="HTML"?p=-l.clientHeight+d.bottom:p=-c.height+d.bottom:p=d.top,f==="right"?l.nodeName==="HTML"?y=-l.clientWidth+d.right:y=-c.width+d.right:y=d.left,o&&m)u[m]="translate3d("+y+"px, "+p+"px, 0)",u[h]=0,u[f]=0,u.willChange="transform";else{var x=h==="bottom"?-1:1,v=f==="right"?-1:1;u[h]=p*x,u[f]=y*v,u.willChange=h+", "+f}var b={"x-placement":e.placement};return e.attributes=Va({},b,e.attributes),e.styles=Va({},u,e.styles),e.arrowStyles=Va({},e.offsets.arrow,e.arrowStyles),e}function hre(e,t,n){var r=Ux(e,function(l){var c=l.name;return c===t}),a=!!r&&e.some(function(l){return l.name===n&&l.enabled&&l.order<r.order});if(!a){var i="`"+t+"`",o="`"+n+"`";console.warn(o+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return a}function Qst(e,t){var n;if(!hre(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if(typeof r=="string"){if(r=e.instance.popper.querySelector(r),!r)return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var a=e.placement.split("-")[0],i=e.offsets,o=i.popper,l=i.reference,c=["left","right"].indexOf(a)!==-1,u=c?"height":"width",d=c?"Top":"Left",h=d.toLowerCase(),f=c?"left":"top",m=c?"bottom":"right",y=ire(r)[u];l[m]-y<o[h]&&(e.offsets.popper[h]-=o[h]-(l[m]-y)),l[h]+y>o[m]&&(e.offsets.popper[h]+=l[h]+y-o[m]),e.offsets.popper=Rc(e.offsets.popper);var p=l[h]+l[u]/2-y/2,x=Ed(e.instance.popper),v=parseFloat(x["margin"+d]),b=parseFloat(x["border"+d+"Width"]),w=p-e.offsets.popper[h]-v-b;return w=Math.max(Math.min(o[u]-y,w),0),e.arrowElement=r,e.offsets.arrow=(n={},nm(n,h,Math.round(w)),nm(n,f,""),n),e}function Zst(e){return e==="end"?"start":e==="start"?"end":e}var fre=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],nC=fre.slice(3);function sz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=nC.indexOf(e),r=nC.slice(n+1).concat(nC.slice(0,n));return t?r.reverse():r}var rC={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Jst(e,t){if(cre(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var n=_I(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],a=nS(r),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case rC.FLIP:o=[r,a];break;case rC.CLOCKWISE:o=sz(r);break;case rC.COUNTERCLOCKWISE:o=sz(r,!0);break;default:o=t.behavior}return o.forEach(function(l,c){if(r!==l||o.length===c+1)return e;r=e.placement.split("-")[0],a=nS(r);var u=e.offsets.popper,d=e.offsets.reference,h=Math.floor,f=r==="left"&&h(u.right)>h(d.left)||r==="right"&&h(u.left)<h(d.right)||r==="top"&&h(u.bottom)>h(d.top)||r==="bottom"&&h(u.top)<h(d.bottom),m=h(u.left)<h(n.left),y=h(u.right)>h(n.right),p=h(u.top)<h(n.top),x=h(u.bottom)>h(n.bottom),v=r==="left"&&m||r==="right"&&y||r==="top"&&p||r==="bottom"&&x,b=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(b&&i==="start"&&m||b&&i==="end"&&y||!b&&i==="start"&&p||!b&&i==="end"&&x),S=!!t.flipVariationsByContent&&(b&&i==="start"&&y||b&&i==="end"&&m||!b&&i==="start"&&x||!b&&i==="end"&&p),j=w||S;(f||v||j)&&(e.flipped=!0,(f||v)&&(r=o[c+1]),j&&(i=Zst(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=Va({},e.offsets.popper,ore(e.instance.popper,e.offsets.reference,e.placement)),e=lre(e.instance.modifiers,e,"flip"))}),e}function eat(e){var t=e.offsets,n=t.popper,r=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=["top","bottom"].indexOf(a)!==-1,l=o?"right":"bottom",c=o?"left":"top",u=o?"width":"height";return n[l]<i(r[c])&&(e.offsets.popper[c]=i(r[c])-n[u]),n[c]>i(r[l])&&(e.offsets.popper[c]=i(r[l])),e}function tat(e,t,n,r){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(o.indexOf("%")===0){var l=void 0;switch(o){case"%p":l=n;break;case"%":case"%r":default:l=r}var c=Rc(l);return c[t]/100*i}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*i}else return i}function nat(e,t,n,r){var a=[0,0],i=["right","left"].indexOf(r)!==-1,o=e.split(/(\+|\-)/).map(function(d){return d.trim()}),l=o.indexOf(Ux(o,function(d){return d.search(/,|\s/)!==-1}));o[l]&&o[l].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=l!==-1?[o.slice(0,l).concat([o[l].split(c)[0]]),[o[l].split(c)[1]].concat(o.slice(l+1))]:[o];return u=u.map(function(d,h){var f=(h===1?!i:i)?"height":"width",m=!1;return d.reduce(function(y,p){return y[y.length-1]===""&&["+","-"].indexOf(p)!==-1?(y[y.length-1]=p,m=!0,y):m?(y[y.length-1]+=p,m=!1,y):y.concat(p)},[]).map(function(y){return tat(y,f,t,n)})}),u.forEach(function(d,h){d.forEach(function(f,m){EI(f)&&(a[h]+=f*(d[m-1]==="-"?-1:1))})}),a}function rat(e,t){var n=t.offset,r=e.placement,a=e.offsets,i=a.popper,o=a.reference,l=r.split("-")[0],c=void 0;return EI(+n)?c=[+n,0]:c=nat(n,i,o,l),l==="left"?(i.top+=c[0],i.left-=c[1]):l==="right"?(i.top+=c[0],i.left+=c[1]):l==="top"?(i.left+=c[0],i.top-=c[1]):l==="bottom"&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e}function sat(e,t){var n=t.boundariesElement||em(e.instance.popper);e.instance.reference===n&&(n=em(n));var r=CI("transform"),a=e.instance.popper.style,i=a.top,o=a.left,l=a[r];a.top="",a.left="",a[r]="";var c=_I(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);a.top=i,a.left=o,a[r]=l,t.boundaries=c;var u=t.priority,d=e.offsets.popper,h={primary:function(m){var y=d[m];return d[m]<c[m]&&!t.escapeWithReference&&(y=Math.max(d[m],c[m])),nm({},m,y)}
vendor: 9,573 bytes, line 974
974,secondary:function(m){var y=m==="right"?"left":"top",p=d[y];return d[m]>c[m]&&!t.escapeWithReference&&(p=Math.min(d[y],c[m]-(m==="right"?d.width:d.height))),nm({},y,p)}};return u.forEach(function(f){var m=["left","top"].indexOf(f)!==-1?"primary":"secondary";d=Va({},d,h[m](f))}),e.offsets.popper=d,e}function aat(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var a=e.offsets,i=a.reference,o=a.popper,l=["bottom","top"].indexOf(n)!==-1,c=l?"left":"top",u=l?"width":"height",d={start:nm({},c,i[c]),end:nm({},c,i[c]+i[u]-o[u])};e.offsets.popper=Va({},o,d[r])}return e}function iat(e){if(!hre(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Ux(e.instance.modifiers,function(r){return r.name==="preventOverflow"}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function oat(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,a=r.popper,i=r.reference,o=["left","right"].indexOf(n)!==-1,l=["top","left"].indexOf(n)===-1;return a[o?"left":"top"]=i[n]-(l?a[o?"width":"height"]:0),e.placement=nS(t),e.offsets.popper=Rc(a),e}var lat={shift:{order:100,enabled:!0,fn:aat},offset:{order:200,enabled:!0,fn:rat,offset:0},preventOverflow:{order:300,enabled:!0,fn:sat,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:eat},arrow:{order:500,enabled:!0,fn:Qst,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Jst,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:oat},hide:{order:800,enabled:!0,fn:iat},computeStyle:{order:850,enabled:!0,fn:Xst,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:Hst,onLoad:Gst,gpuAcceleration:void 0}},cat={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:lat},Dy=function(){function e(t,n){var r=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ist(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=Ast(this.update.bind(this)),this.options=Va({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Va({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){r.options.modifiers[o]=Va({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return Va({name:o},r.options.modifiers[o])}).sort(function(o,l){return o.order-l.order}),this.modifiers.forEach(function(o){o.enabled&&Jne(o.onLoad)&&o.onLoad(r.reference,r.popper,r.options,o,r.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Mst(e,[{key:"update",value:function(){return Fst.call(this)}},{key:"destroy",value:function(){return Bst.call(this)}},{key:"enableEventListeners",value:function(){return Ust.call(this)}},{key:"disableEventListeners",value:function(){return Wst.call(this)}}]),e}();Dy.Utils=(typeof window<"u"?window:global).PopperUtils;Dy.placements=fre;Dy.Defaults=cat;var uat=["innerHTML","ownerDocument","style","attributes","nodeValue"],dat=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],hat=["bigint","boolean","null","number","string","symbol","undefined"];function N1(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(fat(t))return t}function Vi(e){return function(t){return N1(t)===e}}function fat(e){return dat.includes(e)}function Um(e){return function(t){return typeof t===e}}function mat(e){return hat.includes(e)}function ue(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(ue.array(e))return"Array";if(ue.plainFunction(e))return"Function";var t=N1(e);return t||"Object"}ue.array=Array.isArray;ue.arrayOf=function(e,t){return!ue.array(e)&&!ue.function(t)?!1:e.every(function(n){return t(n)})};ue.asyncGeneratorFunction=function(e){return N1(e)==="AsyncGeneratorFunction"};ue.asyncFunction=Vi("AsyncFunction");ue.bigint=Um("bigint");ue.boolean=function(e){return e===!0||e===!1};ue.date=Vi("Date");ue.defined=function(e){return!ue.undefined(e)};ue.domElement=function(e){return ue.object(e)&&!ue.plainObject(e)&&e.nodeType===1&&ue.string(e.nodeName)&&uat.every(function(t){return t in e})};ue.empty=function(e){return ue.string(e)&&e.length===0||ue.array(e)&&e.length===0||ue.object(e)&&!ue.map(e)&&!ue.set(e)&&Object.keys(e).length===0||ue.set(e)&&e.size===0||ue.map(e)&&e.size===0};ue.error=Vi("Error");ue.function=Um("function");ue.generator=function(e){return ue.iterable(e)&&ue.function(e.next)&&ue.function(e.throw)};ue.generatorFunction=Vi("GeneratorFunction");ue.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};ue.iterable=function(e){return!ue.nullOrUndefined(e)&&ue.function(e[Symbol.iterator])};ue.map=Vi("Map");ue.nan=function(e){return Number.isNaN(e)};ue.null=function(e){return e===null};ue.nullOrUndefined=function(e){return ue.null(e)||ue.undefined(e)};ue.number=function(e){return Um("number")(e)&&!ue.nan(e)};ue.numericString=function(e){return ue.string(e)&&e.length>0&&!Number.isNaN(Number(e))};ue.object=function(e){return!ue.nullOrUndefined(e)&&(ue.function(e)||typeof e=="object")};ue.oneOf=function(e,t){return ue.array(e)?e.indexOf(t)>-1:!1};ue.plainFunction=Vi("Function");ue.plainObject=function(e){if(N1(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};ue.primitive=function(e){return ue.null(e)||mat(typeof e)};ue.promise=Vi("Promise");ue.propertyOf=function(e,t,n){if(!ue.object(e)||!t)return!1;var r=e[t];return ue.function(n)?n(r):ue.defined(r)};ue.regexp=Vi("RegExp");ue.set=Vi("Set");ue.string=Um("string");ue.symbol=Um("symbol");ue.undefined=Um("undefined");ue.weakMap=Vi("WeakMap");ue.weakSet=Vi("WeakSet");function mre(e){return function(t){return typeof t===e}}var pat=mre("function"),gat=function(e){return e===null},az=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},iz=function(e){return!yat(e)&&!gat(e)&&(pat(e)||typeof e=="object")},yat=mre("undefined"),TT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function xat(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=n;r--!==0;)if(!Bs(e[r],t[r]))return!1;return!0}function vat(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e.buffer),r=new DataView(t.buffer),a=e.byteLength;a--;)if(n.getUint8(a)!==r.getUint8(a))return!1;return!0}function bat(e,t){var n,r,a,i;if(e.size!==t.size)return!1;try{for(var o=TT(e.entries()),l=o.next();!l.done;l=o.next()){var c=l.value;if(!t.has(c[0]))return!1}}catch(h){n={error:h}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}try{for(var u=TT(e.entries()),d=u.next();!d.done;d=u.next()){var c=d.value;if(!Bs(c[1],t.get(c[0])))return!1}}catch(h){a={error:h}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(a)throw a.error}}return!0}function wat(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var a=TT(e.entries()),i=a.next();!i.done;i=a.next()){var o=i.value;if(!t.has(o[0]))return!1}}catch(l){n={error:l}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return!0}function Bs(e,t){if(e===t)return!0;if(e&&iz(e)&&t&&iz(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return xat(e,t);if(e instanceof Map&&t instanceof Map)return bat(e,t);if(e instanceof Set&&t instanceof Set)return wat(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return vat(e,t);if(az(e)&&az(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=n.length;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;for(var a=n.length;a--!==0;){var i=n[a];if(!(i==="_owner"&&e.$$typeof)&&!Bs(e[i],t[i]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}function Sat(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(n){return ue.string(n)||ue.array(n)||ue.plainObject(n)})}function jat(e,t,n){return pre(e,t)?[e,t].every(ue.array)?!e.some(dz(n))&&t.some(dz(n)):[e,t].every(ue.plainObject)?!Object.entries(e).some(uz(n))&&Object.entries(t).some(uz(n)):t===n:!1}function oz(e,t,n){var r=n.actual,a=n.key,i=n.previous,o=n.type,l=io(e,a),c=io(t,a),u=[l,c].every(ue.number)&&(o==="increased"?l<c:l>c);return ue.undefined(r)||(u=u&&c===r),ue.undefined(i)||(u=u&&l===i),u}function lz(e,t,n){var r=n.key,a=n.type,i=n.value,o=io(e,r),l=io(t,r),c=a==="added"?o:l,u=a==="added"?l:o;
974if(!ue.nullOrUndefined(i)){if(ue.defined(c)){if(ue.array(c)||ue.plainObject(c))return jat(c,u,i)}else return Bs(u,i);return!1}return[o,l].every(ue.array)?!u.every(kI(c)):[o,l].every(ue.plainObject)?Nat(Object.keys(c),Object.keys(u)):![o,l].every(function(d){return ue.primitive(d)&&ue.defined(d)})&&(a==="added"?!ue.defined(o)&&ue.defined(l):ue.defined(o)&&!ue.defined(l))}function cz(e,t,n){var r=n===void 0?{}:n,a=r.key,i=io(e,a),o=io(t,a);if(!pre(i,o))throw new TypeError("Inputs have different types");if(!Sat(i,o))throw new TypeError("Inputs don't have length");return[i,o].every(ue.plainObject)&&(i=Object.keys(i),o=Object.keys(o)),[i,o]}function uz(e){return function(t){var n=t[0],r=t[1];return ue.array(e)?Bs(e,r)||e.some(function(a){return Bs(a,r)||ue.array(r)&&kI(r)(a)}):ue.plainObject(e)&&e[n]?!!e[n]&&Bs(e[n],r):Bs(e,r)}}function Nat(e,t){return t.some(function(n){return!e.includes(n)})}function dz(e){return function(t){return ue.array(e)?e.some(function(n){return Bs(n,t)||ue.array(t)&&kI(t)(n)}):Bs(e,t)}}function yp(e,t){return ue.array(e)?e.some(function(n){return Bs(n,t)}):Bs(e,t)}function kI(e){return function(t){return e.some(function(n){return Bs(n,t)})}}function pre(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(ue.array)||e.every(ue.number)||e.every(ue.plainObject)||e.every(ue.string)}function io(e,t){if(ue.plainObject(e)||ue.array(e)){if(ue.string(t)){var n=t.split(".");return n.reduce(function(r,a){return r&&r[a]},e)}return ue.number(t)?e[t]:e}return e}function _at(e,t){if([e,t].some(ue.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(h){return ue.plainObject(h)||ue.array(h)}))throw new Error("Expected plain objects or array");var n=function(h,f){try{return lz(e,t,{key:h,type:"added",value:f})}catch{return!1}},r=function(h,f,m){try{var y=io(e,h),p=io(t,h),x=ue.defined(f),v=ue.defined(m);
974if(x||v){var b=v?yp(m,y):!yp(f,y),w=yp(f,p);return b&&w}return[y,p].every(ue.array)||[y,p].every(ue.plainObject)?!Bs(y,p):y!==p}catch{return!1}},a=function(h,f,m){if(!ue.defined(h))return!1;try{var y=io(e,h),p=io(t,h),x=ue.defined(m);return yp(f,y)&&(x?yp(m,p):!x)}catch{return!1}},i=function(h,f){return ue.defined(h)?r(h,f):!1},o=function(h,f,m){if(!ue.defined(h))return!1;try{return oz(e,t,{key:h,actual:f,previous:m,type:"decreased"})}catch{return!1}},l=function(h){try{var f=cz(e,t,{key:h}),m=f[0],y=f[1];return!!m.length&&!y.length}catch{return!1}},c=function(h){try{var f=cz(e,t,{key:h}),m=f[0],y=f[1];return!m.length&&!!y.length}catch{return!1}},u=function(h,f,m){if(!ue.defined(h))return!1;try{return oz(e,t,{key:h,actual:f,previous:m,type:"increased"})}catch{return!1}},d=function(h,f){try{return lz(e,t,{key:h,type:"removed",value:f})}catch{return!1}};return{added:n,changed:r,changedFrom:a,changedTo:i,decreased:o,emptied:l,filled:c,increased:u,removed:d}}function hz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hz(Object(n),!0).forEach(function(r){es(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cat(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yre(r.key),r)}}function Wx(e,t,n){return t&&Cat(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}
vendor: 4,162 bytes, line 974
974function es(e,t,n){return t=yre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AT(e,t)}function rS(e){return rS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rS(e)}function AT(e,t){return AT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},AT(e,t)}function Eat(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kat(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function gre(e,t){if(e==null)return{};var n=kat(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Io(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pat(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Io(e)}function Hx(e){var t=Eat();return function(){var r=rS(e),a;if(t){var i=rS(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return Pat(this,a)}}function Tat(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yre(e){var t=Tat(e,"string");return typeof t=="symbol"?t:String(t)}var Aat={flip:{padding:20},preventOverflow:{padding:10}},Oat="The typeValidator argument must be a function with the signature function(props, propName, componentName).",Rat="The error message is optional, but must be a string if provided.";function Iat(e,t,n,r){return typeof e=="boolean"?e:typeof e=="function"?e(t,n,r):e?!!e:!1}function Mat(e,t){return Object.hasOwnProperty.call(e,t)}function Dat(e,t,n,r){return new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(n,"`."))}function Lat(e,t){if(typeof e!="function")throw new TypeError(Oat);if(t&&typeof t!="string")throw new TypeError(Rat)}function fz(e,t,n){return Lat(e,n),function(r,a,i){for(var o=arguments.length,l=new Array(o>3?o-3:0),c=3;c<o;c++)l[c-3]=arguments[c];return Iat(t,r,a,i)?Mat(r,a)?e.apply(void 0,[r,a,i].concat(l)):Dat(r,a,i):e.apply(void 0,[r,a,i].concat(l))}}var Xt={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},xp=Pi.createPortal!==void 0;function eo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function sC(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function fb(e){var t=e.title,n=e.data,r=e.warn,a=r===void 0?!1:r,i=e.debug,o=i===void 0?!1:i,l=a?console.warn||console.error:console.log;o&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(c){ue.plainObject(c)&&c.key?l.apply(console,[c.key,c.value]):l.apply(console,[c])}):l.apply(console,[n]),console.groupEnd())}function $at(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,n,r)}function Fat(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,n,r)}function Bat(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a;a=function(o){n(o),Fat(e,t,a)},$at(e,t,a,r)}function mz(){}var xre=function(e){Vx(n,e);var t=Hx(n);function n(){return qx(this,n),t.apply(this,arguments)}
974return Wx(n,[{key:"componentDidMount",value:function(){eo()&&(this.node||this.appendNode(),xp||this.renderPortal())}},{key:"componentDidUpdate",value:function(){eo()&&(xp||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!eo()||!this.node||(xp||Pi.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var a=this.props,i=a.id,o=a.zIndex;this.node||(this.node=document.createElement("div"),i&&(this.node.id=i),o&&(this.node.style.zIndex=o),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!eo())return null;var a=this.props,i=a.children,o=a.setRef;if(this.node||this.appendNode(),xp)return Pi.createPortal(i,this.node);var l=Pi.unstable_renderSubtreeIntoContainer(this,i.length>1?z.createElement("div",null,i):i[0],this.node);return o(l),null}},{key:"renderReact16",value:function(){var a=this.props,i=a.hasChildren,o=a.placement,l=a.target;return i?this.renderPortal():l||o==="center"?this.renderPortal():null}},{key:"render",value:function(){return xp?this.renderReact16():null}}]),n}(z.Component);es(xre,"propTypes",{children:ce.oneOfType([ce.element,ce.array]),hasChildren:ce.bool,id:ce.oneOfType([ce.string,ce.number]),placement:ce.string,setRef:ce.func.isRequired,target:ce.oneOfType([ce.object,ce.string]),zIndex:ce.number});var vre=function(e){Vx(n,e);var t=Hx(n);function n(){return qx(this,n),t.apply(this,arguments)}return Wx(n,[{key:"parentStyle",get:function(){var a=this.props,i=a.placement,o=a.styles,l=o.arrow.length,c={pointerEvents:"none",position:"absolute",width:"100%"};return i.startsWith("top")?(c.bottom=0,c.left=0,c.right=0,c.height=l):i.startsWith("bottom")?(c.left=0,c.right=0,c.top=0,c.height=l):i.startsWith("left")?(c.right=0,c.top=0,c.bottom=0):i.startsWith("right")&&(c.left=0,c.top=0),c}},{key:"render",value:function(){var a=this.props,i=a.placement,o=a.setArrowRef,l=a.styles,c=l.arrow,u=c.color,d=c.display,h=c.length,f=c.margin,m=c.position,y=c.spread,p={display:d,position:m},x,v=y,b=h;return i.startsWith("top")?(x="0,0 ".concat(v/2,",").concat(b," ").concat(v,",0"),p.bottom=0,p.marginLeft=f,p.marginRight=f):i.startsWith("bottom")?(x="".concat(v,",").concat(b," ").concat(v/2,",0 0,").concat(b),p.top=0,p.marginLeft=f,p.marginRight=f):i.startsWith("left")?(b=y,v=h,x="0,0 ".concat(v,",").concat(b/2," 0,").concat(b),p.right=0,p.marginTop=f,p.marginBottom=f):i.startsWith("right")&&(b=y,v=h,x="".concat(v,",").concat(b," ").concat(v,",0 0,").concat(b/2),p.left=0,p.marginTop=f,p.marginBottom=f),z.createElement("div",{className:"__floater__arrow",style:this.parentStyle},z.createElement("span",{ref:o,style:p},z.createElement("svg",{width:v,height:b,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},z.createElement("polygon",{points:x,fill:u}))))}}]),n}(z.Component);es(vre,"propTypes",{placement:ce.string.isRequired,setArrowRef:ce.func.isRequired,styles:ce.object.isRequired});var zat=["color","height","width"];function bre(e){var t=e.handleClick,n=e.styles,r=n.color,a=n.height,i=n.width,o=gre(n,zat);return z.createElement("button",{"aria-label":"close",onClick:t,style:o,type:"button"},z.createElement("svg",{width:"".concat(i,"px"),height:"".concat(a,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("g",null,z.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}bre.propTypes={handleClick:ce.func.isRequired,styles:ce.object.isRequired};function wre(e){var t=e.content,n=e.footer,r=e.handleClick,a=e.open,i=e.positionWrapper,o=e.showCloseButton,l=e.title,c=e.styles,u={content:z.isValidElement(t)?t:z.createElement("div",{className:"__floater__c
974ontent",style:c.content},t)};return l&&(u.title=z.isValidElement(l)?l:z.createElement("div",{className:"__floater__title",style:c.title},l)),n&&(u.footer=z.isValidElement(n)?n:z.createElement("div",{className:"__floater__footer",style:c.footer},n)),(o||i)&&!ue.boolean(a)&&(u.close=z.createElement(bre,{styles:c.close,handleClick:r})),z.createElement("div",{className:"__floater__container",style:c.container},u.close,u.title,u.content,u.footer)}wre.propTypes={content:ce.node.isRequired,footer:ce.node,handleClick:ce.func.isRequired,open:ce.bool,positionWrapper:ce.bool.isRequired,showCloseButton:ce.bool.isRequired,styles:ce.object.isRequired,title:ce.node};var Sre=function(e){Vx(n,e);var t=Hx(n);function n(){return qx(this,n),t.apply(this,arguments)}return Wx(n,[{key:"style",get:function(){var a=this.props,i=a.disableAnimation,o=a.component,l=a.placement,c=a.hideArrow,u=a.status,d=a.styles,h=d.arrow.length,f=d.floater,m=d.floaterCentered,y=d.floaterClosing,p=d.floaterOpening,x=d.floaterWithAnimation,v=d.floaterWithComponent,b={};return c||(l.startsWith("top")?b.padding="0 0 ".concat(h,"px"):l.startsWith("bottom")?b.padding="".concat(h,"px 0 0"):l.startsWith("left")?b.padding="0 ".concat(h,"px 0 0"):l.startsWith("right")&&(b.padding="0 0 0 ".concat(h,"px"))),[Xt.OPENING,Xt.OPEN].indexOf(u)!==-1&&(b=On(On({},b),p)),u===Xt.CLOSING&&(b=On(On({},b),y)),u===Xt.OPEN&&!i&&(b=On(On({},b),x)),l==="center"&&(b=On(On({},b),m)),o&&(b=On(On({},b),v)),On(On({},f),b)}},{key:"render",value:function(){var a=this.props,i=a.component,o=a.handleClick,l=a.hideArrow,c=a.setFloaterRef,u=a.status,d={},h=["__floater"];return i?z.isValidElement(i)?d.content=z.cloneElement(i,{closeFn:o}):d.content=i({closeFn:o}):d.content=z.createElement(wre,this.props),u===Xt.OPEN&&h.push("__floater__open"),l||(d.arrow=z.createElement(vre,this.props)),z.createElement("div",{ref:c,className:h.join(" "),style:this.style},z.createElement("div",{className:"__floater__body"},d.content,d.arrow))}}]),n}(z.Component);es(Sre,"propTypes",{component:ce.oneOfType([ce.func,ce.element]),content:ce.node,disableAnimation:ce.bool.isRequired,footer:ce.node,handleClick:ce.func.isRequired,hideArrow:ce.bool.isRequired,open:ce.bool,placement:ce.string.isRequired,positionWrapper:ce.bool.isRequired,setArrowRef:ce.func.isRequired,setFloaterRef:ce.func.isRequired,showCloseButton:ce.bool,status:ce.string.isRequired,styles:ce.object.isRequired,title:ce.node});var jre=function(e){Vx(n,e);var t=Hx(n);function n(){return qx(this,n),t.apply(this,arguments)}return Wx(n,[{key:"render",value:function(){var a=this.props,i=a.children,o=a.handleClick,l=a.handleMouseEnter,c=a.handleMouseLeave,u=a.setChildRef,d=a.setWrapperRef,h=a.style,f=a.styles,m;if(i)if(z.Children.count(i)===1)if(!z.isValidElement(i))m=z.createElement("span",null,i);else{var y=ue.function(i.type)?"innerRef":"ref";m=z.cloneElement(z.Children.only(i),es({},y,u))}else m=i;return m?z.createElement("span",{ref:d,style:On(On({},f),h),onClick:o,onMouseEnter:l,onMouseLeave:c},m):null}}]),n}(z.Component);es(jre,"propTypes",{children:ce.node,handleClick:ce.func.isRequired,handleMouseEnter:ce.func.isRequired,handleMouseLeave:ce.func.isRequired,setChildRef:ce.func.isRequired,setWrapperRef:ce.func.isRequired,style:ce.object,styles:ce.object.isRequired});var Uat={zIndex:100};function qat(e){var t=Ci(Uat,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var Wat=["arrow","flip","offset"],Vat=["position","top","right","bottom","left"],PI=function(e){Vx(n,e);var t=Hx(n);function n(r){var a;return qx(this,n),a=t.call(this,r),es(Io(a),"setArrowRef",function(i){a.arrowRef=i}),es(Io(a),"setChildRef",function(i){a.childRef=i}),es(Io(a),"setFloaterRef",function(i){a.floaterRef=i}),es(Io(a),"setWrapperRef",function(i){a.wrapperRef=i}),es(Io(a),"handleTransitionEnd",function(){var i=a.state.status,o=a.props.callback;
vendor: 4,188 bytes, line 974
974a.wrapperPopper&&a.wrapperPopper.instance.update(),a.setState({status:i===Xt.OPENING?Xt.OPEN:Xt.IDLE},function(){var l=a.state.status;o(l===Xt.OPEN?"open":"close",a.props)})}),es(Io(a),"handleClick",function(){var i=a.props,o=i.event,l=i.open;if(!ue.boolean(l)){var c=a.state,u=c.positionWrapper,d=c.status;(a.event==="click"||a.event==="hover"&&u)&&(fb({title:"click",data:[{event:o,status:d===Xt.OPEN?"closing":"opening"}],debug:a.debug}),a.toggle())}}),es(Io(a),"handleMouseEnter",function(){var i=a.props,o=i.event,l=i.open;if(!(ue.boolean(l)||sC())){var c=a.state.status;a.event==="hover"&&c===Xt.IDLE&&(fb({title:"mouseEnter",data:[{key:"originalEvent",value:o}],debug:a.debug}),clearTimeout(a.eventDelayTimeout),a.toggle())}}),es(Io(a),"handleMouseLeave",function(){var i=a.props,o=i.event,l=i.eventDelay,c=i.open;if(!(ue.boolean(c)||sC())){var u=a.state,d=u.status,h=u.positionWrapper;a.event==="hover"&&(fb({title:"mouseLeave",data:[{key:"originalEvent",value:o}],debug:a.debug}),l?[Xt.OPENING,Xt.OPEN].indexOf(d)!==-1&&!h&&!a.eventDelayTimeout&&(a.eventDelayTimeout=setTimeout(function(){delete a.eventDelayTimeout,a.toggle()},l*1e3)):a.toggle(Xt.IDLE))}}),a.state={currentPlacement:r.placement,needsUpdate:!1,positionWrapper:r.wrapperOptions.position&&!!r.target,status:Xt.INIT,statusWrapper:Xt.INIT},a._isMounted=!1,a.hasMounted=!1,eo()&&window.addEventListener("load",function(){a.popper&&a.popper.instance.update(),a.wrapperPopper&&a.wrapperPopper.instance.update()}),a}return Wx(n,[{key:"componentDidMount",value:function(){if(eo()){var a=this.state.positionWrapper,i=this.props,o=i.children,l=i.open,c=i.target;this._isMounted=!0,fb({title:"init",data:{hasChildren:!!o,hasTarget:!!c,isControlled:ue.boolean(l),positionWrapper:a,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!o&&c&&ue.boolean(l)}}},{key:"componentDidUpdate",value:function(a,i){if(eo()){var o=this.props,l=o.autoOpen,c=o.open,u=o.target,d=o.wrapperOptions,h=_at(i,this.state),f=h.changedFrom,m=h.changed;if(a.open!==c){var y;ue.boolean(c)&&(y=c?Xt.OPENING:Xt.CLOSING),this.toggle(y)}(a.wrapperOptions.position!==d.position||a.target!==u)&&this.changeWrapperPosition(this.props),m("status",Xt.IDLE)&&c?this.toggle(Xt.OPEN):f("status",Xt.INIT,Xt.IDLE)&&l&&this.toggle(Xt.OPEN),this.popper&&m("status",Xt.OPENING)&&this.popper.instance.update(),this.floaterRef&&(m("status",Xt.OPENING)||m("status",Xt.CLOSING))&&Bat(this.floaterRef,"transitionend",this.handleTransitionEnd),m("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){eo()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,o=this.state.positionWrapper,l=this.props,c=l.disableFlip,u=l.getPopper,d=l.hideArrow,h=l.offset,f=l.placement,m=l.wrapperOptions,y=f==="top"||f==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(f==="center")this.setState({status:Xt.IDLE});else if(i&&this.floaterRef){var p=this.options,x=p.arrow,v=p.flip,b=p.offset,w=gre(p,Wat);new Dy(i,this.floaterRef,{placement:f,modifiers:On({arrow:On({enabled:!d,element:this.arrowRef},x),flip:On({enabled:!c,behavior:y},v),offset:On({offset:"0, ".concat(h,"px")},b)},w),onCreate:function(N){var C;if(a.popper=N,!((C=a.floaterRef)!==null&&C!==void 0&&C.isConnected)){a.setState({needsUpdate:!0});return}u(N,"floater"),a._isMounted&&a.setState({currentPlacement:N.placement,status:Xt.IDLE}),f!==N.placement&&setTimeout(function(){N.instance.update()},1)},onUpdate:function(N){a.popper=N;var C=a.state.currentPlacement;a._isMounted&&N.placement!==C&&a.setState({currentPlacement:N.placement})}})}if(o){var S=ue.undefined(m.offset)?0:m.offset;new Dy(this.target,this.wrapperRef,{placement:m.placement||f,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(S,"px")},flip:{enabled:!1}},onCreate:function(N){a.wrapperPopper=N,a._isMounted&&a.setState({statusWrapper:Xt.IDLE}),u(N,"wrapper"),f!==N.placement&&setTimeout(function(){N.instance.update(
974)},1)}})}}},{key:"rebuildPopper",value:function(){var a=this;this.floaterRefInterval=setInterval(function(){var i;(i=a.floaterRef)!==null&&i!==void 0&&i.isConnected&&(clearInterval(a.floaterRefInterval),a.setState({needsUpdate:!1}),a.initPopper())},50)}},{key:"changeWrapperPosition",value:function(a){var i=a.target,o=a.wrapperOptions;this.setState({positionWrapper:o.position&&!!i})}},{key:"toggle",value:function(a){var i=this.state.status,o=i===Xt.OPEN?Xt.CLOSING:Xt.OPENING;ue.undefined(a)||(o=a),this.setState({status:o})}},{key:"debug",get:function(){var a=this.props.debug;return a||eo()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var a=this.props,i=a.disableHoverToClick,o=a.event;return o==="hover"&&sC()&&!i?"click":o}},{key:"options",get:function(){var a=this.props.options;return Ci(Aat,a||{})}},{key:"styles",get:function(){var a=this,i=this.state,o=i.status,l=i.positionWrapper,c=i.statusWrapper,u=this.props.styles,d=Ci(qat(u),u);if(l){var h;[Xt.IDLE].indexOf(o)===-1||[Xt.IDLE].indexOf(c)===-1?h=d.wrapperPosition:h=this.wrapperPopper.styles,d.wrapper=On(On({},d.wrapper),h)}if(this.target){var f=window.getComputedStyle(this.target);this.wrapperStyles?d.wrapper=On(On({},d.wrapper),this.wrapperStyles):["relative","static"].indexOf(f.position)===-1&&(this.wrapperStyles={},l||(Vat.forEach(function(m){a.wrapperStyles[m]=f[m]}),d.wrapper=On(On({},d.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return d}},{key:"target",get:function(){if(!eo())return null;var a=this.props.target;return a?ue.domElement(a)?a:document.querySelector(a):this.childRef||this.wrapperRef}},{key:"render",value:function(){var a=this.state,i=a.currentPlacement,o=a.positionWrapper,l=a.status,c=this.props,u=c.children,d=c.component,h=c.content,f=c.disableAnimation,m=c.footer,y=c.hideArrow,p=c.id,x=c.open,v=c.showCloseButton,b=c.style,w=c.target,S=c.title,j=z.createElement(jre,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:b,styles:this.styles.wrapper},u),N={};return o?N.wrapperInPortal=j:N.wrapperAsChildren=j,z.createElement("span",null,z.createElement(xre,{hasChildren:!!u,id:p,placement:i,setRef:this.setFloaterRef,target:w,zIndex:this.styles.options.zIndex},z.createElement(Sre,{component:d,content:h,disableAnimation:f,footer:m,handleClick:this.handleClick,hideArrow:y||i==="center",open:x,placement:i,positionWrapper:o,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:v,status:l,styles:this.styles,title:S}),N.wrapperInPortal),N.wrapperAsChildren)}}]),n}(z.Component);es(PI,"propTypes",{autoOpen:ce.bool,callback:ce.func,children:ce.node,component:fz(ce.oneOfType([ce.func,ce.element]),function(e){return!e.content}),content:fz(ce.node,function(e){return!e.component}),debug:ce.bool,disableAnimation:ce.bool,disableFlip:ce.bool,disableHoverToClick:ce.bool,event:ce.oneOf(["hover","click"]),eventDelay:ce.number,footer:ce.node,getPopper:ce.func,hideArrow:ce.bool,id:ce.oneOfType([ce.string,ce.number]),offset:ce.number,open:ce.bool,options:ce.object,placement:ce.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:ce.bool,style:ce.object,styles:ce.object,target:ce.oneOfType([ce.object,ce.string]),title:ce.node,wrapperOptions:ce.shape({offset:ce.number,placement:ce.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:ce.bool})});es(PI,"defaultProps",{autoOpen:!1,callback:mz,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:mz,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});
974var Hat=Object.defineProperty,Gat=(e,t,n)=>t in e?Hat(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,We=(e,t,n)=>Gat(e,typeof t!="symbol"?t+"":t,n),on={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},Ni={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},St={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},It={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function Vl(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function Nre(e){return e?e.getBoundingClientRect():null}function Kat(e=!1){const{body:t,documentElement:n}=document;if(!t||!n)return 0;if(e){const r=[t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight].sort((i,o)=>i-o),a=Math.floor(r.length/2);return r.length%2===0?(r[a-1]+r[a])/2:r[a]}return Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function Ho(e){if(typeof e=="string")try{return document.querySelector(e)}catch{return null}return e}function Yat(e){return!e||e.nodeType!==1?null:getComputedStyle(e)}function Ly(e,t,n){if(!e)return Eu();const r=Qne(e);if(r){if(r.isSameNode(Eu()))return n?document:Eu();if(!(r.scrollHeight>r.offsetHeight)&&!t)return r.style.overflow="initial",Eu()}return r}function _1(e,t){if(!e)return!1;const n=Ly(e,t);return n?!n.isSameNode(Eu()):!1}function Xat(e){return e.offsetParent!==document.body}
974function rm(e,t="fixed"){if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:n}=e,r=Yat(e);return n==="BODY"||n==="HTML"?!1:r&&r.position===t?!0:e.parentNode?rm(e.parentNode,t):!1}function Qat(e){var t;if(!e)return!1;let n=e;for(;n&&n!==document.body;){if(n instanceof HTMLElement){const{display:r,visibility:a}=getComputedStyle(n);if(r==="none"||a==="hidden")return!1}n=(t=n.parentElement)!=null?t:null}return!0}function Zat(e,t,n){var r,a,i;const o=Nre(e),l=Ly(e,n),c=_1(e,n),u=rm(e);let d=0,h=(r=o==null?void 0:o.top)!=null?r:0;if(c&&u){const f=(a=e==null?void 0:e.offsetTop)!=null?a:0,m=(i=l==null?void 0:l.scrollTop)!=null?i:0;h=f-m}else l instanceof HTMLElement&&(d=l.scrollTop,!c&&!rm(e)&&(h+=d),l.isSameNode(Eu())||(h+=Eu().scrollTop));return Math.floor(h-t)}function Jat(e,t,n){var r;if(!e)return 0;const{offsetTop:a=0,scrollTop:i=0}=(r=Qne(e))!=null?r:{};let o=e.getBoundingClientRect().top+i;a&&(_1(e,n)||Xat(e))&&(o-=a);const l=Math.floor(o-t);return l<0?0:l}function Eu(){var e;return(e=document.scrollingElement)!=null?e:document.documentElement}function eit(e,t){const{duration:n,element:r}=t;return new Promise((a,i)=>{const{scrollTop:o}=r,l=e>o?e-o:o-e;lst.top(r,e,{duration:l<100?50:n},c=>c&&c.message!=="Element already at target scroll position"?i(c):a())})}var vp=Ga.createPortal!==void 0;function _re(e=navigator.userAgent){let t=e;return typeof window>"u"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":window.opera||e.includes(" OPR/")?t="opera":typeof window.InstallTrigger<"u"?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function Gb(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function to(e,t={}){const{defaultValue:n,step:r,steps:a}=t;let i=ZB(e);if(i)(i.includes("{step}")||i.includes("{steps}"))&&r&&a&&(i=i.replace("{step}",r.toString()).replace("{steps}",a.toString()));else if(g.isValidElement(e)&&!Object.values(e.props).length&&Gb(e.type)==="function"){const o=e.type({});i=to(o,t)}else i=ZB(n);return i}function tit(e,t){return!qe.plainObject(e)||!qe.array(t)?!1:Object.keys(e).every(n=>t.includes(n))}function nit(e){const t=/^#?([\da-f])([\da-f])([\da-f])$/i,n=e.replace(t,(a,i,o,l)=>i+i+o+o+l+l),r=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(n);return r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:[]}function pz(e){return e.disableBeacon||e.placement==="center"}function gz(){return!["chrome","safari","firefox","opera"].includes(_re())}function hd({data:e,debug:t=!1,title:n,warn:r=!1}){const a=r?console.warn||console.error:console.log;t&&(n&&e?(console.groupCollapsed(`%creact-joyride: ${n}`,"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(e)?e.forEach(i=>{qe.plainObject(i)&&i.key?a.apply(console,[i.key,i.value]):a.apply(console,[i])}):a.apply(console,[e]),console.groupEnd()):console.error("Missing title or data props"))}function rit(e){return Object.keys(e)}function Cre(e,...t){if(!qe.plainObject(e))throw new TypeError("Expected an object");const n={};for(const r in e)({}).hasOwnProperty.call(e,r)&&(t.includes(r)||(n[r]=e[r]));return n}function sit(e,...t){if(!qe.plainObject(e))throw new TypeError("Expected an object");if(!t.length)return e;const n={};for(const r in e)({}).hasOwnProperty.call(e,r)&&t.includes(r)&&(n[r]=e[r]);return n}function OT(e,t,n){const r=i=>i.replace("{step}",String(t)).replace("{steps}",String(n));if(Gb(e)==="string")return r(e);if(!g.isValidElement(e))return e;const{children:a}=e.props;if(Gb(a)==="string"&&a.includes("{step}"))return g.cloneElement(e,{children:r(a)});if(Array.isArray(a))return g.cloneElement(e,{children:a.map(i=>typeof i=="string"?r(i):OT(i,t,n))});if(Gb(e.type)==="function"&&!Object.values(e.props).length){const i=e.type({});return OT(i,t,n)}return e}function ait(e){const{isFirstStep:t,lifecycle:n,previousLifecycle:r,scrollToFirstStep:a,step:i,target:o}=e;return!i.disableScrolling&&(!t||a||n===St.TOOLTIP)&&i.placement!=="center"&&(!i.isFixed||!rm(o))&&r!==n&&[St.BEACON,St.TOOLTIP].includes(n)}var iit={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},Ere={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps}
974)",open:"Open the dialog",skip:"Skip"},oit={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:Ere,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},lit={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},cit={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},bp={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},yz={borderRadius:4,position:"absolute"};function uit(e,t){var n,r,a,i,o;const{floaterProps:l,styles:c}=e,u=Ci((n=t.floaterProps)!=null?n:{},l??{}),d=Ci(c??{},(r=t.styles)!=null?r:{}),h=Ci(cit,d.options||{}),f=t.placement==="center"||t.disableBeacon;let{width:m}=h;window.innerWidth>480&&(m=380),"width"in h&&(m=typeof h.width=="number"&&window.innerWidth<h.width?window.innerWidth-30:h.width);const y={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:h.zIndex},p={beacon:{...bp,display:f?"none":"inline-block",height:h.beaconSize,position:"relative",width:h.beaconSize,zIndex:h.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:h.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${nit(h.primaryColor).join(",")}, 0.2)`,border:`2px solid ${h.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:h.backgroundColor,borderRadius:5,boxSizing:"border-box",color:h.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:m},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...bp,backgroundColor:h.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...bp,color:h.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...bp,color:h.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...bp,color:h.textColor,fontSize:14},overlay:{...y,backgroundColor:h.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...y},overlayLegacyCenter:{...y,backgroundColor:h.overlayColor},spotlight:{...yz,backgroundColor:"gray"},spotlightLegacy:{...yz,boxShadow:`0 0 0 9999px ${h.overlayColor}, ${h.spotlightShadow}`},floaterStyles:{arrow:{color:(o=(i=(a=u==null?void 0:u.styles)==null?void 0:a.arrow)==null?void 0:i.color)!=null?o:h.arrowColor},options:{zIndex:h.zIndex+100}},options:h};return Ci(p,d)}function dit(e){return sit(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function th(e,t){var n,r,a,i,o,l;const c=t??{},u=Ci.all([oit,dit(e),c],{isMergeableObject:qe.plainObject}),d=uit(e,u),h=_1(Ho(u.target),u.disableScrollParentFix),f=Ci.all([iit,(n=e.floaterProps)!=null?n:{},(r=u.floaterProps)!=null?r:{}]);return f.offset=u.offset,f.styles=Ci((a=f.styles)!=null?a:{},d.floaterStyles),f.offset+=(o=(i=e.spotlightPadding)!=null?i:u.spotlightPadding)!=null?o:0,u.placementBeacon&&f.wrapperOptions&&(f.wrapperOptions.placement=u.placementBeacon),h&&f.options.preventOverflow&&(f.options.preventOverflow.boundariesElement="window"),{...u,locale:Ci.all([Ere,(l=e.locale)!=null?l:{},u.locale||{}]),floaterProps:f,styles:Cre(d,"floaterStyles")}}function kre(e,t=!1){return qe.plainObject(e)?e.target?!0:(hd({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(hd({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function xz(e,t=!1){return qe.array(e)?e.every(n=>kre(n,t)):(hd({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Pre={action:"init",controlled:!1,index:0,lifecycle:St.INIT,origin:null,size:0,status:It.IDLE},vz=rit(Cre(Pre,"controlled","size")),hit=class{constructor(e){We(this,"beaconPopper"),We(this,"tooltipPopper"),We(this,"data",new Map),We(this,"listener"),We(this,"store",new Map),We(this,"addListener",a=>{this.listener=a}),We(this,"setSteps",a=>
974{const{size:i,status:o}=this.getState(),l={size:a.length,status:o};this.data.set("steps",a),o===It.WAITING&&!i&&a.length&&(l.status=It.RUNNING),this.setState(l)}),We(this,"getPopper",a=>a==="beacon"?this.beaconPopper:this.tooltipPopper),We(this,"setPopper",(a,i)=>{a==="beacon"?this.beaconPopper=i:this.tooltipPopper=i}),We(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),We(this,"close",(a=null)=>{const{index:i,status:o}=this.getState();o===It.RUNNING&&this.setState({...this.getNextState({action:on.CLOSE,index:i+1,origin:a})})}),We(this,"go",a=>{const{controlled:i,status:o}=this.getState();if(i||o!==It.RUNNING)return;const l=this.getSteps()[a];this.setState({...this.getNextState({action:on.GO,index:a}),status:l?o:It.FINISHED})}),We(this,"info",()=>this.getState()),We(this,"next",()=>{const{index:a,status:i}=this.getState();i===It.RUNNING&&this.setState(this.getNextState({action:on.NEXT,index:a+1}))}),We(this,"open",()=>{const{status:a}=this.getState();a===It.RUNNING&&this.setState({...this.getNextState({action:on.UPDATE,lifecycle:St.TOOLTIP})})}),We(this,"prev",()=>{const{index:a,status:i}=this.getState();i===It.RUNNING&&this.setState({...this.getNextState({action:on.PREV,index:a-1})})}),We(this,"reset",(a=!1)=>{const{controlled:i}=this.getState();i||this.setState({...this.getNextState({action:on.RESET,index:0}),status:a?It.RUNNING:It.READY})}),We(this,"skip",()=>{const{status:a}=this.getState();a===It.RUNNING&&this.setState({action:on.SKIP,lifecycle:St.INIT,status:It.SKIPPED})}),We(this,"start",a=>{const{index:i,size:o}=this.getState();this.setState({...this.getNextState({action:on.START,index:qe.number(a)?a:i},!0),status:o?It.RUNNING:It.WAITING})}),We(this,"stop",(a=!1)=>{const{index:i,status:o}=this.getState();[It.FINISHED,It.SKIPPED].includes(o)||this.setState({...this.getNextState({action:on.STOP,index:i+(a?1:0)}),status:It.PAUSED})}),We(this,"update",a=>{var i,o;if(!tit(a,vz))throw new Error(`State is not valid. Valid keys: ${vz.join(", ")}`);this.setState({...this.getNextState({...this.getState(),...a,action:(i=a.action)!=null?i:on.UPDATE,origin:(o=a.origin)!=null?o:null},!0)})});const{continuous:t=!1,stepIndex:n,steps:r=[]}=e??{};this.setState({action:on.INIT,controlled:qe.number(n),continuous:t,index:qe.number(n)?n:0,lifecycle:St.INIT,origin:null,status:r.length?It.READY:It.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(r)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:{...Pre}}getNextState(e,t=!1){var n,r,a,i,o;const{action:l,controlled:c,index:u,size:d,status:h}=this.getState(),f=qe.number(e.index)?e.index:u,m=c&&!t?u:Math.min(Math.max(f,0),d);return{action:(n=e.action)!=null?n:l,controlled:c,index:m,lifecycle:(r=e.lifecycle)!=null?r:St.INIT,origin:(a=e.origin)!=null?a:null,size:(i=e.size)!=null?i:d,status:m===d?It.FINISHED:(o=e.status)!=null?o:h}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){const t=JSON.stringify(e),n=JSON.stringify(this.getState());return t!==n}setState(e,t=!1){const n=this.getState(),{action:r,index:a,lifecycle:i,origin:o=null,size:l,status:c}={...n,...e};this.store.set("action",r),this.store.set("index",a),this.store.set("lifecycle",i),this.store.set("origin",o),this.store.set("size",l),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(n)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function fit(e){return new hit(e)}function mit({styles:e}){return g.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:e})}var pit=mit,git=class extends g.Component{constructor(){super(...arguments),We(this,"isActive",!1),We(this,"resizeTimeout"),We(this,"scrollTimeout"),We(this,"scrollParent"),We(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),We(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:n}=this.props,r=[St.INIT,St.BEACON,St.COMPLETE,St.ERROR];return t||(e?r.includes(n):n!==St.TOOLTIP)}),We(this,"handleMouseMove",e=>
974{const{mouseOverSpotlight:t}=this.state,{height:n,left:r,position:a,top:i,width:o}=this.spotlightStyles,l=a==="fixed"?e.clientY:e.pageY,c=a==="fixed"?e.clientX:e.pageX,u=l>=i&&l<=i+n,h=c>=r&&c<=r+o&&u;h!==t&&this.updateState({mouseOverSpotlight:h})}),We(this,"handleScroll",()=>{const{target:e}=this.props,t=Ho(e);if(this.scrollParent!==document){const{isScrolling:n}=this.state;n||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else rm(t,"sticky")&&this.updateState({})}),We(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:n=!1,target:r}=this.props,a=Ho(r);this.scrollParent=Ly(a??document.body,n,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:n,lifecycle:r,spotlightClicks:a,target:i}=this.props,{changed:o}=eS(e,this.props);if(o("target")||o("disableScrollParentFix")){const l=Ho(i);this.scrollParent=Ly(l??document.body,n,!0)}o("lifecycle",St.TOOLTIP)&&((t=this.scrollParent)==null||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:l}=this.state;l||this.updateState({showSpotlight:!0})},100)),(o("spotlightClicks")||o("disableOverlay")||o("lifecycle"))&&(a&&r===St.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):r!==St.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),(e=this.scrollParent)==null||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:n,styles:r}=this.props;let a=r.overlay;return gz()&&(a=n==="center"?r.overlayLegacyCenter:r.overlayLegacy),{cursor:t?"default":"pointer",height:Kat(),pointerEvents:e?"none":"auto",...a}}get spotlightStyles(){var e,t,n;const{showSpotlight:r}=this.state,{disableScrollParentFix:a=!1,spotlightClicks:i,spotlightPadding:o=0,styles:l,target:c}=this.props,u=Ho(c),d=Nre(u),h=rm(u),f=Zat(u,o,a);return{...gz()?l.spotlightLegacy:l.spotlight,height:Math.round(((e=d==null?void 0:d.height)!=null?e:0)+o*2),left:Math.round(((t=d==null?void 0:d.left)!=null?t:0)-o),opacity:r?1:0,pointerEvents:i?"none":"auto",position:h?"fixed":"absolute",top:f,transition:"opacity 0.2s",width:Math.round(((n=d==null?void 0:d.width)!=null?n:0)+o*2)}}updateState(e){this.isActive&&this.setState(t=>({...t,...e}))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:n}=this.props,{hideSpotlight:r,overlayStyles:a,spotlightStyles:i}=this;if(r())return null;let o=n!=="center"&&e&&g.createElement(pit,{styles:i});if(_re()==="safari"){const{mixBlendMode:l,zIndex:c,...u}=a;o=g.createElement("div",{style:{...u}},o),delete a.backgroundColor}return g.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:a},o)}},yit=class extends g.Component{constructor(){super(...arguments),We(this,"node",null)}componentDidMount(){const{id:e}=this.props;Vl()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),vp||this.renderReact15())}componentDidUpdate(){Vl()&&(vp||this.renderReact15())}componentWillUnmount(){!Vl()||!this.node||(vp||Ga.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!Vl())return;const{children:e}=this.props;this.node&&Ga.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!Vl()||!vp)return null;const{children:e}=this.props;return this.node?Ga.createPortal(e,this.node):null}render(){return vp?this.renderReact16():null}},xit=class{constructor(e,t){if(We(this,"element"),We(this,"options"),We(this,"canBeTabbed",n=>{const{tabIndex:r}=n;return r===null||r<0?!1:this.canHaveFocus(n)}),We(this,"canHaveFocus",n=>{const r=/input|select|textarea|button|object/,a=n.nodeName.toLowerCase();return(r.test(a)&&!n.getAttribute("disabled")||a==="a"&&!!n.getAttribute("href"))&&this.isVisible(n)}),We(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),We(this,"handleKeyDown",n=>{const{code:r="Tab"}=this.options;n.code===r&&this.interceptTab(n)}),We(this,"interceptTab",n=>{n.preventDefault();const r=this.findValidTabElements(),{shiftKey:a}=n;if(!r.length)return;let i=document.activeElement?r.indexOf(document.activeElement):0;
974i===-1||!a&&i+1===r.length?i=0:a&&i===0?i=r.length-1:i+=a?-1:1,r[i].focus()}),We(this,"isHidden",n=>{const r=n.offsetWidth<=0&&n.offsetHeight<=0,a=window.getComputedStyle(n);return r&&!n.innerHTML?!0:r&&a.getPropertyValue("overflow")!=="visible"||a.getPropertyValue("display")==="none"}),We(this,"isVisible",n=>{let r=n;for(;r;)if(r instanceof HTMLElement){if(r===document.body)break;if(this.isHidden(r))return!1;r=r.parentNode}return!0}),We(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),We(this,"checkFocus",n=>{document.activeElement!==n&&(n.focus(),window.requestAnimationFrame(()=>this.checkFocus(n)))}),We(this,"setFocus",()=>{const{selector:n}=this.options;if(!n)return;const r=this.element.querySelector(n);r&&window.requestAnimationFrame(()=>this.checkFocus(r))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},vit=class extends g.Component{constructor(e){if(super(e),We(this,"beacon",null),We(this,"setBeaconRef",a=>{this.beacon=a}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id="joyride-beacon-animation",e.nonce&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode(`
975        @keyframes joyride-beacon-inner {
976          20% {
977            opacity: 0.9;
978          }
979        
980          90% {
981            opacity: 0.7;
982          }
983        }
984        
985        @keyframes joyride-beacon-outer {
986          0% {
987            transform: scale(1);
988          }
989        
990          45% {
991            opacity: 0.7;
992            transform: scale(0.75);
993          }
994        
995          100% {
996            opacity: 0.9;
997            transform: scale(1);
998          }
999        }
1000      `)),t.appendChild(n)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{qe.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");e!=null&&e.parentNode&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:n,isLastStep:r,locale:a,onClickOrHover:i,size:o,step:l,styles:c}=this.props,u=to(a.open),d={"aria-label":u,onClick:i,onMouseEnter:i,ref:this.setBeaconRef,title:u};let h;if(e){const f=e;h=g.createElement(f,{continuous:t,index:n,isLastStep:r,size:o,step:l,...d})}else h=g.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button",...d},g.createElement("span",{style:c.beaconInner}),g.createElement("span",{style:c.beaconOuter}));return h}};function bit({styles:e,...t}){const{color:n,height:r,width:a,...i}=e;return z.createElement("button",{style:i,type:"button",...t},z.createElement("svg",{height:typeof r=="number"?`${r}px`:r,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof a=="number"?`${a}px`:a,xmlns:"http://www.w3.org/2000/svg"},z.createElement("g",null,z.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:n}))))}var wit=bit;function Sit(e){const{backProps:t,closeProps:n,index:r,isLastStep:a,primaryProps:i,skipProps:o,step:l,tooltipProps:c}=e,{content:u,hideBackButton:d,hideCloseButton:h,hideFooter:f,showSkipButton:m,styles:y,title:p}=l,x={};return x.primary=g.createElement("button",{"data-test-id":"button-primary",style:y.buttonNext,type:"button",...i}),m&&!a&&(x.skip=g.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:y.buttonSkip,type:"button",...o})),!d&&r>0&&(x.back=g.createElement("button",{"data-test-id":"button-back",style:y.buttonBack,type:"button",...t})),x.close=!h&&g.createElement(wit,{"data-test-id":"button-close",styles:y.buttonClose,...n}),g.createElement("div",{key:"JoyrideTooltip","aria-label":to(p??u),className:"react-joyride__tooltip",style:y.tooltip,...c},g.createElement("div",{style:y.tooltipContainer},p&&g.createElement("h1",{"aria-label":to(p),style:y.tooltipTitle},p),g.createElement("div",{style:y.tooltipContent},u)),!f&&g.createElement("div",{style:y.tooltipFooter},g.createElement("div",{style:y.tooltipFooterSpacer},x.skip),x.back,x.primary),x.close)}var jit=Sit,Nit=class extends g.Component{constructor(){super(...arguments),We(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),We(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),We(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:n}=this.props;if(!t){n.close("button_primary");return}n.next()}),We(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),We(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:n,setTooltipRef:r,size:a,step:i}=this.props,{back:o,close:l,last:c,next:u,nextLabelWithProgress:d,skip:h}=i.locale,f=to(o),m=to(l),y=to(c),p=to(u),x=to(h);let v=l,b=m;if(e){if(v=u,b=p,i.showProgress&&!n){const w=to(d,{step:t+1,steps:a});v=OT(d,t+1,a),b=w}n&&(v=c,b=y)}return{backProps:{"aria-label":f,children:o,"data-action":"back",onClick:this.handleClickBack,role:"button",title:f},closeProps:{"aria-label":m,children:l,"data-action":"close",onClick:this.handleClickClose,role:"button",title:m},primaryProps:{"aria-label":b,children:v,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:b},skipProps:{"aria-label":x,children:h,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:x},tooltipProps:{"aria-modal":!0,ref:r,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:n,setTooltipRef:r,size:a,step:i}=this.props,{beaconComponent:o,tooltipComponent:l,...c}=i;let u;if(l){const d={...this.getElementsProps(),continuous:e,index:t,isLastStep:n,size:a,step:c,setTooltipRef:r},h=l;u=g.createElement(h,{...d})}else u=g.createElement(jit,{...this.getElementsProps(),continuous:e,index:t,isLastStep:n,size:a,step:i});return u}},_it=class extends g.Component{constructor(){super(...arguments),We(this,"scope",null),We(this,"tooltip",null),We(this,"handleClickHoverBeacon",e=>
1000{const{step:t,store:n}=this.props;e.type==="mouseenter"&&t.event!=="hover"||n.update({lifecycle:St.TOOLTIP})}),We(this,"setTooltipRef",e=>{this.tooltip=e}),We(this,"setPopper",(e,t)=>{var n;const{action:r,lifecycle:a,step:i,store:o}=this.props;t==="wrapper"?o.setPopper("beacon",e):o.setPopper("tooltip",e),o.getPopper("beacon")&&(o.getPopper("tooltip")||i.placement==="center")&&a===St.INIT&&o.update({action:r,lifecycle:St.READY}),(n=i.floaterProps)!=null&&n.getPopper&&i.floaterProps.getPopper(e,t)}),We(this,"renderTooltip",e=>{const{continuous:t,helpers:n,index:r,size:a,step:i}=this.props;return g.createElement(Nit,{continuous:t,helpers:n,index:r,isLastStep:r+1===a,setTooltipRef:this.setTooltipRef,size:a,step:i,...e})})}componentDidMount(){const{debug:e,index:t}=this.props;hd({title:`step:${t}`,data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:n,callback:r,continuous:a,controlled:i,debug:o,helpers:l,index:c,lifecycle:u,shouldScroll:d,status:h,step:f,store:m}=this.props,{changed:y,changedFrom:p}=eS(e,this.props),x=l.info(),v=a&&n!==on.CLOSE&&(c>0||n===on.PREV),b=y("action")||y("index")||y("lifecycle")||y("status"),w=p("lifecycle",[St.TOOLTIP,St.INIT],St.INIT),S=y("action",[on.NEXT,on.PREV,on.SKIP,on.CLOSE]),j=i&&c===e.index;if(S&&(w||j)&&r({...x,index:e.index,lifecycle:St.COMPLETE,step:e.step,type:Ni.STEP_AFTER}),f.placement==="center"&&h===It.RUNNING&&y("index")&&n!==on.START&&u===St.INIT&&m.update({lifecycle:St.READY}),b){const N=Ho(f.target),C=!!N;C&&Qat(N)?(p("status",It.READY,It.RUNNING)||p("lifecycle",St.INIT,St.READY))&&r({...x,step:f,type:Ni.STEP_BEFORE}):(console.warn(C?"Target not visible":"Target not mounted",f),r({...x,type:Ni.TARGET_NOT_FOUND,step:f}),i||m.update({index:c+(n===on.PREV?-1:1)}))}p("lifecycle",St.INIT,St.READY)&&m.update({lifecycle:pz(f)||v?St.TOOLTIP:St.BEACON}),y("index")&&hd({title:`step:${u}`,data:[{key:"props",value:this.props}],debug:o}),y("lifecycle",St.BEACON)&&r({...x,step:f,type:Ni.BEACON}),y("lifecycle",St.TOOLTIP)&&(r({...x,step:f,type:Ni.TOOLTIP}),d&&this.tooltip&&(this.scope=new xit(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),p("lifecycle",[St.TOOLTIP,St.INIT],St.INIT)&&((t=this.scope)==null||t.removeScope(),m.cleanupPoppers())}componentWillUnmount(){var e;(e=this.scope)==null||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return pz(t)||e===St.TOOLTIP}render(){const{continuous:e,debug:t,index:n,nonce:r,shouldScroll:a,size:i,step:o}=this.props,l=Ho(o.target);return!kre(o)||!qe.domElement(l)?null:g.createElement("div",{key:`JoyrideStep-${n}`,className:"react-joyride__step"},g.createElement(PI,{...o.floaterProps,component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:`react-joyride-step-${n}`,open:this.open,placement:o.placement,target:o.target},g.createElement(vit,{beaconComponent:o.beaconComponent,continuous:e,index:n,isLastStep:n+1===i,locale:o.locale,nonce:r,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:a,size:i,step:o,styles:o.styles})))}},Tre=class extends g.Component{constructor(e){super(e),We(this,"helpers"),We(this,"store"),We(this,"callback",o=>{const{callback:l}=this.props;qe.function(l)&&l(o)}),We(this,"handleKeyboard",o=>{const{index:l,lifecycle:c}=this.state,{steps:u}=this.props,d=u[l];c===St.TOOLTIP&&o.code==="Escape"&&d&&!d.disableCloseOnEsc&&this.store.close("keyboard")}),We(this,"handleClickOverlay",()=>{const{index:o}=this.state,{steps:l}=this.props;th(this.props,l[o]).disableOverlayClose||this.helpers.close("overlay")}),We(this,"syncState",o=>{this.setState(o)});const{debug:t,getHelpers:n,run:r=!0,stepIndex:a}=e;this.store=fit({...e,controlled:r&&qe.number(a)}),this.helpers=this.store.getHelpers();const{addListener:i}=this.store;hd({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),i(this.syncState),n&&n(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!Vl())return;const{debug:e,disableCloseOnEsc:t,run:n,steps:r}=this.props,{start:a}=this.store;xz(r,e)&&n&&a(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!Vl())return;const{action:n,controlled:r,index:a,status:i}=this.state,{debug:o,run:l,stepIndex:c,steps:u}=this.props,{stepIndex:d,steps:h}=e,{reset:f,setSteps:m,start:y,stop:p,update:x}=this.store,{changed:v}=eS(e,this.props),{changed:b,changedFrom:w}=eS(t,this.state),S=th(this.props,u[a]),j=!Ns(h,u),N=qe.number(c)&&v("stepIndex"),C=Ho(S.target);if(j&&(xz(u,o)?m(u):console.warn("Steps are not valid",u)),v("run")&&(l?y(c):p()),N){let P=qe.number(d)&&d<c?on.NEXT:on.PREV;n===on.STOP&&(P=on.START),[It.FINISHED,It.SKIPPED].includes(i)||x({action:n===on.CLOSE?on.CLOSE:P,index:c,lifecycle:St.INIT})}!r&&i===It.RUNNING&&a===0&&!C&&(this.store.update({index:a+1}),this.callback({...this.state,type:Ni.TARGET_NOT_FOUND,step:S}));const _={...this.state,index:a,step:S};if(b("action",[on.NEXT,on.PREV,on.SKIP,on.CLOSE])&&b("status",It.PAUSED)){const P=th(this.props,u[t.index]);this.callback({..._,index:t.index,lifecycle:St.COMPLETE,step:P,type:Ni.STEP_AFTER})}if(b("status",[It.FINISHED,It.SKIPPED])){const P=th(this.props,u[t.index]);r||this.callback({..._,index:t.index,lifecycle:St.COMPLETE,step:P,type:Ni.STEP_AFTER}),this.callback({..._,type:Ni.TOUR_END,step:P,index:t.index}),f()}else w("status",[It.IDLE,It.READY],It.RUNNING)?this.callback({..._,type:Ni.TOUR_START}):(b("status")||b("action",on.RESET))&&this.callback({..._,type:Ni.TOUR_STATUS});this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:n,status:r}
1000=this.state,{debug:a,disableScrollParentFix:i=!1,scrollDuration:o,scrollOffset:l=20,scrollToFirstStep:c=!1,steps:u}=this.props,d=th(this.props,u[t]),h=Ho(d.target),f=ait({isFirstStep:t===0,lifecycle:n,previousLifecycle:e.lifecycle,scrollToFirstStep:c,step:d,target:h});if(r===It.RUNNING&&f){const m=_1(h,i),y=Ly(h,i);let p=Math.floor(Jat(h,l,i))||0;hd({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:n},{key:"status",value:r}],debug:a});const x=this.store.getPopper("beacon"),v=this.store.getPopper("tooltip");if(n===St.BEACON&&x){const{offsets:b,placement:w}=x;!["bottom"].includes(w)&&!m&&(p=Math.floor(b.popper.top-l))}else if(n===St.TOOLTIP&&v){const{flipped:b,offsets:w,placement:S}=v;["top","right","left"].includes(S)&&!b&&!m?p=Math.floor(w.popper.top-l):p-=d.spotlightPadding}p=p>=0?p:0,r===It.RUNNING&&eit(p,{element:y,duration:o}).then(()=>{setTimeout(()=>{var b;(b=this.store.getPopper("tooltip"))==null||b.instance.update()},10)})}}render(){if(!Vl())return null;const{index:e,lifecycle:t,status:n}=this.state,{continuous:r=!1,debug:a=!1,nonce:i,scrollToFirstStep:o=!1,steps:l}=this.props,c=n===It.RUNNING,u={};
1000if(c&&l[e]){const d=th(this.props,l[e]);u.step=g.createElement(_it,{...this.state,callback:this.callback,continuous:r,debug:a,helpers:this.helpers,nonce:i,shouldScroll:!d.disableScrolling&&(e!==0||o),step:d,store:this.store}),u.overlay=g.createElement(yit,{id:"react-joyride-portal"},g.createElement(git,{...d,continuous:r,debug:a,lifecycle:t,onClickOverlay:this.handleClickOverlay}))}return g.createElement("div",{className:"react-joyride"},u.step,u.overlay)}};We(Tre,"defaultProps",lit);var Cit=Tre;const Eit=()=>{const{run:e,stepIndex:t,setStepIndex:n,completeTour:r,skipTour:a}=Hne(),i=[{target:"body",content:s.jsxs("div",{className:"space-y-3",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Welcome to Live Signals! 🎯"}),s.jsx("p",{children:"Track 12,000+ companies in real-time. Let's show you around!"})]}),placement:"center",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="first-card-upvote"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"Upvote Signals 👆"}),s.jsx("p",{children:"Upvote signals you find valuable. Help the community discover important company changes!"})]}),placement:"right",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="first-card-save"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"Save Companies ❤️"}),s.jsx("p",{children:"Save companies to your list for easy access later. Build your target account list!"})]}),placement:"bottom",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="analytics-link"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"Signal Analytics 📊"}),s.jsx("p",{children:"Analyze signal trends and discover insights to optimize your prospecting strategy."})]}),placement:"bottom",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="comments-section"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"Join the Conversation 💬"}),s.jsx("p",{children:"Comment on signals and discuss with 500+ sales professionals."})]}),placement:"top",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="filters"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"Filter Signals 🔍"}),s.jsx("p",{children:"Filter by signal type, industry, or search for specific companies."})]}),placement:"bottom",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="auto-prospecting-button"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"AI Auto-Prospecting ⚡"}),s.jsx("p",{children:"Let AI find perfect matches automatically based on your ideal customer profile!"})]}),placement:"bottom",disableBeacon:!0,spotlightClicks:!0},{target:'[data-tour="newsletter-link"]',content:s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"font-semibold",children:"Subscribe to Newsletter 📧"}),s.jsx("p",{children:"Get weekly signal insights and prospecting tips delivered to your inbox!"})]}),placement:"bottom",disableBeacon:!0,spotlightClicks:!0}],o=l=>{const{status:c,index:u,action:d,type:h}=l;if(c===It.FINISHED||c===It.SKIPPED){r();return}if(d==="close"){a();return}if(h==="error:target_not_found"){console.log("Target not found at step",u,"- skipping to next");const f=u+1;f<i.length?n(f):r();return}if(h==="step:after"){const f=u+(d==="next"?1:d==="prev"?-1:0);n(f)}};return s.jsx(Cit,{steps:i,run:e,stepIndex:t,continuous:!0,showProgress:!0,showSkipButton:!0,scrollToFirstStep:!0,disableOverlayClose:!0,disableScrolling:!1,spotlightPadding:4,callback:o,styles:{options:{primaryColor:"hsl(var(--primary))",zIndex:1e4},tooltip:{borderRadius:8,fontSize:14},buttonNext:{backgroundColor:"hsl(var(--primary))",borderRadius:6,padding:"8px 16px"},buttonBack:{color:"hsl(var(--muted-foreground))",marginRight:8},buttonSkip:{color:"hsl(var(--muted-foreground))"}},locale:{back:"Back",close:"Close",last:"Finish",next:"Next",skip:"Skip tour"}})},aC=768;function TI(){const[e,t]=g.useState(void 0);return g.useEffect(()=>{const n=window.matchMedia(`(max-width: ${aC-1}px)`),r=()=>{t(window.innerWidth<aC)};return n.addEventListener("change",r),t(window.innerWidth<aC),()=>n.removeEventListener("change",r)},[]),!!e}const kit=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(!0),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(!0),[d,h]=g.useState(!1),[f,m]=g.useState(new Date),[y,p]=g.useState(1),[x,v]=g.useState(0),[b,w]=g.useState(!0),[S,j]=g.useState(0),[N,C]=g.useState(0),[_,A]=g.useState(0),[P,R]=g.useState({}),[I,B]=g.useState("daily"),[$,q]=g.useState(7),[L,k]=g.useState(2025),[T,F]=g.useState("all"),[O,E]=g.useState("newest"),[D,M]=g.useState(""),[X,W]=g.useState([]),[re,ne]=g.useState(!1),{user:le,subscribed:ie,subscriptionTier:ye}=Ie(),{toast:pe}=Ve(),{incrementRequestCount:G,showEmailSignup:Pe,resetRequestCount:J}=us(),{showCaptcha:oe,currentProblem:se,isLoading:je,initiateCaptcha:Ce,solveCaptcha:ut,resetCaptcha:Ze}=Rt(),Ye=TI(),Zt=25;g.useEffect(()=>{if(!le)return;const Me=K.channel("signals-updates").on("postgres_changes",{event:"INSERT",schema:"public",table:"signals_feed"},Xe=>{var ir;console.log("New signal added:",Xe),I==="daily"&&((ir=Xe.new)==null?void 0:ir.signal_date)===f.toISOString().split("T")[0]&&(pe({title:"New Signal Added!",description:`${Xe.new.company_name} - ${Xe.new.signal_type}`,variant:"default"}),Nn(),y===1&&Yt(!0,1))}).subscribe();return()=>{K.removeChannel(Me)}},[le,I,f,y,pe]);const Yt=async(Me=!1,Xe,ir)=>{try{Me?(r(!0),h(!0),t([]),p(Xe||1),Xe===1&&R({})):i(!0);const He=Zt;let rt={};I==="daily"?rt={date:f.toISOString().split("T")[0]}:I==="monthly"?rt={month:$+1,year:L}:I==="yearly"&&(rt={year:L}),T!=="all"&&(rt.signal_type=T),O!=="newest"&&(rt.sort_by=O);let Wt=[];if(I==="monthly"||I==="yearly"){let ta=0,Gr=!0;const ka=1e3;for(console.log(`Starting chunked fetch for ${I} view...`);Gr;){const Qc={...rt,limit:ka,offset:ta};console.log(`Fetching chunk with offset ${ta}...`);const{data:Yx,error:qm}=await K.functions.invoke("fetch-signals",{body:Qc});if(qm)throw console.error("Edge function error:",qm),new Error(`Edge function error: ${qm.message}`);if(!Yx)throw new Error("No response from edge function");const{signals:na=[],hasMore:Xx=!1}=Yx;if(Wt=[...Wt,...na],console.log(`Fetched ${na.length} signals, total so far: ${Wt.length}`),Gr=Xx&&na.length===ka,ta+=ka,ta>5e4){console.warn("Reached safety limit of 50,000 records");break}}console.log(`Chunked fetch complete. Total signals: ${Wt.length}`)}else{const ta={...rt,limit:2e3};console.log("Calling fetch-signals with:",ta);const{data:Gr,error:ka}=await K.functions.invoke("fetch-signals",{body:ta});if(console.log("fetch-signals response:",{response:Gr,error:ka}),ka)throw console.error("Edge function error:",ka),new Error(`Edge function error: ${ka.message}`);if(!Gr)throw new Error("No response from edge function");const{signals:Qc=[]}=Gr;Wt=Qc}const Hr=Wt,Or=Hr.length,_t=(Xe?Xe-1:y-1)*Zt,ea=_t+Zt,cn=Hr.slice(_t,ea);console.log("Pagination Debug:",{viewMode:I,signalsLength:cn.length,currentPage:Xe||y,totalRecords:Or,totalPages:Math.ceil(Or/Zt),startIndex:_t,endIndex:ea});let Gx=cn||[];if(le&&(cn==null?void 0:cn.length)>0)try{const ta=cn.map(ka=>
1000ka.company_id).filter(Boolean),{data:Gr}=await K.from("signals_feed").select("id, company_id").in("company_id",ta);if((Gr==null?void 0:Gr.length)>0){const ka=Gr.map(na=>na.id),{data:Qc}=await K.from("signal_upvotes").select("signal_id").eq("user_id",le.id).in("signal_id",ka),Yx=new Set((Qc==null?void 0:Qc.map(na=>na.signal_id))||[]),qm=new Map(Gr.map(na=>[na.company_id,na.id]));Gx=cn.map(na=>{const Xx=qm.get(na.company_id);return{...na,user_upvoted:Xx?Yx.has(Xx):!1}})}}catch{Gx=cn}const Kx=I==="daily"?Gx||[]:(Gx||[]).filter(ta=>{const Gr=new Date(ta.signal_date);return I==="monthly"?Gr.getMonth()===$&&Gr.getFullYear()===L:I==="yearly"?Gr.getFullYear()===L:!0});t(Kx),Xe&&p(Xe),w(!1),A(Or),!le&&(Kx==null?void 0:Kx.length)>0&&G()}catch(He){console.error("fetchSignals error details:",He),pe({title:"Service temporarily unavailable",description:`Error: ${He.message||"Please try again in a moment."}`,variant:"destructive"})}finally{r(!1),i(!1),h(!1)}},Nn=async()=>{try{u(!0),console.log("Fetching signal counts...");const{data:Me,error:Xe}=await K.functions.invoke("fetch-signals",{body:{get_counts:!0}});if(console.log("Counts response:",{response:Me,error:Xe}),Xe){console.error("Error fetching counts:",Xe);return}Me&&(j(Me.totalSignalsToday||0),C(Me.totalSignalsThisMonth||0),console.log(`Counts updated - Today: ${Me.totalSignalsToday}, Month: ${Me.totalSignalsThisMonth}`))}catch(Me){console.error("Error in fetchSignalCounts:",Me)}finally{u(!1)}},Z=async()=>{l(!0);try{await Yt(!0),await Nn(),pe({title:"Refreshed Successfully",description:"Fetched the latest signals."})}catch{pe({title:"Refresh Failed",description:"Failed to refresh signals. Please try again.",variant:"destructive"})}finally{l(!1)}},V=()=>{Ze(),v(Me=>Me+1),Yt(!1)},H=async Me=>{var ir,He,rt,Wt,Hr,Or;if(!le){pe({title:"Authentication required",description:"Please sign in to upvote signals.",variant:"destructive"});return}const Xe=e.find(_t=>_t.id===Me);if(!Xe){pe({title:"Error",description:"Signal not found.",variant:"destructive"});return}try{if(!Xe.company_id){pe({title:"Error",description:"This signal is missing required data. Please try refreshing the page.",variant:"destructive"});return}t(e.map(cn=>cn.id===Me?{...cn,user_upvoted:!cn.user_upvoted}:cn));const{data:_t,error:ea}=await K.functions.invoke("upvote-signal",{body:{airtable_id:Xe.company_id,user_id:le.id}});if(ea)throw console.error("Upvote error:",ea),t(e.map(cn=>cn.id===Me?{...cn,user_upvoted:Xe.user_upvoted}:cn)),ea;_t&&_t.success?(t(e.map(cn=>cn.id===Me?{...cn,upvote_count:_t.new_upvote_count,user_upvoted:_t.user_upvoted}:cn)),pe({title:_t.user_upvoted?"Signal upvoted":"Upvote removed",description:_t.user_upvoted?"Thank you for your feedback!":"Your upvote has been removed."})):_t&&_t.error&&(t(e.map(cn=>cn.id===Me?{...cn,user_upvoted:Xe.user_upvoted}:cn)),pe({title:"Error",description:_t.error.includes("not found")?"This signal is being synced. Please try again in a moment.":_t.error,variant:"destructive"}))}catch(_t){console.error("Upvote error:",_t),t(e.map(cn=>cn.id===Me?{...cn,user_upvoted:Xe.user_upvoted}:cn));let ea="Please try again in a moment.";(ir=_t==null?void 0:_t.message)!=null&&ir.includes("not found")||(He=_t==null?void 0:_t.message)!=null&&He.includes("404")?ea="This signal is being synced to our database. Please try again in a moment.":(rt=_t==null?void 0:_t.message)!=null&&rt.includes("unauthorized")||(Wt=_t==null?void 0:_t.message)!=null&&Wt.includes("401")?ea="Please sign in again to vote on signals.":((Hr=_t==null?void 0:_t.message)!=null&&Hr.includes("network")||(Or=_t==null?void 0:_t.message)!=null&&Or.includes("fetch"))&&(ea="Network error. Please check your connection and try again."),pe({title:"Upvote in progress",description:ea,variant:"default"})}},ae=Me=>{if(console.log("handlePageChange called with page:",Me),!n){if(!le){pe({title:"Sign in required",description:"Please sign in to browse more pages.",variant:"destructive"});return}if(!(le&&!ie&&Me%2===0&&Ce("signals_pagination",2))){if(Me===1){p(1),R({}),Yt(!0,1);return}p(Me),Yt(!0,Me)}}};g.useEffect(()=>{v(0),R({}),p(1),Yt(!0,1),Nn()},[f,$,L,I,T,O,le]);const be=Me=>{F(Me)},Re=Me=>{E(Me)},Oe=()=>{F("all"),E("newest"),M(""),W([])},vt=async Me=>{if(M(Me),!Me.trim()){W([]),ne(!1);return}ne(!0);try{const{data:Xe,error:ir}=await K.functions.invoke("search-signals",{body:{query:Me,limit:500}});if(ir)throw ir;const He=(Xe.signals||[]).map(rt=>({id:rt.company_id||rt.id,db_id:rt.id,company_id:rt.company_id||rt.id,company_name:rt.company_name||"",company_domain:rt.company_domain||"",company_logo_url:rt.company_logo_url||"",company_url:rt.company_url||`https://${rt.company_domain}`,signal_type:rt.signal_type||"",signal_title:rt.signal_title||"",signal_description:rt.signal_description||"",signal_date:rt.signal_date||"",country:rt.country||"",industry:rt.industry||"",upvote_count:rt.upvote_count||0,user_upvoted:!1}));W(He)}catch(Xe){console.error("Search error:",Xe),pe({title:"Search error",description:"Failed to search signals. Please try again.",variant:"destructive"}),W([])}finally{ne(!1)}},qt=D?X:e,li=()=>{J()};return s.jsx(kr,{children:s.jsxs(Prt,{children:[s.jsx(Eit,{}),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Frt,{isLoading:n||d||o}),s.jsx(ri,{title:"Live Startup Signals - Real-time Company Intelligence | TechSignals",description:"Discover the latest startup signals, funding announcements, product launches, and hiring spikes. Get real-time intelligence on emerging companies and growth opportunities.",keywords:"startup signals, company intelligence, startup funding, product launches, hiring trends, business development, startup tracking",canonicalUrl:`${window.location.origin}/signals`,structuredData:{"@context":"https://schema.org","@type":"WebPage",name:"Live Startup Signals",description:"Real-time startup signals and company intelligence",url:`${window.location.origin}/signals`}}),s.jsx(Ee,{}),s.jsx("main",{className:"pt-24 pb-16",children:s.jsx("div",{className:"container mx-auto px-4 py-8",children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[Ye&&s.jsx("div",{className:"lg:hidden mb-6",children:s.jsx(FB,{currentDate:f,viewMode:I,onViewModeChange:Me=>{if((Me==="monthly"||Me==="yearly")&&!ie){pe({title:"Premium Feature",description:"Upgrade to access historical signals.",action:s.jsx(U,{onClick:()=>window.open("/pricing","_blank"),size:"sm",children:"View Plans"})});return}B(Me)},onDateChange:m,selectedMonth:$,selectedYear:L,onMonthChange:Me=>{if(!ie){pe({title:"Premium Feature",description:"Upgrade to access historical data.",action:s.jsx(U,{onClick:()=>window.open("/pricing","_blank"),size:"sm",children:"Upgrade"})});return}q(Me)},onYearChange:Me=>{if(!ie){pe({title:"Premium Feature",description:"Upgrade to access historical data.",action:s.jsx(U,{onClick:()=>window.open("/pricing","_blank"),size:"sm",children:"Upgrade"})});return}k(Me)},isMobile:!0})}),s.jsx("aside",{className:"hidden lg:block lg:w-80 flex-shrink-0",children:s.jsx(FB,{currentDate:f,viewMode:I,onViewModeChange:Me=>{if((Me==="monthly"||Me==="yearly")&&!ie){pe({title:"Premium Feature",description:"Upgrade to access historical signals.",action:s.jsx(U,{onClick:()=>window.open("/pricing","_blank"),size:"sm",children:"View Plans"})});return}B(Me)},onDateChange:m,selectedMonth:$,selectedYear:L,onMonthChange:q,onYearChange:k})}),s.jsxs("main",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"mb-6 sm:mb-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Live Startup Signals"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Discover real-time startup activities and growth signals"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs(U,{onClick:()=>window.location.href="/signal-analytics",variant:"default",size:Ye?"sm":"default",className:"flex items-center gap-2","data-tour":"analytics-link",children:[s.jsx(os,{className:"w-4 h-4"}),Ye?"Analytics":"View Analytics"]}),s.jsx("a",{href:"https://hello.rohansingh.io/signals",target:"_blank",rel:"noopener noreferrer",className:`inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors ${Ye?"h-9 px-3 text-sm":"h-10 px-4 text-sm"} bg-agency-accent text-white hover:opacity-90 shadow`,"aria-label":"Add Signals (opens in a new tab)","data-tour":"auto-prospecting-button",children:"Add Signals"}),s.jsx("a",{href:"https://substack.com/@rohansinghio?utm_campaign=profile&utm_medium=profile-page",target:"_blank",rel:"noopener noreferrer",className:`inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors ${Ye?"h-9 px-3 text-sm":"h-10 px-4 text-sm"} bg-agency-accent text-white hover:opacity-90 shadow`,"aria-label":"Newsletter (opens in a new tab)","data-tour":"newsletter-link",children:"Newsletter"}),s.jsxs(U,{onClick:Z,disabled:o,variant:"outline",size:Ye?"sm":"default",className:"flex items-center gap-2",children:[s.jsx(dt,{className:`w-4 h-4 ${o?"animate-spin":""}`}),Ye?"":"Refresh"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Today's Signals"}),c?s.jsx("div",{className:"h-6 w-12 bg-muted animate-pulse rounded mt-1"}):s.jsx("p",{className:"text-xl sm:text-2xl font-bold",children:S})]}),s.jsx(sn,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"})]})}),s.jsx(Y,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"This Month"}),c?s.jsx("div",{className:"h-6 w-12 bg-muted animate-pulse rounded mt-1"}):s.jsx("p",{className:"text-xl sm:text-2xl font-bold",children:N})]}),s.jsx(ze,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"})]})}),s.jsx(Y,{className:"p-4 col-span-2 sm:col-span-1",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Records"}),n?s.jsx("div",{className:"h-6 w-16 bg-muted animate-pulse rounded mt-1"}):s.jsx("p",{className:"text-xl sm:text-2xl font-bold",children:_.toLocaleStr
1000ing()})]}),s.jsx(Br,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"})]})}),s.jsx(Y,{className:"p-4 col-span-2 sm:col-span-1",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Current Page"}),n?s.jsx("div",{className:"h-6 w-12 bg-muted animate-pulse rounded mt-1"}):s.jsxs("p",{className:"text-xl sm:text-2xl font-bold",children:[y," / ",Math.ceil(_/Zt)]})]}),s.jsx(os,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"})]})})]})]}),s.jsx("div",{className:"mb-6",children:s.jsx(Drt,{})}),d?s.jsx("div",{className:"mb-6 p-4 bg-muted animate-pulse rounded-lg",children:s.jsxs("div",{className:"flex gap-4",children:[s.jsx("div",{className:"h-10 w-32 bg-background rounded"}),s.jsx("div",{className:"h-10 w-32 bg-background rounded"}),s.jsx("div",{className:"h-10 w-24 bg-background rounded"})]})}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-4","data-tour":"filters",children:!ie&&!le?s.jsxs(s.Fragment,{children:[s.jsx(UB,{value:"",onChange:()=>{pe({title:"Premium Feature 🔒",description:"Sign in or upgrade to search signals.",action:s.jsx(U,{onClick:()=>window.open("/pricing","_blank"),size:"sm",children:"View Plans"})})},resultsCount:0,className:"mb-4"}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm z-10 rounded-lg flex items-center justify-center",children:s.jsxs(Y,{className:"p-6 max-w-md",children:[s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"🔒 Premium Feature"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Filters and search are available to subscribed users"}),s.jsx(U,{onClick:()=>window.open("/pricing","_blank"),className:"w-full",children:"View Plans"})]})}),s.jsx(zB,{selectedSignalType:T,selectedSortBy:O,onSignalTypeChange:()=>{},onSortByChange:()=>{},onClearFilters:()=>{}})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(UB,{value:D,onChange:Me=>{M(Me),vt(Me)},resultsCount:qt.length,className:"mb-4"}),s.jsx(zB,{selectedSignalType:T,selectedSortBy:O,onSignalTypeChange:be,onSortByChange:Re,onClearFilters:Oe})]})}),d&&s.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:s.jsx(Brt,{isLoading:d,filterName:"signals",count:e.length})})]}),n?s.jsx("div",{className:"space-y-6",children:Array.from({length:6}).map((Me,Xe)=>s.jsx($rt,{},Xe))}):qt.length>0?s.jsxs("div",{className:"space-y-4 mb-8",children:[qt.map((Me,Xe)=>s.jsx(xK,{signal:Me,rank:Xe+1+(y-1)*Zt,onUpvote:H,isFirst:Xe===0},Me.id)),Math.ceil(_/Zt)>1&&s.jsx(Irt,{currentPage:y,totalPages:Math.ceil(_/Zt),totalRecords:_,isSubscribed:!!ie,isAuthenticated:!!le,onPageChange:ae,isLoading:n||a})]}):s.jsx(Lrt,{viewMode:I,selectedDate:I==="daily"?f:void 0,selectedMonth:I==="monthly"?$:void 0,selectedYear:I==="monthly"||I==="yearly"?L:void 0,onRefresh:Z,isRefreshing:o})]})]})})}),s.jsx(wt,{}),oe&&se&&s.jsx(Ot,{isOpen:oe,question:se.question,isLoading:je,onSolve:(Me,Xe,ir)=>ut(Me,Xe||V,ir||(()=>{pe({title:"Incorrect Answer",description:"Please try again.",variant:"destructive"})})),onClose:Ze})]}),s.jsx(Sd,{isOpen:Pe&&!le,onAuthSuccess:li})]})})},Pit=({signals:e,loading:t=!1,timeframe:n})=>{const r=TI(),a=S1(),i=g.useMemo(()=>{if(!(e!=null&&e.length))return{chart:[],breakdown:[]};const o=dd(e,n);console.info(`Signal filtering for ${n}:`,{originalCount:e.length,filteredCount:o.length,timeframe:n,sampleDates:o.slice(0,3).map(h=>h.signal_date),distinctTypes:[...new Set(o.map(h=>h.signal_type))].length});const l={};CT.forEach(h=>{l[h]=0}),o.forEach(h=>{const f=Zf(h.signal_type);f!=="Other"&&(l[f]=(l[f]||0)+1)});const c=o.length,u=Object.entries(l).filter(([h,f])=>f>0).map(([h,f],m)=>({name:h,value:f,color:m<5?[a.primaryHSL,a.light,a.lighter,a.opacity80,a.opacity60][m]:`hsl(${25+m*30%360}, 70%, 60%)`,percentage:(f/c*100).toFixed(1)})).sort((h,f)=>f.value-h.value),d=CT.map(h=>({name:h,value:l[h],percentage:c>0?(l[h]/c*100).toFixed(1):"0.0",description:Trt[h]||"No description available"})).sort((h,f)=>f.value-h.value);return{chart:u,breakdown:d}},[e,n,a]);return t?s.jsxs(Y,{className:"col-span-full",children:[s.jsx(xe,{children:s.jsx("div",{className:"h-6 bg-muted rounded w-2/3 animate-pulse"})}),s.jsx(te,{children:s.jsx("div",{className:"h-96 bg-muted rounded animate-pulse"})})]}):!i.chart.length&&!t?s.jsxs(Y,{className:"col-span-full",children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(rD,{className:"w-5 h-5"}),"Signal Type Distribution"]})}),s.jsx(te,{children:s.jsx("div",{className:"h-96 flex items-center justify-center text-muted-foreground",children:n==="today"?"No signals detected today yet. Check back later or try a different timeframe.":`No signal data available for ${n==="all"?"the selected period":n}`})})]}):s.jsxs(Y,{className:"col-span-full",children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(rD,{className:"w-5 h-5"}),"Signal Type Distribution"]}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",dd(e,n
1000).length," signals for ",n==="all"?"all time":n]})]}),s.jsx(te,{children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx(Oc,{width:"100%",height:r?300:400,children:s.jsxs(UR,{children:[s.jsx(zi,{data:i.chart,cx:"50%",cy:"50%",innerRadius:r?50:70,outerRadius:r?100:140,dataKey:"value",label:!1,children:i.chart.map((o,l)=>s.jsx(Om,{fill:o.color},`cell-${l}`))}),s.jsx(Dr,{formatter:(o,l)=>[`${o} signals`,l],labelFormatter:o=>`${o}`,contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}})]})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h5",{className:"font-medium text-sm",children:"Active Signal Types"}),s.jsx("div",{className:"grid grid-cols-1 gap-2 max-h-40 overflow-y-auto",children:i.chart.map((o,l)=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o.color}}),s.jsx("span",{className:"truncate",children:o.name})]}),s.jsxs("span",{className:"font-medium",children:[o.percentage,"%"]})]},l))})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold text-sm text-muted-foreground uppercase tracking-wide",children:"Complete Signal Breakdown"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Share of signals in the selected ",n==="all"?"period":n]}),s.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:i.breakdown.map((o,l)=>{var c;return s.jsxs("div",{className:"flex items-start justify-between p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[s.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[s.jsx("div",{className:"w-4 h-4 rounded-full mt-0.5 flex-shrink-0",style:{backgroundColor:o.value>0&&((c=i.chart.find(u=>u.name===o.name))==null?void 0:c.color)||a.opacity20}}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-medium text-sm truncate",children:o.name}),s.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:o.description})]})]}),s.jsxs("div",{className:"text-right flex-shrink-0 ml-3",children:[s.jsx("div",{className:"font-bold",children:o.value}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[o.percentage,"%"]})]})]},l)})})]})]})})]})},Tit=({signals:e,loading:t=!1,timeframe:n})=>{const r=S1(),a=g.useMemo(()=>{if(!(e!=null&&e.length))return[];const i=dd(e,n),{start:o,end:l}=Gne(i,n),c=yx({start:o,end:l}),d=[...new Set(i.map(f=>f.signal_type))].filter(Boolean).map(Zf);return[...new Set(d)].filter(f=>f!=="Other"&&!f.includes("Recently Funded - Venture - Series Unknown")&&!f.includes("Unknown")).map(f=>{const m=i.filter(v=>Zf(v.signal_type)===f),y=m.reduce((v,b)=>{const w=String(b.signal_date||"").slice(0,10);return v[w]=(v[w]||0)+1,v},{}),p=c.map(v=>{const b=kt(v,"yyyy-MM-dd");return{date:b,displayDate:kt(v,"MMM dd"),count:y[b]||0}}),x=p.length;if(x>=14){const v=p.slice(-7).reduce((S,j)=>S+j.count,0),b=p.slice(-14,-7).reduce((S,j)=>S+j.count,0),w=b>0?(v-b)/b*100:0;return{signalType:f,displayName:f,chartData:p,totalCount:m.length,trend:w,avgDaily:m.length/Math.max(x,1)}}return{signalType:f,displayName:f,chartData:p,totalCount:m.length,trend:0,avgDaily:m.length/Math.max(x,1)}}).sort((f,m)=>m.totalCount-f.totalCount)},[e,n,r]);return t?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[...Array(6)].map((i,o)=>s.jsxs(Y,{className:"animate-pulse",children:[s.jsx(xe,{children:s.jsx("div",{className:"h-6 bg-muted rounded w-2/3"})}),s.jsx(te,{children:s.jsx("div",{className:"h-48 bg-muted rounded"})})]},o))}):a.length?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h3",{className:"text-xl font-semibold flex items-center gap-2",children:[s.jsx(os,{className:"w-5 h-5"}),"Individual Signal Type Analysis"]}),s.jsxs("p",{className:"text-muted-foreground",children:["Detailed breakdown of each signal type for ",n==="all"?"all available data":n]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:a.map((i,o)=>s.jsxs(Y,{className:"transition-all hover:shadow-lg",children:[s.jsxs(xe,{className:"pb-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Se,{className:"text-lg",children:i.displayName}),s.jsxs("div",{className:"flex items-center gap-2",children:[i.trend>0?s.jsx(ze,{className:"w-4 h-4 text-green-600"}):i.trend<0?s.jsx(DA,{className:"w-4 h-4 text-red-600"}):null,s.jsxs(fe,{variant:"secondary",children:[i.totalCount," total"]})]})]}),s.jsxs("div",{className:"flex gap-4 text-sm text-muted-foreground",children:[s.jsxs("span",{children:["Avg: ",i.avgDaily.toFixed(1),"/day"]}),s.jsxs("span",{className:i.trend>0?"text-green-600":i.trend<0?"text-red-600":"",children:[i.trend>0?"+":"",i.trend.toFixed(1),"% vs prev week"]})]})]}),s.jsx(te,{children:s.jsx(Oc,{width:"100%",height:200,children:s.jsxs(h1,{data:i.chartData,children:[s.jsx(u1,{strokeDasharray:"3 3"}),s.jsx(vl,{dataKey:"displayDate",tick:{fontSize:12},interval:"preserveStartEnd"}),s.jsx(bl,{}),s.jsx(Dr,{labelFormatter:l=>`Date: ${l}`,formatter:l=>[l,"Signals"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),s.jsx(ko,{dataKey:"count",fill:r.primary,className:"opacity-90 hover:opacity-100 transition-opacity",radius:[3,3,0,0]})]})})})]},o))})]}):s.jsx(Y,{children:s.jsx(te,{className:"py-8",children:s.jsx("div",{className:"text-center text-muted-foreground",children:"No signal data available"})})})},Ait=({signals:e,loading:t=!1,timeframe:n})=>{var l;const r=g.useMemo(()=>
1000{if(!(e!=null&&e.length))return{hourlyData:[],weeklyData:[]};const c=dd(e,n),u=c.length,d=Math.floor(u/24),h=Array.from({length:24},(y,p)=>{const x=Math.floor(Math.random()*(d*.4))-d*.2,v=Math.max(0,d+x);return{hour:p,displayHour:p===0?"12AM":p===12?"12PM":p>12?`${p-12}PM`:`${p}AM`,count:p>=9&&p<=17?Math.floor(v*1.5):v}}),f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=Array.from({length:7},(y,p)=>{const x=c.filter(v=>{const b=String(v.signal_date||"").slice(0,10),w=eje(b);return GSe(w)===p});return{day:p,displayDay:f[p],count:x.length}});return{hourlyData:h,weeklyData:m}},[e,n]),a=(c,u)=>{if(c===0)return"bg-muted/30 text-muted-foreground";const d=c/u;return d<=.2?"bg-orange-100 text-orange-800 font-medium":d<=.4?"bg-orange-200 text-orange-800 font-medium":d<=.6?"bg-orange-300 text-orange-800 font-medium":d<=.8?"bg-orange-400 text-orange-900 font-semibold":"bg-orange-500 text-white font-semibold"};if(t)return s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx("div",{className:"h-6 bg-muted rounded w-2/3 animate-pulse"})}),s.jsx(te,{children:s.jsx("div",{className:"h-64 bg-muted rounded animate-pulse"})})]});const i=Math.max(...r.hourlyData.map(c=>c.count)),o=Math.max(...r.weeklyData.map(c=>c.count));return s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(sn,{className:"w-5 h-5"}),"Signal Activity Patterns"]}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Heat map showing when signals are most active"})]}),s.jsxs(te,{className:"space-y-8",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Xn,{className:"w-4 h-4"}),s.jsx("h4",{className:"font-medium",children:"Activity by Day of Week"})]}),s.jsx("div",{className:"grid grid-cols-7 gap-2",children:r.weeklyData.map((c,u)=>s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:c.displayDay.slice(0,3)}),s.jsx("div",{className:`h-16 rounded-lg flex items-center justify-center transition-all hover:scale-105 ${a(c.count,o)}`,title:`${c.displayDay}: ${c.count} signals`,children:s.jsx("span",{className:"text-sm font-semibold",children:c.count})})]},u))})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Xn,{className:"w-4 h-4"}),s.jsx("h4",{className:"font-medium",children:"Activity by Hour (Estimated)"})]}),s.jsx("div",{className:"grid grid-cols-6 sm:grid-cols-8 md:grid-cols-12 gap-2",children:r.hourlyData.map((c,u)=>s.jsxs("div",{className:"text-center space-y-1",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:c.displayHour.replace(" ","")}),s.jsx("div",{className:`h-12 rounded-md flex items-center justify-center transition-all hover:scale-105 ${a(c.count,i)}`,title:`${c.displayHour}: ${c.count} signals`,children:s.jsx("span",{className:"text-xs font-medium",children:c.count})})]},u))})]}),s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"Less"}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("div",{className:"w-3 h-3 rounded-sm bg-muted/20"}),s.jsx("div",{className:"w-3 h-3 rounded-sm bg-orange-100"}),s.jsx("div",{className:"w-3 h-3 rounded-sm bg-orange-200"}),s.jsx("div",{className:"w-3 h-3 rounded-sm bg-orange-300"}),s.jsx("div",{className:"w-3 h-3 rounded-sm bg-orange-400"}),s.jsx("div",{className:"w-3 h-3 rounded-sm bg-orange-500"})]}),s.jsx("span",{className:"text-muted-foreground",children:"More"})]}),s.jsxs(fe,{variant:"outline",children:["Peak: ",(l=r.weeklyData.find(c=>c.count===o))==null?void 0:l.displayDay]})]})]})]})},Oit=({signals:e,loading:t=!1,limit:n=10,timeframe:r})=>{const a=g.useMemo(()=>{if(!(e!=null&&e.length))return[];const o=dd(e,r).reduce((l,c)=>{const u=c.company_name;if(!u||u==="Example Company")return l;l[u]||(l[u]={company_name:u,company_domain:c.company_domain,company_logo_url:c.company_logo_url,signals:[],signal_types:new Set}),l[u].signals.push(c);const d=Zf(c.signal_type);return d!=="Other"&&l[u].signal_types.add(d),l},{});return Object.values(o).map(l=>({...l,signal_count:l.signals.length,signal_types_count:l.signal_types.size,signal_types_array:Array.from(l.signal_types),recent_signals:l.signals.sort((c,u)=>new Date(u.signal_date).getTime()-new Date(c.signal_date).getTime()).slice(0,3)})).sort((l,c)=>c.signal_count-l.signal_count).slice(0,n)},[e,n,r]);return t?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx("div",{className:"h-6 bg-muted rounded w-2/3 animate-pulse"})}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:[...Array(5)].map((i,o)=>s.jsxs("div",{className:"flex items-center gap-4 p-4 animate-pulse",children:[s.jsx("div",{className:"w-12 h-12 bg-muted rounded-full"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx("div",{className:"h-4 bg-muted rounded w-2/3"}),s.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),s.jsx("div",{className:"h-8 bg-muted rounded w-16"})]},o))})})]}):a.length?s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-5 h-5"}),"Top Companies by Signal Activity"]}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Companies generating the most market signals"})]}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:a.map((i,o)=>{var l;return s.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border bg-card hover:bg-muted/30 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary text-primary-foreground text-sm font-bold",children:o+1}),s.jsxs(Ks,{className:"w-12 h-12",children:[s.jsx(ni,{src:i.company_logo_url,alt:`${i.company_name} logo`}),s.jsx(Ys,{children:i.company_name.slice(0,2).toUpperCase()})]})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h4",{className:"font-semibold truncate",children:i.company_name}),i.company_domain&&s.jsx(U,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>window.open(`https://${i.company_domain}`,"_blank"),children:s.jsx(ar,{className:"w-3 h-3"})})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsxs("span",{children:[i.signal_types_count," signal types"]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Recent: ",(l=i.recent_signals[0])==null?void 0:l.signal_date]})]}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[i.signal_types_array.slice(0,3).map((c,u)=>s.jsx(fe,{variant:"secondary",className:"text-xs",children:c},u)),i.signal_types_array.length>3&&s.jsxs(fe,{variant:"outline",className:"text-xs",children:["+",i.signal_types_array.length-3," more"]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("div",{className:"flex items-center gap-1 text-lg font-bold",children:[s.jsx(ze,{className:"w-4 h-4 text-green-600"}),i.signal_count]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"signals"})]})]},o)})})})]}):s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-5 h-5"}),"Top Companies by Signal Activity"]})}),s.jsx(te,{children:s.jsx("div",{className:"text-center text-muted-foreground py-8",children:"No company data available"})})]})},Rit=({signals:e,loading:t=!1,timeframe:n})=>{const r=S1(),a=g.useMemo(()=>
1000{if(!(e!=null&&e.length))return[];const u=dd(e,n),{start:d,end:h}=Gne(u,n),f=u.reduce((y,p)=>{const x=String(p.signal_date||"").slice(0,10);return y[x]=(y[x]||0)+1,y},{});return yx({start:d,end:h}).map(y=>{const p=kt(y,"yyyy-MM-dd");return{date:p,displayDate:kt(y,"MMM dd"),count:f[p]||0}})},[e,n]),l=dd(e,n).length/Math.max(a.length,1),c=a.length>7?(a.slice(-7).reduce((u,d)=>u+d.count,0)-a.slice(-14,-7).reduce((u,d)=>u+d.count,0))/7:0;return t?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx("div",{className:"h-6 bg-muted rounded w-2/3 animate-pulse"})}),s.jsx(te,{children:s.jsx("div",{className:"h-80 bg-muted rounded animate-pulse"})})]}):s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(ze,{className:"w-5 h-5"}),"Daily Signal Volume"]}),s.jsxs("div",{className:"flex gap-4 text-sm text-muted-foreground",children:[s.jsxs("span",{children:["Avg: ",l.toFixed(1),"/day"]}),s.jsxs("span",{className:c>0?"text-green-600":c<0?"text-red-600":"",children:["Trend: ",c>0?"+":"",c.toFixed(1)]})]})]}),s.jsx(te,{children:s.jsx(Oc,{width:"100%",height:300,children:s.jsxs(mKe,{data:a,children:[s.jsx(u1,{strokeDasharray:"3 3"}),s.jsx(vl,{dataKey:"displayDate",tick:{fontSize:12},interval:"preserveStartEnd"}),s.jsx(bl,{}),s.jsx(Dr,{labelFormatter:u=>`Date: ${u}`,formatter:u=>[u,"Signals"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),s.jsx(Ox,{type:"monotone",dataKey:"count",stroke:r.primary,strokeWidth:3,dot:{fill:r.primary,r:4},activeDot:{r:6,fill:r.primary}})]})})})]})},Iit=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(!0),[a,i]=g.useState("month"),[o,l]=g.useState(0),[c,u]=g.useState(null),[d,h]=g.useState(),[f,m]=g.useState(!1);g.useEffect(()=>{const x=setInterval(()=>{l(v=>v+1)},6e5);return()=>clearInterval(x)},[]);const y=async()=>{try{r(!0);const x=[],v=1e3;let b=0,w=!0;for(console.info("Starting paginated fetch of signals data...");w;){let S=K.from("signals_feed").select("*").order("signal_date",{ascending:!1});f&&(d!=null&&d.from)&&(d!=null&&d.to)&&(S=S.gte("signal_date",kt(d.from,"yyyy-MM-dd")).lte("signal_date",kt(d.to,"yyyy-MM-dd")));const{data:j,error:N}=await S.range(b,b+v-1);if(N)throw N;j&&j.length>0?(x.push(...j),console.info(`Fetched page ${Math.floor(b/v)+1}: ${j.length} signals`),w=j.length===v,b+=v):w=!1}console.info(`Total signals fetched: ${x.length}`),t(x)}catch(x){console.error("Error fetching signals data:",x)}finally{r(!1)}};g.useEffect(()=>{(async()=>{const{data:{user:v}}=await K.auth.getUser();u(!!v)})()},[]),g.useEffect(()=>{y()},[o,f,d]);const p={title:"Signal Analytics - Comprehensive Market Intelligence Dashboard",description:"Advanced analytics and insights from thousands of market signals. Track trends, analyze patterns, and discover opportunities in real-time.",keywords:"signal analytics, market intelligence, business insights, trend analysis, market research",canonicalUrl:"https://faruse.com/signal-analytics"};return n&&e.length===0?s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-secondary/20",children:[s.jsx(kr,{children:s.jsx(ri,{...p})}),s.jsx(Ee,{}),s.jsx("div",{className:"container mx-auto px-4 pt-24 pb-8",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((x,v)=>s.jsxs(Y,{className:"animate-pulse",children:[s.jsx(xe,{children:s.jsx("div",{className:"h-4 bg-muted rounded w-3/4"})}),s.jsx(te,{children:s.jsx("div",{className:"h-64 bg-muted rounded"})})]},v))})}),s.jsx(wt,{})]}):s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-secondary/20",children:[s.jsx(kr,{children:s.jsx(ri,{...p})}),s.jsx(Ee,{}),s.jsxs("div",{className:"container mx-auto px-4 pt-24 pb-8",children:[s.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center mb-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-2",children:"Signal Analytics"}),s.jsxs("p",{className:"text-muted-foreground text-lg",children:["Comprehensive insights from ",e.length.toLocaleStr
1000ing()," market signals"]})]}),s.jsx("div",{className:"flex gap-4 mt-4 md:mt-0",children:s.jsxs(U,{onClick:()=>l(x=>x+1),variant:"outline",className:"flex items-center gap-2",children:[s.jsx(Br,{className:"w-4 h-4"}),"Refresh"]})})]}),c===!1&&s.jsxs(Cs,{className:"mb-6",children:[s.jsx(IA,{className:"h-4 w-4"}),s.jsx(Es,{children:"Not seeing all history? Log in to analyze the full dataset and unlock complete analytics."})]}),s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center",children:[s.jsx(_o,{value:f?"custom":a,onValueChange:x=>{x==="custom"?m(!0):(m(!1),i(x))},children:s.jsxs(Fi,{className:"grid w-full max-w-lg grid-cols-6",children:[s.jsx(yt,{value:"today",children:"Today"}),s.jsx(yt,{value:"week",children:"Week"}),s.jsx(yt,{value:"month",children:"Month"}),s.jsx(yt,{value:"year",children:"Year"}),s.jsx(yt,{value:"all",children:"All"}),s.jsx(yt,{value:"custom",children:"Custom"})]})}),f&&s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"flex items-center gap-2",children:[s.jsx(sn,{className:"w-4 h-4"}),d!=null&&d.from&&(d!=null&&d.to)?`${kt(d.from,"MMM dd")} - ${kt(d.to,"MMM dd, yyyy")}`:"Select date range"]})}),s.jsx(ll,{className:"w-auto p-4",align:"start",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-medium",children:"Quick ranges"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,7);h({from:v,to:x})},children:"Last 7 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,15);h({from:v,to:x})},children:"Last 15 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,30);h({from:v,to:x})},children:"Last 30 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,90);h({from:v,to:x})},children:"Last 90 days"})]})]}),s.jsx(cd,{mode:"range",selected:d,onSelect:h,numberOfMonths:2})]})})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"We started tracking signals since September 2025 onwards."})]}),s.jsxs("div",{className:"space-y-8",children:[s.jsx(Pit,{signals:e,loading:n,timeframe:f?"all":a}),s.jsx(Tit,{signals:e,loading:n,timeframe:f?"all":a}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsx(Rit,{signals:e,loading:n,timeframe:f?"all":a}),s.jsx(Ait,{signals:e,loading:n,timeframe:f?"all":a})]}),s.jsx(Oit,{signals:e,loading:n,timeframe:f?"all":a}),s.jsx(Y,{className:"hover:shadow-lg transition-shadow",children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-bold mb-2",children:"Explore Pitch Analytics"}),s.jsx("p",{className:"text-muted-foreground",children:"Discover service opportunities across companies. Analyze trending services, categories, and find companies needing your expertise."})]}),s.jsx(ee,{to:"/pitch-analytics",children:s.jsxs(U,{className:"flex items-center gap-2",children:[s.jsx(Tt,{className:"w-4 h-4"}),"View Pitch Analytics"]})})]})})})]})]}),s.jsx(wt,{})]})},Mit=({services:e,loading:t})=>{const n=TI(),r=g.useMemo(()=>{const i={};return e.forEach(o=>{const l=qR(o.service_name);i[l]=(i[l]||0)+1}),Object.entries(i).map(([o,l])=>({name:o,value:l,fill:T6[o]||T6["Other Services"]})).sort((o,l)=>l.value-o.value).slice(0,10)},[e]);if(t)return s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Service Category Distribution"})}),s.jsx(te,{children:s.jsx(Je,{className:"h-[400px] w-full"})})]});if(r.length===0)return s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Service Category Distribution"})}),s.jsx(te,{children:s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No data available"})})]});const a=r.reduce((i,o)=>i+o.value,0);return s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Service Category Distribution"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Breakdown of ",a.toLocaleStr
1000ing()," service opportunities by category"]})]}),s.jsx(te,{children:s.jsx(Oc,{width:"100%",height:n?300:400,children:s.jsxs(UR,{children:[s.jsx(zi,{data:r,cx:"50%",cy:"50%",labelLine:!n,label:n?void 0:({name:i,percent:o})=>`${i}: ${(o*100).toFixed(0)}%`,outerRadius:n?80:120,innerRadius:n?40:60,fill:"#8884d8",dataKey:"value",children:r.map((i,o)=>s.jsx(Om,{fill:i.fill},`cell-${o}`))}),s.jsx(Dr,{content:({active:i,payload:o})=>{if(i&&o&&o.length){const l=o[0],c=(l.value/a*100).toFixed(1);return s.jsxs("div",{className:"bg-background border border-border rounded-lg p-3 shadow-lg",children:[s.jsx("p",{className:"font-semibold",children:l.name}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.value," services (",c,"%)"]})]})}return null}}),!n&&s.jsx(Uu,{verticalAlign:"bottom",height:36,formatter:i=>{const o=r.find(l=>l.name===i);return`${i} (${(o==null?void 0:o.value)||0})`}})]})})})]})},Dit=({services:e,loading:t,timeframe:n})=>{const r=g.useMemo(()=>{if(e.length===0)return[];const{start:a,end:i}=xKe(e,n);let o=a;if(n==="all"){const d=$r(i,365);o<d&&(o=d)}const l=yx({start:o,end:i}),c={};return e.forEach(d=>{const h=d.service_name.trim(),f=kt(wo(new Date(d.created_at)),"yyyy-MM-dd");c[h]||(c[h]={}),c[h][f]=(c[h][f]||0)+1}),Object.entries(c).map(([d,h])=>{const f=l.map(w=>{const S=kt(w,"yyyy-MM-dd");return{date:kt(w,"MMM dd"),count:h[S]||0}}),m=Object.values(h).reduce((w,S)=>w+S,0),y=m/l.length,p=Math.floor(f.length/2),x=f.slice(0,p).reduce((w,S)=>w+S.count,0),v=f.slice(p).reduce((w,S)=>w+S.count,0),b=x>0?(v-x)/x*100:0;return{serviceName:d,displayName:d,chartData:f,totalCount:m,trend:b,avgDaily:y.toFixed(1)}}).sort((d,h)=>h.totalCount-d.totalCount).slice(0,100)},[e,n]);return t?s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Individual Service Type Analysis"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[...Array(6)].map((a,i)=>s.jsx(Je,{className:"h-64 w-full"},i))})]}):r.length===0?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Individual Service Type Analysis"})}),s.jsx(te,{children:s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No service data available"})})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Individual Service Type Analysis"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:r.map(a=>s.jsxs(Y,{className:"hover:shadow-lg transition-shadow",children:[s.jsxs(xe,{className:"pb-4",children:[s.jsxs(Se,{className:"text-lg flex items-center justify-between",children:[s.jsx("span",{className:"truncate",children:a.displayName}),s.jsx("span",{className:"text-2xl font-bold text-primary ml-2",children:a.totalCount})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[a.trend>=0?s.jsx(ze,{className:"w-4 h-4 text-green-600"}):s.jsx(DA,{className:"w-4 h-4 text-red-600"}),s.jsxs("span",{className:a.trend>=0?"text-green-600":"text-red-600",children:[Math.abs(a.trend).toFixed(1),"%"]})]}),s.jsxs("div",{children:["Avg: ",a.avgDaily,"/day"]})]})]}),s.jsx(te,{children:s.jsx(Oc,{width:"100%",height:150,children:s.jsxs(h1,{data:a.chartData,children:[s.jsx(vl,{dataKey:"date",tick:{fontSize:10},interval:"preserveStartEnd"}),s.jsx(bl,{tick:{fontSize:10}}),s.jsx(Dr,{content:({active:i,payload:o})=>i&&o&&o.length?s.jsxs("div",{className:"bg-background border border-border rounded-lg p-2 shadow-lg",children:[s.jsx("p",{className:"text-xs font-semibold",children:o[0].payload.date}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[o[0].value," services"]})]}):null}),s.jsx(ko,{dataKey:"count",fill:"hsl(25, 95%, 53%)",radius:[4,4,0,0]})]})})})]},a.serviceName))})]})},Lit=({services:e,loading:t})=>{const n=g.useMemo(()=>{const i=new Date,o=$r(i,90),l=yx({start:o,end:i}),c={};e.forEach(d=>{const h=kt(wo(new Date(d.created_at)),"yyyy-MM-dd");c[h]=(c[h]||0)+1});const u=Math.max(...Object.values(c),1);return l.map(d=>{const h=kt(d,"yyyy-MM-dd"),f=c[h]||0,m=f/u;return{date:h,displayDate:kt(d,"MMM dd"),count:f,intensity:m}})},[e]),r=i=>i===0?"bg-muted/30":i<.2?"bg-primary/20":i<.4?"bg-primary/40":i<.6?"bg-primary/60":i<.8?"bg-primary/80":"bg-primary";if(t)return s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Service Volume Heatmap"})}),s.jsx(te,{children:s.jsx(Je,{className:"h-[200px] w-full"})})]});if(n.length===0)return s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Service Volume Heatmap"})}),s.jsx(te,{children:s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No data available"})})]});const a=[];for(let i=0;i<n.length;i+=7)a.push(n.slice(i,i+7));return s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Service Volume Heatmap (Last 90 Days)"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Daily service recommendation de
1000nsity - darker colors indicate more services identified"})]}),s.jsx(te,{children:s.jsxs("div",{className:"overflow-x-auto",children:[s.jsx("div",{className:"space-y-1 min-w-[600px]",children:a.map((i,o)=>s.jsx("div",{className:"flex gap-1",children:i.map(l=>s.jsx("div",{className:`h-4 flex-1 rounded-sm ${r(l.intensity)} hover:ring-2 hover:ring-primary transition-all cursor-pointer group relative`,title:`${l.displayDate}: ${l.count} services`,children:s.jsxs("div",{className:"absolute hidden group-hover:block bg-background border border-border rounded p-2 shadow-lg -top-16 left-1/2 transform -translate-x-1/2 z-10 whitespace-nowrap",children:[s.jsx("p",{className:"text-xs font-semibold",children:l.displayDate}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[l.count," services"]})]})},l.date))},o))}),s.jsxs("div",{className:"flex items-center justify-between mt-4 text-xs text-muted-foreground",children:[s.jsx("span",{children:"Less activity"}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("div",{className:"h-4 w-4 bg-muted/30 rounded-sm"}),s.jsx("div",{className:"h-4 w-4 bg-primary/20 rounded-sm"}),s.jsx("div",{className:"h-4 w-4 bg-primary/40 rounded-sm"}),s.jsx("div",{className:"h-4 w-4 bg-primary/60 rounded-sm"}),s.jsx("div",{className:"h-4 w-4 bg-primary/80 rounded-sm"}),s.jsx("div",{className:"h-4 w-4 bg-primary rounded-sm"})]}),s.jsx("span",{children:"More activity"})]})]})})]})},$it=({services:e,loading:t,limit:n=20,timeframe:r})=>{const a=g.useMemo(()=>{const i={};return e.forEach(o=>{i[o.company_id]||(i[o.company_id]={id:o.company_id,name:o.company_name,domain:o.company_domain,logo:o.company_logo,service_count:0,services:new Set,categories:new Set});const l=i[o.company_id];l.service_count++,l.services.add(o.service_name),l.categories.add(qR(o.service_name))}),Object.values(i).sort((o,l)=>l.service_count-o.service_count).slice(0,n)},[e,n]);return t?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Top Companies by Service Opportunities"})}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:[...Array(5)].map((i,o)=>s.jsx(Je,{className:"h-20 w-full"},o))})})]}):a.length===0?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Top Companies by Service Opportunities"})}),s.jsx(te,{children:s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No company data available"})})]}):s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsxs(Se,{children:["Top ",a.length," Companies by Service Opportunities"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Companies with the most identified service needs"})]}),s.jsx(te,{children:s.jsx("div",{className:"space-y-4",children:a.map((i,o)=>s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg hover:bg-accent/50 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsxs("div",{className:"text-2xl font-bold text-muted-foreground w-8 flex-shrink-0",children:["#",o+1]}),s.jsxs(Ks,{className:"h-12 w-12 flex-shrink-0",children:[s.jsx(ni,{src:i.logo,alt:i.name}),s.jsx(Ys,{children:i.name.substring(0,2).toUpperCase()})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"font-semibold truncate",children:i.name}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("span",{className:"truncate",children:i.domain}),i.domain&&s.jsx("a",{href:`https://${i.domain}`,target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:s.jsx(ar,{className:"w-3 h-3"})})]}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[Array.from(i.categories).slice(0,3).map(l=>s.jsx(fe,{variant:"secondary",className:"text-xs",children:l},l)),i.categories.size>3&&s.jsxs(fe,{variant:"outline",className:"text-xs",children:["+",i.categories.size-3," more"]})]})]})]}),s.jsxs("div",{className:"flex items-center gap-4 flex-shrink-0",children:[s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-2xl font-bold text-primary",children:i.service_count}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"services"})]}),s.jsx(ee,{to:`/companies?search=${i.domain}`,children:s.jsx(U,{variant:"outline",size:"sm",children:"View"})})]})]},i.id))})})]})},Fit=({services:e,loading:t})=>{const n=g.useMemo(()=>{const r={};e.forEach(i=>
1000{const o=qR(i.service_name);r[o]||(r[o]={count:0,services:{}}),r[o].count++,r[o].services[i.service_name]=(r[o].services[i.service_name]||0)+1});const a=e.length;return Object.entries(r).map(([i,o])=>({category:i,count:o.count,percentage:(o.count/a*100).toFixed(1),topServices:Object.entries(o.services).sort((l,c)=>c[1]-l[1]).slice(0,5).map(([l,c])=>({name:l,count:c}))})).sort((i,o)=>o.count-i.count)},[e]);return t?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Service Category Breakdown"})}),s.jsx(te,{children:s.jsx(Je,{className:"h-[400px] w-full"})})]}):n.length===0?s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"Service Category Breakdown"})}),s.jsx(te,{children:s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No data available"})})]}):s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{children:"Service Category Breakdown"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Detailed analysis of service categories and top services within each"})]}),s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(cg,{children:[s.jsx(ug,{children:s.jsxs(Fo,{children:[s.jsx(Zn,{className:"w-[250px]",children:"Category"}),s.jsx(Zn,{className:"text-right",children:"Count"}),s.jsx(Zn,{className:"text-right",children:"% of Total"}),s.jsx(Zn,{children:"Top Services"})]})}),s.jsx(dg,{children:n.map(r=>s.jsxs(Fo,{children:[s.jsx(Jn,{className:"font-medium",children:r.category}),s.jsx(Jn,{className:"text-right font-semibold",children:r.count.toLocaleString()}),s.jsxs(Jn,{className:"text-right text-muted-foreground",children:[r.percentage,"%"]}),s.jsx(Jn,{children:s.jsx("div",{className:"flex flex-wrap gap-1",children:r.topServices.map((a,i)=>s.jsxs(fe,{variant:"outline",className:"text-xs",children:[a.name," (",a.count,")"]},i))})})]},r.category))})]})})})]})},Bit=()=>{const[e,t]=g.useState("month"),[n,r]=g.useState(0),[a,i]=g.useState(!1),[o,l]=g.useState(),[c,u]=g.useState(!1);g.useEffect(()=>{const x=setInterval(()=>{r(v=>v+1)},6e5);return()=>clearInterval(x)},[]),g.useEffect(()=>{(async()=>{const{data:{session:v}}=await K.auth.getSession();i(!!v)})()},[]);const d=async()=>{let x=[],v=0;const b=1e3;for(;;){const{data:w,error:S}=await K.from("company_overview").select("id, company_name, domain, logo_url, potential_services, tech_stack, categories, industry_tags, added_date").not("potential_services","is",null).order("added_date",{ascending:!1}).range(v,v+b-1);if(S)throw S;if(!w||w.length===0)break;const j=w.map(N=>({airtable_id:N.id,name:N.company_name||"",domain:N.domain||"",logo_url:N.logo_url||"",potential_services:N.potential_services||"",created_at:N.added_date||new Date().toISOString()}));if(x=[...x,...j],w.length<b)break;v+=b}return x},{data:h=[],isLoading:f}=ct({queryKey:["services-data",n],queryFn:d,staleTime:15*60*1e3,gcTime:30*60*1e3}),m=g.useMemo(()=>{const x=[];return h.forEach(v=>{N2(v.potential_services).forEach(w=>{x.push({service_name:w,company_id:v.airtable_id,company_name:v.name,company_domain:v.domain,company_logo:v.logo_url,created_at:v.created_at})})}),c&&(o!=null&&o.from)&&(o!=null&&o.to)?x.filter(v=>{const b=new Date(v.created_at);return JSe(b,{start:o.from,end:o.to})}):yKe(x,e)},[h,e,c,o]),y=m.length,p=new Set(m.map(x=>x.company_id)).size;return f?s.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-br from-background via-background to-secondary/20",children:[s.jsx(Ee,{}),s.jsx("div",{className:"flex-1 container mx-auto px-4 py-8 mt-16",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Je,{className:"h-32 w-full"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((x,v)=>s.jsx(Je,{className:"h-64 w-full"},v))})]})}),s.jsx(wt,{})]}):s.jsxs(s.Fragment,{children:[s.jsx(ri,{title:"Pitch Analytics - Discover Market Service Opportunities",description:"Analyze thousands of service opportunities across companies. Find trending services, explore categories, and discover companies that need your expertise.",canonicalUrl:"/pitch-analytics"}),s.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-br from-background via-background to-secondary/20",children:[s.jsx(Ee,{}),s.jsxs("div",{className:"flex-1 container mx-auto px-4 py-8 mt-16",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold mb-2 bg-gradient-to-r from-primary to-orange-600 bg-clip-text text-transparent",children:"Pitch Analytics Dashboard"}),s.jsxs("p",{className:"text-muted-foreground",children:["Insights from ",y.toLocaleStr
1000ing()," service opportunities across ",p.toLocaleString()," companies"]})]}),s.jsxs(U,{onClick:()=>r(x=>x+1),variant:"outline",size:"sm",className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),"Refresh"]})]}),!a&&s.jsxs(Cs,{className:"mb-6",children:[s.jsx(Gs,{className:"h-4 w-4"}),s.jsx(Es,{children:"Sign in to access full analytics history and advanced features."})]}),s.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center",children:[s.jsx(_o,{value:c?"custom":e,onValueChange:x=>{x==="custom"?u(!0):(u(!1),t(x))},children:s.jsxs(Fi,{className:"grid w-full max-w-lg grid-cols-6",children:[s.jsx(yt,{value:"today",children:"Today"}),s.jsx(yt,{value:"week",children:"Week"}),s.jsx(yt,{value:"month",children:"Month"}),s.jsx(yt,{value:"year",children:"Year"}),s.jsx(yt,{value:"all",children:"All"}),s.jsx(yt,{value:"custom",children:"Custom"})]})}),c&&s.jsxs(Tc,{children:[s.jsx(Ac,{asChild:!0,children:s.jsxs(U,{variant:"outline",className:"flex items-center gap-2",children:[s.jsx(sn,{className:"w-4 h-4"}),o!=null&&o.from&&(o!=null&&o.to)?`${kt(o.from,"MMM dd")} - ${kt(o.to,"MMM dd, yyyy")}`:"Select date range"]})}),s.jsx(ll,{className:"w-auto p-4",align:"start",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-medium",children:"Quick ranges"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,7);l({from:v,to:x})},children:"Last 7 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,15);l({from:v,to:x})},children:"Last 15 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,30);l({from:v,to:x})},children:"Last 30 days"}),s.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const x=new Date,v=$r(x,90);l({from:v,to:x})},children:"Last 90 days"})]})]}),s.jsx(cd,{mode:"range",selected:o,onSelect:l,numberOfMonths:2})]})})]})]})]}),s.jsxs("div",{className:"space-y-8",children:[s.jsx(Mit,{services:m,loading:f}),s.jsx(Fit,{services:m,loading:f}),s.jsx(Dit,{services:m,loading:f,timeframe:c?"all":e}),s.jsx($it,{services:m,loading:f,limit:20,timeframe:c?"all":e}),s.jsx(Lit,{services:m,loading:f})]})]}),s.jsx(wt,{})]})]})},zit=e=>{const t='<?xml version="1.0" encoding="UTF-8"?>',n='<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',r="</urlset>",a=e.map(i=>{let o=`  <url>
1001    <loc>${i.loc}</loc>`;return i.lastmod&&(o+=`
1002    <lastmod>${i.lastmod}</lastmod>`),i.changefreq&&(o+=`
1003    <changefreq>${i.changefreq}</changefreq>`),i.priority!==void 0&&(o+=`
1004    <priority>${i.priority}</priority>`),o+=`
1005  </url>`,o}).join(`
1006`);return`${t}
1007${n}
1008${a}
1009${r}`},Uit=e=>{const t=new Date().toISOString().split("T")[0];return[{loc:`${e}/`,lastmod:t,changefreq:"daily",priority:1},{loc:`${e}/companies`,lastmod:t,changefreq:"hourly",priority:.9},{loc:`${e}/pitch`,lastmod:t,changefreq:"hourly",priority:.9},{loc:`${e}/pricing`,lastmod:t,changefreq:"weekly",priority:.8},{loc:`${e}/recently-funded`,lastmod:t,changefreq:"daily",priority:.8},{loc:`${e}/hiring-spike`,lastmod:t,changefreq:"daily",priority:.8},{loc:`${e}/product-launch`,lastmod:t,changefreq:"daily",priority:.8},{loc:`${e}/geographic-expansion`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/leadership-change`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/tech-stack-change`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/press-coverage`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/ma-activity`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/newsletter-sponsor`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/social-buzz`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/strategic-partnership`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/event-activity`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/cost-cutting`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/legal-challenge`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/major-customer-announcements`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/budget-increase`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/increased-ad-spend`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/awards-recognition`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/ipo-filing`,lastmod:t,changefreq:"daily",priority:.7},{loc:`${e}/seo-organic`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/paid-ads`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/outbound-sales`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/gtm-positioning`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/ai-integration`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/ux-ui`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/growth-marketing`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/revenue-operations`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/conversion-rate-optimization`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/product-marketing-analytics`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/customer-success`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/content-marketing`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/demand-generation`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/social-media-community-growth`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/security-data-privacy`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/devops-platform-enablement`,lastmod:t,changefreq:"daily",priority:.6},{loc:`${e}/matchmaking`,lastmod:t,changefreq:"daily",priority:.6}]},qit=()=>{const[e,t]=g.useState("");return g.useEffect(()=>{const n=window.location.origin,r=Uit(n),a=zit(r);t(a),document.documentElement.innerHTML=a},[]),e?s.jsx("pre",{dangerouslySetInnerHTML:{__html:e},style:{fontFamily:"monospace",margin:0,padding:0}}):null},Wit=()=>{const[e,t]=g.useState(""),n=[{id:"getting-started",title:"Getting Started",description:"New to Slay Your Sales? Start here to learn the basics.",icon:ale,color:"from-blue-500 to-cyan-500",guides:[{title:"Platform Overview",time:"5 min read"},{title:"Setting up Your Profile",time:"3 min read"},{title:"First Steps Guide",time:"7 min read"}]},{id:"auto-prospecting",title:"Auto-Prospecting",description:"Master AI-powered prospecting and automation features.",icon:ze,color:"from-green-500 to-emerald-500",guides:[{title:"Setting Up Auto-Prospecting",time:"8 min read"},{title:"Profile Configuration",time:"6 min read"},{title:"Troubleshooting Common Issues",time:"10 min read"}]},{id:"byok",title:"BYOK Configuration",description:"Configure your API keys for cost control and data sovereignty.",icon:pf,color:"from-purple-500 to-pink-500",guides:[{title:"Setting Up API Keys",time:"5 min read"},{title:"Security Best Practices",time:"7 min read"},{title:"Cost Management Tips",time:"4 min read"}]},{id:"signals",title:"Business Signals",description:"Learn to interpret and act on real-time business events.",icon:os,color:"from-orange-500 to-red-500",guides:[{title:"Understanding Signal Types",time:"6 min read"},{title:"Setting Up Alerts",time:"4 min read"},{title:"Acting on Signals",time:"8 min read"}]},{id:"company-research",title:"Company Research",description:"Deep dive into company intelligence and data export.",icon:nl,color:"from-teal-500 to-blue-500",guides:[{title:"Advanced Search Techniques",time:"9 min read"},{title:"Data Export Workflows",time:"5 min read"}
1009,{title:"Research Best Practices",time:"7 min read"}]},{id:"matchmaking",title:"Smart Matchmaking",description:"Optimize your matchmaking profile for better results.",icon:At,color:"from-indigo-500 to-purple-500",guides:[{title:"Profile Optimization",time:"6 min read"},{title:"Understanding Match Scores",time:"4 min read"},{title:"Advanced Matching Tips",time:"8 min read"}]}],r=[{title:"Video Tutorials",description:"Watch step-by-step video guides",icon:Nle,href:"/help/videos",color:"bg-red-500",isExternal:!1},{title:"FAQ",description:"Find answers to common questions",icon:ti,href:"/help/faq",color:"bg-blue-500",isExternal:!1},{title:"API Documentation",description:"Technical integration guides",icon:gd,href:"https://hello.rohansingh.io/slay-form",color:"bg-green-500",isExternal:!0}],a=n.filter(c=>e===""||c.title.toLowerCase().includes(e.toLowerCase())||c.description.toLowerCase().includes(e.toLowerCase())||c.guides.some(u=>u.title.toLowerCase().includes(e.toLowerCase()))),i=()=>{},o={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},l={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(ri,{title:"Help Center - Slay Your Sales Documentation & Guides",description:"Comprehensive help center with guides, tutorials, and documentation for mastering AI-powered prospecting, BYOK setup, business signals, and more.",keywords:"help center, documentation, tutorials, auto-prospecting guide, BYOK setup, business signals, company research, user guides",canonicalUrl:"https://slayyoursales.com/help"}),s.jsx(Ee,{}),s.jsxs("div",{className:"pt-20",children:[s.jsxs(he.div,{className:"text-center py-16 px-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[s.jsxs("h1",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["How can we ",s.jsx("span",{className:"text-primary",children:"help you?"})]}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:"Find guides, tutorials, and answers to help you make the most of Slay Your Sales and transform your prospecting process."}),s.jsxs("div",{className:"max-w-2xl mx-auto relative",children:[s.jsx(st,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-muted-foreground w-5 h-5"}),s.jsx(at,{placeholder:"Search guides, tutorials, and FAQs...",className:"pl-12 pr-4 py-3 text-lg border-2 border-gray-200 focus:border-primary rounded-xl",value:e,onChange:c=>t(c.target.value),onKeyPress:c=>c.key==="Enter"&&i()}),s.jsx(U,{className:"absolute right-2 top-1/2 transform -translate-y-1/2",onClick:i,children:"Search"})]})]}),s.jsxs(he.div,{className:"max-w-7xl mx-auto px-6 mb-16",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:[s.jsx("h2",{className:"text-2xl font-bold mb-8 text-center text-foreground",children:"Popular Resources"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:r.map((c,u)=>c.isExternal?s.jsx("a",{href:c.href,target:"_blank",rel:"noopener noreferrer",children:s.jsx(Y,{className:"h-full border-0 shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 cursor-pointer",children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`w-12 h-12 ${c.color} rounded-xl p-3 flex items-center justify-center`,children:s.jsx(c.icon,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:c.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:c.description})]}),s.jsx(Ws,{className:"w-5 h-5 text-muted-foreground"})]})})})},c.title):s.jsx(ee,{to:c.href,children:s.jsx(Y,{className:"h-full border-0 shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 cursor-pointer",children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`w-12 h-12 ${c.color} rounded-xl p-3 flex items-center justify-center`,children:s.jsx(c.icon,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:c.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:c.description})]}),s.jsx(Ws,{className:"w-5 h-5 text-muted-foreground"})]})})})},c.title))})]}),s.jsxs(he.div,{className:"max-w-7xl mx-auto px-6 pb-16",variants:o,initial:"hidden",animate:"visible",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-foreground",children:"Browse by Category"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:a.length>0?a.map((c,u)=>s.jsx(he.div,{variants:l,children:s.jsx(ee,{to:`/help/${c.id}`,children:s.jsxs(Y,{className:"h-full border-0 shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 group cursor-pointer",children:[s.jsxs(xe,{className:"pb-4",children:[s.jsx("div",{className:`w-16 h-16 rounded-2xl bg-gradient-to-br ${c.color} p-4 mb-4 group-hover:scale-110 transition-transform duration-300`,children:s.jsx(c.icon,{className:"w-8 h-8 text-white"})}),s.jsx(Se,{className:"text-xl text-foreground group-hover:text-primary transition-colors",children:c.title})]}),s.jsxs(te,{className:"pt-0",children:[s.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:c.description}),s.jsx("div",{className:"space-y-2",children:c.guides.map((d,h)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-100 last:border-0",children:[s.jsx("span",{className:"text-sm text-foreground",children:d.title}),s.jsx(fe,{variant:"outline",className:"text-xs",children:d.time})]},h))}),s.jsxs("div",{className:"mt-4 flex items-center text-primary text-sm font-medium group-hover:gap-2 transition-all",children:[s.jsx("span",{children:"View all guides"}),s.jsx(Ws,{className:"w-4 h-4 ml-1 group-hover:translate-x-1 transition-transform"})]})]})]})})},c.id)):s.jsxs("div",{className:"md:col-span-2 lg:col-span-3 text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground text-lg",children:"No guides found matching your search."}),s.jsx(U,{variant:"outline",className:"mt-4",onClick:()=>t(""),children:"Clear search"})]})})]}),s.jsx(he.div,{className:"bg-gradient-to-r from-primary/10 to-primary/5 py-16",initial:{opacity:0,y:20}
1009,animate:{opacity:1,y:0},transition:{duration:.6,delay:.4},children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center px-6",children:[s.jsx("h2",{className:"text-3xl font-bold mb-4 text-foreground",children:"Still need help?"}),s.jsx("p",{className:"text-xl text-muted-foreground mb-8",children:"Our support team is here to help you succeed with personalized assistance."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsxs(U,{size:"lg",className:"group",children:["Contact Support",s.jsx(ti,{className:"w-4 h-4 ml-2 group-hover:animate-pulse"})]}),s.jsx(U,{variant:"outline",size:"lg",onClick:()=>window.open("https://hello.rohansingh.io/slay-form","_blank"),children:"Schedule a Demo"})]})]})})]}),s.jsx(wt,{})]})},Ph={categories:{"getting-started":{title:"Getting Started",description:"New to Slay Your Sales? Start here to learn the basics.",guides:["platform-overview","setting-up-profile","first-steps"]},"auto-prospecting":{title:"Auto-Prospecting",description:"Master AI-powered prospecting and automation features.",guides:["setup-basics","profile-configuration","troubleshooting"]},byok:{title:"BYOK Configuration",description:"Configure your API keys for cost control and data sovereignty.",guides:["setting-up-api-keys","security-best-practices","cost-management"]},signals:{title:"Business Signals",description:"Learn to interpret and act on real-time business events.",guides:["understanding-signal-types","setting-up-alerts","acting-on-signals"]},"company-research":{title:"Company Research",description:"Deep dive into company intelligence and data export.",guides:["advanced-search-techniques","data-export-workflows","research-best-practices"]}
1009,matchmaking:{title:"Smart Matchmaking",description:"Optimize your matchmaking profile for better results.",guides:["profile-optimization","understanding-match-scores","advanced-matching-tips"]},security:{title:"Security & Privacy",description:"Understand our security architecture and data protection measures.",guides:["security-faq"]}},guides:{"security-faq":{title:"Security & Data Privacy FAQ",description:"Common security questions answered.",readTime:"12 min read",difficulty:"Beginner",lastUpdated:"2025-10-15",author:"Security Team",content:`
1010# Security & Data Privacy
1011
1012Understanding how Slaygent.ai protects your data and maintains security.
1013
1014## Why is the API key visible in network requests?
1015
1016This is **by design and completely safe**. The "apikey" header you see is Supabase's **anonymous (anon) key**, which is meant to be public. Here's why this is secure:
1017
1018**Security Architecture:**
1019- The anon key has limited, read-only permissions
1020- All data access is controlled by Row Level Security (RLS) policies
1021- The dangerous service role key is NEVER exposed to clients
1022- Authentication tokens provide user-specific access control
1023
1024**Think of it like a public door:**
1025- The anon key is like the building's front door - anyone can approach it
1026- RLS policies are like the security guard - they check your credentials
1027- The service role key is like the master key - kept safely in the backend
1028
1029**Industry Standard:** Thousands of production applications use this exact architecture, including major SaaS products. The anon key being visible is expected and safe.
1030
1031## How does Row Level Security (RLS) protect my data?
1032
1033Row Level Security is a database-level security mechanism that ensures users can only access data they're authorized to see:
1034
1035**How RLS Works:**
10361. Every database query is automatically filtered by RLS policies
10372. Policies check your authentication status and user ID
10383. Only rows matching your permissions are returned
10394. This happens at the database level, not in application code
1040
1041**Example:** When you view saved companies, the RLS policy ensures you only see YOUR saved companies, even though the same table stores everyone's data.
1042
1043**Benefits:**
1044- Cannot be bypassed by API manipulation
1045- Protects against unauthorized data access
1046- Automatic enforcement on all queries
1047- Database-level security (most secure layer)
1048
1049## Can someone steal data by reverse engineering the API?
1050
1051No, not with our security architecture. Here's why:
1052
1053**Protection Layers:**
10541. **RLS Policies**: Database enforces access rules
10552. **Authentication Tokens**: Required for user-specific data
10563. **Rate Limiting**: Prevents abuse and scraping attempts
10574. **IP-Based Monitoring**: Detects suspicious activity patterns
10585. **Audit Logging**: Tracks all data access attempts
1059
1060**What an attacker would encounter:**
1061- Anonymous users: Limited to last 30 days of public signals only
1062- Authenticated users: Can only access their own data
1063- Suspicious patterns: Automatically flagged and rate-limited
1064- Bulk requests: Blocked by rate limiting system
1065
1066**Real-World Example:**
1067Even if someone tries to query all user data, the database returns an error because RLS policies prevent cross-user data access.
1068
1069## What data can anonymous users access?
1070
1071Anonymous (unauthenticated) users have very limited access:
1072
1073**Allowed:**
1074- Last 30 days of public business signals
1075- Basic company information (name, domain, logo)
1076- Public signal statistics and trends
1077- Signal type descriptions
1078
1079**Not Allowed:**
1080- User profiles or account information
1081- Saved companies lists
1082- Historical signals beyond 30 days
1083- Advanced filters and analytics
1084- Contact information or private data
1085- Monthly/yearly signal archives
1086
1087**Rate Limiting:**
1088Anonymous requests are heavily rate-limited (100 requests per hour per IP) to prevent scraping.
1089
1090## How do you prevent data scraping?
1091
1092We implement multiple anti-scraping measures:
1093
1094**Rate Limiting:**
1095- 100 requests/hour for anonymous users
1096- Higher limits for authenticated users
1097- Per-IP and per-user tracking
1098- Automatic temporary blocks for violations
1099
1100**Behavioral Analysis:**
1101- Monitors request patterns
1102- Detects automated access attempts
1103- Flags rapid sequential requests
1104- Alerts on suspicious activity
1105
1106**Access Controls:**
1107- Premium features behind authentication
1108- Incremental data disclosure
1109- Randomized response delays
1110- CAPTCHA for suspicious patterns
1111
1112**Legal Protection:**
1113- Terms of Service prohibit scraping
1114- DMCA and legal recourse available
1115- User accounts suspended for violations
1116
1117## Security Best Practices
1118
1119**Use Strong, Unique Passwords**
1120Create a password with at least 12 characters, mixing uppercase, lowercase, numbers, and symbols. Never reuse passwords across services.
1121
1122**Monitor Your Account Activity**
1123Regularly review your usage patterns and exported data. Report any suspicious activity immediately.
1124
1125**Be Cautious with Exported Data**
1126Exported company lists and signals may contain sensitive business intelligence. Store exports securely and delete when no longer needed.
1127
1128## Report Security Issues
1129
1130Found a security vulnerability? We take security seriously and appreciate responsible disclosure.
1131
1132**Contact:** [email protected]
1133
1134**Response Time:** We aim to respond within 24 hours and provide updates throughout our investigation.
1135
1136For more detailed security information, visit our [Security Documentation](https://docs.lovable.dev/features/security).
1137      `},"platform-overview":{title:"Platform Overview",description:"Get familiar with Slay Your Sales core features and navigation.",readTime:"5 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Product Team",content:`
1138# Platform Overview
1139
1140Welcome to **Slay Your Sales** - your AI-powered sales intelligence platform! This guide will help you understand what makes our platform unique and how to navigate its features.
1141
1142## What is Slay Your Sales?
1143
1144Slay Your Sales is a comprehensive B2B sales intelligence platform that combines:
1145- **Company Research**: Deep insights into 50M+ companies
1146- **Business Signals**: Real-time alerts about business events
1147- **Auto-Prospecting**: AI-powered automated prospect discovery
1148- **Smart Matchmaking**: Intelligent company-to-company matching
1149- **BYOK Support**: Use your own OpenAI API key for unlimited access
1150
1151## Core Features
1152
1153### 🏢 Company Research
1154Search and analyze companies with detailed intelligence including:
1155- Company basics (size, industry, location)
1156- Technology stack and tools used
1157- Funding history and financial data
1158- Contact information and team details
1159- Recent news and business events
1160
1161### 📊 Business Signals
1162Stay ahead with real-time business intelligence:
1163- Funding announcements and M&A activity
1164- Technology stack changes
1165- Hiring spikes and leadership changes
1166- Product launches and press coverage
1167- Market expansion signals
1168
1169### 🎯 Auto-Prospecting
1170Automate your prospecting workflow:
1171- Set up target customer profiles
1172- Automatically match new companies entering our database
1173- Receive notifications for potential prospects
1174- Export matched companies for outreach
1175
1176### 🤝 Smart Matchmaking
1177Find ideal business partnerships:
1178- Match your company with potential partners
1179- Score compatibility based on multiple factors
1180- Discover collaboration opportunities
1181- Build strategic business relationships
1182
1183### 🔑 BYOK (Bring Your Own Key)
1184Take control of your AI costs and data:
1185- Use your own OpenAI API key
1186- Direct billing from OpenAI (no markup)
1187- Enhanced data privacy and control
1188- Unlimited usage within your OpenAI quota
1189
1190## Navigation Guide
1191
1192### Main Dashboard
1193Your central command center featuring:
1194- Recent activity overview
1195- Key metrics and performance indicators
1196- Quick access to saved companies
1197- Latest business signals
1198
1199### Company Search
1200Powerful search and filtering tools:
1201- Advanced filters for precise targeting
1202- Real-time search results
1203- Company detail pages with full intelligence
1204- Bulk selection and export capabilities
1205
1206### Signals Feed
1207Stay informed with real-time updates:
1208- Customizable signal types
1209- Industry-specific alerts
1210- Company-specific monitoring
1211- Historical signal analysis
1212
1213### Auto-Prospecting Hub
1214Manage your automated campaigns:
1215- Campaign creation and configuration
1216- Performance tracking and analytics
1217- Prospect management and export
1218- AI-powered optimization suggestions
1219
1220## Getting the Most Value
1221
1222### Start with Clear Goals
1223- Define your ideal customer profile (ICP)
1224- Set specific prospecting targets
1225- Identify key business signals to monitor
1226- Plan your outreach strategy
1227
1228### Use Data-Driven Approaches
1229- Leverage signal timing for outreach
1230- Personalize messages using company intelligence
1231- Track and optimize campaign performance
1232- Iterate based on response rates
1233
1234### Integrate with Your Workflow
1235- Export data to your CRM
1236- Set up regular signal monitoring
1237- Create systematic prospecting processes
1238- Collaborate with your sales team
1239
1240Remember: Your success is our priority. Take your time to explore each feature and don't hesitate to reach out for support! 🚀
1241      `},"setting-up-profile":{title:"Setting Up Your Profile",description:"Complete your account setup for optimal platform experience.",readTime:"3 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Product Team",content:`
1242# Setting Up Your Profile
1243
1244Your profile is the foundation of your Slay Your Sales experience. A well-configured profile ensures better match quality and personalized insights.
1245
1246## Account Basics
1247
1248### Profile Information
12491. **Company Details**: Add your company name and industry
12502. **Role & Title**: Specify your position for relevant insights
12513. **Location**: Set your geographic region for localized data
1252
1253### Profile Completeness Benefits
1254- **Better Matchmaking**: More accurate company matches
1255- **Relevant Signals**: Targeted business alerts
1256- **Personalized Dashboard**: Customized views and recommendations
1257
1258## Essential Settings
1259
1260### Notification Preferences
1261Configure how you want to receive updates:
1262- Email notifications for important signals
1263- In-platform alerts for new matches
1264- Weekly summary reports
1265
1266### Privacy Settings
1267Control your data visibility:
1268- Profile visibility to other users
1269- Data sharing preferences
1270- Export and deletion options
1271
1272## BYOK Setup (Optional but Recommended)
1273
1274### Why Use Your Own Keys?
1275- **Cost Control**: Pay OpenAI directly, no markup
1276- **Data Sovereignty**: Your API calls go direct to OpenAI
1277- **Unlimited Usage**: No platform-imposed limits
1278
1279### Supported Provider
1280Currently supported: **OpenAI API keys only**
1281- GPT-3.5 Turbo
1282- GPT-4 and GPT-4 Turbo models
1283- Automatic model selection based on task complexity
1284
1285### Adding Your OpenAI Key
12861. Navigate to Settings → BYOK Configuration  
12872. Add your OpenAI API key
12883. Test the connection
12894. Enable for auto-prospecting and AI features
1290
1291## Profile Optimization Tips
1292
1293### Complete All Sections
1294- Upload a professional profile photo
1295- Add detailed company information
1296- Specify your ideal customer profile (ICP)
1297- List your technology stack interests
1298
1299### Regular Updates
1300- Review your profile monthly
1301- Update your ICP as it evolves  
1302- Refresh your interests and priorities
1303- Keep contact information current
1304
1305Your profile is your sales intelligence command center - make it count! 💪
1306      `},"first-steps":{title:"First Steps Guide",description:"Your roadmap to getting value from the platform quickly.",readTime:"7 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Product Team",content:`
1307# First Steps Guide
1308
1309Welcome to Slay Your Sales! This guide will help you get up and running quickly and start seeing value from the platform within your first week.
1310
1311## Week 1 Checklist
1312
1313### Day 1: Setup Foundation
1314- ✅ Complete your profile setup
1315- ✅ Add your OpenAI API key (recommended)
1316- ✅ Define your ideal customer profile (ICP)
1317- ✅ Browse the company database
1318
1319### Day 2-3: Explore Core Features  
1320- ✅ Search for companies in your target market
1321- ✅ Save 10-20 interesting prospects
1322- ✅ Review available business signals
1323- ✅ Set up your first signal alert
1324
1325### Day 4-5: Try Auto-Prospecting
1326- ✅ Create your first auto-prospecting campaign
1327- ✅ Configure basic targeting criteria
1328- ✅ Review initial matches
1329- ✅ Export your first prospect list
1330
1331### Day 6-7: Advanced Features
1332- ✅ Try the matchmaking feature
1333- ✅ Set up additional signal alerts
1334- ✅ Export data to your CRM
1335- ✅ Review analytics and optimize
1336
1337## Quick Wins
1338
1339### 1. Find Your First 10 Prospects
1340Use the company search to find prospects manually:
1341- Filter by industry and company size
1342- Look for technology stack matches
1343- Check for recent funding or growth signals
1344- Save promising companies for follow-up
1345
1346### 2. Set Up Signal Alerts
1347Get notified about relevant business events:
1348- Funding announcements in your industry
1349- Technology adoption signals
1350- Leadership changes at target companies
1351- Product launches by prospects
1352
1353### 3. Export Your First List
1354Once you've identified prospects:
1355- Use the export functionality
1356- Include contact information and signals
1357- Import into your CRM or outreach tool
1358- Create your first outreach campaign
1359
1360## Understanding the Data
1361
1362### Company Information Includes
1363- **Basic Details**: Size, industry, location, founding year
1364- **Technology Stack**: Tools and platforms they use
1365- **Funding History**: Investment rounds and valuations  
1366- **Business Signals**: Recent events and changes
1367- **Contact Data**: Key decision makers and their info
1368
1369### Data Quality Notes
1370- Information is aggregated from multiple sources
1371- Updated regularly but some lag may occur
1372- Contact information accuracy varies by source
1373- Always verify critical details before outreach
1374
1375## Best Practices for New Users
1376
1377### Start Small and Scale
1378- Begin with narrow targeting criteria
1379- Test with small prospect batches
1380- Refine based on results
1381- Gradually expand successful approaches
1382
1383### Focus on Quality Over Quantity
1384- Prioritize prospects that match your ICP closely
1385- Use signal information to time outreach
1386- Personalize messages using company data
1387- Track results to improve over time
1388
1389### Leverage Platform Intelligence
1390- Use business signals for conversation starters
1391- Reference technology stack in your outreach
1392- Mention recent funding or growth in messages
1393- Connect on shared connections or interests
1394
1395## Getting Help
1396
1397### Built-in Resources
1398- Help guides for each feature
1399- Video tutorials and walkthroughs
1400- FAQ section with common questions
1401- Best practice guides and templates
1402
1403### Support Options
1404- In-platform help widget
1405- Email support for technical issues
1406- Community forum for user discussions
1407- Scheduled demos for advanced features
1408
1409Remember: Success with sales intelligence is a marathon, not a sprint. Focus on building good habits and processes that scale! 🎯
1410      `},"setup-basics":{title:"Auto-Prospecting Setup Basics",description:"Learn how to set up your first auto-prospecting campaign from scratch.",readTime:"8 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Sales Team",content:`
1411# Auto-Prospecting Setup Basics
1412
1413Welcome to the complete guide for setting up your first auto-prospecting campaign! This tutorial will walk you through everything you need to know to get started.
1414
1415## Prerequisites
1416
1417Before you begin, make sure you have:
1418- ✅ A verified Slay Your Sales account
1419- ✅ Completed your profile setup
1420- ✅ Added your OpenAI API key (recommended)
1421
1422## Step 1: Access Auto-Prospecting
1423
1424Navigate to the Auto-Prospecting section from your dashboard:
1425
14261. Click on **"Auto-Prospecting"** in the main navigation
14272. Select **"Create New Campaign"**
14283. Choose your campaign type
1429
1430> **💡 Pro Tip**: Start with a simple campaign to understand the basics before creating complex multi-step campaigns.
1431
1432## Step 2: Configure Your Target Profile
1433
1434### Basic Targeting
1435
1436Set up your ideal customer profile:
1437
1438    {
1439      "company_size": "10-100 employees",
1440      "industry": "SaaS",
1441      "location": "United States",
1442      "funding_stage": "Series A-C"
1443    }
1444
1445### Advanced Filters
1446
1447For better targeting, use these advanced options:
1448
1449- **Technology Stack**: Target companies using specific tools
1450- **Growth Signals**: Focus on companies showing growth indicators
1451- **Funding Events**: Target recently funded companies
1452- **Hiring Activity**: Look for companies actively hiring
1453
1454## Step 3: Set Campaign Parameters
1455
1456Configure how your campaign will run:
1457
1458| Parameter | Recommended Setting | Description |
1459|-----------|-------------------|-------------|
1460| Frequency | Daily | How often to check for new prospects |
1461| Batch Size | 10-25 | Number of prospects per batch |
1462| Quality Threshold | 70%+ | Minimum match score to include |
1463
1464## Step 4: Review & Launch
1465
1466Before launching:
1467
14681. **Review your targeting criteria** - Make sure they align with your ICP
14692. **Test with a small batch** - Start with 5-10 prospects
14703. **Monitor initial results** - Adjust based on early feedback
1471
1472## Common Mistakes to Avoid
1473
1474❌ **Too Broad Targeting**: Casting too wide a net reduces quality
1475❌ **Ignoring Quality Scores**: Don't sacrifice quality for quantity  
1476❌ **Not Testing First**: Always test with a small batch initially
1477❌ **Setting & Forgetting**: Monitor and optimize regularly
1478
1479## Troubleshooting
1480
1481### Campaign Not Finding Prospects
1482
1483If your campaign isn't finding prospects:
1484
14851. **Check your filters** - They might be too restrictive
14862. **Verify API keys** - Ensure they're working properly
14873. **Review quality threshold** - Lower it temporarily to test
14884. **Contact support** - We're here to help optimize your setup
1489
1490### Low Quality Matches
1491
1492For better match quality:
1493
1494- Refine your ICP criteria
1495- Add negative filters to exclude unwanted companies
1496- Increase the quality threshold
1497- Use more specific technology stack filters
1498
1499## Next Steps
1500
1501Once your basic campaign is running successfully:
1502
15031. **Monitor Performance** - Track open rates and responses
15042. **Optimize Targeting** - Refine based on results
15053. **Scale Gradually** - Increase batch sizes slowly
15064. **Advanced Features** - Explore AI-powered personalization
1507
1508Remember: Effective auto-prospecting is about quality and timing, not quantity. Start small and scale what works! 🎯
1509      `},"profile-configuration":{title:"Advanced Profile Configuration",description:"Configure advanced settings and filters for better targeting.",readTime:"12 min read",difficulty:"Intermediate",lastUpdated:"2024-01-15",author:"Sales Team",content:`
1510# Advanced Profile Configuration
1511
1512Take your auto-prospecting to the next level with advanced configuration options that help you target your ideal customers with precision.
1513
1514## Advanced Targeting Criteria
1515
1516### Industry-Specific Filters
1517
1518Target companies by specific industry categories:
1519
1520    {
1521      "primary_industry": "Software Development",
1522      "sub_industries": ["SaaS", "Enterprise Software", "Mobile Apps"],
1523      "exclude_industries": ["Gaming", "Social Media"]
1524    }
1525
1526### Technology Stack Targeting
1527
1528Find companies using specific technologies:
1529
1530- **Frontend Technologies**: React, Vue, Angular
1531- **Backend Technologies**: Node.js, Python, Java
1532- **Database Systems**: PostgreSQL, MongoDB, Redis
1533- **Cloud Platforms**: AWS, Azure, GCP
1534- **Marketing Tools**: HubSpot, Salesforce, Marketo
1535
1536### Growth Indicators
1537
1538Target companies showing specific growth patterns:
1539
15401. **Revenue Growth**: Companies with increasing revenue
15412. **Employee Growth**: Rapidly hiring organizations
15423. **Funding Activity**: Recently funded or seeking funding
15434. **Market Expansion**: Companies entering new markets
1544
1545## Geographic Targeting
1546
1547### Multi-Region Campaigns
1548
1549Set up campaigns across multiple regions:
1550
1551    {
1552      "primary_regions": ["North America", "Europe"],
1553      "exclude_countries": ["Sanctioned countries"],
1554      "timezone_preferences": ["EST", "PST", "GMT"]
1555    }
1556
1557### Local Market Focus
1558
1559Target specific metropolitan areas or regions for local sales efforts.
1560
1561## Advanced Filters
1562
1563### Company Size Refinement
1564
1565Beyond basic employee count:
1566
1567- **Department Sizes**: Target specific department sizes
1568- **Revenue Ranges**: Focus on companies within revenue brackets
1569- **Growth Rate**: Companies growing at specific rates
1570
1571### Behavioral Patterns
1572
1573Target based on company behavior:
1574
1575- **Website Activity**: Companies with specific web traffic patterns
1576- **Social Media Presence**: Active on specific platforms
1577- **Content Engagement**: Companies engaging with specific content types
1578
1579## Quality Scoring Configuration
1580
1581### Custom Scoring Models
1582
1583Create custom scoring based on your priorities:
1584
1585    scoring_model = {
1586        "company_size": 0.3,
1587        "industry_match": 0.4,
1588        "technology_stack": 0.2,
1589        "growth_signals": 0.1
1590    }
1591
1592### Threshold Management
1593
1594- **Minimum Score**: Set quality thresholds
1595- **Auto-Adjustment**: Let AI adjust based on performance
1596- **Manual Override**: Override scores for specific criteria
1597
1598## Integration Settings
1599
1600### CRM Integration
1601
1602Connect with your existing CRM:
1603
16041. **Field Mapping**: Map prospect fields to CRM fields
16052. **Duplicate Prevention**: Avoid duplicate contacts
16063. **Status Syncing**: Keep prospect status in sync
1607
1608### Marketing Automation
1609
1610Integrate with marketing platforms:
1611
1612- **Lead Scoring**: Sync with marketing qualified leads
1613- **Campaign Tracking**: Track campaign attribution
1614- **Nurture Sequences**: Automatically add to nurture campaigns
1615
1616## Performance Optimization
1617
1618### A/B Testing Setup
1619
1620Test different configurations:
1621
1622- **Filter Variations**: Test different filter combinations
1623- **Scoring Models**: Compare scoring approaches
1624- **Messaging Angles**: Test different value propositions
1625
1626### Monitoring & Analytics
1627
1628Track configuration performance:
1629
1630- **Conversion Rates**: Monitor lead-to-customer conversion
1631- **Quality Metrics**: Track prospect quality over time
1632- **Cost Efficiency**: Monitor cost per qualified lead
1633
1634## Troubleshooting Advanced Configurations
1635
1636### Common Issues
1637
1638**Too Few Results**
1639- Broaden one filter at a time
1640- Check for conflicting criteria
1641- Review minimum score thresholds
1642
1643**Too Many Low-Quality Results**
1644- Tighten quality thresholds
1645- Add negative filters
1646- Refine ICP criteria
1647
1648**Poor Performance**
1649- Review and update ICP regularly
1650- Analyze conversion data
1651- Adjust scoring weights
1652
1653## Best Practices
1654
1655### Configuration Management
1656
16571. **Version Control**: Keep track of configuration changes
16582. **Documentation**: Document reasoning behind filters
16593. **Regular Reviews**: Review and update quarterly
16604. **Performance Tracking**: Monitor key metrics continuously
1661
1662### Scaling Strategies
1663
1664- **Gradual Expansion**: Slowly broaden successful criteria
1665- **Market Testing**: Test new markets with small campaigns
1666- **Feedback Loops**: Use sales feedback to refine targeting
1667
1668Advanced configuration takes time to master, but the results are worth it! 🚀
1669      `},troubleshooting:{title:"Troubleshooting Common Issues",description:"Solutions to the most common auto-prospecting problems.",readTime:"10 min read",difficulty:"Advanced",lastUpdated:"2024-01-15",author:"Support Team",content:`
1670# Troubleshooting Common Issues
1671
1672Experiencing problems with your auto-prospecting campaigns? This comprehensive troubleshooting guide will help you identify and resolve the most common issues.
1673
1674## Campaign Not Finding Prospects
1675
1676### Symptoms
1677- Zero or very few prospects found
1678- "No results" messages in campaign dashboard
1679- Campaign appears inactive
1680
1681### Diagnostic Steps
1682
1683**1. Check Filter Restrictiveness**
1684
1685    Current Filters:
1686    ✓ Industry: Enterprise Software
1687    ✓ Company Size: 500-1000 employees  
1688    ✓ Location: San Francisco Bay Area
1689    ✓ Technology: Uses Salesforce + HubSpot + Kubernetes
1690    ❌ Too restrictive - try removing one filter
1691
1692**2. Verify API Key Status**
1693- Navigate to BYOK Settings
1694- Check API key status indicators
1695- Verify rate limits haven't been exceeded
1696- Test API connectivity
1697
1698**3. Review Quality Thresholds**
1699- Lower minimum match score temporarily
1700- Check if any prospects appear with lower thresholds
1701- Gradually increase threshold to find optimal balance
1702
1703### Solutions
1704
1705**Broaden Targeting Criteria**
1706- Remove one restrictive filter at a time
1707- Expand geographic targeting
1708- Include adjacent industries
1709- Lower minimum company size requirements
1710
1711**API Key Issues**
1712- Refresh API keys if expired
1713- Check provider billing status
1714- Verify rate limits and quotas
1715- Switch to backup API provider if available
1716
1717## Poor Quality Prospects
1718
1719### Symptoms
1720- Low conversion rates from prospects
1721- Prospects don't match ideal customer profile
1722- High bounce rates in outreach
1723
1724### Root Causes Analysis
1725
1726**Scoring Model Issues**
1727
1728    current_model = {
1729        "industry_match": 0.2,  # Too low?
1730        "company_size": 0.8,    # Too high?
1731        "growth_signals": 0.0   # Missing important factor
1732    }
1733
1734**Filter Configuration Problems**
1735- Filters too broad
1736- Missing negative filters
1737- Outdated ICP criteria
1738
1739### Solutions
1740
1741**Refine Scoring Model**
17421. Increase weight on most important criteria
17432. Add growth signals to scoring
17443. Implement negative scoring for unwanted traits
1745
1746**Implement Negative Filters**
1747- Exclude specific industries
1748- Filter out companies below revenue threshold  
1749- Remove companies with specific technologies
1750
1751**Update ICP Regularly**
1752- Review ICP quarterly
1753- Incorporate sales team feedback
1754- Analyze conversion data
1755
1756## API Rate Limiting Issues
1757
1758### Symptoms
1759- Campaigns pause unexpectedly
1760- "Rate limit exceeded" errors
1761- Slower prospect discovery
1762
1763### Understanding Rate Limits
1764
1765Different providers have different limits:
1766
1767| Provider | Requests/Hour | Daily Limit | Cost Impact |
1768|----------|---------------|-------------|-------------|
1769| OpenAI GPT-3.5 | 3,500/min | No daily limit | $0.001/1K tokens |
1770| OpenAI GPT-4 | 500/min | No daily limit | $0.03/1K tokens |
1771
1772### Solutions
1773
1774**Optimize Request Patterns**
1775- Batch requests when possible
1776- Implement request queuing
1777- Use caching for repeated queries
1778
1779**Rate Limit Management**
1780- Monitor usage in real-time
1781- Set up usage alerts
1782- Implement automatic pausing when limits approached
1783
1784## Data Quality Issues
1785
1786### Common Problems
1787
1788**Outdated Information**
1789- Companies that no longer exist
1790- Incorrect employee counts
1791- Outdated technology stacks
1792
1793**Duplicate Prospects**
1794- Same company appearing multiple times
1795- Similar companies with slight name variations
1796- Different divisions of same company
1797
1798### Solutions
1799
1800**Data Validation**
1801- Enable automatic duplicate detection
1802- Set up data freshness filters
1803- Verify critical information before outreach
1804
1805**Quality Monitoring**
1806- Track data accuracy metrics
1807- Report data quality issues
1808- Use feedback to improve algorithms
1809
1810## Campaign Performance Issues
1811
1812### Low Engagement Rates
1813
1814**Possible Causes**
1815- Poor message personalization
1816- Wrong timing of outreach
1817- Irrelevant value proposition
1818- Technical delivery issues
1819
1820**Solutions**
1821- Improve message templates
1822- Test different outreach timing
1823- Refine value proposition
1824- Check email deliverability
1825
1826### Technical Issues
1827
1828**Campaign Errors**
1829- Check campaign configuration
1830- Verify all required fields are complete
1831- Test with simpler configuration first
1832- Contact support with error details
1833
1834**Slow Performance**
1835- Review filter complexity
1836- Check API response times
1837- Optimize query parameters
1838- Consider spreading campaigns across time
1839
1840## Getting Help
1841
1842### Self-Service Options
1843- Check campaign logs for error details
1844- Review configuration against best practices
1845- Test with minimal configuration
1846- Use built-in diagnostic tools
1847
1848### Support Escalation
1849- Provide campaign ID and error details
1850- Include screenshots of issues
1851- Share configuration details
1852- Describe steps already attempted
1853
1854### Prevention Tips
1855- Regular campaign health checks
1856- Monitor key performance metrics
1857- Keep configurations simple initially
1858- Document what works for future reference
1859
1860Remember: Most issues can be resolved by simplifying your approach and building complexity gradually! 🔧
1861      `},"setting-up-api-keys":{title:"Setting Up Your API Keys",description:"Step-by-step guide to configure your OpenAI API key for cost control.",readTime:"5 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Technical Team",content:`
1862# Setting Up Your API Keys
1863
1864Learn how to configure your OpenAI API key to unlock unlimited access while maintaining cost control and data sovereignty.
1865
1866## Why Use BYOK (Bring Your Own Key)?
1867
1868### Benefits
1869- **Direct Billing**: Pay OpenAI directly with no markup
1870- **Cost Control**: Monitor and control your API spending
1871- **Data Privacy**: Your requests go directly to OpenAI
1872- **Unlimited Usage**: No platform-imposed usage limits
1873- **Transparency**: Full visibility into your API consumption
1874
1875### Current Support
1876**Supported Provider**: OpenAI only
1877- GPT-3.5 Turbo (cost-effective for most tasks)
1878- GPT-4 and GPT-4 Turbo (advanced reasoning)
1879- Automatic model selection based on complexity
1880
1881## Getting Your OpenAI API Key
1882
1883### Step 1: Create OpenAI Account
18841. Visit [platform.openai.com](https://platform.openai.com)
18852. Sign up or log in to your account
18863. Complete account verification
18874. Add payment method to your account
1888
1889### Step 2: Generate API Key
18901. Navigate to **API Keys** section
18912. Click **"Create new secret key"**
18923. Give your key a descriptive name (e.g., "Slay Your Sales")
18934. Copy the key immediately (you won't see it again)
18945. Store it securely
1895
1896> ⚠️ **Security Warning**: Never share your API key or commit it to code repositories. Treat it like a password.
1897
1898## Adding Your Key to Slay Your Sales
1899
1900### Configuration Steps
19011. **Navigate to Settings**: Go to Account Settings → BYOK Configuration
19022. **Add API Key**: Paste your OpenAI API key
19033. **Test Connection**: Click "Test Connection" to verify
19044. **Enable Features**: Choose which features should use your key
19055. **Save Configuration**: Confirm your settings
1906
1907### Feature Selection
1908You can choose which features use your API key:
1909- ✅ Auto-prospecting campaigns
1910- ✅ AI-powered company analysis
1911- ✅ Smart signal interpretation
1912- ✅ Personalized outreach suggestions
1913
1914## Understanding Costs
1915
1916### OpenAI Pricing (Current Rates)
1917- **GPT-3.5 Turbo**: $0.001 per 1K input tokens, $0.002 per 1K output tokens
1918- **GPT-4 Turbo**: $0.01 per 1K input tokens, $0.03 per 1K output tokens
1919
1920### Typical Usage Examples
1921- **Company Analysis**: ~500-1,000 tokens per company
1922- **Auto-prospecting**: ~100-300 tokens per prospect evaluation
1923- **Signal Analysis**: ~200-500 tokens per signal
1924
1925### Cost Estimation
1926For a typical user running moderate auto-prospecting:
1927- 1,000 prospect evaluations/month ≈ $0.30-0.90
1928- 100 detailed company analyses/month ≈ $0.50-1.50
1929- **Total estimated monthly cost**: $1-3
1930
1931## Security Best Practices
1932
1933### API Key Management
1934- **Unique Keys**: Use separate keys for different services
1935- **Regular Rotation**: Rotate keys every 3-6 months
1936- **Access Monitoring**: Monitor usage in OpenAI dashboard
1937- **Immediate Revocation**: Revoke keys if compromised
1938
1939### Usage Monitoring
1940- Set up billing alerts in OpenAI dashboard
1941- Monitor usage patterns for anomalies
1942- Review charges monthly
1943- Set spending limits if available
1944
1945## Troubleshooting
1946
1947### Common Issues
1948
1949**"Invalid API Key" Error**
1950- Verify key was copied correctly (no extra spaces)
1951- Check if key was revoked in OpenAI dashboard
1952- Ensure account has payment method added
1953- Try regenerating the key
1954
1955**"Rate Limit Exceeded"**
1956- Check your usage limits in OpenAI dashboard
1957- Upgrade your OpenAI account if needed
1958- Implement request spacing in high-volume campaigns
1959
1960**"Insufficient Credits"**
1961- Add funds to your OpenAI account
1962- Check your billing information
1963- Review usage to understand consumption
1964
1965### Testing Your Setup
19661. **Connection Test**: Use built-in test feature
19672. **Small Campaign**: Run a small auto-prospecting test
19683. **Monitor Usage**: Check OpenAI dashboard for activity
19694. **Verify Billing**: Confirm charges appear correctly
1970
1971## Advanced Configuration
1972
1973### Usage Optimization
1974- **Model Selection**: Use GPT-3.5 for simple tasks, GPT-4 for complex analysis
1975- **Token Efficiency**: Optimize prompts to reduce token usage
1976- **Batch Processing**: Group requests when possible
1977- **Caching**: Enable result caching for repeated queries
1978
1979### Enterprise Features
1980- **Organization Management**: Set up OpenAI organization for team access
1981- **Usage Analytics**: Detailed breakdowns by feature
1982- **Budget Controls**: Set monthly spending limits
1983- **Multi-key Support**: Use different keys for different campaigns
1984
1985Your API key is the gateway to unlimited, cost-effective AI-powered prospecting! 🔑
1986      `},"security-best-practices":{title:"Security Best Practices",description:"Keep your API keys secure and protect your data.",readTime:"7 min read",difficulty:"Intermediate",lastUpdated:"2024-01-15",author:"Security Team",content:`
1987# Security Best Practices
1988
1989Protecting your API keys and maintaining data security is crucial for safe and effective use of BYOK features.
1990
1991## API Key Security
1992
1993### Key Management Fundamentals
1994
1995**Treat API Keys Like Passwords**
1996- Never share keys with unauthorized users
1997- Don't include keys in screenshots or documentation
1998- Use unique keys for different applications
1999- Implement regular key rotation
2000
2001**Storage Guidelines**
2002- ✅ Store in secure password managers
2003- ✅ Use environment variables in applications
2004- ✅ Encrypt keys in databases
2005- ❌ Never commit keys to version control
2006- ❌ Don't store in plain text files
2007- ❌ Avoid sharing via email or chat
2008
2009### Access Control
2010
2011**Principle of Least Privilege**
2012- Grant minimum necessary permissions
2013- Use separate keys for different team members
2014- Implement role-based access controls
2015- Regular access reviews and updates
2016
2017**Team Management**
2018- Document who has access to which keys
2019- Implement approval processes for key access
2020- Use centralized key management for teams
2021- Monitor and log key usage
2022
2023## Platform Security Features
2024
2025### Data Protection
2026
2027**Encryption in Transit**
2028- All API communications use TLS 1.3
2029- End-to-end encryption for sensitive data
2030- Secure key transmission and storage
2031- Regular security audits and updates
2032
2033**Data Handling**
2034- API keys encrypted at rest
2035- No plaintext storage of sensitive information
2036- Secure data processing pipelines
2037- Compliance with data protection regulations
2038
2039### Monitoring and Alerts
2040
2041**Usage Monitoring**
2042- Real-time API usage tracking
2043- Unusual activity pattern detection
2044- Automated security alerts
2045- Detailed audit logs
2046
2047**Incident Response**
2048- Immediate key revocation capabilities
2049- Security incident notification system
2050- Forensic logging for investigations
2051- Recovery procedures and guidelines
2052
2053## OpenAI Security Integration
2054
2055### Direct API Benefits
2056
2057**Enhanced Privacy**
2058- Your data goes directly to OpenAI
2059- No intermediate processing or storage
2060- Reduced attack surface
2061- Direct compliance with OpenAI policies
2062
2063**Usage Controls**
2064- OpenAI's built-in rate limiting
2065- Spend management and alerts
2066- Usage analytics and reporting
2067- Account-level security controls
2068
2069## Risk Mitigation Strategies
2070
2071### Key Rotation
2072
2073**Regular Rotation Schedule**
2074- Rotate keys every 3-6 months minimum
2075- Immediate rotation if compromise suspected
2076- Automated rotation for high-security environments
2077- Document rotation procedures
2078
2079**Rotation Process**
20801. Generate new key in OpenAI dashboard
20812. Update key in Slay Your Sales settings
20823. Test functionality with new key
20834. Revoke old key in OpenAI dashboard
20845. Monitor for any issues
2085
2086### Compromise Response
2087
2088**Immediate Actions**
20891. **Revoke Compromised Key**: Immediately disable in OpenAI
20902. **Change Passwords**: Update related account passwords
20913. **Review Usage**: Check for unauthorized activity
20924. **Generate New Key**: Create replacement key
20935. **Monitor Activity**: Watch for suspicious patterns
2094
2095**Investigation Steps**
2096- Review access logs and usage patterns
2097- Identify potential breach sources
2098- Assess scope of potential data exposure
2099- Document incident for future prevention
2100
2101## Compliance Considerations
2102
2103### Data Residency
2104
2105**Understanding Data Flow**
2106- API requests go directly to OpenAI
2107- Response data processed by Slay Your Sales
2108- No long-term storage of API responses
2109- Compliance with regional data laws
2110
2111**Documentation Requirements**
2112- Maintain records of data processing
2113- Document security controls and procedures
2114- Regular compliance assessments
2115- Vendor risk management documentation
2116
2117### Industry Standards
2118
2119**SOC 2 Compliance**
2120- Security control frameworks
2121- Regular third-party audits
2122- Continuous monitoring and improvement
2123- Transparent reporting and documentation
2124
2125**GDPR Considerations**
2126- Data subject rights and requests
2127- Lawful basis for processing
2128- Data protection by design
2129- International data transfers
2130
2131## Team Security Practices
2132
2133### Training and Awareness
2134
2135**Security Education**
2136- Regular security training for team members
2137- API key handling best practices
2138- Incident response procedures
2139- Ongoing security awareness programs
2140
2141**Documentation**
2142- Clear security policies and procedures
2143- API key management guidelines
2144- Incident response playbooks
2145- Regular policy updates and reviews
2146
2147### Technical Controls
2148
2149**Environment Separation**
2150- Use different keys for development/production
2151- Implement proper staging environments
2152- Separate access controls by environment
2153- Regular environment security reviews
2154
2155**Monitoring and Alerting**
2156- Automated security monitoring
2157- Unusual usage pattern alerts
2158- Failed authentication notifications
2159- Regular security metrics reporting
2160
2161Remember: Security is a shared responsibility. We provide the tools and controls, but proper implementation and management are crucial for maintaining security! 🔒
2162      `},"cost-management":{title:"Cost Management Tips",description:"Optimize your API usage and control costs effectively.",readTime:"4 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Product Team",content:`
2163# Cost Management Tips
2164
2165Learn how to optimize your OpenAI API usage and keep costs under control while maximizing the value of your BYOK setup.
2166
2167## Understanding OpenAI Costs
2168
2169### Pricing Structure
2170
2171**Token-Based Billing**
2172- Input tokens: Text sent to the API
2173- Output tokens: Text generated by the API
2174- Different models have different rates
2175- Costs accumulate based on total token usage
2176
2177**Current Pricing (Subject to Change)**
2178- **GPT-3.5 Turbo**: $0.001 input, $0.002 output per 1K tokens
2179- **GPT-4 Turbo**: $0.01 input, $0.03 output per 1K tokens
2180- **GPT-4**: $0.03 input, $0.06 output per 1K tokens
2181
2182### What Affects Costs
2183
2184**Token Usage Factors**
2185- Length of prompts and responses
2186- Complexity of analysis requested
2187- Number of API calls made
2188- Model selection (GPT-3.5 vs GPT-4)
2189
2190**Platform Usage Patterns**
2191- Auto-prospecting campaign frequency
2192- Company analysis depth
2193- Signal processing volume
2194- Export and analysis operations
2195
2196## Cost Optimization Strategies
2197
2198### Smart Model Selection
2199
2200**Task-Appropriate Models**
2201- **GPT-3.5 Turbo**: Simple analysis, data extraction, basic insights
2202- **GPT-4 Turbo**: Complex reasoning, detailed analysis, strategic insights
2203- **Automatic Selection**: Let platform choose based on task complexity
2204
2205**Model Efficiency Tips**
2206- Use GPT-3.5 for routine prospecting tasks
2207- Reserve GPT-4 for detailed company analysis
2208- Monitor performance to find optimal balance
2209- Review model usage in analytics
2210
2211### Usage Optimization
2212
2213**Campaign Efficiency**
2214- **Focused Targeting**: Narrow criteria reduce API calls
2215- **Quality Thresholds**: Higher thresholds mean fewer evaluations
2216- **Batch Processing**: Process multiple prospects together
2217- **Caching**: Reuse analysis for similar companies
2218
2219**Request Optimization**
2220- **Concise Prompts**: Remove unnecessary context
2221- **Specific Requests**: Ask for exactly what you need
2222- **Structured Outputs**: Request organized responses
2223- **Avoid Repetition**: Don't re-analyze same companies
2224
2225## Monitoring and Budgeting
2226
2227### Setting Up Alerts
2228
2229**OpenAI Dashboard**
22301. Log into platform.openai.com
22312. Navigate to Usage & Billing
22323. Set up usage alerts
22334. Configure spending notifications
2234
2235**Recommended Alert Thresholds**
2236- 50% of monthly budget
2237- 80% of monthly budget
2238- Daily spending limits
2239- Unusual usage spikes
2240
2241### Usage Analytics
2242
2243**Track Key Metrics**
2244- Daily/monthly token consumption
2245- Cost per prospect analyzed
2246- Model usage distribution
2247- Feature-specific costs
2248
2249**Optimization Opportunities**
2250- Identify high-cost activities
2251- Find redundant API calls
2252- Optimize prompt efficiency
2253- Balance quality vs. cost
2254
2255## Budget Planning
2256
2257### Estimating Monthly Costs
2258
2259**Typical Usage Scenarios**
2260
2261**Light User (Startup/Solo)**
2262- 500 prospects analyzed/month
2263- Estimated cost: $1-3/month
2264- Mainly GPT-3.5 usage
2265- Basic auto-prospecting
2266
2267**Moderate User (Small Team)**
2268- 2,000 prospects analyzed/month
2269- Estimated cost: $5-15/month
2270- Mixed model usage
2271- Regular campaign optimization
2272
2273**Heavy User (Enterprise)**
2274- 10,000+ prospects analyzed/month
2275- Estimated cost: $25-75/month
2276- Advanced features usage
2277- Multiple team members
2278
2279### Cost Control Measures
2280
2281**Spending Limits**
2282- Set monthly budgets in OpenAI
2283- Use platform usage controls
2284- Implement approval processes
2285- Regular spending reviews
2286
2287**Efficiency Monitoring**
2288- Track cost per lead generated
2289- Monitor conversion rates
2290- Optimize based on ROI
2291- Regular strategy reviews
2292
2293## Advanced Cost Management
2294
2295### Team Usage Management
2296
2297**Multi-User Environments**
2298- Separate keys per team/project
2299- Usage attribution and tracking
2300- Budget allocation by team
2301- Performance benchmarking
2302
2303**Usage Policies**
2304- Define appropriate use cases
2305- Set usage guidelines
2306- Regular training on efficiency
2307- Cost awareness education
2308
2309### ROI Optimization
2310
2311**Value Measurement**
2312- Track revenue from BYOK-generated leads
2313- Calculate cost per qualified lead
2314- Monitor time savings vs. cost
2315- Optimize for business outcomes
2316
2317**Strategic Decision Making**
2318- Regular cost-benefit analysis
2319- Feature usage prioritization
2320- Model selection optimization
2321- Campaign efficiency improvements
2322
2323## Emergency Procedures
2324
2325### Cost Overruns
2326
2327**Immediate Actions**
2328- Check for unusual usage spikes
2329- Pause high-consumption campaigns
2330- Review recent API activity
2331- Contact support if needed
2332
2333**Investigation Steps**
2334- Analyze usage patterns
2335- Identify cost drivers
2336- Review campaign configurations
2337- Implement corrective measures
2338
2339### Prevention Strategies
2340
2341**Proactive Monitoring**
2342- Daily usage reviews
2343- Automated alert systems
2344- Regular configuration audits
2345- Team usage training
2346
2347**Continuous Optimization**
2348- Monthly cost reviews
2349- Feature efficiency analysis
2350- Model performance evaluation
2351- Strategy refinement
2352
2353Remember: The goal is to maximize value per dollar spent, not minimize costs at the expense of results! 💰
2354      `},"understanding-signal-types":{title:"Understanding Signal Types",description:"Learn about different business signals and their sales implications.",readTime:"6 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Sales Intelligence Team",content:`
2355# Understanding Signal Types
2356
2357Business signals are real-time alerts about significant events and changes at companies. Understanding different signal types helps you identify sales opportunities and time your outreach perfectly.
2358
2359## Funding & Investment Signals
2360
2361### Types of Funding Events
2362- **Seed Funding**: Early-stage startups raising initial capital
2363- **Series A/B/C**: Growth-stage funding rounds
2364- **Bridge Rounds**: Short-term funding between major rounds
2365- **Acquisition Announcements**: M&A activity and exits
2366
2367### Sales Opportunities
2368**Why Funding Matters**
2369- Companies have fresh capital to spend
2370- Often expanding teams and operations
2371- Leadership may be more open to new solutions
2372- Budget cycles are typically reset
2373
2374**Timing Strategy**
2375- Contact within 1-4 weeks of announcement
2376- Congratulate on the achievement
2377- Focus on growth challenges and scaling solutions
2378- Reference expansion plans mentioned in press releases
2379
2380### Example Outreach Approach
2381- **Week 1**: Congratulatory message with industry insights
2382- **Week 2-3**: Share relevant case studies and resources
2383- **Week 4**: Direct outreach with specific value proposition
2384
2385## Technology & Product Signals
2386
2387### Technology Stack Changes
2388- **New Software Adoptions**: CRM, marketing automation, dev tools
2389- **Technology Migrations**: Cloud migrations, platform changes
2390- **Integration Projects**: API integrations, system connections
2391- **Security Implementations**: New security tools and protocols
2392
2393### Product Development Signals
2394- **Product Launches**: New features, products, or services
2395- **Beta Programs**: Testing new solutions or features
2396- **Patent Filings**: Innovation and R&D activities
2397- **Open Source Projects**: Technology contributions and releases
2398
2399### Sales Implications
2400**Technology Signals**
2401- Companies investing in new tech may need complementary solutions
2402- Migrations often create opportunities for related services
2403- Integration projects may need additional tools or expertise
2404
2405**Product Signals**
2406- New launches suggest growth and investment capacity
2407- Beta programs indicate openness to innovation
2408- Patent activity shows R&D investment and forward thinking
2409
2410## Growth & Expansion Signals
2411
2412### Hiring Activities
2413- **Leadership Hires**: C-level executives and VPs
2414- **Department Expansion**: Sales, marketing, engineering teams
2415- **Geographic Hiring**: Expansion into new markets
2416- **Specialist Roles**: Specific expertise or new capabilities
2417
2418### Market Expansion
2419- **Geographic Expansion**: New offices, markets, or regions
2420- **Product Line Extensions**: New verticals or customer segments
2421- **Partnership Announcements**: Strategic alliances and collaborations
2422- **Customer Wins**: Major client acquisitions or renewals
2423
2424### Opportunity Identification
2425**Hiring Signals**
2426- New hires often need tools, training, and support
2427- Department expansion suggests budget availability
2428- Leadership changes may bring new priorities and budgets
2429
2430**Expansion Signals**
2431- Geographic expansion creates need for local solutions
2432- New product lines may need supporting tools and services
2433- Partnerships often create integration opportunities
2434
2435## Financial & Performance Signals
2436
2437### Financial Events
2438- **Revenue Milestones**: ARR achievements, growth announcements
2439- **Profitability Updates**: Break-even or profitability achievements
2440- **IPO Preparations**: Public offering announcements and preparations
2441- **Financial Challenges**: Restructuring or cost-cutting announcements
2442
2443### Performance Indicators
2444- **Customer Growth**: User base expansion announcements
2445- **Market Share Gains**: Competitive positioning improvements
2446- **Awards & Recognition**: Industry awards and certifications
2447- **Analyst Coverage**: Research reports and analyst ratings
2448
2449### Strategic Value
2450**Positive Financial Signals**
2451- Companies with strong finances are better prospects
2452- Growth milestones suggest capacity for new investments
2453- Recognition indicates market success and credibility
2454
2455**Challenging Financial Signals**
2456- Cost-cutting companies may still need efficiency solutions
2457- Restructuring can create opportunities for optimization tools
2458- Timing becomes crucial during financial challenges
2459
2460## Regulatory & Compliance Signals
2461
2462### Compliance Events
2463- **Regulatory Changes**: New compliance requirements
2464- **Audit Preparations**: Upcoming or ongoing audits
2465- **Certification Pursuits**: SOC2, ISO, GDPR compliance
2466- **Legal Settlements**: Resolution of regulatory issues
2467
2468### Industry-Specific Signals
2469- **Healthcare**: HIPAA compliance, FDA approvals
2470- **Financial**: SOX compliance, banking regulations
2471- **Technology**: GDPR, CCPA data privacy requirements
2472- **Manufacturing**: Safety regulations, environmental compliance
2473
2474### Opportunity Timing
2475**Compliance Needs**
2476- Regulatory changes create urgent solution needs
2477- Audit preparations often require tool investments
2478- Certification pursuits need documentation and process tools
2479
2480## Signal Quality and Reliability
2481
2482### High-Quality Signals
2483- **Primary Sources**: Company announcements, press releases
2484- **Verified Data**: Multiple source confirmation
2485- **Recent Events**: Within 30 days of occurrence
2486- **Detailed Information**: Specific amounts, dates, and details
2487
2488### Signal Evaluation Criteria
2489- **Relevance**: How closely it matches your ICP
2490- **Timing**: How recent and actionable the signal is
2491- **Specificity**: Level of detail and context provided
2492- **Urgency**: How quickly action should be taken
2493
2494### Using Signals Effectively
2495
2496**Signal Prioritization**
24971. **High Priority**: Funding rounds, leadership hires, product launches
24982. **Medium Priority**: Technology adoptions, expansion announcements
24993. **Low Priority**: Awards, general company news
2500
2501**Response Timing**
2502- **Immediate (0-48 hours)**: Funding announcements, major hires
2503- **Quick (1-7 days)**: Product launches, expansion news
2504- **Planned (1-4 weeks)**: Technology changes, compliance events
2505
2506Remember: Signals are most valuable when they're recent, relevant, and actionable. Quality beats quantity every time! 📊
2507      `},"setting-up-alerts":{title:"Setting Up Alerts",description:"Configure intelligent alerts to never miss important opportunities.",readTime:"4 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Product Team",content:`
2508# Setting Up Alerts
2509
2510Stay ahead of your competition by setting up intelligent business signal alerts that notify you of opportunities the moment they happen.
2511
2512## Alert Configuration Basics
2513
2514### Accessing Alert Settings
25151. Navigate to **Signals** in the main menu
25162. Click **"Alert Settings"** or **"Configure Alerts"**
25173. Choose **"Create New Alert"**
25184. Select your alert criteria and preferences
2519
2520### Alert Types Available
2521
2522**Company-Specific Alerts**
2523- Monitor specific companies for any business events
2524- Track competitors for strategic intelligence
2525- Watch prospects for sales timing opportunities
2526- Follow customers for expansion opportunities
2527
2528**Industry-Wide Alerts**
2529- Monitor entire industries for market trends
2530- Track specific signal types across sectors
2531- Identify emerging opportunities in your market
2532- Stay informed about regulatory changes
2533
2534**Technology-Based Alerts**
2535- Companies adopting specific technologies
2536- Integration and migration activities
2537- Security and compliance implementations
2538- Open source and development activities
2539
2540## Setting Up Your First Alert
2541
2542### Step 1: Choose Alert Type
2543
2544**Signal Type Selection**
2545- ✅ Funding announcements
2546- ✅ Leadership changes  
2547- ✅ Product launches
2548- ✅ Technology adoptions
2549- ✅ Hiring activities
2550- ✅ Expansion activities
2551
2552**Geographic Filters**
2553- Target specific regions or countries
2554- Include or exclude certain markets
2555- Focus on time zones for optimal outreach timing
2556- Consider language and cultural factors
2557
2558### Step 2: Define Targeting Criteria
2559
2560**Company Characteristics**
2561- Industry sectors and sub-industries
2562- Company size ranges (employees/revenue)
2563- Funding stages and investment status
2564- Technology stack requirements
2565
2566**Signal Specifications**
2567- Minimum funding amounts
2568- Specific job titles for hiring alerts
2569- Technology categories of interest
2570- Expansion types (geographic, product, etc.)
2571
2572### Step 3: Configure Delivery Options
2573
2574**Notification Methods**
2575- **Email**: Daily digest or immediate alerts
2576- **In-Platform**: Dashboard notifications and feeds
2577- **Mobile**: Push notifications (if mobile app available)
2578- **Webhook**: API integration for custom workflows
2579
2580**Frequency Settings**
2581- **Real-time**: Immediate notification for urgent signals
2582- **Daily**: Morning digest with all relevant signals
2583- **Weekly**: Summary report for planning purposes
2584- **Custom**: Set specific times and frequencies
2585
2586## Advanced Alert Configuration
2587
2588### Multi-Criteria Alerts
2589
2590**Complex Filtering**
2591Combine multiple criteria for precise targeting:
2592
2593    Alert Example: "SaaS companies with 50-200 employees in North America that have raised Series A funding in the last 30 days and are hiring sales leadership"
2594
2595**Boolean Logic**
2596- **AND**: All criteria must be met
2597- **OR**: Any criteria can trigger alert
2598- **NOT**: Exclude specific criteria
2599- **Nested Logic**: Complex combinations
2600
2601### Dynamic Targeting
2602
2603**Adaptive Criteria**
2604- Alerts that adjust based on market conditions
2605- Seasonal targeting modifications
2606- Performance-based criteria optimization
2607- AI-suggested targeting improvements
2608
2609**Learning Algorithms**
2610- System learns from your engagement patterns
2611- Automatically improves signal relevance
2612- Suggests new alert configurations
2613- Optimizes timing based on your response patterns
2614
2615## Alert Management Best Practices
2616
2617### Start Simple, Scale Complex
2618
2619**Beginner Approach**
26201. Start with 2-3 basic alerts
26212. Monitor performance for 2 weeks
26223. Refine criteria based on results
26234. Gradually add more sophisticated alerts
2624
2625**Scaling Strategy**
2626- Add one new alert type per week
2627- Monitor inbox volume and quality
2628- Disable low-performing alerts
2629- Refine criteria continuously
2630
2631### Quality Over Quantity
2632
2633**Alert Hygiene**
2634- Review alert performance monthly
2635- Remove or modify low-value alerts
2636- Combine similar alerts to reduce noise
2637- Focus on alerts that drive action
2638
2639**Performance Metrics**
2640- **Open Rate**: How often you engage with alerts
2641- **Action Rate**: How often alerts lead to outreach
2642- **Conversion Rate**: How often alerts result in opportunities
2643- **Time to Action**: How quickly you respond to alerts
2644
2645## Integration with Workflow
2646
2647### CRM Integration
2648When you receive alerts:
26491. **Export Companies**: Download relevant prospects
26502. **CRM Upload**: Import into your sales pipeline
26513. **Task Creation**: Set follow-up reminders
26524. **Activity Logging**: Track signal-based outreach
2653
2654### Team Coordination
2655For sales teams:
2656- **Shared Campaigns**: Team-wide auto-prospecting
2657- **Assignment Rules**: Distribute alerts by territory
2658- **Collaboration Notes**: Share insights about signals
2659- **Performance Comparison**: Track team alert effectiveness
2660
2661### Automation Workflows
2662
2663**Trigger-Based Actions**
2664- Automatically create CRM records
2665- Send alerts to team Slack channels
2666- Add prospects to specific campaigns
2667- Generate personalized outreach templates
2668
2669**Sequential Workflows**
26701. Signal detected and alert sent
26712. Prospect automatically researched
26723. Personalized message template generated
26734. Task created for sales rep follow-up
26745. Results tracked and analyzed
2675
2676## Troubleshooting Common Issues
2677
2678### Too Many Alerts
2679
2680**Symptoms**
2681- Overwhelming email volume
2682- Alert fatigue and decreased engagement
2683- Missing important signals in the noise
2684
2685**Solutions**
2686- Increase quality thresholds
2687- Add negative filters to exclude unwanted signals
2688- Reduce frequency to daily digests
2689- Focus on highest-priority signal types
2690
2691### Too Few Alerts
2692
2693**Symptoms**
2694- No alerts received despite configuration
2695- Missing obvious opportunities in your market
2696
2697**Solutions**
2698- Broaden targeting criteria
2699- Lower quality thresholds temporarily
2700- Check for overly restrictive filters
2701- Verify alert is enabled and configured correctly
2702
2703### Poor Signal Quality
2704
2705**Symptoms**
2706- Alerts about irrelevant companies
2707- Outdated or incorrect information
2708- Low conversion from alerts to opportunities
2709
2710**Solutions**
2711- Refine ICP criteria more precisely
2712- Add technology stack filters
2713- Include/exclude specific industries
2714- Report data quality issues to support
2715
2716Remember: Effective alerts are about quality and timing, not quantity. Configure wisely to maximize your sales opportunities! 🔔
2717      `},"acting-on-signals":{title:"Acting on Signals",description:"Best practices for converting business signals into sales opportunities.",readTime:"8 min read",difficulty:"Intermediate",lastUpdated:"2024-01-15",author:"Sales Team",content:`
2718# Acting on Signals
2719
2720Transform business signals into meaningful sales conversations and opportunities with proven strategies and tactics.
2721
2722## Signal-to-Action Framework
2723
2724### 1. Signal Assessment (2-3 minutes)
2725- **Verify Information**: Cross-check signal accuracy
2726- **Understand Context**: Research company background
2727- **Assess Relevance**: Match to your solution
2728- **Evaluate Timing**: Determine urgency level
2729
2730### 2. Opportunity Evaluation (5-10 minutes)
2731- **Company Fit**: Does it match your ICP?
2732- **Signal Strength**: High, medium, or low quality?
2733- **Competition Check**: Are competitors already engaged?
2734- **Budget Indicators**: Signs of purchasing power?
2735
2736### 3. Outreach Planning (10-15 minutes)
2737- **Message Strategy**: Congratulate, educate, or solve?
2738- **Channel Selection**: Email, LinkedIn, phone, or social?
2739- **Timing Decision**: Immediate or strategic delay?
2740- **Follow-up Sequence**: Multi-touch campaign planning
2741
2742## Signal-Specific Action Strategies
2743
2744### 🚀 Funding Signals
2745
2746**Immediate Actions (0-48 hours)**
2747- Congratulate on the achievement
2748- Share relevant industry insights
2749- Offer to discuss growth challenges
2750- Connect on shared connections/investors
2751
2752**Example Outreach**:
2753
2754    Subject: Congratulations on your Series B!
2755
2756    Hi [Name],
2757
2758    Congratulations on the $20M Series B! Impressive growth trajectory - 
2759    expanding your sales team by 50% in 6 months is no small feat.
2760
2761    As you scale your sales operations, you might find our case study 
2762    with [similar company] helpful. They faced similar growth challenges 
2763    and saw 40% improvement in sales efficiency after implementation.
2764
2765    Would you be open to a 15-minute conversation about scaling strategies?
2766
2767    Best regards,
2768    [Your name]
2769
2770### 👥 Hiring Signals
2771
2772**Target Timing**: 1-4 weeks after hiring announcements
2773
2774**Approach Strategy**:
2775- Focus on challenges new hires might face
2776- Offer onboarding and training resources
2777- Discuss team productivity solutions
2778- Share best practices from similar companies
2779
2780**Example Outreach**:
2781
2782    Subject: Supporting your new VP of Sales success
2783
2784    Hi [Name],
2785
2786    Saw the announcement about [new hire] joining as VP of Sales. 
2787    Great choice - their background at [previous company] is impressive.
2788
2789    New sales leaders often face the challenge of quickly understanding 
2790    the existing pipeline and optimizing team performance. I've helped 
2791    several VPs navigate their first 90 days with [specific solution].
2792
2793    Would [new hire] find value in our "New Sales Leader Success Kit"?
2794
2795    Regards,
2796    [Your name]
2797
2798### 🛠️ Technology Signals
2799
2800**Timing Strategy**: 2-8 weeks after implementation announcements
2801
2802**Message Focus**:
2803- Complementary technology solutions
2804- Integration opportunities
2805- Optimization and enhancement services
2806- Training and support offerings
2807
2808**Example Outreach**:
2809
2810    Subject: Maximizing your new Salesforce implementation
2811
2812    Hello [Name],
2813
2814    I noticed your recent Salesforce implementation announcement. Having 
2815    helped 50+ companies optimize their CRM investments, I know the real 
2816    value comes from the integrations and customizations that follow.
2817
2818    Our [solution] integrates seamlessly with Salesforce and has helped 
2819    companies like [example] increase data accuracy by 60%.
2820
2821    Would you be interested in a brief demo of how this could enhance 
2822    your new Salesforce investment?
2823
2824    Best,
2825    [Your name]
2826
2827### 📈 Growth & Expansion Signals
2828
2829**Approach Angles**:
2830- Geographic expansion challenges
2831- Scaling operational processes
2832- Market entry strategies
2833- Localization and compliance needs
2834
2835**Value Propositions**:
2836- Proven expansion frameworks
2837- Market-specific insights
2838- Operational efficiency tools
2839- Risk mitigation strategies
2840
2841## Multi-Touch Campaign Strategies
2842
2843### The 5-Touch Sequence
2844
2845**Touch 1 (Day 0)**: Congratulatory message with value-add content
2846**Touch 2 (Day 7)**: Relevant case study or industry insight
2847**Touch 3 (Day 14)**: Specific solution presentation or demo offer
2848**Touch 4 (Day 21)**: Alternative approach or different stakeholder
2849**Touch 5 (Day 28)**: Final value offer with clear next steps
2850
2851### Channel Diversification
2852
2853**Email** (Primary)
2854- Professional and trackable
2855- Allows for detailed context
2856- Easy to personalize at scale
2857- Good for sharing resources
2858
2859**LinkedIn** (Secondary)
2860- More personal connection
2861- Higher visibility and engagement
2862- Good for building relationships
2863- Effective for senior executives
2864
2865**Phone** (Strategic)
2866- Use for high-value prospects
2867- After establishing email contact
2868- For urgent or time-sensitive opportunities
2869- When other channels haven't worked
2870
2871## Personalization Strategies
2872
2873### Research-Based Personalization
2874
2875**Company Intelligence**
2876- Recent news and developments
2877- Technology stack and tools
2878- Competitive positioning
2879- Growth trajectory and challenges
2880
2881**Individual Research**
2882- Professional background and experience
2883- Shared connections and interests
2884- Content engagement and preferences
2885- Communication style and preferences
2886
2887### Dynamic Content Libraries
2888
2889**Message Templates by Signal Type**
2890- Funding-specific templates
2891- Hiring-focused messages
2892- Technology adoption angles
2893- Expansion opportunity approaches
2894
2895**Content Assets**
2896- Industry-specific case studies
2897- Technology integration guides
2898- Growth strategy frameworks
2899- Best practice documentation
2900
2901## Timing Optimization
2902
2903### Signal-Specific Timing
2904
2905**Immediate Response (0-48 hours)**
2906- Major funding announcements
2907- Key executive hires
2908- Significant customer wins
2909- Product launch announcements
2910
2911**Strategic Delay (1-2 weeks)**
2912- Allow initial excitement to settle
2913- Gather additional context
2914- Prepare more thoughtful approach
2915- Coordinate with broader campaign
2916
2917**Long-term Nurture (1-3 months)**
2918- Technology implementation signals
2919- Market expansion announcements
2920- Regulatory compliance activities
2921- Long sales cycle opportunities
2922
2923### Optimal Outreach Windows
2924
2925**Day of Week**
2926- Tuesday-Thursday typically best
2927- Avoid Mondays (catch-up mode)
2928- Fridays often have lower response
2929- Consider industry-specific patterns
2930
2931**Time of Day**
2932- 9-11 AM: High engagement window
2933- 2-4 PM: Secondary peak
2934- Avoid early morning or late evening
2935- Consider recipient's time zone
2936
2937## Measuring Signal-Driven Success
2938
2939### Key Performance Indicators
2940
2941**Response Metrics**
2942- Open rates by signal type
2943- Reply rates and engagement quality
2944- Meeting booking conversion rates
2945- Time from signal to first response
2946
2947**Pipeline Metrics**
2948- Signal-driven opportunities created
2949- Conversion rates by signal type
2950- Average deal size from signal leads
2951- Sales cycle length comparison
2952
2953**ROI Analysis**
2954- Cost per signal-driven lead
2955- Revenue attribution to signals
2956- Campaign ROI by signal type
2957- Time investment vs. results
2958
2959### Continuous Improvement
2960
2961**A/B Testing**
2962- Message variations by signal type
2963- Subject line optimization
2964- Timing experiments
2965- Channel effectiveness comparison
2966
2967**Performance Analysis**
2968- Monthly signal campaign reviews
2969- Signal type effectiveness assessment
2970- Message performance optimization
2971- Process refinement based on results
2972
2973## Advanced Automation
2974
2975### Workflow Automation
2976
2977**Signal Processing**
2978- Automatic signal quality scoring
2979- Duplicate signal detection
2980- Lead enrichment and research
2981- CRM integration and updates
2982
2983**Outreach Automation**
2984- Template selection based on signal type
2985- Sequence automation with personalization
2986- Follow-up scheduling and management
2987- Response tracking and analysis
2988
2989### AI-Powered Enhancement
2990
2991**Message Optimization**
2992- AI-generated personalization suggestions
2993- Sentiment analysis for timing optimization
2994- Content recommendation based on success patterns
2995- Automated A/B testing and optimization
2996
2997### Integration Ecosystem
2998
2999**CRM Integration**
3000- Automatic opportunity creation
3001- Activity logging and tracking
3002- Pipeline attribution and reporting
3003- Performance analytics and dashboards
3004
3005**Sales Tools Integration**
3006- Email tracking and analytics
3007- Calendar scheduling automation
3008- Document and content management
3009- Team collaboration and sharing
3010
3011**Marketing Automation**
3012- Lead scoring and qualification
3013- Nurture campaign integration
3014- Content delivery automation
3015- Multi-channel orchestration
3016
3017Remember: Acting on signals is about building relationships, not just making sales. Focus on providing value and the sales will follow! 💪
3018      `},"advanced-search-techniques":{title:"Advanced Search Techniques",description:"Master the company search functionality to find perfect prospects.",readTime:"9 min read",difficulty:"Intermediate",lastUpdated:"2024-01-15",author:"Research Team",content:`
3019# Advanced Search Techniques
3020
3021Master the art of company research with advanced search techniques that help you find perfect prospects efficiently and effectively.
3022
3023## Search Interface Overview
3024
3025### Basic Search Elements
3026- **Search Bar**: Company name, domain, or keyword search
3027- **Filters Panel**: Narrow results by specific criteria
3028- **Results Grid**: Company listings with key information
3029- **Detail View**: Comprehensive company intelligence
3030- **Export Options**: Save and export prospect lists
3031
3032### Search Operators
3033
3034**Text Search Operators**
3035- **Exact Match**: Use quotes "company name"
3036- **Wildcard**: Use * for partial matches (tech*)
3037- **Exclusion**: Use minus sign (-excluded term)
3038- **OR Logic**: Use OR between terms (SaaS OR software)
3039
3040**Advanced Syntax**
3041- **Industry**: industry:"Software Development"
3042- **Location**: location:"San Francisco"
3043- **Size**: employees:100-500
3044- **Domain**: domain:*.com
3045
3046## Filter Strategies
3047
3048### Company Characteristics
3049
3050**Industry Targeting**
3051- **Primary Industry**: Main business category
3052- **Sub-Industries**: Specific market segments
3053- **Industry Exclusions**: Remove irrelevant sectors
3054- **Related Industries**: Adjacent market opportunities
3055
3056**Size Parameters**
3057- **Employee Count**: Total workforce size
3058- **Revenue Range**: Annual revenue estimates
3059- **Growth Rate**: Hiring and expansion velocity
3060- **Department Sizes**: Specific team sizes (sales, engineering)
3061
3062### Geographic Filtering
3063
3064**Location Hierarchy**
3065- **Country**: National market focus
3066- **State/Province**: Regional targeting
3067- **City**: Local market concentration
3068- **Metro Area**: Urban region focus
3069
3070**Multi-Location Companies**
3071- **Headquarters**: Primary office location
3072- **All Offices**: Companies with presence in region
3073- **Expansion Activity**: Recently opened offices
3074- **Remote-First**: Distributed workforce companies
3075
3076### Technology Stack Filtering
3077
3078**Categories Available**
3079- **CRM Systems**: Salesforce, HubSpot, Pipedrive
3080- **Marketing Tools**: Marketo, Pardot, Mailchimp
3081- **Development**: React, Python, AWS, Docker
3082- **Analytics**: Google Analytics, Mixpanel, Segment
3083- **Communication**: Slack, Microsoft Teams, Zoom
3084
3085**Search Strategies**
3086- **Complementary Tools**: Find users of related technologies
3087- **Migration Opportunities**: Target outdated technology users
3088- **Integration Prospects**: Companies using compatible systems
3089- **Competitive Intelligence**: Monitor competitor tool usage
3090
3091## Advanced Search Techniques
3092
3093### Boolean Logic Mastery
3094
3095**Complex Queries**
3096Combine multiple criteria with AND/OR/NOT logic:
3097
3098    (industry:"SaaS" OR industry:"Software") 
3099    AND employees:50-200 
3100    AND location:"United States" 
3101    AND NOT technology:"Competitor Tool"
3102
3103**Nested Conditions**
3104Group related criteria for precise targeting:
3105
3106    (funding:"Series A" OR funding:"Series B") 
3107    AND (location:"California" OR location:"New York")
3108    AND technology:"Salesforce"
3109
3110### Saved Search Strategies
3111
3112**ICP-Based Searches**
3113Create saved searches for different customer profiles:
3114- **Enterprise**: Large companies with specific needs
3115- **Mid-Market**: Growing companies with expansion signals
3116- **Startup**: Early-stage companies with funding
3117- **Geographic**: Region-specific prospect lists
3118
3119**Signal-Triggered Searches**
3120Combine search with business signals:
3121- Recently funded companies in your industry
3122- Companies hiring in specific departments
3123- Organizations adopting complementary technologies
3124- Businesses expanding into new markets
3125
3126### Research Workflow Optimization
3127
3128**Progressive Filtering**
3129Start broad and narrow systematically:
3130
31311. **Industry Filter**: Select primary industry
31322. **Size Filter**: Add company size range
31333. **Location Filter**: Specify geographic focus
31344. **Technology Filter**: Add relevant tech stack
31355. **Signals Filter**: Include recent business events
3136
3137**Quality Scoring**
3138Use platform scoring to prioritize:
3139- **Match Score**: How well company fits your ICP
3140- **Signal Strength**: Recent activity and events
3141- **Contact Availability**: Decision maker access
3142- **Engagement Potential**: Likelihood of response
3143
3144## Research Deep Dives
3145
3146### Company Intelligence Analysis
3147
3148**Financial Health Assessment**
3149- **Funding History**: Investment rounds and valuations
3150- **Revenue Estimates**: Growth trajectory analysis
3151- **Market Position**: Competitive standing
3152- **Risk Factors**: Financial stability indicators
3153
3154**Technology Landscape**
3155- **Current Stack**: Tools and platforms in use
3156- **Recent Adoptions**: New technology implementations
3157- **Integration Opportunities**: Compatibility analysis
3158- **Technology Roadmap**: Planned implementations
3159
3160**Growth Indicators**
3161- **Hiring Velocity**: Team expansion patterns
3162- **Market Expansion**: Geographic or vertical growth
3163- **Product Development**: New offerings and features
3164- **Partnership Activity**: Strategic alliances
3165
3166### Competitive Intelligence
3167
3168**Market Landscape Mapping**
3169- **Direct Competitors**: Same solution providers
3170- **Indirect Competitors**: Alternative approaches
3171- **Complementary Vendors**: Partnership opportunities
3172- **Market Gaps**: Underserved segments
3173
3174**Competitive Analysis**
3175- **Win/Loss Patterns**: Success factors identification
3176- **Positioning Opportunities**: Differentiation angles
3177- **Market Timing**: Optimal engagement windows
3178- **Competitive Threats**: Risk assessment
3179
3180## Data Quality and Verification
3181
3182### Information Accuracy
3183
3184**Source Verification**
3185- **Primary Sources**: Company websites and announcements
3186- **Secondary Sources**: News and industry reports
3187- **Third-Party Data**: Verified information providers
3188- **User Contributions**: Community-verified updates
3189
3190**Data Freshness**
3191- **Update Frequency**: How recently information was refreshed
3192- **Staleness Indicators**: Outdated information flags
3193- **Verification Status**: Confirmed vs. estimated data
3194- **Change Tracking**: Historical data evolution
3195
3196### Quality Assurance
3197
3198**Red Flags to Watch**
3199- **Inconsistent Information**: Conflicting data points
3200- **Outdated Details**: Old contact information
3201- **Missing Critical Data**: Incomplete profiles
3202- **Unusual Patterns**: Anomalous data points
3203
3204**Verification Methods**
3205- **Cross-Reference**: Multiple source confirmation
3206- **Direct Verification**: Company website checking
3207- **Social Proof**: LinkedIn and social media validation
3208- **Recent Activity**: Current engagement indicators
3209
3210## Export and Organization
3211
3212### List Management
3213
3214**Segmentation Strategies**
3215- **Priority Levels**: High, medium, low priority prospects
3216- **Campaign Types**: Different outreach approaches
3217- **Geographic Segments**: Regional sales territories
3218- **Industry Verticals**: Specialized messaging needs
3219
3220**Export Optimization**
3221- **Field Selection**: Include relevant data points only
3222- **Format Choice**: CSV, Excel, CRM-compatible
3223- **Batch Sizes**: Manageable prospect quantities
3224- **Update Frequency**: Regular list refreshes
3225
3226### CRM Integration
3227
3228**Data Mapping**
3229- **Field Alignment**: Match platform fields to CRM
3230- **Custom Properties**: Additional data incorporation
3231- **Duplicate Prevention**: Avoid record conflicts
3232- **Update Protocols**: Sync frequency and methods
3233
3234**Workflow Integration**
3235- **Lead Routing**: Automatic assignment rules
3236- **Task Creation**: Follow-up activity scheduling
3237- **Campaign Tracking**: Source attribution
3238- **Performance Measurement**: Conversion tracking
3239
3240## Advanced Tips and Tricks
3241
3242### Power User Techniques
3243
3244**Search Automation**
3245- **Scheduled Searches**: Regular prospect discovery
3246- **Alert Integration**: Signal-triggered searches
3247- **API Usage**: Programmatic search execution
3248- **Bulk Operations**: Large-scale data processing
3249
3250**Research Efficiency**
3251- **Keyboard Shortcuts**: Faster navigation
3252- **Bulk Actions**: Multi-company operations
3253- **Template Usage**: Standardized research processes
3254- **Time-Boxing**: Focused research sessions
3255
3256### Troubleshooting Common Issues
3257
3258**No Results Found**
3259- **Broaden Criteria**: Reduce filter restrictiveness
3260- **Check Spelling**: Verify search terms
3261- **Alternative Keywords**: Try different terminology
3262- **Filter Review**: Remove conflicting criteria
3263
3264**Too Many Results**
3265- **Add Filters**: Narrow search criteria
3266- **Quality Thresholds**: Increase match requirements
3267- **Negative Filters**: Exclude unwanted companies
3268- **Geographic Focus**: Reduce location scope
3269
3270Remember: Great research is the foundation of successful sales. Invest time in mastering these techniques for better results! 🔍
3271      `},"data-export-workflows":{title:"Data Export Workflows",description:"Efficiently export and organize company data for your sales processes.",readTime:"5 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Operations Team",content:`
3272# Data Export Workflows
3273
3274Learn how to efficiently export and organize company data to seamlessly integrate with your existing sales processes and tools.
3275
3276## Export Options Overview
3277
3278### Available Export Formats
3279
3280**CSV (Comma Separated Values)**
3281- **Best For**: Excel analysis, data manipulation
3282- **Features**: Universal compatibility, lightweight
3283- **Use Cases**: Data analysis, reporting, custom imports
3284
3285**Excel (XLSX)**
3286- **Best For**: Advanced spreadsheet analysis
3287- **Features**: Rich formatting, formulas, charts
3288- **Use Cases**: Team collaboration, presentation-ready reports
3289
3290**CRM-Ready Formats**
3291- **Salesforce**: Native field mapping
3292- **HubSpot**: Direct import compatibility
3293- **Pipedrive**: Pre-configured templates
3294- **Custom**: Configurable field mapping
3295
3296### Export Content Options
3297
3298**Company Information**
3299- Basic company details (name, industry, size)
3300- Contact information and website
3301- Technology stack and tools used
3302- Financial data and funding history
3303
3304**Business Intelligence**
3305- Recent business signals and events
3306- Growth indicators and trends
3307- Competitive intelligence
3308- Market positioning data
3309
3310**Contact Data**
3311- Decision maker information
3312- Contact details and social profiles
3313- Organization charts and reporting structure
3314- Communication preferences and history
3315
3316## Setting Up Export Workflows
3317
3318### Standard Workflow Process
3319
3320**Step 1: Search and Filter**
33211. Execute your search with appropriate filters
33222. Review results for quality and relevance
33233. Refine criteria as needed
33244. Save search for future use
3325
3326**Step 2: Selection and Review**
33271. Select companies for export (individual or bulk)
33282. Review company details for accuracy
33293. Add notes or tags as needed
33304. Verify contact information completeness
3331
3332**Step 3: Export Configuration**
33331. Choose export format
33342. Select data fields to include
33353. Configure any custom mappings
33364. Set file naming conventions
3337
3338**Step 4: Download and Organize**
33391. Download exported file
33402. Organize in appropriate folder structure
33413. Import into target system
33424. Verify data integrity
3343
3344### Batch Processing Workflows
3345
3346**Large List Management**
3347For lists over 1,000 companies:
3348- Export in smaller batches (250-500 companies)
3349- Use consistent naming conventions
3350- Track export progress and completion
3351- Merge files if needed for final use
3352
3353**Segmented Exports**
3354Divide exports by relevant criteria:
3355- Geographic regions for territory assignment
3356- Industry verticals for specialized campaigns
3357- Company sizes for different sales approaches
3358- Signal types for targeted messaging
3359
3360## Field Selection and Customization
3361
3362### Essential Data Fields
3363
3364**Company Basics**
3365- Company name and legal name
3366- Industry and sub-industry
3367- Employee count and revenue
3368- Headquarters location
3369- Website and domain
3370
3371**Contact Information**
3372- Primary contact name and title
3373- Email address and phone number
3374- LinkedIn profile URL
3375- Direct dial numbers (when available)
3376- Office locations and addresses
3377
3378**Intelligence Data**
3379- Technology stack summary
3380- Recent business signals
3381- Funding history and status
3382- Growth indicators
3383- Competitive positioning
3384
3385### Custom Field Mapping
3386
3387**CRM Integration Fields**
3388Map platform fields to your CRM structure:
3389- **Lead Source**: "Slay Your Sales"
3390- **Campaign**: Specific campaign identifier
3391- **Lead Score**: Platform match score
3392- **Tags**: Signal types or research notes
3393
3394**Sales Process Fields**
3395Add workflow-specific information:
3396- **Territory Assignment**: Sales rep or region
3397- **Priority Level**: A, B, C categorization
3398- **Follow-up Date**: Planned outreach timing
3399- **Campaign Type**: Email, phone, social approach
3400
3401## Integration with Sales Tools
3402
3403### CRM Import Processes
3404
3405**Salesforce Integration**
34061. Export using Salesforce-compatible format
34072. Use Data Import Wizard or Data Loader
34083. Map fields to standard Salesforce objects
34094. Set up duplicate detection rules
34105. Verify import success and data quality
3411
3412**HubSpot Integration**
34131. Export with HubSpot field mapping
34142. Use HubSpot's import tool
34153. Configure property mapping
34164. Set up lead scoring and workflows
34175. Monitor import progress and errors
3418
3419**Pipedrive Integration**
34201. Export using Pipedrive template
34212. Use Pipedrive's import feature
34223. Map custom fields as needed
34234. Set up automation triggers
34245. Verify contact and organization creation
3425
3426### Marketing Automation Integration
3427
3428**Email Marketing Platforms**
3429- **Mailchimp**: Direct list upload and segmentation
3430- **Constant Contact**: Contact import with tagging
3431- **Pardot**: Lead import with scoring
3432- **Marketo**: Database upload with program assignment
3433
3434**Outreach Tools**
3435- **Outreach.io**: Prospect upload and sequence assignment
3436- **Salesloft**: Cadence import and personalization
3437- **Reply.io**: Campaign import and automation setup
3438- **Mixmax**: Contact import and template assignment
3439
3440## Quality Control and Verification
3441
3442### Pre-Export Quality Checks
3443
3444**Data Completeness**
3445- Verify essential fields are populated
3446- Check for missing contact information
3447- Validate email addresses and phone numbers
3448- Confirm company information accuracy
3449
3450**Relevance Assessment**
3451- Review ICP alignment
3452- Check signal relevance and timing
3453- Verify geographic targeting
3454- Assess technology stack matches
3455
3456### Post-Export Validation
3457
3458**Data Integrity Checks**
3459- Compare record counts (exported vs. selected)
3460- Verify field mapping accuracy
3461- Check for data truncation or formatting issues
3462- Validate special characters and encoding
3463
3464**Import Verification**
3465- Confirm successful CRM import
3466- Check for duplicate creation
3467- Verify field population
3468- Test automation triggers and workflows
3469
3470## Automation and Scheduling
3471
3472### Automated Export Workflows
3473
3474**Scheduled Exports**
3475Set up regular exports for:
3476- Weekly new prospect lists
3477- Monthly industry updates
3478- Quarterly ICP refreshes
3479- Signal-triggered exports
3480
3481**Trigger-Based Exports**
3482Automatically export when:
3483- New companies match saved searches
3484- Specific business signals occur
3485- Campaign capacity becomes available
3486- Team member requests new leads
3487
3488### Workflow Optimization
3489
3490**Template Creation**
3491Develop standardized templates for:
3492- Different CRM systems
3493- Various campaign types
3494- Team member preferences
3495- Client-specific requirements
3496
3497**Process Documentation**
3498Maintain clear documentation for:
3499- Export procedures and settings
3500- Field mapping configurations
3501- Quality control checklists
3502- Troubleshooting common issues
3503
3504## Advanced Export Techniques
3505
3506### API-Based Exports
3507
3508**Direct API Integration**
3509For technical teams:
3510- Real-time data synchronization
3511- Custom field mapping
3512- Automated quality controls
3513- Error handling and logging
3514
3515**Webhook Integration**
3516Set up webhooks for:
3517- Automatic CRM updates
3518- Real-time prospect notifications
3519- Campaign trigger automation
3520- Performance tracking
3521
3522### Bulk Operations
3523
3524**Large-Scale Exports**
3525Handle enterprise-level exports:
3526- Parallel processing for speed
3527- Error recovery and retry logic
3528- Progress tracking and reporting
3529- Performance optimization
3530
3531**Data Pipeline Integration**
3532Connect with existing data pipelines:
3533- ETL process integration
3534- Data warehouse loading
3535- Business intelligence feeds
3536- Reporting automation
3537
3538## Troubleshooting Common Issues
3539
3540### Export Failures
3541
3542**Common Causes**
3543- File size limitations
3544- Network connectivity issues
3545- Field mapping conflicts
3546- Permission restrictions
3547
3548**Solutions**
3549- Reduce batch sizes
3550- Check internet connection
3551- Verify field configurations
3552- Confirm user permissions
3553
3554### Import Problems
3555
3556**CRM Import Issues**
3557- Duplicate detection conflicts
3558- Field mapping mismatches
3559- Data format incompatibilities
3560- Validation rule violations
3561
3562**Resolution Steps**
3563- Review CRM import logs
3564- Adjust field mappings
3565- Modify data formats
3566- Update validation rules
3567
3568Remember: A well-organized export workflow saves time and reduces errors in your sales process! 📊
3569      `},"research-best-practices":{title:"Research Best Practices",description:"Proven strategies for effective and efficient company research.",readTime:"7 min read",difficulty:"Intermediate",lastUpdated:"2024-01-15",author:"Sales Research Team",content:`
3570# Research Best Practices
3571
3572Master the art of effective company research with proven strategies that maximize your time investment and improve prospect quality.
3573
3574## Research Strategy Framework
3575
3576### Define Your Research Goals
3577
3578**Primary Objectives**
3579- **Qualification**: Does this company fit our ICP?
3580- **Opportunity**: What specific needs might they have?
3581- **Timing**: When is the best time to reach out?
3582- **Approach**: How should we position our solution?
3583
3584**Research Depth Levels**
3585- **Screening (2-3 minutes)**: Basic qualification check
3586- **Standard (5-10 minutes)**: Comprehensive prospect research
3587- **Deep Dive (15-30 minutes)**: Strategic account analysis
3588- **Competitive (30+ minutes)**: Market intelligence gathering
3589
3590### Research Prioritization
3591
3592**High-Priority Research**
3593- Companies with recent positive business signals
3594- Prospects referred by existing customers
3595- Strategic accounts with high deal potential
3596- Competitors' customers showing dissatisfaction
3597
3598**Standard Research**
3599- Inbound leads requiring qualification
3600- Companies matching your ICP criteria
3601- Prospects identified through standard prospecting
3602- Companies in your target market segments
3603
3604**Low-Priority Research**
3605- Companies with weak signal indicators
3606- Prospects outside core ICP parameters
3607- Long-shot opportunities with low probability
3608- Research for informational purposes only
3609
3610## Systematic Research Process
3611
3612### Phase 1: Initial Assessment (2-3 minutes)
3613
3614**Company Basics Verification**
3615- Confirm company name and correct entity
3616- Verify industry classification and business model
3617- Check company size and growth trajectory
3618- Assess geographic relevance
3619
3620**Quick Qualification**
3621- Does company size match your ICP?
3622- Is industry alignment strong?
3623- Are there any immediate disqualifiers?
3624- Is this worth deeper research?
3625
3626### Phase 2: Business Intelligence (5-7 minutes)
3627
3628**Financial Health Assessment**
3629- Review funding history and current status
3630- Assess revenue estimates and growth indicators
3631- Check for any financial challenges or opportunities
3632- Evaluate market position and competitive standing
3633
3634**Technology Stack Analysis**
3635- Identify current tools and platforms
3636- Look for integration opportunities
3637- Assess technology maturity and strategy
3638- Find potential pain points or gaps
3639
3640**Growth and Change Signals**
3641- Recent hiring activities and team expansion
3642- New product launches or feature releases
3643- Market expansion or geographic growth
3644- Leadership changes and strategic shifts
3645
3646### Phase 3: Contact Research (3-5 minutes)
3647
3648**Decision Maker Identification**
3649- Find relevant stakeholders for your solution
3650- Verify current employment and titles
3651- Assess decision-making authority
3652- Identify potential champions and influencers
3653
3654**Contact Information Gathering**
3655- Collect direct email addresses when possible
3656- Find phone numbers and LinkedIn profiles
3657- Note communication preferences and styles
3658- Gather insights for personalization
3659
3660## Multi-Source Research Strategy
3661
3662### Primary Sources (Most Reliable)
3663
3664**Company Website**
3665- About page for company story and mission
3666- Leadership team and key personnel
3667- Product/service offerings and positioning
3668- News and press release sections
3669- Career pages for hiring and growth signals
3670
3671**Financial Filings and Reports**
3672- SEC filings for public companies
3673- Annual reports and investor presentations
3674- Earnings calls and financial updates
3675- Industry analyst reports and coverage
3676
3677### Secondary Sources (Good Validation)
3678
3679**News and Media Coverage**
3680- Recent press coverage and industry mentions
3681- Product launches and company announcements
3682- Leadership interviews and thought leadership
3683- Industry awards and recognition
3684
3685**Social Media and Professional Networks**
3686- LinkedIn company and employee updates
3687- Twitter engagement and company voice
3688- Industry forum participation
3689- Conference speaking and attendance
3690
3691### Third-Party Intelligence (Contextual)
3692
3693**Industry Databases**
3694- Crunchbase for funding and company data
3695- PitchBook for investment intelligence
3696- G2 and Capterra for technology reviews
3697- Industry-specific databases and directories
3698
3699**Competitive Intelligence**
3700- Competitor customer lists and case studies
3701- Win/loss analysis and market share data
3702- Product comparison and feature analysis
3703- Pricing and positioning intelligence
3704
3705## Research Efficiency Techniques
3706
3707### Time Management Strategies
3708
3709**Time Boxing**
3710- Set specific time limits for each research phase
3711- Use timers to maintain focus and efficiency
3712- Prioritize high-impact information gathering
3713- Know when to stop and move to action
3714
3715**Research Templates**
3716Create standardized templates for:
3717- Basic company qualification criteria
3718- Standard research questions and data points
3719- Information organization and note-taking
3720- Decision-making frameworks and scorecards
3721
3722### Information Organization
3723
3724**Research Documentation**
3725- Use consistent note-taking formats
3726- Organize information by relevance and priority
3727- Tag insights for easy retrieval and reference
3728- Create summary bullets for quick review
3729
3730**Knowledge Management**
3731- Build company research database
3732- Share insights across team members
3733- Create industry and vertical intelligence files
3734- Maintain competitive intelligence repositories
3735
3736## Quality Control and Verification
3737
3738### Information Accuracy
3739
3740**Source Verification**
3741- Cross-reference information across multiple sources
3742- Prioritize primary sources over secondary reports
3743- Check information recency and update dates
3744- Verify key facts through direct observation
3745
3746**Bias Recognition**
3747- Account for source bias and perspectives
3748- Seek diverse viewpoints and information sources
3749- Question assumptions and validate hypotheses
3750- Distinguish between facts and opinions
3751
3752### Research Validation
3753
3754**Peer Review Process**
3755- Have colleagues review research on key accounts
3756- Share findings and gather alternative perspectives
3757- Validate assumptions and conclusions
3758- Cross-check competitive intelligence
3759
3760**Customer Feedback Integration**
3761- Incorporate insights from existing customers
3762- Use customer success stories for validation
3763- Leverage customer network for introductions
3764- Apply customer feedback to research insights
3765
3766## Advanced Research Techniques
3767
3768### Social Intelligence Gathering
3769
3770**LinkedIn Advanced Search**
3771- Use LinkedIn Sales Navigator for deep insights
3772- Track company and contact changes over time
3773- Monitor content engagement and thought leadership
3774- Identify mutual connections and warm introductions
3775
3776**Social Media Monitoring**
3777- Follow company social media for real-time updates
3778- Monitor hashtags and industry conversations
3779- Track executive social media presence and views
3780- Identify company culture and values alignment
3781
3782### Competitive Intelligence
3783
3784**Win/Loss Analysis**
3785- Research competitors' customer success stories
3786- Analyze competitive positioning and messaging
3787- Identify differentiation opportunities
3788- Understand market perception and brand strength
3789
3790**Market Intelligence**
3791- Track industry trends and developments
3792- Monitor regulatory changes and compliance requirements
3793- Assess market timing and opportunity windows
3794- Identify emerging opportunities and threats
3795
3796## Research-to-Action Conversion
3797
3798### Insight Synthesis
3799
3800**Key Findings Summary**
3801- Distill research into actionable insights
3802- Identify top 3-5 most relevant findings
3803- Connect insights to solution value propositions
3804- Prioritize insights by business impact
3805
3806**Opportunity Assessment**
3807- Evaluate fit between insights and solution capabilities
3808- Assess timing for engagement and outreach
3809- Identify potential objections and concerns
3810- Develop value hypothesis and messaging angles
3811
3812### Personalization Preparation
3813
3814**Message Personalization**
3815- Use specific research insights in outreach
3816- Reference recent company developments
3817- Connect solution to identified business needs
3818- Demonstrate understanding of company challenges
3819
3820**Conversation Preparation**
3821- Prepare intelligent questions based on research
3822- Anticipate prospect concerns and objections
3823- Develop discussion topics and value stories
3824- Plan follow-up resources and materials
3825
3826## Continuous Improvement
3827
3828### Research Performance Tracking
3829
3830**Efficiency Metrics**
3831- Time spent per prospect researched
3832- Research-to-meeting conversion rates
3833- Quality of research insights generated
3834- Accuracy of research predictions
3835
3836**Effectiveness Measurement**
3837- Meeting booking rates from researched prospects
3838- Conversion rates by research depth level
3839- Pipeline value from research-driven outreach
3840- Customer acquisition from researched prospects
3841
3842### Skill Development
3843
3844**Research Training**
3845- Regular training on new research tools and techniques
3846- Industry knowledge development and updates
3847- Competitive intelligence training and sharing
3848- Research methodology improvement workshops
3849
3850**Knowledge Sharing**
3851- Team research insight sharing sessions
3852- Best practice documentation and training
3853- Research template and process standardization
3854- Mentor newer team members on research excellence
3855
3856Remember: Great research is an investment in relationship building and sales success. Quality research leads to quality conversations! 🔍
3857      `},"profile-optimization":{title:"Profile Optimization",description:"Optimize your company profile for better matchmaking results.",readTime:"6 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Matchmaking Team",content:`
3858# Profile Optimization
3859
3860Optimize your company profile to attract the right business partners and maximize your matchmaking success rate.
3861
3862## Profile Foundation
3863
3864### Company Basics
3865
3866**Essential Information**
3867- **Company Name**: Use your official business name
3868- **Industry**: Select primary and secondary industries
3869- **Company Size**: Current employee count
3870- **Location**: Headquarters and key office locations
3871- **Website**: Primary company website URL
3872
3873**Business Model Details**
3874- **Revenue Model**: How your company generates revenue
3875- **Target Market**: B2B, B2C, or hybrid approach
3876- **Business Stage**: Startup, growth, mature, enterprise
3877- **Key Products/Services**: Core offerings and solutions
3878
3879### Value Proposition
3880
3881**Unique Selling Points**
3882- What makes your company different?
3883- Key competitive advantages
3884- Unique capabilities or expertise
3885- Market position and strengths
3886
3887**Partner Value**
3888- What value do you bring to partnerships?
3889- Resources available for collaboration
3890- Market access and distribution channels
3891- Technology or expertise sharing potential
3892
3893## Strategic Positioning
3894
3895### Partnership Goals
3896
3897**Partnership Types**
3898- **Technology Integrations**: API partnerships, platform extensions
3899- **Channel Partnerships**: Reseller, distributor relationships
3900- **Strategic Alliances**: Co-marketing, co-selling arrangements
3901- **Vendor Partnerships**: Service provider relationships
3902
3903**Collaboration Interests**
3904- **Market Expansion**: Geographic or vertical growth
3905- **Product Development**: Joint solution development
3906- **Customer Acquisition**: Shared lead generation
3907- **Innovation**: R&D collaboration and knowledge sharing
3908
3909### Target Partner Profile
3910
3911**Ideal Partner Characteristics**
3912- **Industry Focus**: Complementary or adjacent industries
3913- **Company Size**: Similar or compatible organization size
3914- **Geographic Presence**: Overlapping or complementary markets
3915- **Business Model**: Compatible revenue and go-to-market strategies
3916
3917**Partnership Criteria**
3918- **Cultural Alignment**: Shared values and work styles
3919- **Technology Compatibility**: Technical integration potential
3920- **Market Positioning**: Non-competitive positioning
3921- **Growth Stage**: Compatible development phases
3922
3923## Profile Content Optimization
3924
3925### Compelling Descriptions
3926
3927**Company Summary**
3928Write a clear, engaging company description:
3929- Start with your mission and vision
3930- Highlight key achievements and milestones
3931- Explain your market position and expertise
3932- Include notable clients or partnerships
3933
3934**Partnership Pitch**
3935Craft a compelling partnership value proposition:
3936- Clearly state what you're looking for
3937- Explain mutual benefits and opportunities
3938- Highlight unique resources and capabilities
3939- Include specific collaboration examples
3940
3941### Technology and Capabilities
3942
3943**Technology Stack**
3944- **Core Technologies**: Primary platforms and tools
3945- **Integration Capabilities**: APIs and technical partnerships
3946- **Development Expertise**: Programming languages and frameworks
3947- **Infrastructure**: Cloud platforms and scaling capabilities
3948
3949**Service Capabilities**
3950- **Core Services**: Primary service offerings
3951- **Expertise Areas**: Specialized knowledge and skills
3952- **Delivery Models**: How you work with partners and clients
3953- **Support Capabilities**: Customer success and technical support
3954
3955## Visual and Brand Elements
3956
3957### Professional Presentation
3958
3959**Logo and Branding**
3960- Upload high-quality company logo
3961- Use consistent brand colors and styling
3962- Ensure professional visual presentation
3963- Maintain brand guidelines compliance
3964
3965**Company Images**
3966- Team photos showing company culture
3967- Office or facility images
3968- Product or service demonstrations
3969- Customer success story visuals
3970
3971### Contact Information
3972
3973**Key Contacts**
3974- **Partnership Lead**: Primary partnership contact
3975- **Business Development**: BD team contact information
3976- **Technical Contact**: CTO or technical partnership lead
3977- **Executive Contact**: CEO or executive sponsor
3978
3979**Communication Preferences**
3980- Preferred contact methods and timing
3981- Meeting availability and scheduling preferences
3982- Response time expectations
3983- Communication style preferences
3984
3985## Match Quality Optimization
3986
3987### Keyword Strategy
3988
3989**Industry Keywords**
3990Include relevant industry terms:
3991- Primary industry terminology
3992- Technology and solution keywords
3993- Market segment descriptions
3994- Compliance and certification terms
3995
3996**Partnership Keywords**
3997Use partnership-specific language:
3998- Partnership types you're seeking
3999- Collaboration models you prefer
4000- Integration capabilities you offer
4001- Market access you can provide
4002
4003### Compatibility Factors
4004
4005**Business Alignment**
4006- **Values and Culture**: Shared business philosophy
4007- **Growth Stage**: Compatible development phases
4008- **Market Approach**: Similar go-to-market strategies
4009- **Customer Focus**: Overlapping target markets
4010
4011**Operational Compatibility**
4012- **Time Zones**: Geographic and scheduling alignment
4013- **Communication Style**: Formal vs. informal preferences
4014- **Decision-Making**: Speed and process compatibility
4015- **Technology**: Platform and tool compatibility
4016
4017## Profile Performance Monitoring
4018
4019### Analytics and Insights
4020
4021**Profile Performance Metrics**
4022- **Profile Views**: How often your profile is viewed
4023- **Match Quality**: Average match scores received
4024- **Interest Generation**: Inquiries and connection requests
4025- **Response Rates**: Engagement with outreach attempts
4026
4027**Optimization Indicators**
4028- **Low Match Scores**: May indicate profile too narrow
4029- **High Views, Low Engagement**: Content may need improvement
4030- **Few Profile Views**: May need broader keyword inclusion
4031- **Quality Mismatches**: Targeting criteria may need adjustment
4032
4033### Continuous Improvement
4034
4035**Regular Profile Updates**
4036- **Monthly Reviews**: Update recent achievements and changes
4037- **Quarterly Optimization**: Refine keywords and descriptions
4038- **Annual Overhaul**: Complete profile review and refresh
4039- **Event-Triggered Updates**: Update after major company changes
4040
4041**A/B Testing Approach**
4042- **Description Variations**: Test different value propositions
4043- **Keyword Testing**: Experiment with different industry terms
4044- **Contact Information**: Test different primary contacts
4045- **Image Testing**: Try different visual presentations
4046
4047## Common Optimization Mistakes
4048
4049### Profile Completeness Issues
4050
4051**Incomplete Information**
4052- Missing key contact information
4053- Vague or generic company descriptions
4054- Outdated technology stack information
4055- Unclear partnership goals and interests
4056
4057**Over-Optimization**
4058- Keyword stuffing without natural language
4059- Too broad targeting that lacks focus
4060- Unrealistic partnership expectations
4061- Overly complex or technical descriptions
4062
4063### Targeting Problems
4064
4065**Too Narrow Focus**
4066- Overly specific industry targeting
4067- Limited geographic or size requirements
4068- Restrictive technology requirements
4069- Exclusive partnership model preferences
4070
4071**Too Broad Approach**
4072- Generic partnership interests
4073- Unclear target partner characteristics
4074- Vague value proposition statements
4075- Lack of specific collaboration examples
4076
4077## Industry-Specific Optimization
4078
4079### Technology Companies
4080
4081**Key Focus Areas**
4082- Technical integration capabilities
4083- API documentation and developer resources
4084- Scalability and performance characteristics
4085- Security and compliance certifications
4086
4087**Partnership Opportunities**
4088- Platform integrations and extensions
4089- Technology stack complementarity
4090- Developer ecosystem participation
4091- Joint solution development
4092
4093### Service Companies
4094
4095**Emphasis Areas**
4096- Service delivery methodologies
4097- Industry expertise and specializations
4098- Geographic coverage and capabilities
4099- Client success stories and case studies
4100
4101**Collaboration Models**
4102- Subcontracting and white-label services
4103- Referral and lead sharing programs
4104- Joint service delivery partnerships
4105- Market expansion collaborations
4106
4107Remember: A well-optimized profile is your first impression in the matchmaking process. Make it count! 🎯
4108      `},"understanding-match-scores":{title:"Understanding Match Scores",description:"Learn how match scores work and what they mean for partnership potential.",readTime:"4 min read",difficulty:"Beginner",lastUpdated:"2024-01-15",author:"Algorithm Team",content:`
4109# Understanding Match Scores
4110
4111Learn how our matchmaking algorithm calculates compatibility scores and what they mean for your partnership success potential.
4112
4113## Match Score Fundamentals
4114
4115### What is a Match Score?
4116
4117**Definition**
4118A match score is a numerical rating (0-100) that represents the compatibility between your company and a potential partner based on multiple factors analyzed by our AI algorithm.
4119
4120**Score Ranges**
4121- **90-100**: Exceptional match - High partnership potential
4122- **80-89**: Excellent match - Strong compatibility indicators
4123- **70-79**: Good match - Solid partnership foundation
4124- **60-69**: Fair match - Some compatibility with potential challenges
4125- **Below 60**: Poor match - Limited partnership potential
4126
4127### Scoring Methodology
4128
4129**Multi-Factor Analysis**
4130Our algorithm considers dozens of factors across several categories:
4131- **Business Compatibility**: Industry, size, model alignment
4132- **Strategic Fit**: Goals, market focus, growth stage
4133- **Operational Alignment**: Geography, culture, communication style
4134- **Technology Compatibility**: Tech stack, integration potential
4135- **Market Opportunity**: Mutual value creation potential
4136
4137**Weighted Scoring**
4138Different factors have different weights based on partnership success data:
4139- **Core Business Factors**: 40% of total score
4140- **Strategic Alignment**: 25% of total score
4141- **Operational Compatibility**: 20% of total score
4142- **Technology Fit**: 15% of total score
4143
4144## Score Component Breakdown
4145
4146### Business Compatibility (40%)
4147
4148**Industry Alignment**
4149- **Complementary Industries**: High scores for synergistic sectors
4150- **Adjacent Markets**: Good scores for related verticals
4151- **Competitive Industries**: Lower scores for direct competition
4152- **Unrelated Sectors**: Variable scores based on other factors
4153
4154**Company Size Compatibility**
4155- **Similar Sizes**: Often indicates operational compatibility
4156- **Complementary Sizes**: Can indicate mentor/partner opportunities
4157- **Significant Disparities**: May suggest resource imbalances
4158- **Growth Stage Alignment**: Startup-to-enterprise considerations
4159
4160### Strategic Alignment (25%)
4161
4162**Partnership Goals**
4163- **Shared Objectives**: High scores for mutual interests
4164- **Complementary Goals**: Good scores for win-win scenarios
4165- **Conflicting Priorities**: Lower scores for misaligned objectives
4166- **Unclear Goals**: Neutral impact on scoring
4167
4168**Market Focus**
4169- **Geographic Overlap**: Shared market understanding
4170- **Customer Segment Alignment**: Similar target audiences
4171- **Distribution Synergies**: Complementary sales channels
4172- **Market Expansion Opportunities**: Mutual growth potential
4173
4174### Operational Compatibility (20%)
4175
4176**Geographic Considerations**
4177- **Time Zone Alignment**: Communication and collaboration ease
4178- **Regional Presence**: Market access and local expertise
4179- **Cultural Compatibility**: Business practice alignment
4180- **Regulatory Environment**: Compliance and legal considerations
4181
4182**Communication and Culture**
4183- **Communication Styles**: Formal vs. informal preferences
4184- **Decision-Making Speed**: Fast vs. deliberate approaches
4185- **Collaboration Preferences**: Meeting styles and frequency
4186- **Work Culture Alignment**: Values and operational philosophy
4187
4188### Technology Compatibility (15%)
4189
4190**Technical Integration Potential**
4191- **Platform Compatibility**: Shared technology ecosystems
4192- **API Availability**: Integration and connectivity options
4193- **Development Approaches**: Agile, waterfall, hybrid methodologies
4194- **Security and Compliance**: Shared standards and requirements
4195
4196**Innovation Alignment**
4197- **Technology Adoption**: Early adopter vs. conservative approaches
4198- **R&D Investment**: Innovation commitment and capability
4199- **Technical Expertise**: Complementary skills and knowledge
4200- **Future Technology Roadmaps**: Strategic technology directions
4201
4202## Interpreting Your Scores
4203
4204### High Scores (80-100)
4205
4206**What It Means**
4207- Strong fundamental compatibility
4208- Multiple alignment factors present
4209- High probability of successful partnership
4210- Lower risk of partnership challenges
4211
4212**Action Steps**
4213- Prioritize outreach to these companies
4214- Prepare detailed partnership proposals
4215- Invest time in relationship building
4216- Consider expedited partnership processes
4217
4218### Medium Scores (60-79)
4219
4220**What It Means**
4221- Some compatibility with potential obstacles
4222- Selective alignment in key areas
4223- Moderate partnership success probability
4224- May require more due diligence
4225
4226**Action Steps**
4227- Investigate specific compatibility factors
4228- Identify and address potential challenges
4229- Consider limited or pilot partnership approaches
4230- Focus on strongest alignment areas
4231
4232### Low Scores (Below 60)
4233
4234**What It Means**
4235- Limited compatibility indicators
4236- Significant alignment challenges
4237- Lower partnership success probability
4238- May require creative partnership structures
4239
4240**Action Steps**
4241- Carefully evaluate partnership necessity
4242- Consider alternative relationship models
4243- Focus on specific value exchange opportunities
4244- Proceed with caution and clear expectations
4245
4246## Factors That Influence Scores
4247
4248### Positive Score Drivers
4249
4250**Strong Alignment Indicators**
4251- Complementary product/service offerings
4252- Shared target customer segments
4253- Compatible technology stacks
4254- Similar company values and culture
4255
4256**Partnership Success Factors**
4257- Clear mutual value propositions
4258- Established partnership track records
4259- Strong market positions
4260- Growth momentum and stability
4261
4262### Score Limiters
4263
4264**Compatibility Challenges**
4265- Direct competitive overlap
4266- Conflicting business models
4267- Significant size disparities
4268- Geographic or cultural barriers
4269
4270**Risk Factors**
4271- Financial instability indicators
4272- Poor partnership history
4273- Unclear strategic direction
4274- Technology incompatibilities
4275
4276## Improving Your Match Scores
4277
4278### Profile Optimization
4279
4280**Complete Your Profile**
4281- Ensure all profile sections are complete
4282- Use specific, relevant keywords
4283- Clearly articulate partnership goals
4284- Highlight unique value propositions
4285
4286**Regular Updates**
4287- Keep company information current
4288- Update technology stack information
4289- Refresh partnership interests
4290- Add recent achievements and milestones
4291
4292### Strategic Positioning
4293
4294**Clarify Partnership Strategy**
4295- Define specific partnership types sought
4296- Articulate clear value propositions
4297- Identify ideal partner characteristics
4298- Communicate collaboration preferences
4299
4300**Demonstrate Partnership Readiness**
4301- Showcase successful partnership examples
4302- Highlight partnership capabilities
4303- Provide clear contact information
4304- Establish partnership processes
4305
4306## Using Scores Effectively
4307
4308### Prioritization Strategy
4309
4310**Score-Based Outreach**
4311- Start with highest-scoring matches
4312- Allocate time and resources accordingly
4313- Customize approach based on score level
4314- Track conversion rates by score range
4315
4316**Quality vs. Quantity**
4317- Focus on fewer, higher-quality matches
4318- Invest more time in high-scoring prospects
4319- Use scores to guide resource allocation
4320- Monitor partnership success by initial scores
4321
4322### Score Limitations
4323
4324**What Scores Don't Capture**
4325- Personal relationship chemistry
4326- Timing and market conditions
4327- Internal company dynamics
4328- Specific deal structures and terms
4329
4330**Beyond the Numbers**
4331- Use scores as starting point, not final decision
4332- Consider qualitative factors and intuition
4333- Account for unique circumstances
4334- Evaluate partnership potential holistically
4335
4336Remember: Match scores are a powerful guide, but successful partnerships also depend on timing, execution, and personal relationships! 🎯
4337      `},"advanced-matching-tips":{title:"Advanced Matching Tips",description:"Pro strategies for maximizing your matchmaking success and finding ideal partners.",readTime:"8 min read",difficulty:"Advanced",lastUpdated:"2024-01-15",author:"Partnership Strategy Team",content:`
4338# Advanced Matching Tips
4339
4340Take your partnership discovery to the next level with advanced strategies and techniques for finding ideal business partners.
4341
4342## Strategic Matching Approaches
4343
4344### Multi-Dimensional Partner Search
4345
4346**Partnership Portfolio Strategy**
4347Don't limit yourself to one type of partner:
4348- **Tier 1 Partners**: Strategic, high-value alliances
4349- **Tier 2 Partners**: Operational, channel partnerships
4350- **Tier 3 Partners**: Tactical, project-based collaborations
4351- **Emerging Partners**: Future-focused, innovation partnerships
4352
4353**Ecosystem Mapping**
4354Build a comprehensive partner ecosystem:
4355- **Upstream Partners**: Suppliers and technology providers
4356- **Downstream Partners**: Distributors and implementation partners
4357- **Horizontal Partners**: Complementary solution providers
4358- **Adjacent Partners**: Related industry collaborators
4359
4360### Timing-Based Matching
4361
4362**Market Timing Considerations**
4363- **Economic Cycles**: Partnership appetite varies with market conditions
4364- **Industry Trends**: Align with current technology and business trends
4365- **Seasonal Factors**: Consider industry-specific seasonal patterns
4366- **Company Lifecycle**: Match partnership timing with company growth stages
4367
4368**Signal-Triggered Matching**
4369Use business signals to identify optimal timing:
4370- **Funding Events**: Recently funded companies may seek partnerships
4371- **Leadership Changes**: New executives often bring partnership opportunities
4372- **Product Launches**: New offerings create integration opportunities
4373- **Market Expansion**: Geographic growth creates partnership needs
4374
4375## Advanced Search Techniques
4376
4377### Negative Matching
4378
4379**Exclusion Strategies**
4380Define what you DON'T want in a partner:
4381- **Competitive Overlap**: Exclude direct competitors
4382- **Cultural Misalignment**: Avoid incompatible business cultures
4383- **Technology Conflicts**: Exclude incompatible tech stacks
4384- **Geographic Limitations**: Remove unsuitable geographic regions
4385
4386**Risk Factor Filtering**
4387Screen out potentially problematic partners:
4388- **Financial Instability**: Companies with funding or revenue issues
4389- **Legal Troubles**: Organizations with regulatory or legal challenges
4390- **Poor Reputation**: Companies with negative market perception
4391- **Partnership History**: Organizations with failed partnership track records
4392
4393### Predictive Matching
4394
4395**Growth Trajectory Analysis**
4396Partner with companies showing strong growth indicators:
4397- **Hiring Velocity**: Rapid team expansion signals
4398- **Technology Investment**: Significant tech stack improvements
4399- **Market Expansion**: Geographic or vertical growth activities
4400- **Customer Acquisition**: Strong customer growth patterns
4401
4402**Innovation Indicators**
4403Target companies at the forefront of innovation:
4404- **R&D Investment**: Significant research and development spending
4405- **Patent Activity**: Active intellectual property development
4406- **Technology Adoption**: Early adoption of emerging technologies
4407- **Industry Leadership**: Thought leadership and market influence
4408
4409## Relationship Mapping Strategies
4410
4411### Network Analysis
4412
4413**Mutual Connections**
4414Leverage existing relationships for warm introductions:
4415- **Shared Customers**: Companies serving similar client bases
4416- **Common Investors**: Portfolio companies of shared investors
4417- **Industry Networks**: Connections through trade associations
4418- **Advisory Relationships**: Shared advisors and board members
4419
4420**Second-Degree Connections**
4421Expand your reach through network mapping:
4422- **Partner's Partners**: Your partners' existing alliances
4423- **Customer Networks**: Your customers' vendor ecosystems
4424- **Industry Ecosystems**: Broader industry relationship maps
4425- **Geographic Networks**: Regional business communities
4426
4427### Ecosystem Positioning
4428
4429**Value Chain Integration**
4430Find partners across the value chain:
4431- **Upstream Integration**: Technology and component providers
4432- **Downstream Integration**: Distribution and implementation partners
4433- **Horizontal Integration**: Complementary solution providers
4434- **Platform Integration**: Ecosystem and marketplace partnerships
4435
4436**Competitive Intelligence**
4437Learn from competitor partnerships:
4438- **Successful Alliances**: Study competitor partnership success stories
4439- **Partnership Gaps**: Identify underserved partnership opportunities
4440- **Market Positioning**: Understand competitive partnership strategies
4441- **White Space**: Find unoccupied partnership territories
4442
4443## Partnership Model Innovation
4444
4445### Creative Partnership Structures
4446
4447**Hybrid Partnership Models**
4448Combine different partnership approaches:
4449- **Channel + Technology**: Distribution with integration components
4450- **Strategic + Tactical**: Long-term alliance with short-term projects
4451- **Exclusive + Open**: Exclusive in some areas, open in others
4452- **Equity + Commercial**: Investment combined with commercial terms
4453
4454**Staged Partnership Approach**
4455Build partnerships incrementally:
4456- **Phase 1**: Pilot project or limited collaboration
4457- **Phase 2**: Expanded partnership with defined success metrics
4458- **Phase 3**: Strategic alliance with deeper integration
4459- **Phase 4**: Joint ventures or equity partnerships
4460
4461### Value Creation Models
4462
4463**Mutual Value Engineering**
4464Design partnerships for optimal mutual benefit:
4465- **Revenue Sharing**: Aligned incentive structures
4466- **Cost Optimization**: Shared resource and cost reduction
4467- **Market Access**: Mutual geographic or vertical expansion
4468- **Innovation Acceleration**: Joint R&D and product development
4469
4470**Partnership ROI Optimization**
4471Maximize partnership return on investment:
4472- **Quick Wins**: Identify immediate value creation opportunities
4473- **Long-term Value**: Build sustainable competitive advantages
4474- **Scalability**: Design partnerships that grow with business
4475- **Exit Strategies**: Plan for partnership evolution or conclusion
4476
4477## Technology-Enhanced Matching
4478
4479### AI-Powered Insights
4480
4481**Machine Learning Optimization**
4482Leverage AI for better matching:
4483- **Pattern Recognition**: Identify successful partnership patterns
4484- **Predictive Scoring**: Use ML to predict partnership success
4485- **Recommendation Engines**: Get AI-suggested potential partners
4486- **Behavioral Analysis**: Understand partner engagement patterns
4487
4488**Data-Driven Decision Making**
4489Use analytics to improve matching:
4490- **Success Metrics**: Track and analyze partnership outcomes
4491- **Conversion Analysis**: Understand match-to-partnership conversion
4492- **Quality Indicators**: Identify characteristics of successful partnerships
4493- **Performance Optimization**: Continuously improve matching criteria
4494
4495### Automation and Efficiency
4496
4497**Automated Screening**
4498Use technology to scale your partner search:
4499- **Automated Qualification**: Set criteria for automatic partner screening
4500- **Alert Systems**: Get notified of new qualifying partners
4501- **Batch Processing**: Evaluate multiple potential partners efficie
4501ntly
4502- **Integration Tools**: Connect matching with CRM and workflow systems
4503
4504**Process Optimization**
4505Streamline your partnership development process:
4506- **Standardized Evaluation**: Consistent partner assessment frameworks
4507- **Template Communication**: Standardized outreach and proposal templates
4508- **Progress Tracking**: Monitor partnership development stages
4509- **Performance Measurement**: Track partnership success and ROI
4510
4511## Global and Cultural Considerations
4512
4513### International Partnerships
4514
4515**Cultural Intelligence**
4516Understand cultural factors in global partnerships:
4517- **Communication Styles**: Direct vs. indirect communication preferences
4518- **Decision-Making**: Individual vs. consensus-based approaches
4519- **Time Orientation**: Short-term vs. long-term planning horizons
4520- **Relationship Building**: Task-focused vs. relationship-focused cultures
4521
4522**Regulatory and Legal Factors**
4523Navigate international partnership complexity:
4524- **Data Privacy**: GDPR, CCPA, and other data protection regulations
4525- **Trade Restrictions**: Export controls and sanctions considerations
4526- **Tax Implications**: International tax and transfer pricing issues
4527- **Contract Law**: Different legal systems and contract enforcement
4528
4529### Localization Strategies
4530
4531**Regional Partnership Approaches**
4532Adapt strategies for different markets:
4533- **North America**: Direct, efficiency-focused partnerships
4534- **Europe**: Compliance and privacy-focused collaborations
4535- **Asia-Pacific**: Relationship and long-term oriented partnerships
4536- **Latin America**: Personal relationship and trust-based alliances
4537
4538**Market Entry Partnerships**
4539Use partnerships for international expansion:
4540- **Local Expertise**: Partner with companies understanding local markets
4541- **Distribution Networks**: Leverage existing sales and marketing channels
4542- **Regulatory Navigation**: Partner with companies experienced in local compliance
4543- **Cultural Bridge**: Work with partners who understand both cultures
4544
4545## Partnership Success Optimization
4546
4547### Continuous Improvement
4548
4549**Partnership Performance Analytics**
4550Track and optimize partnership performance:
4551- **Success Metrics**: Revenue, market share, customer acquisition
4552- **Efficiency Measures**: Time to value, implementation speed
4553- **Satisfaction Scores**: Partner and customer satisfaction ratings
4554- **ROI Analysis**: Financial return on partnership investment
4555
4556**Feedback Loops**
4557Create systems for continuous learning:
4558- **Partner Feedback**: Regular partner satisfaction and improvement surveys
4559- **Customer Input**: Customer feedback on partnership experiences
4560- **Internal Reviews**: Team feedback on partnership processes
4561- **Market Analysis**: External feedback and competitive benchmarking
4562
4563### Scaling Success
4564
4565**Partnership Replication**
4566Scale successful partnership models:
4567- **Template Development**: Create frameworks from successful partnerships
4568- **Best Practices**: Document and share successful approaches
4569- **Training Programs**: Educate teams on effective partnership management
4570- **Process Standardization**: Systematize successful partnership approaches
4571
4572**Portfolio Management**
4573Manage multiple partnerships effectively:
4574- **Portfolio Balance**: Maintain diverse partnership portfolio
4575- **Resource Allocation**: Distribute time and resources optimally
4576- **Conflict Management**: Handle overlapping or competing partnerships
4577- **Strategic Alignment**: Ensure all partnerships support business objectives
4578
4579Remember: Advanced matching is both art and science. Combine data-driven insights with intuition and relationship-building skills for optimal results! 🚀
4580      `}}},Vit=()=>{const{category:e}=US(),[t,n]=g.useState(new Set),r=Ph.categories[e];if(g.useEffect(()=>{const m=new Set;r==null||r.guides.forEach(y=>{localStorage.getItem(`guide-completed-${y}`)==="true"&&m.add(y)}),n(m)},[r]),!r)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(Ee,{}),s.jsxs("div",{className:"pt-32 text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Category not found"}),s.jsx(ee,{to:"/help",className:"text-primary hover:underline mt-4 inline-block",children:"← Back to Help Center"})]}),s.jsx(wt,{})]});const a=r.guides.map(m=>{const y=Ph.guides[m];return{id:m,title:(y==null?void 0:y.title)||"",description:(y==null?void 0:y.description)||"",readTime:(y==null?void 0:y.readTime)||"5 min read",difficulty:(y==null?void 0:y.difficulty)||"Beginner",completed:t.has(m),type:"guide",rating:4.8,views:Math.floor(Math.random()*2e3)+500}}),i=a.filter(m=>m.completed).length,o=a.length>0?i/a.length*100:0,l={"getting-started":"🚀","auto-prospecting":"🎯",by
4580ok:"🔑",signals:"📊","company-research":"🏢",matchmaking:"🤝"},c={"getting-started":"from-blue-500 to-cyan-500","auto-prospecting":"from-green-500 to-emerald-500",byok:"from-purple-500 to-pink-500",signals:"from-orange-500 to-red-500","company-research":"from-teal-500 to-blue-500",matchmaking:"from-indigo-500 to-purple-500"},u={title:r.title,description:r.description,icon:l[e]||"📚",color:c[e]||"from-gray-500 to-gray-600",totalGuides:a.length,estimatedTime:`${a.length*8} min`,difficulty:"Beginner",guides:a};if(!u)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(Ee,{}),s.jsxs("div",{className:"pt-32 text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Category not found"}),s.jsx(ee,{to:"/help",className:"text-primary hover:underline mt-4 inline-block",children:"← Back to Help Center"})]}),s.jsx(wt,{})]});const d=m=>{switch(m){case"Beginner":return"bg-green-100 text-green-800 border-green-200";case"Intermediate":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"Advanced":return"bg-red-100 text-red-800 border-red-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},h={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},f={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(ri,{title:`${u.title} - Help & Documentation | Slay Your Sales`,description:u.description,keywords:`${u.title.toLowerCase()}, help, documentation, tutorial, guide, slay your sales`,canonicalUrl:`https://slayyoursales.com/help/${e}`}),s.jsx(Ee,{}),s.jsxs("div",{className:"pt-20",children:[s.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[s.jsxs(ee,{to:"/help",className:"inline-flex items-center text-muted-foreground hover:text-primary transition-colors mb-6",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"Back to Help Center"]}),s.jsx(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:s.jsxs("div",{className:"flex items-start gap-6 mb-8",children:[s.jsx("div",{className:"text-4xl",children:u.icon}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"text-4xl font-bold text-foreground mb-4",children:u.title}),s.jsx("p",{className:"text-xl text-muted-foreground mb-6 max-w-3xl",children:u.description}),s.jsxs("div",{className:"flex flex-wrap gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(gd,{className:"w-4 h-4"}),s.jsxs("span",{children:[u.totalGuides," guides"]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Xn,{className:"w-4 h-4"}),s.jsxs("span",{children:[u.estimatedTime," total"]})]}),s.jsx(fe,{className:d(u.difficulty),children:u.difficulty})]})]})]})})]}),s.jsx(he.div,{className:"max-w-7xl mx-auto px-6 mb-8",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:s.jsx(Y,{className:"bg-gradient-to-r from-primary/5 to-primary/10 border-primary/20",children:s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"Your Progress"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[i," of ",u.totalGuides," completed"]})]}),s.jsx(ur,{value:o,className:"mb-4"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Complete all guides to master ",u.title.toLowerCase()," and unlock advanced features."]})]})})}),s.jsx(he.div,{className:"max-w-7xl mx-auto px-6 pb-16",variants:h,initial:"hidden",animate:"visible",children:s.jsx("div",{className:"space-y-6",children:u.guides.map((m,y)=>s.jsx(he.div,{variants:f,children:s.jsx(ee,{to:`/help/${e}/${m.id}`,children:s.jsx(Y,{className:"border-2 border-gray-100 hover:border-primary/30 transition-all duration-300 hover:shadow-lg group cursor-pointer",children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-primary to-primary/70 text-white font-bold flex items-center justify-center group-hover:scale-110 transition-transform",children:m.type==="video"?s.jsx(ole,{className:"w-6 h-6"}):s.jsx("span",{children:y+1})}),m.completed&&s.jsx(ks,{className:"w-5 h-5 text-green-500"})]}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsx("h3",{className:"text-xl font-semibold text-foreground group-hover:text-primary transition-colors",children:m.title}),s.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[s.jsx(fe,{className:d(m.difficulty),children:m.difficulty}),m.type==="video"&&s.jsx(fe,{variant:"outline",className:"border-red-200 text-red-600",children:"Video"})]})]}),s.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:m.description}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-6 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Xn,{className:"w-4 h-4"}),s.jsx("span",{children:m.readTime})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ti,{className:"w-4 h-4"}),s.jsxs("span",{children:[m.views," views"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(An,{className:"w-4 h-4 text-yellow-500 fill-current"}),s.jsx("span",{children:m.rating})]})]}),s.jsxs(U,{variant:"ghost",size:"sm",className:"group-hover:bg-primary group-hover:text-white transition-colors",children:[m.type==="video"?"Watch":"Read"," Guide"]})]})]})]})})})})},m.id))})})]}),s.jsx(wt,{})]})};function bz(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function Hit(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Git(e,t,n){const a=Mx((n||{}).ignore||[]),i=Kit(t);let o=-1;for(;++o<i.length;)hte(e,"text",l);function l(u,d){let h=-1,f;for(;++h<d.length;){const m=d[h],y=f?f.children:void 0;if(a(m,y?y.indexOf(m):void 0,f))return;f=m}if(f)return c(u,d)}
vendor: 4,964 bytes, lines 4580-4581
4580function c(u,d){const h=d[d.length-1],f=i[o][0],m=i[o][1];let y=0;const x=h.children.indexOf(u);let v=!1,b=[];f.lastIndex=0;let w=f.exec(u.value);for(;w;){const S=w.index,j={index:w.index,input:w.input,stack:[...d,u]};let N=m(...w,j);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?f.lastIndex=S+1:(y!==S&&b.push({type:"text",value:u.value.slice(y,S)}),Array.isArray(N)?b.push(...N):N&&b.push(N),y=S+w[0].length,v=!0),!f.global)break;w=f.exec(u.value)}return v?(y<u.value.length&&b.push({type:"text",value:u.value.slice(y)}),h.children.splice(x,1,...b)):b=[u],x+b.length}}function Kit(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([Yit(a[0]),Xit(a[1])])}return t}function Yit(e){return typeof e=="string"?new RegExp(Hit(e),"g"):e}function Xit(e){return typeof e=="function"?e:function(){return e}}const iC="phrasing",oC=["autolink","link","image","label"];function Qit(){return{transforms:[sot],enter:{literalAutolink:Jit,literalAutolinkEmail:lC,literalAutolinkHttp:lC,literalAutolinkWww:lC},exit:{literalAutolink:rot,literalAutolinkEmail:not,literalAutolinkHttp:eot,literalAutolinkWww:tot}}}function Zit(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:iC,notInConstruct:oC},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:iC,notInConstruct:oC},{character:":",before:"[ps]",after:"\\/",inConstruct:iC,notInConstruct:oC}]}}function Jit(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lC(e){this.config.enter.autolinkProtocol.call(this,e)}function eot(e){this.config.exit.autolinkProtocol.call(this,e)}function tot(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function not(e){this.config.exit.autolinkEmail.call(this,e)}function rot(e){this.exit(e)}function sot(e){Git(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aot],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),iot]],{ignore:["link","linkReference"]})}function aot(e,t,n,r,a){let i="";if(!Are(a)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!oot(n)))return!1;const o=lot(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:i+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function iot(e,t,n,r){return!Are(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function oot(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lot(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=bz(e,"(");let i=bz(e,")");for(;r!==-1&&a>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function Are(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ld(n)||m1(n))&&(!t||n!==47)}Ore.peek=yot;function cot(){this.buffer()}function uot(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dot(){this.buffer()}function hot(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fot(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mot(e){this.exit(e)}function pot(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function got(e){this.exit(e)}function yot(){return"["}function Ore(e,t,n,r){const a=n.createTracker(r);let i=a.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),o(),i+=a.move("]"),i}function xot(){return{enter:{gfmFootnoteCallString:cot,gfmFootnoteCall:uot,gfmFootnoteDefinitionLabelString:dot,gfmFootnoteDefinition:hot},exit:{gfmFootnoteCallString:fot,gfmFootnoteCall:mot,gfmFootnoteDefinitionLabelString:pot,gfmFootnoteDefinition:got}}}function vot(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ore},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,i,o){const l=i.createTracker(o);let c=l.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=l.move(i.safe(i.associationId(r),{before:c,after:"]"})),d(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
4581`:" ")+i.indentLines(i.containerFlow(r,l.current()),t?Rre:bot))),u(),c}}function bot(e,t,n){return t===0?e:Rre(e,t,n)}function Rre(e,t,n){return(n?"":"    ")+e}const wot=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ire.peek=Cot;
vendor: 8,893 bytes, lines 4581-4593
4581function Sot(){return{canContainEols:["delete"],enter:{strikethrough:Not},exit:{strikethrough:_ot}}}function jot(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wot}],handlers:{delete:Ire}}}function Not(e){this.enter({type:"delete",children:[]},e)}function _ot(e){this.exit(e)}function Ire(e,t,n,r){const a=n.createTracker(r),i=n.enter("strikethrough");let o=a.move("~~");return o+=n.containerPhrasing(e,{...a.current(),before:o,after:"~"}),o+=a.move("~~"),i(),o}function Cot(){return"~"}function Eot(e){return e.length}function kot(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||Eot,i=[],o=[],l=[],c=[];let u=0,d=-1;for(;++d<e.length;){const p=[],x=[];let v=-1;for(e[d].length>u&&(u=e[d].length);++v<e[d].length;){const b=Pot(e[d][v]);if(n.alignDelimiters!==!1){const w=a(b);x[v]=w,(c[v]===void 0||w>c[v])&&(c[v]=w)}p.push(b)}o[d]=p,l[d]=x}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)i[h]=wz(r[h]);else{const p=wz(r);for(;++h<u;)i[h]=p}h=-1;const f=[],m=[];for(;++h<u;){const p=i[h];let x="",v="";p===99?(x=":",v=":"):p===108?x=":":p===114&&(v=":");let b=n.alignDelimiters===!1?1:Math.max(1,c[h]-x.length-v.length);const w=x+"-".repeat(b)+v;n.alignDelimiters!==!1&&(b=x.length+b+v.length,b>c[h]&&(c[h]=b),m[h]=b),f[h]=w}o.splice(1,0,f),l.splice(1,0,m),d=-1;const y=[];for(;++d<o.length;){const p=o[d],x=l[d];h=-1;const v=[];for(;++h<u;){const b=p[h]||"";let w="",S="";if(n.alignDelimiters!==!1){const j=c[h]-(x[h]||0),N=i[h];N===114?w=" ".repeat(j):N===99?j%2?(w=" ".repeat(j/2+.5),S=" ".repeat(j/2-.5)):(w=" ".repeat(j/2),S=w):S=" ".repeat(j)}n.delimiterStart!==!1&&!h&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||h)&&v.push(" "),n.alignDelimiters!==!1&&v.push(w),v.push(b),n.alignDelimiters!==!1&&v.push(S),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&v.push("|")}y.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return y.join(`
4582`)}function Pot(e){return e==null?"":String(e)}function wz(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Tot(e,t,n,r){const a=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const o=n.indentLines(n.containerFlow(e,i.current()),Aot);return a(),o}function Aot(e,t,n){return">"+(n?"":" ")+e}function Oot(e,t){return Sz(e,t.inConstruct,!0)&&!Sz(e,t.notInConstruct,!1)}function Sz(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jz(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
4583`&&Oot(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
4584`}function Rot(e,t){const n=String(e);let r=n.indexOf(t),a=r,i=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++i>o&&(o=i):i=1,a=r+t.length,r=n.indexOf(t,a);return o}function Iot(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Mot(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Dot(e,t,n,r){const a=Mot(n),i=e.value||"",o=a==="`"?"GraveAccent":"Tilde";if(Iot(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(i,Lot);return h(),f}const l=n.createTracker(r),c=a.repeat(Math.max(Rot(i,a)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
4585`,encode:["`"],...l.current()})),h()}return d+=l.move(`
4586`),i&&(d+=l.move(i+`
4587`)),d+=l.move(c),u(),d}function Lot(e,t,n){return(n?"":"    ")+e}function AI(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function $ot(e,t,n,r){const a=AI(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
4588`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),o(),u}function Fot(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $y(e){return"&#x"+e.toString(16).toUpperCase()+";"}function sS(e,t,n){const r=Qf(e),a=Qf(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mre.peek=Bot;function Mre(e,t,n,r){const a=Fot(n),i=n.enter("emphasis"),o=n.createTracker(r),l=o.move(a);let c=o.move(n.containerPhrasing(e,{after:a,before:l,...o.current()}));const u=c.charCodeAt(0),d=sS(r.before.charCodeAt(r.before.length-1),u,a);d.inside&&(c=$y(u)+c.slice(1));const h=c.charCodeAt(c.length-1),f=sS(r.after.charCodeAt(0),h,a);f.inside&&(c=c.slice(0,-1)+$y(h));const m=o.move(a);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+c+m}function Bot(e,t,n){return n.options.emphasis||"*"}function zot(e,t){let n=!1;return x1(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,bT}),!!((!e.depth||e.depth<3)&&QR(e)&&(t.options.setext||n))}function Uot(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(zot(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
4589`,after:`
4590`});return h(),d(),f+`
4591`+(a===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
4592`))+1))}const o="#".repeat(a),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
4593`,...i.current()});return/^[\t ]/.test(u)&&(u=$y(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),c(),l(),u}Dre.peek=qot;function Dre(e){return e.value||""}function qot(){return"<"}Lre.peek=Wot;function Lre(e,t,n,r){const a=AI(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),u+=c.move(")"),o(),u}function Wot(){return"!"}$re.peek=Vot;function $re(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,i(),a==="full"||!u||u!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Vot(){return"!"}Fre.peek=Hot;function Fre(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const o=n.unsafe[i],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return a+r+a}function Hot(){return"`"}function Bre(e,t){const n=QR(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zre.peek=Got;function zre(e,t,n,r){const a=AI(n),i=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(Bre(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=o.move("<");return h+=o.move(n.containerPhrasing(e,{before:h,after:">",...o.current()})),h+=o.move(">
4593"),l(),n.stack=d,h}l=n.enter("link"),c=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(c=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=o.move(" "+a),u+=o.move(n.safe(e.title,{before:u,after:a,...o.current()})),u+=o.move(a),c()),u+=o.move(")"),l(),u}function Got(e,t,n){return Bre(e,n)?"<":"["}Ure.peek=Kot;function Ure(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,i(),a==="full"||!u||u!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Kot(){return"["}function OI(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Yot(e){const t=OI(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Xot(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function qre(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Qot(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?Xot(n):OI(n);const l=e.ordered?o==="."?")":".":Yot(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),qre(n)===o&&d){let h=-1;for(;++h<e.children.length;){const f=e.children[h];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=i,a(),u}function Zot(e){const t=e.options.listItemIndent||"one";
vendor: 7,041 bytes, lines 4593-4595
4593if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Jot(e,t,n,r){const a=Zot(n);let i=n.bulletCurrent||OI(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(o-i.length)),l.shift(o);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(h,f,m){return f?(m?"":" ".repeat(o))+h:(m?i:i+" ".repeat(o-i.length))+h}}function elt(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),a(),o}const tlt=Mx(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nlt(e,t,n,r){return(e.children.some(function(o){return tlt(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function rlt(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Wre.peek=slt;function Wre(e,t,n,r){const a=rlt(n),i=n.enter("strong"),o=n.createTracker(r),l=o.move(a+a);let c=o.move(n.containerPhrasing(e,{after:a,before:l,...o.current()}));const u=c.charCodeAt(0),d=sS(r.before.charCodeAt(r.before.length-1),u,a);d.inside&&(c=$y(u)+c.slice(1));const h=c.charCodeAt(c.length-1),f=sS(r.after.charCodeAt(0),h,a);f.inside&&(c=c.slice(0,-1)+$y(h));const m=o.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+c+m}function slt(e,t,n){return n.options.strong||"*"}function alt(e,t,n,r){return n.safe(e.value,r)}function ilt(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function olt(e,t,n){const r=(qre(n)+(n.options.ruleSpaces?" ":"")).repeat(ilt(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vre={blockquote:Tot,break:jz,code:Dot,definition:$ot,emphasis:Mre,hardBreak:jz,heading:Uot,html:Dre,image:Lre,imageReference:$re,inlineCode:Fre,link:zre,linkReference:Ure,list:Qot,listItem:Jot,paragraph:elt,root:nlt,strong:Wre,text:alt,thematicBreak:olt};function llt(){return{enter:{table:clt,tableData:Nz,tableHeader:Nz,tableRow:dlt},exit:{codeText:hlt,table:ult,tableData:cC,tableHeader:cC,tableRow:cC}}}function clt(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ult(e){this.exit(e),this.data.inTable=void 0}function dlt(e){this.enter({type:"tableRow",children:[]},e)}function cC(e){this.exit(e)}function Nz(e){this.enter({type:"tableCell",children:[]},e)}function hlt(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,flt));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function flt(e,t){return t==="|"?t:e}function mlt(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
4594`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:l}};function o(m,y,p,x){return u(d(m,p,x),m.align)}function l(m,y,p,x){const v=h(m,p,x),b=u([v]);return b.slice(0,b.indexOf(`
4595`))}function c(m,y,p,x){const v=p.enter("tableCell"),b=p.enter("phrasing"),w=p.containerPhrasing(m,{...x,before:i,after:i});return b(),v(),w}function u(m,y){return kot(m,{align:y,alignDelimiters:r,padding:n,stringLength:a})}function d(m,y,p){const x=m.children;let v=-1;const b=[],w=y.enter("table");for(;++v<x.length;)b[v]=h(x[v],y,p);return w(),b}function h(m,y,p){const x=m.children;let v=-1;const b=[],w=y.enter("tableRow");for(;++v<x.length;)b[v]=c(x[v],m,y,p);return w(),b}function f(m,y,p){let x=Vre.inlineCode(m,y,p);return p.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function plt(){return{exit:{taskListCheckValueChecked:_z,taskListCheckValueUnchecked:_z,paragraph:ylt}}}function glt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xlt}}}function _z(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ylt(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,o;for(;++i<a.length;){const l=a[i];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function xlt(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(o);let c=Vre.listItem(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+o}}function vlt(){return[Qit(),xot(),Sot(),llt(),plt()]}function blt(e){return{extensions:[Zit(),vot(e),jot(),mlt(e),glt()]}}const wlt={tokenize:Elt,partial:!0},Hre={tokenize:klt,partial:!0},Gre={tokenize:Plt,partial:!0},Kre={tokenize:Tlt,partial:!0},Slt={tokenize:Alt,partial:!0},Yre={name:"wwwAutolink",tokenize:_lt,previous:Qre},Xre={name:"protocolAutolink",tokenize:Clt,previous:Zre},Sl={name:"emailAutolink",tokenize:Nlt,previous:Jre},Po={};function jlt(){return{text:Po}}let su=48;for(;su<123;)Po[su]=Sl,su++,su===58?su=65:su===91&&(su=97);Po[43]=Sl;Po[45]=Sl;Po[46]=Sl;Po[95]=Sl;Po[72]=[Sl,Xre];Po[104]=[Sl,Xre];Po[87]=[Sl,Yre];Po[119]=[Sl,Yre];function Nlt(e,t,n){const r=this;let a,i;return o;function o(h){return!RT(h)||!Jre.call(r,r.previous)||RI(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return RT(h)?(e.consume(h),l):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(Slt,d,u)(h):h===45||h===95||is(h)?(i=!0,e.consume(h),c):d(h)}function u(h){return e.consume(h),a=!0,c}function d(h){return i&&a&&vs(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function _lt(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!Qre.call(r,r.previous)||RI(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wlt,e.attempt(Hre,e.attempt(Gre,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Clt(e,t,n){const r=this;let a="",i=!1;return o;
vendor: 8,360 bytes, line 4595
4595function o(h){return(h===72||h===104)&&Zre.call(r,r.previous)&&!RI(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(h),e.consume(h),l):n(h)}function l(h){if(vs(h)&&a.length<5)return a+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const f=a.toLowerCase();if(f==="http"||f==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),i?u:(i=!0,c)):n(h)}function u(h){return h===null||Vw(h)||gn(h)||ld(h)||m1(h)?n(h):e.attempt(Hre,e.attempt(Gre,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Elt(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function klt(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(Kre,c,l)(u):u===null||gn(u)||ld(u)||u!==45&&m1(u)?c(u):(i=!0,e.consume(u),o)}function l(u){return u===95?r=!0:(a=r,r=void 0),e.consume(u),o}function c(u){return a||r||!i?n(u):t(u)}}function Plt(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Kre,t,i)(o):o===null||gn(o)||ld(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function Tlt(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),a):l===60||l===null||gn(l)||ld(l)?t(l):n(l)}function a(l){return l===null||l===40||l===91||gn(l)||ld(l)?t(l):r(l)}function i(l){return vs(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):vs(l)?(e.consume(l),o):n(l)}}function Alt(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return is(i)?n(i):t(i)}}function Qre(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gn(e)}function Zre(e){return!vs(e)}function Jre(e){return!(e===47||RT(e))}function RT(e){return e===43||e===45||e===46||e===95||is(e)}function RI(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Olt={tokenize:Blt,partial:!0};function Rlt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Llt,continuation:{tokenize:$lt},exit:Flt}},text:{91:{name:"gfmFootnoteCall",tokenize:Dlt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ilt,resolveTo:Mlt}}}}function Ilt(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const c=r.events[a][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const u=Oi(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Mlt(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Dlt(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(i>999||h===93&&!o||h===null||h===91||gn(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return a.includes(Oi(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return gn(h)||(o=!0),i++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),i++,u):u(h)}}function Llt(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,l;return c;function c(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(y)}function d(y){if(o>999||y===93&&!l||y===null||y===91||gn(y))return n(y);if(y===93){e.exit("chunkString");const p=e.exit("gfmFootnoteDefinitionLabelString");return i=Oi(r.sliceSerialize(p)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return gn(y)||(l=!0),o++,e.consume(y),y===92?h:d}function h(y){return y===91||y===92||y===93?(e.consume(y),o++,d):d(y)}function f(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),a.includes(i)||a.push(i),Qt(e,m,"gfmFootnoteDefinitionWhitespace")):n(y)}function m(y){return t(y)}}function $lt(e,t,n){return e.check(Ix,t,e.attempt(Olt,t,n))}function Flt(e){e.exit("gfmFootnoteDefinition")}function Blt(e,t,n){const r=this;return Qt(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function zlt(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},h={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},f=[["enter",d,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",h,l]],m=l.parser.constructs.insideSpan.null;m&&ja(f,f.length,0,p1(m,o.slice(u+1,c),l)),ja(f,f.length,0,[["exit",h,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",d,l]]),ja(o,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function i(o,l,c){const u=this.previous,d=this.events;let h=0;return f;function f(y){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(y):(o.enter("strikethroughSequenceTemporary"),m(y))}function m(y){const p=Qf(u);if(y===126)return h>1?c(y):(o.consume(y),h++,m);if(h<2&&!n)return c(y);const x=o.exit("strikethroughSequenceTemporary"),v=Qf(y);return x._open=!v||v===2&&!!p,x._close=!p||p===2&&!!v,l(y)}}}class Ult{constructor(){this.map=[]}add(t,n,r){qlt(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];
vendor: 12,100 bytes, lines 4595-4597
4595r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function qlt(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function Wlt(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vlt(){return{flow:{null:{name:"table",tokenize:Hlt,resolveAll:Glt}}}}function Hlt(e,t,n){const r=this;let a=0,i=0,o;return l;function l(P){let R=r.events.length-1;for(;R>-1;){const $=r.events[R][1].type;if($==="lineEnding"||$==="linePrefix")R--;else break}const I=R>-1?r.events[R][1].type:null,B=I==="tableHead"||I==="tableRow"?N:c;return B===N&&r.parser.lazy[r.now().line]?n(P):B(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),u(P)}function u(P){return P===124||(o=!0,i+=1),d(P)}function d(P){return P===null?n(P):it(P)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),m):n(P):Lt(P)?Qt(e,d,"whitespace")(P):(i+=1,o&&(o=!1,a+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),h(P)))}function h(P){return P===null||P===124||gn(P)?(e.exit("data"),d(P)):(e.consume(P),P===92?f:h)}function f(P){return P===92||P===124?(e.consume(P),h):h(P)}function m(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),o=!1,Lt(P)?Qt(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):y(P))}function y(P){return P===45||P===58?x(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),p):j(P)}function p(P){return Lt(P)?Qt(e,x,"whitespace")(P):x(P)}function x(P){return P===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),v):P===45?(i+=1,v(P)):P===null||it(P)?S(P):j(P)}function v(P){return P===45?(e.enter("tableDelimiterFiller"),b(P)):j(P)}function b(P){return P===45?(e.consume(P),b):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(P))}function w(P){return Lt(P)?Qt(e,S,"whitespace")(P):S(P)}function S(P){return P===124?y(P):P===null||it(P)?!o||a!==i?j(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):j(P)}function j(P){return n(P)}function N(P){return e.enter("tableRow"),C(P)}function C(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),C):P===null||it(P)?(e.exit("tableRow"),t(P)):Lt(P)?Qt(e,C,"whitespace")(P):(e.enter("data"),_(P))}function _(P){return P===null||P===124||gn(P)?(e.exit("data"),C(P)):(e.consume(P),P===92?A:_)}function A(P){return P===92||P===124?(e.consume(P),_):_(P)}}function Glt(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,u,d,h;const f=new Ult;for(;++n<e.length;){const m=e[n],y=m[1];m[0]==="enter"?y.type==="tableHead"?(l=!1,c!==0&&(Cz(f,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},f.add(n,0,[["enter",u,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,h=void 0,i=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},f.add(n,0,[["enter",d,t]])),a=y.type==="tableDelimiterRow"?2:d?3:1):a&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],h=mb(f,t,i,a,void 0,h),i=[0,0,0,0]),o[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],h=mb(f,t,i,a,void 0,h)),i=o,o=[i[1],n,0,0])):y.type==="tableHead"?(l=!0,c=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(c=n,i[1]!==0?(o[0]=o[1],h=mb(f,t,i,a,n,h)):o[1]!==0&&(h=mb(f,t,o,a,n,h)),a=0):a&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&Cz(f,t,c,u,d),f.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=Wlt(t.events,n))}return e}function mb(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},ah(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=ah(t.events,n[1]);if(i={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=ah(t.events,n[2]),d=ah(t.events,n[3]),h={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const f=t.events[n[2]],m=t.events[n[3]];if(f[1].end=Object.assign({},m[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,p=n[3]-n[2]-1;e.add(y,p,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return a!==void 0&&(i.end=Object.assign({},ah(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function Cz(e,t,n,r,a){const i=[],o=ah(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function ah(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Klt={name:"tasklistCheck",tokenize:Xlt};function Ylt(){return{text:{91:Klt}}}function Xlt(e,t,n){const r=this;return a;function a(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return gn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return it(c)?t(c):Lt(c)?e.check({tokenize:Qlt},t,n)(c):n(c)}}function Qlt(e,t,n){return Qt(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function Zlt(e){return Gee([jlt(),Rlt(),zlt(e),Vlt(),Ylt()])}const Jlt={};function ect(e){const t=this,n=e||Jlt,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Zlt(n)),i.push(vlt()),o.push(blt(n))}const Ez=function(e,t,n){const r=Mx(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},kd=function(e){if(e==null)return rct;if(typeof e=="string")return nct(e);if(typeof e=="object")return tct(e);if(typeof e=="function")return II(e);throw new Error("Expected function, string, or array as `test`")};function tct(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kd(e[n]);return II(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function nct(e){return II(t);function t(n){return n.tagName===e}}function II(e){return t;function t(n,r,a){return!!(sct(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function rct(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function sct(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const kz=/\n/g,Pz=/[\t ]+/g,IT=kd("br"),Tz=kd(hct),act=kd("p"),Az=kd("tr"),ict=kd(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",dct,fct]),ese=kd(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function oct(e,t){const n=t||{},r="children"in e?e.children:[],a=ese(e),i=rse(e,{whitespace:n.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...nse(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<r.length;)o.push(...tse(r[l],e,{whitespace:i,breakBefore:l?void 0:a,breakAfter:l<r.length-1?IT(r[l+1]):a}));const c=[];let u;for(l=-1;++l<o.length;){const d=o[l];typeof d=="number"?u!==void 0&&d>u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(`
4596`.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function tse(e,t,n){return e.type==="element"?lct(e,t,n):e.type==="text"?n.whitespace==="normal"?nse(e,n):cct(e):[]}function lct(e,t,n){const r=rse(e,n),a=e.children||[];let i=-1,o=[];if(ict(e))return o;let l,c;for(IT(e)||Az(e)&&Ez(t,e,Az)?c=`
4597`:act(e)?(l=2,c=2):ese(e)&&(l=1,c=1);++i<a.length;)o=o.concat(tse(a[i],e,{whitespace:r,breakBefore:i?void 0:l,breakAfter:i<a.length-1?IT(a[i+1]):c}));return Tz(e)&&Ez(t,e,Tz)&&o.push("	"),l&&o.unshift(l),c&&o.push(c),o}function nse(e,t){const n=String(e.value),r=[],a=[];let i=0;for(;i<=n.length;){kz.lastIndex=i;const c=kz.exec(n),u=c&&"index"in c?c.index:n.length;r.push(uct(n.slice(i,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?t.breakBefore:!0,u===n.length?t.breakAfter:!0)),i=u+1}let o=-1,l;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(a.push(r[o]),l=void 0):r[o]?(typeof l=="number"&&a.push(l),a.push(r[o]),l=0):(o===0||o===r.length-1)&&a.push(0);return a}function cct(e){return[String(e.value)]}function uct(e,t,n){const r=[];let a=0,i;for(;a<e.length;){Pz.lastIndex=a;const o=Pz.exec(e);i=o?o.index:e.length,!a&&!i&&o&&!t&&r.push(""),a!==i&&r.push(e.slice(a,i)),a=o?i+o[0].length:i}return a!==i&&!n&&r.push(""),r.join(" ")}function rse(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function dct(e){return!!(e.properties||{}).hidden}function hct(e){return e.tagName==="td"||e.tagName==="th"}function fct(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function mct(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},m=t.optional(a)+e.IDENT_RE+"\\s*\\(",y=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_
4597noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],p=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:p,keyword:y,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},j={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[j,h,l,n,e.C_BLOCK_COMMENT_MODE,d,u],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:N.concat([{begin:/\(/,end:/\)/,keywords:S,contains:N.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+o+"[\\*&\\s]+)+"+m,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:m,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,_,j,N,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:S,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function pct(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","
vendor: 7,666 bytes, line 4597
4597EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=mct(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function gct(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(l);const c={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),y={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},p=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],x=["true","false"],v={match:/(\/[a-z._-]+)+/},b=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],w=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],S=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],j=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:p,literal:x,built_in:[...b,...w,"set","shopt",...S,...j]},contains:[m,e.SHEBANG(),y,h,i,o,v,l,c,u,d,n]}}function yct(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}
vendor: 5,534 bytes, line 4597
4597),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},m=t.optional(a)+e.IDENT_RE+"\\s*\\(",x={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[h,l,n,e.C_BLOCK_COMMENT_MODE,d,u],b={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:v.concat([{begin:/\(/,end:/\)/,keywords:x,contains:v.concat(["self"]),relevance:0}]),relevance:0},w={begin:"("+o+"[\\*&\\s]+)+"+m,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:m,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:x,disableAutodetect:!0,illegal:"</",contains:[].concat(b,w,v,[h,{begin:e.IDENT_RE+"::",keywords:x},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:u,keywords:x}}}function xct(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},m=t.optional(a)+e.IDENT_RE+"\\s*\\(",y=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_
4597noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],p=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:p,keyword:y,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},j={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[j,h,l,n,e.C_BLOCK_COMMENT_MODE,d,u],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:N.concat([{begin:/\(/,end:/\)/,keywords:S,contains:N.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+o+"[\\*&\\s]+)+"+m,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:m,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,_,j,N,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:S,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function vct(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],a=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","
4597sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:a.concat(i),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(d,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:o},m=e.inherit(f,{illegal:/\n/}),y={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,m]},p={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},x=e.inherit(p,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]});f.contains=[p,y,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,c,e.C_BLOCK_COMMENT_MODE],m.contains=[x,y,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,c,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[u,p,y,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},w=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",S={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},v,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+w+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,b],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[v,c,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},S]}}const bct=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),wct=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Sct=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],jct=[...wct,...Sct],Nct=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),_ct=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invali
4597d","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Cct=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Ect=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-
4597area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function kct(e){const t=e.regex,n=bct(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},a="and or not only",i=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0}
vendor: 19,668 bytes, lines 4597-4598
4597,{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+_ct.join("|")+")"},{begin:":(:)?("+Cct.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Ect.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:Nct.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+jct.join("|")+")\\b"}]}}function Pct(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Tct(e){const i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,illegal:/["']/}]}]}}function Act(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function Oct(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const a={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},i={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[r,i,a,o,n,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,u=/"(\\"|[^"])*"/,d=/'[^']*'/,h=t.either(c,u,d),f=t.concat(h,"(\\s*\\.\\s*",h,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:f,className:"attr",starts:{end:/$/,contains:[r,l,i,a,o,n]}}]}}var ih="[0-9](_*[0-9])*",pb=`\\.(${ih})`,gb="[0-9a-fA-F](_*[0-9a-fA-F])*",Oz={className:"number",variants:[{begin:`(\\b(${ih})((${pb})|\\.)?|(${pb}))[eE][+-]?(${ih})[fFdD]?\\b`},{begin:`\\b(${ih})((${pb})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${pb})[fFdD]?\\b`},{begin:`\\b(${ih})[fFdD]\\b`},{begin:`\\b0[xX]((${gb})\\.?|(${gb})?\\.(${gb}))[pP][+-]?(${ih})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${gb})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function sse(e,t,n){return n===-1?"":e.replace(t,r=>sse(e,t,n-1))}function Rct(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+sse("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),c={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:c,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Oz,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Oz,u]}}const Rz="[A-Za-z$_][0-9A-Za-z$_]*",Ict=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Mct=["true","false","null","undefined","NaN","Infinity"],ase=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ise=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ose=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Dct=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Lct=[].concat(ose,ase,ise);function $ct(e){const t=e.regex,n=(T,{after:F})=>{const O="</"+T[0].slice(1);return T.input.indexOf(O,F)!==-1},r=Rz,a={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(T,F)=>{const O=T[0].length+T.index,E=T.input[O];if(E==="<"||E===","){F.ignoreMatch();return}E===">"&&(n(T,{after:O})||F.ignoreMatch());let D;const M=T.input.substring(O);if(D=M.match(/^\s*=/)){F.ignoreMatch();return}if((D=M.match(/^\s+extends\s+/))&&D.index===0){F.ignoreMatch();return}}},l={$pattern:Rz,keyword:Ict,literal:Mct,built_in:Lct,"variable.language":Dct},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},y={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},b={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,y,p,x,{match:/\$\d+/},h];f.contains=w.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(w)});const S=[].concat(b,f.contains),j=S.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(S)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:j},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ase,...ise]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},R={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function I(T){return t.concat("(?!",T.join("|"),")")}const B={match:t.concat(/\b/,I([...ose,"super","import"].map(T=>`${T}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",k={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:j,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,y,p,x,b,{match:/\$\d+/},h,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},k,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,e.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:j}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},B,R,C,q,{match:/\$[(.]/}]}}function Fct(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var oh="[0-9](_*[0-9])*",yb=`\\.(${oh})`,xb="[0-9a-fA-F](_*[0-9a-fA-F])*",Bct={className:"number",variants:[{begin:`(\\b(${oh})((${yb})|\\.)?|(${yb}))[eE][+-]?(${oh})[fFdD]?\\b`},{begin:`\\b(${oh})((${yb})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${yb})[fFdD]?\\b`},{begin:`\\b(${oh})[fFdD]\\b`},{begin:`\\b0[xX]((${xb})\\.?|(${xb})?\\.(${xb}))[pP][+-]?(${oh})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${xb})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function zct(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},a={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,a]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,a]}]};a.contains.push(o);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},u=Bct,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=h;return f.variants[1].contains=[h],h.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,r,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,c,o,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,c]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
4598`},u]}}const Uct=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qct=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Wct=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Vct=[...qct,...Wct],Hct=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),lse=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invali
4598d","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),cse=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Gct=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-
4598area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Kct=lse.concat(cse).sort().reverse();function Yct(e){const t=Uct(e),n=Kct,r="and or not only",a="[\\w-]+",i="("+a+"|@\\{"+a+"\\})",o=[],l=[],c=function(w){return{className:"string",begin:"~?"+w+".*?"+w}},u=function(w,S,j){return{className:w,begin:S,relevance:j}},d={$pattern:/[a-z-]+/,keyword:r,attribute:Hct.join(" ")},h={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c("'"),c('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,h,u("variable","@@?"+a,10),u("variable","@\\{"+a+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:a+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const f=l.concat({begin:/\{/,end:/\}/,contains:o}),m={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},y={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Gct.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},p={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?ke
4598yframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},x={className:"variable",variants:[{begin:"@"+a+"\\s*:",relevance:15},{begin:"@"+a}],starts:{end:"[;}]",returnEnd:!0,contains:f}},v={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,u("keyword","all\\b"),u("variable","@\\{"+a+"\\}"),{begin:"\\b("+Vct.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+lse.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+cse.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:a+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[v]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,x,b,y,v,m,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function Xct(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},a=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function Qct(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},a={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},i={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,a,i,o]}}function Zct(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},a={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ 	]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0}
vendor: 31,397 bytes, lines 4598-4599
4598,{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(u,{contains:[]}),f=e.inherit(d,{contains:[]});u.contains.push(f),d.contains.push(h);let m=[n,c];return[u,d,h,f].forEach(v=>{v.contains=v.contains.concat(m)}),m=m.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:m},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:m}]}]},n,i,u,d,{className:"quote",begin:"^>\\s+",contains:m,end:"$"},a,r,c,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Jct(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function eut(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,a={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:a},o={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[e.BACKSLASH_ESCAPE,i,c],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(p,x,v="\\1")=>{const b=v==="\\1"?v:t.concat(v,x);return t.concat(t.concat("(?:",p,")"),x,/(?:\\.|[^\\\/])*?/,b,/(?:\\.|[^\\\/])*?/,v,r)},m=(p,x,v)=>t.concat(t.concat("(?:",p,")"),x,/(?:\\.|[^\\\/])*?/,v,r),y=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...h,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:m("(?:m|qr)?",/\//,/\//)},{begin:m("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:m("m|qr",/\(/,/\)/)},{begin:m("m|qr",/\[/,/\]/)},{begin:m("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=y,o.contains=y,{name:"Perl",aliases:["pl","pm"],keywords:a,contains:y}}function tut(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":($,q)=>{q.data._beginMatch=$[1]||$[2]},"on:end":($,q)=>{q.data._beginMatch!==$[1]&&q.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),m=`[ 	
4599]`,y={scope:"string",variants:[d,u,h,f]},p={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},x=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],b=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],S={keyword:v,literal:($=>{const q=[];return $.forEach(L=>{q.push(L),L.toLowerCase()===L?q.push(L.toUpperCase()):q.push(L.toLowerCase())}),q})(x),built_in:b},j=$=>$.map(q=>q.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(m,"+"),t.concat("(?!",j(b).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},C=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),C],scope:{1:"title.class",3:"variable.constant"}},{match:[a,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},A={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:S,contains:[A,o,_,e.C_BLOCK_COMMENT_MODE,y,p,N]},R={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",j(v).join("\\b|"),"|",j(b).join("\\b|"),"\\b)"),r,t.concat(m,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(R);const I=[A,_,e.C_BLOCK_COMMENT_MODE,y,p,N],B={begin:t.concat(/#\[\s*\\?/,t.either(a,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:x,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:x,keyword:["new","array"]},contains:["self",...I]},...I,{scope:"meta",variants:[{match:a},{match:i}]}]};return{case_insensitive:!1,keywords:S,contains:[B,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},o,R,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:S,contains:["self",B,o,_,e.C_BLOCK_COMMENT_MODE,y,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},y,p]}}function nut(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function rut(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function sut(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",m=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,y=`\\b|${r.join("|")}`,p={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${m}))[eE][+-]?(${f})[jJ]?(?=${y})`},{begin:`(${m})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${y})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${y})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${y})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${y})`},{begin:`\\b(${f})[jJ](?=${y})`}]},x={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",c,p,h,e.HASH_COMMENT_MODE]}]};return u.contains=[h,p,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[c,p,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,x,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[p,v,h]}]}}function aut(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function iut(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),a=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[a,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function out(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:o},h={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},f="[1-9](_?[0-9])*|0",m="[0-9](_?[0-9])*",y={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${m}))?([eE][+-]?(${m})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},p={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},N=[h,{variants:[{match:[/class\s+/,a,/\s+<\s+/,a]},{match:[/\b(class|module)\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,a],scope:{2:"title.class"},keywords:o},{relevance:0,match:[a,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:n}],relevance:0},y,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,u),relevance:0}].concat(c,u);d.contains=N,p.contains=N;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:N}}];return u.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(u).concat(N)}}function lut(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),a=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:l,literal:c,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:d}},{className:"punctuation",begin:"->"},i]}}const cut=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uut=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dut=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],hut=[...uut,...dut],fut=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),mut=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invali
4599d","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),put=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),gut=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-
4599area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function yut(e){const t=cut(e),n=put,r=mut,a="@[a-z-]+",i="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0}
vendor: 1,113 bytes, line 4599
4599,{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+hut.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+gut.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inl
4599ine-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:a,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:fut.join(" ")},contains:[{begin:a,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function xut(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function vut(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},a={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","ver
4599sioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],m=d,y=[...u,...c].filter(j=>!d.includes(j)),p={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},x={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:t.concat(/\b/,t.either(...m),/\s*\(/),relevance:0,keywords:{built_in:m}};function b(j){return t.concat(/\b/,t.either(...j.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const w={scope:"keyword",match:b(f),relevance:0};function S(j,{exceptions:N,when:C}={}){const _=C;return N=N||[],j.map(A=>A.match(/\|\d+$/)||N.includes(A)?A:_(A)?`${A}|0`:A)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:S(y,{when:j=>j.length<3}),literal:i,type:l,built_in:h},contains:[{scope:"type",match:b(o)},w,v,p,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,x]}}function use(e){return e?typeof e=="string"?e:e.source:null}function wp(e){return fn("(?=",e,")")}function fn(...e){return e.map(n=>use(n)).join("")}function but(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ps(...e){return"("+(but(e).capture?"":"?:")+e.map(r=>use(r)).join("|")+")"}const MI=e=>fn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),wut=["Protocol","Type"].map(MI),Iz=["init","self"].map(MI),Sut=["Any","Self"],uC=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Mz=["false","nil","true"],jut=["assignment","associativity","higherThan","left","lowerThan","none","right"],Nut=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Dz=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","
vendor: 15,653 bytes, line 4599
4599withoutActuallyEscaping","zip"],dse=ps(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),hse=ps(dse,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),dC=fn(dse,hse,"*"),fse=ps(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),aS=ps(fse,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Gi=fn(fse,aS,"*"),vb=fn(/[A-Z]/,aS,"*"),_ut=["attached","autoclosure",fn(/convention\(/,ps("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",fn(/objc\(/,Gi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Cut=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Eut(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],a={match:[/\./,ps(...wut,...Iz)],className:{2:"keyword"}},i={match:fn(/\./,ps(...uC)),relevance:0},o=uC.filter(se=>typeof se=="string").concat(["_|0"]),l=uC.filter(se=>typeof se!="string").concat(Sut).map(MI),c={variants:[{className:"keyword",match:ps(...l,...Iz)}]},u={$pattern:ps(/\b\w+/,/#\w+/),keyword:o.concat(Nut),literal:Mz},d=[a,i,c],h={match:fn(/\./,ps(...Dz)),relevance:0},f={className:"built_in",match:fn(/\b/,ps(...Dz),/(?=\()/)},m=[h,f],y={match:/->/,relevance:0},p={className:"operator",relevance:0,variants:[{match:dC},{match:`\\.(\\.|${hse})+`}]},x=[y,p],v="([0-9]_*)+",b="([0-9a-fA-F]_*)+",w={className:"number",relevance:0,variants:[{match:`\\b(${v})(\\.(${v}))?([eE][+-]?(${v}))?\\b`},{match:`\\b0x(${b})(\\.(${b}))?([pP][+-]?(${v}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},S=(se="")=>({className:"subst",variants:[{match:fn(/\\/,se,/[0\\tnr"']/)},{match:fn(/\\/,se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),j=(se="")=>({className:"subst",match:fn(/\\/,se,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(se="")=>({className:"subst",label:"interpol",begin:fn(/\\/,se,/\(/),end:/\)/}),C=(se="")=>({begin:fn(se,/"""/),end:fn(/"""/,se),contains:[S(se),j(se),N(se)]}),_=(se="")=>({begin:fn(se,/"/),end:fn(/"/,se),contains:[S(se),N(se)]}),A={className:"string",variants:[C(),C("#"),C("##"),C("###"),_(),_("#"),_("##"),_("###")]},P=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],R={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:P},I=se=>{const je=fn(se,/\//),Ce=fn(/\//,se);return{begin:je,end:Ce,contains:[...P,{scope:"comment",begin:`#(?!.*${Ce})`,end:/$/}]}},B={scope:"regexp",variants:[I("###"),I("##"),I("#"),R]},$={match:fn(/`/,Gi,/`/)},q={className:"variable",match:/\$\d+/},L={className:"variable",match:`\\$${aS}+`},k=[$,q,L],T={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Cut,contains:[...x,w,A]}]}},F={scope:"keyword",match:fn(/@/,ps(..._ut),wp(ps(/\(/,/\s+/)))},O={scope:"meta",match:fn(/@/,Gi)},E=[T,F,O],D={match:wp(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:fn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,aS,"+")},{className:"type",match:vb,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:fn(/\s+&\s+/,wp(vb)),relevance:0}]},M={begin:/</,end:/>/,keywords:u,contains:[...r,...d,...E,y,D]};D.contains.push(M);const X={match:fn(Gi,/\s*:/),keywords:"_|0",relevance:0},W={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",X,...r,B,...d,...m,...x,w,A,...k,...E,D]},re={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,D]},ne={begin:ps(wp(fn(Gi,/\s*:/)),wp(fn(Gi,/\s+/,Gi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Gi}]},le={begin:/\(/,end:/\)/,keywords:u,contains:[ne,...r,...d,...x,w,A,...E,D,W],endsParent:!0,illegal:/["']/},ie={match:[/(func|macro)/,/\s+/,ps($.match,Gi,dC)],className:{1:"keyword",3:"title.function"},contains:[re,le,t],illegal:[/\[/,/%/]},ye={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[re,le,t],illegal:/\[|%/},pe={match:[/operator/,/\s+/,dC],className:{1:"keyword",3:"title"}},G={begin:[/precedencegroup/,/\s+/,vb],className:{1:"keyword",3:"title"},contains:[D],keywords:[...jut,...Mz],end:/}/},Pe={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},J={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Gi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[re,...d,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:vb},...d],relevance:0}]};for(const se of A.variants){const je=se.contains.find(ut=>ut.label==="interpol");je.keywords=u;const Ce=[...d,...m,...x,w,A,...k];je.contains=[...Ce,{begin:/\(/,end:/\)/,contains:["self",...Ce]}]}return{name:"Swift",keywords:u,contains:[...r,ie,ye,Pe,J,oe,pe,G,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},B,...d,...m,...x,w,A,...k,...E,D,W]}}const iS="[A-Za-z$_][0-9A-Za-z$_]*",mse=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],pse=["true","false","null","undefined","NaN","Infinity"],gse=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],yse=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xse=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],vse=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],bse=[].concat(xse,gse,yse);function kut(e){const t=e.regex,n=(T,{after:F})=>{const O="</"+T[0].slice(1);return T.input.indexOf(O,F)!==-1},r=iS,a={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(T,F)=>{const O=T[0].length+T.index,E=T.input[O];if(E==="<"||E===","){F.ignoreMatch();return}E===">"&&(n(T,{after:O})||F.ignoreMatch());let D;const M=T.input.substring(O);if(D=M.match(/^\s*=/)){F.ignoreMatch();return}if((D=M.match(/^\s+extends\s+/))&&D.index===0){F.ignoreMatch();return}}},l={$pattern:iS,keyword:mse,literal:pse,built_in:bse,"variable.language":vse},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},y={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},b={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,y,p,x,{match:/\$\d+/},h];f.contains=w.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(w)});const S=[].concat(b,f.contains),j=S.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(S)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:j},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...gse,...yse]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},R={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function I(T){return t.concat("(?!",T.join("|"),")")}const B={match:t.concat(/\b/,I([...xse,"super","import"].map(T=>`${T}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",k={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:j,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,y,p,x,b,{match:/\$\d+/},h,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},k,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,e.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:j}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},B,R,C,q,{match:/\$[(.]/}]}}function Put(e){const t=e.regex,n=kut(e),r=iS,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},c=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:iS,keyword:mse.concat(c),literal:pse,built_in:bse.concat(a),"variable.language":vse},d={className:"meta",begin:"@"+r},h=(p,x,v)=>{const b=p.contains.findIndex(w=>w.label===x);if(b===-1)throw new Error("can not find mode to replace");p.contains.splice(b,1,v)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);const f=n.contains.find(p=>p.scope==="attr"),m=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,m]),n.contains=n.contains.concat([d,i,o,m]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",l);const y=n.contains.find(p=>p.label==="func.def");return y.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Tut(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,a),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(i,a),/ +/,t.either(o,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step 
4599stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,c,u,d,h,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function Aut(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],a={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,o,a,e.QUOTE_STRING_MODE,c,u,l]}}function Out(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,c,l,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,c,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Rut(e){const t="true false yes no null",n="[\\w#;
vendor: 20,338 bytes, lines 4599-4601
4599/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},l=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},m={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},y={begin:/\{/,end:/\}/,contains:[m],illegal:"\\n",relevance:0},p={begin:"\\[",end:"\\]",contains:[m],illegal:"\\n",relevance:0},x=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},y,p,i,o],v=[...x];return v.pop(),v.push(l),m.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:x}}const Iut={arduino:pct,bash:gct,c:yct,cpp:xct,csharp:vct,css:kct,diff:Pct,go:Tct,graphql:Act,ini:Oct,java:Rct,javascript:$ct,json:Fct,kotlin:zct,less:Yct,lua:Xct,makefile:Qct,markdown:Zct,objectivec:Jct,perl:eut,php:tut,"php-template":nut,plaintext:rut,python:sut,"python-repl":aut,r:iut,ruby:out,rust:lut,scss:yut,shell:xut,sql:vut,swift:Eut,typescript:Put,vbnet:Tut,wasm:Aut,xml:Out,yaml:Rut};function wse(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&wse(n)}),e}let Lz=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Sse(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function rc(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const a in r)n[a]=r[a]}),n}const Mut="</span>",$z=e=>!!e.scope,Dut=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,a)=>`${r}${"_".repeat(a+1)}`)].join(" ")}return`${t}${e}`};class Lut{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Sse(t)}openNode(t){if(!$z(t))return;const n=Dut(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){$z(t)&&(this.buffer+=Mut)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Fz=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class DI{constructor(){this.rootNode=Fz(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Fz({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{DI._collapse(n)}))}}class $ut extends DI{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Lut(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Fy(e){return e?typeof e=="string"?e:e.source:null}function jse(e){return Pd("(?=",e,")")}function Fut(e){return Pd("(?:",e,")*")}function But(e){return Pd("(?:",e,")?")}function Pd(...e){return e.map(n=>Fy(n)).join("")}function zut(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function LI(...e){return"("+(zut(e).capture?"":"?:")+e.map(r=>Fy(r)).join("|")+")"}function Nse(e){return new RegExp(e.toString()+"|").exec("").length-1}function Uut(e,t){const n=e&&e.exec(t);return n&&n.index===0}const qut=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $I(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const a=n;let i=Fy(r),o="";for(;i.length>0;){const l=qut.exec(i);if(!l){o+=i;break}o+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?o+="\\"+String(Number(l[1])+a):(o+=l[0],l[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const Wut=/\b\B/,_se="[a-zA-Z]\\w*",FI="[a-zA-Z_]\\w*",Cse="\\b\\d+(\\.\\d+)?",Ese="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",kse="\\b(0b[01]+)",Vut="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Hut=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Pd(t,/.*\b/,e.binary,/\b.*/)),rc({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},By={begin:"\\\\[\\s\\S]",relevance:0},Gut={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[By]},Kut={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[By]},Yut={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},C1=function(e,t,n={}){const r=rc({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=LI("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Pd(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Xut=C1("//","$"),Qut=C1("/\\*","\\*/"),Zut=C1("#","$"),Jut={scope:"number",begin:Cse,relevance:0},edt={scope:"number",begin:Ese,relevance:0},tdt={scope:"number",begin:kse,relevance:0},ndt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[By,{begin:/\[/,end:/\]/,relevance:0,contains:[By]}]},rdt={scope:"title",begin:_se,relevance:0},sdt={scope:"title",begin:FI,relevance:0},adt={begin:"\\.\\s*"+FI,relevance:0},idt=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var bb=Object.freeze({__proto__:null,APOS_STRING_MODE:Gut,BACKSLASH_ESCAPE:By,BINARY_NUMBER_MODE:tdt,BINARY_NUMBER_RE:kse,COMMENT:C1,C_BLOCK_COMMENT_MODE:Qut,C_LINE_COMMENT_MODE:Xut,C_NUMBER_MODE:edt,C_NUMBER_RE:Ese,END_SAME_AS_BEGIN:idt,HASH_COMMENT_MODE:Zut,IDENT_RE:_se,MATCH_NOTHING_RE:Wut,METHOD_GUARD:adt,NUMBER_MODE:Jut,NUMBER_RE:Cse,PHRASAL_WORDS_MODE:Yut,QUOTE_STRING_MODE:Kut,REGEXP_MODE:ndt,RE_STARTERS_RE:Vut,SHEBANG:Hut,TITLE_MODE:rdt,UNDERSCORE_IDENT_RE:FI,UNDERSCORE_TITLE_MODE:sdt});function odt(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ldt(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function cdt(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=odt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function udt(e,t){Array.isArray(e.illegal)&&(e.illegal=LI(...e.illegal))}function ddt(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function hdt(e,t){e.relevance===void 0&&(e.relevance=1)}const fdt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Pd(n.beforeMatch,jse(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},mdt=["of","and","for","in","not","or","if","then","parent","list","value"],pdt="keyword";function Pse(e,t,n=pdt){const r=Object.create(null);return typeof e=="string"?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach(function(i){Object.assign(r,Pse(e[i],t,i))}),r;function a(i,o){t&&(o=o.map(l=>l.toLowerCase())),o.forEach(function(l){const c=l.split("|");r[c[0]]=[i,gdt(c[0],c[1])]})}}function gdt(e,t){return t?Number(t):ydt(e)?0:1}function ydt(e){return mdt.includes(e.toLowerCase())}const Bz={},Vu=e=>{console.error(e)},zz=(e,...t)=>{console.log(`WARN: ${e}`,...t)},nh=(e,t)=>{Bz[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Bz[`${e}/${t}`]=!0)},oS=new Error;function Tse(e,t,{key:n}){let r=0;const a=e[n],i={},o={};for(let l=1;l<=t.length;l++)o[l+r]=a[l],i[l+r]=!0,r+=Nse(t[l-1]);e[n]=o,e[n]._emit=i,e[n]._multi=!0}function xdt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Vu("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),oS;if(typeof e.beginScope!="object"||e.beginScope===null)throw Vu("beginScope must be object"),oS;Tse(e,e.begin,{key:"beginScope"}),e.begin=$I(e.begin,{joinWith:""})}}function vdt(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Vu("skip, excludeEnd, returnEnd not compatible with endScope: {}"),oS;if(typeof e.endScope!="object"||e.endScope===null)throw Vu("endScope must be object"),oS;Tse(e,e.end,{key:"endScope"}),e.end=$I(e.end,{joinWith:""})}}function bdt(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function wdt(e){bdt(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),xdt(e),vdt(e)}function Sdt(e){function t(o,l){return new RegExp(Fy(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=Nse(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=t($I(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const u=c.findIndex((h,f)=>f>0&&h!==void 0),d=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,d)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([u,d])=>c.addRule(u,d)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,u=d.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function a(o){const l=new r;return o.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),o.terminatorEnd&&l.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&l.addRule(o.illegal,{type:"illegal"}),l}function i(o,l){const c=o;if(o.isCompiled)return c;[ldt,ddt,wdt,fdt].forEach(d=>d(o,l)),e.compilerExtensions.forEach(d=>d(o,l)),o.__beforeBegin=null,[cdt,udt,hdt].forEach(d=>d(o,l)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=Pse(o.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),l&&(o.begin||(o.begin=/\B|\b/),c.beginRe=t(c.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(c.endRe=t(c.end)),c.terminatorEnd=Fy(c.end)||"",o.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(o.end?"|":"")+l.terminatorEnd)),o.illegal&&(c.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(d){return jdt(d==="self"?o:d)})),o.contains.forEach(function(d){i(d,c)}),o.starts&&i(o.starts,l),c.matcher=a(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return e.classNameAliases=rc(e.classNameAliases||{}),i(e)}function Ase(e){return e?e.endsWithParent||Ase(e.starts):!1}function jdt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return rc(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Ase(e)?rc(e,{starts:e.starts?rc(e.starts):null}):Object.isFrozen(e)?rc(e):e}var Ndt="11.11.1";class _dt extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const hC=Sse,Uz=rc,qz=Symbol("nomatch"),Cdt=7,Ose=function(e){const t=Object.create(null),n=Object.create(null),r=[];let a=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:$ut};function c(L){return l.noHighlightRe.test(L)}function u(L){let k=L.className+" ";k+=L.parentNode?L.parentNode.className:"";const T=l.languageDetectRe.exec(k);if(T){const F=_(T[1]);return F||(zz(i.replace("{}",T[1])),zz("Falling back to no-highlight mode for this block.",L)),F?T[1]:"no-highlight"}return k.split(/\s+/).find(F=>c(F)||_(F))}function d(L,k,T){let F="",O="";typeof k=="object"?(F=L,T=k.ignoreIllegals,O=k.language):(nh("10.7.0","highlight(lang, code, ...args) has been deprecated."),nh("10.7.0",`Please use highlight(code, options) instead.
4600https://github.com/highlightjs/highlight.js/issues/2277`),O=L,F=k),T===void 0&&(T=!0);const E={code:F,language:O};$("before:highlight",E);const D=E.result?E.result:h(E.language,E.code,T);return D.code=E.code,$("after:highlight",D),D}function h(L,k,T,F){const O=Object.create(null);function E(V,H){return V.keywords[H]}function D(){if(!Ce.keywords){Ze.addText(Ye);return}let V=0;Ce.keywordPatternRe.lastIndex=0;let H=Ce.keywordPatternRe.exec(Ye),ae="";for(;H;){ae+=Ye.substring(V,H.index);const be=oe.case_insensitive?H[0].toLowerCase():H[0],Re=E(Ce,be);if(Re){const[Oe,vt]=Re;if(Ze.addText(ae),ae="",O[be]=(O[be]||0)+1,O[be]<=Cdt&&(Zt+=vt),Oe.startsWith("_"))ae+=H[0];else{const qt=oe.classNameAliases[Oe]||Oe;W(H[0],qt)}}else ae+=H[0];V=Ce.keywordPatternRe.lastIndex,H=Ce.keywordPatternRe.exec(Ye)}ae+=Ye.substring(V),Ze.addText(ae)}function M(){if(Ye==="")return;let V=null;if(typeof Ce.subLanguage=="string"){if(!t[Ce.subLanguage]){Ze.addText(Ye);return}V=h(Ce.subLanguage,Ye,!0,ut[Ce.subLanguage]),ut[Ce.subLanguage]=V._top}else V=m(Ye,Ce.subLanguage.length?Ce.subLanguage:null);Ce.relevance>0&&(Zt+=V.relevance),Ze.__addSublanguage(V._emitter,V.language)}function X(){Ce.subLanguage!=null?M():D(),Ye=""}function W(V,H){V!==""&&(Ze.startScope(H),Ze.addText(V),Ze.endScope())}function re(V,H){let ae=1;const be=H.length-1;for(;ae<=be;){if(!V._emit[ae]){ae++;continue}const Re=oe.classNameAliases[V[ae]]||V[ae],Oe=H[ae];Re?W(Oe,Re):(Ye=Oe,D(),Ye=""),ae++}}function ne(V,H){return V.scope&&typeof V.scope=="string"&&Ze.openNode(oe.classNameAliases[V.scope]||V.scope),V.beginScope&&(V.beginScope._wrap?(W(Ye,oe.classNameAliases[V.beginScope._wrap]||V.beginScope._wrap),Ye=""):V.beginScope._multi&&(re(V.beginScope,H),Ye="")),Ce=Object.create(V,{parent:{value:Ce}}),Ce}function le(V,H,ae){let be=Uut(V.endRe,ae);if(be){if(V["on:end"]){const Re=new Lz(V);V["on:end"](H,Re),Re.isMatchIgnored&&(be=!1)}if(be){for(;V.endsParent&&V.parent;)V=V.parent;return V}}if(V.endsWithParent)return le(V.parent,H,ae)}function ie(V){return Ce.matcher.regexIndex===0?(Ye+=V[0],1):(Z=!0,0)}function ye(V){const H=V[0],ae=V.rule,be=new Lz(ae),Re=[ae.__beforeBegin,ae["on:begin"]];for(const Oe of Re)if(Oe&&(Oe(V,be),be.isMatchIgnored))return ie(H);return ae.skip?Ye+=H:(ae.excludeBegin&&(Ye+=H),X(),!ae.returnBegin&&!ae.excludeBegin&&(Ye=H)),ne(ae,V),ae.returnBegin?0:H.length}function pe(V){const H=V[0],ae=k.substring(V.index),be=le(Ce,V,ae);if(!be)return qz;const Re=Ce;Ce.endScope&&Ce.endScope._wrap?(X(),W(H,Ce.endScope._wrap)):Ce.endScope&&Ce.endScope._multi?(X(),re(Ce.endScope,V)):Re.skip?Ye+=H:(Re.returnEnd||Re.excludeEnd||(Ye+=H),X(),Re.excludeEnd&&(Ye=H));do Ce.scope&&Ze.closeNode(),!Ce.skip&&!Ce.subLanguage&&(Zt+=Ce.relevance),Ce=Ce.parent;while(Ce!==be.parent);return be.starts&&ne(be.starts,V),Re.returnEnd?0:H.length}function G(){const V=[];for(let H=Ce;H!==oe;H=H.parent)H.scope&&V.unshift(H.scope);V.forEach(H=>Ze.openNode(H))}let Pe={};function J(V,H){const ae=H&&H[0];if(Ye+=V,ae==null)return X(),0;if(Pe.type==="begin"&&H.type==="end"&&Pe.index===H.index&&ae===""){if(Ye+=k.slice(H.index,H.index+1),!a){const be=new Error(`0 width match regex (${L})`);throw be.languageName=L,be.badRule=Pe.rule,be}return 1}if(Pe=H,H.type==="begin")return ye(H);if(H.type==="illegal"&&!T){const be=new Error('Illegal lexeme "'+ae+'" for mode "'+(Ce.scope||"<unnamed>")+'"');throw be.mode=Ce,be}else if(H.type==="end"){const be=pe(H);if(be!==qz)return be}if(H.type==="illegal"&&ae==="")return Ye+=`
4601`,1;if(Nn>1e5&&Nn>H.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ye+=ae,ae.length}const oe=_(L);if(!oe)throw Vu(i.replace("{}",L)),new Error('Unknown language: "'+L+'"');const se=Sdt(oe);let je="",Ce=F||se;const ut={},Ze=new l.__emitter(l);G();let Ye="",Zt=0,Yt=0,Nn=0,Z=!1;try{if(oe.__emitTokens)oe.__emitTokens(k,Ze);else{for(Ce.matcher.considerAll();;){Nn++,Z?Z=!1:Ce.matcher.considerAll(),Ce.matcher.lastIndex=Yt;const V=Ce.matcher.exec(k);if(!V)break;const H=k.substring(Yt,V.index),ae=J(H,V);Yt=V.index+ae}J(k.substring(Yt))}return Ze.finalize(),je=Ze.toHTML(),{language:L,value:je,relevance:Zt,illegal:!1,_emitter:Ze,_top:Ce}}catch(V){if(V.message&&V.message.includes("Illegal"))return{language:L,value:hC(k),illegal:!0,relevance:0,_illegalBy:{message:V.message,index:Yt,context:k.slice(Yt-100,Yt+100),mode:V.mode,resultSoFar:je},_emitter:Ze};if(a)return{language:L,value:hC(k),illegal:!1,relevance:0,errorRaised:V,_emitter:Ze,_top:Ce};throw V}}function f(L){const k={value:hC(L),illegal:!1,relevance:0,_top:o,_emitter:new l.__emitter(l)};return k._emitter.addText(L),k}function m(L,k){k=k||l.languages||Object.keys(t);const T=f(L),F=k.filter(_).filter(P).map(X=>h(X,L,!1));F.unshift(T);const O=F.sort((X,W)=>{if(X.relevance!==W.relevance)return W.relevance-X.relevance;if(X.language&&W.language){if(_(X.language).supersetOf===W.language)return 1;if(_(W.language).supersetOf===X.language)return-1}return 0}),[E,D]=O,M=E;return M.secondBest=D,M}function y(L,k,T){const F=k&&n[k]||T;L.classList.add("hljs"),L.classList.add(`language-${F}`)}function p(L){let k=null;const T=u(L);if(c(T))return;if($("before:highlightElement",{el:L,language:T}),L.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",L);return}if(L.children.length>
46010&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(L)),l.throwUnescapedHTML))throw new _dt("One of your code blocks includes unescaped HTML.",L.innerHTML);k=L;const F=k.textContent,O=T?d(F,{language:T,ignoreIllegals:!0}):m(F);L.innerHTML=O.value,L.dataset.highlighted="yes",y(L,T,O.language),L.result={language:O.language,re:O.relevance,relevance:O.relevance},O.secondBest&&(L.secondBest={language:O.secondBest.language,relevance:O.secondBest.relevance}),$("after:highlightElement",{el:L,result:O,text:F})}function x(L){l=Uz(l,L)}const v=()=>{S(),nh("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function b(){S(),nh("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let w=!1;function S(){function L(){S()}if(document.readyState==="loading"){w||window.addEventListener("DOMContentLoaded",L,!1),w=!0;return}document.querySelectorAll(l.cssSelector).forEach(p)}function j(L,k){let T=null;try{T=k(e)}catch(F){if(Vu("Language definition for '{}' could not be registered.".replace("{}",L)),a)Vu(F);else throw F;T=o}T.name||(T.name=L),t[L]=T,T.rawDefinition=k.bind(null,e),T.aliases&&A(T.aliases,{languageName:L})}function N(L){delete t[L];for(const k of Object.keys(n))n[k]===L&&delete n[k]}function C(){return Object.keys(t)}function _(L){return L=(L||"").toLowerCase(),t[L]||t[n[L]]}function A(L,{languageName:k}){typeof L=="string"&&(L=[L]),L.forEach(T=>{n[T.toLowerCase()]=k})}function P(L){const k=_(L);return k&&!k.disableAutodetect}function R(L){L["before:highlightBlock"]&&!L["before:highlightElement"]&&(L["before:highlightElement"]=k=>{L["before:highlightBlock"](Object.assign({block:k.el},k))}),L["after:highlightBlock"]&&!L["after:highlightElement"]&&(L["after:highlightElement"]=k=>{L["after:highlightBlock"](Object.assign({block:k.el},k))})}function I(L){R(L),r.push(L)}function B(L){const k=r.indexOf(L);k!==-1&&r.splice(k,1)}function $(L,k){const T=L;r.forEach(function(F){F[T]&&F[T](k)})}function q(L){return nh("10.7.0","highlightBlock will be removed entirely in v12.0"),nh("10.7.0","Please use highlightElement now."),p(L)}Object.assign(e,{highlight:d,highlightAuto:m,highlightAll:S,highlightElement:p,highlightBlock:q,configure:x,initHighlighting:v,initHighlightingOnLoad:b,registerLanguage:j,unregisterLanguage:N,listLanguages:C,getLanguage:_,registerAliases:A,autoDetection:P,inherit:Uz,addPlugin:I,removePlugin:B}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=Ndt,e.regex={concat:Pd,lookahead:jse,either:LI,optional:But,anyNumberOfTimes:Fut};for(const L in bb)typeof bb[L]=="object"&&wse(bb[L]);return Object.assign(e,bb),e},sm=Ose({});sm.newInstance=()=>Ose({});var Edt=sm;sm.HighlightJS=sm;sm.default=sm;const kdt=$t(Edt),Wz={},Pdt="hljs-";function Tdt(e){const t=kdt.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:a,register:i,registerAlias:o,registered:l};function n(c,u,d){const h=d||Wz,f=typeof h.prefix=="string"?h.prefix:Pdt;if(!t.getLanguage(c))throw new Error("Unknown language: `"+c+"` is not registered");t.configure({__emitter:Adt,classPrefix:f});const m=t.highlight(u,{ignoreIllegals:!0,language:c});if(m.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:m.errorRaised});const y=m._emitter.root,p=y.data;return p.language=m.language,p.relevance=m.relevance,y}function r(c,u){const h=(u||Wz).subset||a();let f=-1,m=0,y;for(;++f<h.length;){const p=h[f];if(!t.getLanguage(p))continue;const x=n(p,c,u);x.data&&x.data.relevance!==void 0&&x.data.relevance>m&&(m=x.data.relevance,y=x)}return y||{type:"root",children:[],data:{language:void 0,relevance:m}}}function a(){return t.listLanguages()}function i(c,u){if(typeof c=="string")t.registerLanguage(c,u);else{let d;for(d in c)Object.hasOwn(c,d)&&t.registerLanguage(d,c[d])}}function o(c,u){if(typeof c=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:c});else{let d;for(d in c)if(Object.hasOwn(c,d)){const h=c[d];t.registerAliases(typeof h=="string"?h:[...h],{languageName:d})}}}function l(c){return!!t.getLanguage(c)}}class Adt{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],a=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:a}):r.children.push(...a)}openNode(t){const n=this,r=t.split(".").map(function(o,l){return l?o+"_".repeat(l):n.options.classPrefix+o}),a=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};a.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Odt={};function Rdt(e){const t=e||Odt,n=t.aliases,r=t.detect||!1,a=t.languages||Iut,i=t.plainText,o=t.prefix,l=t.subset;let c="hljs";const u=Tdt(a);if(n&&u.registerAlias(n),o){const d=o.indexOf("-");c=d===-1?o:o.slice(0,d)}return function(d,h){x1(d,"element",function(f,m,y){if(f.tagName!=="code"||!y||y.type!=="element"||y.tagName!=="pre")return;const p=Idt(f);if(p===!1||!p&&!r||p&&i&&i.includes(p))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(c)||f.properties.className.unshift(c);const x=oct(f,{whitespace:"pre"});let v;try{v=p?u.highlight(p,x,{prefix:o}):u.highlightAuto(x,{prefix:o,subset:l})}catch(b){const w=b;if(p&&/Unknown language/.test(w.message)){h.message("Cannot highlight as `"+p+"`, it’s not registered",{ancestors:[y,f],cause:w,place:f.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw w}!p&&v.data&&v.data.language&&f.properties.className.push("language-"+v.data.language),v.children.length>0&&(f.children=v.children)})}}function Idt(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const a=String(t[n]);if(a==="no-highlight"||a==="nohighlight")return!1;!r&&a.slice(0,5)==="lang-"&&(r=a.slice(5)),!r&&a.slice(0,9)==="language-"&&(r=a.slice(9))}return r}const Mdt=()=>{var S,j;const{category:e,guide:t}=US(),[n,r]=g.useState(0),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(new Set);g.useEffect(()=>{const N=JSON.parse(localStorage.getItem("completedGuides")||"[]"),C=`${e}-${t}`;i(N.includes(C));const _=localStorage.getItem(`guide-${C}-sections`);if(_)try{const A=JSON.parse(_);u(new Set(A))}catch(A){console.error("Error parsing saved sections:",A)}},[e,t]);const d=()=>{const N=JSON.parse(localStorage.getItem("completedGuides")||"[]"),C=`${e}-${t}`;N.includes(C)||(N.push(C),localStorage.setItem("completedGuides",JSON.stringify(N)),i(!0),r(100))};g.useEffect(()=>{n>=90&&!a&&d()},[n,a]);const h=Ph.guides[t],f=Ph.categories[e],m=(f==null?void 0:f.guides)||[],y=m.indexOf(t),p=y<m.length-1?m[y+1]:null,x=y>0?m[y-1]:null,v=p?{title:((S=Ph.guides[p])==null?void 0:S.title)||"",slug:p}:null,b=x?{title:((j=Ph.guides[x])==null?void 0:j.title)||"",slug:x}:null,w=N=>{switch(N==null?void 0:N.toLowerCase()){case"beginner":return"bg-green-100 text-green-800 border-green-200";case"intermediate":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"advanced":return"bg-red-100 text-red-800 border-red-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}};return g.useEffect(()=>{const N=()=>{const C=window.scrollY,_=window.innerHeight,A=document.documentElement.scrollHeight-_,P=C/A*100;r(Math.min(P,100))};return window.addEventListener("scroll",N),()=>window.removeEventListener("scroll",N)},[]),h?s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(ri,{title:`${h.title} - Help Guide | Slay Your Sales`,description:h.description,keywords:`${h.title.toLowerCase()}, help, documentation, tutorial, guide`,canonicalUrl:`https://slayyoursales.com/help/${e}/${t}`}),s.jsx(Ee,{}),s.jsx("div",{className:"fixed top-20 left-0 right-0 z-40",children:s.jsx(ur,{value:n,className:"h-1 rounded-none"})}),s.jsxs("div",{className:"pt-20",children:[s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-8",children:[s.jsxs(ee,{to:`/help/${e}`,className:"inline-flex items-center text-muted-foreground hover:text-primary transition-colors mb-6",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"Back to ",(e==null?void 0:e.charAt(0).toUpperCase())+(e==null?void 0:e.slice(1).replace("-"," "))]}),s.jsx(he.div,{initial:{opacity:0,y:20}
4601,animate:{opacity:1,y:0},transition:{duration:.6},children:s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"text-4xl font-bold text-foreground mb-4",children:h.title}),s.jsx("p",{className:"text-xl text-muted-foreground mb-6",children:h.description}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4 mb-6",children:[s.jsx(fe,{className:w(h.difficulty),children:h.difficulty}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(Xn,{className:"w-4 h-4"}),s.jsx("span",{children:h.readTime})]}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(os,{className:"w-4 h-4"}),s.jsxs("span",{children:["Progress: ",Math.round(n),"%"]})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>l(!o),className:o?"bg-primary/10 border-primary text-primary":"",children:[s.jsx(x0,{className:`w-4 h-4 mr-2 ${o?"fill-current":""}`}),o?"Bookmarked":"Bookmark"]}),s.jsxs(U,{variant:"outline",size:"sm",children:[s.jsx(ex,{className:"w-4 h-4 mr-2"}),"Share"]}),s.jsxs(U,{variant:a?"default":"outline",size:"sm",onClick:d,className:a?"bg-green-600 hover:bg-green-700 text-white border-green-600":"",children:[s.jsx(ks,{className:"w-4 h-4 mr-2"}),a?"Completed":"Mark Complete"]}),a&&s.jsxs(fe,{className:"bg-green-100 text-green-800 border-green-200",children:[s.jsx(ks,{className:"w-3 h-3 mr-1"}),"Completed"]})]})]})})]}),s.jsx(he.div,{className:"max-w-4xl mx-auto px-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:s.jsx(Y,{className:"border-0 shadow-lg",children:s.jsx(te,{className:"p-8",children:s.jsx("div",{className:"prose prose-lg max-w-none markdown-content",children:s.jsx(pte,{remarkPlugins:[ect],rehypePlugins:[Rdt],children:h.content})})})})}),s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-8",children:[s.jsx(Y,{className:"mb-8",children:s.jsxs(te,{className:"p-6",children:[s.jsx("h3",{className:"font-semibold mb-4 text-foreground",children:"Was this guide helpful?"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs(U,{variant:"outline",size:"sm",className:"hover:bg-green-50 hover:border-green-200 hover:text-green-600",children:[s.jsx(e9,{className:"w-4 h-4 mr-2"}),"Yes, helpful"]}),s.jsxs(U,{variant:"outline",size:"sm",className:"hover:bg-red-50 hover:border-red-200 hover:text-red-600",children:[s.jsx(Jq,{className:"w-4 h-4 mr-2"}),"Needs improvement"]})]})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[b&&s.jsx(ee,{to:`/help/${e}/${b.slug}`,children:s.jsx(Y,{className:"h-full border-2 border-gray-100 hover:border-primary/30 transition-colors cursor-pointer",children:s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground mb-2",children:[s.jsx(kS,{className:"w-4 h-4"}),s.jsx("span",{className:"text-sm",children:"Previous Guide"})]}),s.jsx("h4",{className:"font-semibold text-foreground",children:b.title})]})})}),v&&s.jsx(ee,{to:`/help/${e}/${v.slug}`,className:b?"":"md:col-start-2",children:s.jsx(Y,{className:"h-full border-2 border-gray-100 hover:border-primary/30 transition-colors cursor-pointer",children:s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-end gap-3 text-muted-foreground mb-2",children:[s.jsx("span",{className:"text-sm",children:"Next Guide"}),s.jsx(lm,{className:"w-4 h-4"})]}),s.jsx("h4",{className:"font-semibold text-foreground text-right",children:v.title})]})})})]})]})]}),s.jsx(wt,{})]}):s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-20 max-w-4xl mx-auto px-6 py-8",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground mb-4",children:"Guide Not Found"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"The requested guide could not be found."}),s.jsx(ee,{to:"/help",className:"text-primary hover:underline",children:"Return to Help Center"})]})}),s.jsx(wt,{})]})},Ddt=()=>{const[e,t]=g.useState(""),[n,r]=g.useState([]),a=[{category:"Getting Started",questions:[{id:"getting-started-1",question:"What is Slay Your Sales and how does it work?",answer:"Slay Your Sales is an AI-powered sales intelligence platform that helps you find and analyze potential prospects using real-time business data. It combines company research, business signals, auto-prospecting, and smart matchmaking to transform your sales process."},{id:"getting-started-2",question:"How do I get started with my first campaign?",answer:"Start by completing your profile setup, then navigate to Auto-Prospecting to create your first campaign. Define your ideal customer profile (ICP), set up basic targeting criteria, and launch with a small test batch to optimize your approach."},{id:"getting-started-3",question:"Do I need technical knowledge to use the platform?",answer:"No technical knowledge is required! Our platform is designed for sales professionals. However, for advanced features like BYOK (Bring Your Own Key) setup, basic understanding of API keys is helpful but not essential."}]},{category:"BYOK & API Keys",questions:[{id:"byok-1",question:"What is BYOK and why should I use it?",answer:"BYOK (Bring Your Own Key) allows you to use your own OpenAI API key for unlimited access with direct billing from OpenAI. This gives you cost control, data sovereignty, and removes platform usage limits."},{id:"byok-2",question:"Which API providers are supported?",answer:"Currently, we support OpenAI API keys only. This includes access to GPT-3.5 Turbo, GPT-4, and GPT-4 Turbo models with automatic model selection based on task complexity."},{id:"byok-3",question:"Is my API key secure?",answer:"Yes, your API keys are encrypted and stored securely. We follow industry-standard security practices and your keys are never shared or used for any purpose other than your campaigns."},{id:"byok-4",question:"How much will using my own API key cost?",answer:"Costs depend on your usage and OpenAI's pricing. Typically, auto-prospecting campaigns cost $10-50/month depending on volume. You pay OpenAI directly with no markup from our platform."}]},{category:"Business Signals",questions:[{id:"signals-1",question:"What types of business signals do you track?",answer:"We track funding announcements, M&A activity, technology stack changes, hiring spikes, leadership changes, product launches, press coverage, and market expansion signals."},{id:"signals-2",question:"How real-time are the business signals?",answer:"Our signals are updated continuously throughout the day. Most signals appear within 1-6 hours of the actual event, depending on the data source and signal type."},{id:"signals-3",question:"Can I set up custom alerts for specific signals?",answer:"Yes! You can configure personalized alerts for specific signal types, industries, company sizes, or even individual companies you're monitoring."}]},{category:"Auto-Prospecting",questions:[{id:"auto-prospecting-1",question:"How does auto-prospecting work?",answer:"Auto-prospecting uses AI to automatically find and score potential prospects based on your ideal customer profile. It runs continuous campaigns to discover new companies that match your criteria."},{id:"auto-prospecting-2",question:"What's the difference between quality score and match score?",answer:"Quality score measures how well a prospect fits your defined criteria, while match score indicates overall compatibility including behavioral patterns and timing signals."},{id:"auto-prospecting-3",question:"Can I integrate auto-prospecting with my CRM?",answer:"Yes, you can export prospect data to integrate with your CRM. We support CSV exports and are working on direct CRM integrations for popular platforms."}]},{category:"Data & Privacy",questions:[{id:"data-1",question:"Where does your company data come from?",answer:"Our data comes from multiple verified sources including public business records, company websites, news sources, and partnership integrations. All data is aggregated and regularly updated."},{id:"data-2",question:"How accurate is the contact information?",answer:"Contact information accuracy varies by source and company size. We continuously validate and update our database. Always verify critical contact details before important outreach."},{id:"data-3",question:"Do you comply with GDPR and privacy regulations?",answer:"Yes, we are fully compliant with GDPR, CCPA, and other privacy regulations. We only collect and process publicly available business information and provide data deletion options upon request."}]},{category:"Billing & Pricing",questions:[{id:"billing-1",question:"What pricing plans are available?",answer:"We offer multiple pricing tiers to suit different needs. Visit our pricing page for current plans, or contact our team for enterprise pricing options."},{id:"billing-2",question:"Is there a free trial available?",answer:"Yes, we offer a free trial so you can explore the platform and see the value before committing to a paid plan."},{id:"billing-3",question:"Can I cancel anytime?",answer:"Yes, you can cancel your subscription at any time. There are no long-term contracts or cancellation fees."}]}],o=a.flatMap(c=>c.questions.map(u=>({...u,category:c.category}))).filter(c=>e===""||c.question.toLowerCase().includes(e.toLowerCase())||c.answer.toLowerCase().includes(e.toLowerCase())||c.category.toLowerCase().includes(e.toLowerCase())),l=c=>{r(u=>u.includes(c)?u.filter(d=>d!==c):[...u,c])};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-white",children:[s.jsx(ri,{title:"FAQ - Frequently Asked Questions | Slay Your Sales",description:"Find answers to common questions about Slay Your Sales, including BYOK setup, auto-prospecting, business signals, pricing, and more.",keywords:"FAQ, frequently asked questions, help, BYOK, auto-prospecting, business signals, pricing, support",canonicalUrl:"https://slayyoursales.com/help/faq"}),s.jsx(Ee,{}),s.jsxs("div",{className:"pt-20",children:[s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-8",children:[s.jsxs(ee,{to:"/help",className:"inline-flex items-center text-muted-foreground hover:text-primary transition-colors mb-6",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"Back to Help Center"]}),s.jsxs(he.div,{initial:{opacity:0,y:20}
4601,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[s.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-2xl p-4 mx-auto mb-6",children:s.jsx(fE,{className:"w-8 h-8 text-white"})}),s.jsx("h1",{className:"text-4xl font-bold text-foreground mb-4",children:"Frequently Asked Questions"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto",children:"Find quick answers to the most common questions about using Slay Your Sales."})]}),s.jsxs("div",{className:"max-w-2xl mx-auto relative mb-12",children:[s.jsx(st,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-muted-foreground w-5 h-5"}),s.jsx(at,{placeholder:"Search FAQs...",className:"pl-12 pr-4 py-3 text-lg border-2 border-gray-200 focus:border-primary rounded-xl",value:e,onChange:c=>t(c.target.value)})]})]}),s.jsxs(he.div,{className:"max-w-4xl mx-auto px-6 pb-16",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:[e?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-2xl font-bold text-foreground mb-6",children:["Search Results (",o.length,")"]}),o.length>0?o.map(c=>s.jsx(Y,{className:"border-2 border-gray-100",children:s.jsxs(Yw,{open:n.includes(c.id),onOpenChange:()=>l(c.id),children:[s.jsx(Xw,{asChild:!0,children:s.jsx(te,{className:"p-6 cursor-pointer hover:bg-gray-50 transition-colors",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1 text-left",children:[s.jsx("p",{className:"text-sm text-primary mb-1",children:c.category}),s.jsx("h3",{className:"font-semibold text-foreground pr-4",children:c.question})]}),n.includes(c.id)?s.jsx(sD,{className:"w-5 h-5 text-muted-foreground flex-shrink-0"}):s.jsx(b0,{className:"w-5 h-5 text-muted-foreground flex-shrink-0"})]})})}),s.jsx(Qw,{children:s.jsx(te,{className:"px-6 pb-6 pt-0",children:s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:c.answer})})})]})},c.id)):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground text-lg mb-4",children:"No FAQs found matching your search."}),s.jsx(U,{variant:"outline",onClick:()=>t(""),children:"Clear search"})]})]}):s.jsx("div",{className:"space-y-8",children:a.map((c,u)=>s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:c.category}),s.jsx("div",{className:"space-y-4",children:c.questions.map(d=>s.jsx(Y,{className:"border-2 border-gray-100",children:s.jsxs(Yw,{open:n.includes(d.id),onOpenChange:()=>l(d.id),children:[s.jsx(Xw,{asChild:!0,children:s.jsx(te,{className:"p-6 cursor-pointer hover:bg-gray-50 transition-colors",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"font-semibold text-foreground flex-1 text-left pr-4",children:d.question}),n.includes(d.id)?s.jsx(sD,{className:"w-5 h-5 text-muted-foreground flex-shrink-0"}):s.jsx(b0,{className:"w-5 h-5 text-muted-foreground flex-shrink-0"})]})})}),s.jsx(Qw,{children:s.jsx(te,{className:"px-6 pb-6 pt-0",children:s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:d.answer})})})]})},d.id))})]},c.category))}),s.jsx("div",{className:"mt-16 text-center",children:s.jsx(Y,{className:"bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20",children:s.jsxs(te,{className:"p-8",children:[s.jsx(ti,{className:"w-12 h-12 text-primary mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-bold text-foreground mb-2",children:"Still need help?"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Can't find what you're looking for? Our support team is here to help."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(U,{children:"Contact Support"}),s.jsx(U,{variant:"outline",children:"Browse All Guides"})]})]})})})]})]}),s.jsx(wt,{})]})},Ldt=()=>{const{id:e}=US(),[t,n]=g.useState(null),[r,a]=g.useState(!0);g.useEffect(()=>{(async()=>{if(e)try{const{data:c,error:u}=await K.functions.invoke("get-signal-public",{body:{id:e}});if(u)throw u;n(c.signal)}catch(c){console.error("Error fetching signal for embed:",c)}finally{a(!1)}})()},[e]);const i=l=>l.split(" ").map(c=>c.charAt(0)).join("").toUpperCase().slice(0,2),o=l=>l.split("_").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" ");return r?s.jsx("div",{className:"min-h-screen bg-transparent flex items-center justify-center p-4",children:s.jsx("div",{className:"animate-pulse w-full max-w-md",children:s.jsx("div",{className:"h-48 bg-gray-200 rounded-lg"})})}):t?s.jsx("div",{className:"min-h-screen bg-transparent flex items-center justify-center p-4",children:s.jsx(Y,{className:"max-w-md w-full shadow-lg",children:s.jsxs(te,{className:"p-5",children:[s.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[s.jsxs(Ks,{className:"w-12 h-12 flex-shrink-0",children:[t.company_logo_url?s.jsx(ni,{src:t.company_logo_url,alt:`${t.company_name} logo`}):null,s.jsx(Ys,{className:"bg-orange-100 text-orange-700 font-semibold",children:i(t.company_name)})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"font-semibold text-base mb-1",children:t.company_name}),s.jsx(fe,{className:"text-xs",children:o(t.signal_type)})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:t.signal_title}),s.jsxs("div",{className:"flex items-center justify-between pt-3 border-t",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[s.jsx(uE,{className:"w-4 h-4"}),s.jsx("span",{className:"text-xs font-medium",children:t.upvote_count})]})}),s.jsx(U,{size:"sm",variant:"default",asChild:!0,className:"bg-orange-600 hover:bg-orange-700",children:s.jsxs("a",{href:"https://slaygent.ai/signals",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-xs",children:"View on Slaygent.ai"}),s.jsx(ar,{className:"w-3 h-3"})]})})]}),s.jsx("div",{className:"mt-3 pt-3 border-t",children:s.jsxs("a",{href:"https://slaygent.ai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 text-xs text-muted-foreground hover:text-orange-600 transition-colors",children:[s.jsx("img",{src:"/lovable-uploads/d2d294c2-7005-4f31-9144-d84ac42b8786.png",alt:"Slaygent.ai",className:"w-4 h-4"}),s.jsx("span",{className:"font-semibold",children:"Powered by Slaygent.ai"}),s.jsx("span",{children:"·"}),s.jsx("span",{children:"Real-time startup intelligence"})]})})]})})}):s.jsx("div",{className:"min-h-screen bg-transparent flex items-center justify-center p-4",children:s.jsx(Y,{className:"max-w-md w-full",children:s.jsx(te,{className:"p-6 text-center",children:s.jsx("p",{className:"text-muted-foreground",children:"Signal not found"})})})})},$dt=()=>{const{id:e}=US(),[t,n]=g.useState(null),[r,a]=g.useState(!0);g.useEffect(()=>{(async()=>
4601{if(e)try{const{data:d,error:h}=await K.functions.invoke("get-signal-public",{body:{id:e}});if(h)throw h;n(d.signal)}catch(d){console.error("Error fetching signal:",d)}finally{a(!1)}})()},[e]);const i=u=>u.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2),o=u=>u.split("_").map(d=>d.charAt(0).toUpperCase()+d.slice(1)).join(" ");if(r)return s.jsxs(s.Fragment,{children:[s.jsx(Ee,{}),s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("div",{className:"container max-w-4xl mx-auto px-4 py-8",children:[s.jsx(Je,{className:"h-8 w-32 mb-6"}),s.jsx(Y,{children:s.jsxs(te,{className:"p-6",children:[s.jsx(Je,{className:"h-12 w-12 rounded-full mb-4"}),s.jsx(Je,{className:"h-6 w-48 mb-2"}),s.jsx(Je,{className:"h-4 w-full mb-4"}),s.jsx(Je,{className:"h-20 w-full"})]})})]})}),s.jsx(wt,{})]});if(!t)return s.jsxs(s.Fragment,{children:[s.jsx(Ee,{}),s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Signal not found"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"This signal may have been removed or doesn't exist."}),s.jsx(U,{asChild:!0,children:s.jsxs(ee,{to:"/signals",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"View All Signals"]})})]})}),s.jsx(wt,{})]});const l=`${t.company_name} – ${t.signal_title} | Slaygent.ai`,c=t.signal_description||`${t.company_name} ${o(t.signal_type)} signal on Slaygent.ai`;return s.jsxs(s.Fragment,{children:[s.jsx(ri,{title:l,description:c,ogImage:"/lovable-uploads/d2d294c2-7005-4f31-9144-d84ac42b8786.png"}),s.jsx(Ee,{}),s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("div",{className:"container max-w-4xl mx-auto px-4 py-8",children:[s.jsx(U,{variant:"ghost",asChild:!0,className:"mb-6",children:s.jsxs(ee,{to:"/signals",children:[s.jsx(xo,{className:"w-4 h-4 mr-2"}),"Back to All Signals"]})}),s.jsx(Y,{children:s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[s.jsxs(Ks,{className:"w-16 h-16",children:[s.jsx(ni,{src:t.company_logo_url,alt:t.company_name}),s.jsx(Ys,{children:i(t.company_name)})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"text-2xl font-bold mb-2",children:t.company_name}),s.jsx(fe,{variant:"secondary",className:"mb-2",children:o(t.signal_type)}),t.country&&s.jsx("p",{className:"text-sm text-muted-foreground",children:t.country})]})]}),s.jsx("h2",{className:"text-xl font-semibold mb-3",children:t.signal_title}),t.signal_description&&s.jsx("p",{className:"text-muted-foreground mb-4",children:t.signal_description}),s.jsxs("div",{className:"flex items-center gap-4 pt-4 border-t",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ze,{className:"w-4 h-4 text-primary"}),s.jsxs("span",{className:"text-sm font-medium",children:[t.upvote_count," upvotes"]})]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:new Date(t.signal_date).toLocaleDateString()})]}),s.jsx("div",{className:"mt-6 pt-6 border-t",children:s.jsx(U,{asChild:!0,className:"w-full",children:s.jsx(ee,{to:"/signals",children:"View More Signals on Slaygent.ai"})})})]})}),s.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s.jsxs("p",{children:["Powered by ",s.jsx("strong",{children:"Slaygent.ai"})]})})]})}),s.jsx(wt,{})]})},Fdt=()=>{const[e,t]=g.useState(!1);return s.jsx(b1,{children:s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Saved Companies"}),s.jsx("p",{className:"text-muted-foreground",children:"Manage and organize your saved companies"})]}),s.jsxs("div",{className:"grid gap-8 lg:grid-cols-3",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsx(Rte,{})}),s.jsx("div",{className:"space-y-4",children:s.jsxs(Y,{children:[s.jsxs(xe,{children:[s.jsx(Se,{className:"text-lg",children:"Google Sheets Export"}),s.jsx(Za,{children:e?"Ready to export your saved companies":"Connect to enable export"})]}),s.jsx(te,{children:s.jsx(Ate,{onConnectionChange:t})})]})})]})]})})]})})},Bdt=()=>s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Terms and Conditions"}),s.jsx("p",{className:"text-muted-foreground",children:"Last updated: January 19, 2025"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(gd,{className:"w-5 h-5"}),"1. Acceptance of Terms"]})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:'By accessing and using Slaygent.ai ("Platform"), you agree to be bound by these Terms and Conditions. If you do not agree to these terms, please do not use our Platform.'})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(Ya,{className:"w-5 h-5"}),"2. Permitted Use"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none space-y-4",children:[s.jsx("p",{children:s.jsx("strong",{children:"You may use our Platform to:"})}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Research and identify potential business customers"}),s.jsx("li",{children:"Access company intelligence and signals data"}),s.jsx("li",{children:"Use AI-powered matchmaking for prospecting"}),s.jsx("li",{children:"Export data for legitimate business prospecting purposes"}),s.jsx("li",{children:"Integrate with your CRM and sales tools"})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(t9,{className:"w-5 h-5 text-destructive"}),"3. Prohibited Activities"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none space-y-4",children:[s.jsx("p",{children:s.jsx("strong",{children:"You explicitly agree NOT to:"})}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Automated Scraping:"})," Use bots, scrapers, or automated tools to extract data from our Platform beyond the official export features we provide"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Bulk Data Harvesting:"})," Systematically download or extract large volumes of data for the purpose of creating competing databases or services"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Reselling Data:"})," Sell, license, or redistribute data obtained from our Platform to third parties"]}
4601),s.jsxs("li",{children:[s.jsx("strong",{children:"Reverse Engineering:"})," Attempt to reverse engineer, decompile, or extract our proprietary algorithms or systems"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Spam or Abuse:"})," Use the Platform to send unsolicited communications or engage in harassment"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"False Information:"})," Provide false or misleading information during registration or usage"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Unauthorized Access:"})," Access or attempt to access accounts, systems, or data not authorized for your use"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"API Abuse:"})," Exceed rate limits, make excessive requests, or abuse API endpoints"]})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(MA,{className:"w-5 h-5"}),"4. Data Usage and Compliance"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none space-y-4",children:[s.jsx("p",{children:s.jsx("strong",{children:"When using data from our Platform, you must:"})}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Comply with all applicable laws including GDPR, CCPA, and CAN-SPAM"}),s.jsx("li",{children:"Respect opt-out requests and unsubscribe preferences"}),s.jsx("li",{children:"Use data solely for B2B prospecting purposes"}),s.jsx("li",{children:"Maintain appropriate security measures for any exported data"}),s.jsx("li",{children:"Not use data for discriminatory or illegal purposes"})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"5. Account Termination"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"We reserve the right to suspend or terminate your account immediately if we detect:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Violation of these Terms and Conditions"}),s.jsx("li",{children:"Automated scraping or data harvesting activities"}),s.jsx("li",{children:"Suspicious or abusive usage patterns"}),s.jsx("li",{children:"Fraudulent activity or payment issues"})]}),s.jsx("p",{className:"mt-4",children:"No refunds will be provided for accounts terminated due to Terms violations."})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"6. Intellectual Property"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"All content, features, and functionality on our Platform, including but not limited to text, graphics, logos, algorithms, and software, are owned by Slaygent.ai and protected by intellectual property laws."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"7. Disclaimer of Warranties"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:'Our Platform is provided "as is" without warranties of any kind. We do not guarantee:'}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"The accuracy, completeness, or timeliness of data"}),s.jsx("li",{children:"Uninterrupted or error-free service"}),s.jsx("li",{children:"Specific business outcomes or results"})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"8. Limitation of Liability"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"To the maximum extent permitted by law, Slaygent.ai shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising from your use of the Platform."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"9. Subscription and Billing"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Subscriptions are billed on a recurring basis according to your selected plan"}),s.jsx("li",{children:"You may cancel your subscription at any time"}),s.jsx("li",{children:"Refunds are subject to our refund policy"}),s.jsx("li",{children:"Price changes will be communicated 30 days in advance"})]})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"10. Changes to Terms"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"We may update these Terms and Conditions periodically. Material changes will be communicated via email or through the Platform. Continued use after changes constitutes acceptance of the new terms."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"11. Governing Law"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"These Terms are governed by and construed in accordance with applicable laws. Any disputes shall be resolved through binding arbitration."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"12. Contact Information"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"For questions about these Terms and Conditions, please contact us at:"}),s.jsxs("p",{className:"mt-2",children:[s.jsx("strong",{children:"Email:"})," [email protected]"]})]})]})]})]})}),s.jsx(wt,{})]}),zdt=()=>s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Ee,{}),s.jsx("div",{className:"pt-32 pb-16 px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Privacy Policy"}),s.jsx("p",{className:"text-muted-foreground",children:"Last updated: January 19, 2025"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(gd,{className:"w-5 h-5"}),"1. Introduction"]})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:'At Slaygent.ai ("we," "us," "our"), we are committed to protecting your privacy and handling your data responsibly. This Privacy Policy explains how we 
4601collect, use, store, and protect your personal information when you use our AI-powered prospecting platform.'})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(nl,{className:"w-5 h-5"}),"2. Information We Collect"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none space-y-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.1 Account Information:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Email address"}),s.jsx("li",{children:"Full name"}),s.jsx("li",{children:"Company name and details"}),s.jsx("li",{children:"Password (encrypted)"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.2 Usage Data:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Company searches and research activities"}),s.jsx("li",{children:"Signal views and interactions"}),s.jsx("li",{children:"Matchmaking profile information"}),s.jsx("li",{children:"Auto-prospecting settings and preferences"}),s.jsx("li",{children:"Saved companies and notes"}),s.jsx("li",{children:"Export history"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.3 Technical Data:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"IP address"}),s.jsx("li",{children:"Browser type and version"}),s.jsx("li",{children:"Device information"}),s.jsx("li",{children:"Usage patterns and analytics"}),s.jsx("li",{children:"Log data"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.4 Payment Information:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Billing address"}),s.jsx("li",{children:"Payment method (processed securely by Stripe - we do not store full credit card details)"}),s.jsx("li",{children:"Transaction history"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.5 API Keys (BYOK):"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"OpenAI API keys (encrypted and stored securely)"}),s.jsx("li",{children:"Other third-party API credentials you provide"})]})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(zr,{className:"w-5 h-5"}),"3. How We Use Your Information"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"We use your information to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Provide Services:"})," Deliver company research, signals, matchmaking, and prospecting features"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"AI Processing:"})," Generate matchmaking scores, ice breakers, and pitch suggestions using AI"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Personalization:"})," Customize your experience based on your preferences and usage patterns"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Analytics:"})," Understand platform usage to improve our services"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Communication:"})," Send account updates, feature announcements, and support responses"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Security:"})," Detect and prevent fraud, abuse, and unauthorized access"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Compliance:"})," Meet legal and regulatory requirements"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Billing:"})," Process payments and manage subscriptions"]})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(At,{className:"w-5 h-5"}),"4. Data Sharing and Disclosure"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none space-y-4",children:[s.jsx("p",{children:s.jsx("strong",{children:"We do NOT sell your personal data to third parties."})}),s.jsx("p",{children:"We may share your information with:"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.1 Service Providers:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Supabase:"})," Database and authentication services"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"OpenAI:"})," AI processing (when using our API or your BYOK key)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Stripe:"})," Payment processing"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Google Worksp
4601ace:"})," When you export to Google Sheets (optional)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Analytics Providers:"})," For platform improvement"]})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.2 Legal Compliance:"}),s.jsx("p",{children:"We may disclose information when required by law, court order, or to protect our rights and safety."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.3 Business Transfers:"}),s.jsx("p",{children:"In the event of a merger, acquisition, or sale of assets, your information may be transferred."})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(Tg,{className:"w-5 h-5"}),"5. Data Security"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"We implement industry-standard security measures:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Encryption:"})," All data in transit uses SSL/TLS encryption"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Database Security:"})," Row-level security (RLS) policies on all sensitive data"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"API Key Protection:"})," BYOK keys are encrypted at rest"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Access Controls:"})," Strict authentication and authorization"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Monitoring:"})," Continuous security monitoring and logging"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Regular Audits:"})," Periodic security assessments"]})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsxs(Se,{className:"flex items-center gap-2",children:[s.jsx(Ya,{className:"w-5 h-5"}),"6. Your Rights (GDPR & CCPA)"]})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"You have the right to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Access:"})," Request a copy of your personal data"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Correction:"})," Update or correct inaccurate information"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Deletion:"})," Request deletion of your account and data"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Export:"})," Download your data in a portable format"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Opt-Out:"})," Unsubscribe from marketing communications"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Restrict Processing:"})," Limit how we use your data"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Object:"})," Object to certain data processing activities"]})]}),s.jsxs("p",{className:"mt-4",children:["To exercise these rights, contact us at ",s.jsx("strong",{children:"[email protected]"})]})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"7. Data Retention"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"We retain your data:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Active Accounts:"})," For the duration of your subscription"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Canceled Accounts:"})," 90 days after cancellation (for recovery)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Legal Requirements:"})," As required by law (e.g., billing records for 7 years)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Analytics Data:"})," Aggregated and anonymized data may be retained indefinitely"]})]}),s.jsx("p",{className:"mt-4",children:"You can request immediate deletion by contacting us."})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"8. Cookies and Tracking"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"We use cookies and similar technologies for:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Essential Cookies:"})," Authentication and security"]}
4601),s.jsxs("li",{children:[s.jsx("strong",{children:"Analytics Cookies:"})," Usage tracking and performance monitoring"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Preference Cookies:"})," Remembering your settings"]})]}),s.jsx("p",{className:"mt-4",children:"You can control cookies through your browser settings."})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"9. Third-Party Services"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"Our Platform integrates with third-party services:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"OpenAI:"})," For AI-powered features (subject to OpenAI's privacy policy)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Stripe:"})," For payment processing (subject to Stripe's privacy policy)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Google:"})," When you use Google Sheets export (optional)"]})]}),s.jsx("p",{className:"mt-4",children:"We are not responsible for the privacy practices of these third parties."})]})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"10. Children's Privacy"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"Our Platform is not intended for users under 18 years of age. We do not knowingly collect data from children."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"11. International Data Transfers"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"Your data may be transferred to and processed in countries outside your residence. We ensure appropriate safeguards are in place for such transfers."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"12. Changes to This Policy"})}),s.jsx(te,{className:"prose prose-sm max-w-none",children:s.jsx("p",{children:"We may update this Privacy Policy periodically. Material changes will be communicated via email. Continued use after changes constitutes acceptance."})})]}),s.jsxs(Y,{children:[s.jsx(xe,{children:s.jsx(Se,{children:"13. Contact Us"})}),s.jsxs(te,{className:"prose prose-sm max-w-none",children:[s.jsx("p",{children:"For privacy-related questions or requests:"}),s.jsxs("p",{className:"mt-2",children:[s.jsx("strong",{children:"Email:"})," [email protected]",s.jsx("br",{}),s.jsx("strong",{children:"Support:"})," [email protected]"]})]})]})]})]})}),s.jsx(wt,{})]}),Udt=()=>{const e=cs(),[t,n]=g.useState("processing");return g.useEffect(()=>{(async()=>{var a;try{const i=new URLSearchParams(window.location.search),o=i.get("code"),l=i.get("state"),c=i.get("error");if(c)throw new Error(`Google OAuth error: ${c}`);if(!o||!l)throw new Error("Missing authorization code or state");const d=(a=(await K.auth.getSession()).data.session)==null?void 0:a.access_token;if(!d)throw new Error("Your session expired. Please sign in again.");const{data:h,error:f}=await K.functions.invoke("google-oauth-callback",{body:{code:o,state:l},headers:{Authorization:`Bearer ${d}`}});if(f)throw f;if(h!=null&&h.success)n("success"),Ae.success("Google account connected successfully!"),window.opener?(window.opener.postMessage({type:"google_oauth_complete",success:!0},window.location.origin),setTimeout(()=>{window.close()},1e3)):setTimeout(()=>{e("/profile")},1500);else throw new Error("Failed to complete authorization")}catch(i){console.error("Error in Google OAuth callback:",i),n("error"),Ae.error("Failed to connect Google account"),window.opener?(window.opener.postMessage({type:"google_oauth_complete",success:!1},window.location.origin),setTimeout(()=>{window.close()},2e3)):setTimeout(()=>{e("/profile")},2e3)}})()},[e]),s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsxs("div",{className:"text-center space-y-4",children:[t==="processing"&&s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"h-12 w-12 animate-spin mx-auto text-primary"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Connecting Google Account..."}),s.jsx("p",{className:"text-muted-foreground",children:"Please wait while we complete the authorization"})]}),t==="success"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-12 w-12 rounded-full bg-green-500/20 flex items-center justify-center mx-auto",children:s.jsx("span",{className:"text-2xl",children:"✓"})}),s.jsx("h2",{className:"text-xl font-semibold text-green-600",children:"Success!"}),s.jsx("p",{className:"text-muted-foreground",children:"Redirecting you back..."})]}),t==="error"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-12 w-12 rounded-full bg-red-500/20 flex items-center justify-center mx-auto",children:s.jsx("span",{className:"text-2xl",children:"✗"})}),s.jsx("h2",{className:"text-xl font-semibold text-red-600",children:"Connection Failed"}),s.jsx("p",{className:"text-muted-foreground",children:"Redirecting you back..."})]})]})})},qdt=new Ade({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:"always"}}}),Wdt=()=>s.jsx(Mde,{client:qdt,children:s.jsx(ype,{children:s.jsx(xpe,{children:s.jsx(Xhe,{children:s.jsx(bpe,{children:s.jsx(wpe,{children:s.jsxs(YA,{children:[s.jsx(f9,{}),s.jsx(Ice,{}),s.jsx(ibe,{}),s.jsx(KO,{}),s.jsx(Vhe,{children:s.jsxs(Lhe,{children:[s.jsx(Le,{path:"/",element:s.jsx(FNe,{})}),s.jsx(Le,{path:"/auth",element:s.jsx($Je,{})}),s.jsx(Le,{path:"/reset-password",element:s.jsx(urt,{})}),s.jsx(Le,{path:"/google-callback",element:s.jsx(Udt,{})}),s.jsx(Le,{path:"/profile",element:s.jsx(crt,{})}),s.jsx(Le,{path:"/scrape",element:s.jsx(zNe,{})}),s.jsx(Le,{path:"/companies",element:s.jsx(yEe,{})}),s.jsx(Le,{path:"/people",element:s.jsx(BEe,{})}),s.jsx(Le,{path:"/saved-contacts",element:s.jsx(KEe,{})}),s.jsx(Le,{path:"/contact-analytics",element:s.jsx(pKe,{})}),s.jsx(Le,{path:"/pitch",element:s.jsx(vKe,{})}),s.jsx(Le,{path:"/recently-funded",element:s.jsx(SKe,{})}),s.jsx(Le,{path:"/hiring-spike",element:s.jsx(jKe,{})}),s.jsx(Le,{path:"/product-launch",element:s.jsx(NKe,{})}),s.jsx(Le,{path:"/geographic-expansion",element:s.jsx(A6,{})}),s.jsx(Le,{path:"/seo-organic",element:s.jsx(_Ke,{})}),s.jsx(Le,{path:"/paid-ads",element:s.jsx(CKe,{})}
4601),s.jsx(Le,{path:"/outbound-sales",element:s.jsx(EKe,{})}),s.jsx(Le,{path:"/gtm-positioning",element:s.jsx(kKe,{})}),s.jsx(Le,{path:"/ai-integration",element:s.jsx(PKe,{})}),s.jsx(Le,{path:"/ux-ui",element:s.jsx(TKe,{})}),s.jsx(Le,{path:"/leadership-change",element:s.jsx(AKe,{})}),s.jsx(Le,{path:"/tech-stack-change",element:s.jsx(OKe,{})}),s.jsx(Le,{path:"/press-coverage",element:s.jsx(RKe,{})}),s.jsx(Le,{path:"/ma-activity",element:s.jsx(IKe,{})}),s.jsx(Le,{path:"/newsletter-sponsor",element:s.jsx(MKe,{})}),s.jsx(Le,{path:"/social-buzz",element:s.jsx(DKe,{})}),s.jsx(Le,{path:"/strategic-partnership",element:s.jsx(LKe,{})}),s.jsx(Le,{path:"/event-activity",element:s.jsx($Ke,{})}),s.jsx(Le,{path:"/cost-cutting",element:s.jsx(FKe,{})}),s.jsx(Le,{path:"/legal-challenge",element:s.jsx(BKe,{})}),s.jsx(Le,{path:"/major-customer-announcements",element:s.jsx(zKe,{})}),s.jsx(Le,{path:"/budget-increase",element:s.jsx(UKe,{})}),s.jsx(Le,{path:"/increased-ad-spend",element:s.jsx(qKe,{})}),s.jsx(Le,{path:"/awards-recognition",element:s.jsx(WKe,{})}),s.jsx(Le,{path:"/geographic-expansion",element:s.jsx(A6,{})}),s.jsx(Le,{path:"/ipo-filing",element:s.jsx(VKe,{})}),s.jsx(Le,{path:"/growth-marketing",element:s.jsx(hrt,{})}),s.jsx(Le,{path:"/revenue-operations",element:s.jsx(frt,{})}),s.jsx(Le,{path:"/conversion-rate-optimization",element:s.jsx(mrt,{})}),s.jsx(Le,{path:"/product-marketing-analytics",element:s.jsx(prt,{})}),s.jsx(Le,{path:"/customer-success",element:s.jsx(grt,{})}),s.jsx(Le,{path:"/content-marketing",element:s.jsx(yrt,{})}),s.jsx(Le,{path:"/demand-generation",element:s.jsx(xrt,{})}),s.jsx(Le,{path:"/social-media-community-growth",element:s.jsx(vrt,{})}),s.jsx(Le,{path:"/security-data-privacy",element:s.jsx(brt,{})}),s.jsx(Le,{path:"/devops-platform-enablement",element:s.jsx(wrt,{})}),s.jsx(Le,{path:"/matchmaking",element:s.jsx(jrt,{})}),s.jsx(Le,{path:"/auto-prospecting",element:s.jsx(Nrt,{})}),s.jsx(Le,{path:"/onboarding",element:s.jsx(krt,{})}),s.jsx(Le,{path:"/saved-companies",element:s.jsx(Fdt,{})}),s.jsx(Le,{path:"/signals",element:s.jsx(kit,{})}),s.jsx(Le,{path:"/signal-analytics",element:s.jsx(Iit,{})}),s.jsx(Le,{path:"/pitch-analytics",element:s.jsx(Bit,{})}),s.jsx(Le,{path:"/embed/signal/:id",element:s.jsx(Ldt,{})}),s.jsx(Le,{path:"/signal/:id",element:s.jsx($dt,{})}),s.jsx(Le,{path:"/chat",element:s.jsx(RJe,{})}),s.jsx(Le,{path:"/pricing",element:s.jsx(IJe,{})}),s.jsx(Le,{path:"/help",element:s.jsx(Wit,{})}),s.jsx(Le,{path:"/help/faq",element:s.jsx(Ddt,{})}),s.jsx(Le,{path:"/help/:category/:guide",element:s.jsx(Mdt,{})}),s.jsx(Le,{path:"/help/:category",element:s.jsx(Vit,{})}),s.jsx(Le,{path:"/terms",element:s.jsx(Bdt,{})}),s.jsx(Le,{path:"/privacy",element:s.jsx(zdt,{})}),s.jsx(Le,{path:"/sitemap.xml",element:s.jsx(qit,{})}),s.jsx(Le,{path:"*",element:s.jsx(drt,{})})]})})]})})})})})})});fq(document.getElementById("root")).render(s.jsx(z.StrictMode,{children:s.jsx(Wdt,{})}));

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.