PageSourceSearch

https://empowerswga.org/assets/index-D3R9bpih.js

js empowerswga.org collected 2026-10-04 05:40:56 UTC 723,381 bytes, 439 lines download raw bytes

vendor: 19,880 bytes, lines 1-34
1var tb=Object.defineProperty;var rb=(t,e,r)=>e in t?tb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var nb=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var I=(t,e,r)=>rb(t,typeof e!="symbol"?e+"":e,r);var k3=nb((gt,yt)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function F0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H0={exports:{}},Cc={},W0={exports:{}},Y={};/**
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 po=Symbol.for("react.element"),sb=Symbol.for("react.portal"),ib=Symbol.for("react.fragment"),ab=Symbol.for("react.strict_mode"),ob=Symbol.for("react.profiler"),lb=Symbol.for("react.provider"),cb=Symbol.for("react.context"),ub=Symbol.for("react.forward_ref"),db=Symbol.for("react.suspense"),hb=Symbol.for("react.memo"),fb=Symbol.for("react.lazy"),tp=Symbol.iterator;function mb(t){return t===null||typeof t!="object"?null:(t=tp&&t[tp]||t["@@iterator"],typeof t=="function"?t:null)}var V0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G0=Object.assign,K0={};function Ei(t,e,r){this.props=t,this.context=e,this.refs=K0,this.updater=r||V0}Ei.prototype.isReactComponent={};Ei.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Ei.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function J0(){}J0.prototype=Ei.prototype;function kf(t,e,r){this.props=t,this.context=e,this.refs=K0,this.updater=r||V0}var Sf=kf.prototype=new J0;Sf.constructor=kf;G0(Sf,Ei.prototype);Sf.isPureReactComponent=!0;var rp=Array.isArray,Q0=Object.prototype.hasOwnProperty,Ef={current:null},Y0={key:!0,ref:!0,__self:!0,__source:!0};function Z0(t,e,r){var n,s={},i=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(i=""+e.key),e)Q0.call(e,n)&&!Y0.hasOwnProperty(n)&&(s[n]=e[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(t&&t.defaultProps)for(n in l=t.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:po,type:t,key:i,ref:a,props:s,_owner:Ef.current}}function pb(t,e){return{$$typeof:po,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Tf(t){return typeof t=="object"&&t!==null&&t.$$typeof===po}function gb(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var np=/\/+/g;function Ju(t,e){return typeof t=="object"&&t!==null&&t.key!=null?gb(""+t.key):e.toString(36)}function Rl(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case po:case sb:a=!0}}if(a)return a=t,s=s(a),t=n===""?"."+Ju(a,0):n,rp(s)?(r="",t!=null&&(r=t.replace(np,"$&/")+"/"),Rl(s,e,r,"",function(u){return u})):s!=null&&(Tf(s)&&(s=pb(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(np,"$&/")+"/")+t)),e.push(s)),1;if(a=0,n=n===""?".":n+":",rp(t))for(var l=0;l<t.length;l++){i=t[l];var c=n+Ju(i,l);a+=Rl(i,e,r,c,s)}else if(c=mb(t),typeof c=="function")for(t=c.call(t),l=0;!(i=t.next()).done;)i=i.value,c=n+Ju(i,l++),a+=Rl(i,e,r,c,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function tl(t,e,r){if(t==null)return t;var n=[],s=0;return Rl(t,n,"","",function(i){return e.call(r,i,s++)}),n}function yb(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var rt={current:null},Ll={transition:null},vb={ReactCurrentDispatcher:rt,ReactCurrentBatchConfig:Ll,ReactCurrentOwner:Ef};function X0(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:tl,forEach:function(t,e,r){tl(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return tl(t,function(){e++}),e},toArray:function(t){return tl(t,function(e){return e})||[]},only:function(t){if(!Tf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Y.Component=Ei;Y.Fragment=ib;Y.Profiler=ob;Y.PureComponent=kf;Y.StrictMode=ab;Y.Suspense=db;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vb;Y.act=X0;Y.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=G0({},t.props),s=t.key,i=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,a=Ef.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)Q0.call(e,c)&&!Y0.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&l!==void 0?l[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:po,type:t.type,key:s,ref:i,props:n,_owner:a}};Y.createContext=function(t){return t={$$typeof:cb,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:lb,_context:t},t.Consumer=t};Y.createElement=Z0;Y.createFactory=function(t){var e=Z0.bind(null,t);return e.type=t,e};Y.createRef=function(){return{current:null}};Y.forwardRef=function(t){return{$$typeof:ub,render:t}};Y.isValidElement=Tf;Y.lazy=function(t){return{$$typeof:fb,_payload:{_status:-1,_result:t},_init:yb}};Y.memo=function(t,e){return{$$typeof:hb,type:t,compare:e===void 0?null:e}};Y.startTransition=function(t){var e=Ll.transition;Ll.transition={};try{t()}finally{Ll.transition=e}};Y.unstable_act=X0;Y.useCallback=function(t,e){return rt.current.useCallback(t,e)};Y.useContext=function(t){return rt.current.useContext(t)};Y.useDebugValue=function(){};Y.useDeferredValue=function(t){return rt.current.useDeferredValue(t)};Y.useEffect=function(t,e){return rt.current.useEffect(t,e)};Y.useId=function(){return rt.current.useId()};Y.useImperativeHandle=function(t,e,r){return rt.current.useImperativeHandle(t,e,r)};Y.useInsertionEffect=function(t,e){return rt.current.useInsertionEffect(t,e)};Y.useLayoutEffect=function(t,e){return rt.current.useLayoutEffect(t,e)};Y.useMemo=function(t,e){return rt.current.useMemo(t,e)};Y.useReducer=function(t,e,r){return rt.current.useReducer(t,e,r)};Y.useRef=function(t){return rt.current.useRef(t)};Y.useState=function(t){return rt.current.useState(t)};Y.useSyncExternalStore=function(t,e,r){return rt.current.useSyncExternalStore(t,e,r)};Y.useTransition=function(){return rt.current.useTransition()};Y.version="18.3.1";W0.exports=Y;var E=W0.exports;/**
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 xb=E,bb=Symbol.for("react.element"),wb=Symbol.for("react.fragment"),_b=Object.prototype.hasOwnProperty,Nb=xb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jb={key:!0,ref:!0,__self:!0,__source:!0};function ey(t,e,r){var n,s={},i=null,a=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(n in e)_b.call(e,n)&&!jb.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:bb,type:t,key:i,ref:a,props:s,_owner:Nb.current}}Cc.Fragment=wb;Cc.jsx=ey;Cc.jsxs=ey;H0.exports=Cc;var o=H0.exports,ty={exports:{}},bt={},ry={exports:{}},ny={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e($,K){var D=$.length;$.push(K);e:for(;0<D;){var le=D-1>>>1,ve=$[le];if(0<s(ve,K))$[le]=K,$[D]=ve,D=le;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var K=$[0],D=$.pop();if(D!==K){$[0]=D;e:for(var le=0,ve=$.length,ze=ve>>>1;le<ze;){var Nt=2*(le+1)-1,ee=$[Nt],jt=Nt+1,tn=$[jt];if(0>s(ee,D))jt<ve&&0>s(tn,ee)?($[le]=tn,$[jt]=D,le=jt):($[le]=ee,$[Nt]=D,le=Nt);else if(jt<ve&&0>s(tn,D))$[le]=tn,$[jt]=D,le=jt;else break e}}return K}function s($,K){var D=$.sortIndex-K.sortIndex;return D!==0?D:$.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],h=1,p=null,d=3,m=!1,x=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v($){for(var K=r(u);K!==null;){if(K.callback===null)n(u);else if(K.startTime<=$)n(u),K.sortIndex=K.expirationTime,e(c,K);else break;K=r(u)}}function j($){if(b=!1,v($),!x)if(r(c)!==null)x=!0,qt(S);else{var K=r(u);K!==null&&$n(j,K.startTime-$)}}function S($,K){x=!1,b&&(b=!1,g(A),A=-1),m=!0;var D=d;try{for(v(K),p=r(c);p!==null&&(!(p.expirationTime>K)||$&&!R());){var le=p.callback;if(typeof le=="function"){p.callback=null,d=p.priorityLevel;var ve=le(p.expirationTime<=K);K=t.unstable_now(),typeof ve=="function"?p.callback=ve:p===r(c)&&n(c),v(K)}else n(c);p=r(c)}if(p!==null)var ze=!0;else{var Nt=r(u);Nt!==null&&$n(j,Nt.startTime-K),ze=!1}return ze}finally{p=null,d=D,m=!1}}var N=!1,T=null,A=-1,P=5,U=-1;function R(){return!(t.unstable_now()-U<P)}function Q(){if(T!==null){var $=t.unstable_now();U=$;var K=!0;try{K=T(!0,$)}finally{K?he():(N=!1,T=null)}}else N=!1}var he;if(typeof y=="function")he=function(){y(Q)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,en=Ae.port2;Ae.port1.onmessage=Q,he=function(){en.postMessage(null)}}else he=function(){_(Q,0)};function qt($){T=$,N||(N=!0,he())}function $n($,K){A=_(function(){$(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_continueExecution=function(){x||m||(x=!0,qt(S))},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function($){switch(d){case 1:case 2:case 3:var K=3;break;default:K=d}var D=d;d=K;try{return $()}finally{d=D}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function($,K){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var D=d;d=$;try{return K()}finally{d=D}},t.unstable_scheduleCallback=function($,K,D){var le=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?le+D:le):D=le,$){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=D+ve,$={id:h++,callback:K,priorityLevel:$,startTime:D,expirationTime:ve,sortIndex:-1},D>le?($.sortIndex=D,e(u,$),r(c)===null&&$===r(u)&&(b?(g(A),A=-1):b=!0,$n(j,D-le))):($.sortIndex=ve,e(c,$),x||m||(x=!0,qt(S))),$},t.unstable_shouldYield=R,t.unstable_wrapCallback=function($){var K=d;return function(){var D=d;d=K;try{return $.apply(this,arguments)}finally{d=D}}}})(ny);ry.exports=ny;var kb=ry.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 Sb=E,xt=kb;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sy=new Set,La={};function ds(t,e){pi(t,e),pi(t+"Capture",e)}function pi(t,e){for(La[t]=e,t=0;t<e.length;t++)sy.add(e[t])}var Ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=Object.prototype.hasOwnProperty,Eb=/^[: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]*$/,sp={},ip={};function Tb(t){return Gd.call(ip,t)?!0:Gd.call(sp,t)?!1:Eb.test(t)?ip[t]=!0:(sp[t]=!0,!1)}function Cb(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Ab(t,e,r,n){if(e===null||typeof e>"u"||Cb(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function nt(t,e,r,n,s,i,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}var Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Be[t]=new nt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Be[e]=new nt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Be[t]=new nt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Be[t]=new nt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Be[t]=new nt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Be[t]=new nt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Be[t]=new nt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Be[t]=new nt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Be[t]=new nt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Cf=/[\-:]([a-z])/g;function Af(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Cf,Af);Be[e]=new nt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Cf,Af);Be[e]=new nt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Cf,Af);Be[e]=new nt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Be[t]=new nt(t,1,!1,t.toLowerCase(),null,!1,!1)});Be.xlinkHref=new nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Be[t]=new nt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Of(t,e,r,n){var s=Be.hasOwnProperty(e)?Be[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(Ab(e,r,s,n)&&(r=null),n||s===null?Tb(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Jr=Sb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rl=Symbol.for("react.element"),Vs=Symbol.for("react.portal"),Gs=Symbol.for("react.fragment"),Rf=Symbol.for("react.strict_mode"),Kd=Symbol.for("react.profiler"),iy=Symbol.for("react.provider"),ay=Symbol.for("react.context"),Lf=Symbol.for("react.forward_ref"),Jd=Symbol.for("react.suspense"),Qd=Symbol.for("react.suspense_list"),If=Symbol.for("react.memo"),on=Symbol.for("react.lazy"),oy=Symbol.for("react.offscreen"),ap=Symbol.iterator;function ea(t){return t===null||typeof t!="object"?null:(t=ap&&t[ap]||t["@@iterator"],typeof t=="function"?t:null)}var ye=Object.assign,Qu;function ha(t){if(Qu===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Qu=e&&e[1]||""}return`
34`+Qu+t}var Yu=!1;function Zu(t,e){if(!t||Yu)return"";Yu=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}
vendor: 16,752 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=n.stack.split(`
36`),a=s.length-1,l=i.length-1;1<=a&&0<=l&&s[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==i[l]){var c=`
37`+s[a].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=a&&0<=l);break}}}finally{Yu=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ha(t):""}function Ob(t){switch(t.tag){case 5:return ha(t.type);case 16:return ha("Lazy");case 13:return ha("Suspense");case 19:return ha("SuspenseList");case 0:case 2:case 15:return t=Zu(t.type,!1),t;case 11:return t=Zu(t.type.render,!1),t;case 1:return t=Zu(t.type,!0),t;default:return""}}function Yd(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Gs:return"Fragment";case Vs:return"Portal";case Kd:return"Profiler";case Rf:return"StrictMode";case Jd:return"Suspense";case Qd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ay:return(t.displayName||"Context")+".Consumer";case iy:return(t._context.displayName||"Context")+".Provider";case Lf:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case If:return e=t.displayName||null,e!==null?e:Yd(t.type)||"Memo";case on:e=t._payload,t=t._init;try{return Yd(t(e))}catch{}}return null}function Rb(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Yd(e);case 8:return e===Rf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Tn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ly(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Lb(t){var e=ly(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function nl(t){t._valueTracker||(t._valueTracker=Lb(t))}function cy(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=ly(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Jl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Zd(t,e){var r=e.checked;return ye({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function op(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Tn(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function uy(t,e){e=e.checked,e!=null&&Of(t,"checked",e,!1)}function Xd(t,e){uy(t,e);var r=Tn(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?eh(t,e.type,r):e.hasOwnProperty("defaultValue")&&eh(t,e.type,Tn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function lp(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function eh(t,e,r){(e!=="number"||Jl(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var fa=Array.isArray;function ii(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Tn(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function th(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return ye({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function cp(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(L(92));if(fa(r)){if(1<r.length)throw Error(L(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Tn(r)}}function dy(t,e){var r=Tn(e.value),n=Tn(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function up(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function hy(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rh(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?hy(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var sl,fy=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(sl=sl||document.createElement("div"),sl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=sl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ia(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var va={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},Ib=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(t){Ib.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),va[e]=va[t]})});function my(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||va.hasOwnProperty(t)&&va[t]?(""+e).trim():e+"px"}function py(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=my(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var Pb=ye({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 nh(t,e){if(e){if(Pb[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function sh(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ih=null;function Pf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ah=null,ai=null,oi=null;function dp(t){if(t=vo(t)){if(typeof ah!="function")throw Error(L(280));var e=t.stateNode;e&&(e=Ic(e),ah(t.stateNode,t.type,e))}}function gy(t){ai?oi?oi.push(t):oi=[t]:ai=t}function yy(){if(ai){var t=ai,e=oi;if(oi=ai=null,dp(t),e)for(t=0;t<e.length;t++)dp(e[t])}}function vy(t,e){return t(e)}function xy(){}var Xu=!1;function by(t,e,r){if(Xu)return t(e,r);Xu=!0;try{return vy(t,e,r)}finally{Xu=!1,(ai!==null||oi!==null)&&(xy(),yy())}}function Pa(t,e){var r=t.stateNode;if(r===null)return null;var n=Ic(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(L(231,e,typeof r));return r}var oh=!1;if(Ur)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){oh=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{oh=!1}function $b(t,e,r,n,s,i,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(h){this.onError(h)}}var xa=!1,Ql=null,Yl=!1,lh=null,Db={onError:function(t){xa=!0,Ql=t}};function Mb(t,e,r,n,s,i,a,l,c){xa=!1,Ql=null,$b.apply(Db,arguments)}function qb(t,e,r,n,s,i,a,l,c){if(Mb.apply(this,arguments),xa){if(xa){var u=Ql;xa=!1,Ql=null}else throw Error(L(198));Yl||(Yl=!0,lh=u)}}function hs(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function wy(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function hp(t){if(hs(t)!==t)throw Error(L(188))}function Ub(t){var e=t.alternate;if(!e){if(e=hs(t),e===null)throw Error(L(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return hp(s),t;if(i===n)return hp(s),e;i=i.sibling}throw Error(L(188))}if(r.return!==n.return)r=s,n=i;else{for(var a=!1,l=s.child;l;){if(l===r){a=!0,r=s,n=i;break}if(l===n){a=!0,n=s,r=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===r){a=!0,r=i,n=s;break}if(l===n){a=!0,n=i,r=s;break}l=l.sibling}if(!a)throw Error(L(189))}}if(r.alternate!==n)throw Error(L(190))}if(r.tag!==3)throw Error(L(188));return r.stateNode.current===r?t:e}function _y(t){return t=Ub(t),t!==null?Ny(t):null}function Ny(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Ny(t);if(e!==null)return e;t=t.sibling}return null}var jy=xt.unstable_scheduleCallback,fp=xt.unstable_cancelCallback,Bb=xt.unstable_shouldYield,zb=xt.unstable_requestPaint,we=xt.unstable_now,Fb=xt.unstable_getCurrentPriorityLevel,$f=xt.unstable_ImmediatePriority,ky=xt.unstable_UserBlockingPriority,Zl=xt.unstable_NormalPriority,Hb=xt.unstable_LowPriority,Sy=xt.unstable_IdlePriority,Ac=null,gr=null;function Wb(t){if(gr&&typeof gr.onCommitFiberRoot=="function")try{gr.onCommitFiberRoot(Ac,t,void 0,(t.current.flags&128)===128)}catch{}}var er=Math.clz32?Math.clz32:Kb,Vb=Math.log,Gb=Math.LN2;function Kb(t){return t>>>=0,t===0?32:31-(Vb(t)/Gb|0)|0}var il=64,al=4194304;function ma(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Xl(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,a=r&268435455;if(a!==0){var l=a&~s;l!==0?n=ma(l):(i&=a,i!==0&&(n=ma(i)))}else a=r&~s,a!==0?n=ma(a):i!==0&&(n=ma(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-er(e),s=1<<r,n|=t[r],e&=~s;return n}function Jb(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qb(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var a=31-er(i),l=1<<a,c=s[a];c===-1?(!(l&r)||l&n)&&(s[a]=Jb(l,e)):c<=e&&(t.expiredLanes|=l),i&=~l}}function ch(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ey(){var t=il;return il<<=1,!(il&4194240)&&(il=64),t}function ed(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function go(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-er(e),t[e]=r}function Yb(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-er(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function Df(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-er(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var se=0;function Ty(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Cy,Mf,Ay,Oy,Ry,uh=!1,ol=[],vn=null,xn=null,bn=null,$a=new Map,Da=new Map,un=[],Zb="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 mp(t,e){switch(t){case"focusin":case"focusout":vn=null;break;case"dragenter":case"dragleave":xn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":$a.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Da.delete(e.pointerId)}}function ra(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=vo(e),e!==null&&Mf(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function Xb(t,e,r,n,s){switch(e){case"focusin":return vn=ra(vn,t,e,r,n,s),!0;case"dragenter":return xn=ra(xn,t,e,r,n,s),!0;case"mouseover":return bn=ra(bn,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return $a.set(i,ra($a.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Da.set(i,ra(Da.get(i)||null,t,e,r,n,s)),!0}return!1}function Ly(t){var e=Yn(t.target);if(e!==null){var r=hs(e);if(r!==null){if(e=r.tag,e===13){if(e=wy(r),e!==null){t.blockedOn=e,Ry(t.priority,function(){Ay(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Il(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=dh(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);ih=n,r.target.dispatchEvent(n),ih=null}else return e=vo(r),e!==null&&Mf(e),t.blockedOn=r,!1;e.shift()}return!0}function pp(t,e,r){Il(t)&&r.delete(e)}function ew(){uh=!1,vn!==null&&Il(vn)&&(vn=null),xn!==null&&Il(xn)&&(xn=null),bn!==null&&Il(bn)&&(bn=null),$a.forEach(pp),Da.forEac
vendor: 11,826 bytes, line 37
37h(pp)}function na(t,e){t.blockedOn===e&&(t.blockedOn=null,uh||(uh=!0,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,ew)))}function Ma(t){function e(s){return na(s,t)}if(0<ol.length){na(ol[0],t);for(var r=1;r<ol.length;r++){var n=ol[r];n.blockedOn===t&&(n.blockedOn=null)}}for(vn!==null&&na(vn,t),xn!==null&&na(xn,t),bn!==null&&na(bn,t),$a.forEach(e),Da.forEach(e),r=0;r<un.length;r++)n=un[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<un.length&&(r=un[0],r.blockedOn===null);)Ly(r),r.blockedOn===null&&un.shift()}var li=Jr.ReactCurrentBatchConfig,ec=!0;function tw(t,e,r,n){var s=se,i=li.transition;li.transition=null;try{se=1,qf(t,e,r,n)}finally{se=s,li.transition=i}}function rw(t,e,r,n){var s=se,i=li.transition;li.transition=null;try{se=4,qf(t,e,r,n)}finally{se=s,li.transition=i}}function qf(t,e,r,n){if(ec){var s=dh(t,e,r,n);if(s===null)ud(t,e,n,tc,r),mp(t,n);else if(Xb(s,t,e,r,n))n.stopPropagation();else if(mp(t,n),e&4&&-1<Zb.indexOf(t)){for(;s!==null;){var i=vo(s);if(i!==null&&Cy(i),i=dh(t,e,r,n),i===null&&ud(t,e,n,tc,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else ud(t,e,n,null,r)}}var tc=null;function dh(t,e,r,n){if(tc=null,t=Pf(n),t=Yn(t),t!==null)if(e=hs(t),e===null)t=null;else if(r=e.tag,r===13){if(t=wy(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return tc=t,null}function Iy(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Fb()){case $f:return 1;case ky:return 4;case Zl:case Hb:return 16;case Sy:return 536870912;default:return 16}default:return 16}}var mn=null,Uf=null,Pl=null;function Py(){if(Pl)return Pl;var t,e=Uf,r=e.length,n,s="value"in mn?mn.value:mn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var a=r-t;for(n=1;n<=a&&e[r-n]===s[i-n];n++);return Pl=s.slice(t,1<n?1-n:void 0)}function $l(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ll(){return!0}function gp(){return!1}function wt(t){function e(r,n,s,i,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(r=t[l],this[l]=r?r(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ll:gp,this.isPropagationStopped=gp,this}return ye(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),e}var Ti={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bf=wt(Ti),yo=ye({},Ti,{view:0,detail:0}),nw=wt(yo),td,rd,sa,Oc=ye({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==sa&&(sa&&t.type==="mousemove"?(td=t.screenX-sa.screenX,rd=t.screenY-sa.screenY):rd=td=0,sa=t),td)},movementY:function(t){return"movementY"in t?t.movementY:rd}}),yp=wt(Oc),sw=ye({},Oc,{dataTransfer:0}),iw=wt(sw),aw=ye({},yo,{relatedTarget:0}),nd=wt(aw),ow=ye({},Ti,{animationName:0,elapsedTime:0,pseudoElement:0}),lw=wt(ow),cw=ye({},Ti,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),uw=wt(cw),dw=ye({},Ti,{data:0}),vp=wt(dw),hw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fw={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"},mw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pw(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=mw[t])?!!e[t]:!1}function zf(){return pw}var gw=ye({},yo,{key:function(t){if(t.key){var e=hw[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=$l(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?fw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zf,charCode:function(t){return t.type==="keypress"?$l(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?$l(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),yw=wt(gw),vw=ye({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xp=wt(vw),xw=ye({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zf}),bw=wt(xw),ww=ye({},Ti,{propertyName:0,elapsedTime:0,pseudoElement:0}),_w=wt(ww),Nw=ye({},Oc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),jw=wt(Nw),kw=[9,13,27,32],Ff=Ur&&"CompositionEvent"in window,ba=null;Ur&&"documentMode"in document&&(ba=document.documentMode);var Sw=Ur&&"TextEvent"in window&&!ba,$y=Ur&&(!Ff||ba&&8<ba&&11>=ba),bp=" ",wp=!1;function Dy(t,e){switch(t){case"keyup":return kw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function My(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ks=!1;function Ew(t,e){switch(t){case"compositionend":return My(e);case"keypress":return e.which!==32?null:(wp=!0,bp);case"textInput":return t=e.data,t===bp&&wp?null:t;default:return null}}function Tw(t,e){if(Ks)return t==="compositionend"||!Ff&&Dy(t,e)?(t=Py(),Pl=Uf=mn=null,Ks=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return $y&&e.locale!=="ko"?null:e.data;default:return null}}var Cw={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 _p(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Cw[t.type]:e==="textarea"}function qy(t,e,r,n){gy(n),e=rc(e,"onChange"),0<e.length&&(r=new Bf("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var wa=null,qa=null;function Aw(t){Qy(t,0)}function Rc(t){var e=Ys(t);if(cy(e))return t}function Ow(t,e){if(t==="change")return e}var Uy=!1;if(Ur){var sd;if(Ur){var id="oninput"in document;if(!id){var Np=document.createElement("div");Np.setAttribute("oninput","return;"),id=typeof Np.oninput=="function"}sd=id}else sd=!1;Uy=sd&&(!document.documentMode||9<document.documentMode)}function jp(){wa&&(wa.detachEvent("onpropertychange",By),qa=wa=null)}function By(t){if(t.propertyName==="value"&&Rc(qa)){var e=[];qy(e,qa,t,Pf(t)),by(Aw,e)}}function Rw(t,e,r){t==="focusin"?(jp(),wa=e,qa=r,wa.attachEvent("onpropertychange",By)):t==="focusout"&&jp()}function Lw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Rc(qa)}function Iw(t,e){if(t==="click")return Rc(e)}function Pw(t,e){if(t==="input"||t==="change")return Rc(e)}function $w(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var nr=typeof Object.is=="function"?Object.is:$w;function Ua(t,e){if(nr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Gd.call(e,s)||!nr(t[s],e[s]))return!1}return!0}function kp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Sp(t,e){var r=kp(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kp(r)}}function zy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?zy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Fy(){for(var t=window,e=Jl();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Jl(t.document)}return e}function Hf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Dw(t){var e=Fy(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&zy(r.ownerDocument.documentElement,r)){if(n!==null&&Hf(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=Sp(r,i);var a=Sp(r,n);s&&a&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Mw=Ur&&"documentMode"in document&&11>=document.documentMode,Js=null,hh=null,_a=null,fh=!1;function Ep(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;fh||Js==null||Js!==Jl(n)||(n=Js,"selectionStart"in n&&Hf(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),_a&&Ua(_a,n)||(_a=n,n=rc(hh,"onSelect"),0<n.length&&(e=new Bf("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Js)))}function cl(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Qs={animationend:cl("Animation","AnimationEnd"),animationiteration:cl("Animation","AnimationIteration"),animationstart:cl("Animation","AnimationStart"),transitionend:cl("Transition","TransitionEnd")},ad={},Hy={};Ur&&(Hy=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Lc(t){if(ad[t])return ad[t];if(!Qs[t])return t;var e=Qs[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in Hy)return ad[t]=e[r];return t}var Wy=Lc("animationend"),Vy=Lc("animationiteration"),Gy=Lc("animationstart"),Ky=Lc("transitionend"),Jy=new Map,Tp="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 On(t,e){Jy.set(t,e),ds(e,[t])}for(var od=0;od<Tp.length;od++){var ld=Tp[od],qw=ld.toLowerCase(),Uw=ld[0].toUpperCase()+ld.slice(1);On(qw,"on"+Uw)}On(Wy,"onAnimationEnd");On(Vy,"onAnimationIteration");On(Gy,"onAnimationStart");On("dblclick","onDoubleClick");On("focusin","onFocus");On("focusout","onBlur");On(Ky,"onTransitionEnd");pi("onMouseEnter",["mouseout","mouseover"]);pi("onMouseLeave",["mouseout","mouseover"]);pi("onPointerEnter",["pointerout","pointerover"]);pi("onPointerLeave",["pointerout","pointerover"]);ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ds("onBeforeInput",["compositionend","keypress","textInput","paste"]);ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pa="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(" "),Bw=new Set("cancel close invalid load scroll toggle".split(" ").concat(pa));function Cp(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,qb(n,e,void 0,t),t.currentTarget=null}function Qy(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var a=n.length-1;0<=a;a--){var l=n[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;Cp(s,l,u),i=c}else for(a=0;a<n.length;a++){if(l=n[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;Cp(s,l,u),i=c}}}if(Yl)throw t=lh,Yl=!1,lh=null,t}function ce(t,e){var r=e[vh];r===void 0&&(r=e[vh]=new Set);var n=t+"__bubble";r.has(n)||(Yy(e,t,2,!1),r.add(n))}function cd(t,e,r){var n=0;e&&(n|=4),Yy(r,t,n,e)}var ul="_reactListening"+Math.random().toString(36).slice(2);function Ba(t){if(!t[ul]){t[ul]=!0,sy.forEach(function(r){r!=="selectionchange"&&(Bw.has(r)||cd(r,!1,t),cd(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ul]||(e[ul]=!0,cd("selectionchange",!1,e))}}function Yy(t,e,r,n){switch(Iy(e)){case 1:var s=tw;break;case 4:s=rw;break;default:s=qf}r=s.bind(null,e,r,t),s=void 0,!oh||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function ud(t,e,r,n,s){var i=n;
vendor: 2,645 bytes, line 37
37if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var l=n.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=Yn(l),a===null)return;if(c=a.tag,c===5||c===6){n=i=a;continue e}l=l.parentNode}}n=n.return}by(function(){var u=i,h=Pf(r),p=[];e:{var d=Jy.get(t);if(d!==void 0){var m=Bf,x=t;switch(t){case"keypress":if($l(r)===0)break e;case"keydown":case"keyup":m=yw;break;case"focusin":x="focus",m=nd;break;case"focusout":x="blur",m=nd;break;case"beforeblur":case"afterblur":m=nd;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=yp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=bw;break;case Wy:case Vy:case Gy:m=lw;break;case Ky:m=_w;break;case"scroll":m=nw;break;case"wheel":m=jw;break;case"copy":case"cut":case"paste":m=uw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=xp}var b=(e&4)!==0,_=!b&&t==="scroll",g=b?d!==null?d+"Capture":null:d;b=[];for(var y=u,v;y!==null;){v=y;var j=v.stateNode;if(v.tag===5&&j!==null&&(v=j,g!==null&&(j=Pa(y,g),j!=null&&b.push(za(y,j,v)))),_)break;y=y.return}0<b.length&&(d=new m(d,x,null,r,h),p.push({event:d,listeners:b}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",m=t==="mouseout"||t==="pointerout",d&&r!==ih&&(x=r.relatedTarget||r.fromElement)&&(Yn(x)||x[Br]))break e;if((m||d)&&(d=h.window===h?h:(d=h.ownerDocument)?d.defaultView||d.parentWindow:window,m?(x=r.relatedTarget||r.toElement,m=u,x=x?Yn(x):null,x!==null&&(_=hs(x),x!==_||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(b=yp,j="onMouseLeave",g="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(b=xp,j="onPointerLeave",g="onPointerEnter",y="pointer"),_=m==null?d:Ys(m),v=x==null?d:Ys(x),d=new b(j,y+"leave",m,r,h),d.target=_,d.relatedTarget=v,j=null,Yn(h)===u&&(b=new b(g,y+"enter",x,r,h),b.target=v,b.relatedTarget=_,j=b),_=j,m&&x)t:{for(b=m,g=x,y=0,v=b;v;v=As(v))y++;for(v=0,j=g;j;j=As(j))v++;for(;0<y-v;)b=As(b),y--;for(;0<v-y;)g=As(g),v--;for(;y--;){if(b===g||g!==null&&b===g.alternate)break t;b=As(b),g=As(g)}b=null}else b=null;m!==null&&Ap(p,d,m,b,!1),x!==null&&_!==null&&Ap(p,_,x,b,!0)}}
vendor: 7,613 bytes, lines 37-38
37e:{if(d=u?Ys(u):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var S=Ow;else if(_p(d))if(Uy)S=Pw;else{S=Lw;var N=Rw}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=Iw);if(S&&(S=S(t,u))){qy(p,S,r,h);break e}N&&N(t,d,u),t==="focusout"&&(N=d._wrapperState)&&N.controlled&&d.type==="number"&&eh(d,"number",d.value)}switch(N=u?Ys(u):window,t){case"focusin":(_p(N)||N.contentEditable==="true")&&(Js=N,hh=u,_a=null);break;case"focusout":_a=hh=Js=null;break;case"mousedown":fh=!0;break;case"contextmenu":case"mouseup":case"dragend":fh=!1,Ep(p,r,h);break;case"selectionchange":if(Mw)break;case"keydown":case"keyup":Ep(p,r,h)}var T;if(Ff)e:{switch(t){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Ks?Dy(t,r)&&(A="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(A="onCompositionStart");A&&($y&&r.locale!=="ko"&&(Ks||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ks&&(T=Py()):(mn=h,Uf="value"in mn?mn.value:mn.textContent,Ks=!0)),N=rc(u,A),0<N.length&&(A=new vp(A,t,null,r,h),p.push({event:A,listeners:N}),T?A.data=T:(T=My(r),T!==null&&(A.data=T)))),(T=Sw?Ew(t,r):Tw(t,r))&&(u=rc(u,"onBeforeInput"),0<u.length&&(h=new vp("onBeforeInput","beforeinput",null,r,h),p.push({event:h,listeners:u}),h.data=T))}Qy(p,e)})}function za(t,e,r){return{instance:t,listener:e,currentTarget:r}}function rc(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Pa(t,r),i!=null&&n.unshift(za(t,i,s)),i=Pa(t,e),i!=null&&n.push(za(t,i,s))),t=t.return}return n}function As(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ap(t,e,r,n,s){for(var i=e._reactName,a=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=Pa(r,i),c!=null&&a.unshift(za(r,c,l))):s||(c=Pa(r,i),c!=null&&a.push(za(r,c,l)))),r=r.return}a.length!==0&&t.push({event:e,listeners:a})}var zw=/\r\n?/g,Fw=/\u0000|\uFFFD/g;function Op(t){return(typeof t=="string"?t:""+t).replace(zw,`
38`).replace(Fw,"")}function dl(t,e,r){if(e=Op(e),Op(t)!==e&&r)throw Error(L(425))}function nc(){}var mh=null,ph=null;function gh(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var yh=typeof setTimeout=="function"?setTimeout:void 0,Hw=typeof clearTimeout=="function"?clearTimeout:void 0,Rp=typeof Promise=="function"?Promise:void 0,Ww=typeof queueMicrotask=="function"?queueMicrotask:typeof Rp<"u"?function(t){return Rp.resolve(null).then(t).catch(Vw)}:yh;function Vw(t){setTimeout(function(){throw t})}function dd(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),Ma(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ma(e)}function wn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Lp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Ci=Math.random().toString(36).slice(2),pr="__reactFiber$"+Ci,Fa="__reactProps$"+Ci,Br="__reactContainer$"+Ci,vh="__reactEvents$"+Ci,Gw="__reactListeners$"+Ci,Kw="__reactHandles$"+Ci;function Yn(t){var e=t[pr];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Br]||r[pr]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Lp(t);t!==null;){if(r=t[pr])return r;t=Lp(t)}return e}t=r,r=t.parentNode}return null}function vo(t){return t=t[pr]||t[Br],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ys(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function Ic(t){return t[Fa]||null}var xh=[],Zs=-1;function Rn(t){return{current:t}}function de(t){0>Zs||(t.current=xh[Zs],xh[Zs]=null,Zs--)}function oe(t,e){Zs++,xh[Zs]=t.current,t.current=e}var Cn={},Ye=Rn(Cn),lt=Rn(!1),ns=Cn;function gi(t,e){var r=t.type.contextTypes;if(!r)return Cn;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function ct(t){return t=t.childContextTypes,t!=null}function sc(){de(lt),de(Ye)}function Ip(t,e,r){if(Ye.current!==Cn)throw Error(L(168));oe(Ye,e),oe(lt,r)}function Zy(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(L(108,Rb(t)||"Unknown",s));return ye({},r,n)}function ic(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Cn,ns=Ye.current,oe(Ye,t),oe(lt,lt.current),!0}function Pp(t,e,r){var n=t.stateNode;if(!n)throw Error(L(169));r?(t=Zy(t,e,ns),n.__reactInternalMemoizedMergedChildContext=t,de(lt),de(Ye),oe(Ye,t)):de(lt),oe(lt,r)}var Ir=null,Pc=!1,hd=!1;function Xy(t){Ir===null?Ir=[t]:Ir.push(t)}function Jw(t){Pc=!0,Xy(t)}function Ln(){if(!hd&&Ir!==null){hd=!0;var t=0,e=se;try{var r=Ir;for(se=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Ir=null,Pc=!1}catch(s){throw Ir!==null&&(Ir=Ir.slice(t+1)),jy($f,Ln),s}finally{se=e,hd=!1}}return null}var Xs=[],ei=0,ac=null,oc=0,Tt=[],Ct=0,ss=null,$r=1,Dr="";function Vn(t,e){Xs[ei++]=oc,Xs[ei++]=ac,ac=t,oc=e}function ev(t,e,r){Tt[Ct++]=$r,Tt[Ct++]=Dr,Tt[Ct++]=ss,ss=t;var n=$r;t=Dr;var s=32-er(n)-1;n&=~(1<<s),r+=1;var i=32-er(e)+s;if(30<i){var a=s-s%5;i=(n&(1<<a)-1).toString(32),n>>=a,s-=a,$r=1<<32-er(e)+s|r<<s|n,Dr=i+t}else $r=1<<i|r<<s|n,Dr=t}function Wf(t){t.return!==null&&(Vn(t,1),ev(t,1,0))}function Vf(t){for(;t===ac;)ac=Xs[--ei],Xs[ei]=null,oc=Xs[--ei],Xs[ei]=null;for(;t===ss;)ss=Tt[--Ct],Tt[Ct]=null,Dr=Tt[--Ct],Tt[Ct]=null,$r=Tt[--Ct],Tt[Ct]=null}var vt=null,mt=null,fe=!1,Yt=null;function tv(t,e){var r=Lt(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function $p(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,vt=t,mt=wn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vt=t,mt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=ss!==null?{id:$r,overflow:Dr}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Lt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,vt=t,mt=null,!0):!1;default:return!1}}function bh(t){return(t.mode&1)!==0&&(t.flags&128)===0}function wh(t){if(fe){var e=mt;if(e){var r=e;if(!$p(t,e)){if(bh(t))throw Error(L(418));e=wn(r.nextSibling);var n=vt;e&&$p(t,e)?tv(n,r):(t.flags=t.flags&-4097|2,fe=!1,vt=t)}}else{if(bh(t))throw Error(L(418));t.flags=t.flags&-4097|2,fe=!1,vt=t}}}function Dp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vt=t}function hl(t){if(t!==vt)return!1;if(!fe)return Dp(t),fe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!gh(t.type,t.memoizedProps)),e&&(e=mt)){if(bh(t))throw rv(),Error(L(418));for(;e;)tv(t,e),e=wn(e.nextSibling)}if(Dp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 12,476 bytes, line 38
38){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){mt=wn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}mt=null}}else mt=vt?wn(t.stateNode.nextSibling):null;return!0}function rv(){for(var t=mt;t;)t=wn(t.nextSibling)}function yi(){mt=vt=null,fe=!1}function Gf(t){Yt===null?Yt=[t]:Yt.push(t)}var Qw=Jr.ReactCurrentBatchConfig;function ia(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(L(309));var n=r.stateNode}if(!n)throw Error(L(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(a){var l=s.refs;a===null?delete l[i]:l[i]=a},e._stringRef=i,e)}if(typeof t!="string")throw Error(L(284));if(!r._owner)throw Error(L(290,t))}return t}function fl(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Mp(t){var e=t._init;return e(t._payload)}function nv(t){function e(g,y){if(t){var v=g.deletions;v===null?(g.deletions=[y],g.flags|=16):v.push(y)}}function r(g,y){if(!t)return null;for(;y!==null;)e(g,y),y=y.sibling;return null}function n(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function s(g,y){return g=kn(g,y),g.index=0,g.sibling=null,g}function i(g,y,v){return g.index=v,t?(v=g.alternate,v!==null?(v=v.index,v<y?(g.flags|=2,y):v):(g.flags|=2,y)):(g.flags|=1048576,y)}function a(g){return t&&g.alternate===null&&(g.flags|=2),g}function l(g,y,v,j){return y===null||y.tag!==6?(y=xd(v,g.mode,j),y.return=g,y):(y=s(y,v),y.return=g,y)}function c(g,y,v,j){var S=v.type;return S===Gs?h(g,y,v.props.children,j,v.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===on&&Mp(S)===y.type)?(j=s(y,v.props),j.ref=ia(g,y,v),j.return=g,j):(j=Fl(v.type,v.key,v.props,null,g.mode,j),j.ref=ia(g,y,v),j.return=g,j)}function u(g,y,v,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=bd(v,g.mode,j),y.return=g,y):(y=s(y,v.children||[]),y.return=g,y)}function h(g,y,v,j,S){return y===null||y.tag!==7?(y=rs(v,g.mode,j,S),y.return=g,y):(y=s(y,v),y.return=g,y)}function p(g,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=xd(""+y,g.mode,v),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case rl:return v=Fl(y.type,y.key,y.props,null,g.mode,v),v.ref=ia(g,null,y),v.return=g,v;case Vs:return y=bd(y,g.mode,v),y.return=g,y;case on:var j=y._init;return p(g,j(y._payload),v)}if(fa(y)||ea(y))return y=rs(y,g.mode,v,null),y.return=g,y;fl(g,y)}return null}function d(g,y,v,j){var S=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:l(g,y,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case rl:return v.key===S?c(g,y,v,j):null;case Vs:return v.key===S?u(g,y,v,j):null;case on:return S=v._init,d(g,y,S(v._payload),j)}if(fa(v)||ea(v))return S!==null?null:h(g,y,v,j,null);fl(g,v)}return null}function m(g,y,v,j,S){if(typeof j=="string"&&j!==""||typeof j=="number")return g=g.get(v)||null,l(y,g,""+j,S);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case rl:return g=g.get(j.key===null?v:j.key)||null,c(y,g,j,S);case Vs:return g=g.get(j.key===null?v:j.key)||null,u(y,g,j,S);case on:var N=j._init;return m(g,y,v,N(j._payload),S)}if(fa(j)||ea(j))return g=g.get(v)||null,h(y,g,j,S,null);fl(y,j)}return null}function x(g,y,v,j){for(var S=null,N=null,T=y,A=y=0,P=null;T!==null&&A<v.length;A++){T.index>A?(P=T,T=null):P=T.sibling;var U=d(g,T,v[A],j);if(U===null){T===null&&(T=P);break}t&&T&&U.alternate===null&&e(g,T),y=i(U,y,A),N===null?S=U:N.sibling=U,N=U,T=P}if(A===v.length)return r(g,T),fe&&Vn(g,A),S;if(T===null){for(;A<v.length;A++)T=p(g,v[A],j),T!==null&&(y=i(T,y,A),N===null?S=T:N.sibling=T,N=T);return fe&&Vn(g,A),S}for(T=n(g,T);A<v.length;A++)P=m(T,g,A,v[A],j),P!==null&&(t&&P.alternate!==null&&T.delete(P.key===null?A:P.key),y=i(P,y,A),N===null?S=P:N.sibling=P,N=P);return t&&T.forEach(function(R){return e(g,R)}),fe&&Vn(g,A),S}function b(g,y,v,j){var S=ea(v);if(typeof S!="function")throw Error(L(150));if(v=S.call(v),v==null)throw Error(L(151));for(var N=S=null,T=y,A=y=0,P=null,U=v.next();T!==null&&!U.done;A++,U=v.next()){T.index>A?(P=T,T=null):P=T.sibling;var R=d(g,T,U.value,j);if(R===null){T===null&&(T=P);break}t&&T&&R.alternate===null&&e(g,T),y=i(R,y,A),N===null?S=R:N.sibling=R,N=R,T=P}if(U.done)return r(g,T),fe&&Vn(g,A),S;if(T===null){for(;!U.done;A++,U=v.next())U=p(g,U.value,j),U!==null&&(y=i(U,y,A),N===null?S=U:N.sibling=U,N=U);return fe&&Vn(g,A),S}for(T=n(g,T);!U.done;A++,U=v.next())U=m(T,g,A,U.value,j),U!==null&&(t&&U.alternate!==null&&T.delete(U.key===null?A:U.key),y=i(U,y,A),N===null?S=U:N.sibling=U,N=U);return t&&T.forEach(function(Q){return e(g,Q)}),fe&&Vn(g,A),S}function _(g,y,v,j){if(typeof v=="object"&&v!==null&&v.type===Gs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case rl:e:{for(var S=v.key,N=y;N!==null;){if(N.key===S){if(S=v.type,S===Gs){if(N.tag===7){r(g,N.sibling),y=s(N,v.props.children),y.return=g,g=y;break e}}else if(N.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===on&&Mp(S)===N.type){r(g,N.sibling),y=s(N,v.props),y.ref=ia(g,N,v),y.return=g,g=y;break e}r(g,N);break}else e(g,N);N=N.sibling}v.type===Gs?(y=rs(v.props.children,g.mode,j,v.key),y.return=g,g=y):(j=Fl(v.type,v.key,v.props,null,g.mode,j),j.ref=ia(g,y,v),j.return=g,g=j)}return a(g);case Vs:e:{for(N=v.key;y!==null;){if(y.key===N)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){r(g,y.sibling),y=s(y,v.children||[]),y.return=g,g=y;break e}else{r(g,y);break}else e(g,y);y=y.sibling}y=bd(v,g.mode,j),y.return=g,g=y}return a(g);case on:return N=v._init,_(g,y,N(v._payload),j)}if(fa(v))return x(g,y,v,j);if(ea(v))return b(g,y,v,j);fl(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(r(g,y.sibling),y=s(y,v),y.return=g,g=y):(r(g,y),y=xd(v,g.mode,j),y.return=g,g=y),a(g)):r(g,y)}return _}var vi=nv(!0),sv=nv(!1),lc=Rn(null),cc=null,ti=null,Kf=null;function Jf(){Kf=ti=cc=null}function Qf(t){var e=lc.current;de(lc),t._currentValue=e}function _h(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function ci(t,e){cc=t,Kf=ti=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ot=!0),t.firstContext=null)}function Dt(t){var e=t._currentValue;if(Kf!==t)if(t={context:t,memoizedValue:e,next:null},ti===null){if(cc===null)throw Error(L(308));ti=t,cc.dependencies={lanes:0,firstContext:t}}else ti=ti.next=t;return e}var Zn=null;function Yf(t){Zn===null?Zn=[t]:Zn.push(t)}function iv(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,Yf(e)):(r.next=s.next,s.next=r),e.interleaved=r,zr(t,n)}function zr(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var ln=!1;function Zf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function av(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Mr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function _n(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,X&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,zr(t,r)}return s=n.interleaved,s===null?(e.next=e,Yf(n)):(e.next=s.next,s.next=e),n.interleaved=e,zr(t,r)}function Dl(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Df(t,r)}}function qp(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function uc(t,e,r,n){var s=t.updateQueue;ln=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var h=t.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==a&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(i!==null){var p=s.baseState;a=0,h=u=c=null,l=i;do{var d=l.lane,m=l.eventTime;if((n&d)===d){h!==null&&(h=h.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=t,b=l;switch(d=e,m=r,b.tag){case 1:if(x=b.payload,typeof x=="function"){p=x.call(m,p,d);break e}p=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=b.payload,d=typeof x=="function"?x.call(m,p,d):x,d==null)break e;p=ye({},p,d);break e;case 2:ln=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[l]:d.push(l))}else m={eventTime:m,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=m,c=p):h=h.next=m,a|=d;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;d=l,l=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(h===null&&(c=p),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=h,e=s.shared.interleaved,e!==null){s=e;do a|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);as|=a,t.lanes=a,t.memoizedState=p}}function Up(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(L(191,s));s.call(n)}}}var xo={},yr=Rn(xo),Ha=Rn(xo),Wa=Rn(xo);function Xn(t){if(t===xo)throw Error(L(174));return t}function Xf(t,e){switch(oe(Wa,e),oe(Ha,t),oe(yr,xo),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:rh(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=rh(e,t)}de(yr),oe(yr,e)}function xi(){de(yr),de(Ha),de(Wa)}function ov(t){Xn(Wa.current);var e=Xn(yr.current),r=rh(e,t.type);e!==r&&(oe(Ha,t),oe(yr,r))}function em(t){Ha.current===t&&(de(yr),de(Ha))}var me=Rn(0);function dc(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var fd=[];function tm(){for(var t=0;t<fd.length;t++)fd[t]._workInProgressVersionPrimary=null;fd.length=0}var Ml=Jr.ReactCurrentDispatcher,md=Jr.ReactCurrentBatchConfig,is=0,pe=null,Ee=null,Oe=null,hc=!1,Na=!1,Va=0,Yw=0;function Ve(){throw Error(L(321))}function rm(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!nr(t[r],e[r]))return!1;return!0}function nm(t,e,r,n,s,i){if(is=i,pe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ml.current=t===null||t.memoizedState===null?t_:r_,t=r(n,s),Na){i=0;do{if(Na=!1,Va=0,25<=i)throw Error(L(301));i+=1,Oe=Ee=null,e.updateQueue=null,Ml.current=n_,t=r(n,s)}while(Na)}if(Ml.current=fc,e=Ee!==null&&Ee.next!==null,is=0,Oe=Ee=pe=null,hc=!1,e)throw Error(L(300));return t}function sm(){var t=Va!==0;return Va=0,t}function fr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oe===null?pe.memoizedState=Oe=t:Oe=Oe.next=t,Oe}function Mt(){if(Ee===null){var t=pe.alternate;t=t!==null?t.memoizedState:null}else t=Ee.next;var e=Oe===null?pe.memoizedState:Oe.next;if(e!==null)Oe=e,Ee=t;else{if(t===null)throw Error(L(310));Ee=t,t={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Oe===null?pe.memoizedState=Oe=t:Oe=Oe.next=t}return Oe}function Ga(t,e){return typeof e=="function"?e(t):e}function pd(t){var e=Mt(),r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=t;
vendor: 4,649 bytes, line 38
38var n=Ee,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var l=a=null,c=null,u=i;do{var h=u.lane;if((is&h)===h)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var p={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=p,a=n):c=c.next=p,pe.lanes|=h,as|=h}u=u.next}while(u!==null&&u!==i);c===null?a=n:c.next=l,nr(n,e.memoizedState)||(ot=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=c,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,pe.lanes|=i,as|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function gd(t){var e=Mt(),r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do i=t(i,a.action),a=a.next;while(a!==s);nr(i,e.memoizedState)||(ot=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function lv(){}function cv(t,e){var r=pe,n=Mt(),s=e(),i=!nr(n.memoizedState,s);if(i&&(n.memoizedState=s,ot=!0),n=n.queue,im(hv.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||Oe!==null&&Oe.memoizedState.tag&1){if(r.flags|=2048,Ka(9,dv.bind(null,r,n,s,e),void 0,null),Le===null)throw Error(L(349));is&30||uv(r,e,s)}return s}function uv(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=pe.updateQueue,e===null?(e={lastEffect:null,stores:null},pe.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function dv(t,e,r,n){e.value=r,e.getSnapshot=n,fv(e)&&mv(t)}function hv(t,e,r){return r(function(){fv(e)&&mv(t)})}function fv(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!nr(t,r)}catch{return!0}}function mv(t){var e=zr(t,1);e!==null&&tr(e,t,1,-1)}function Bp(t){var e=fr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:t},e.queue=t,t=t.dispatch=e_.bind(null,pe,t),[e.memoizedState,t]}function Ka(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=pe.updateQueue,e===null?(e={lastEffect:null,stores:null},pe.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function pv(){return Mt().memoizedState}function ql(t,e,r,n){var s=fr();pe.flags|=t,s.memoizedState=Ka(1|e,r,void 0,n===void 0?null:n)}function $c(t,e,r,n){var s=Mt();n=n===void 0?null:n;var i=void 0;if(Ee!==null){var a=Ee.memoizedState;if(i=a.destroy,n!==null&&rm(n,a.deps)){s.memoizedState=Ka(e,r,i,n);return}}pe.flags|=t,s.memoizedState=Ka(1|e,r,i,n)}function zp(t,e){return ql(8390656,8,t,e)}function im(t,e){return $c(2048,8,t,e)}function gv(t,e){return $c(4,2,t,e)}function yv(t,e){return $c(4,4,t,e)}function vv(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function xv(t,e,r){return r=r!=null?r.concat([t]):null,$c(4,4,vv.bind(null,e,t),r)}function am(){}function bv(t,e){var r=Mt();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&rm(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function wv(t,e){var r=Mt();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&rm(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function _v(t,e,r){return is&21?(nr(r,e)||(r=Ey(),pe.lanes|=r,as|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ot=!0),t.memoizedState=r)}function Zw(t,e){var r=se;se=r!==0&&4>r?r:4,t(!0);var n=md.transition;md.transition={};try{t(!1),e()}finally{se=r,md.transition=n}}function Nv(){return Mt().memoizedState}function Xw(t,e,r){var n=jn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},jv(t))kv(e,r);else if(r=iv(t,e,r,n),r!==null){var s=tt();tr(r,t,n,s),Sv(r,e,n)}}function e_(t,e,r){var n=jn(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(jv(t))kv(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var a=e.lastRenderedState,l=i(a,r);if(s.hasEagerState=!0,s.eagerState=l,nr(l,a)){var c=e.interleaved;c===null?(s.next=s,Yf(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=iv(t,e,s,n),r!==null&&(s=tt(),tr(r,t,n,s),Sv(r,e,n))}}function jv(t){var e=t.alternate;return t===pe||e!==null&&e===pe}function kv(t,e){Na=hc=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Sv(t,e,r){if(r&4194240){var n=e.lanes;
vendor: 8,470 bytes, lines 38-40
38n&=t.pendingLanes,r|=n,e.lanes=r,Df(t,r)}}var fc={readContext:Dt,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},t_={readContext:Dt,useCallback:function(t,e){return fr().memoizedState=[t,e===void 0?null:e],t},useContext:Dt,useEffect:zp,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,ql(4194308,4,vv.bind(null,e,t),r)},useLayoutEffect:function(t,e){return ql(4194308,4,t,e)},useInsertionEffect:function(t,e){return ql(4,2,t,e)},useMemo:function(t,e){var r=fr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=fr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Xw.bind(null,pe,t),[n.memoizedState,t]},useRef:function(t){var e=fr();return t={current:t},e.memoizedState=t},useState:Bp,useDebugValue:am,useDeferredValue:function(t){return fr().memoizedState=t},useTransition:function(){var t=Bp(!1),e=t[0];return t=Zw.bind(null,t[1]),fr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=pe,s=fr();if(fe){if(r===void 0)throw Error(L(407));r=r()}else{if(r=e(),Le===null)throw Error(L(349));is&30||uv(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,zp(hv.bind(null,n,i,t),[t]),n.flags|=2048,Ka(9,dv.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=fr(),e=Le.identifierPrefix;if(fe){var r=Dr,n=$r;r=(n&~(1<<32-er(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Va++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=Yw++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},r_={readContext:Dt,useCallback:bv,useContext:Dt,useEffect:im,useImperativeHandle:xv,useInsertionEffect:gv,useLayoutEffect:yv,useMemo:wv,useReducer:pd,useRef:pv,useState:function(){return pd(Ga)},useDebugValue:am,useDeferredValue:function(t){var e=Mt();return _v(e,Ee.memoizedState,t)},useTransition:function(){var t=pd(Ga)[0],e=Mt().memoizedState;return[t,e]},useMutableSource:lv,useSyncExternalStore:cv,useId:Nv,unstable_isNewReconciler:!1},n_={readContext:Dt,useCallback:bv,useContext:Dt,useEffect:im,useImperativeHandle:xv,useInsertionEffect:gv,useLayoutEffect:yv,useMemo:wv,useReducer:gd,useRef:pv,useState:function(){return gd(Ga)},useDebugValue:am,useDeferredValue:function(t){var e=Mt();return Ee===null?e.memoizedState=t:_v(e,Ee.memoizedState,t)},useTransition:function(){var t=gd(Ga)[0],e=Mt().memoizedState;return[t,e]},useMutableSource:lv,useSyncExternalStore:cv,useId:Nv,unstable_isNewReconciler:!1};function Gt(t,e){if(t&&t.defaultProps){e=ye({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Nh(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:ye({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Dc={isMounted:function(t){return(t=t._reactInternals)?hs(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=tt(),s=jn(t),i=Mr(n,s);i.payload=e,r!=null&&(i.callback=r),e=_n(t,i,s),e!==null&&(tr(e,t,s,n),Dl(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=tt(),s=jn(t),i=Mr(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=_n(t,i,s),e!==null&&(tr(e,t,s,n),Dl(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=tt(),n=jn(t),s=Mr(r,n);s.tag=2,e!=null&&(s.callback=e),e=_n(t,s,n),e!==null&&(tr(e,t,n,r),Dl(e,t,n))}};function Fp(t,e,r,n,s,i,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,a):e.prototype&&e.prototype.isPureReactComponent?!Ua(r,n)||!Ua(s,i):!0}function Ev(t,e,r){var n=!1,s=Cn,i=e.contextType;return typeof i=="object"&&i!==null?i=Dt(i):(s=ct(e)?ns:Ye.current,n=e.contextTypes,i=(n=n!=null)?gi(t,s):Cn),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Dc,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Hp(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&Dc.enqueueReplaceState(e,e.state,null)}function jh(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},Zf(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Dt(i):(i=ct(e)?ns:Ye.current,s.context=gi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Nh(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Dc.enqueueReplaceState(s,s.state,null),uc(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function bi(t,e){try{var r="",n=e;do r+=Ob(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function yd(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function kh(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var s_=typeof WeakMap=="function"?WeakMap:Map;function Tv(t,e,r){r=Mr(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){pc||(pc=!0,Ph=n),kh(t,e)},r}function Cv(t,e,r){r=Mr(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){kh(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){kh(t,e),typeof n!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}function Wp(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new s_;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=v_.bind(null,t,e,r),e.then(t,t))}function Vp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Gp(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Mr(-1,1),e.tag=2,_n(r,e,1))),r.lanes|=1),t)}var i_=Jr.ReactCurrentOwner,ot=!1;function Xe(t,e,r,n){e.child=t===null?sv(e,null,r,n):vi(e,t.child,r,n)}function Kp(t,e,r,n,s){r=r.render;var i=e.ref;return ci(e,s),n=nm(t,e,r,n,i,s),r=sm(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Fr(t,e,s)):(fe&&r&&Wf(e),e.flags|=1,Xe(t,e,n,s),e.child)}function Jp(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!mm(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,Av(t,e,i,n,s)):(t=Fl(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:Ua,r(a,n)&&t.ref===e.ref)return Fr(t,e,s)}return e.flags|=1,t=kn(i,n),t.ref=e.ref,t.return=e,e.child=t}function Av(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(Ua(i,n)&&t.ref===e.ref)if(ot=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(ot=!0);else return e.lanes=t.lanes,Fr(t,e,s)}return Sh(t,e,r,n,s)}function Ov(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(ni,ht),ht|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,oe(ni,ht),ht|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,oe(ni,ht),ht|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,oe(ni,ht),ht|=n;return Xe(t,e,s,r),e.child}function Rv(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function Sh(t,e,r,n,s){var i=ct(r)?ns:Ye.current;return i=gi(e,i),ci(e,s),r=nm(t,e,r,n,i,s),n=sm(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Fr(t,e,s)):(fe&&n&&Wf(e),e.flags|=1,Xe(t,e,r,s),e.child)}function Qp(t,e,r,n,s){if(ct(r)){var i=!0;ic(e)}else i=!1;if(ci(e,s),e.stateNode===null)Ul(t,e),Ev(e,r,n),jh(e,r,n,s),n=!0;else if(t===null){var a=e.stateNode,l=e.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Dt(u):(u=ct(r)?ns:Ye.current,u=gi(e,u));var h=r.getDerivedStateFromProps,p=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==n||c!==u)&&Hp(e,a,n,u),ln=!1;var d=e.memoizedState;a.state=d,uc(e,n,a,s),c=e.memoizedState,l!==n||d!==c||lt.current||ln?(typeof h=="function"&&(Nh(e,r,h,n),c=e.memoizedState),(l=ln||Fp(e,r,l,n,d,c,u))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=c),a.props=n,a.state=c,a.context=u,n=l):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,av(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:Gt(e.type,l),a.props=u,p=e.pendingProps,d=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Dt(c):(c=ct(r)?ns:Ye.current,c=gi(e,c));var m=r.getDerivedStateFromProps;(h=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==p||d!==c)&&Hp(e,a,n,c),ln=!1,d=e.memoizedState,a.state=d,uc(e,n,a,s);var x=e.memoizedState;l!==p||d!==x||lt.current||ln?(typeof m=="function"&&(Nh(e,r,m,n),x=e.memoizedState),(u=ln||Fp(e,r,u,n,d,x,c)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,x,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,x,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=x),a.props=n,a.state=x,a.context=c,n=u):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),n=!1)}return Eh(t,e,r,n,i,s)}function Eh(t,e,r,n,s,i){Rv(t,e);var a=(e.flags&128)!==0;if(!n&&!a)return s&&Pp(e,r,!1),Fr(t,e,i);n=e.stateNode,i_.current=e;var l=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&a?(e.child=vi(e,t.child,null,i),e.child=vi(e,null,l,i)):Xe(t,e,l,i),e.memoizedState=n.state,s&&Pp(e,r,!0),e.child}function Lv(t){var e=t.stateNode;e.pendingContext?Ip(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Ip(t,e.context,!1),Xf(t,e.containerInfo)}function Yp(t,e,r,n,s){return yi(),Gf(s),e.flags|=256,Xe(t,e,r,n),e.child}var Th={dehydrated:null,treeContext:null,retryLane:0};function Ch(t){return{baseLanes:t,cachePool:null,transitions:null}}function Iv(t,e,r){var n=e.pendingProps,s=me.current,i=!1,a=(e.flags&128)!==0,l;if((l=a)||(l=t!==null&&t.memoizedState===null?!1:(s&2)!==0),l?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),oe(me,s&1),t===null)return wh(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=n.children,t=n.fallback,i?(n=e.mode,i=e.child,a={mode:"hidden",children:a},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Uc(a,n,0,null),t=rs(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Ch(r),e.memoizedState=Th,t):om(e,a));if(s=t.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return a_(t,e,a,n,l,s,r);if(i){i=n.fallback,a=e.mode,s=t.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=kn(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=kn(l,i):(i=rs(i,a,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,a=t.child.memoizedState,a=a===null?Ch(r):{base
vendor: 7,075 bytes, line 40
40Lanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=t.childLanes&~r,e.memoizedState=Th,n}return i=t.child,t=i.sibling,n=kn(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function om(t,e){return e=Uc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ml(t,e,r,n){return n!==null&&Gf(n),vi(e,t.child,null,r),t=om(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function a_(t,e,r,n,s,i,a){if(r)return e.flags&256?(e.flags&=-257,n=yd(Error(L(422))),ml(t,e,a,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=Uc({mode:"visible",children:n.children},s,0,null),i=rs(i,s,a,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&vi(e,t.child,null,a),e.child.memoizedState=Ch(a),e.memoizedState=Th,i);if(!(e.mode&1))return ml(t,e,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(L(419)),n=yd(i,n,void 0),ml(t,e,a,n)}if(l=(a&t.childLanes)!==0,ot||l){if(n=Le,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,zr(t,s),tr(n,t,s,-1))}return fm(),n=yd(Error(L(421))),ml(t,e,a,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=x_.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,mt=wn(s.nextSibling),vt=e,fe=!0,Yt=null,t!==null&&(Tt[Ct++]=$r,Tt[Ct++]=Dr,Tt[Ct++]=ss,$r=t.id,Dr=t.overflow,ss=e),e=om(e,n.children),e.flags|=4096,e)}function Zp(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),_h(t.return,e,r)}function vd(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Pv(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(Xe(t,e,n.children,r),n=me.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Zp(t,r,e);else if(t.tag===19)Zp(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(oe(me,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&dc(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),vd(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&dc(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}vd(e,!0,r,null,i);break;case"together":vd(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ul(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Fr(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),as|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,r=kn(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=kn(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function o_(t,e,r){switch(e.tag){case 3:Lv(e),yi();break;case 5:ov(e);break;case 1:ct(e.type)&&ic(e);break;case 4:Xf(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;oe(lc,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(oe(me,me.current&1),e.flags|=128,null):r&e.child.childLanes?Iv(t,e,r):(oe(me,me.current&1),t=Fr(t,e,r),t!==null?t.sibling:null);oe(me,me.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Pv(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(me,me.current),n)break;return null;case 22:case 23:return e.lanes=0,Ov(t,e,r)}return Fr(t,e,r)}var $v,Ah,Dv,Mv;$v=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ah=function(){};Dv=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Xn(yr.current);var i=null;switch(r){case"input":s=Zd(t,s),n=Zd(t,n),i=[];break;case"select":s=ye({},s,{value:void 0}),n=ye({},n,{value:void 0}),i=[];break;case"textarea":s=th(t,s),n=th(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=nc)}nh(r,n);var a;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(La.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(i||(i=[]),i.push(u,r)),r=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"&&(La.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ce("scroll",t),i||l===c||(i=[])):(i=i||[]).push(u,c))}r&&(i=i||[]).push("style",r);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};Mv=function(t,e,r,n){r!==n&&(e.flags|=4)};function aa(t,e){if(!fe)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Ge(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function l_(t,e,r){var n=e.pendingProps;switch(Vf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(e),null;case 1:return ct(e.type)&&sc(),Ge(e),null;
vendor: 31,227 bytes, line 40
40case 3:return n=e.stateNode,xi(),de(lt),de(Ye),tm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(hl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Yt!==null&&(Mh(Yt),Yt=null))),Ah(t,e),Ge(e),null;case 5:em(e);var s=Xn(Wa.current);if(r=e.type,t!==null&&e.stateNode!=null)Dv(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(L(166));return Ge(e),null}if(t=Xn(yr.current),hl(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[pr]=e,n[Fa]=i,t=(e.mode&1)!==0,r){case"dialog":ce("cancel",n),ce("close",n);break;case"iframe":case"object":case"embed":ce("load",n);break;case"video":case"audio":for(s=0;s<pa.length;s++)ce(pa[s],n);break;case"source":ce("error",n);break;case"img":case"image":case"link":ce("error",n),ce("load",n);break;case"details":ce("toggle",n);break;case"input":op(n,i),ce("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},ce("invalid",n);break;case"textarea":cp(n,i),ce("invalid",n)}nh(r,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&dl(n.textContent,l,t),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&dl(n.textContent,l,t),s=["children",""+l]):La.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&ce("scroll",n)}switch(r){case"input":nl(n),lp(n,i,!0);break;case"textarea":nl(n),up(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=nc)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=hy(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[pr]=e,t[Fa]=n,$v(t,e,!1,!1),e.stateNode=t;e:{switch(a=sh(r,n),r){case"dialog":ce("cancel",t),ce("close",t),s=n;break;case"iframe":case"object":case"embed":ce("load",t),s=n;break;case"video":case"audio":for(s=0;s<pa.length;s++)ce(pa[s],t);s=n;break;case"source":ce("error",t),s=n;break;case"img":case"image":case"link":ce("error",t),ce("load",t),s=n;break;case"details":ce("toggle",t),s=n;break;case"input":op(t,n),s=Zd(t,n),ce("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=ye({},n,{value:void 0}),ce("invalid",t);break;case"textarea":cp(t,n),s=th(t,n),ce("invalid",t);break;default:s=n}nh(r,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?py(t,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&fy(t,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Ia(t,c):typeof c=="number"&&Ia(t,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(La.hasOwnProperty(i)?c!=null&&i==="onScroll"&&ce("scroll",t):c!=null&&Of(t,i,c,a))}switch(r){case"input":nl(t),lp(t,n,!1);break;case"textarea":nl(t),up(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Tn(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?ii(t,!!n.multiple,i,!1):n.defaultValue!=null&&ii(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=nc)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ge(e),null;case 6:if(t&&e.stateNode!=null)Mv(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(L(166));if(r=Xn(Wa.current),Xn(yr.current),hl(e)){if(n=e.stateNode,r=e.memoizedProps,n[pr]=e,(i=n.nodeValue!==r)&&(t=vt,t!==null))switch(t.tag){case 3:dl(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&dl(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[pr]=e,e.stateNode=n}return Ge(e),null;case 13:if(de(me),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(fe&&mt!==null&&e.mode&1&&!(e.flags&128))rv(),yi(),e.flags|=98560,i=!1;else if(i=hl(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(L(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[pr]=e}else yi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ge(e),i=!1}else Yt!==null&&(Mh(Yt),Yt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||me.current&1?Ce===0&&(Ce=3):fm())),e.updateQueue!==null&&(e.flags|=4),Ge(e),null);case 4:return xi(),Ah(t,e),t===null&&Ba(e.stateNode.containerInfo),Ge(e),null;case 10:return Qf(e.type._context),Ge(e),null;case 17:return ct(e.type)&&sc(),Ge(e),null;case 19:if(de(me),i=e.memoizedState,i===null)return Ge(e),null;if(n=(e.flags&128)!==0,a=i.rendering,a===null)if(n)aa(i,!1);else{if(Ce!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=dc(t),a!==null){for(e.flags|=128,aa(i,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,t=a.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return oe(me,me.current&1|2),e.child}t=t.sibling}i.tail!==null&&we()>wi&&(e.flags|=128,n=!0,aa(i,!1),e.lanes=4194304)}else{if(!n)if(t=dc(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),aa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!fe)return Ge(e),null}else 2*we()-i.renderingStartTime>wi&&r!==1073741824&&(e.flags|=128,n=!0,aa(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(r=i.last,r!==null?r.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=we(),e.sibling=null,r=me.current,oe(me,n?r&1|2:r&1),e):(Ge(e),null);case 22:case 23:return hm(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ht&1073741824&&(Ge(e),e.subtreeFlags&6&&(e.flags|=8192)):Ge(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function c_(t,e){switch(Vf(e),e.tag){case 1:return ct(e.type)&&sc(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return xi(),de(lt),de(Ye),tm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return em(e),null;case 13:if(de(me),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));yi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return de(me),null;case 4:return xi(),null;case 10:return Qf(e.type._context),null;case 22:case 23:return hm(),null;case 24:return null;default:return null}}var pl=!1,Ke=!1,u_=typeof WeakSet=="function"?WeakSet:Set,M=null;function ri(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){be(t,e,n)}else r.current=null}function Oh(t,e,r){try{r()}catch(n){be(t,e,n)}}var Xp=!1;function d_(t,e){if(mh=ec,t=Fy(),Hf(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,h=0,p=t,d=null;t:for(;;){for(var m;p!==r||s!==0&&p.nodeType!==3||(l=a+s),p!==i||n!==0&&p.nodeType!==3||(c=a+n),p.nodeType===3&&(a+=p.nodeValue.length),(m=p.firstChild)!==null;)d=p,p=m;for(;;){if(p===t)break t;if(d===r&&++u===s&&(l=a),d===i&&++h===n&&(c=a),(m=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(ph={focusedElem:t,selectionRange:r},ec=!1,M=e;M!==null;)if(e=M,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,M=t;else for(;M!==null;){e=M;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var b=x.memoizedProps,_=x.memoizedState,g=e.stateNode,y=g.getSnapshotBeforeUpdate(e.elementType===e.type?b:Gt(e.type,b),_);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(j){be(e,e.return,j)}if(t=e.sibling,t!==null){t.return=e.return,M=t;break}M=e.return}return x=Xp,Xp=!1,x}function ja(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Oh(e,r,i)}s=s.next}while(s!==n)}}function Mc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Rh(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function qv(t){var e=t.alternate;e!==null&&(t.alternate=null,qv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[pr],delete e[Fa],delete e[vh],delete e[Gw],delete e[Kw])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Uv(t){return t.tag===5||t.tag===3||t.tag===4}function eg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Uv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Lh(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=nc));else if(n!==4&&(t=t.child,t!==null))for(Lh(t,e,r),t=t.sibling;t!==null;)Lh(t,e,r),t=t.sibling}function Ih(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Ih(t,e,r),t=t.sibling;t!==null;)Ih(t,e,r),t=t.sibling}var Me=null,Jt=!1;function sn(t,e,r){for(r=r.child;r!==null;)Bv(t,e,r),r=r.sibling}function Bv(t,e,r){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(Ac,r)}catch{}switch(r.tag){case 5:Ke||ri(r,e);case 6:var n=Me,s=Jt;Me=null,sn(t,e,r),Me=n,Jt=s,Me!==null&&(Jt?(t=Me,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Me.removeChild(r.stateNode));break;case 18:Me!==null&&(Jt?(t=Me,r=r.stateNode,t.nodeType===8?dd(t.parentNode,r):t.nodeType===1&&dd(t,r),Ma(t)):dd(Me,r.stateNode));break;case 4:n=Me,s=Jt,Me=r.stateNode.containerInfo,Jt=!0,sn(t,e,r),Me=n,Jt=s;break;case 0:case 11:case 14:case 15:if(!Ke&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Oh(r,e,a),s=s.next}while(s!==n)}sn(t,e,r);break;case 1:if(!Ke&&(ri(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){be(r,e,l)}sn(t,e,r);break;case 21:sn(t,e,r);break;case 22:r.mode&1?(Ke=(n=Ke)||r.memoizedState!==null,sn(t,e,r),Ke=n):sn(t,e,r);break;default:sn(t,e,r)}}function tg(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new u_),e.forEach(function(n){var s=b_.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Ft(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,a=e,l=a;e:for(;l!==null;){switch(l.tag){case 5:Me=l.stateNode,Jt=!1;break e;case 3:Me=l.stateNode.containerInfo,Jt=!0;break e;case 4:Me=l.stateNode.containerInfo,Jt=!0;break e}l=l.return}if(Me===null)throw Error(L(160));Bv(i,a,s),Me=null,Jt=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){be(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)zv(e,t),e=e.sibling}function zv(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ft(e,t),hr(t),n&4){try{ja(3,t,t.return),Mc(3,t)}catch(b){be(t,t.return,b)}try{ja(5,t,t.return)}catch(b){be(t,t.return,b)}}break;case 1:Ft(e,t),hr(t),n&512&&r!==null&&ri(r,r.return);break;case 5:if(Ft(e,t),hr(t),n&512&&r!==null&&ri(r,r.return),t.flags&32){var s=t.stateNode;try{Ia(s,"")}catch(b){be(t,t.return,b)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,a=r!==null?r.memoizedProps:i,l=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&uy(s,i),sh(l,a);var u=sh(l,i);for(a=0;a<c.length;a+=2){var h=c[a],p=c[a+1];h==="style"?py(s,p):h==="dangerouslySetInnerHTML"?fy(s,p):h==="children"?Ia(s,p):Of(s,h,p,u)}switch(l){case"input":Xd(s,i);break;case"textarea":dy(s,i);break;case"select":var d=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?ii(s,!!i.multiple,m,!1):d!==!!i.multiple&&(i.defaultValue!=null?ii(s,!!i.multiple,i.defaultValue,!0):ii(s,!!i.multiple,i.multiple?[]:"",!1))}s[Fa]=i}catch(b){be(t,t.return,b)}}break;case 6:if(Ft(e,t),hr(t),n&4){if(t.stateNode===null)throw Error(L(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(b){be(t,t.return,b)}}break;case 3:if(Ft(e,t),hr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ma(e.containerInfo)}catch(b){be(t,t.return,b)}break;case 4:Ft(e,t),hr(t);break;case 13:Ft(e,t),hr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(um=we())),n&4&&tg(t);break;case 22:if(h=r!==null&&r.memoizedState!==null,t.mode&1?(Ke=(u=Ke)||h,Ft(e,t),Ke=u):Ft(e,t),hr(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!h&&t.mode&1)for(M=t,h=t.child;h!==null;){for(p=M=h;M!==null;){switch(d=M,m=d.child,d.tag){case 0:case 11:case 14:case 15:ja(4,d,d.return);break;case 1:ri(d,d.return);var x=d.stateNode;if(typeof x.componentWillUnmount=="function"){n=d,r=d.return;try{e=n,x.props=e.memoizedProps,x.state=e.memoizedState,x.componentWillUnmount()}catch(b){be(n,r,b)}}break;case 5:ri(d,d.return);break;case 22:if(d.memoizedState!==null){ng(p);continue}}m!==null?(m.return=d,M=m):ng(p)}h=h.sibling}e:for(h=null,p=t;;){if(p.tag===5){if(h===null){h=p;try{s=p.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=p.stateNode,c=p.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=my("display",a))}catch(b){be(t,t.return,b)}}}else if(p.tag===6){if(h===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(b){be(t,t.return,b)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===t)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;h===p&&(h=null),p=p.return}h===p&&(h=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Ft(e,t),hr(t),n&4&&tg(t);break;case 21:break;default:Ft(e,t),hr(t)}}function hr(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(Uv(r)){var n=r;break e}r=r.return}throw Error(L(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Ia(s,""),n.flags&=-33);var i=eg(t);Ih(t,i,s);break;case 3:case 4:var a=n.stateNode.containerInfo,l=eg(t);Lh(t,l,a);break;default:throw Error(L(161))}}catch(c){be(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function h_(t,e,r){M=t,Fv(t)}function Fv(t,e,r){for(var n=(t.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||pl;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Ke;l=pl;var u=Ke;if(pl=a,(Ke=c)&&!u)for(M=s;M!==null;)a=M,c=a.child,a.tag===22&&a.memoizedState!==null?sg(s):c!==null?(c.return=a,M=c):sg(s);for(;i!==null;)M=i,Fv(i),i=i.sibling;M=s,pl=l,Ke=u}rg(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):rg(t)}}function rg(t){for(;M!==null;){var e=M;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ke||Mc(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Ke)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Gt(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Up(e,i,n);break;case 3:var a=e.updateQueue;if(a!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Up(e,a,r)}break;case 5:var l=e.stateNode;if(r===null&&e.flags&4){r=l;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var p=h.dehydrated;p!==null&&Ma(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}Ke||e.flags&512&&Rh(e)}catch(d){be(e,e.return,d)}}if(e===t){M=null;break}if(r=e.sibling,r!==null){r.return=e.return,M=r;break}M=e.return}}function ng(t){for(;M!==null;){var e=M;if(e===t){M=null;break}var r=e.sibling;if(r!==null){r.return=e.return,M=r;break}M=e.return}}function sg(t){for(;M!==null;){var e=M;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Mc(4,e)}catch(c){be(e,r,c)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(c){be(e,s,c)}}var i=e.return;try{Rh(e)}catch(c){be(e,i,c)}break;case 5:var a=e.return;try{Rh(e)}catch(c){be(e,a,c)}}}catch(c){be(e,e.return,c)}if(e===t){M=null;break}var l=e.sibling;if(l!==null){l.return=e.return,M=l;break}M=e.return}}var f_=Math.ceil,mc=Jr.ReactCurrentDispatcher,lm=Jr.ReactCurrentOwner,Pt=Jr.ReactCurrentBatchConfig,X=0,Le=null,je=null,qe=0,ht=0,ni=Rn(0),Ce=0,Ja=null,as=0,qc=0,cm=0,ka=null,at=null,um=0,wi=1/0,Rr=null,pc=!1,Ph=null,Nn=null,gl=!1,pn=null,gc=0,Sa=0,$h=null,Bl=-1,zl=0;function tt(){return X&6?we():Bl!==-1?Bl:Bl=we()}function jn(t){return t.mode&1?X&2&&qe!==0?qe&-qe:Qw.transition!==null?(zl===0&&(zl=Ey()),zl):(t=se,t!==0||(t=window.event,t=t===void 0?16:Iy(t.type)),t):1}function tr(t,e,r,n){if(50<Sa)throw Sa=0,$h=null,Error(L(185));go(t,r,n),(!(X&2)||t!==Le)&&(t===Le&&(!(X&2)&&(qc|=r),Ce===4&&dn(t,qe)),ut(t,n),r===1&&X===0&&!(e.mode&1)&&(wi=we()+500,Pc&&Ln()))}function ut(t,e){var r=t.callbackNode;Qb(t,e);var n=Xl(t,t===Le?qe:0);if(n===0)r!==null&&fp(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&fp(r),e===1)t.tag===0?Jw(ig.bind(null,t)):Xy(ig.bind(null,t)),Ww(function(){!(X&6)&&Ln()}),r=null;else{switch(Ty(n)){case 1:r=$f;break;case 4:r=ky;break;case 16:r=Zl;break;case 536870912:r=Sy;break;default:r=Zl}r=Yv(r,Hv.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function Hv(t,e){if(Bl=-1,zl=0,X&6)throw Error(L(327));var r=t.callbackNode;if(ui()&&t.callbackNode!==r)return null;var n=Xl(t,t===Le?qe:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=yc(t,n);else{e=n;var s=X;X|=2;var i=Vv();(Le!==t||qe!==e)&&(Rr=null,wi=we()+500,ts(t,e));do try{g_();break}catch(l){Wv(t,l)}while(!0);Jf(),mc.current=i,X=s,je!==null?e=0:(Le=null,qe=0,e=Ce)}if(e!==0){if(e===2&&(s=ch(t),s!==0&&(n=s,e=Dh(t,s))),e===1)throw r=Ja,ts(t,0),dn(t,n),ut(t,we()),r;if(e===6)dn(t,n);else{if(s=t.current.alternate,!(n&30)&&!m_(s)&&(e=yc(t,n),e===2&&(i=ch(t),i!==0&&(n=i,e=Dh(t,i))),e===1))throw r=Ja,ts(t,0),dn(t,n),ut(t,we()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(L(345));case 2:Gn(t,at,Rr);break;case 3:if(dn(t,n),(n&130023424)===n&&(e=um+500-we(),10<e)){if(Xl(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){tt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=yh(Gn.bind(null,t,at,Rr),e);break}Gn(t,at,Rr);break;case 4:if(dn(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var a=31-er(n);i=1<<a,a=e[a],a>s&&(s=a),n&=~i}if(n=s,n=we()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*f_(n/1960))-n,10<n){t.timeoutHandle=yh(Gn.bind(null,t,at,Rr),n);break}Gn(t,at,Rr);break;case 5:Gn(t,at,Rr);break;default:throw Error(L(329))}}}return ut(t,we()),t.callbackNode===r?Hv.bind(null,t):null}function Dh(t,e){var r=ka;return t.current.memoizedState.isDehydrated&&(ts(t,e).flags|=256),t=yc(t,e),t!==2&&(e=at,at=r,e!==null&&Mh(e)),t}function Mh(t){at===null?at=t:at.push.apply(at,t)}function m_(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!nr(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function dn(t,e){for(e&=~cm,e&=~qc,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-er(e),n=1<<r;t[r]=-1,e&=~n}}function ig(t){if(X&6)throw Error(L(327));ui();var e=Xl(t,0);if(!(e&1))return ut(t,we()),null;var r=yc(t,e);if(t.tag!==0&&r===2){var n=ch(t);n!==0&&(e=n,r=Dh(t,n))}if(r===1)throw r=Ja,ts(t,0),dn(t,e),ut(t,we()),r;if(r===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Gn(t,at,Rr),ut(t,we()),null}function dm(t,e){var r=X;X|=1;try{return t(e)}finally{X=r,X===0&&(wi=we()+500,Pc&&Ln())}}function os(t){pn!==null&&pn.tag===0&&!(X&6)&&ui();var e=X;X|=1;var r=Pt.transition,n=se;try{if(Pt.transition=null,se=1,t)return t()}finally{se=n,Pt.transition=r,X=e,!(X&6)&&Ln()}}function hm(){ht=ni.current,de(ni)}function ts(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Hw(r)),je!==null)for(r=je.return;r!==null;){var n=r;switch(Vf(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&sc();break;case 3:xi(),de(lt),de(Ye),tm();break;case 5:em(n);break;case 4:xi();break;case 13:de(me);break;case 19:de(me);break;case 10:Qf(n.type._context);break;case 22:case 23:hm()}r=r.return}if(Le=t,je=t=kn(t.current,null),qe=ht=e,Ce=0,Ja=null,cm=qc=as=0,at=ka=null,Zn!==null){for(e=0;e<Zn.length;e++)if(r=Zn[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=s,n.next=a}r.pending=n}Zn=null}return t}function Wv(t,e){do{var r=je;try{if(Jf(),Ml.current=fc,hc){for(var n=pe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}hc=!1}if(is=0,Oe=Ee=pe=null,Na=!1,Va=0,lm.current=null,r===null||r.return===null){Ce=1,Ja=e,je=null;break}e:{var i=t,a=r.return,l=r,c=e;if(e=qe,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,h=l,p=h.tag;if(!(h.mode&1)&&(p===0||p===11||p===15)){var d=h.alternate;d?(h.updateQueue=d.updateQueue,h.memoizedState=d.memoizedState,h.lanes=d.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=Vp(a);if(m!==null){m.flags&=-257,Gp(m,a,l,i,e),m.mode&1&&Wp(i,u,e),e=m,c=u;var x=e.updateQueue;if(x===null){var b=new Set;b.add(c),e.updateQueue=b}else x.add(c);break e}else{if(!(e&1)){Wp(i,u,e),fm();break e}c=Error(L(426))}}else if(fe&&l.mode&1){var _=Vp(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Gp(_,a,l,i,e),Gf(bi(c,l));break e}}i=c=bi(c,l),Ce!==4&&(Ce=2),ka===null?ka=[i]:ka.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var g=Tv(i,c,e);qp(i,g);break e;case 1:l=c;var y=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Nn===null||!Nn.has(v)))){i.flags|=65536,e&=-e,i.lanes|=e;var j=Cv(i,l,e);qp(i,j);break e}}i=i.return}while(i!==null)}Kv(r)}catch(S){e=S,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function Vv(){var t=mc.current;return mc.current=fc,t===null?fc:t}function fm(){(Ce===0||Ce===3||Ce===2)&&(Ce=4),Le===null||!(as&268435455)&&!(qc&268435455)||dn(Le,qe)}function yc(t,e){var r=X;X|=2;var n=Vv();(Le!==t||qe!==e)&&(Rr=null,ts(t,e));do try{p_();break}catch(s){Wv(t,s)}while(!0);if(Jf(),X=r,mc.current=n,je!==null)throw Error(L(261));return Le=null,qe=0,Ce}function p_(){for(;je!==null;)Gv(je)}function g_(){for(;je!==null&&!Bb();)Gv(je)}function Gv(t){var e=Qv(t.alternate,t,ht);t.memoizedProps=t.pendingProps,e===null?Kv(t):je=e,lm.current=null}function Kv(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=c_(r,e),r!==null){r.flags&=32767,je=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ce=6,je=null;return}}else if(r=l_(r,e,ht),r!==null){je=r;return}if(e=e.sibling,e!==null){je=e;return}je=e=t}while(e!==null);Ce===0&&(Ce=5)}function Gn(t,e,r){var n=se,s=Pt.transition;try{Pt.transition=null,se=1,y_(t,e,r,n)}finally{Pt.transition=s,se=n}return null}function y_(t,e,r,n){do ui();while(pn!==null);if(X&6)throw Error(L(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(Yb(t,i),t===Le&&(je=Le=null,qe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||gl||(gl=!0,Yv(Zl,function(){return ui(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Pt.transition,Pt.transition=null;var a=se;se=1;var l=X;X|=4,lm.current=null,d_(t,r),zv(r,t),Dw(ph),ec=!!mh,ph=mh=null,t.current=r,h_(r),zb(),X=l,se=a,Pt.transition=i}else t.current=r;if(gl&&(gl=!1,pn=t,gc=s),i=t.pendingLanes,i===0&&(Nn=null),Wb(r.stateNode),ut(t,we()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(pc)throw pc=!1,t=Ph,Ph=null,t;return gc&1&&t.tag!==0&&ui(),i=t.pendingLanes,i&1?t===$h?Sa++:(Sa=0,$h=t):Sa=0,Ln(),null}function ui(){if(pn!==null){var t=Ty(gc),e=Pt.transition,r=se;try{if(Pt.transition=null,se=16>t?16:t,pn===null)var n=!1;else{if(t=pn,pn=null,gc=0,X&6)throw Error(L(331));var s=X;for(X|=4,M=t.current;M!==null;){var i=M,a=i.child;if(M.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(M=u;M!==null;){var h=M;switch(h.tag){case 0:case 11:case 15:ja(8,h,i)}var p=h.child;if(p!==null)p.return=h,M=p;else for(;M!==null;){h=M;var d=h.sibling,m=h.return;if(qv(h),h===u){M=null;break}if(d!==null){d.return=m,M=d;break}M=m}}}var x=i.alternate;if(x!==null){var b=x.child;if(b!==null){x.child=null;do{var _=b.sibling;b.sibling=null,b=_}while(b!==null)}}M=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,M=a;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ja(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,M=g;break e}M=i.return}}var y=t.current;for(M=y;M!==null;){a=M;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,M=v;else e:for(a=y;M!==null;){if(l=M,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Mc(9,l)}}catch(S){be(l,l.return,S)}if(l===a){M=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,M=j;break e}M=l.return}}if(X=s,Ln(),gr&&typeof gr.onPostCommitFiberRoot=="function")try{gr.onPostCommitFiberRoot(Ac,t)}catch{}n=!0}return n}finally{se=r,Pt.transition=e}}return!1}function ag(t,e,r){e=bi(r,e),e=Tv(t,e,1),t=_n(t,e,1),e=tt(),t!==null&&(go(t,1,e),ut(t,e))}function be(t,e,r){if(t.tag===3)ag(t,t,r);else for(;e!==null;){if(e.tag===3){ag(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Nn===null||!Nn.has(n))){t=bi(r,t),t=Cv(e,t,1),e=_n(e,t,1),t=tt(),e!==null&&(go(e,1,t),ut(e,t));break}}e=e.return}}function v_(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=tt(),t.pingedLanes|=t.suspendedLanes&r,Le===t&&(qe&r)===r&&(Ce===4||Ce===3&&(qe&130023424)===qe&&500>we()-um?ts(t,0):cm|=r),ut(t,e)}function Jv(t,e){e===0&&(t.mode&1?(e=al,al<<=1,!(al&130023424)&&(al=4194304)):e=1);var r=tt();t=zr(t,e),t!==null&&(go(t,e,r),ut(t,r))}function x_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Jv(t,r)}function b_(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(L(314))}n!==null&&n.delete(e),Jv(t,r)}var Qv;Qv=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||lt.current)ot=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return ot=!1,o_(t,e,r);ot=!!(t.flags&131072)}else ot=!1,fe&&e.flags&1048576&&ev(e,oc,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Ul(t,e),t=e.pendingProps;var s=gi(e,Ye.current);ci(e,r),s=nm(null,e,n,t,s,r);var i=sm();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ct(n)?(i=!0,ic(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Zf(e),s.updater=Dc,e.stateNode=s,s._reactInternals=e,jh(e,n,t,r),e=Eh(null,e,n,!0,i,r)):(e.tag=0,fe&&i&&Wf(e),Xe(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Ul(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=__(n),t=Gt(n,t),s){case 0:e=Sh(null,e,n,t,r);break e;case 1:e=Qp(null,e,n,t,r);break e;case 11:e=Kp(null,e,n,t,r);break e;case 14:e=Jp(null,e,n,Gt(n.type,t),r);break e}throw Error(L(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),Sh(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),Qp(t,e,n,s,r);case 3:e:{if(Lv(e),t===null)throw Error(L(387));n=e.pendingProps,i=e.memoizedState,s=i.element,av(t,e),uc(e,n,null,r);var a=e.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=bi(Error(L(423)),e),e=Yp(t,e,n,r,s);break e}else if(n!==s){s=bi(Error(L(424)),e),e=Yp(t,e,n,r,s);break e}else for(mt=wn(e.stateNode.containerInfo.firstChild),vt=e,fe=!0,Yt=null,r=sv(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(yi(),n===s){e=Fr(t,e,r);break e}Xe(t,e,n,r)}e=e.child}return e;case 5:return ov(e),t===null&&wh(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,a=s.children,gh(n,s)?a=null:i!==null&&gh(n,i)&&(e.flags|=32),Rv(t,e),Xe(t,e,a,r),e.child;case 6:return t===null&&wh(e),null;case 13:return Iv(t,e,r);case 4:return Xf(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=vi(e,null,n,r):Xe(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),Kp(t,e,n,s,r);case 7:return Xe(t,e,e.pendingProps,r),e.child;case 8:return Xe(t,e,e.pendingProps.children,r),e.child;case 12:return Xe(t,e,e.pendingProps.children,r),e.child;
vendor: 4,549 bytes, line 40
40case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,a=s.value,oe(lc,n._currentValue),n._currentValue=a,i!==null)if(nr(i.value,a)){if(i.children===s.children&&!lt.current){e=Fr(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=Mr(-1,r&-r),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),_h(i.return,r,e),l.lanes|=r;break}c=c.next}}else if(i.tag===10)a=i.type===e.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(L(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),_h(a,r,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Xe(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,ci(e,r),s=Dt(s),n=n(s),e.flags|=1,Xe(t,e,n,r),e.child;case 14:return n=e.type,s=Gt(n,e.pendingProps),s=Gt(n.type,s),Jp(t,e,n,s,r);case 15:return Av(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),Ul(t,e),e.tag=1,ct(n)?(t=!0,ic(e)):t=!1,ci(e,r),Ev(e,n,s),jh(e,n,s,r),Eh(null,e,n,!0,t,r);case 19:return Pv(t,e,r);case 22:return Ov(t,e,r)}throw Error(L(156,e.tag))};function Yv(t,e){return jy(t,e)}function w_(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(t,e,r,n){return new w_(t,e,r,n)}function mm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function __(t){if(typeof t=="function")return mm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Lf)return 11;if(t===If)return 14}return 2}function kn(t,e){var r=t.alternate;return r===null?(r=Lt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Fl(t,e,r,n,s,i){var a=2;if(n=t,typeof t=="function")mm(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case Gs:return rs(r.children,s,i,e);case Rf:a=8,s|=8;break;case Kd:return t=Lt(12,r,e,s|2),t.elementType=Kd,t.lanes=i,t;case Jd:return t=Lt(13,r,e,s),t.elementType=Jd,t.lanes=i,t;case Qd:return t=Lt(19,r,e,s),t.elementType=Qd,t.lanes=i,t;case oy:return Uc(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case iy:a=10;break e;case ay:a=9;break e;case Lf:a=11;break e;case If:a=14;break e;case on:a=16,n=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=Lt(a,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function rs(t,e,r,n){return t=Lt(7,t,n,e),t.lanes=r,t}function Uc(t,e,r,n){return t=Lt(22,t,n,e),t.elementType=oy,t.lanes=r,t.stateNode={isHidden:!1},t}function xd(t,e,r){return t=Lt(6,t,null,e),t.lanes=r,t}function bd(t,e,r){return e=Lt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function N_(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ed(0),this.expirationTimes=ed(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ed(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function pm(t,e,r,n,s,i,a,l,c){return t=new N_(t,e,r,l,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Lt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zf(i),t}function j_(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,590 bytes, line 40
40return{$$typeof:Vs,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function Zv(t){if(!t)return Cn;t=t._reactInternals;e:{if(hs(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(ct(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var r=t.type;if(ct(r))return Zy(t,r,e)}return e}function Xv(t,e,r,n,s,i,a,l,c){return t=pm(r,n,!0,t,s,i,a,l,c),t.context=Zv(null),r=t.current,n=tt(),s=jn(r),i=Mr(n,s),i.callback=e??null,_n(r,i,s),t.current.lanes=s,go(t,s,n),ut(t,n),t}function Bc(t,e,r,n){var s=e.current,i=tt(),a=jn(s);return r=Zv(r),e.context===null?e.context=r:e.pendingContext=r,e=Mr(i,a),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=_n(s,e,a),t!==null&&(tr(t,s,a,i),Dl(t,s,a)),a}function vc(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function og(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function gm(t,e){og(t,e),(t=t.alternate)&&og(t,e)}function k_(){return null}var ex=typeof reportError=="function"?reportError:function(t){console.error(t)};function ym(t){this._internalRoot=t}zc.prototype.render=ym.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));Bc(t,e,null,null)};zc.prototype.unmount=ym.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;os(function(){Bc(null,t,null,null)}),e[Br]=null}};function zc(t){this._internalRoot=t}zc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Oy();t={blockedOn:null,target:t,priority:e};for(var r=0;r<un.length&&e!==0&&e<un[r].priority;r++);un.splice(r,0,t),r===0&&Ly(t)}};function vm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Fc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function lg(){}function S_(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=vc(a);i.call(u)}}var a=Xv(e,n,t,0,null,!1,!1,"",lg);return t._reactRootContainer=a,t[Br]=a.current,Ba(t.nodeType===8?t.parentNode:t),os(),a}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=vc(c);l.call(u)}}var c=pm(t,0,!1,null,null,!1,!1,"",lg);return t._reactRootContainer=c,t[Br]=c.current,Ba(t.nodeType===8?t.parentNode:t),os(function(){Bc(e,c,r,n)}),c}function Hc(t,e,r,n,s){var i=r._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var l=s;s=function(){var c=vc(a);l.call(c)}}Bc(e,a,t,s)}else a=S_(r,e,t,s,n);return vc(a)}Cy=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=ma(e.pendingLanes);r!==0&&(Df(e,r|1),ut(e,we()),!(X&6)&&(wi=we()+500,Ln()))}break;case 13:os(function(){var n=zr(t,1);if(n!==null){var s=tt();tr(n,t,1,s)}}),gm(t,1)}};Mf=function(t){if(t.tag===13){var e=zr(t,134217728);if(e!==null){var r=tt();tr(e,t,134217728,r)}gm(t,134217728)}};Ay=function(t){if(t.tag===13){var e=jn(t),r=zr(t,e);if(r!==null){var n=tt();tr(r,t,e,n)}gm(t,e)}};Oy=function(){return se};Ry=function(t,e){var r=se;try{return se=t,e()}finally{se=r}};ah=function(t,e,r){switch(e){case"input":if(Xd(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=Ic(n);if(!s)throw Error(L(90));cy(n),Xd(n,s)}}}break;case"textarea":dy(t,r);break;case"select":e=r.value,e!=null&&ii(t,!!r.multiple,e,!1)}};vy=dm;xy=os;var E_={usingClientEntryPoint:!1,Events:[vo,Ys,Ic,gy,yy,dm]},oa={findFiberByHostInstance:Yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T_={bundleType:oa.bundleType,version:oa.version,rendererPackageName:oa.rendererPackageName,rendererConfig:oa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=_y(t),t===null?null:t.stateNode},findFiberByHostInstance:oa.findFiberByHostInstance||k_,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 yl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yl.isDisabled&&yl.supportsFiber)try{Ac=yl.inject(T_),gr=yl}catch{}}bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E_;bt.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vm(e))throw Error(L(200));return j_(t,e,null,r)};bt.createRoot=function(t,e){if(!vm(t))throw Error(L(299));var r=!1,n="",s=ex;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=pm(t,1,!1,null,null,r,!1,n,s),t[Br]=e.current,Ba(t.nodeType===8?t.parentNode:t),new ym(e)};bt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=_y(e),t=t===null?null:t.stateNode,t};bt.flushSync=function(t){return os(t)};bt.hydrate=function(t,e,r){if(!Fc(e))throw Error(L(200));return Hc(null,t,e,!0,r)};bt.hydrateRoot=function(t,e,r){if(!vm(t))throw Error(L(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",a=ex;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),e=Xv(e,null,t,1,r??null,s,!1,i,a),t[Br]=e.current,Ba(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new zc(e)};bt.render=function(t,e,r){if(!Fc(e))throw Error(L(200));return Hc(null,t,e,!1,r)};bt.unmountComponentAtNode=function(t){if(!Fc(t))throw Error(L(40));return t._reactRootContainer?(os(function(){Hc(null,null,t,!1,function(){t._reactRootContainer=null,t[Br]=null})}),!0):!1};bt.unstable_batchedUpdates=dm;bt.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Fc(r))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return Hc(t,e,r,!1,n)};bt.version="18.3.1-next-f1338f8080-20240426";function tx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tx)}catch(t){console.error(t)}}tx(),ty.exports=bt;var C_=ty.exports,rx,cg=C_;rx=cg.createRoot,cg.hydrateRoot;/**
41 * react-router v7.7.1
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */var ug="popstate";function A_(t={}){function e(n,s){let{pathname:i,search:a,hash:l}=n.location;return qh("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Qa(s)}return R_(e,r,null,t)}function ge(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function wr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function O_(){return Math.random().toString(36).substring(2,10)}function dg(t,e){return{usr:t.state,key:t.key,idx:e}}function qh(t,e,r=null,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Ai(e):e,state:r,key:e&&e.key||n||O_()}}function Qa({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ai(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function R_(t,e,r,n={}){let{window:s=document.defaultView,v5Compat:i=!1}=n,a=s.history,l="POP",c=null,u=h();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function h(){return(a.state||{idx:null}).idx}function p(){l="POP";let _=h(),g=_==null?null:_-u;u=_,c&&c({action:l,location:b.location,delta:g})}function d(_,g){l="PUSH";let y=qh(b.location,_,g);u=h()+1;let v=dg(y,u),j=b.createHref(y);try{a.pushState(v,"",j)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(j)}i&&c&&c({action:l,location:b.location,delta:1})}function m(_,g){l="REPLACE";let y=qh(b.location,_,g);u=h();let v=dg(y,u),j=b.createHref(y);a.replaceState(v,"",j),i&&c&&c({action:l,location:b.location,delta:0})}function x(_){return L_(_)}let b={get action(){return l},get location(){return t(s,a)},listen(_){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(ug,p),c=_,()=>{s.removeEventListener(ug,p),c=null}},createHref(_){return e(s,_)},createURL:x,encodeLocation(_){let g=x(_);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:m,go(_){return a.go(_)}};return b}function L_(t,e=!1){let r="http://localhost";
49typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ge(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:Qa(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function nx(t,e,r="/"){return I_(t,e,r,!1)}function I_(t,e,r,n){let s=typeof e=="string"?Ai(e):e,i=Hr(s.pathname||"/",r);if(i==null)return null;let a=sx(t);P_(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=V_(i);l=H_(a[c],u,n)}return l}function sx(t,e=[],r=[],n=""){let s=(i,a,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(ge(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length));let u=qr([n,c.relativePath]),h=r.concat(c);i.children&&i.children.length>0&&(ge(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),sx(i.children,e,h,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:z_(u,i.index),routesMeta:h})};return t.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,a);else for(let c of ix(i.path))s(i,a,c)}),e}function ix(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let a=ix(n.join("/")),l=[];return l.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...a),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function P_(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:F_(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var $_=/^:[\w-]+$/,D_=3,M_=2,q_=1,U_=10,B_=-2,hg=t=>t==="*";function z_(t,e){let r=t.split("/"),n=r.length;return r.some(hg)&&(n+=B_),e&&(n+=M_),r.filter(s=>!hg(s)).reduce((s,i)=>s+($_.test(i)?D_:i===""?q_:U_),n)}function F_(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function H_(t,e,r=!1){let{routesMeta:n}=t,s={},i="/",a=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,h=i==="/"?e:e.slice(i.length)||"/",p=xc({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),d=c.route;if(!p&&u&&r&&!n[n.length-1].route.index&&(p=xc({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!p)return null;
49Object.assign(s,p.params),a.push({params:s,pathname:qr([i,p.pathname]),pathnameBase:Q_(qr([i,p.pathnameBase])),route:d}),p.pathnameBase!=="/"&&(i=qr([i,p.pathnameBase]))}return a}function xc(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=W_(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,{paramName:h,isOptional:p},d)=>{if(h==="*"){let x=l[d]||"";a=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const m=l[d];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:t}}function W_(t,e=!1,r=!0){wr(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function V_(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return wr(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Hr(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function G_(t,e="/"){let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Ai(t):t;return{pathname:r?r.startsWith("/")?r:K_(r,e):e,search:Y_(n),hash:Z_(s)}}function K_(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function wd(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function J_(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function ax(t){let e=J_(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function ox(t,e,r,n=!1){let s;typeof t=="string"?s=Ai(t):(s={...t},ge(!s.pathname||!s.pathname.includes("?"),wd("?","pathname","search",s)),ge(!s.pathname||!s.pathname.includes("#"),wd("#","pathname","hash",s)),ge(!s.search||!s.search.includes("#"),wd("#","search","hash",s)));let i=t===""||s.pathname==="",a=i?"/":s.pathname,l;if(a==null)l=r;else{let p=e.length-1;if(!n&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),p-=1;s.pathname=d.join("/")}l=p>=0?e[p]:"/"}let c=G_(s,l),u=a&&a!=="/"&&a.endsWith("/"),h=(i||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}var qr=t=>t.join("/").replace(/\/\/+/g,"/"),Q_=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y_=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Z_=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function X_(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var lx=["POST","PUT","PATCH","DELETE"];new Set(lx);var eN=["GET",...lx];new Set(eN);var Oi=E.createContext(null);Oi.displayName="DataRouter";var Wc=E.createContext(null);Wc.displayName="DataRouterState";E.createContext(!1);var cx=E.createContext({isTransitioning:!1});cx.displayName="ViewTransition";var tN=E.createContext(new Map);tN.displayName="Fetchers";var rN=E.createContext(null);rN.displayName="Await";var jr=E.createContext(null);jr.displayName="Navigation";var bo=E.createContext(null);bo.displayName="Location";var kr=E.createContext({outlet:null,matches:[],isDataRoute:!1});kr.displayName="Route";var xm=E.createContext(null);xm.displayName="RouteError";function nN(t,{relative:e}={}){ge(wo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=E.useContext(jr),{hash:s,pathname:i,search:a}=_o(t,{relative:e}),l=i;return r!=="/"&&(l=i==="/"?r:qr([r,i])),n.createHref({pathname:l,search:a,hash:s})}function wo(){return E.useContext(bo)!=null}function Qr(){return ge(wo(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(bo).location}var ux="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dx(t){E.useContext(jr).static||E.useLayoutEffect(t)}function hx(){let{isDataRoute:t}=E.useContext(kr);return t?yN():sN()}function sN(){ge(wo(),"useNavigate() may be used only in the context of a <Router> component.");let t=E.useContext(Oi),{basename:e,navigator:r}=E.useContext(jr),{matches:n}=E.useContext(kr),{pathname:s}=Qr(),i=JSON.stringify(ax(n)),a=E.useRef(!1);return dx(()=>{a.current=!0}),E.useCallback((c,u={})=>
49{if(wr(a.current,ux),!a.current)return;if(typeof c=="number"){r.go(c);return}let h=ox(c,JSON.parse(i),s,u.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:qr([e,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[e,r,i,s,t])}E.createContext(null);function iN(){let{matches:t}=E.useContext(kr),e=t[t.length-1];return e?e.params:{}}function _o(t,{relative:e}={}){let{matches:r}=E.useContext(kr),{pathname:n}=Qr(),s=JSON.stringify(ax(r));return E.useMemo(()=>ox(t,JSON.parse(s),n,e==="path"),[t,s,n,e])}function aN(t,e){return fx(t,e)}function fx(t,e,r,n){var g;ge(wo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=E.useContext(jr),{matches:i}=E.useContext(kr),a=i[i.length-1],l=a?a.params:{},c=a?a.pathname:"/",u=a?a.pathnameBase:"/",h=a&&a.route;{let y=h&&h.path||"";mx(c,!h||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
51Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let p=Qr(),d;if(e){let y=typeof e=="string"?Ai(e):e;ge(u==="/"||((g=y.pathname)==null?void 0:g.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=p;let m=d.pathname||"/",x=m;if(u!=="/"){let y=u.replace(/^\//,"").split("/");x="/"+m.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=nx(t,{pathname:x});wr(h||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),wr(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=dN(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:qr([u,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:qr([u,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,r,n);return e&&_?E.createElement(bo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},_):_}function oN(){let t=gN(),e=X_(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",t),a=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),r?E.createElement("pre",{style:s},r):null,a)}var lN=E.createElement(oN,null),cN=class extends E.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,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?E.createElement(kr.Provider,{value:this.props.routeContext},E.createElement(xm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function uN({routeContext:t,match:e,children:r}){let n=E.useContext(Oi);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(kr.Provider,{value:t},r)}function dN(t,e=[],r=null,n=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,i=r==null?void 0:r.errors;if(i!=null){let c=s.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);ge(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let a=!1,l=-1;if(r)for(let c=0;c<s.length;c++){let u=s[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=c),u.route.id){let{loaderData:h,errors:p}
51=r,d=u.route.loader&&!h.hasOwnProperty(u.route.id)&&(!p||p[u.route.id]===void 0);if(u.route.lazy||d){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}return s.reduceRight((c,u,h)=>{let p,d=!1,m=null,x=null;r&&(p=i&&u.route.id?i[u.route.id]:void 0,m=u.route.errorElement||lN,a&&(l<0&&h===0?(mx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,x=null):l===h&&(d=!0,x=u.route.hydrateFallbackElement||null)));let b=e.concat(s.slice(0,h+1)),_=()=>{let g;return p?g=m:d?g=x:u.route.Component?g=E.createElement(u.route.Component,null):u.route.element?g=u.route.element:g=c,E.createElement(uN,{match:u,routeContext:{outlet:c,matches:b,isDataRoute:r!=null},children:g})};return r&&(u.route.ErrorBoundary||u.route.errorElement||h===0)?E.createElement(cN,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:_(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):_()},null)}function bm(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function hN(t){let e=E.useContext(Oi);return ge(e,bm(t)),e}function fN(t){let e=E.useContext(Wc);return ge(e,bm(t)),e}function mN(t){let e=E.useContext(kr);return ge(e,bm(t)),e}function wm(t){let e=mN(t),r=e.matches[e.matches.length-1];return ge(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function pN(){return wm("useRouteId")}function gN(){var n;let t=E.useContext(xm),e=fN("useRouteError"),r=wm("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function yN(){let{router:t}=hN("useNavigate"),e=wm("useNavigate"),r=E.useRef(!1);return dx(()=>{r.current=!0}),E.useCallback(async(s,i={})=>{wr(r.current,ux),r.current&&(typeof s=="number"?t.navigate(s):await t.navigate(s,{fromRouteId:e,...i}))},[t,e])}var fg={};function mx(t,e,r){!e&&!fg[t]&&(fg[t]=!0,wr(!1,r))}E.memo(vN);function vN({routes:t,future:e,state:r}){return fx(t,void 0,r,e)}function St(t){ge(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function xN({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:s,static:i=!1}){ge(!wo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=E.useMemo(()=>({basename:a,navigator:s,static:i,future:{}}),[a,s,i]);typeof r=="string"&&(r=Ai(r));let{pathname:c="/",search:u="",hash:h="",state:p=null,key:d="default"}=r,m=E.useMemo(()=>{let x=Hr(c,a);return x==null?null:{location:{pathname:x,search:u,hash:h,state:p,key:d},navigationType:n}},[a,c,u,h,p,d,n]);return wr(m!=null,`<Router basename="${a}"> is not able to match the URL "${c}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:E.createElement(jr.Provider,{value:l},E.createElement(bo.Provider,{children:e,value:m}))}function bN({children:t,location:e}){return aN(Uh(t),e)}function Uh(t,e=[]){let r=[];return E.Children.forEach(t,(n,s)=>{if(!E.isValidElement(n))return;let i=[...e,s];if(n.type===E.Fragment){r.push.apply(r,Uh(n.props.children,i));return}ge(n.type===St,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ge(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=Uh(n.props.children,i)),r.push(a)}),r}var Hl="get",Wl="application/x-www-form-urlencoded";function Vc(t){return t!=null&&typeof t.tagName=="string"}function wN(t){return Vc(t)&&t.tagName.toLowerCase()==="button"}function _N(t){return Vc(t)&&t.tagName.toLowerCase()==="form"}function NN(t){return Vc(t)&&t.tagName.toLowerCase()==="input"}function jN(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function kN(t,e){return t.button===0&&(!e||e==="_self")&&!jN(t)}var vl=null;function SN(){if(vl===null)try{new FormData(document.createElement("form"),0),vl=!1}catch{vl=!0}return vl}var EN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _d(t){return t!=null&&!EN.has(t)?(wr(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wl}"`),null):t}function TN(t,e){let r,n,s,i,a;if(_N(t)){let l=t.getAttribute("action");n=l?Hr(l,e):null,r=t.getAttribute("method")||Hl,s=_d(t.getAttribute("enctype"))||Wl,i=new FormData(t)}else if(wN(t)||NN(t)&&(t.type==="submit"||t.type==="image")){let l=t.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||l.getAttribute("action");if(n=c?Hr(c,e):null,r=t.getAttribute("formmethod")||l.getAttribute("method")||Hl,s=_d(t.getAttribute("formenctype"))||_d(l.getAttribute("enctype"))||Wl,i=new FormData(l,t),!SN()){let{name:u,type:h,value:p}=t;if(h==="image"){let d=u?`${u}.`:"";i.append(`${d}x`,"0"),i.append(`${d}y`,"0")}else u&&i.append(u,p)}}else{if(Vc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
51r=Hl,n=null,s=Wl,a=t}return i&&s==="text/plain"&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:s,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function _m(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function CN(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&Hr(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function AN(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ON(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function RN(t,e,r){let n=await Promise.all(t.map(async s=>{let i=e.routes[s.route.id];if(i){let a=await AN(i,r);return a.links?a.links():[]}return[]}));return $N(n.flat(1).filter(ON).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function mg(t,e,r,n,s,i){let a=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>{var h;return r[u].pathname!==c.pathname||((h=r[u].route.path)==null?void 0:h.endsWith("*"))&&r[u].params["*"]!==c.params["*"]};return i==="assets"?e.filter((c,u)=>a(c,u)||l(c,u)):i==="data"?e.filter((c,u)=>{var p;let h=n.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(a(c,u)||l(c,u))return!0;
51if(c.route.shouldRevalidate){let d=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((p=r[0])==null?void 0:p.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function LN(t,e,{includeHydrateFallback:r}={}){return IN(t.map(n=>{let s=e.routes[n.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function IN(t){return[...new Set(t)]}function PN(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function $N(t,e){let r=new Set;return new Set(e),t.reduce((n,s)=>{let i=JSON.stringify(PN(s));return r.has(i)||(r.add(i),n.push({key:i,link:s})),n},[])}function px(){let t=E.useContext(Oi);return _m(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function DN(){let t=E.useContext(Wc);return _m(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Nm=E.createContext(void 0);Nm.displayName="FrameworkContext";function gx(){let t=E.useContext(Nm);return _m(t,"You must render this element inside a <HydratedRouter> element"),t}function MN(t,e){let r=E.useContext(Nm),[n,s]=E.useState(!1),[i,a]=E.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:h,onTouchStart:p}=e,d=E.useRef(null);E.useEffect(()=>{if(t==="render"&&a(!0),t==="viewport"){let b=g=>{g.forEach(y=>{a(y.isIntersecting)})},_=new IntersectionObserver(b,{threshold:.5});return d.current&&_.observe(d.current),()=>{_.disconnect()}}},[t]),E.useEffect(()=>{if(n){let b=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(b)}}},[n]);let m=()=>{s(!0)},x=()=>{s(!1),a(!1)};return r?t!=="intent"?[i,d,{}]:[i,d,{onFocus:la(l,m),onBlur:la(c,x),onMouseEnter:la(u,m),onMouseLeave:la(h,x),onTouchStart:la(p,m)}]:[!1,d,{}]}function la(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function qN({page:t,...e}){let{router:r}=px(),n=E.useMemo(()=>nx(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?E.createElement(BN,{page:t,matches:n,...e}):null}function UN(t){let{manifest:e,routeModules:r}=gx(),[n,s]=E.useState([]);return E.useEffect(()=>{let i=!1;return RN(t,e,r).then(a=>{i||s(a)}),()=>{i=!0}},[t,e,r]),n}function BN({page:t,matches:e,...r}){let n=Qr(),{manifest:s,routeModules:i}=gx(),{basename:a}=px(),{loaderData:l,matches:c}=DN(),u=E.useMemo(()=>mg(t,e,c,s,n,"data"),[t,e,c,s,n]),h=E.useMemo(()=>mg(t,e,c,s,n,"assets"),[t,e,c,s,n]),p=E.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,b=!1;if(e.forEach(g=>{var v;let y=s.routes[g.route.id];!y||!y.hasLoader||(!u.some(j=>j.route.id===g.route.id)&&g.route.id in l&&((v=i[g.route.id])!=null&&v.shouldRevalidate)||y.hasClientLoader?b=!0:x.add(g.route.id))}),x.size===0)return[];let _=CN(t,a,"data");return b&&x.size>0&&_.searchParams.set("_routes",e.filter(g=>x.has(g.route.id)).map(g=>g.route.id).join(",")),[_.pathname+_.search]},[a,l,n,s,u,e,t,i]),d=E.useMemo(()=>LN(h,s),[h,s]),m=UN(h);return E.createElement(E.Fragment,null,p.map(x=>E.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),d.map(x=>E.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),m.map(({key:x,link:b})=>E.createElement("link",{key:x,...b})))}function zN(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var yx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{yx&&(window.__reactRouterVersion="7.7.1")}catch{}function FN({basename:t,children:e,window:r}){let n=E.useRef();n.current==null&&(n.current=A_({window:r,v5Compat:!0}));let s=n.current,[i,a]=E.useState({action:s.action,location:s.location}),l=E.useCallback(c=>{E.startTransition(()=>a(c))},[a]);return E.useLayoutEffect(()=>s.listen(l),[s,l]),E.createElement(xN,{basename:t,children:e,location:i.location,navigationType:i.action,navigator:s})}var vx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,re=E.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:s,reloadDocument:i,replace:a,state:l,target:c,to:u,preventScrollReset:h,viewTransition:p,...d},m){let{basename:x}=E.useContext(jr),b=typeof u=="string"&&vx.test(u),_,g=!1;if(typeof u=="string"&&b&&(_=u,yx))try{let P=new URL(window.location.href),U=u.startsWith("//")?new URL(P.protocol+u):new URL(u),R=Hr(U.pathname,x);U.origin===P.origin&&R!=null?u=R+U.search+U.hash:g=!0}catch{wr(!1,`<Link to="${u}">
51 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=nN(u,{relative:s}),[v,j,S]=MN(n,d),N=GN(u,{replace:a,state:l,target:c,preventScrollReset:h,relative:s,viewTransition:p});function T(P){e&&e(P),P.defaultPrevented||N(P)}let A=E.createElement("a",{...d,...S,href:_||y,onClick:g||i?e:T,ref:zN(m,j),target:c,"data-discover":!b&&r==="render"?"true":void 0});return v&&!b?E.createElement(E.Fragment,null,A,E.createElement(qN,{page:y})):A});re.displayName="Link";var HN=E.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:s=!1,style:i,to:a,viewTransition:l,children:c,...u},h){let p=_o(a,{relative:u.relative}),d=Qr(),m=E.useContext(Wc),{navigator:x,basename:b}=E.useContext(jr),_=m!=null&&ZN(p)&&l===!0,g=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,y=d.pathname,v=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(y=y.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&b&&(v=Hr(v,b)||v);const j=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let S=y===g||!s&&y.startsWith(g)&&y.charAt(j)==="/",N=v!=null&&(v===g||!s&&v.startsWith(g)&&v.charAt(g.length)==="/"),T={isActive:S,isPending:N,isTransitioning:_},A=S?e:void 0,P;typeof n=="function"?P=n(T):P=[n,S?"active":null,N?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let U=typeof i=="function"?i(T):i;return E.createElement(re,{...u,"aria-current":A,className:P,ref:h,style:U,to:a,viewTransition:l},typeof c=="function"?c(T):c)});HN.displayName="NavLink";var WN=E.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:s,state:i,method:a=Hl,action:l,onSubmit:c,relative:u,preventScrollReset:h,viewTransition:p,...d},m)=>{let x=QN(),b=YN(l,{relative:u}),_=a.toLowerCase()==="get"?"get":"post",g=typeof l=="string"&&vx.test(l),y=v=>{if(c&&c(v),v.defaultPrevented)return;v.preventDefault();let j=v.nativeEvent.submitter,S=(j==null?void 0:j.getAttribute("formmethod"))||a;x(j||v.currentTarget,{fetcherKey:e,method:S,navigate:r,replace:s,state:i,relative:u,preventScrollReset:h,viewTransition:p})};return E.createElement("form",{ref:m,method:_,action:b,onSubmit:n?c:y,...d,"data-discover":!g&&t==="render"?"true":void 0})});WN.displayName="Form";function VN(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function xx(t){let e=E.useContext(Oi);return ge(e,VN(t)),e}function GN(t,{target:e,replace:r,state:n,preventScrollReset:s,relative:i,viewTransition:a}={}){let l=hx(),c=Qr(),u=_o(t,{relative:i});return E.useCallback(h=>{if(kN(h,e)){h.preventDefault();let p=r!==void 0?r:Qa(c)===Qa(u);l(t,{replace:p,state:n,preventScrollReset:s,relative:i,viewTransition:a})}},[c,l,u,r,n,e,t,s,i,a])}var KN=0,JN=()=>`__${String(++KN)}__`;function QN(){let{router:t}=xx("useSubmit"),{basename:e}=E.useContext(jr),r=pN();return E.useCallback(async(n,s={})=>{let{action:i,method:a,encType:l,formData:c,body:u}=TN(n,e);if(s.navigate===!1){let h=s.fetcherKey||JN();await t.fetch(h,r,s.action||i,{preventScrollReset:s.preventScrollReset,formData:c,body:u,formMethod:s.method||a,formEncType:s.encType||l,flushSync:s.flushSync})}else await t.navigate(s.action||i,{preventScrollReset:s.preventScrollReset,formData:c,body:u,formMethod:s.method||a,formEncType:s.encType||l,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[t,e,r])}function YN(t,{relative:e}={}){let{basename:r}=E.useContext(jr),n=E.useContext(kr);ge(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),i={..._o(t||".",{relative:e})},a=Qr();if(t==null){i.search=a.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(p=>p).forEach(p=>l.append("index",p));let h=l.toString();i.search=h?`?${h}`:""}}return(!t||t===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:qr([r,i.pathname])),Qa(i)}function ZN(t,{relative:e}={}){let r=E.useContext(cx);ge(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xx("useViewTransitionState"),s=_o(t,{relative:e});if(!r.isTransitioning)return!1;let i=Hr(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=Hr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return xc(s.pathname,a)!=null||xc(s.pathname,i)!=null}/**
52 * @license lucide-react v0.344.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */var XN={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"};/**
57 * @license lucide-react v0.344.0 - ISC
58 *
59 * This source code is licensed under the ISC license.
60 * See the LICENSE file in the root directory of this source tree.
61 */const e2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),G=(t,e)=>{const r=E.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:l="",children:c,...u},h)=>E.createElement("svg",{ref:h,...XN,width:s,height:s,stroke:n,strokeWidth:a?Number(i)*24/Number(s):i,className:["lucide",`lucide-${e2(t)}`,l].join(" "),...u},[...e.map(([p,d])=>
61E.createElement(p,d)),...Array.isArray(c)?c:[c]]));return r.displayName=`${t}`,r};/**
62 * @license lucide-react v0.344.0 - ISC
63 *
64 * This source code is licensed under the ISC license.
65 * See the LICENSE file in the root directory of this source tree.
66 */const Nd=G("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
67 * @license lucide-react v0.344.0 - ISC
68 *
69 * This source code is licensed under the ISC license.
70 * See the LICENSE file in the root directory of this source tree.
71 */const Pr=G("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
72 * @license lucide-react v0.344.0 - ISC
73 *
74 * This source code is licensed under the ISC license.
75 * See the LICENSE file in the root directory of this source tree.
76 */const t2=G("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]]);/**
77 * @license lucide-react v0.344.0 - ISC
78 *
79 * This source code is licensed under the ISC license.
80 * See the LICENSE file in the root directory of this source tree.
81 */const pg=G("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
82 * @license lucide-react v0.344.0 - ISC
83 *
84 * This source code is licensed under the ISC license.
85 * See the LICENSE file in the root directory of this source tree.
86 */const jd=G("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
87 * @license lucide-react v0.344.0 - ISC
88 *
89 * This source code is licensed under the ISC license.
90 * See the LICENSE file in the root directory of this source tree.
91 */const bx=G("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"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
92 * @license lucide-react v0.344.0 - ISC
93 *
94 * This source code is licensed under the ISC license.
95 * See the LICENSE file in the root directory of this source tree.
96 */const vr=G("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"}]]);/**
97 * @license lucide-react v0.344.0 - ISC
98 *
99 * This source code is licensed under the ISC license.
100 * See the LICENSE file in the root directory of this source tree.
101 */const wx=G("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
102 * @license lucide-react v0.344.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */const r2=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
107 * @license lucide-react v0.344.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */const n2=G("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
112 * @license lucide-react v0.344.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const s2=G("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
117 * @license lucide-react v0.344.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */const _x=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
122 * @license lucide-react v0.344.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const i2=G("Computer",[["rect",{width:"14",height:"8",x:"5",y:"2",rx:"2",key:"wc9tft"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",key:"w68u3i"}],["path",{d:"M6 18h2",key:"rwmk9e"}],["path",{d:"M12 18h6",key:"aqd8w3"}]]);/**
127 * @license lucide-react v0.344.0 - ISC
128 *
129 * This source code is licensed under the ISC license.
130 * See the LICENSE file in the root directory of this source tree.
131 */const a2=G("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"}]]);/**
132 * @license lucide-react v0.344.0 - ISC
133 *
134 * This source code is licensed under the ISC license.
135 * See the LICENSE file in the root directory of this source tree.
136 */const Nx=G("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"}]]);/**
137 * @license lucide-react v0.344.0 - ISC
138 *
139 * This source code is licensed under the ISC license.
140 * See the LICENSE file in the root directory of this source tree.
141 */const Ya=G("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"}]]);/**
142 * @license lucide-react v0.344.0 - ISC
143 *
144 * This source code is licensed under the ISC license.
145 * See the LICENSE file in the root directory of this source tree.
146 */const o2=G("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
147 * @license lucide-react v0.344.0 - ISC
148 *
149 * This source code is licensed under the ISC license.
150 * See the LICENSE file in the root directory of this source tree.
151 */const jx=G("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
152 * @license lucide-react v0.344.0 - ISC
153 *
154 * This source code is licensed under the ISC license.
155 * See the LICENSE file in the root directory of this source tree.
156 */const kd=G("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"}]]);/**
157 * @license lucide-react v0.344.0 - ISC
158 *
159 * This source code is licensed under the ISC license.
160 * See the LICENSE file in the root directory of this source tree.
161 */const l2=G("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
162 * @license lucide-react v0.344.0 - ISC
163 *
164 * This source code is licensed under the ISC license.
165 * See the LICENSE file in the root directory of this source tree.
166 */const jm=G("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
167 * @license lucide-react v0.344.0 - ISC
168 *
169 * This source code is licensed under the ISC license.
170 * See the LICENSE file in the root directory of this source tree.
171 */const c2=G("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"}]]);/**
172 * @license lucide-react v0.344.0 - ISC
173 *
174 * This source code is licensed under the ISC license.
175 * See the LICENSE file in the root directory of this source tree.
176 */const Wr=G("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"}]]);/**
177 * @license lucide-react v0.344.0 - ISC
178 *
179 * This source code is licensed under the ISC license.
180 * See the LICENSE file in the root directory of this source tree.
181 */const u2=G("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
182 * @license lucide-react v0.344.0 - ISC
183 *
184 * This source code is licensed under the ISC license.
185 * See the LICENSE file in the root directory of this source tree.
186 */const d2=G("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
187 * @license lucide-react v0.344.0 - ISC
188 *
189 * This source code is licensed under the ISC license.
190 * See the LICENSE file in the root directory of this source tree.
191 */const h2=G("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"}]]);/**
192 * @license lucide-react v0.344.0 - ISC
193 *
194 * This source code is licensed under the ISC license.
195 * See the LICENSE file in the root directory of this source tree.
196 */const f2=G("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
197 * @license lucide-react v0.344.0 - ISC
198 *
199 * This source code is licensed under the ISC license.
200 * See the LICENSE file in the root directory of this source tree.
201 */const Sn=G("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"}]]);/**
202 * @license lucide-react v0.344.0 - ISC
203 *
204 * This source code is licensed under the ISC license.
205 * See the LICENSE file in the root directory of this source tree.
206 */const Ri=G("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
207 * @license lucide-react v0.344.0 - ISC
208 *
209 * This source code is licensed under the ISC license.
210 * See the LICENSE file in the root directory of this source tree.
211 */const m2=G("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"}]]);/**
212 * @license lucide-react v0.344.0 - ISC
213 *
214 * This source code is licensed under the ISC license.
215 * See the LICENSE file in the root directory of this source tree.
216 */const p2=G("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"}]]);/**
217 * @license lucide-react v0.344.0 - ISC
218 *
219 * This source code is licensed under the ISC license.
220 * See the LICENSE file in the root directory of this source tree.
221 */const g2=G("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"}]]);/**
222 * @license lucide-react v0.344.0 - ISC
223 *
224 * This source code is licensed under the ISC license.
225 * See the LICENSE file in the root directory of this source tree.
226 */const y2=G("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"}]]);/**
227 * @license lucide-react v0.344.0 - ISC
228 *
229 * This source code is licensed under the ISC license.
230 * See the LICENSE file in the root directory of this source tree.
231 */const v2=G("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
232 * @license lucide-react v0.344.0 - ISC
233 *
234 * This source code is licensed under the ISC license.
235 * See the LICENSE file in the root directory of this source tree.
236 */const x2=G("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
237 * @license lucide-react v0.344.0 - ISC
238 *
239 * This source code is licensed under the ISC license.
240 * See the LICENSE file in the root directory of this source tree.
241 */const b2=G("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"}]]);/**
242 * @license lucide-react v0.344.0 - ISC
243 *
244 * This source code is licensed under the ISC license.
245 * See the LICENSE file in the root directory of this source tree.
246 */const w2=G("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.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/**
247 * @license lucide-react v0.344.0 - ISC
248 *
249 * This source code is licensed under the ISC license.
250 * See the LICENSE file in the root directory of this source tree.
251 */const _2=G("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"}]]);/**
252 * @license lucide-react v0.344.0 - ISC
253 *
254 * This source code is licensed under the ISC license.
255 * See the LICENSE file in the root directory of this source tree.
256 */const gg=G("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
256],["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"}]]);/**
257 * @license lucide-react v0.344.0 - ISC
258 *
259 * This source code is licensed under the ISC license.
260 * See the LICENSE file in the root directory of this source tree.
261 */const N2=G("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
262 * @license lucide-react v0.344.0 - ISC
263 *
264 * This source code is licensed under the ISC license.
265 * See the LICENSE file in the root directory of this source tree.
266 */const Za=G("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"}]]);/**
267 * @license lucide-react v0.344.0 - ISC
268 *
269 * This source code is licensed under the ISC license.
270 * See the LICENSE file in the root directory of this source tree.
271 */const j2=G("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"}]]);/**
272 * @license lucide-react v0.344.0 - ISC
273 *
274 * This source code is licensed under the ISC license.
275 * See the LICENSE file in the root directory of this source tree.
276 */const k2=G("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
277 * @license lucide-react v0.344.0 - ISC
278 *
279 * This source code is licensed under the ISC license.
280 * See the LICENSE file in the root directory of this source tree.
281 */const Bh=G("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"}]]);/**
282 * @license lucide-react v0.344.0 - ISC
283 *
284 * This source code is licensed under the ISC license.
285 * See the LICENSE file in the root directory of this source tree.
286 */const $t=G("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"}]]);/**
287 * @license lucide-react v0.344.0 - ISC
288 *
289 * This source code is licensed under the ISC license.
290 * See the LICENSE file in the root directory of this source tree.
291 */const Sd=G("Video",[["path",{d:"m22 8-6 4 6 4V8Z",key:"50v9me"}],["rect",{width:"14",height:"12",x:"2",y:"6",rx:"2",ry:"2",key:"1rqjg6"}]]);/**
292 * @license lucide-react v0.344.0 - ISC
293 *
294 * This source code is licensed under the ISC license.
295 * See the LICENSE file in the root directory of this source tree.
296 */const No=G("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
297 * @license lucide-react v0.344.0 - ISC
298 *
299 * This source code is licensed under the ISC license.
300 * See the LICENSE file in the root directory of this source tree.
301 */const km=G("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),S2=[{title:"Home",description:"Empowering Southwest Georgia Communities through education, healthcare, broadband access, and economic development",path:"/",category:"Page",keywords:["home","main","empower","southwest georgia","communities","mission"]},{title:"About Us",description:"Learn about our mission, approach, board of directors, and leadership team",path:"/about",category:"Page",keywords:["about","mission","vision","who we are","organization"]},{title:"Our Mission",description:"Empower SWGA is dedicated to helping underserved citizens through digital literacy, economic development, healthcare, and youth leadership",path:"/about#mission",category:"About",keywords:["mission","purpose","goals","vision","digital literacy","economic development"]},{title:"Board of Directors",description:"Meet our board members including Joyce Barlow, Bobby Jenkins, Karen Johnson, Sandra Willis, and Rodney North",path:"/about#board",category:"About",keywords:["board","directors","leadership","governance","joyce barlow","bobby jenkins"]},{title:"Leadership Team",description:"Our dedicated staff including Tracy Englund, Arelexus Brown, and Scooter Pittman",path:"/about#leadership",category:"About",keywords:["staff","team","employees","leadership","tracy englund","arelexus brown","scooter pittman"]},{title:"Broadband Access",description:"Expanding high-speed internet access to underserved rural communities across Southwest Georgia",path:"/programs#broadband",category:"Programs",keywords:["broadband","internet","connectivity","digital access","wifi","high speed internet"]},{title:"Healthcare Programs",description:"Improving health outcomes through community partnerships, COVID-19 outreach, and the Barbershop Health Initiative",path:"/programs#healthcare",category:"Programs",keywords:["healthcare","health","medical","wellness","covid","vaccine","barbershop"]},{title:"Education Programs",description:"Supporting educational opportunities and developing young leaders through mentorship and skill-building",path:"/programs#education",category:"Programs",keywords:["education","learning","schools","youth","students","mentorship","leadership"]},{title:"Economic Development",description:"Creating opportunities for economic growth, small business support, and Pathways to Progress program",path:"/programs#economic",category:"Programs",keywords:["economic","business","jobs","employment","workforce","pathways to progress","entrepreneurship"]},{title:"Community Building",description:"Strengthening community relationships through Neighbor to Neighbor programs and grassroots organizing",path:"/programs#community",category:"Programs",keywords:["community","neighbors","grassroots","organizing","canvassing","relationships"]},{title:"Digital Equity",description:"Bringing digital knowledge to underserved communities through digital literacy training and technology access",path:"/programs#digital",category:"Programs",keywords:["digital equity","digital literacy","technology","computer skills","training","classes"]},{title:"Digital Literacy Class Form",description:"Register for digital literacy classes with Empower Southwest Georgia",path:"/programs#digital",category:"Forms",keywords:["digital literacy form","class registration","computer class","training signup"]},{title:"Pathways to Progress Form",description:"Complete the Pathways to Progress economic development program form",path:"/programs#economic",category:"Forms",keywords:["pathways to progress","economic form","business development","workforce"]},{title:"Our Impact",description:"See the measurable difference we are making across 15 counties in Southwest Georgia",path:"/impact",category:"Page",keywords:["impact","results","outcomes","statistics","numbers","success"]},{title:"Success Stories",description:"Real stories including COVID-19 vaccine outreach, digital literacy training, and the Barbershop Health Initiative",path:"/impact#stories",category:"Impact",keywords:["stories","testimonials","success","examples","case studies"]},{title:"By the Numbers",description:"15 counties served, 30+ field team members, 250+ families helped, nearly 100 digital literacy participants",path:"/impact#numbers",category:"Impact",keywords:["numbers","statistics","data","metrics","counties","families"]},{title:"Get Involved",description:"Join us in building stronger communities through volunteering, partnerships, or donations",path:"/contact",category:"Page",keywords:["contact","get involved","participate","join","help"]},{title:"Volunteer",description:"Become a volunteer and help strengthen Southwest Georgia communities",path:"/contact#volunteer",category:"Get Involved",keywords:["volunteer","help","contribute","serve","community service"]},{title:"Partner With Us",description:"Partner with Empower Southwest Georgia to maximize community impact",path:"/contact#partner",category:"Get Involved",keywords:["partner","partnership","collaborate","organization","nonprofit"]},{title:"Donate",description:"Support our mission through financial contributions to help underserved communities",path:"/contact#donate",category:"Get Involved",keywords:["donate","contribution","support","give","funding","financial"]},{title:"Local Offices",description:"Find our office locations across Southwest Georgia",path:"/offices",category:"Page",keywords:["offices","locations","addresses","contact","where we are"]},{title:"Community Partners",description:"Georgia Technology Authority, Georgia Rural Health Innovation Center, AmeriCorps, Library Systems, Albany Technical College",path:"/#partners",category:"Partners",keywords:["partners","gta","georgia technology authority","grhic","americorps","library","albany technical college"]},{title:"Neighbor to Neighbor",description:"Our tested network of 30+ canvassers building connections through door knocks and phone canvassing",path:"/about#how-we-work",category:"Programs",keywords:["neighbor to neighbor","n2n","canvassing","door to door","community organizing"]},{title:"Regional Challenges",description:"Addressing public safety, infrastru
301cture, economic development, healthcare access, and workforce challenges",path:"/impact",category:"Impact",keywords:["challenges","problems","issues","public safety","infrastructure","healthcare access"]}],yg=({isMobile:t=!1})=>{const[e,r]=E.useState(""),[n,s]=E.useState([]),[i,a]=E.useState(!1),[l,c]=E.useState(0),u=E.useRef(null),h=E.useRef(null),p=hx();E.useEffect(()=>{const b=_=>{u.current&&!u.current.contains(_.target)&&a(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]),E.useEffect(()=>{if(e.trim().length>0){const b=e.toLowerCase().trim(),g=S2.filter(y=>{const v=y.title.toLowerCase().includes(b),j=y.description.toLowerCase().includes(b),S=y.keywords.some(N=>N.toLowerCase().includes(b));return v||j||S}).map(y=>{let v=0;const j=y.title.toLowerCase(),S=y.description.toLowerCase();return j===b?v+=100:j.startsWith(b)?v+=50:j.includes(b)&&(v+=25),S.includes(b)&&(v+=10),y.keywords.forEach(N=>{N.toLowerCase()===b?v+=30:N.toLowerCase().includes(b)&&(v+=15)}),{...y,score:v}});g.sort((y,v)=>v.score-y.score),s(g.slice(0,8)),a(!0),c(0)}else s([]),a(!1)},[e]);const d=b=>{p(b),r(""),s([]),a(!1)},m=b=>{var _;if(!(!i||n.length===0))switch(b.key){case"ArrowDown":b.preventDefault(),c(g=>g<n.length-1?g+1:g);break;case"ArrowUp":b.preventDefault(),c(g=>g>0?g-1:0);break;case"Enter":b.preventDefault(),n[l]&&d(n[l].path);break;case"Escape":a(!1),(_=h.current)==null||_.blur();break}},x=(b,_)=>{if(!_.trim())return b;const g=new RegExp(`(${_.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return b.split(g).map((v,j)=>g.test(v)?o.jsx("span",{className:"bg-yellow-200 font-semibold",children:v},j):v)};return o.jsxs("div",{ref:u,className:`relative ${t?"w-full":"w-64"}`,children:[o.jsxs("div",{className:"relative",children:[o.jsx(x2,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400",size:20}),o.jsx("input",{ref:h,type:"text",value:e,onChange:b=>r(b.target.value),onKeyDown:m,placeholder:"Search...",className:"w-full pl-10 pr-10 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"}),e&&o.jsx("button",{onClick:()=>{r(""),s([]),a(!1)},className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",children:o.jsx(km,{size:16})})]}),i&&n.length>0&&o.jsx("div",{className:"absolute top-full mt-2 w-full bg-white rounded-lg shadow-xl border border-gray-200 max-h-96 overflow-y-auto z-50",children:o.jsx("div",{className:"py-2",children:n.map((b,_)=>o.jsx("button",{onClick:()=>d(b.path),onMouseEnter:()=>c(_),className:`w-full text-left px-4 py-3 transition-colors duration-150 ${l===_?"bg-blue-50 border-l-4 border-blue-600":"hover:bg-gray-50 border-l-4 border-transparent"}`,children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"font-semibold text-gray-900 text-sm mb-1",children:x(b.title,e)}),o.jsx("div",{className:"text-xs text-gray-600 line-clamp-2",children:x(b.description,e)})]}),o.jsx("span",{className:"ml-2 text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded whitespace-nowrap",children:b.category})]})},`${b.path}-${_}`))})}),i&&e.trim().length>0&&n.length===0&&o.jsx("div",{className:"absolute top-full mt-2 w-full bg-white rounded-lg shadow-xl border border-gray-200 p-4 z-50",children:o.jsxs("p",{className:"text-sm text-gray-600 text-center",children:['No results found for "',e,'"']})})]})},E2=()=>{const[t,e]=E.useState(!1),[r,n]=E.useState(null),[s,i]=E.useState(null),a=Qr(),l=[{name:"About",path:"/about",dropdown:[{name:"Mission",path:"/about#mission"},{name:"How We Work",path:"/about#how-we-work"},{name:"Board of Directors",path:"/about#board"},{name:"Leadership",path:"/about#leadership"},{name:"Local Offices",path:"/offices"}]},{name:"Programs",path:"/programs",dropdown:[{name:"Broadband Access",path:"/programs#broadband"},{name:"Healthcare",path:"/programs#healthcare"},{name:"Economic Development",path:"/programs#economic"},{name:"Education",path:"/programs#education"},{name:"Community Building",path:"/programs#community"},{name:"Digital Equity",path:"/programs#digital"}]},{name:"Impact",path:"/impact",dropdown:[{name:"Stories",path:"/impact#stories"},{name:"By the Numbers",path:"/impact#numbers"},{name:"Annual Reports",path:"/impact#reports"}]},{name:"News & Events",path:"/news"},{name:"Get Involved",path:"/contact",dropdown:[{name:"Partner With Us",path:"/contact#partner"},{name:"Volunteer",path:"/contact#volunteer"},{name:"Donate",path:"https://donate.stripe.com/3cI9AS1Up60b6fj05j8EM00",external:!0}]}];return o.jsx("header",{className:"bg-white shadow-lg sticky top-0 z-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"flex justify-between items-center py-4",children:[o.jsxs(re,{to:"/",className:"flex items-center space-x-3",children:[o.jsx("img",{src:"/images/logosw.png",alt:"Empower Southwest Georgia Logo",className:"w-12 h-12 object-contain"}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Empower Southwest Georgia"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Building Stronger Communities"})]})]}),o.jsxs("div",{className:"hidden lg:flex items-center space-x-6",children:[o.jsx("nav",{className:"flex space-x-8",children:l.map(c=>o.jsxs("div",{className:"relative",onMouseEnter:()=>{s&&(clearTimeout(s),i(null)),n(c.name)},onMouseLeave:()=>{const u=setTimeout(()=>{n(null)},300);i(u)},children:[o.jsxs(re,{to:c.path,className:`flex items-center space-x-1 px-3 py-2 text-sm font-medium transition-colors duration-200 ${a.pathname===c.path?"text-blue-700 border-b-2 border-blue-700":"text-gray-700 hover:text-blue-700"}`,children:[o.jsx("span",{children:c.name}),c.dropdown&&o.jsx(r2,{size:16})]}),c.dropdown&&r===c.name&&o.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white rounded-lg shadow-xl border border-gray-200 py-2 z-50",onMouseEnter:()=>{s&&(clearTimeout(s),i(null))},onMouseLeave:()=>{const u=setTimeout(()=>{n(null)},300);i(u)},children:c.dropdown.map(u=>u.external?o.jsx("a",{href:u.path,target:"_blank",rel:"noopener noreferrer",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-blue-700 transition-colors duration-200",children:u.name},u.name):o.jsx(re,{to:u.path,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-blue-700 transition-colors duration-200",children:u.name},u.name))})]},c.name))}),o.jsx(yg,{})]}),o.jsx("button",{onClick:()=>e(!t),className:"lg:hidden p-2 rounded-md text-gray-700 hover:text-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:t?o.jsx(km,{size:24}):o.jsx(m2,{size:24})})]}),t&&o.jsxs("div",{className:"lg:hidden border-t border-gray-200 py-4 max-h-[calc(100vh-5rem)] overflow-y-auto",children:[o.jsx("div",{className:"px-3 mb-4",children:o.jsx(yg,{isMobile:!0})}),o.jsx("nav",{className:"space-y-2 pb-4",children:l.map(c=>o.jsxs("div",{children:[o.jsx(re,{to:c.path,className:"block px-3 py-2 text-base font-medium text-gray-700 hover:text-blue-700 hover:bg-gray-50 rounded-md transition-colors duration-200",onClick:()=>e(!1),children:c.name}),c.dropdown&&o.jsx("div",{className:"ml-4 space-y-1",children:c.dropdown.map(u=>u.external?o.jsx("a",{href:u.path,target:"_blank",rel:"noopener noreferrer",className:"block px-3 py-2 text-sm text-gray-600 hover:text-blue-700 hover:bg-gray-50 rounded-md transition-colors duration-200",onClick:()=>e(!1),children:u.name},u.name):o.jsx(re,{to:u.path,className:"block px-3 py-2 text-sm text-gray-600 hover:text-blue-700 hover:bg-gray-50 rounded-md transition-colors duration-200",onClick:()=>e(!1),children:u.name},u.name))})]},c.name))})]})]})})},T2=()=>o.jsx("footer",{className:"bg-gray-900 text-white",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:[o.jsxs("div",{className:"col-span-1 lg:col-span-2",children:[o.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[o.jsx("img",{src:"/images/logosw.png",alt:"Empower Southwest Georgia Logo",className:"w-10 h-10 object-contain"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xl font-bold",children:"Empower Southwest Georgia"}),o.jsx("p",{className:"text-gray-400 text-sm",children:"Building Stronger Communities"})]})]}),o.jsx("p",{className:"text-gray-300 mb-4 max-w-md",children:"Working to help underserved citizens of rural Southwest Georgia improve their social and personal well-being through education, healthcare, broadband access, and economic development."}),o.jsxs("div",{className:"flex space-x-4",children:[o.jsx("a",{href:"https://www.facebook.com/p/Empower-Southwest-Georgia-ESWGA-100092611974170/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-400 transition-colors duration-200",children:o.jsx(jx,{size:20})}),o.jsx("a",{href:"mailto:[email protected]",className:"text-gray-400 hover:text-blue-400 transition-colors duration-200",children:o.jsx(Sn,{size:20})})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-lg font-semibold mb-4",children:"Qu
301ick Links"}),o.jsxs("ul",{className:"space-y-2",children:[o.jsx("li",{children:o.jsx(re,{to:"/about",className:"text-gray-300 hover:text-white transition-colors duration-200",children:"About Us"})}),o.jsx("li",{children:o.jsx(re,{to:"/programs",className:"text-gray-300 hover:text-white transition-colors duration-200",children:"Program Areas"})}),o.jsx("li",{children:o.jsx(re,{to:"/impact",className:"text-gray-300 hover:text-white transition-colors duration-200",children:"Impact"})}),o.jsx("li",{children:o.jsx(re,{to:"/resources",className:"text-gray-300 hover:text-white transition-colors duration-200",children:"Resources"})}),o.jsx("li",{children:o.jsx(re,{to:"/news",className:"text-gray-300 hover:text-white transition-colors duration-200",children:"News & Events"})})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-lg font-semibold mb-4",children:"Contact"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-start space-x-2",children:[o.jsx(Ri,{size:16,className:"text-gray-400 mt-1 flex-shrink-0"}),o.jsxs("div",{className:"text-gray-300 text-sm",children:[o.jsx("p",{children:"PO Box 481"}),o.jsx("p",{children:"Cuthbert, GA 39840"})]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Sn,{size:16,className:"text-gray-400 flex-shrink-0"}),o.jsx("a",{href:"mailto:[email protected]",className:"text-gray-300 text-sm hover:text-white transition-colors duration-200",children:"[email protected]"})]})]}),o.jsx("div",{className:"mt-6",children:o.jsx("a",{href:"https://donate.stripe.com/3cI9AS1Up60b6fj05j8EM00",target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-orange-600 hover:bg-orange-700 text-white px-6 py-2 rounded-lg font-semibold transition-colors duration-200",children:"Donate Now"})})]})]}),o.jsxs("div",{className:"border-t border-gray-800 mt-8 pt-8",children:[o.jsx("h4",{className:"text-lg font-semibold mb-3",children:"Service Area"}),o.jsx("p",{className:"text-gray-300 text-sm",children:"Serving Southwest Georgia counties: Baker, Calhoun, Chattahoochee, Clay, Dougherty, Early, Marion, Miller, Quitman, Randolph, Schley, Stewart, Sumter, Terrell, and Webster."})]}),o.jsxs("div",{className:"border-t border-gray-800 mt-8 pt-8 flex flex-col sm:flex-row justify-between items-center",children:[o.jsx("p",{className:"text-gray-400 text-sm",children:"© 2026 Empower Southwest Georgia. All rights reserved. 501(c)(3) Tax Exempt Organization"}),o.jsxs("div",{className:"flex space-x-6 mt-4 sm:mt-0",children:[o.jsx(re,{to:"/privacy",className:"text-gray-400 text-sm hover:text-white transition-colors duration-200",children:"Privacy Policy"}),o.jsx(re,{to:"/terms",className:"text-gray-400 text-sm hover:text-white transition-colors duration-200",children:"Terms of Service"})]})]})]})}),C2=()=>{const t=["/images/carousel/empowerswc0.jpeg","/images/carousel/empowerswc4.jpeg","/images/carousel/empowerswc5.jpeg","/images/carousel/empowerswc6.jpeg"],[e,r]=E.useState(0);return E.useEffect(()=>{const n=setInterval(()=>{r(s=>(s+1)%t.length)},5e3);return()=>clearInterval(n)},[t.length]),o.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[t.map((n,s)=>o.jsxs("div",{className:`absolute inset-0 transition-opacity duration-1000 ease-in-out ${s===e?"opacity-100":"opacity-0"}`,children:[o.jsx("img",{src:n,alt:`Empower Southwest Georgia Community ${s+1}`,className:"w-full h-full object-cover object-center"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/70 via-black/50 to-black/40"})]},s)),o.jsx("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 flex space-x-2",children:t.map((n,s)=>o.jsx("button",{onClick:()=>r(s),className:`w-3 h-3 rounded-full transition-all duration-300 ${s===e?"bg-white scale-110":"bg-white/50 hover:bg-white/75"}`,"aria-label":`Go to slide ${s+1}`},s))})]})};function A2({quotes:t,title:e="What People Are Saying",prevLabel:r="Previous quote",nextLabel:n="Next quote",className:s=""}){const[i,a]=E.useState(0),l=E.useId(),c=E.useRef(null),u=E.useRef([]),h=E.useRef(null),p=E.useRef(null),d=E.useMemo(()=>t.map(N=>"data"in N?N.data:{text:N.text,author:N.author,role:N.role}),[t]),m=N=>{u.current.forEach((T,A)=>{T&&(T.classList.toggle("opacity-100",A===N),T.classList.toggle("opacity-0",A!==N),T.classList.toggle("pointer-events-auto",A===N),T.classList.toggle("pointer-events-none",A!==N))})},x=()=>{const N=h.current,T=u.current.filter(Boolean);if(!N||T.length===0)return;const A=T.map(U=>U.offsetHeight||0),P=Math.max(0,...A);P>0&&(N.style.minHeight=`${P}px`)},b=N=>{const T=d.length,A=(N%T+T)%T;a(A)},_=()=>b(i+1),g=()=>b(i-1),y=()=>{v(),p.current=window.setInterval(()=>{a(N=>((N+1)%d.length+d.length)%d.length)},8e3)},v=()=>{p.current&&(window.clearInterval(p.current),p.current=null)},j=()=>{v(),y()};E.useEffect(()=>{m(i),x()},[i,d.length]),E.useEffect(()=>{const N=window.setTimeout(()=>{m(0),x(),y()},100),T=()=>x();return window.addEventListener("resize",T),()=>{window.clearTimeout(N),window.removeEventListener("resize",T),v()}},[d.length]),u.current=[];const S=(N,T)=>{N&&(u.current[T]=N)};return d.length?o.jsxs("section",{ref:c,className:`py-16 md:py-20 bg-white overflow-hidden ${s}`,"data-quotes-root":l,children:[o.jsx("div",{className:"max-w-6xl mx-auto px-4 md:px-6",children:o.jsx("div",{className:"relative",children:o.jsxs("div",{className:"relative z-10",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-6",children:e}),o.jsx("div",{className:"w-20 h-1 bg-accent-pink-400 mx-auto"})]}),o.jsx("div",{className:"relative w-full mb-12 md:mb-8",children:o.jsx("div",{ref:h,className:"quotes-carousel relative w-full z-10 min-h-[240px] md:min-
301h-[320px]","aria-live":"polite",children:d.map((N,T)=>o.jsx("div",{ref:A=>S(A,T),"data-index":T,className:`quote-slide absolute inset-0 z-20 flex items-center justify-center ${T===0?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,children:o.jsxs("blockquote",{className:"text-center",children:[o.jsxs("p",{className:"text-xl md:text-2xl italic font-serif text-black mb-6 max-w-3xl mx-auto",children:["“",N.text,"”"]}),o.jsxs("footer",{className:"flex flex-col items-center",children:[o.jsx("cite",{className:"not-italic font-medium text-lg text-black",children:N.author}),N.role?o.jsx("span",{className:"text-neutral-600 text-sm mt-1",children:N.role}):null]})]})},T))})}),o.jsxs("div",{className:"flex justify-center gap-2",children:[o.jsx("button",{type:"button","aria-label":r,className:"prev-button p-2 border-2 border-secondary-500 text-secondary-600 hover:bg-secondary-500 hover:text-white transition-all duration-200 rounded-lg",onClick:()=>{g(),j()},children:o.jsx(n2,{className:"h-5 w-5"})}),o.jsx("button",{type:"button","aria-label":n,className:"next-button p-2 border-2 border-secondary-500 text-secondary-600 hover:bg-secondary-500 hover:text-white transition-all duration-200 rounded-lg",onClick:()=>{_(),j()},children:o.jsx(s2,{className:"h-5 w-5"})})]})]})})}),o.jsx("style",{children:`
302        .quote-slide {
303          transition: opacity 0.8s ease-in-out;
304        }
305      `})]}):null}const O2=()=>{const t=[{number:"15",label:"Counties Served",icon:bx},{number:"30+",label:"Field Team Members",icon:$t},{number:"250+",label:"Families Helped",icon:Wr},{number:"6",label:"Core Programs",icon:Za}],e=[{title:"Broadband Access",description:"Expanding high-speed internet access to underserved rural communities across Southwest Georgia.",icon:No,color:"bg-blue-100 text-blue-700"},{title:"Healthcare",description:"Improving health outcomes through community partnerships and innovative wellness programs.",icon:Wr,color:"bg-green-100 text-green-700"},{title:"Education",description:"Supporting educational opportunities and developing young leaders in our communities.",icon:jm,color:"bg-purple-100 text-purple-700"},{title:"Economic Development",description:"Creating opportunities for economic growth and prosperity in rural Southwest Georgia.",icon:Za,color:"bg-orange-100 text-orange-700"}],r=[{name:"Georgia Technology Authority",description:"Partnership for digital literacy training and broadband expansion initiatives",website:"https://gta.georgia.gov",logo:"images/logo2.png"},{name:"Georgia Rural Health Innovation Center",description:"Collaborative health programs including the Barbershop & Beauty Shop Health Initiative",website:"https://www.georgiaruralhealth.org",logo:"/images/grural.png"},{name:"AmeriCorps",description:"Providing fellows to support community organizing and program development",website:"https://americorps.gov",logo:"/images/americorp.jpeg"},{name:"Georgia Public Library Service",description:"Partnership for digital literacy training and community resource access",website:"https://georgialibraries.org",logo:"/images/core_programs_library.png"},{name:"Albany Technical College",description:"Educational partnership for workforce development and technical training programs",website:"https://www.albanytech.edu",logo:"/images/core_programs_albanytechedu_logo.jpg"}],n=[{data:{text:"Taking the digital literacy class with ESWGA has truly been life-changing for me. I’ve gained the skills to use technology with confidence, from online communication to everyday tasks that make life easier. The gift of a laptop has been such a blessing here in rural SWGA, giving me access to resources and opportunities I never had before. I’m so grateful to ESWGA for investing in my growth and opening doors for my future connections and even more learning opportunities.",author:" Elaine Nealy",role:"Preston GA"}},{data:{text:"The class was helpful in going over parts of the computer. It reinforced skills I needed to refresh and improved skills I didn’t know needed improvement.",author:"Sammie Jenkins",role:"Retired Teacher, Dawson, GA"}}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsxs("section",{className:"relative text-white min-h-[600px] md:h-[80vh] flex items-center",children:[o.jsx(C2,{}),o.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-24",children:o.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[o.jsxs("div",{className:"text-center lg:text-left",children:[o.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold mb-4 md:mb-6",children:["Empowering ",o.jsx("span",{className:"text-blue-200",children:"Southwest Georgia"})," Communities"]}),o.jsx("p",{className:"text-base sm:text-lg md:text-xl lg:text-2xl mb-6 md:mb-8 text-gray-100",children:"Working to help underserved citizens of rural Southwest Georgia improve their social and personal well-being through education, healthcare, broadband access, and economic development."}),o.jsxs("div",{className:"flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4 justify-center lg:justify-start",children:[o.jsxs(re,{to:"/about",className:"inline-flex items-center justify-center px-6 md:px-8 py-3 border border-transparent text-sm md:text-base font-medium rounded-lg text-blue-700 bg-white hover:bg-gray-50 transition-all duration-200 shadow-lg hover:shadow-xl",children:["Learn More",o.jsx(Pr,{className:"ml-2",size:20})]}),o.jsx("a",{href:"https://donate.stripe.com/3cI9AS1Up60b6fj05j8EM00",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-6 md:px-8 py-3 border-2 border-white text-sm md:text-base font-medium rounded-lg text-white hover:bg-white hover:text-blue-700 transition-all duration-200 shadow-lg hover:shadow-xl",children:"Donate Now"})]})]}),o.jsx("div",{className:"flex justify-center lg:justify-end order-first lg:order-last",children:o.jsx("div",{className:"hero-logo-animation",children:o.jsx("img",{src:"/images/logosw.png",alt:"Empower Southwest Georgia Logo",className:"w-48 h-48 sm:w-64 sm:h-64 lg:w-80 lg:h-80 object-contain drop-shadow-lg"})})})]})})]}),o.jsx("section",{className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Our Impact"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Making a difference in S
305outhwest Georgia through community-driven initiatives and partnerships."})]}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8",children:t.map((s,i)=>{const a=s.icon;return o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-blue-700 text-white rounded-xl mb-4",children:o.jsx(a,{size:28})}),o.jsx("div",{className:"text-3xl font-bold text-gray-900 mb-2",children:s.number}),o.jsx("div",{className:"text-gray-600 font-medium",children:s.label})]},i)})})]})}),o.jsx("section",{className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Our Program Areas"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"We focus on key areas that have the greatest impact on community well-being and development."})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:e.map((s,i)=>{const a=s.icon;return o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[o.jsx("div",{className:`inline-flex items-center justify-center w-14 h-14 ${s.color} rounded-xl mb-4`,children:o.jsx(a,{size:24})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-3",children:s.title}),o.jsx("p",{className:"text-gray-600 mb-4",children:s.description}),o.jsxs(re,{to:"/programs",className:"inline-flex items-center text-blue-700 hover:text-blue-800 font-medium",children:["Learn more",o.jsx(Pr,{className:"ml-1",size:16})]})]},i)})}),o.jsx("div",{className:"text-center mt-12",children:o.jsxs(re,{to:"/programs",className:"inline-flex items-center px-8 py-3 bg-blue-700 hover:bg-blue-800 text-white font-semibold rounded-lg transition-colors duration-200",children:["View All Programs",o.jsx(Pr,{className:"ml-2",size:20})]})})]})}),o.jsx("section",{className:"py-8",children:o.jsx(A2,{quotes:n,title:"What People Are Saying",prevLabel:"Previous quote",nextLabel:"Next quote"})}),o.jsx("section",{className:"py-16 bg-green-50",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-6",children:"Neighbor to Neighbor Organization"}),o.jsx("p",{className:"text-lg text-gray-700 mb-6",children:"We know we are a stronger community if we know and support our neighbors. Empower SW Georgia operates Neighbor to Neighbor (N2N) programs where we strive to strengthen community relationships."}),o.jsx("p",{className:"text-lg text-gray-700 mb-8",children:"Our tested network of over 30 canvassers in the field are eager to communicate with SW GA residents through door knocks and phone canvassing, building connections that matter."}),o.jsxs(re,{to:"/about",className:"inline-flex items-center px-6 py-3 bg-green-600 hover:bg-green-700 text-white font-semibold rounded-lg transition-colors duration-200",children:["Learn About Our Approach",o.jsx(Pr,{className:"ml-2",size:20})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsx("h3",{className:"text-2xl font-semibold text-gray-900 mb-4",children:"Service Area"}),o.jsx("p",{className:"text-gray-700 mb-4",children:"We serve 15 counties in Southwest Georgia:"}),o.jsx("div",{className:"grid grid-cols-2 gap-2 text-sm text-gray-600",children:["Baker","Calhoun","Chattahoochee","Clay","Dougherty","Early","Marion","Miller","Quitman","Randolph","Schley","Stewart","Sumter","Terrell","Webster"].map(s=>o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"w-2 h-2 bg-green-600 rounded-full mr-2"}),s," County"]},s))})]})]})})}),o.jsx("section",{id:"partners",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Community Partners"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"We believe in partnerships and work closely with organizations across Georgia to maximize our impact"})]}
305),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-5 gap-6",children:r.map((s,i)=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6 text-center flex flex-col",children:[o.jsx("div",{className:"h-20 flex items-center justify-center mb-4",children:o.jsx("img",{src:s.logo,alt:s.name,loading:"lazy",className:"max-h-20 max-w-full object-contain"})}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:s.name}),o.jsx("p",{className:"text-gray-600 text-sm mb-4 flex-grow",children:s.description}),s.website&&s.website!=="#"?o.jsxs("a",{href:s.website,className:"inline-flex items-center justify-center text-blue-600 hover:text-blue-700 font-medium text-sm",target:"_blank",rel:"noopener noreferrer",children:["Visit Website",o.jsx(Ya,{size:14,className:"ml-1"})]}):o.jsxs("span",{className:"text-gray-400 text-sm inline-flex items-center justify-center cursor-not-allowed",children:["Visit Website",o.jsx(Ya,{size:14,className:"ml-1"})]})]},i))})]})}),o.jsx("section",{className:"py-16 bg-blue-700",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[o.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Ready to Make a Difference?"}),o.jsx("p",{className:"text-xl text-blue-100 mb-8 max-w-2xl mx-auto",children:"Join us in building stronger communities across Southwest Georgia. Your support and contributions help us meet our goals and improve conditions for everyone."}),o.jsxs("div",{className:"flex flex-col sm:flex-row justify-center space-y-4 sm:space-y-0 sm:space-x-4",children:[o.jsxs(re,{to:"/contact#volunteer",className:"inline-flex items-center px-8 py-3 bg-white text-blue-700 font-semibold rounded-lg hover:bg-gray-50 transition-colors duration-200",children:["Get Involved",o.jsx(Pr,{className:"ml-2",size:20})]}),o.jsx("a",{href:"https://donate.stripe.com/3cI9AS1Up60b6fj05j8EM00",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-8 py-3 border-2 border-white text-white font-semibold rounded-lg hover:bg-white hover:text-blue-700 transition-colors duration-200",children:"Donate Today"})]})]})})]})},R2=()=>{const t=[{name:"Joyce Barlow, RN",title:"Chairwoman",bio:"Former candidate for GA State Representative House District 151, Registered Nurse, Small Business Owner and 2022 Inaugural Georgia Nursing Hall of Fame Inductee.",image:"/images/joyce.jpg"},{name:"Bobby Jenkins",title:"Treasurer",bio:"Currently serves as Mayor of the City of Cuthbert. Retired school superintendent and president of the Randolph County Retired Educators.",image:"/images/bobby.jpg"},{name:"Karen Johnson",title:"Board Member",bio:"Native of Cuthbert and retired elementary school media specialist. Former member of the Cuthbert City Council.",image:"/images/sandra.jpg"},{name:"Sandra Willis",title:"Board Member",bio:"Native of Cuthbert and serves as Mayor Pro-tem of the Cuthbert City Council. Retired educator and past president of the Randolph County Retired Educators Association.",image:"/images/karen.jpg"},{name:"Rodney North",title:"Board Member",bio:"Business management consultant specializing in nonprofit and social enterprises, cooperatives and employee-owned businesses."}],e=[{name:"Tracy Englund",title:"Program Manager",location:"Cuthbert, GA",bio:"Supervises the field team, develops and implements programs, writes proposals, and raises funds. Backgroun
305d in event management and historic preservation.",image:"/images/tracy.jpg"},{name:"Arelexus Brown",title:"Communications Manager",location:"Albany, GA",bio:"Recent college graduate with a BA in Journalism, managing communications and community outreach.",image:"/images/arelexus.jpg"},{name:"Scooter Pittman",title:"AmeriCorps Fellow",location:"Dawson, GA",bio:"Leads the field team and develops programs. Passionate about justice in Southwest Georgia.",image:"/images/scooter.jpg"}],r=[{name:"Rev Bobbi Boynton",title:"Advisor",bio:"Ordained minister serving on the ministerial staff of the Church of Peace, Cusseta, Georgia. Health reporter for the GA Rural Health Innovation Center."},{name:"Thomas Brown",title:"Advisor",bio:"Retired school teacher, minister, and activist with extensive experience in voter empowerment and community organizing."},{name:"Ed Cook",title:"Advisor",bio:"Retired educator with decades of experience in managing electoral and community campaigns. Social justice and civil rights activist."}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"About Empower Southwest Georgia"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Building stronger communities through collaborative partnerships and community-driven initiatives"})]})})}),o.jsx("section",{id:"mission",className:"py-16",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-blue-700 text-white rounded-xl mb-6",children:o.jsx(_2,{size:32})}),o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-6",children:"Our Mission"}),o.jsx("p",{className:"text-xl text-gray-700 max-w-4xl mx-auto leading-relaxed",children:"Empower SWGA is dedicated to helping the underserved citizens of rural Southwest Georgia by promoting digital literacy and skill development, stimulating local economies by encouraging entrepreneurship and supporting small businesses, enhancing healthcare opportunities and community well-being, and fostering community engagement and youth leadership."})]})})}),o.jsx("section",{id:"how-we-work",className:"py-16 bg-gray-50",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[o.jsxs("div",{children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-green-600 text-white rounded-xl mb-6",children:o.jsx(Wr,{size:32})}),o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-6",children:"Neighbor to Neighbor Approach"}),o.jsx("p",{className:"text-lg text-gray-700 mb-6",children:"We know we are a stronger community if we know and support our neighbors. Empower SW Georgia operates Neighbor to Neighbor (N2N) programs where we strive to strengthen community relationships."}),o.jsx("p",{className:"text-lg text-gray-700",children:"Our tested network of over 30 canvassers in the field are eager to communicate with SW GA residents through door knocks and phone canvassing, building the connections that create lasting change."})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsx("h3",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Current Initiatives"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full mt-2"}),o.jsx("p",{className:"text-gray-700",children:"Digital Literacy Courses"})]}),o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full mt-2"}),o.jsx("p",{className:"text-gray-700",children:"Georgia Rural Health Innovation"})]}),o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full mt-2"}),o.jsx("p",{className:"text-gray-700",children:"Local Public Health Assistance"})]}),o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full mt-2"}),o.jsx("p",{className:"text-gray-700",children:"Library System Integrations"})]}),o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full mt-2"}),o.jsx("p",{className:"text-gray-700",children:"Supporting AmeriCorps Partners"})]})]})]})]})})}),o.jsx("section",{id:"board",className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-purple-600 text-white rounded-xl mb-6",children:o.jsx(t2,{size:32})}),o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Board of Directors"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Our board is comprised of Southwest Georgia community leaders committed to positive change."})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((n,s)=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[n.image?o.jsx("div",{className:"w-16 h-16 rounded-full bg-center bg-cover mb-4",style:{backgroundImage:`url(${n.image})`}}):o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:o.jsx("span",{className:"text-blue-700 font-bold text-xl",children:n.name.charAt(0)})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:n.name}),o.jsx("p",{className:"text-blue-600 font-medium mb-3",children:n.title}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:n.bio})]},s))})]})}),o.jsx("section",{id:"leadership",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-orange-600 text-white rounded-xl mb-6",children:o.jsx($t,{size:32})}),o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Leadership Team"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Meet the dedicated professionals who lead our day-to-day operations and program implementation."})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8 mb-16",children:e.map((n,s)=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[n.image?o.jsx("div",{className:"w-16 h-16 rounded-full bg-center bg-cover mb-4",style:{backgroundImage:`url(${n.image})`}}):o.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:o.jsx("span",{className:"text-green-700 font-bold text-xl",children:n.name.charAt(0)})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:n.name}),o.jsx("p",{className:"text-green-600 font-medium mb-1",children:n.title}),o.jsx("p",{className:"text-gray-500 text-sm mb-3",children:n.location}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:n.bio})]},s))}),o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Adv
305isory Team"}),o.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:"Our advisors bring decades of experience in education, technology, healthcare, and community organizing."})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:r.map((n,s)=>o.jsxs("div",{className:"bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 p-6",children:[o.jsx("div",{className:"w-12 h-12 bg-gray-100 rounded-full flex items-center justify-center mb-3",children:o.jsx("span",{className:"text-gray-700 font-bold",children:n.name.charAt(0)})}),o.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-1",children:n.name}),o.jsx("p",{className:"text-blue-600 text-sm font-medium mb-2",children:n.title}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:n.bio})]},s))})]})})]})},L2=()=>{const t=[{id:"broadband",title:"Broadband Access",icon:No,color:"bg-blue-600",description:"Southwest GA ranks the lowest area in Georgia for broadband access. Internet access impacts every aspect of life: Education, Healthcare, Jobs, and Economic Development.",details:["Digital Literacy training programs in partnership with Georgia Technology Authority","Community broadband expansion planning","Working with various library systems to provide digital access","Gateway skills training to build user confidence"],image:"/images/broadband_access.png"},{id:"healthcare",title:"Healthcare",icon:Wr,color:"bg-green-600",description:"Several SW Georgia counties rank lowest in the state for health outcomes. We work to improve community health through innovative partnerships and programs.",details:["COVID-19 vaccine outreach and clinic partnerships","Barbershop & Beauty Shop Health Initiative","Partnerships with local public health departments","Health promotion in community-centered locations"],image:"/images/healthcare_and_covid_19_impact.webp"},{id:"education",title:"Education",icon:jm,color:"bg-purple-600",description:"Supporting educational opportunities and developing young leaders through mentorship and skill-building programs.",details:["Youth leadership development programs","Educational partnerships with local institutions","Mentorship and career guidance","Scholarship and educational support initiatives"],image:"/images/education.jpeg"},{id:"economic",title:"Economic Development",icon:Za,color:"bg-orange-600",description:"Creating opportunities for economic growth and prosperity in rural Southwest Georgia through strategic partnerships and initiatives.",details:["Small business support and development","Job creation and workforce development","Partnership with organizations like Land O'Lakes Inc.","Pathways to Progress","Rural economic development planning"],image:"/images/economic_dev_photo.jpg",formUrl:"https://docs.google.com/forms/d/e/1FAIpQLSe1nRzNDsVnqp3285KZLDG6zFVRuoeXdF9tFOaR-VfK9sLpsQ/viewform",formLabel:"Complete Pathways to Progress Form"},{id:"community",title:"Community Building",icon:$t,color:"bg-indigo-600",description:"Strengthening community relationships through our Neighbor to Neighbor programs and grassroots organizing.",details:["Door-to-door community canvassing","Neighbor to Neighbor relationship building","Community event planning and coordination","Volunteer network development and training"],image:"/images/community_building.jpeg"},{id:"digital",title:"Digital Equity",icon:i2,color:"bg-teal-600",description:"Bringing digital knowledge to previously underserved communities through comprehensive training and support programs.",details:["Digital Literacy Class with Empower Southwest Georgia Assessment","Partnership with Georgia Technology Authority","Library system collaboration","Technology access and support programs"],image:"/images/digital_equity.jpg",formUrl:"https://docs.google.com/forms/d/e/1FAIpQLSdqrOasHe38JWc4AE-QJYQWqI-e90MFcqVTgLJMH1e4R2YxkQ/viewform",formLabel:"Complete Digital Literacy Class Form"}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"Our Program Areas"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Comprehensive initiatives addressing the most critical needs in Southwest Georgia communities"})]})})}),o.jsx("section",{className:"py-16",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"space-y-16",children:t.map((e,r)=>{const n=e.icon,s=r%2===0;return o.jsxs("div",{id:e.id,className:`grid lg:grid-cols-2 gap-12 items-center ${s?"":"lg:flex-row-reverse"}`,children:[o.jsxs("div",{className:`${s?"":"lg:order-2"}`,children:[o.jsx("div",{className:`inline-flex items-center justify-center w-16 h-16 ${e.color} text-white rounded-xl mb-6`,children:o.jsx(n,{size:32})}),o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:e.title}),o.jsx("p",{className:"text-lg text-gray-700 mb-6",children:e.description}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"Key Initiatives:"}),o.jsx("ul",{className:"space-y-2",children:e.details.map((i,a)=>o.jsxs("li",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:`w-2 h-2 ${e.color} rounded-full mt-2 flex-shrink-0`}),o.jsx("p",{className:"text-gray-700",children:i})]},a))})]}),e.formUrl&&o.jsx("div",{className:"mt-6",children:o.jsxs("a",{href:e.formUrl,target:"_blank",rel:"noopener noreferrer",className:`inline-flex items-center px-6 py-3 ${e.color} hover:opacity-90 text-white font-semibold rounded-lg transition-all duration-200 shadow-md hover:shadow-lg`,children:[e.formLabel,o.jsx(Ya,{className:"ml-2",size:18})]})})]}),o.jsx("div",{className:`${s?"":"lg:order-1"}`,children:o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:e.image,alt:e.title,className:"w-full h-96 object-cover rounded-xl shadow-lg"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 to-transparent roun
305ded-xl"})]})})]},e.id)})})})}),o.jsx("section",{className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Get Involved in Our Programs"}),o.jsx("p",{className:"text-xl text-gray-600 mb-8 max-w-2xl mx-auto",children:"Whether you're looking to volunteer, partner with us, or learn more about our initiatives, we'd love to hear from you."}),o.jsxs("div",{className:"flex flex-col sm:flex-row justify-center space-y-4 sm:space-y-0 sm:space-x-4",children:[o.jsx("a",{href:"/contact#volunteer",className:"inline-flex items-center px-8 py-3 bg-blue-700 hover:bg-blue-800 text-white font-semibold rounded-lg transition-colors duration-200",children:"Volunteer With Us"}),o.jsx("a",{href:"/contact#partner",className:"inline-flex items-center px-8 py-3 border-2 border-blue-700 text-blue-700 hover:bg-blue-700 hover:text-white font-semibold rounded-lg transition-colors duration-200",children:"Partner With Us"})]})]})})]})},I2=()=>{const t=[{number:"15",label:"Counties Served",icon:pg,color:"text-blue-600"},{number:"30+",label:"Field Team Members",icon:$t,color:"text-green-600"},{number:"250+",label:"Families Helped",icon:Wr,color:"text-red-600"},{number:"80+",label:"Men Attended Health Event",icon:$t,color:"text-purple-600"},{number:"6",label:"Core Programs",icon:Za,color:"text-orange-600"},{number:"Nearly 100",label:"Digital Literacy Participants",icon:No,color:"text-indigo-600"}],e=[{title:"COVID-19 Vaccine Outreach Success",description:"During the COVID crisis, our volunteers canvassed door-to-door to assist seniors and others in our community with getting appointments for the life-saving COVID vaccine. In April 2021, Dr. Karen Kinsell joined forces with us to hold vaccine clinics and visit homebound neighbors.",impact:"Over 500 residents received vaccination assistance",image:"/images/healthcare_and_covid_19_impact.webp"},{title:"Digital Literacy Training Program",description:"On June 6, members of our field team completed the Digital Literacy training program, joined by Oneish
305a Freeman from the Georgia Technology Authority. These courses offer gateway skills that give users confidence for education, job opportunities, and telehealth.",impact:"Over 100 community members trained in digital skills",image:"/images/empowerlit.jpeg"},{title:"Barbershop Health Initiative",description:'Partnered with the Georgia Rural Health Innovation Center for a "Haircuts & Hams" wellness event at Unique Images Barbershop and Salon in Cuthbert, aimed at bridging the gap in engagement with the male demographic in the county.',impact:"More than 80 men attended the wellness event",image:"https://images.pexels.com/photos/1319460/pexels-photo-1319460.jpeg?auto=compress&cs=tinysrgb&w=800"}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"Our Impact"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Measuring the difference we're making in Southwest Georgia communities through data-driven results and meaningful stories"})]})})}),o.jsx("section",{id:"numbers",className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"By the Numbers"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Our work is making a measurable impact across Southwest Georgia"})]}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-8",children:t.map((r,n)=>{const s=r.icon;return o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-xl mb-4",children:o.jsx(s,{size:28,className:r.color})}),o.jsx("div",{className:"text-3xl font-bold text-gray-900 mb-2",children:r.number}),o.jsx("div",{className:"text-gray-600 font-medium text-sm",children:r.label})]},n)})})]})}),o.jsx("section",{id:"video",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"See Our Work in Action"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Watch how we’re transforming communities through our initiatives"})]}),o.jsx("div",{className:"aspect-video rounded-xl overflow-hidden shadow-lg",children:o.jsx("iframe",{src:"https://www.youtube.com/embed/LVN5UCO6bPg",title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full"})})]})}),o.jsx("section",{id:"stories",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Success Stories"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Real stories from our community showing the impact of our neighbor-to-neighbor approach"})]}),o.jsx("div",{className:"space-y-16",children:e.map((r,n)=>{const s=n%2===0;return o.jsxs("div",{className:`grid lg:grid-cols-2 gap-12 items-center ${s?"":"lg:flex-row-reverse"}`,children:[o.jsxs("div",{className:`${s?"":"lg:order-2"}`,children:[o.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:r.title}),o.jsx("p",{className:"text-lg text-gray-700 mb-6",children:r.description}),o.jsx("div",{className:"bg-blue-50 border-l-4 border-blue-600 p-4 rounded-r-lg",children:o.jsxs("p",{className:"text-blue-800 font-semibold",children:["Impact: ",r.impact]})})]}),o.jsx("div",{className:`${s?"":"lg:order-1"}`,children:o.jsx("img",{src:r.image,alt:r.title,className:"w-full h-80 object-cover rounded-xl shadow-lg"})})]},n)})})]})}),o.jsx("section",{className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Geographic Reach"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Our programs reach across 15 counties in Southwest Georgia"})]}),o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-8",children:o.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Counties Served"}),o.jsx("div",{className:"grid grid-cols-2 gap-3",children:["Baker","Calhoun","Chattahoochee","Clay","Dougherty","Early","Marion","Miller","Quitman","Randolph","Schley","Stewart","Sumter","Terrell","Webster"].map(r=>o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("div",{className:"w-3 h-3 bg-blue-600 rounded-full"}),o.jsxs("span",{className:"text-gray-700",children:[r," County"]})]},r))})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Regional Challenges"}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"bg-red-50 border-l-4 border-red-400 p-4 rounded-r-lg",children:o.jsx("p",{className:"text-red-800 font-medium",children:"Public Safety: Difficulty recruiting and retaining qualified police officers"})}),o.jsx("div",{className:"bg-yellow-50 border-l-4 border-yellow-400 p-4 rounded-r-lg",children:o.jsx("p",{className:"text-yellow-800 font-medium",children:"Infrastru
305cture: Aging water/sewer systems and need for road improvements"})}),o.jsx("div",{className:"bg-blue-50 border-l-4 border-blue-400 p-4 rounded-r-lg",children:o.jsx("p",{className:"text-blue-800 font-medium",children:"Economic Development: Attracting businesses and revitalizing downtowns"})}),o.jsx("div",{className:"bg-purple-50 border-l-4 border-purple-400 p-4 rounded-r-lg",children:o.jsx("p",{className:"text-purple-800 font-medium",children:"Healthcare Access: Lack of providers and need for telehealth solutions"})}),o.jsx("div",{className:"bg-green-50 border-l-4 border-green-400 p-4 rounded-r-lg",children:o.jsx("p",{className:"text-green-800 font-medium",children:"Workforce: Skills gaps and need for work-based learning programs"})})]})]})]})})]})}),o.jsx("section",{id:"reports",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Transparency & Accountability"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"We believe in being transparent about our work and its impact on the community"})]}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:o.jsx(pg,{size:28,className:"text-blue-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Program Evaluation"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Regular assessment of program effectiveness and community impact"})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:o.jsx($t,{size:28,className:"text-green-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Community Feedback"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Direct input from community members guides our program development"})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-orange-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:o.jsx(Za,{size:28,className:"text-orange-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Future Goals"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Strategic planning for expanded programs and deeper community impact"})]})]})]})})]})},P2=()=>{const t=[{title:"Digital Literacy Training Guide",description:"Comprehensive guide for implementing digital literacy programs in rural communities",type:"PDF Guide",icon:kd,downloadUrl:"#"},{title:"Community Health Assessment Toolkit",description:"Tools and resources for conducting community health assessments and planning interventions",type:"Toolkit",icon:jd,downloadUrl:"#"},{title:"Broadband Access Planning Guide",description:"Step-by-step guide for communities to assess and plan broadband infrastructure improvements",type:"PDF Guide",icon:kd,downloadUrl:"#"},{title:"Neighbor-to-Neighbor Organizing Manual",description:"Best practices for implementing grassroots organizing and community engagement strategies",type:"Manual",icon:jd,downloadUrl:"#"}],e=[{title:"Building Digital Equity in Rural Communities",description:"Learn about strategies for expanding digital access and literacy in underserved areas",date:"December 15, 2023",duration:"60 minutes",watchUrl:"#"},{title:"Community Health Partnerships",description:"Exploring innovative partnerships between healthcare providers and community organizations",date:"November 20, 2023",duration:"45 minutes",watchUrl:"#"},{title:"Effective Grassroots Organizing",description:"Techniques for building strong community relationships and mobilizing for change",date:"October 10, 2023",duration:"55 minutes",watchUrl:"#"}],r=[{name:"Georgia Technology Authority",description:"Partnership for digital literacy training and broadband expansion initiatives",website:"https://gta.georgia.gov",logo:"https://images.pexels.com/photos/3184418/pexels-photo-3184418.jpeg?auto=compress&cs=tinysrgb&w=200"},{name:"Georgia Rural Health Innovation Center",description:"Collaborative health programs including the Barbershop & Beauty Shop Health Initiative",website:"https://www.georgiaruralhealth.org",logo:"https://images.pexels.com/photos/5214942/pexels-photo-5214942.jpeg?auto=compress&cs=tinysrgb&w=200"},{name:"AmeriCorps",description:"Providing fellows to support community organizing and program development",website:"https://americorps.gov",logo:"https://images.pexels.com/photos/1181622/pexels-photo-1181622.jpeg?auto=compress&cs=tinysrgb&w=200"},{name:"Local Library Systems",description:"Partnership for digital literacy training and community resource access",website:"#",logo:"https://images.pexels.com/photos/8471831/pexels-photo-8471831.jpeg?auto=compress&cs=tinysrgb&w=200"}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"Resources"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Tools, guides, and resources to support community development and empowerment initiatives"})]})})}),o.jsx("section",{id:"library",className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Resource Library"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Access our collection of guides, toolkits, and educational materials developed through our community work"})]}),o.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-xl flex items-center justify-center mb-4",children:o.jsx(kd,{size:28,className:"text-blue-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Reports & Research"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Community assessments, impact reports, and research f
305indings from our programs"}),o.jsx("button",{className:"text-blue-600 hover:text-blue-700 font-medium",children:"View Reports"})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[o.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-xl flex items-center justify-center mb-4",children:o.jsx(jd,{size:28,className:"text-green-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Best Practice Guides"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Practical guides for implementing community development programs"}),o.jsx("button",{className:"text-green-600 hover:text-green-700 font-medium",children:"Access Guides"})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[o.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-xl flex items-center justify-center mb-4",children:o.jsx(Sd,{size:28,className:"text-purple-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Training Materials"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Video tutorials, training modules, and workshop materials"}),o.jsx("button",{className:"text-purple-600 hover:text-purple-700 font-medium",children:"View Materials"})]})]})]})}),o.jsx("section",{id:"toolkits",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Toolkits & Guides"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Comprehensive resources developed from our experience working in Southwest Georgia communities"})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:t.map((n,s)=>{const i=n.icon;return o.jsx("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:o.jsxs("div",{className:"flex items-start space-x-4",children:[o.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0",children:o.jsx(i,{size:20,className:"text-blue-600"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:n.title}),o.jsx("p",{className:"text-gray-600 mb-3",children:n.description}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:n.type}),o.jsxs("a",{href:n.downloadUrl,className:"inline-flex items-center text-blue-600 hover:text-blue-700 font-medium",children:[o.jsx(Nx,{size:16,className:"mr-1"}),"Download"]})]})]})]})},s)})})]})}),o.jsx("section",{className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Webinars & Training"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Educational webinars and training sessions on community development topics"})]}),o.jsx("div",{className:"space-y-6",children:e.map((n,s)=>o.jsx("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center space-x-4 mb-2",children:[o.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-lg flex items-center justify-center",children:o.jsx(Sd,{size:20,className:"text-red-600"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:n.title}),o.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[o.jsx("span",{children:n.date}),o.jsx("span",{children:"•"}),o.jsx("span",{children:n.duration})]})]})]}),o.jsx("p",{className:"text-gray-600 ml-14",children:n.description})]}),o.jsxs("a",{href:n.watchUrl,className:"ml-6 inline-flex items-center px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors duration-200",children:[o.jsx(Sd,{size:16,className:"mr-2"}),"Watch"]})]})},s))})]})}),o.jsx("section",{id:"partners",className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Community Partners"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"We believe in partnerships and work closely with organizations across Georgia to maximize our impact"})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:r.map((n,s)=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6 text-center",children:[o.jsx("img",{src:n.logo,alt:n.name,className:"w-16 h-16 object-cover rounded-lg mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:n.name}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:n.description}),o.jsxs("a",{href:n.website,className:"inline-flex items-center text-blue-600 hover:text-blue-700 font-medium text-sm",target:"_blank",rel:"noopener noreferrer",children:["Visit Website",o.jsx(Ya,{size:14,className:"ml-1"})]})]},s))})]})}),o.jsx("section",{className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Need Additional Resources?"}),o.jsx("p",{className:"text-xl text-gray-600 mb-8 max-w-2xl mx-auto",children:"Can't find what you're looking for? We're here to help. Contact us for custom resources or additional support."}),o.jsxs("div",{className:"flex flex-col sm:flex-row justify-center space-y-4 sm:sp
305ace-y-0 sm:space-x-4",children:[o.jsx("a",{href:"/contact",className:"inline-flex items-center px-8 py-3 bg-blue-700 hover:bg-blue-800 text-white font-semibold rounded-lg transition-colors duration-200",children:"Contact Us"}),o.jsx("a",{href:"/contact#partner",className:"inline-flex items-center px-8 py-3 border-2 border-blue-700 text-blue-700 hover:bg-blue-700 hover:text-white font-semibold rounded-lg transition-colors duration-200",children:"Become a Partner"})]})]})})]})},$2=()=>{const t=[{name:"Robert Aaron",city:"Dawson",county:"Terrell County"},{name:"Kevin Brown",city:"Buena Vista",county:"Marion County"},{name:"Bobby Jenkins",city:"Cuthbert",county:"Randolph County",description:"Retired school superintendent and serves as president of the Randolph County Retired Educators. He is a deacon in the Pleasant Hill Baptist Church and a member of the Fletcher Henderson Foundation."},{name:"Kenneth Josey",city:"Richland",county:"Stewart County"},{name:"Kenneth Sumpter",city:"Fort Gaines",county:"Clay County",description:"Over 40 years of experience in construction, real estate, and architectural design. Deeply involved in the planning for broadband expansion in SW Georgia."}],e=[{county:"Baker",population:"3,000",keyInitiatives:["Digital Literacy","Healthcare Access"]},{county:"Calhoun",population:"6,500",keyInitiatives:["Broadband Expansion","Economic Development"]},{county:"Chattahoochee",population:"9,500",keyInitiatives:["Community Health","Education"]},{county:"Clay",population:"3,000",keyInitiatives:["Broadband Planning","Rural Development"]},{county:"Dougherty",population:"85,000",keyInitiatives:["Youth Leadership","Digital Equity"]},{county:"Early",population:"10,500",keyInitiatives:["Healthcare","Community Building"]},{county:"Marion",population:"7,500",keyInitiatives:["Education","Economic Development"]},{county:"Miller",population:"6,000",keyInitiatives:["Digital Access","Health Promotion"]},{county:"Quitman",population:"2,300",keyInitiatives:["Community Organizing","Healthcare"]},{county:"Randolph",population:"7,000",keyInitiatives:["Digital Literacy","Health Outreach"]},{county:"Schley",population:"5,000",keyInitiatives:["Broadband Access","Community Health"]},{county:"Stewart",population:"6,000",keyInitiatives:["Economic Development","Education"]},{county:"Sumter",population:"29,000",keyInitiatives:["Youth Programs","Digital Equity"]},{county:"Terrell",population:"9,000",keyInitiatives:["Community Building","Healthcare"]},{county:"Webster",population:"2,300",keyInitiatives:["Rural Development","Digital Access"]}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"Local Offices & Leadership"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Working with local leaders across Southwest Georgia to build stronger communities"})]})})}),o.jsx("section",{className:"py-16",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-6",children:"Main Office"}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsxs("div",{className:"flex items-start space-x-4 mb-6",children:[o.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center",children:o.jsx(Ri,{size:24,className:"text-blue-600"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Empower Southwest Georgia"}),o.jsxs("p",{className:"text-gray-600",children:["PO Box 481",o.jsx("br",{}),"Cuthbert, GA 39840"]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx(Sn,{size:20,className:"text-gray-400"}),o.jsx("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:text-blue-700",children:"[email protected]"})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx($t,{size:20,className:"text-gray-400"}),o.jsx("span",{className:"text-gray-600",children:"30+ Field Team Members"})]})]})]})]}),o.jsx("div",{children:o.jsx("img",{src:"https://images.pexels.com/photos/1181622/pexels-photo-1181622.jpeg?auto=compress&cs=tinysrgb&w=800",alt:"Community meeting",className:"w-full h-80 object-cover rounded-xl shadow-lg"})})]})})}),o.jsx("section",{className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Mayor Advisory Network"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"A network of Southwest Georgia mayors who support and guide our work in their communities"})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((r,n)=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 p-6",children:[o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:o.jsx("span",{className:"text-blue-700 font-bold text-xl",children:r.name.split(" ").map(s=>s[0]).join("")})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-1",children:r.name}),o.jsxs("p",{className:"text-blue-600 font-medium mb-1",children:["Mayor of ",r.city]}),o.jsx("p",{className:"text-gray-500 text-sm mb-3",children:r.county}),r.description&&o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:r.description})]},n))})]})}),o.jsx("section",{className:"py-16",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Service Areas"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Our programs and initiatives reach across 15 counties in Southwest Georgia"})]}),o.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map((r,n)=>o.jsxs("div",{className:"bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-900",children:[r.county," County"]}),o.jsxs("span",{className:"text-sm text-gray-500",children:["Pop: ",r.population]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Key Initiatives:"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:r.keyInitiatives.map((s,i)=>o.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:s},i))})]})]},n))})]})}),o.jsx("section",{className:"py-16 bg-gray-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Field Team Network"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Our tested network of over 30 canvassers in the field are eager to communicate with SW GA residents"})]}),o.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[o.jsx("div",{className:"lg:col-span-2",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsx("h3",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Community Engagement Approach"}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-start space-x-4",children:[o.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx("span",{className:"text-blue-600 font-bold",children:"1"})}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Door-to-Do
305or Canvassing"}),o.jsx("p",{className:"text-gray-600",children:"Direct engagement with community members in their neighborhoods to understand needs and share resources."})]})]}),o.jsxs("div",{className:"flex items-start space-x-4",children:[o.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx("span",{className:"text-green-600 font-bold",children:"2"})}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Phone Outreach"}),o.jsx("p",{className:"text-gray-600",children:"Follow-up calls and ongoing communication to maintain relationships and provide support."})]})]}),o.jsxs("div",{className:"flex items-start space-x-4",children:[o.jsx("div",{className:"w-8 h-8 bg-purple-100 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx("span",{className:"text-purple-600 font-bold",children:"3"})}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Community Events"}),o.jsx("p",{className:"text-gray-600",children:"Organizing and participating in local events to build connections and share information about programs."})]})]})]})]})}),o.jsxs("div",{children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6 mb-6",children:[o.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Contact Our Team"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx(Sn,{size:16,className:"text-gray-400"}),o.jsx("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:text-blue-700 text-sm",children:"[email protected]"})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx($t,{size:16,className:"text-gray-400"}),o.jsx("span",{className:"text-gray-600 text-sm",children:"Tracy Englund, Program Manager"})]})]})]}),o.jsxs("div",{className:"bg-blue-50 border-l-4 border-blue-400 p-4 rounded-r-lg",children:[o.jsx("h4",{className:"font-semibold text-blue-800 mb-2",children:"Join Our Field Team"}),o.jsx("p",{className:"text-blue-700 text-sm",children:"Interested in becoming a community canvasser? We provide training and support for volunteers."})]})]})]})]})})]})};function Gc(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function D2(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function l(h){try{u(n.next(h))}catch(p){a(p)}}function c(h){try{u(n.throw(h))}catch(p){a(p)}}function u(h){h.done?i(h.value):s(h.value).then(l,c)}u((n=n.apply(t,e||[])).next())})}const M2=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Sm extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class q2 extends Sm{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class vg extends Sm{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class xg extends Sm{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var zh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(zh||(zh={}));class U2{constructor(e,{headers:r={},customFetch:n,region:s=zh.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=M2(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return D2(this,arguments,void 0,function*(r,n={}){var s;let i,a;try{const{headers:l,method:c,body:u,signal:h,timeout:p}=n;let d={},{region:m}=n;m||(m=this.region);const x=new URL(`${this.url}/${r}`);m&&m!=="any"&&(d["x-region"]=m,x.searchParams.set("forceFunctionRegion",m));let b;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",b=u):typeof u=="string"?(d["Content-Type"]="text/plain",b
305=u):typeof FormData<"u"&&u instanceof FormData?b=u:(d["Content-Type"]="application/json",b=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?b=JSON.stringify(u):b=u;let _=h;p&&(a=new AbortController,i=setTimeout(()=>a.abort(),p),h?(_=a.signal,h.addEventListener("abort",()=>a.abort())):_=a.signal);const g=yield this.fetch(x.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),l),body:b,signal:_}).catch(S=>{throw new q2(S)}),y=g.headers.get("x-relay-error");if(y&&y==="true")throw new vg(g);if(!g.ok)throw new xg(g);let v=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),j;return v==="application/json"?j=yield g.json():v==="application/octet-stream"||v==="application/pdf"?j=yield g.blob():v==="text/event-stream"?j=g:v==="multipart/form-data"?j=yield g.formData():j=yield g.text(),{data:j,error:null,response:g}}catch(l){return{data:null,error:l,response:l instanceof xg||l instanceof vg?l.context:void 0}}finally{i&&clearTimeout(i)}})}}var B2=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
305de=t.code}},z2=class{constructor(t){var e,r,n;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=t.urlLengthLimit)!==null&&n!==void 0?n:8e3,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}then(t,e){var r=this;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 n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let a=null,l=null,c=null,u=i.status,h=i.statusText;if(i.ok){var p,d;if(r.method!=="HEAD"){var m;const g=await i.text();g===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((m=r.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?l=g:l=JSON.parse(g))}const b=(p=r.headers.get("Prefer"))===null||p===void 0?void 0:p.match(/count=(exact|planned|estimated)/),_=(d=i.headers.get("content-range"))===null||d===void 0?void 0:d.split("/");b&&_&&_.length>1&&(c=parseInt(_[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(l)&&(l.length>1?(a={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,h="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{var x;const b=await i.text();try{a=JSON.parse(b),Array.isArray(a)&&i.status===404&&(l=[],a=null,u=200,h="OK")}catch{i.status===404&&b===""?(u=204,h="No Content"):a={message:b}}if(a&&r.isMaybeSingle&&(!(a==null||(x=a.details)===null||x===void 0)&&x.includes("0 rows"))&&(a=null,u=200,h="OK"),a&&r.shouldThrowOnError)throw new B2(a)}return{error:a,data:l,count:c,status:u,statusText:h}});return this.shouldThrowOnError||(s=s.catch(i=>{var a;let l="",c="",u="";const h=i==null?void 0:i.cause;if(h){var p,d,m,x;const g=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",y=(d=h==null?void 0:h.code)!==null&&d!==void 0?d:"";l=`${(m=i==null?void 0:i.name)!==null&&m!==void 0?m:"FetchError"}: ${i==null?void 0:i.message}`,l+=`
306
307Caused by: ${(x=h==null?void 0:h.name)!==null&&x!==void 0?x:"Error"}: ${g}`,y&&(l+=` (${y})`),h!=null&&h.stack&&(l+=`
308${h.stack}`)}else{var b;l=(b=i==null?void 0:i.stack)!==null&&b!==void 0?b:""}const _=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",_>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${_} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",_>this.urlLengthLimit&&(c+=`. Your request URL is ${_} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(a=i==null?void 0:i.name)!==null&&a!==void 0?a:"FetchError"}: ${i==null?void 0:i.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),s.then(t,e)}returns(){return this}overrideTypes(){return this}},F2=class extends z2{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.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}
308explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var a;const l=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const bg=new RegExp("[,()]");var Ds=class extends F2{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&bg.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&bg.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},H2=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const a=(t??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",a),n&&c.append("Prefer",`count=${n}`),new Ds({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:a}=this.cloneRequestState();if(e&&a.append("Prefer",`count=${e}`),r||a.append("Prefer","missing=default"),Array.isArray(t)){const l=t.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);i.searchParams.set("columns",c.join(","))}}return new Ds({method:s,url:i,headers:a,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const a="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&l.searchParams.set("on_conflict",e),n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((h,p)=>h.concat(Object.keys(p)),[]);if(u.length>0){const h=[...new Set(u)].map(p=>`"${p}"`);l.searchParams.set("columns",h.join(","))}}return new Ds({method:a,url:l,headers:c,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Ds({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new Ds({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit})}};function Xa(t){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(t)}function W2(t,e){if(Xa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function V2(t){var e=W2(t,"string");return Xa(e)=="symbol"?e:e+""}function G2(t,e,r){return(e=V2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function xl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
308e%2?wg(Object(r),!0).forEach(function(n){G2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var K2=class kx{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:a=8e3}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=a;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),i),d=u==null?void 0:u.signal;if(d){if(d.aborted)return clearTimeout(p),l(c,u);const m=()=>{clearTimeout(p),h.abort()};return d.addEventListener("abort",m,{once:!0}),l(c,xl(xl({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(p),d.removeEventListener("abort",m)})}return l(c,xl(xl({},u),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=l}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new H2(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(e){return new kx(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var a;let l;const c=new URL(`${this.url}/rpc/${e}`);let u;const h=m=>m!==null&&typeof m=="object"&&(!Array.isArray(m)||m.some(h)),p=n&&Object.values(r).some(h);p?(l="POST",u=r):n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([m,x])=>x!==void 0).map(([m,x])=>[m,Array.isArray(x)?`{${x.join(",")}}`:`${x}`]).forEach(([m,x])=>{c.searchParams.append(m,x)})):(l="POST",u=r);const d=new Headers(this.headers);return p?d.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&d.set("Prefer",`count=${i}`),new Ds({method:l,url:c,headers:d,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit})}};class J2{constructor(){}static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
309import ws from "ws"
310new 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 e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
311
312Suggested solution: ${e.workaround}`),new Error(r)}static createWebSocket(e,r){const n=this.getWebSocketConstructor();return new n(e,r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const Q2="2.95.3",Y2=`realtime-js/${Q2}`,Z2="1.0.0",Sx="2.0.0",_g=Sx,Fh=1e4,X2=1e3,ej=100;var cn;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(cn||(cn={}));var Se;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Se||(Se={}));var Qt;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Qt||(Qt={}));var Hh;(function(t){t.websocket="websocket"})(Hh||(Hh={}));var Jn;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Jn||(Jn={}));class tj{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},a=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(e,r,n){var s,i;const a=e.topic,l=(s=e.ref)!==null&&s!==void 0?s:"",c=(i=e.join_ref)!==null&&i!==void 0?i:"",u=e.payload.event,h=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},p=Object.keys(h).length===0?"":JSON.stringify(h);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`metadata length ${p.length} exceeds maximum of 255`);const d=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+a.length+u.length+p.length,m=new ArrayBuffer(this.HEADER_LENGTH+d);let x=new DataView(m),b=0;x.setUint8(b++,this.KINDS.userBroadcastPush),x.setUint8(b++,c.length),x.setUint8(b++,l.length),x.setUint8(b++,a.length),x.setUint8(b++,u.length),x.setUint8(b++,p.length),x.setUint8(b++,r),Array.from(c,g=>x.setUint8(b++,g.charCodeAt(0))),Array.from(l,g=>x.setUint8(b++,g.charCodeAt(0))),Array.from(a,g=>x.setUint8(b++,g.charCodeAt(0))),Array.from(u,g=>x.setUint8(b++,g.charCodeAt(0))),Array.from(p,g=>x.setUint8(b++,g.charCodeAt(0)));var _=new Uint8Array(m.byteLength+n.byteLength);return _.set(new Uint8Array(m),0),_.set(new Uint8Array(n),m.byteLength),_.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[s,i,a,l,c]=n;return r({join_ref:s,ref:i,topic:a,event:l,payload:c})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodeUserBroadcast(e,r,n){const s=r.getUint8(1),i=r.getUint8(2),a=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(e.slice(c,c+s));c=c+s;const h=n.decode(e.slice(c,c+i));c=c+i;const p=n.decode(e.slice(c,c+a));c=c+a;const d=e.slice(c,e.byteLength),m=l===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,x={type:this.BROADCAST_EVENT,event:h,payload:m};return a>0&&(x.meta=JSON.parse(p)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}class Ex{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}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 ie;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
312srange="tsrange",t.tstzrange="tstzrange"})(ie||(ie={}));const Ng=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,a)=>(i[a]=rj(a,t,e,s),i),{}):{}},rj=(t,e,r,n)=>{const s=e.find(l=>l.name===t),i=s==null?void 0:s.type,a=r[t];return i&&!n.includes(i)?Tx(i,a):Wh(a)},Tx=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return aj(e,r)}switch(t){case ie.bool:return nj(e);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return sj(e);case ie.json:case ie.jsonb:return ij(e);case ie.timestamp:return oj(e);case ie.abstime:case ie.date:case ie.daterange:case ie.int4range:case ie.int8range:case ie.money:case ie.reltime:case ie.text:case ie.time:case ie.timestamptz:case ie.timetz:case ie.tsrange:case ie.tstzrange:return Wh(e);default:return Wh(e)}},Wh=t=>t,nj=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},sj=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},ij=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},aj=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const a=t.slice(1,r);try{i=JSON.parse("["+a+"]")}catch{i=a?a.split(","):[]}return i.map(l=>Tx(e,l))}return t},oj=t=>typeof t=="string"?t.replace(" ","T"):t,Cx=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};class Ed{constructor(e,r,n={},s=Fh){this.channel=e,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,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(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var jg;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(jg||(jg={}));class Ea{constructor(e,r){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:i,onLeave:a,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ea.syncState(this.state,s,i,a),this.pendingDiffs.forEach(c=>{this.state=Ea.syncDiff(this.state,c,i,a)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},s=>{const{onJoin:i,onLeave:a,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ea.syncDiff(this.state,s,i,a),l())}),this.onJoin((s,i,a)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:a})}),this.onLeave((s,i,a)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,s){const i=this.cloneDeep(e),a=this.transformState(r),l={},c={};return this.map(i,(u,h)=>{a[u]||(c[u]=h)}),this.map(a,(u,h)=>{const p=i[u];if(p){const d=h.map(_=>_.presence_ref),m=p.map(_=>_.presence_ref),x=h.filter(_=>m.indexOf(_.presence_ref)<0),b=p.filter(_=>d.indexOf(_.presence_ref)<0);x.length>0&&(l[u]=x),b.length>0&&(c[u]=b)}else l[u]=h}),this.syncDiff(i,{joins:l,leaves:c},n,s)}static syncDiff(e,r,n,s){const{joins:i,leaves:a}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(i,(l,c)=>{var u;const h=(u=e[l])!==null&&u!==void 0?u:[];if(e[l]=this.cloneDeep(c),h.length>0){const p=e[l].map(m=>m.presence_ref),d=h.filter(m=>p.indexOf(m.presence_ref)<0);e[l].unshift(...d)}n(l,h,c)}),this.map(a,(l,c)=>{let u=e[l];if(!u)return;const h=c.map(p=>p.presence_ref);u=u.filter(p=>h.indexOf(p.presence_ref)<0),e[l]=u,s(l,u,c),u.length===0&&delete e[l]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return"metas"in s?r[n]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=s,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var kg;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
312E="DELETE"})(kg||(kg={}));var Ta;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Ta||(Ta={}));var Lr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Lr||(Lr={}));class si{constructor(e,r={config:{}},n){var s,i;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=Se.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Ed(this,Qt.join,this.params,this.timeout),this.rejoinTimer=new Ex(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Se.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Se.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Qt.reply,{},(a,l)=>{this._trigger(this._replyEventName(l),a)}),this.presence=new Ea(this),this.broadcastEndpointURL=Cx(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Se.closed){const{config:{broadcast:a,presence:l,private:c}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(m=>m.filter))!==null&&s!==void 0?s:[],h=!!this.bindings[Ta.PRESENCE]&&this.bindings[Ta.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,p={},d={broadcast:a,presence:Object.assign(Object.assign({},l),{enabled:h}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(p.access_token=this.socket.accessTokenValue),this._onError(m=>e==null?void 0:e(Lr.CHANNEL_ERROR,m)),this._onClose(()=>e==null?void 0:e(Lr.CLOSED)),this.updateJoinPayload(Object.assign({config:d},p)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:m})=>{var x;if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){e==null||e(Lr.SUBSCRIBED);return}else{const b=this.bindings.postgres_changes,_=(x=b==null?void 0:b.length)!==null&&x!==void 0?x:0,g=[];for(let y=0;y<_;y++){const v=b[y],{filter:{event:j,schema:S,table:N,filter:T}}=v,A=m&&m[y];if(A&&A.event===j&&si.isFilterValueEqual(A.schema,S)&&si.isFilterValueEqual(A.table,N)&&si.isFilterValueEqual(A.filter,T))g.push(Object.assign(Object.assign({},v),{id:A.id}));else{this.unsubscribe(),this.state=Se.errored,e==null||e(Lr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g,e&&e(Lr.SUBSCRIBED);return}}).receive("error",m=>{this.state=Se.errored,e==null||e(Lr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(Lr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this.state===Se.joined&&e===Ta.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(e,r,n)}async httpSend(e,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;
312try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(e,r={}){var n,s;if(!this._canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:a}=e,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var a,l,c;const u=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.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(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Se.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Qt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Ed(this,Qt.leave,{},e),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Se.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),a}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Ed(this,e,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>ej){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var s,i;const a=e.toLocaleLowerCase(),{close:l,error:c,leave:u,join:h}=Qt;if(n&&[l,c,u,h].indexOf(a)>=0&&n!==this._joinRef())return;let d=this._onMessage(a,r,n);if(r&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(m=>{var x,b,_;return((x=m.filter)===null||x===void 0?void 0:x.event)==="*"||((_=(b=m.filter)===null||b===void 0?void 0:b.event)===null||_===void 0?void 0:_.toLocaleLowerCase())===a}).map(m=>m.callback(d,n)):(i=this.bindings[a])===null||i===void 0||i.filter(m=>{var x,b,_,g,y,v;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in m){const j=m.id,S=(x=m.filter)===null||x===void 0?void 0:x.event;return j&&((b=r.ids)===null||b===void 0?void 0:b.includes(j))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((_=r.data)===null||_===void 0?void 0:_.type.toLocaleLowerCase()))}else{const j=(y=(g=m==null?void 0:m.filter)===null||g===void 0?void 0:g.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return j==="*"||j===((v=r==null?void 0:r.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===a}).map(m=>{if(typeof d=="object"&&"ids"in d){const x=d.data,{schema:b,table:_,commit_timestamp:g,type:y,errors:v}=x;d=Object.assign(Object.assign({},{schema:b,table:_,commit_timestamp:g,eventType:y,new:{},old:{},errors:v}),this._getPayloadRecords(x))}m.callback(d,n)})}_isClosed(){return this.state===Se.closed}
312_isJoined(){return this.state===Se.joined}_isJoining(){return this.state===Se.joining}_isLeaving(){return this.state===Se.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const s=e.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&si.isEqual(s.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Qt.close,{},e)}_onError(e){this._on(Qt.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Se.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Ng(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Ng(e.columns,e.old_record)),r}}const Td=()=>{},bl={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},lj=[1e3,2e3,5e3,1e4],cj=1e4,uj=`
313  addEventListener("message", (e) => {
314    if (e.data.event === "start") {
315      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
316    }
317  });`;class dj{constructor(e,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Fh,this.transport=null,this.heartbeatIntervalMs=bl.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Td,this.ref=0,this.reconnectTimer=null,this.vsn=_g,this.logger=Td,this.conn=null,this.sendBuffer=[],this.serializer=new tj,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${e}/${Hh.websocket}`,this.httpEndpoint=Cx(e),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=J2.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const r=e.message;throw r.includes("Node.js")?new Error(`${r}
318
319To use Realtime in Node.js, you need to provide a WebSocket implementation:
320
321Option 1: Use Node.js 22+ which has native WebSocket support
322Option 2: Install and provide the "ws" package:
323
324  npm install ws
325
326  import ws from "ws"
327  const client = new RealtimeClient(url, {
328    ...options,
329    transport: ws
330  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(e?this.conn.close(e,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&this._remove(e),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case cn.connecting:return Jn.Connecting;case cn.open:return Jn.Open;case cn.closing:return Jn.Closing;default:return Jn.Closed}}isConnected(){return this.connectionState()===Jn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
330channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new si(`realtime:${e}`,r,this);return this.channels.push(i),i}}push(e){const{topic:r,event:n,payload:s,ref:i}=e,a=()=>{this.encode(e,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(X2,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
vendor: 3,886 bytes, line 330
330heduleTimeout()},bl.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",u)}catch(h){this.log("error","error in heartbeat callback",h)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:i,ref:a}=r,l=a?`(${a})`:"",c=i.status||"";this.log("receive",`${c} ${n} ${s} ${l}`.trim(),i),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,i,a)),this._triggerStateCallbacks("message",r)})}_clearTimer(e){var r;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.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=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e),this.conn.readyState===cn.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===cn.open||this.conn.readyState===cn.connecting)try{this.conn.close()}catch(e){this.log("error","Error closing connection",e)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),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 e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(e){var r;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
330heduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e);try{this.heartbeatCallback("error")}catch(r){this.log("error","error in heartbeat callback",r)}}_triggerChanError(){this.channels.forEach(e=>e._trigger(Qt.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${e}${n}${s}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([uj],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(e,r=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(e=null){let r,n=!1;if(e)r=e,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:Y2};r&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(Qt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_triggerStateCallbacks(e,r){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new Ex(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},bl.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,s,i,a,l,c,u,h,p,d,m;switch(this.transport=(r=e==null?void 0:e.transport)!==null&&r!==void 0?r:null,this.timeout=(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:Fh,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:bl.HEARTBEAT_INTERVAL,this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(a=e==null?void 0:e.accessToken)!==null&&a!==void 0?a:null,this.heartbeatCallback=(l=e==null?void 0:e.heartbeatCallback)!==null&&l!==void 0?l:Td,this.vsn=(c=e==null?void 0:e.vsn)!==null&&c!==void 0?c:_g,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:x=>lj[x-1]||cj,this.vsn){case Z2:this.encode=(h=e==null?void 0:e.encode)!==null&&h!==void 0?h:(x,b)=>b(JSON.stringify(x)),this.decode=(p=e==null?void 0:e.decode)!==null&&p!==void 0?p:(x,b)=>b(JSON.parse(x));break;case Sx:this.encode=(d=e==null?void 0:e.encode)!==null&&d!==void 0?d:this.serializer.encode.bind(this.serializer),this.decode=(m=e==null?void 0:e.decode)!==null&&m!==void 0?m:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}var eo=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function hj(t,e,r){const n=new URL(e,t);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function fj(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function mj(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:a}){const l=hj(t.baseUrl,n,s),c=await fj(t.auth),u=await e(l,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...c,...a},body:i?JSON.stringify(i):void 0}),h=await u.text(),p=(u.headers.get("content-type")||"").includes("application/json"),d=p&&h?JSON.parse(h):h;if(!u.ok){const m=p?d:void 0,x=m==null?void 0:m.error;throw new eo((x==null?void 0:x.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:m})}return{status:u.status,headers:u.headers,data:d}}}}function wl(t){return t.join("�")}var pj=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:wl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${wl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${wl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${wl(t.namespace)}`}),!0}catch(e){if(e instanceof eo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof eo&&r.status===409)return;throw r}}};function Os(t){return t.join("�")}var gj=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Os(t.namespace)}
330/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof eo&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof eo&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},yj=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=mj({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new pj(this.client,e),this.tableOps=new gj(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}},Kc=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function Jc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var _l=class extends Kc{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Ax=class extends Kc{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};const vj=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),xj=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Vh=t=>{if(Array.isArray(t))return t.map(r=>Vh(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Vh(n)}),e},bj=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t);function to(t){"@babel/helpers - typeof";return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(t)}function wj(t,e){if(to(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(to(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _j(t){var e=wj(t,"string");return to(e)=="symbol"?e:e+""}function Nj(t,e,r){return(e=_j(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
330e%2?Sg(Object(r),!0).forEach(function(n){Nj(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const Eg=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},jj=async(t,e,r,n)=>{if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"&&!(r!=null&&r.noResolveJson)){const s=t,i=s.status||500;if(typeof s.json=="function")s.json().then(a=>{const l=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||i+"";e(new _l(Eg(a),i,l,n))}).catch(()=>{if(n==="vectors"){const a=i+"";e(new _l(s.statusText||`HTTP ${i} error`,i,a,n))}else{const a=i+"";e(new _l(s.statusText||`HTTP ${i} error`,i,a,n))}});else{const a=i+"";e(new _l(s.statusText||`HTTP ${i} error`,i,a,n))}}else e(new Ax(Eg(t),t,n))},kj=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||t==="HEAD"||!n?V(V({},s),r):(xj(n)?(s.headers=V({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(n)):s.body=n,e!=null&&e.duplex&&(s.duplex=e.duplex),V(V({},s),r))};async function ca(t,e,r,n,s,i,a){return new Promise((l,c)=>{t(r,kj(e,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(a==="vectors"){const h=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!h||!h.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>jj(u,c,n,a))})}function Ox(t="storage"){return{get:async(e,r,n,s)=>ca(e,"GET",r,n,s,void 0,t),post:async(e,r,n,s,i)=>ca(e,"POST",r,s,i,n,t),put:async(e,r,n,s,i)=>ca(e,"PUT",r,s,i,n,t),head:async(e,r,n,s)=>ca(e,"HEAD",r,V(V({},n),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,r,n,s,i)=>ca(e,"DELETE",r,s,i,n,t)}}const Sj=Ox("storage"),{get:ro,post:Kt,put:Gh,head:Ej,remove:Em}=Sj,ft=Ox("vectors");var Li=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=e,this.fetch=vj(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(Jc(r))return{data:null,error:r};throw r}}},Tj=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Jc(e))return{data:null,error:e};throw e}}};let Rx;Rx=Symbol.toStringTag;var Cj=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Rx]="BlobDownloadBuilder",this.promise=null}asStream(){return new Tj(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Jc(e))return{data:null,error:e};throw e}}};const Aj={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Tg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Oj=class extends Li{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var s=this;return s.handleOperation(async()=>{let i;const a=V(V({},Tg),n);let l=V(V({},s.headers),t==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",a.cacheControl),c&&i.append("metadata",s.encodeMetadata(c)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",a.cacheControl),c&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(c))):(i=r,l["cache-control"]=`max-age=${a.cacheControl}`,l["content-type"]=a.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!a.duplex&&(a.duplex="half")),n!=null&&n.headers&&(l=V(V({},l),n.headers));const u=s._removeEmptyFolders(e),h=s._getFinalPath(u),p=await(t=="PUT"?Gh:Kt)(s.fetch,`${s.url}/object/${h}`,i,V({headers:l},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:u,id:p.Id,fullPath:p.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}
330async uploadToSignedUrl(t,e,r,n){var s=this;const i=s._removeEmptyFolders(t),a=s._getFinalPath(i),l=new URL(s.url+`/object/upload/sign/${a}`);return l.searchParams.set("token",e),s.handleOperation(async()=>{let c;const u=V({upsert:Tg.upsert},n),h=V(V({},s.headers),{"x-upsert":String(u.upsert)});return 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,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType),{path:i,fullPath:(await Gh(s.fetch,l.toString(),c,{headers:h})).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const s=V({},r.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Kt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),a=new URL(r.url+i.url),l=a.searchParams.get("token");if(!l)throw new Kc("No token returned by API");return{signedUrl:a.toString(),path:t,token:l}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await Kt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await Kt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(t),i=await Kt(n.fetch,`${n.url}/object/sign/${s}`,V({expiresIn:e},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{signedUrl:encodeURI(`${n.url}${i.signedURL}${a}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const s=await Kt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(a=>V(V({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${i}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((e==null?void 0:e.transform)||{}),i=s?`?${s}`:"",a=this._getFinalPath(t),l=()=>ro(this.fetch,`${this.url}/${n}/${a}${i}`,{headers:this.headers,noResolveJson:!0},r);return new Cj(l,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Vh(await ro(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await Ej(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(Jc(n)&&n instanceof Ax){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=[],s=e!=null&&e.download?`download=${e.download===!0?"":e.download}`:"";s!==""&&n.push(s);const i=typeof(e==null?void 0:e.transform)<"u"?"render/image":"object",a=this.transformOptsToQueryString((e==null?void 0:e.transform)||{});a!==""&&n.push(a);let l=n.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${l}`)}}}async remove(t){var e=this;return e.handleOperation(async()=>await Em(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const s=V(V(V({},Aj),e),{},{prefix:t||""});return await Kt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=V({},t);return await Kt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const e=[];return t.width&&e.push(`width=${t.width}`),t.height&&e.push(`height=${t.height}`),t.resize&&e.push(`resize=${t.resize}`),t.format&&e.push(`format=${t.format}`),t.quality&&e.push(`quality=${t.quality}`),e.join("&")}};const Rj="2.95.3",jo={"X-Client-Info":`storage-js/${Rj}`};var Lj=class extends Li{constructor(t,e={},r,n){const s=new URL(t);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),a=V(V({},jo),e);super(i,a,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await ro(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await ro(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await Kt(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await Gh(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Kt(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Em(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},Ij=class extends Li{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},jo),e);super(n,s,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Kt(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>
330{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),s=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await ro(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Em(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!bj(t))throw new Kc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new yj({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const a=s[i];return typeof a!="function"?a:async(...l)=>{try{return{data:await a.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},Pj=class extends Li{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},jo),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await ft.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await ft.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},$j=class extends Li{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},jo),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},Dj=class extends Li{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},jo),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await ft.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},Mj=class extends Dj{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new qj(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},qj=class extends Pj{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new Uj(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},Uj=class extends $j{constructor(t,e,r,n,s){super(t,e,s),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Bj=class extends Lj{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new Oj(this.url,this.headers,t,this.fetch)}get vectors(){return new Mj(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Ij(this.url+"/iceberg",this.headers,this.fetch)}};const Lx="2.95.3",Ms=30*1e3,Kh=3,Cd=Kh*Ms,zj="http://localhost:9999",Fj="supabase.auth.token",Hj={"X-Client-Info":`gotrue-js/${Lx}`},Jh="X-Supabase-Api-Version",Ix={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Wj=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Vj=10*60*1e3;
330class no extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function F(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class Gj extends no{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function Kj(t){return F(t)&&t.name==="AuthApiError"}class Qn extends no{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Yr extends no{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class dt extends Yr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ad(t){return F(t)&&t.name==="AuthSessionMissingError"}class Rs extends Yr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Nl extends Yr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class jl extends Yr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Jj(t){return F(t)&&t.name==="AuthImplicitGrantRedirectError"}class Cg extends Yr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Qj extends Yr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Qh extends Yr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Od(t){return F(t)&&t.name==="AuthRetryableFetchError"}class Ag extends Yr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Yh extends Yr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const bc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Og=` 	
331\r=`.split(""),Yj=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Og.length;e+=1)t[Og[e].charCodeAt(0)]=-2;for(let e=0;e<bc.length;e+=1)t[bc[e].charCodeAt(0)]=e;return t})();function Rg(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(bc[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(bc[n]),e.queuedBits-=6}}function Px(t,e,r){const n=Yj[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Lg(t){const e=[],r=a=>{e.push(String.fromCodePoint(a))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=a=>{ek(a,n,r)};for(let a=0;a<t.length;a+=1)Px(t.charCodeAt(a),s,i);return e.join("")}function Zj(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function Xj(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}Zj(n,e)}}function ek(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function di(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;
331s+=1)Px(t.charCodeAt(s),r,n);return new Uint8Array(e)}function tk(t){const e=[];return Xj(t,r=>e.push(r)),new Uint8Array(e)}function es(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>Rg(s,r,n)),Rg(null,r,n),e.join("")}function rk(t){return Math.round(Date.now()/1e3)+t}function nk(){return Symbol("auth-callback")}const De=()=>typeof window<"u"&&typeof document<"u",Hn={tested:!1,writable:!1},$x=()=>{if(!De())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Hn.tested)return Hn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Hn.tested=!0,Hn.writable=!0}catch{Hn.tested=!0,Hn.writable=!1}return Hn.writable};function sk(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const Dx=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),ik=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",qs=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Wn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},$e=async(t,e)=>{await t.removeItem(e)};class Qc{constructor(){this.promise=new Qc.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Qc.promiseConstructor=Promise;function kl(t){const e=t.split(".");if(e.length!==3)throw new Yh("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!Wj.test(e[n]))throw new Yh("JWT not in base64url format");return{header:JSON.parse(Lg(e[0])),payload:JSON.parse(Lg(e[1])),signature:di(e[2]),raw:{header:e[0],payload:e[1]}}}async function ak(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function ok(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const a=await t(i);if(!e(i,null,a)){n(a);return}}catch(a){if(!e(i,a)){s(a);return}}})()})}function lk(t){return("0"+t.toString(16)).substr(-2)}function ck(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,lk).join("")}async function uk(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function dk(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await uk(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ls(t,e,r=!1){const n=ck();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await qs(t,`${e}-code-verifier`,s);const i=await dk(n);return[i,n===i?"plain":"s256"]}const hk=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function fk(t){const e=t.headers.get(Jh);if(!e||!e.match(hk))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function mk(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function pk(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const gk=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Is(t){if(!gk.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Rd(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function yk(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
331if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,s)}})}function Ig(t){return JSON.parse(JSON.stringify(t))}const Kn=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),vk=[502,503,504];async function Pg(t){var e;if(!ik(t))throw new Qh(Kn(t),0);if(vk.includes(t.status))throw new Qh(Kn(t),t.status);let r;try{r=await t.json()}catch(i){throw new Qn(Kn(i),i)}let n;const s=fk(t);if(s&&s.getTime()>=Ix["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Ag(Kn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new dt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,a)=>i&&typeof a=="string",!0))throw new Ag(Kn(r),t.status,r.weak_password.reasons);throw new Gj(Kn(r),t.status||500,n)}const xk=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function W(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Jh]||(i[Jh]=Ix["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const a=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(a.redirect_to=n.redirectTo);const l=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await bk(t,e,r+l,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function bk(t,e,r,n,s,i){const a=xk(e,n,s,i);let l;try{l=await t(r,Object.assign({},a))}catch(c){throw console.error(c),new Qh(Kn(c),0)}if(l.ok||await Pg(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await Pg(c)}}function Wt(t){var e;let r=null;Nk(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=rk(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function $g(t){const e=Wt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function hn(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function wk(t){return{data:t,error:null}}function _k(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,a=Gc(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},c=Object.assign({},a);return{data:{properties:l,user:c},error:null}}function Dg(t){return t}function Nk(t){return t.access_token&&t.refresh_token&&t.expires_in}const Ld=["global","local","others"];class jk{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=Dx(n),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)}}
vendor: 4,751 bytes, line 331
331async signOut(e,r=Ld[0]){if(Ld.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ld.join(", ")}`);try{return await W(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await W(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:hn})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=Gc(e,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await W(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:_k,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(F(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await W(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:hn})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},h=await W(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Dg});if(h.error)throw h.error;const p=await h.json(),d=(a=h.headers.get("x-total-count"))!==null&&a!==void 0?a:0,m=(c=(l=h.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(x=>{const b=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(x.split(";")[1].split("=")[1]);u[`${_}Page`]=b}),u.total=parseInt(d)),{data:Object.assign(Object.assign({},p),u),error:null}}catch(u){if(F(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Is(e);try{return await W(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:hn})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Is(e);try{return await W(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:hn})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Is(e);try{return await W(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:hn})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Is(e.userId);try{const{data:r,error:n}=await W(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Is(e.userId),Is(e.id);try{return{data:await W(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},h=await W(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Dg});if(h.error)throw h.error;const p=await h.json(),d=(a=h.headers.get("x-total-count"))!==null&&a!==void 0?a:0,m=(c=(l=h.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(x=>{const b=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(x.split(";")[1].split("=")[1]);u[`${_}Page`]=b}),u.total=parseInt(d)),{data:Object.assign(Object.assign({},p),u),error:null}}catch(u){if(F(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await W(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await W(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await W(this.fetch,"DELET
331E",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}}function Mg(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const Ps={debug:!!(globalThis&&$x()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Mx extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class kk extends Mx{}async function Sk(t,e,r){Ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),Ps.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){Ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await r()}finally{Ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw Ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new kk(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Ps.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 r()}}))}function Ek(){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 qx(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function Tk(t){return parseInt(t,16)}function Ck(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function Ak(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:a,notBefore:l,requestId:c,resources:u,scheme:h,uri:p,version:d}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!p)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(d!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
332`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const m=qx(t.address),x=h?`${h}://${n}`:n,b=t.statement?`${t.statement}
333`:"",_=`${x} wants you to sign in with your Ethereum account:
334${m}
335
336${b}`;let g=`URI: ${p}
337Version: ${d}
338Chain ID: ${r}${a?`
339Nonce: ${a}`:""}
340Issued At: ${i.toISOString()}`;if(s&&(g+=`
341Expiration Time: ${s.toISOString()}`),l&&(g+=`
342Not Before: ${l.toISOString()}`),c&&(g+=`
343Request ID: ${c}`),u){let y=`
344Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);y+=`
345- ${v}`}g+=y}return`${_}
346${g}`}
346class Ne extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class wc extends Ne{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function Ok({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ne({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ne({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ne({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ne({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ne({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ne({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Ne({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ne({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(Ux(a)){if(i.rp.id!==a)return new Ne({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ne({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Rk({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ne({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ne({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Ux(n)){if(r.rpId!==n)return new Ne({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class Lk{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Ik=new Lk;function Pk(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=Gc(t,["challenge","user","excludeCredentials"]),i=di(e).buffer,a=Object.assign(Object.assign({},r),{id:di(r.id).buffer}),l=Object.assign(Object.assign({}
346,s),{challenge:i,user:a});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:di(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function $k(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=Gc(t,["challenge","allowCredentials"]),s=di(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let a=0;a<r.length;a++){const l=r[a];i.allowCredentials[a]=Object.assign(Object.assign({},l),{id:di(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function Dk(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:es(new Uint8Array(t.response.attestationObject)),clientDataJSON:es(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Mk(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:es(new Uint8Array(s.authenticatorData)),clientDataJSON:es(new Uint8Array(s.clientDataJSON)),signature:es(new Uint8Array(s.signature)),userHandle:s.userHandle?es(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Ux(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function qg(){var t,e;return!!(De()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function qk(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new wc("Browser returned unexpected credential type",e)}:{data:null,error:new wc("Empty credential response",e)}}catch(e){return{data:null,error:Ok({error:e,options:t})}}}async function Uk(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new wc("Browser returned unexpected credential type",e)}:{data:null,error:new wc("Empty credential response",e)}}catch(e){return{data:null,error:Rk({error:e,options:t})}}}const Bk={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},zk={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function _c(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)if(s)for(const i in s){const a=s[i];if(a!==void 0)if(Array.isArray(a))n[i]=a;else if(r(a))n[i]=a;else if(e(a)){const l=n[i];e(l)?n[i]=_c(l,a):n[i]=_c(a)}else n[i]=a}return n}function Fk(t,e){return _c(Bk,t,e||{})}function Hk(t,e){return _c(zk,t,e||{})}class Wk{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){var a;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!l)return{data:null,error:c};const u=s??Ik.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:h}=l.webauthn.credential_options.publicKey;if(!h.name){const p=n;if(p)h.name=`${h.id}:${p}`;else{const m=(await this.client.getUser()).data.user,x=((a=m==null?void 0:m.user_metadata)===null||a===void 0?void 0:a.name)||(m==null?void 0:m.email)||(m==null?void 0:m.id)||"User";h.name=`${h.id}:${x}`}}h.displayName||(h.displayName=h.name)}switch(l.webauthn.type){case"create":{const h=Fk(l.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:p,error:d}=await qk({publicKey:h,signal:u});return p?{data:{factorId:e,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:p}},error:null}:{data:null,error:d}}case"request":{const h=Hk(l.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:p,error:d}=await Uk(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:h,signal:u}));return p?{data:{factorId:e,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:p}},error:null}:{data:null,error:d}}}}catch(l){return F(l)?{data:null,error:l}:{data:null,error:new Qn("Unexpected error in challenge",l)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new no("rpId is required for WebAuthn authentication")};try{if(!qg())return{data:null,error:new Qn("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!a)return{data:null,error:l};const{webauthn:c}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(a){return F(a)?{data:null,error:a}:{data:null,error:new Qn("Unexpected error in authenticate",a)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new no("rpId is required for WebAuthn registration")};try{if(!qg())return{data:null,error:new Qn("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(h=>{var p;return(p=h.data)===null||p===void 0?void 0:p.all.find(d=>d.factor_type==="webauthn"&&d.friendly_name===e&&d.status!=="unverified")}).then(h=>h?this.client.mfa.unenroll({factorId:h==null?void 0:h.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return c?this._verify({factorId:a.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(a){return F(a)?{data:null,error:a}:{data:null,error:new Qn("Unexpected error in register",a)}}}}Ek();const Vk={url:zj,storageKey:Fj,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Hj,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function Ug(t,e,r){return await r()}const $s={};class so{get jwks(){var e,r;return(r=(e=$s[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){$s[this.storageKey]=Object.assign(Object.assign({},$s[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=$s[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){$s[this.storageKey]=Object.assign(Object.assign({},$s[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=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({},Vk),e);if(this.storageKey=i.storageKey,this.instanceID=(r=so.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,so.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&De()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new jk({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Dx(i.fetch),this.lock=i.lock||Ug,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&De()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=Sk:this.lock=Ug,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 Wk(this)}
346,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:$x()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Mg(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Mg(this.memoryStorage)),De()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Lx}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(De()&&(r=sk(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),De()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),Jj(i)){const c=(e=i.details)===null||e===void 0?void 0:e.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:a,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",l),await this._saveSession(a),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return F(r)?this._returnResult({error:r}):this._returnResult({error:new Qn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Wt}),{data:a,error:l}=i;if(l||!a)return this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:h,password:p,options:d}=e;let m=null,x=null;this.flowType==="pkce"&&([m,x]=await Ls(this.storage,this.storageKey)),i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:h,password:p,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:m,code_challenge_method:x},xform:Wt})}else if("phone"in e){const{phone:h,password:p,options:d}=e;i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:h,password:p,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},channel:(s=d==null?void 0:d.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:Wt})}else throw new Nl("You must provide either an email or phone number and a password");const{data:a,error:l}=i;if(l||!a)return await $e(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:a,options:l}=e;r=await W(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:$g})}else if("phone"in e){const{phone:i,password:a,options:l}=e;r=await W(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:$g})}else throw new Nl("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Rs;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,a,l,c,u,h,p,d;let m,x;if("message"in e)m=e.message,x=e.signature;else{const{chain:b,wallet:_,statement:g,options:y}=e;let v;if(De())if(typeof _=="object")v=_;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")v=P.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 _!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=_}const j=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),S=await v.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const N=qx(S[0]);let T=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!T){const P=await v.request({method:"eth_chainId"});T=Tk(P)}const A={domain:j.host,address:N,statement:g,uri:j.href,version:"1",chainId:T,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(h=y==null?void 0:y.signInWithEthereum)===null||h===void 0?void 0:h.resources};m=Ak(A),x=await v.request({method:"personal_sign",params:[Ck(m),N]})}try{const{data:b,error:_}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:x},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(d=e.options)===null||d===void 0?void 0:d.captchaToken}}:null),xform:Wt});if(_)throw _;if(!b||!b.session||!b.user){const g=new Rs;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:_})}catch(b){if(F(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async signInWithSolana(e){var r,n,s,i,a,l,c,u,h,p,d,m;let x,b;if("message"in e)x=e.message,b=e.signature;else{const{chain:_,wallet:g,statement:y,options:v}=e;let j;if(De())if(typeof g=="object")j=g;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"))j=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 g!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=g}const S=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const N=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),y?{statement:y}:null));let T;if(Array.isArray(N)&&N[0]&&typeof N[0]=="object")T=N[0];else if(N&&typeof N=="object"&&"signedMessage"in N&&"signature"in N)T=N;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in T&&"signature"in T&&(typeof T.signedMessage=="string"||T.signedMessage instanceof Uint8Array)&&T.signature instanceof Uint8Array)x=typeof T.signedMessage=="string"?T.signedMessage:new TextDecoder().decode(T.signedMessage),b=T.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${S.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((p=(h=v==null?void 0:v.signInWithSolana)===null||h===void 0?void 0:h.resources)===null||p===void 0)&&p.length?["Resources",...v.signInWithSolana.resources.map(T=>`- ${T}`)]:[]].join(`
347`);const N=await j.signMessage(new TextEncoder().encode(x),"utf8");if(!N||!(N instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");b=N}}try{const{data:_,error:g}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:es(b)},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(m=e.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:Wt});if(g)throw g;if(!_||!_.session||!_.user){const y=new Rs;return this._returnResult({data:{user:null,session:null},error:y})}return _.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),this._returnResult({data:Object.assign({},_),error:g})}catch(_){if(F(_))return this._returnResult({data:{user:null,session:null},error:_});throw _}}async _exchangeCodeForSession(e){const r=await Wn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new Qj;const{data:i,error:a}=await W(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Wt});if(await $e(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!i||!i.session||!i.user){const l=new Rs;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:s??null}),error:a})}catch(i){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:a}=e,l=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Wt}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const h=new Rs;return this._returnResult({data:{user:null,session:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,a;try{if("email"in e){const{email:l,options:c}=e;let u=null,h=null;this.flowType==="pkce"&&([u,h]=await Ls(this.storage,this.storageKey));const{error:p}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:h},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:p})}if("phone"in e){const{phone:l,options:c}=e,{data:u,error:h}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},chan
347nel:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h})}throw new Nl("You must provide either an email or phone number.")}catch(l){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:a,error:l}=await W(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Wt});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,u=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,a;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Ls(this.storage,this.storageKey));const u=await W(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:wk});return!((i=u.data)===null||i===void 0)&&i.url&&De()&&!(!((a=e.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new dt;const{error:s}=await W(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(F(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:a}=await W(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,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:a})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:a,error:l}=await W(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new Nl("You must provide either an email or phone number and a type")}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}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 e=null;const r=await Wn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
347id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Cd:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const a=await Wn(this.userStorage,this.storageKey+"-user");a!=null&&a.user?e.user=a.user:e.user=Rd()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};e.user=yk(e.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:hn}):await this._useSession(async r=>{var n,s,i;const{data:a,error:l}=r;if(l)throw l;return!(!((n=a.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new dt}:await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:hn})})}catch(r){if(F(r))return Ad(r)&&(await this._removeSession(),await $e(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new dt;const a=s.session;let l=null,c=null;this.flowType==="pkce"&&e.email!=null&&([l,c]=await Ls(this.storage,this.storageKey));const{data:u,error:h}=await W(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:hn});if(h)throw h;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(n){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new dt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:a}=kl(e.access_token);if(a.exp&&(n=a.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(e.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(e.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});i={access_token:e.access_token,refresh_token:e.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(F(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:a,error:l}=r;if(l)throw l;e=(n=a.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new dt;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){try{if(!De())throw new jl("No browser detected.");
347if(e.error||e.error_description||e.error_code)throw new jl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Cg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new jl("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Cg("No code detected.");const{data:y,error:v}=await this._exchangeCodeForSession(e.code);if(v)throw v;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!i||!l||!a||!u)throw new jl("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(l);let d=h+p;c&&(d=parseInt(c));const m=d-h;m*1e3<=Ms&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${p}s`);const x=d-p;h-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,d,h):h-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,d,h);const{data:b,error:_}=await this._getUser(i);if(_)throw _;const g={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:p,expires_at:d,refresh_token:a,token_type:u,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(n){if(F(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Wn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Ad(i))return this._returnResult({error:i});const a=(n=s.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:l}=await this.admin.signOut(a,e);if(l&&!(Kj(l)&&(l.status===404||l.status===401||l.status===403)||Ad(l)))return this._returnResult({error:l})}return e!=="others"&&(await this._removeSession(),await $e(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=nk(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:a}=r;if(a)throw a;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Ls(this.storage,this.storageKey,!0));try{return await W(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var a,l,c,u,h;const{data:p,error:d}=i;if(d)throw d;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=e.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await W(this.fetch,"GET",m,{headers:this.headers,jwt:(h=(u=p.session)===null||u===void 0?void 0:u.access_token)!==null&&h!==void 0?h:void 0})});if(s)throw s;return De()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(F(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:a,provider:l,token:c,access_token:u,nonce:h}=e,p=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:h,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Wt}),{data:d,error:m}=p;return m?this._returnResult({data:{user:null,session:null},error:m}):!d||!d.session||!d.user?this._returnResult({data:{user:null,session:null},error:new Rs}):(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("USER_UPDATED",d.session)),this._returnResult({data:d,error:m}))}catch(s){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:a}=r;if(a)throw a;
347return await W(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await ok(async s=>(s>0&&await ak(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await W(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Wt})),(s,i)=>{const a=200*Math.pow(2,s);return i&&Od(i)&&Date.now()+a-n<Ms})}catch(n){if(this._debug(r,"error",n),F(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),De()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Wn(this.storage,this.storageKey);if(s&&this.userStorage){let a=await Wn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await qs(this.userStorage,this.storageKey+"-user",a)),s.user=(e=a==null?void 0:a.user)!==null&&e!==void 0?e:Rd()}else if(s&&!s.user&&!s.user){const a=await Wn(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await $e(this.storage,this.storageKey+"-user"),await qs(this.storage,this.storageKey,s)):s.user=Rd()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Cd;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Cd}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),Od(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:l}=await this._getUser(s.access_token);!l&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(n,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new dt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Qc;const{data:i,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!i.session)throw new dt;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(s,"error",i),F(i)){const a={data:null,error:i};return Od(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(a),a}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],a=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(e,r)}catch(c){i.push(c)}});if(await Promise.all(a),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await $e(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await qs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Ig(s);await qs(this.storage,this.storageKey,i)}else{const s=Ig(r);await qs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await $e(this.storage,this.storageKey),await $e(this.storage,this.storageKey+"-code-verifier"),await $e(this.storage,this.storageKey+"-user"),this.userStorage&&await $e(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&De()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
347catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ms);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Ms);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ms}ms, refresh threshold is ${Kh} ticks`),s<=Kh&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Mx)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!De()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"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(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,a]=await Ls(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await W(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const l=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:c,error:u}=await W(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(e.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Dk(e.webauthn.credential_response):Mk(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=await W(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.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(r){if(F(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=await W(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Pk(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:$k(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:m}=kl(e);let x=null;m.aal&&(x=m.aal);let b=x;const{data:{user:_},error:g}=await this.getUser(e);if(g)return this._returnResult({data:null,error:g});((n=(r=_==null?void 0:_.factors)===null||r===void 0?void 0:r.filter(j=>j.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(b="aal2");const v=m.amr||[];return{data:{currentLevel:x,nextLevel:b,currentAuthenticationMethods:v},error:null}}catch(m){if(F(m))return this._returnResult({data:null,error:m});throw m}const{data:{session:a},error:l}
347=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=kl(a.access_token);let u=null;c.aal&&(u=c.aal);let h=u;((i=(s=a.user.factors)===null||s===void 0?void 0:s.filter(m=>m.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(h="aal2");const d=c.amr||[];return{data:{currentLevel:u,nextLevel:h,currentAuthenticationMethods:d},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await W(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new dt})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new dt});const a=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&De()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new dt});const a=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&De()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await W(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new dt})})}catch(e){if(F(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await W(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new dt})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(l=>l.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===e),n&&this.jwks_cached_at+Vj>s)return n;const{data:i,error:a}=await W(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(l=>l.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:m,error:x}
347=await this.getSession();if(x||!m.session)return this._returnResult({data:null,error:x});n=m.session.access_token}const{header:s,payload:i,signature:a,raw:{header:l,payload:c}}=kl(n);r!=null&&r.allowExpired||mk(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:m}=await this.getUser(n);if(m)throw m;return{data:{claims:i,header:s,signature:a},error:null}}const h=pk(s.alg),p=await crypto.subtle.importKey("jwk",u,h,!0,["verify"]);if(!await crypto.subtle.verify(h,p,a,tk(`${l}.${c}`)))throw new Yh("Invalid JWT signature");return{data:{claims:i,header:s,signature:a},error:null}}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}}so.nextInstanceID={};const Gk=so,Kk="2.95.3";let ga="";typeof Deno<"u"?ga="deno":typeof document<"u"?ga="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ga="react-native":ga="node";const Jk={"X-Client-Info":`supabase-js-${ga}/${Kk}`},Qk={headers:Jk},Yk={schema:"public"},Zk={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Xk={};function io(t){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},io(t)}function eS(t,e){if(io(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(io(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tS(t){var e=eS(t,"string");return io(e)=="symbol"?e:e+""}function rS(t,e,r){return(e=tS(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function xe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bg(Object(r),!0).forEach(function(n){rS(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const nS=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),sS=()=>Headers,iS=(t,e,r)=>{const n=nS(r),s=sS();return async(i,a)=>{var l;const c=(l=await e())!==null&&l!==void 0?l:t;let u=new s(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(i,xe(xe({},a),{},{headers:u}))}};function aS(t){return t.endsWith("/")?t:t+"/"}function oS(t,e){var r,n;const{db:s,auth:i,realtime:a,global:l}=t,{db:c,auth:u,realtime:h,global:p}=e,d={db:xe(xe({},c),s),auth:xe(xe({},u),i),realtime:xe(xe({},h),a),storage:{},global:xe(xe(xe({},p),l),{},{headers:xe(xe({},(r=p==null?void 0:p.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?d.accessToken=t.accessToken:delete d.accessToken,d}function lS(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(aS(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var cS=class extends Gk{constructor(t){super(t)}},uS=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=lS(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const a=`sb-${i.hostname.split(".")[0]}-auth-token`,l={db:Yk,realtime:Xk,auth:xe(xe({},Zk),{},{storageKey:a}),global:Qk},c=oS(r??{},l);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(h,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=iS(e,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(xe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(h=>this.realtime.setAuth(h)).catch(h=>console.warn("Failed to set initial Realtime auth token:",h)),this.rest=new K2(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new Bj(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new U2(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,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:a,lock:l,debug:c,throwOnError:u},h,p){const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new cS({url:this.authUrl.href,headers:xe(xe({},d),h),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:a,lock:l,debug:c,throwOnError:u,fetch:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new dj(this.realtimeUrl.href,xe(xe({},t),{},{params:xe(xe({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const dS=(t,e,r)=>new uS(t,e,r);function hS(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}hS()&&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
347ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const fS="https://qywkrmeyouwecxhnxtch.supabase.co",mS="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InF5d2tybWV5b3V3ZWN4aG54dGNoIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzA3Mjg5OTYsImV4cCI6MjA4NjMwNDk5Nn0.lSuBIS7u2kpW4sEpWVw09PFHk9hMD9oke0BOhRHHcAQ",Re=dS(fS,mS),pS=()=>{const[t,e]=E.useState([]),[r,n]=E.useState([]),[s,i]=E.useState(!0),[a,l]=E.useState("All"),[c,u]=E.useState(""),[h,p]=E.useState("idle"),[d,m]=E.useState(""),x=["All","Program Update","Community Health","Technology","Program Launch","Public Health","Youth Development","Economic Development","Education","Broadband Access"];E.useEffect(()=>{b()},[]);const b=async()=>{try{i(!0);const{data:v,error:j}=await Re.from("news_items").select("*").eq("type","news").eq("status","published").lte("publish_date",new Date().toISOString()).order("publish_date",{ascending:!1});if(j)throw j;const{data:S,error:N}=await Re.from("news_items").select("*").eq("type","event").eq("status","published").or(`event_date.gte.${new Date().toISOString()},event_date.is.null`).order("event_date",{ascending:!0,nullsFirst:!1}).limit(5);if(N)throw N;e(v||[]),n(S||[])}catch(v){console.error("Error fetching news:",v)}finally{i(!1)}},_=a==="All"?t:t.filter(v=>v.category===a),g=v=>{const S=v.replace(/<[^>]*>/g,"").split(/\s+/).length;return`${Math.ceil(S/200)} min read`},y=async v=>{if(v.preventDefault(),!c||!c.includes("@")){p("error"),m("Please enter a valid email address");return}p("loading"),m("");try{const{error:j}=await Re.from("email_subscriptions").insert([{email:c.toLowerCase().trim()}]);if(j)if(j.code==="23505")p("error"),m("This email is already subscribed");else throw j;else p("success"),m("Thank you for subscribing!"),u(""),setTimeout(()=>{p("idle"),m("")},5e3)}catch(j){console.error("Error subscribing:",j),p("error"),m("An error occurred. Please try again.")}};return s?o.jsx("div",{className:"min-h-screen flex items-center justify-center",children:o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"News & Events"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Stay updated on our latest programs, community initiatives, and upcoming events across Southwest Georgia"})]})})}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:o.jsxs("div",{className:"grid lg:grid-cols-3 gap-12",children:[o.jsxs("div",{className:"lg:col-span-2",children:[o.jsx("div",{className:"mb-8",children:o.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(v=>o.jsx("button",{onClick:()=>l(v),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors duration-200 ${a===v?"bg-blue-600 text-white":"text-gray-600 hover:text-blue-600 hover:bg-blue-50"}`,children:v},v))})}),_.length===0?o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-12 text-center",children:o.jsx("p",{className:"text-gray-500 text-lg",children:"No news items available at this time."})}):o.jsxs(o.Fragment,{children:[_[0]&&o.jsxs("article",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-8",children:[_[0].featured_image&&o.jsx("img",{src:_[0].featured_image,alt:_[0].title,className:"w-full h-64 object-cover"}),o.jsxs("div",{className:"p-8",children:[o.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:"Featured"}),o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:_[0].category})]}),o.jsx(re,{to:`/news/${_[0].slug}`,className:"block text-gray-900 hover:text-blue-600 transition-colors",children:o.jsx("h2",{className:"text-2xl font-bold mb-4",children:_[0].title})}),o.jsx("p",{className:"text-gray-600 mb-4",children:_[0].excerpt}),o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center flex-wrap gap-x-4 gap-y-2 text-sm text-gray-500",children:[o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx(vr,{size:16}),o.jsx("span",{children:new Date(_[0].publish_date).toLocaleDateString()})]}),o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx(Bh,{size:16}),o.jsx("span",{children:_[0].author})]}),o.jsx("span",{children:g(_[0].content)})]}),o.jsxs(re,{to:`/news/${_[0].slug}`,className:"inline-flex items-center space-x-2 text-blue-600 hover:text-blue-700 font-medium transition-colors",children:[o.jsx("span",{children:"Read More"}),o.jsx(Pr,{size:18})]})]})]})]}),o.jsx("div",{className:"space-y-8",children:_.slice(1).map(v=>o.jsx("article",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:o.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[v.featured_image&&o.jsx("img",{src:v.featured_image,alt:v.title,className:"w-full h-48 md:h-full object-cover"}),o.jsxs("div",{className:`${v.featured_image?"md:col-span-2":"md:col-span-3"} p-6`,children:[o.jsx("div",{className:"flex items-center space-x-2 mb-3",children:o.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:v.category})}),o.jsx(re,{to:`/news/${v.slug}`,className:"block text-gray-900 hover:text-blue-600 transition-colors",children:o.jsx("h3",{className:"text-xl font-semibold mb-3",children:v.title})}),o.jsx("p",{className:"text-gray-600 mb-4",children:v.excerpt}),o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center flex-wrap gap-x-4 gap-y-2 text-sm text-gray-500",children:[o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx(vr,{size:14}),o.jsx("span",{children:new Date(v.publish_date).toLocaleDateString()})]}),o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx(Bh,{size:14}),o.jsx("span",{children:v.author})]}),o.jsx("span",{children:g(v.content)})]}),o.jsxs(re,{to:`/news/${v.slug}`,className:"inline-flex items-center space-x-2 text-blue-600 hover:text-blue-700 font-medium transition-colors",children:[o.jsx("span",{children:"Read More"}),o.jsx(Pr,{size:16})]})]})]})]})},v.id))})]})]}),o.jsxs("div",{className:"space-y-8",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Upcoming Events"}),r.length===0?o.jsx("p",{className:"text-gray-500 text-sm",children:"No upcoming events at this time."}):o.jsx("div",{className:"space-y-6",children:r.map(v=>o.jsxs("div",{className:"border-l-4 border-blue-600 pl-4",children:[o.jsx("h4",{className:"font-semibold text-gray-900 mb-1",children:v.title}),o.jsxs("div",{className:"text-sm text-gray-600 mb-1",children:[v.event_date&&o.jsxs("div",{className:"flex items-center space-x-1 mb-1",children:[o.jsx(vr,{size:14}),o.jsxs("span",{children:[new Date(v.event_date).toLocaleDateString(),v.event_time&&` • ${v.event_time}`]})]}),v.event_location&&o.jsxs("div",{className:"flex items-center space-x-1 mb-1",children:[o.jsx(Ri,{size:14}),o.jsx("span",{children:v.event_location})]})]}),o.jsx("p",{className:"text-sm text-gray-600 mb-2",children:v.excerpt}),o.jsxs(re,{to:`/news/${v.slug}`,className:"inline-flex items-center space-x-1 text-sm text-blue-600 hover:text-blue-700 font-medium transition-colors",children:[o.jsx("span",{children:"Read More"}),o.jsx(Pr,{size:14})]})]},v.id))})]}),o.jsxs("div",{className:"bg-gradient-to-r from-blue-600 to-green-600 rounded-xl p-6 text-white",children:[o.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Stay Connected"}),o.jsx("p",{className:"text-blue-100 mb-4",children:"Get the latest news and updates from Empower Southwest Georgia delivered to your inbox."}),o.jsxs("form",{onSubmit:y,className:"space-y-3",children:[o.jsx("input",{type:"email",placeholder:"Enter your email",value:c,onChange:v=>u(v.target.value),disabled:h==="loading",className:"w-full px-4 py-2 rounded-lg text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-50 disabled:opacity-50"}),o.jsx("button",{type:"submit",disabled:h==="loading",className:"w-full bg-white text-blue-600 font-semibold py-2 px-4 roun
347ded-lg hover:bg-gray-50 transition-colors duration-200 disabled:opacity-50",children:h==="loading"?"Subscribing...":"Subscribe"}),d&&o.jsx("p",{className:`text-sm ${h==="success"?"text-white":"text-red-200"}`,children:d})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-4",children:"Follow Us"}),o.jsx("div",{className:"space-y-3",children:o.jsxs("a",{href:"https://www.facebook.com/p/Empower-Southwest-Georgia-ESWGA-100092611974170/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-50 transition-colors duration-200",children:[o.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:o.jsx("span",{className:"text-white text-xs font-bold",children:"f"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-gray-900",children:"Facebook"}),o.jsx("p",{className:"text-sm text-gray-500",children:"Follow for daily updates"})]}),o.jsx(Ya,{size:16,className:"text-gray-400"})]})})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-4",children:"Media Contact"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-gray-900",children:"Arelexus Brown"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Communications Manager"})]}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("p",{children:"Email: [email protected]"}),o.jsx("p",{children:"Phone: Available upon request"})]})]})]})]})]})})]})},gS=()=>{const{slug:t}=iN(),[e,r]=E.useState(null),[n,s]=E.useState([]),[i,a]=E.useState(!0),[l,c]=E.useState(null),[u,h]=E.useState(!1);E.useEffect(()=>{t&&p(t)},[t]);const p=async g=>{try{a(!0),c(null);const{data:y,error:v}=await Re.from("news_items").select("*").eq("slug",g).eq("status","published").maybeSingle();if(v)throw v;if(!y){c("Article not found");return}r(y);const{data:j}=await Re.from("news_items").select("*").eq("status","published").eq("category",y.category).neq("id",y.id).order("publish_date",{ascending:!1}).limit(3);s(j||[])}catch(y){console.error("Error fetching article:",y),c("Failed to load article")}finally{a(!1)}},d=g=>{const v=g.replace(/<[^>]*>/g,"").split(/\s+/).length;return`${Math.ceil(v/200)} min read`},m=g=>new Date(g).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),x=g=>/<(p|h[1-6]|div|ul|ol|li|blockquote|pre|table|strong|em|a|img|br)\b/i.test(g)?g:g.split(/\n\n+/).map(S=>{var T;if(S=S.trim(),!S)return"";if(S.match(/^#{1,6}\s/)){const A=((T=S.match(/^#{1,6}/))==null?void 0:T[0].length)||2,P=S.replace(/^#{1,6}\s/,"");return`<h${A}>${P}</h${A}>`}return S.startsWith("- ")||S.startsWith("* ")?`<ul>${S.split(`
348`).filter(U=>U.trim()).map(U=>`<li>${U.replace(/^[-*]\s/,"")}</li>`).join(`
349`)}</ul>`:`<p style="margin-bottom: 1.5rem;">${S.replace(/\n/g,"<br>")}</p>`}).filter(S=>S).join(`
350
351`),b=typeof window<"u"?window.location.href:"",_=async()=>{try{await navigator.clipboard.writeText(b),h(!0),setTimeout(()=>h(!1),2e3)}catch(g){console.error("Failed to copy link:",g)}};return i?o.jsx("div",{className:"min-h-screen flex items-center justify-center",children:o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):l||!e?o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[o.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Article Not Found"}),o.jsx("p",{className:"text-xl text-blue-100",children:"The article you're looking for doesn't exist or has been removed."})]})}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 text-center",children:o.jsxs(re,{to:"/news",className:"inline-flex items-center space-x-2 text-blue-600 hover:text-blue-700 font-medium",children:[o.jsx(Nd,{size:20}),o.jsx("span",{children:"Back to News"})]})})]}):o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-16",children:o.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsxs(re,{to:"/news",className:"inline-flex items-center space-x-2 text-blue-200 hover:text-white mb-6 transition-colors",children:[o.jsx(Nd,{size:20}),o.jsx("span",{children:"Back to News"})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-white/20 text-white",children:e.category}),e.type==="event"&&o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-green-500/30 text-white",children:"Event"})]}),o.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-6 leading-tight",children:e.title}),o.jsxs("div",{className:"flex flex-wrap items-center gap-6 text-blue-100",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Bh,{size:18}),o.jsx("span",{children:e.author})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(vr,{size:18}),o.jsx("span",{children:m(e.publish_date)})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(_x,{size:18}),o.jsx("span",{children:d(e.content)})]})]})]})}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:o.jsxs("div",{className:"grid lg:grid-cols-3 gap-12",children:[o.jsxs("article",{className:"lg:col-span-2",children:[e.featured_image&&o.jsx("img",{src:e.featured_image,alt:e.title,className:"w-full h-auto rounded-xl shadow-lg mb-8 object-cover max-h-[500px]"}),e.type==="event"&&(e.event_date||e.event_location)&&o.jsxs("div",{className:"bg-blue-50 rounded-xl p-6 mb-8",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Event Details"}),o.jsxs("div",{className:"space-y-3",children:[e.event_date&&o.jsxs("div",{className:"flex items-center space-x-3 text-gray-700",children:[o.jsx(vr,{size:20,className:"text-blue-600"}),o.jsxs("span",{children:[m(e.event_date),e.event_time&&` at ${e.event_time}`]})]}),e.event_location&&o.jsxs("div",{className:"flex items-center space-x-3 text-gray-700",children:[o.jsx(Ri,{size:20,className:"text-blue-600"}),o.jsx("span",{children:e.event_location})]})]})]}),o.jsx("div",{className:"article-content",dangerouslySetInnerHTML:{__html:x(e.content)}}),o.jsxs("div",{className:"mt-12 pt-8 border-t border-gray-200",children:[o.jsxs("div",{className:"flex items-center space-x-2 text-gray-600 mb-4",children:[o.jsx(b2,{size:20}),o.jsx("span",{className:"font-medium",children:"Share this article"})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx("button",{onClick:_,className:"inline-flex items-center space-x-2 px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors font-medium",children:u?o.jsxs(o.Fragment,{children:[o.jsx(wx,{size:18}),o.jsx("span",{children:"Link Copied!"})]}):o.jsxs(o.Fragment,{children:[o.jsx(d2,{size:18}),o.jsx("span",{children:"Copy Link"})]})}),o.jsxs("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(b)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium","aria-label":"Share on Facebook",children:[o.jsx(jx,{size:18}),o.jsx("span",{children:"Facebook"})]}),o.jsxs("a",{href:`https://twitter.com/intent/tweet?url=${encodeURIComponent(b)}&text=${encodeURIComponent(e.title)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center space-x-2 px-4 py-2 bg-sky-500 text-white rounded-lg hover:bg-sky-600 transition-colors font-medium","aria-label":"Share on Twitter",children:[o.jsx(j2,{size:18}),o.jsx("span",{children:"Twitter"})]}),o.jsxs("a",{href:`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(b)}&title=${encodeURIComponent(e.title)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center space-x-2 px-4 py-2 bg-blue-700 text-white rounded-lg hover:bg-blue-800 transition-colors font-medium","aria-label":"Share on LinkedIn",children:[o.jsx(h2,{size:18}),o.jsx("span",{children:"LinkedIn"})]})]})]})]}),o.jsxs("aside",{className:"space-y-8",children:[n.length>0&&o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Related Articles"}),o.jsx("div",{className:"space-y-6",children:n.map(g=>o.jsxs(re,{to:`/news/${g.slug}`,className:"block group",children:[g.featured_image&&o.jsx("img",{src:g.featured_image,alt:g.title,className:"w-full h-32 object-cover rounded-lg mb-3 group-hover:opacity-90 transition-opacity"}),o.jsx("h4",{className:"font-semibold text-gray-900 group-hover:text-blue-600 transition-colors line-clamp-2",children:g.title}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:m(g.publish_date)})]},g.id))})]}),o.jsxs("div",{className:"bg-gradient-to-r from-blue-600 to-green-600 rounded-xl p-6 text-white",children:[o.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Stay Connected"}),o.jsx("p",{className:"text-blue-100 mb-4",children:"Get the latest news and updates from Empower Southwest Georgia delivered to your inbox."}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("input",{type:"email",placeholder:"Enter your email",className:"w-full px-4 py-2 rounded-lg text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-50"}),o.jsx("button",{className:"w-full bg-white text-blue-600 font-semibold py-2 px-4 roun
351ded-lg hover:bg-gray-50 transition-colors duration-200",children:"Subscribe"})]})]}),o.jsx(re,{to:"/news",className:"block bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-shadow",children:o.jsxs("div",{className:"flex items-center space-x-3 text-blue-600",children:[o.jsx(Nd,{size:20}),o.jsx("span",{className:"font-semibold",children:"View All News & Events"})]})})]})]})})]})},yS=()=>{const[t,e]=E.useState({name:"",email:"",phone:"",subject:"",message:"",interests:[]}),[r,n]=E.useState("idle"),[s,i]=E.useState(""),a=["Volunteering","Partnerships","Donations","Digital Literacy Training","Healthcare Programs","Community Organizing","Youth Leadership","Broadband Advocacy"],l=d=>{e({...t,[d.target.name]:d.target.value})},c=d=>{const m=t.interests.includes(d)?t.interests.filter(x=>x!==d):[...t.interests,d];e({...t,interests:m})},u=async d=>{d.preventDefault(),n("submitting"),i("");try{const{error:m}=await Re.from("contact_submissions").insert([{name:t.name,email:t.email,phone:t.phone||null,subject:t.subject||null,message:t.message,interests:t.interests.length>0?t.interests:null,status:"new"}]);if(m)throw m;n("success"),e({name:"",email:"",phone:"",subject:"",message:"",interests:[]}),setTimeout(()=>{n("idle")},5e3)}catch(m){console.error("Error submitting form:",m),n("error"),i("Failed to submit form. Please try again or email us directly.")}},h=["Thomas Brown","Ed Cook","Anonymous Donors"],p=[{name:"Englewood Health Care, Inc.",location:"Albany, GA",description:"Healthcare services partner"},{name:"Building and IT Design",location:"Construction - Real Estate Development",description:"Infrastructure development partner"}];return o.jsxs("div",{className:"min-h-screen",children:[o.jsx("section",{className:"bg-gradient-to-r from-blue-900 to-green-700 text-white py-20",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"Get Involved"}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto",children:"Join us in building stronger communities across Southwest Georgia. Your support makes a difference."})]})})}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:o.jsxs("div",{className:"grid lg:grid-cols-3 gap-12",children:[o.jsxs("div",{className:"lg:col-span-2",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Contact Us"}),r==="success"&&o.jsx("div",{className:"mb-6 bg-green-50 border border-green-200 rounded-lg p-4",children:o.jsx("p",{className:"text-green-800 font-medium",children:"Thank you for reaching out! We'll get back to you soon."})}),r==="error"&&o.jsx("div",{className:"mb-6 bg-red-50 border border-red-200 rounded-lg p-4",children:o.jsx("p",{className:"text-red-800 font-medium",children:s})}),o.jsxs("form",{onSubmit:u,className:"space-y-6",children:[o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Full Name *"}),o.jsx("input",{type:"text",id:"name",name:"name",value:t.name,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email Address *"}),o.jsx("input",{type:"email",id:"email",name:"email",value:t.email,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0})]})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"phone",className:"block text-sm font-medium text-gray-700 mb-2",children:"Phone Number"}),o.jsx("input",{type:"tel",id:"phone",name:"phone",value:t.phone,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"subject",className:"block text-sm font-medium text-gray-700 mb-2",children:"Subject"}),o.jsxs("select",{id:"subject",name:"subject",value:t.subject,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[o.jsx("option",{value:"",children:"Select a subject"}),o.jsx("option",{value:"volunteer",children:"Volunteer Opportunities"}),o.jsx("option",{value:"partnership",children:"Partnership Inquiry"}),o.jsx("option",{value:"donation",children:"Donation Information"}),o.jsx("option",{value:"programs",children:"Program Information"}),o.jsx("option",{value:"general",children:"General Inquiry"})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Areas of Interest (select all that apply)"}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:a.map(d=>o.jsxs("label",{className:"flex items-center space-x-2",children:[o.jsx("input",{type:"checkbox",checked:t.interests.includes(d),onChange:()=>c(d),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("span",{className:"text-sm text-gray-700",children:d})]},d))})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"message",className:"block text-sm font-medium text-gray-700 mb-2",children:"Message *"}),o.jsx("textarea",{id:"message",name:"message",rows:6,value:t.message,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Tell us how you'd like to get involved or any questions you have...",required:!0})]}),o.jsx("button",{type:"submit",disabled:r==="submitting",className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed text-white font-semibold py-3 px-6 rounded-lg transition-colors duration-200",children:r==="submitting"?"Sending...":"Send Message"})]})]}),o.jsxs("div",{className:"mt-12 grid md:grid-cols-3 gap-8",children:[o.jsxs("div",{id:"volunteer",className:"bg-white rounded-xl shadow-lg p-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:o.jsx($t,{size:28,className:"text-blue-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-3",children:"Volunteer"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Join our field team of community canvassers and help us connect with neighbors across Southwest Georgia."})]}),o.jsxs("div",{id:"partner",className:"bg-white rounded-xl shadow-lg p-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:o.jsx(c2,{size:28,className:"text-green-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-3",children:"Partner"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Collaborate with us on programs and initiatives that strengthen our communities and expand our impact."})]}),o.jsxs("div",{id:"donate",className:"bg-white rounded-xl shadow-lg p-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-orange-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:o.jsx(Wr,{size:28,className:"text-orange-600"})}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-3",children:"Donate"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Your tax-deductible support enables us to meet our goals and improve c
351onditions in Southwest Georgia."}),o.jsx("a",{href:"https://donate.stripe.com/3cI9AS1Up60b6fj05j8EM00",target:"_blank",rel:"noopener noreferrer",className:"text-orange-600 hover:text-orange-700 font-medium",children:"Make a Donation"})]})]})]}),o.jsxs("div",{className:"space-y-8",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Contact Information"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx(Ri,{size:20,className:"text-gray-400 mt-1"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-gray-900",children:"Mailing Address"}),o.jsxs("p",{className:"text-gray-600 text-sm",children:["PO Box 481",o.jsx("br",{}),"Cuthbert, GA 39840"]})]})]}),o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx(Sn,{size:20,className:"text-gray-400 mt-1"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-gray-900",children:"Email"}),o.jsx("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:text-blue-700 text-sm",children:"[email protected]"})]})]}),o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx($t,{size:20,className:"text-gray-400 mt-1"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-gray-900",children:"Field Team"}),o.jsx("p",{className:"text-gray-600 text-sm",children:"30+ community canvassers across 15 counties"})]})]})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Support Our Cause"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[o.jsx(a2,{size:16,className:"text-green-600"}),o.jsx("span",{className:"font-medium text-green-800",children:"Tax Deductible"})]}),o.jsx("p",{className:"text-green-700 text-sm",children:"Empower Southwest Georgia is a 501(c)(3). All donations are tax deductible."})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h4",{className:"font-medium text-gray-900",children:"Donation Options:"}),o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs("p",{className:"text-gray-600",children:[o.jsx("strong",{children:"Check:"}),' Make payable to "Empower Southwest Georgia" and mail to our address above.']}),o.jsxs("p",{className:"text-gray-600",children:[o.jsx("strong",{children:"Online:"})," Secure credit card or PayPal payments available."]})]})]}),o.jsx("a",{href:"https://donate.stripe.com/3cI9AS1Up60b6fj05j8EM00",target:"_blank",rel:"noopener noreferrer",className:"w-full block text-center bg-orange-600 hover:bg-orange-700 text-white font-semibold py-3 px-4 rounded-lg transition-colors duration-200",children:"Donate Now"}),o.jsx("div",{className:"mt-4 flex justify-center",children:o.jsx("img",{src:"/images/qrcodedonate.jpeg",alt:"Donate QR Code",className:"w-32 h-32 object-contain"})})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-4",children:"Individual Donors"}),o.jsx("div",{className:"space-y-2",children:h.map((d,m)=>o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full"}),o.jsx("span",{className:"text-gray-700 text-sm",children:d})]},m))})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-4",children:"Corporate Sponsors"}),o.jsx("div",{className:"space-y-4",children:p.map((d,m)=>o.jsxs("div",{className:"border-l-4 border-blue-600 pl-3",children:[o.jsx("h4",{className:"font-medium text-gray-900 text-sm",children:d.name}),o.jsx("p",{className:"text-gray-600 text-xs",children:d.location}),o.jsx("p",{className:"text-gray-500 text-xs",children:d.description})]},m))})]})]})]})})]})};var Bx=typeof global=="object"&&global&&global.Object===Object&&global,vS=typeof self=="object"&&self&&self.Object===Object&&self,Sr=Bx||vS||Function("return this")(),An=Sr.Symbol,zx=Object.prototype,xS=zx.hasOwnProperty,bS=zx.toString,ua=An?An.toStringTag:void 0;function wS(t){var e=xS.call(t,ua),r=t[ua];try{t[ua]=void 0;var n=!0}catch{}var s=bS.call(t);return n&&(e?t[ua]=r:delete t[ua]),s}var _S=Object.prototype,NS=_S.toString;function jS(t){return NS.call(t)}
vendor: 4,594 bytes, line 351
351var kS="[object Null]",SS="[object Undefined]",zg=An?An.toStringTag:void 0;function Ii(t){return t==null?t===void 0?SS:kS:zg&&zg in Object(t)?wS(t):jS(t)}function Vr(t){return t!=null&&typeof t=="object"}var ls=Array.isArray;function In(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Fx(t){return t}var ES="[object AsyncFunction]",TS="[object Function]",CS="[object GeneratorFunction]",AS="[object Proxy]";function Tm(t){if(!In(t))return!1;var e=Ii(t);return e==TS||e==CS||e==ES||e==AS}var Id=Sr["__core-js_shared__"],Fg=function(){var t=/[^.]+$/.exec(Id&&Id.keys&&Id.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function OS(t){return!!Fg&&Fg in t}var RS=Function.prototype,LS=RS.toString;function fs(t){if(t!=null){try{return LS.call(t)}catch{}try{return t+""}catch{}}return""}var IS=/[\\^$.*+?()[\]{}|]/g,PS=/^\[object .+?Constructor\]$/,$S=Function.prototype,DS=Object.prototype,MS=$S.toString,qS=DS.hasOwnProperty,US=RegExp("^"+MS.call(qS).replace(IS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BS(t){if(!In(t)||OS(t))return!1;var e=Tm(t)?US:PS;return e.test(fs(t))}function zS(t,e){return t==null?void 0:t[e]}function ms(t,e){var r=zS(t,e);return BS(r)?r:void 0}var Zh=ms(Sr,"WeakMap"),Hg=Object.create,FS=function(){function t(){}return function(e){if(!In(e))return{};if(Hg)return Hg(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function HS(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Hx(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var WS=800,VS=16,GS=Date.now;function KS(t){var e=0,r=0;return function(){var n=GS(),s=VS-(n-r);if(r=n,s>0){if(++e>=WS)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function JS(t){return function(){return t}}var Nc=function(){try{var t=ms(Object,"defineProperty");return t({},"",{}),t}catch{}}(),QS=Nc?function(t,e){return Nc(t,"toString",{configurable:!0,enumerable:!1,value:JS(e),writable:!0})}:Fx,YS=KS(QS);function ZS(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var XS=9007199254740991,eE=/^(?:0|[1-9]\d*)$/;function Wx(t,e){var r=typeof t;return e=e??XS,!!e&&(r=="number"||r!="symbol"&&eE.test(t))&&t>-1&&t%1==0&&t<e}function Cm(t,e,r){e=="__proto__"&&Nc?Nc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ko(t,e){return t===e||t!==t&&e!==e}var tE=Object.prototype,rE=tE.hasOwnProperty;function Vx(t,e,r){var n=t[e];(!(rE.call(t,e)&&ko(n,r))||r===void 0&&!(e in t))&&Cm(t,e,r)}function So(t,e,r,n){var s=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var l=e[i],c=void 0;c===void 0&&(c=t[l]),s?Cm(r,l,c):Vx(r,l,c)}return r}var Wg=Math.max;function nE(t,e,r){return e=Wg(e===void 0?t.length-1:e,0),function(){for(var n=arguments,s=-1,i=Wg(n.length-e,0),a=Array(i);++s<i;)a[s]=n[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=n[s];return l[e]=r(a),HS(t,this,l)}}function sE(t,e){return YS(nE(t,e,Fx),t+"")}var iE=9007199254740991;function Gx(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=iE}function Yc(t){return t!=null&&Gx(t.length)&&!Tm(t)}function aE(t,e,r){if(!In(r))return!1;var n=typeof e;return(n=="number"?Yc(r)&&Wx(e,r.length):n=="string"&&e in r)?ko(r[e],t):!1}function oE(t){return sE(function(e,r){var n=-1,s=r.length,i=s>1?r[s-1]:void 0,a=s>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(s--,i):void 0,a&&aE(r[0],r[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var l=r[n];l&&t(e,l,n,i)}return e})}var lE=Object.prototype;function Am(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||lE;return t===r}function cE(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var uE="[object Arguments]";function Vg(t){return Vr(t)&&Ii(t)==uE}var Kx=Object.prototype,dE=Kx.hasOwnProperty,hE=Kx.propertyIsEnumerable,Xh=Vg(function(){return arguments}())?Vg:function(t){return Vr(t)&&dE.call(t,"callee")&&!hE.call(t,"callee")};function fE(){return!1}var Jx=typeof gt=="object"&&gt&&!gt.nodeType&&gt,Gg=Jx&&typeof yt=="object"&&yt&&!yt.nodeType&&yt,mE=Gg&&Gg.exports===Jx,Kg=mE?Sr.Buffer:void 0,pE=Kg?Kg.isBuffer:void 0,ao=pE||fE,gE="[object Arguments]",yE="[object Array]",vE="[object Boolean]",xE="[object Date]",bE="[object Error]",wE="[object Function]",_E="[object Map]",NE="[object Number]",jE="[object Object]",kE="[object RegExp]",SE="[object Set]",EE="[object String]",TE="[object WeakMap]",CE="[object ArrayBuffer]",AE="[object DataView]",OE="[object Float32Array]",RE="[object Float64Array
351]",LE="[object Int8Array]",IE="[object Int16Array]",PE="[object Int32Array]",$E="[object Uint8Array]",DE="[object Uint8ClampedArray]",ME="[object Uint16Array]",qE="[object Uint32Array]",ue={};ue[OE]=ue[RE]=ue[LE]=ue[IE]=ue[PE]=ue[$E]=ue[DE]=ue[ME]=ue[qE]=!0;ue[gE]=ue[yE]=ue[CE]=ue[vE]=ue[AE]=ue[xE]=ue[bE]=ue[wE]=ue[_E]=ue[NE]=ue[jE]=ue[kE]=ue[SE]=ue[EE]=ue[TE]=!1;function UE(t){return Vr(t)&&Gx(t.length)&&!!ue[Ii(t)]}function Om(t){return function(e){return t(e)}}var Qx=typeof gt=="object"&&gt&&!gt.nodeType&&gt,Ca=Qx&&typeof yt=="object"&&yt&&!yt.nodeType&&yt,BE=Ca&&Ca.exports===Qx,Pd=BE&&Bx.process,_i=function(){try{var t=Ca&&Ca.require&&Ca.require("util").types;return t||Pd&&Pd.binding&&Pd.binding("util")}catch{}}(),Jg=_i&&_i.isTypedArray,Rm=Jg?Om(Jg):UE,zE=Object.prototype,FE=zE.hasOwnProperty;function Yx(t,e){var r=ls(t),n=!r&&Xh(t),s=!r&&!n&&ao(t),i=!r&&!n&&!s&&Rm(t),a=r||n||s||i,l=a?cE(t.length,String):[],c=l.length;for(var u in t)(e||FE.call(t,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Wx(u,c)))&&l.push(u);return l}function Zx(t,e){return function(r){return t(e(r))}}var HE=Zx(Object.keys,Object),WE=Object.prototype,VE=WE.hasOwnProperty;function GE(t){if(!Am(t))return HE(t);var e=[];for(var r in Object(t))VE.call(t,r)&&r!="constructor"&&e.push(r);return e}function Lm(t){return Yc(t)?Yx(t):GE(t)}function KE(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var JE=Object.prototype,QE=JE.hasOwnProperty;function YE(t){if(!In(t))return KE(t);var e=Am(t),r=[];for(var n in t)n=="constructor"&&(e||!QE.call(t,n))||r.push(n);return r}function Eo(t){return Yc(t)?Yx(t,!0):YE(t)}var oo=ms(Object,"create");function ZE(){this.__data__=oo?oo(null):{},this.size=0}function XE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var eT="__lodash_hash_undefined__",tT=Object.prototype,rT=tT.hasOwnProperty;function nT(t){var e=this.__data__;if(oo){var r=e[t];return r===eT?void 0:r}return rT.call(e,t)?e[t]:void 0}var sT=Object.prototype,iT=sT.hasOwnProperty;function aT(t){var e=this.__data__;return oo?e[t]!==void 0:iT.call(e,t)}var oT="__lodash_hash_undefined__";function lT(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=oo&&e===void 0?oT:e,this}function cs(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}cs.prototype.clear=ZE;cs.prototype.delete=XE;cs.prototype.get=nT;cs.prototype.has=aT;cs.prototype.set=lT;function cT(){this.__data__=[],this.size=0}function Zc(t,e){for(var r=t.length;r--;)if(ko(t[r][0],e))return r;return-1}var uT=Array.prototype,dT=uT.splice;function hT(t){var e=this.__data__,r=Zc(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():dT.call(e,r,1),--this.size,!0}function fT(t){var e=this.__data__,r=Zc(e,t);return r<0?void 0:e[r][1]}function mT(t){return Zc(this.__data__,t)>-1}function pT(t,e){var r=this.__data__,n=Zc(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Zr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Zr.prototype.clear=cT;Zr.prototype.delete=hT;Zr.prototype.get=fT;Zr.prototype.has=mT;Zr.prototype.set=pT;var lo=ms(Sr,"Map");function gT(){this.size=0,this.__data__={hash:new cs,map:new(lo||Zr),string:new cs}}function yT(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Xc(t,e){var r=t.__data__;return yT(e)?r[typeof e=="string"?"string":"hash"]:r.map}function vT(t){var e=Xc(this,t).delete(t);return this.size-=e?1:0,e}function xT(t){return Xc(this,t).get(t)}function bT(t){return Xc(this,t).has(t)}function wT(t,e){var r=Xc(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ps(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ps.prototype.clear=gT;ps.prototype.delete=vT;ps.prototype.get=xT;ps.prototype.has=bT;ps.prototype.set=wT;function Xx(t,e){for(var r=-1,n=e.length,s=t.length;++r<n;)t[s+r]=e[r];return t}var Im=Zx(Object.getPrototypeOf,Object),_T="[object Object]",NT=Function.prototype,jT=Object.prototype,e1=NT.toString,kT=jT.hasOwnProperty,ST=e1.call(Object);function ET(t){if(!Vr(t)||Ii(t)!=_T)return!1;var e=Im(t);if(e===null)return!0;var r=kT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&e1.call(r)==ST}function TT(){this.__data__=new Zr,this.size=0}function CT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function AT(t){return this.__data__.get(t)}function OT(t){return this.__data__.has(t)}
vendor: 4,100 bytes, line 351
351var RT=200;function LT(t,e){var r=this.__data__;if(r instanceof Zr){var n=r.__data__;if(!lo||n.length<RT-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ps(n)}return r.set(t,e),this.size=r.size,this}function xr(t){var e=this.__data__=new Zr(t);this.size=e.size}xr.prototype.clear=TT;xr.prototype.delete=CT;xr.prototype.get=AT;xr.prototype.has=OT;xr.prototype.set=LT;function IT(t,e){return t&&So(e,Lm(e),t)}function PT(t,e){return t&&So(e,Eo(e),t)}var t1=typeof gt=="object"&&gt&&!gt.nodeType&&gt,Qg=t1&&typeof yt=="object"&&yt&&!yt.nodeType&&yt,$T=Qg&&Qg.exports===t1,Yg=$T?Sr.Buffer:void 0,Zg=Yg?Yg.allocUnsafe:void 0;function r1(t,e){if(e)return t.slice();var r=t.length,n=Zg?Zg(r):new t.constructor(r);return t.copy(n),n}function DT(t,e){for(var r=-1,n=t==null?0:t.length,s=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[s++]=a)}return i}function n1(){return[]}var MT=Object.prototype,qT=MT.propertyIsEnumerable,Xg=Object.getOwnPropertySymbols,Pm=Xg?function(t){return t==null?[]:(t=Object(t),DT(Xg(t),function(e){return qT.call(t,e)}))}:n1;function UT(t,e){return So(t,Pm(t),e)}var BT=Object.getOwnPropertySymbols,s1=BT?function(t){for(var e=[];t;)Xx(e,Pm(t)),t=Im(t);return e}:n1;function zT(t,e){return So(t,s1(t),e)}function i1(t,e,r){var n=e(t);return ls(t)?n:Xx(n,r(t))}function ef(t){return i1(t,Lm,Pm)}function FT(t){return i1(t,Eo,s1)}var tf=ms(Sr,"DataView"),rf=ms(Sr,"Promise"),nf=ms(Sr,"Set"),e0="[object Map]",HT="[object Object]",t0="[object Promise]",r0="[object Set]",n0="[object WeakMap]",s0="[object DataView]",WT=fs(tf),VT=fs(lo),GT=fs(rf),KT=fs(nf),JT=fs(Zh),Zt=Ii;(tf&&Zt(new tf(new ArrayBuffer(1)))!=s0||lo&&Zt(new lo)!=e0||rf&&Zt(rf.resolve())!=t0||nf&&Zt(new nf)!=r0||Zh&&Zt(new Zh)!=n0)&&(Zt=function(t){var e=Ii(t),r=e==HT?t.constructor:void 0,n=r?fs(r):"";if(n)switch(n){case WT:return s0;case VT:return e0;case GT:return t0;case KT:return r0;case JT:return n0}return e});var QT=Object.prototype,YT=QT.hasOwnProperty;function ZT(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&YT.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var jc=Sr.Uint8Array;function $m(t){var e=new t.constructor(t.byteLength);return new jc(e).set(new jc(t)),e}function XT(t,e){var r=e?$m(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var eC=/\w*$/;function tC(t){var e=new t.constructor(t.source,eC.exec(t));return e.lastIndex=t.lastIndex,e}var i0=An?An.prototype:void 0,a0=i0?i0.valueOf:void 0;function rC(t){return a0?Object(a0.call(t)):{}}function a1(t,e){var r=e?$m(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var nC="[object Boolean]",sC="[object Date]",iC="[object Map]",aC="[object Number]",oC="[object RegExp]",lC="[object Set]",cC="[object String]",uC="[object Symbol]",dC="[object ArrayBuffer]",hC="[object DataView]",fC="[object Float32Array]",mC="[object Float64Array]",pC="[object Int8Array]",gC="[object Int16Array]",yC="[object Int32Array]",vC="[object Uint8Array]",xC="[object Uint8ClampedArray]",bC="[object Uint16Array]",wC="[object Uint32Array]";function _C(t,e,r){var n=t.constructor;switch(e){case dC:return $m(t);case nC:case sC:return new n(+t);case hC:return XT(t,r);case fC:case mC:case pC:case gC:case yC:case vC:case xC:case bC:case wC:return a1(t,r);case iC:return new n;case aC:case cC:return new n(t);case oC:return tC(t);case lC:return new n;case uC:return rC(t)}}function o1(t){return typeof t.constructor=="function"&&!Am(t)?FS(Im(t)):{}}var NC="[object Map]";function jC(t){return Vr(t)&&Zt(t)==NC}var o0=_i&&_i.isMap,kC=o0?Om(o0):jC,SC="[object Set]";function EC(t){return Vr(t)&&Zt(t)==SC}var l0=_i&&_i.isSet,TC=l0?Om(l0):EC,CC=1,AC=2,OC=4,l1="[object Arguments]",RC="[object Array]",LC="[object Boolean]",IC="[object Date]",PC="[object Error]",c1="[object Function]",$C="[object GeneratorFunction]",DC="[object Map]",MC="[object Number]",u1="[object Object]",qC="[object RegExp]",UC="[object Set]",BC="[object String]",zC="[object Symbol]",FC="[object WeakMap]",HC="[object ArrayBuffer]",WC="[object DataView]",VC="[object Float32Array]",GC="[object Float64Array
351]",KC="[object Int8Array]",JC="[object Int16Array]",QC="[object Int32Array]",YC="[object Uint8Array]",ZC="[object Uint8ClampedArray]",XC="[object Uint16Array]",eA="[object Uint32Array]",ae={};ae[l1]=ae[RC]=ae[HC]=ae[WC]=ae[LC]=ae[IC]=ae[VC]=ae[GC]=ae[KC]=ae[JC]=ae[QC]=ae[DC]=ae[MC]=ae[u1]=ae[qC]=ae[UC]=ae[BC]=ae[zC]=ae[YC]=ae[ZC]=ae[XC]=ae[eA]=!0;ae[PC]=ae[c1]=ae[FC]=!1;function Vl(t,e,r,n,s,i){var a,l=e&CC,c=e&AC,u=e&OC;if(a!==void 0)return a;if(!In(t))return t;var h=ls(t);if(h){if(a=ZT(t),!l)return Hx(t,a)}else{var p=Zt(t),d=p==c1||p==$C;if(ao(t))return r1(t,l);if(p==u1||p==l1||d&&!s){if(a=c||d?{}:o1(t),!l)return c?zT(t,PT(a,t)):UT(t,IT(a,t))}else{if(!ae[p])return s?t:{};a=_C(t,p,l)}}i||(i=new xr);var m=i.get(t);if(m)return m;i.set(t,a),TC(t)?t.forEach(function(_){a.add(Vl(_,e,r,_,t,i))}):kC(t)&&t.forEach(function(_,g){a.set(g,Vl(_,e,r,g,t,i))});var x=u?c?FT:ef:c?Eo:Lm,b=h?void 0:x(t);return ZS(b||t,function(_,g){b&&(g=_,_=t[g]),Vx(a,g,Vl(_,e,r,g,t,i))}),a}var tA=1,rA=4;function hi(t){return Vl(t,tA|rA)}var nA="__lodash_hash_undefined__";function sA(t){return this.__data__.set(t,nA),this}function iA(t){return this.__data__.has(t)}function kc(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ps;++e<r;)this.add(t[e])}kc.prototype.add=kc.prototype.push=sA;kc.prototype.has=iA;function aA(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function oA(t,e){return t.has(e)}var lA=1,cA=2;function d1(t,e,r,n,s,i){var a=r&lA,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=i.get(t),h=i.get(e);if(u&&h)return u==e&&h==t;var p=-1,d=!0,m=r&cA?new kc:void 0;for(i.set(t,e),i.set(e,t);++p<l;){var x=t[p],b=e[p];if(n)var _=a?n(b,x,p,e,t,i):n(x,b,p,t,e,i);if(_!==void 0){if(_)continue;d=!1;break}if(m){if(!aA(e,function(g,y){if(!oA(m,y)&&(x===g||s(x,g,r,n,i)))return m.push(y)})){d=!1;break}}else if(!(x===b||s(x,b,r,n,i))){d=!1;break}}return i.delete(t),i.delete(e),d}function uA(t){var e=-1,r=Array(t.size);return t.forEach(function(n,s){r[++e]=[s,n]}),r}function dA(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var hA=1,fA=2,mA="[object Boolean]",pA="[object Date]",gA="[object Error]",yA="[object Map]",vA="[object Number]",xA="[object RegExp]",bA="[object Set]",wA="[object String]",_A="[object Symbol]",NA="[object ArrayBuffer]",jA="[object DataView]",c0=An?An.prototype:void 0,$d=c0?c0.valueOf:void 0;function kA(t,e,r,n,s,i,a){switch(r){case jA:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case NA:return!(t.byteLength!=e.byteLength||!i(new jc(t),new jc(e)));case mA:case pA:case vA:return ko(+t,+e);case gA:return t.name==e.name&&t.message==e.message;case xA:case wA:return t==e+"";case yA:var l=uA;case bA:var c=n&hA;if(l||(l=dA),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;n|=fA,a.set(t,e);var h=d1(l(t),l(e),n,s,i,a);return a.delete(t),h;case _A:if($d)return $d.call(t)==$d.call(e)}return!1}var SA=1,EA=Object.prototype,TA=EA.hasOwnProperty;function CA(t,e,r,n,s,i){var a=r&SA,l=ef(t),c=l.length,u=ef(e),h=u.length;if(c!=h&&!a)return!1;for(var p=c;p--;){var d=l[p];if(!(a?d in e:TA.call(e,d)))return!1}var m=i.get(t),x=i.get(e);if(m&&x)return m==e&&x==t;var b=!0;i.set(t,e),i.set(e,t);for(var _=a;++p<c;){d=l[p];var g=t[d],y=e[d];if(n)var v=a?n(y,g,d,e,t,i):n(g,y,d,t,e,i);if(!(v===void 0?g===y||s(g,y,r,n,i):v)){b=!1;break}_||(_=d=="constructor")}if(b&&!_){var j=t.constructor,S=e.constructor;j!=S&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof S=="function"&&S instanceof S)&&(b=!1)}return i.delete(t),i.delete(e),b}var AA=1,u0="[object Arguments]",d0="[object Array]",Sl="[object Object]",OA=Object.prototype,h0=OA.hasOwnProperty;function RA(t,e,r,n,s,i){var a=ls(t),l=ls(e),c=a?d0:Zt(t),u=l?d0:Zt(e);c=c==u0?Sl:c,u=u==u0?Sl:u;var h=c==Sl,p=u==Sl,d=c==u;if(d&&ao(t)){if(!ao(e))return!1;a=!0,h=!1}if(d&&!h)return i||(i=new xr),a||Rm(t)?d1(t,e,r,n,s,i):kA(t,e,c,r,n,s,i);if(!(r&AA)){var m=h&&h0.call(t,"__wrapped__"),x=p&&h0.call(e,"__wrapped__");
vendor: 5,204 bytes, line 351
351if(m||x){var b=m?t.value():t,_=x?e.value():e;return i||(i=new xr),s(b,_,r,n,i)}}return d?(i||(i=new xr),CA(t,e,r,n,s,i)):!1}function h1(t,e,r,n,s){return t===e?!0:t==null||e==null||!Vr(t)&&!Vr(e)?t!==t&&e!==e:RA(t,e,r,n,h1,s)}function LA(t){return function(e,r,n){for(var s=-1,i=Object(e),a=n(e),l=a.length;l--;){var c=a[++s];if(r(i[c],c,i)===!1)break}return e}}var IA=LA();function sf(t,e,r){(r!==void 0&&!ko(t[e],r)||r===void 0&&!(e in t))&&Cm(t,e,r)}function PA(t){return Vr(t)&&Yc(t)}function af(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function $A(t){return So(t,Eo(t))}function DA(t,e,r,n,s,i,a){var l=af(t,r),c=af(e,r),u=a.get(c);if(u){sf(t,r,u);return}var h=i?i(l,c,r+"",t,e,a):void 0,p=h===void 0;if(p){var d=ls(c),m=!d&&ao(c),x=!d&&!m&&Rm(c);h=c,d||m||x?ls(l)?h=l:PA(l)?h=Hx(l):m?(p=!1,h=r1(c,!0)):x?(p=!1,h=a1(c,!0)):h=[]:ET(c)||Xh(c)?(h=l,Xh(l)?h=$A(l):(!In(l)||Tm(l))&&(h=o1(c))):p=!1}p&&(a.set(c,h),s(h,c,n,i,a),a.delete(c)),sf(t,r,h)}function f1(t,e,r,n,s){t!==e&&IA(e,function(i,a){if(s||(s=new xr),In(i))DA(t,e,a,r,f1,n,s);else{var l=n?n(af(t,a),i,a+"",t,e,s):void 0;l===void 0&&(l=i),sf(t,a,l)}},Eo)}function Dm(t,e){return h1(t,e)}var En=oE(function(t,e,r){f1(t,e,r)}),z=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(z||{});class _r{constructor(e,r,n={}){this.attrName=e,this.keyName=r;const s=z.TYPE&z.ATTRIBUTE;this.scope=n.scope!=null?n.scope&z.LEVEL|s:z.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(r=>r.name)}add(e,r){return this.canAdd(e,r)?(e.setAttribute(this.keyName,r),!0):!1}canAdd(e,r){return this.whitelist==null?!0:typeof r=="string"?this.whitelist.indexOf(r.replace(/["']/g,""))>-1:this.whitelist.indexOf(r)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const r=e.getAttribute(this.keyName);return this.canAdd(e,r)&&r?r:""}}class fi extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const m1=class of{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,r=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(r){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,r)}return null}create(e,r,n){const s=this.query(r);if(s==null)throw new fi(`Unable to create ${r} blot`);const i=s,a=r instanceof Node||r.nodeType===Node.TEXT_NODE?r:i.create(n),l=new i(e,a,n);return of.blots.set(l.domNode,l),l}find(e,r=!1){return of.find(e,r)}query(e,r=z.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&z.LEVEL&z.BLOCK?n=this.types.block:e&z.LEVEL&z.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(n=this.classes[s],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&r&z.LEVEL&n.scope&&r&z.TYPE&n.scope?n:null}register(...e){return e.map(r=>{const n="blotName"in r,s="attrName"in r;if(!n&&!s)throw new fi("Invalid definition");if(n&&r.blotName==="abstract")throw new fi("Cannot register abstract class");const i=n?r.blotName:s?r.attrName:void 0;return this.types[i]=r,s?typeof r.keyName=="string"&&(this.attributes[r.keyName]=r):n&&(r.className&&(this.classes[r.className]=r),r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(a=>a.toUpperCase()):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(a=>{(this.tags[a]==null||r.className==null)&&(this.tags[a]=r)}))),r})}};m1.blots=new WeakMap;let Ni=m1;function f0(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(r=>r.indexOf(`${e}-`)===0)}class MA extends _r{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(r=>r.split("-").slice(0,-1).join("-"))}add(e,r){return this.canAdd(e,r)?(this.remove(e),e.classList.add(`${this.keyName}-${r}`),!0):!1}remove(e){f0(e,this.keyName).forEach(r=>{e.classList.remove(r)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const r=(f0(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,r)?r:""}}const ir=MA;function Dd(t){const e=t.split("-"),r=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+r}class qA extends _r{static keys(e){return(e.getAttribute("style")||"").split(";").map(r=>r.split(":")[0].trim())}add(e,r){return this.canAdd(e,r)?(e.style[Dd(this.keyName)]=r,!0):!1}remove(e){e.style[Dd(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const r=e.style[Dd(this.keyName)];return this.canAdd(e,r)?r:""}}const Pn=qA;class UA{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,r){r?e.add(this.domNode,r)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Ni.find(this.domNode);
vendor: 13,692 bytes, line 351
351if(e==null)return;const r=_r.keys(this.domNode),n=ir.keys(this.domNode),s=Pn.keys(this.domNode);r.concat(n).concat(s).forEach(i=>{const a=e.scroll.query(i,z.ATTRIBUTE);a instanceof _r&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(r=>{const n=this.attributes[r].value(this.domNode);e.format(r,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(r=>{this.attributes[r].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,r)=>(e[r]=this.attributes[r].value(this.domNode),e),{})}}const eu=UA,p1=class{constructor(e,r){this.scroll=e,this.domNode=r,Ni.blots.set(r,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new fi("Blot definition missing tagName");let r,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?r=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?r=document.createElement(n):r=document.createElement(this.tagName[0])):r=document.createElement(this.tagName),this.className&&r.classList.add(this.className),r}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Ni.blots.delete(this.domNode)}deleteAt(e,r){this.isolate(e,r).remove()}formatAt(e,r,n,s){const i=this.isolate(e,r);if(this.scroll.query(n,z.BLOT)!=null&&s)i.wrap(n,s);else if(this.scroll.query(n,z.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);i.wrap(a),a.format(n,s)}}insertAt(e,r,n){const s=n==null?this.scroll.create("text",r):this.scroll.create(r,n),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,r){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(r),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,r){const n=typeof e=="string"?this.scroll.create(e,r):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,r){return e===0?this:this.next}update(e,r){}wrap(e,r){const n=typeof e=="string"?this.scroll.create(e,r):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new fi(`Cannot wrap ${e}`);return n.appendChild(this),n}};p1.blotName="abstract";let g1=p1;const y1=class extends g1{static value(e){return!0}index(e,r){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(r,1):-1}position(e,r){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};y1.scope=z.INLINE_BLOT;let BA=y1;const Je=BA;class zA{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const r=e.slice(1);this.append(...r)}}at(e){const r=this.iterator();let n=r();for(;n&&e>0;)e-=1,n=r();return n}contains(e){const r=this.iterator();let n=r();for(;n;){if(n===e)return!0;n=r()}return!1}indexOf(e){const r=this.iterator();let n=r(),s=0;for(;n;){if(n===e)return s;s+=1,n=r()}return-1}insertBefore(e,r){e!=null&&(this.remove(e),e.next=r,r!=null?(e.prev=r.prev,r.prev!=null&&(r.prev.next=e),r.prev=e,r===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let r=0,n=this.head;for(;n!=null;){if(n===e)return r;r+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const r=e;return e!=null&&(e=e.next),r}}find(e,r=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(e<i||r&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=n()}return[null,0]}forEach(e){const r=this.iterator();let n=r();for(;n;)e(n),n=r()}forEachAt(e,r,n){if(r<=0)return;const[s,i]=this.find(e);let a=e-i;const l=this.iterator(s);let c=l();for(;c&&a<e+r;){const u=c.length();e>a?n(c,e-a,Math.min(r,a+u-e)):n(c,0,Math.min(u,e+r-a)),a+=u,c=l()}}map(e){return this.reduce((r,n)=>(r.push(e(n)),r),[])}reduce(e,r){const n=this.iterator();let s=n();for(;s;)r=e(r,s),s=n();return r}}function m0(t,e){const r=e.find(t);if(r)return r;try{return e.create(t)}catch{const n=e.create(z.INLINE);return Array.from(t.childNodes).forEach(s=>{n.domNode.appendChild(s)}),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach(),n}}const v1=class an extends g1{constructor(e,r){super(e,r),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,an.uiClass&&this.uiNode.classList.add(an.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new zA,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const r=m0(e,this.scroll);this.insertBefore(r,this.children.head||void 0)}catch(r){if(r instanceof fi)return;throw r}})}deleteAt(e,r){if(e===0&&r===this.length())return this.remove();this.children.forEachAt(e,r,(n,s,i)=>{n.deleteAt(s,i)})}descendant(e,r=0){const[n,s]=this.children.find(r);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,s]:n instanceof an?n.descendant(e,s):[null,-1]}descendants(e,r=0,n=Number.MAX_VALUE){let s=[],i=n;return this.children.forEachAt(r,n,(a,l,c)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&s.push(a),a instanceof an&&(s=s.concat(a.descendants(e,l,i))),i-=c}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(r=>{e||this.statics.allowedChildren.some(n=>r instanceof n)||(r.statics.scope===z.BLOCK_BLOT?(r.next!=null&&this.splitAfter(r),r.prev!=null&&this.splitAfter(r.prev),r.parent.unwrap(),e=!0):r instanceof an?r.unwrap():r.remove())})}formatAt(e,r,n,s){this.children.forEachAt(e,r,(i,a,l)=>{i.formatAt(a,l,n,s)})}insertAt(e,r,n){const[s,i]=this.children.find(e);if(s)s.insertAt(i,r,n);else{const a=n==null?this.scroll.create("text",r):this.scroll.create(r,n);this.appendChild(a)}}insertBefore(e,r){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,r||null),e.parent=this,r!=null&&(n=r.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,r)=>e+r.length(),0)}moveChildren(e,r){this.children.forEach(n=>{e.insertBefore(n,r)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const r=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(r)}else this.remove()}path(e,r=!1){const[n,s]=this.children.find(e,r),i=[[this,e]];return n instanceof an?i.concat(n.path(s,r)):(n!=null&&i.push([n,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,r){const n=typeof e=="string"?this.scroll.create(e,r):e;return n instanceof an&&this.moveChildren(n),super.replaceWith(n)}split(e,r=!1){if(!r){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,a)=>{const l=s.split(i,r);l!=null&&n.appendChild(l)}),n}splitAfter(e){const r=this.clone();for(;e.next!=null;)r.appendChild(e.next);return this.parent&&this.parent.insertBefore(r,this.next||void 0),r}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,r){const n=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(n.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(i);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,a)=>i===a?0:i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let a=null;i.nextSibling!=null&&(a=this.scroll.find(i.nextSibling));const l=m0(i,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};v1.uiClass="";let FA=v1;const rr=FA;function HA(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}const Us=class Bs extends rr{static create(e){return super.create(e)}static formats(e,r){const n=r.query(Bs.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,r){super(e,r),this.attributes=new eu(this.domNode)}format(e,r){if(e===this.statics.blotName&&!r)this.children.forEach(n=>{n instanceof Bs||(n=n.wrap(Bs.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,z.INLINE);if(n==null)return;n instanceof _r?this.attributes.attribute(n,r):r&&(e!==this.statics.blotName||this.formats()[e]!==r)&&this.replaceWith(e,r)}}formats(){const e=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(e[this.statics.blotName]=r),e}formatAt(e,r,n,s){this.formats()[n]!=null||this.scroll.query(n,z.ATTRIBUTE)?this.isolate(e,r).format(n,s):super.formatAt(e,r,n,s)}optimize(e){super.optimize(e);const r=this.formats();if(Object.keys(r).length===0)return this.unwrap();const n=this.next;n instanceof Bs&&n.prev===this&&HA(r,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,r){const n=super.replaceWith(e,r);return this.attributes.copy(n),n}update(e,r){super.update(e,r),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,r){const n=super.wrap(e,r);return n instanceof Bs&&this.attributes.move(n),n}};Us.allowedChildren=[Us,Je],Us.blotName="inline",Us.scope=z.INLINE_BLOT,Us.tagName="SPAN";let WA=Us;const Mm=WA,zs=class lf extends rr{static create(e){return super.create(e)}static formats(e,r){const n=r.query(lf.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,r){super(e,r),this.attributes=new eu(this.domNode)}format(e,r){const n=this.scroll.query(e,z.BLOCK);n!=null&&(n instanceof _r?this.attributes.attribute(n,r):e===this.statics.blotName&&!r?this.replaceWith(lf.blotName):r&&(e!==this.statics.blotName||this.formats()[e]!==r)&&this.replaceWith(e,r))}formats(){const e=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(e[this.statics.blotName]=r),e}formatAt(e,r,n,s){this.scroll.query(n,z.BLOCK)!=null?this.format(n,s):super.formatAt(e,r,n,s)}insertAt(e,r,n){if(n==null||this.scroll.query(r,z.INLINE)!=null)super.insertAt(e,r,n);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(r,n);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,r){const n=super.replaceWith(e,r);return this.attributes.copy(n),n}update(e,r){super.update(e,r),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};zs.blotName="block",zs.scope=z.BLOCK_BLOT,zs.tagName="P",zs.allowedChildren=[Mm,zs,Je];let VA=zs;const co=VA,cf=class extends rr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,r){super.deleteAt(e,r),this.enforceAllowedChildren()}formatAt(e,r,n,s){super.formatAt(e,r,n,s),this.enforceAllowedChildren()}insertAt(e,r,n){super.insertAt(e,r,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};cf.blotName="container",cf.scope=z.BLOCK_BLOT;let GA=cf;const tu=GA;class KA extends Je{static formats(e,r){}format(e,r){super.formatAt(0,this.length(),e,r)}formatAt(e,r,n,s){e===0&&r===this.length()?this.format(n,s):super.formatAt(e,r,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const _t=KA,JA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},QA=100,Fs=class extends rr{constructor(e,r){super(null,r),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,JA),this.attach()}create(e,r){return this.registry.create(this,e,r)}find(e,r=!1){const n=this.registry.find(e,r);return n?n.scroll===this?n:r?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,r=z.ANY){return this.registry.query(e,r)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,r){this.update(),e===0&&r===this.length()?this.children.forEac
vendor: 12,884 bytes, line 351
351h(n=>{n.remove()}):super.deleteAt(e,r)}formatAt(e,r,n,s){this.update(),super.formatAt(e,r,n,s)}insertAt(e,r,n){this.update(),super.insertAt(e,r,n)}optimize(e=[],r={}){super.optimize(r);const n=r.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(n.has(c.domNode)||n.set(c.domNode,[]),u&&i(c.parent))},a=c=>{n.has(c.domNode)&&(c instanceof rr&&c.children.forEach(a),n.delete(c.domNode),c.optimize(r))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=QA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const h=this.find(u.target,!0);h!=null&&(h.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(p=>{const d=this.find(p,!1);i(d,!1),d instanceof rr&&d.children.forEach(m=>{i(m,!1)})})):u.type==="attributes"&&i(h.prev)),i(h))}),this.children.forEach(a),l=Array.from(this.observer.takeRecords()),s=l.slice();s.length>0;)e.push(s.pop())}}update(e,r={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:n.has(i.domNode)?(n.get(i.domNode).push(s),null):(n.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&n.has(s.domNode)&&s.update(n.get(s.domNode)||[],r)}),r.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),r),this.optimize(e,r)}};Fs.blotName="scroll",Fs.defaultChild=co,Fs.allowedChildren=[co,tu],Fs.scope=z.BLOCK_BLOT,Fs.tagName="DIV";let YA=Fs;const qm=YA,uf=class x1 extends Je{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,r){super(e,r),this.text=this.statics.value(this.domNode)}deleteAt(e,r){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+r)}index(e,r){return this.domNode===e?r:-1}insertAt(e,r,n){n==null?(this.text=this.text.slice(0,e)+r+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,r,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof x1&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,r=!1){return[this.domNode,e]}split(e,r=!1){if(!r){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,r){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};uf.blotName="text",uf.scope=z.INLINE_BLOT;let ZA=uf;const Sc=ZA,XA=Object.freeze(Object.defineProperty({__proto__:null,Attributor:_r,AttributorStore:eu,BlockBlot:co,ClassAttributor:ir,ContainerBlot:tu,EmbedBlot:_t,InlineBlot:Mm,LeafBlot:Je,ParentBlot:rr,Registry:Ni,Scope:z,ScrollBlot:qm,StyleAttributor:Pn,TextBlot:Sc},Symbol.toStringTag,{value:"Module"}));var df={exports:{}},pt=-1,et=1,Te=0;function uo(t,e,r,n,s){if(t===e)return t?[[Te,t]]:[];if(r!=null){var i=l4(t,e,r);if(i)return i}var a=Um(t,e),l=t.substring(0,a);t=t.substring(a),e=e.substring(a),a=ru(t,e);var c=t.substring(t.length-a);t=t.substring(0,t.length-a),e=e.substring(0,e.length-a);var u=e4(t,e);return l&&u.unshift([Te,l]),c&&u.push([Te,c]),Bm(u,s),n&&n4(u),u}function e4(t,e){var r;if(!t)return[[et,e]];if(!e)return[[pt,t]];var n=t.length>e.length?t:e,s=t.length>e.length?e:t,i=n.indexOf(s);if(i!==-1)return r=[[et,n.substring(0,i)],[Te,s],[et,n.substring(i+s.length)]],t.length>e.length&&(r[0][0]=r[2][0]=pt),r;if(s.length===1)return[[pt,t],[et,e]];var a=r4(t,e);if(a){var l=a[0],c=a[1],u=a[2],h=a[3],p=a[4],d=uo(l,u),m=uo(c,h);return d.concat([[Te,p]],m)}return t4(t,e)}function t4(t,e){for(var r=t.length,n=e.length,s=Math.ceil((r+n)/2),i=s,a=2*s,l=new Array(a),c=new Array(a),u=0;u<a;u++)l[u]=-1,c[u]=-1;l[i+1]=0,c[i+1]=0;for(var h=r-n,p=h%2!==0,d=0,m=0,x=0,b=0,_=0;_<s;_++){for(var g=-_+d;g<=_-m;g+=2){var y=i+g,v;g===-_||g!==_&&l[y-1]<l[y+1]?v=l[y+1]:v=l[y-1]+1;for(var j=v-g;v<r&&j<n&&t.charAt(v)===e.charAt(j);)v++,j++;if(l[y]=v,v>r)m+=2;else if(j>n)d+=2;else if(p){var S=i+h-g;if(S>=0&&S<a&&c[S]!==-1){var N=r-c[S];if(v>=N)return p0(t,e,v,j)}}}for(var T=-_+x;T<=_-b;T+=2){var S=i+T,N;T===-_||T!==_&&c[S-1]<c[S+1]?N=c[S+1]:N=c[S-1]+1;for(var A=N-T;N<r&&A<n&&t.charAt(r-N-1)===e.charAt(n-A-1);)N++,A++;if(c[S]=N,N>r)b+=2;else if(A>n)x+=2;else if(!p){var y=i+h-T;if(y>=0&&y<a&&l[y]!==-1){var v=l[y],j=i+v-y;if(N=r-N,v>=N)return p0(t,e,v,j)}}}}return[[pt,t],[et,e]]}function p0(t,e,r,n){var s=t.substring(0,r),i=e.substring(0,n),a=t.substring(r),l=e.substring(n),c=uo(s,i),u=uo(a,l);return c.concat(u)}function Um(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var r=0,n=Math.min(t.length,e.length),s=n,i=0;r<s;)t.substring(i,s)==e.substring(i,s)?(r=s,i=r):n=s,s=Math.floor((n-r)/2+r);return b1(t.charCodeAt(s-1))&&s--,s}function g0(t,e){var r=t.length,n=e.length;if(r==0||n==0)return 0;r>n?t=t.substring(r-n):r<n&&(e=e.substring(0,r));var s=Math.min(r,n);if(t==e)return s;for(var i=0,a=1;;){var l=t.substring(s-a),c=e.indexOf(l);if(c==-1)return i;a+=c,(c==0||t.substring(s-a)==e.substring(0,a))&&(i=a,a++)}}function ru(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var r=0,n=Math.min(t.length,e.length),s=n,i=0;r<s;)t.substring(t.length-s,t.length-i)==e.substring(e.length-s,e.length-i)?(r=s,i=r):n=s,s=Math.floor((n-r)/2+r);return w1(t.charCodeAt(t.length-s))&&s--,s}function r4(t,e){var r=t.length>e.length?t:e,n=t.length>e.length?e:t;if(r.length<4||n.length*2<r.length)return null;function s(m,x,b){for(var _=m.substring(b,b+Math.floor(m.length/4)),g=-1,y="",v,j,S,N;(g=x.indexOf(_,g+1))!==-1;){var T=Um(m.substring(b),x.substring(g)),A=ru(m.substring(0,b),x.substring(0,g));y.length<A+T&&(y=x.substring(g-A,g)+x.substring(g,g+T),v=m.substring(0,b-A),j=m.substring(b+T),S=x.substring(0,g-A),N=x.substring(g+T))}return y.length*2>=m.length?[v,j,S,N,y]:null}var i=s(r,n,Math.ceil(r.length/4)),a=s(r,n,Math.ceil(r.length/2)),l;if(!i&&!a)return null;a?i?l=i[4].length>a[4].length?i:a:l=a:l=i;var c,u,h,p;t.length>e.length?(c=l[0],u=l[1],h=l[2],p=l[3]):(h=l[0],p=l[1],c=l[2],u=l[3]);var d=l[4];return[c,u,h,p,d]}function n4(t){for(var e=!1,r=[],n=0,s=null,i=0,a=0,l=0,c=0,u=0;i<t.length;)t[i][0]==Te?(r[n++]=i,a=c,l=u,c=0,u=0,s=t[i][1]):(t[i][0]==et?c+=t[i][1].length:u+=t[i][1].length,s&&s.length<=Math.max(a,l)&&s.length<=Math.max(c,u)&&(t.splice(r[n-1],0,[pt,s]),t[r[n-1]+1][0]=et,n--,n--,i=n>0?r[n-1]:-1,a=0,l=0,c=0,u=0,s=null,e=!0)),i++;for(e&&Bm(t),a4(t),i=1;i<t.length;){if(t[i-1][0]==pt&&t[i][0]==et){var h=t[i-1][1],p=t[i][1],d=g0(h,p),m=g0(p,h);d>=m?(d>=h.length/2||d>=p.length/2)&&(t.splice(i,0,[Te,p.substring(0,d)]),t[i-1][1]=h.substring(0,h.length-d),t[i+1][1]=p.substring(d),i++):(m>=h.length/2||m>=p.length/2)&&(t.splice(i,0,[Te,h.substring(0,m)]),t[i-1][0]=et,t[i-1][1]=p.substring(0,p.length-m),t[i+1][0]=pt,t[i+1][1]=h.substring(m),i++),i++}i++}}var y0=/[^a-zA-Z0-9]/,v0=/\s/,x0=/[\r\n]/,s4=/\n\r?\n$/,i4=/^\r?\n\r?\n/;function a4(t){function e(m,x){if(!m||!x)return 6;var b=m.charAt(m.length-1),_=x.charAt(0),g=b.match(y0),y=_.match(y0),v=g&&b.match(v0),j=y&&_.match(v0),S=v&&b.match(x0),N=j&&_.match(x0),T=S&&m.match(s4),A=N&&x.match(i4);return T||A?5:S||N?4:g&&!v&&j?3:v||j?2:g||y?1:0}for(var r=1;r<t.length-1;){if(t[r-1][0]==Te&&t[r+1][0]==Te){var n=t[r-1][1],s=t[r][1],i=t[r+1][1],a=ru(n,s);if(a){var l=s.substring(s.length-a);n=n.substring(0,n.length-a),s=l+s.substring(0,s.length-a),i=l+i}for(var c=n,u=s,h=i,p=e(n,s)+e(s,i);s.charAt(0)===i.charAt(0);){n+=s.charAt(0),s=s.substring(1)+i.charAt(0),i=i.substring(1);var d=e(n,s)+e(s,i);d>=p&&(p=d,c=n,u=s,h=i)}t[r-1][1]!=c&&(c?t[r-1][1]=c:(t.splice(r-1,1),r--),t[r][1]=u,h?t[r+1][1]=h:(t.splice(r+1,1),r--))}r++}}function Bm(t,e){t.push([Te,""]);for(var r=0,n=0,s=0,i="",a="",l;r<t.length;){if(r<t.length-1&&!t[r][1]){t.splice(r,1);continue}switch(t[r][0]){case et:s++,a+=t[r][1],r++;break;case pt:n++,i+=t[r][1],r++;break;case Te:var c=r-s-n-1;if(e){if(c>=0&&N1(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),i=u+i,a=u+a,!t[c][1]){t.splice(c,1),r--;var h=c-1;t[h]&&t[h][0]===et&&(s++,a=t[h][1]+a,h--),t[h]&&t[h][0]===pt&&(n++,i=t[h][1]+i,h--),c=h}}if(_1(t[r][1])){var u=t[r][1].charAt(0);t[r][1]=t[r][1].slice(1),i+=u,a+=u}}if(r<t.length-1&&!t[r][1]){t.splice(r,1);break}if(i.length>0||a.length>0){i.length>0&&a.length>0&&(l=Um(a,i),l!==0&&(c>=0?t[c][1]+=a.substring(0,l):(t.splice(0,0,[Te,a.substring(0,l)]),r++),a=a.substring(l),i=i.substring(l)),l=ru(a,i),l!==0&&(t[r][1]=a.substring(a.length-l)+t[r][1],a=a.substring(0,a.length-l),i=i.substring(0,i.length-l)));var p=s+n;i.length===0&&a.length===0?(t.splice(r-p,p),r=r-p):i.length===0?(t.splice(r-p,p,[et,a]),r=r-p+1):a.length===0?(t.splice(r-p,p,[pt,i]),r=r-p+1):(t.splice(r-p,p,[pt,i],[et,a]),r=r-p+2)}r!==0&&t[r-1][0]===Te?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,s=0,n=0,i="",a="";break}}t[t.length-1][1]===""&&t.pop();var d=!1;for(r=1;r<t.length-1;)t[r-1][0]===Te&&t[r+1][0]===Te&&(t[r][1].substring(t[r][1].length-t[r-1][1].length)===t[r-1][1]?(t[r][1]=t[r-1][1]+t[r][1].substring(0,t[r][1].length-t[r-1][1].length),t[r+1][1]=t[r-1][1]+t[r+1][1],t.splice(r-1,1),d=!0):t[r][1].substring(0,t[r+1][1].length)==t[r+1][1]&&(t[r-1][1]+=t[r+1][1],t[r][1]=t[r][1].substring(t[r+1][1].length)+t[r+1][1],t.splice(r+1,1),d=!0)),r++;d&&Bm(t,e)}function b1(t){return t>=55296&&t<=56319}function w1(t){return t>=56320&&t<=57343}function _1(t){return w1(t.charCodeAt(0))}function N1(t){return b1(t.charCodeAt(t.length-1))}function o4(t){for(var e=[],r=0;r<t.length;r++)t[r][1].length>0&&e.push(t[r]);return e}function Md(t,e,r,n){return N1(t)||_1(n)?null:o4([[Te,t],[pt,e],[et,r],[Te,n]])}function l4(t,e,r){var n=typeof r=="number"?{index:r,length:0}:r.oldRange,s=typeof r=="number"?null:r.newRange,i=t.length,a=e.length;if(n.length===0&&(s===null||s.length===0)){var l=n.index,c=t.slice(0,l),u=t.slice(l),h=s?s.index:null;e:{var p=l+a-i;if(h!==null&&h!==p||p<0||p>a)break e;var d=e.slice(0,p),m=e.slice(p);if(m!==u)break e;var x=Math.min(l,p),b=c.slice(0,x),_=d.slice(0,x);if(b!==_)break e;var g=c.slice(x),y=d.slice(x);return Md(b,g,y,u)}e:{if(h!==null&&h!==l)break e;var v=l,d=e.slice(0,v),m=e.slice(v);if(d!==c)break e;var j=Math.min(i-v,a-v),S=u.slice(u.length-j),N=m.slice(m.length-j);if(S!==N)break e;var g=u.slice(0,u.length-j),y=m.slice(0,m.length-j);return Md(c,g,y,S)}}if(n.length>0&&s&&s.length===0)e:{var b=t.slice(0,n.index),S=t.slice(n.index+n.length),x=b.length,j=S.length;if(a<x+j)break e;var _=e.slice(0,x),N=e.slice(a-j);if(b!==_||S!==N)break e;var g=t.slice(x,i-j),y=e.slice(x,a-j);return Md(b,g,y,S)}return null}function nu(t,e,r,n){return uo(t,e,r,n,!0)}nu.INSERT=et;nu.DELETE=pt;nu.EQUAL=Te;var c4=nu,Ec={exports:{}};Ec.exports;(function(t,e){var r=200,n="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Function]",p="[object GeneratorFunction]",d="[object Map]",m="[object Number]",x="[object Object]",b="[object Promise]",_="[object RegExp]",g="[object Set]",y="[object String]",v="[object Symbol]",j="[object WeakMap]",S="[object ArrayBuffer]",N="[object DataView]",T="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",U="[object Int16Array]",R="[object Int32Array]",Q="[object Uint8Array]",he="[object Uint8ClampedArray]",Ae="[object Uint16Array]",en="[object Uint32Array]",qt=/[\\^$.*+?()[\]{}|]/g,$n=/\w*$/,$=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,D={};D[i]=D[a]=D[S]=D[N]=D[l]=D[c]=D[T]=D[A]=D[P]=D[U]=D[R]=D[d]=D[m]=D[x]=D[_]=D[g]=D[y]=D[v]=D[Q]=D[he]=D[Ae]=D[en]=!0,D[u]=D[h]=D[j]=!1;var le=typeof fn=="object"&&fn&&fn.Object===Object&&fn,ve=typeof self=="object"&&self&&self.Object===Object&&self,ze=le||ve||Function("return this")(),Nt=e&&!e.nodeType&&e,ee=Nt&&!0&&t&&!t.nodeType&&t,jt=ee&&ee.exports===Nt;function tn(f,w){return f.set(w[0],w[1]),f}function Ut(f,w){return f.add(w),f}function Ro(f,w){for(var k=-1,C=f?f.length:0;++k<C&&w(f[k],k,f)!==!1;);return f}function Lo(f,w){for(var k=-1,C=w.length,J=f.length;++k<C;)f[J+k]=w[k];return f}function Pi(f,w,k,C){for(var J=-1,H=f?f.length:0;++J<H;)k=w(k,f[J],J,f);return k}function $i(f,w){for(var k=-1,C=Array(f);++k<f;)C[k]=w(k);return C}function Io(f,w){return f==null?void 0:f[w]}function Di(f){var w=!1;if(f!=null&&typeof f.toString!="function")try{w=!!(f+"")}catch{}return w}function Po(f){var w=-1,k=Array(f.size);return f.forEach(function(C,J){k[++w]=[J,C]}),k}function Mi(f,w){return function(k){return f(w(k))}}function $o(f){var w=-1,k=Array(f.size);return f.forEach(function(C){k[++w]=C}),k}var lu=Array.prototype,cu=Function.prototype,xs=Object.prototype,qi=ze["__core-js_shared__"],Do=function(){var f=/[^.]+$/.exec(qi&&qi.keys&&qi.keys.IE_PROTO||"");
vendor: 5,625 bytes, line 351
351return f?"Symbol(src)_1."+f:""}(),Mo=cu.toString,lr=xs.hasOwnProperty,bs=xs.toString,uu=RegExp("^"+Mo.call(lr).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dn=jt?ze.Buffer:void 0,ws=ze.Symbol,Ui=ze.Uint8Array,kt=Mi(Object.getPrototypeOf,Object),qo=Object.create,Uo=xs.propertyIsEnumerable,du=lu.splice,Bi=Object.getOwnPropertySymbols,_s=Dn?Dn.isBuffer:void 0,Bo=Mi(Object.keys,Object),Ns=zt(ze,"DataView"),Mn=zt(ze,"Map"),Bt=zt(ze,"Promise"),js=zt(ze,"Set"),zi=zt(ze,"WeakMap"),qn=zt(Object,"create"),Fi=Ze(Ns),Un=Ze(Mn),Hi=Ze(Bt),Wi=Ze(js),Vi=Ze(zi),rn=ws?ws.prototype:void 0,zo=rn?rn.valueOf:void 0;function Er(f){var w=-1,k=f?f.length:0;for(this.clear();++w<k;){var C=f[w];this.set(C[0],C[1])}}function hu(){this.__data__=qn?qn(null):{}}function fu(f){return this.has(f)&&delete this.__data__[f]}function mu(f){var w=this.__data__;if(qn){var k=w[f];return k===n?void 0:k}return lr.call(w,f)?w[f]:void 0}function Fo(f){var w=this.__data__;return qn?w[f]!==void 0:lr.call(w,f)}function Gi(f,w){var k=this.__data__;return k[f]=qn&&w===void 0?n:w,this}Er.prototype.clear=hu,Er.prototype.delete=fu,Er.prototype.get=mu,Er.prototype.has=Fo,Er.prototype.set=Gi;function Ie(f){var w=-1,k=f?f.length:0;for(this.clear();++w<k;){var C=f[w];this.set(C[0],C[1])}}function pu(){this.__data__=[]}function gu(f){var w=this.__data__,k=Ss(w,f);if(k<0)return!1;var C=w.length-1;return k==C?w.pop():du.call(w,k,1),!0}function yu(f){var w=this.__data__,k=Ss(w,f);return k<0?void 0:w[k][1]}function vu(f){return Ss(this.__data__,f)>-1}function xu(f,w){var k=this.__data__,C=Ss(k,f);return C<0?k.push([f,w]):k[C][1]=w,this}Ie.prototype.clear=pu,Ie.prototype.delete=gu,Ie.prototype.get=yu,Ie.prototype.has=vu,Ie.prototype.set=xu;function Fe(f){var w=-1,k=f?f.length:0;for(this.clear();++w<k;){var C=f[w];this.set(C[0],C[1])}}function bu(){this.__data__={hash:new Er,map:new(Mn||Ie),string:new Er}}function wu(f){return zn(this,f).delete(f)}function _u(f){return zn(this,f).get(f)}function Nu(f){return zn(this,f).has(f)}function ju(f,w){return zn(this,f).set(f,w),this}Fe.prototype.clear=bu,Fe.prototype.delete=wu,Fe.prototype.get=_u,Fe.prototype.has=Nu,Fe.prototype.set=ju;function st(f){this.__data__=new Ie(f)}function ku(){this.__data__=new Ie}function Su(f){return this.__data__.delete(f)}function Eu(f){return this.__data__.get(f)}function Tu(f){return this.__data__.has(f)}function Cu(f,w){var k=this.__data__;if(k instanceof Ie){var C=k.__data__;if(!Mn||C.length<r-1)return C.push([f,w]),this;k=this.__data__=new Fe(C)}return k.set(f,w),this}st.prototype.clear=ku,st.prototype.delete=Su,st.prototype.get=Eu,st.prototype.has=Tu,st.prototype.set=Cu;function ks(f,w){var k=Yi(f)||Ts(f)?$i(f.length,String):[],C=k.length,J=!!C;for(var H in f)lr.call(f,H)&&!(J&&(H=="length"||Fu(H,C)))&&k.push(H);return k}function Ho(f,w,k){var C=f[w];(!(lr.call(f,w)&&Jo(C,k))||k===void 0&&!(w in f))&&(f[w]=k)}function Ss(f,w){for(var k=f.length;k--;)if(Jo(f[k][0],w))return k;return-1}function cr(f,w){return f&&Qi(w,Xi(w),f)}function Ki(f,w,k,C,J,H,te){var Z;if(C&&(Z=H?C(f,J,H,te):C(f)),Z!==void 0)return Z;if(!dr(f))return f;var _e=Yi(f);if(_e){if(Z=Bu(f),!w)return Mu(f,Z)}else{var ne=Cr(f),He=ne==h||ne==p;if(Qo(f))return Es(f,w);if(ne==x||ne==i||He&&!H){if(Di(f))return H?f:{};if(Z=ur(He?{}:f),!w)return qu(f,cr(Z,f))}else{if(!D[ne])return H?f:{};Z=zu(f,ne,Ki,w)}}te||(te=new st);var it=te.get(f);if(it)return it;if(te.set(f,Z),!_e)var ke=k?Uu(f):Xi(f);return Ro(ke||f,function(We,Pe){ke&&(Pe=We,We=f[Pe]),Ho(Z,Pe,Ki(We,w,k,C,Pe,f,te))}),Z}function Au(f){return dr(f)?qo(f):{}}function Ou(f,w,k){var C=w(f);return Yi(f)?C:Lo(C,k(f))}function Ru(f){return bs.call(f)}function Lu(f){if(!dr(f)||Wu(f))return!1;var w=Zi(f)||Di(f)?uu:$;return w.test(Ze(f))}function Iu(f){if(!Go(f))return Bo(f);var w=[];for(var k in Object(f))lr.call(f,k)&&k!="constructor"&&w.push(k);return w}function Es(f,w){if(w)return f.slice();var k=new f.constructor(f.length);return f.copy(k),k}function Ji(f){var w=new f.constructor(f.byteLength);return new Ui(w).set(new Ui(f)),w}function Bn(f,w){var k=w?Ji(f.buffer):f.buffer;return new f.constructor(k,f.byteOffset,f.byteLength)}function Wo(f,w,k){var C=w?k(Po(f),!0):Po(f);return Pi(C,tn,new f.constructor)}function Vo(f){var w=new f.constructor(f.source,$n.exec(f));return w.lastIndex=f.lastIndex,w}function Pu(f,w,k){var C=w?k($o(f),!0):$o(f);return Pi(C,Ut,new f.constructor)}function $u(f){return zo?Object(zo.call(f)):{}}function Du(f,w){var k=w?Ji(f.buffer):f.buffer;return new f.constructor(k,f.byteOffset,f.length)}function Mu(f,w){var k=-1,C=f.length;for(w||(w=Array(C));++k<C;)w[k]=f[k];return w}function Qi(f,w,k,C){k||(k={});for(var J=-1,H=w.length;++J<H;){var te=w[J],Z=void 0;Ho(k,te,Z===void 0?f[te]:Z)}return k}function qu(f,w){return Qi(f,Tr(f),w)}function Uu(f){return Ou(f,Xi,Tr)}function zn(f,w){var k=f.__data__;return Hu(w)?k[typeof w=="string"?"string":"hash"]:k.map}function zt(f,w){var k=Io(f,w);return Lu(k)?k:void 0}var Tr=Bi?Mi(Bi,Object):Gu,Cr=Ru;(Ns&&Cr(new Ns(new ArrayBuffer(1)))!=N||Mn&&Cr(new Mn)!=d||Bt&&Cr(Bt.resolve())!=b||js&&Cr(new js)!=g||zi&&Cr(new zi)!=j)&&(Cr=function(f){var w=bs.call(f),k=w==x?f.constructor:void 0,C=k?Ze(k):void 0;if(C)switch(C){case Fi:return N;case Un:return d;case Hi:return b;case Wi:return g;case Vi:return j}return w});function Bu(f){var w=f.length,k=f.constructor(w);return w&&typeof f[0]=="string"&&lr.call(f,"index")&&(k.index=f.index,k.input=f.input),k}function ur(f){return typeof f.constructor=="function"&&!Go(f)?Au(kt(f)):{}}function zu(f,w,k,C){var J=f.constructor;switch(w){case S:return Ji(f);
vendor: 12,605 bytes, line 351
351case l:case c:return new J(+f);case N:return Bn(f,C);case T:case A:case P:case U:case R:case Q:case he:case Ae:case en:return Du(f,C);case d:return Wo(f,C,k);case m:case y:return new J(f);case _:return Vo(f);case g:return Pu(f,C,k);case v:return $u(f)}}function Fu(f,w){return w=w??s,!!w&&(typeof f=="number"||K.test(f))&&f>-1&&f%1==0&&f<w}function Hu(f){var w=typeof f;return w=="string"||w=="number"||w=="symbol"||w=="boolean"?f!=="__proto__":f===null}function Wu(f){return!!Do&&Do in f}function Go(f){var w=f&&f.constructor,k=typeof w=="function"&&w.prototype||xs;return f===k}function Ze(f){if(f!=null){try{return Mo.call(f)}catch{}try{return f+""}catch{}}return""}function Ko(f){return Ki(f,!0,!0)}function Jo(f,w){return f===w||f!==f&&w!==w}function Ts(f){return Vu(f)&&lr.call(f,"callee")&&(!Uo.call(f,"callee")||bs.call(f)==i)}var Yi=Array.isArray;function Cs(f){return f!=null&&Yo(f.length)&&!Zi(f)}function Vu(f){return Zo(f)&&Cs(f)}var Qo=_s||Ku;function Zi(f){var w=dr(f)?bs.call(f):"";return w==h||w==p}function Yo(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=s}function dr(f){var w=typeof f;return!!f&&(w=="object"||w=="function")}function Zo(f){return!!f&&typeof f=="object"}function Xi(f){return Cs(f)?ks(f):Iu(f)}function Gu(){return[]}function Ku(){return!1}t.exports=Ko})(Ec,Ec.exports);var j1=Ec.exports,Tc={exports:{}};Tc.exports;(function(t,e){var r=200,n="__lodash_hash_undefined__",s=1,i=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",d="[object Error]",m="[object Function]",x="[object GeneratorFunction]",b="[object Map]",_="[object Number]",g="[object Null]",y="[object Object]",v="[object Promise]",j="[object Proxy]",S="[object RegExp]",N="[object Set]",T="[object String]",A="[object Symbol]",P="[object Undefined]",U="[object WeakMap]",R="[object ArrayBuffer]",Q="[object DataView]",he="[object Float32Array]",Ae="[object Float64Array]",en="[object Int8Array]",qt="[object Int16Array]",$n="[object Int32Array]",$="[object Uint8Array]",K="[object Uint8ClampedArray]",D="[object Uint16Array]",le="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,ze=/^\[object .+?Constructor\]$/,Nt=/^(?:0|[1-9]\d*)$/,ee={};ee[he]=ee[Ae]=ee[en]=ee[qt]=ee[$n]=ee[$]=ee[K]=ee[D]=ee[le]=!0,ee[l]=ee[c]=ee[R]=ee[h]=ee[Q]=ee[p]=ee[d]=ee[m]=ee[b]=ee[_]=ee[y]=ee[S]=ee[N]=ee[T]=ee[U]=!1;var jt=typeof fn=="object"&&fn&&fn.Object===Object&&fn,tn=typeof self=="object"&&self&&self.Object===Object&&self,Ut=jt||tn||Function("return this")(),Ro=e&&!e.nodeType&&e,Lo=Ro&&!0&&t&&!t.nodeType&&t,Pi=Lo&&Lo.exports===Ro,$i=Pi&&jt.process,Io=function(){try{return $i&&$i.binding&&$i.binding("util")}catch{}}(),Di=Io&&Io.isTypedArray;function Po(f,w){for(var k=-1,C=f==null?0:f.length,J=0,H=[];++k<C;){var te=f[k];w(te,k,f)&&(H[J++]=te)}return H}function Mi(f,w){for(var k=-1,C=w.length,J=f.length;++k<C;)f[J+k]=w[k];return f}function $o(f,w){for(var k=-1,C=f==null?0:f.length;++k<C;)if(w(f[k],k,f))return!0;return!1}function lu(f,w){for(var k=-1,C=Array(f);++k<f;)C[k]=w(k);return C}function cu(f){return function(w){return f(w)}}function xs(f,w){return f.has(w)}function qi(f,w){return f==null?void 0:f[w]}function Do(f){var w=-1,k=Array(f.size);return f.forEach(function(C,J){k[++w]=[J,C]}),k}function Mo(f,w){return function(k){return f(w(k))}}function lr(f){var w=-1,k=Array(f.size);return f.forEach(function(C){k[++w]=C}),k}var bs=Array.prototype,uu=Function.prototype,Dn=Object.prototype,ws=Ut["__core-js_shared__"],Ui=uu.toString,kt=Dn.hasOwnProperty,qo=function(){var f=/[^.]+$/.exec(ws&&ws.keys&&ws.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""}(),Uo=Dn.toString,du=RegExp("^"+Ui.call(kt).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bi=Pi?Ut.Buffer:void 0,_s=Ut.Symbol,Bo=Ut.Uint8Array,Ns=Dn.propertyIsEnumerable,Mn=bs.splice,Bt=_s?_s.toStringTag:void 0,js=Object.getOwnPropertySymbols,zi=Bi?Bi.isBuffer:void 0,qn=Mo(Object.keys,Object),Fi=Tr(Ut,"DataView"),Un=Tr(Ut,"Map"),Hi=Tr(Ut,"Promise"),Wi=Tr(Ut,"Set"),Vi=Tr(Ut,"WeakMap"),rn=Tr(Object,"create"),zo=Ze(Fi),Er=Ze(Un),hu=Ze(Hi),fu=Ze(Wi),mu=Ze(Vi),Fo=_s?_s.prototype:void 0,Gi=Fo?Fo.valueOf:void 0;function Ie(f){var w=-1,k=f==null?0:f.length;for(this.clear();++w<k;){var C=f[w];this.set(C[0],C[1])}}function pu(){this.__data__=rn?rn(null):{},this.size=0}function gu(f){var w=this.has(f)&&delete this.__data__[f];return this.size-=w?1:0,w}function yu(f){var w=this.__data__;if(rn){var k=w[f];return k===n?void 0:k}return kt.call(w,f)?w[f]:void 0}function vu(f){var w=this.__data__;return rn?w[f]!==void 0:kt.call(w,f)}function xu(f,w){var k=this.__data__;return this.size+=this.has(f)?0:1,k[f]=rn&&w===void 0?n:w,this}Ie.prototype.clear=pu,Ie.prototype.delete=gu,Ie.prototype.get=yu,Ie.prototype.has=vu,Ie.prototype.set=xu;function Fe(f){var w=-1,k=f==null?0:f.length;for(this.clear();++w<k;){var C=f[w];this.set(C[0],C[1])}}function bu(){this.__data__=[],this.size=0}function wu(f){var w=this.__data__,k=Es(w,f);if(k<0)return!1;var C=w.length-1;return k==C?w.pop():Mn.call(w,k,1),--this.size,!0}function _u(f){var w=this.__data__,k=Es(w,f);return k<0?void 0:w[k][1]}function Nu(f){return Es(this.__data__,f)>-1}function ju(f,w){var k=this.__data__,C=Es(k,f);return C<0?(++this.size,k.push([f,w])):k[C][1]=w,this}Fe.prototype.clear=bu,Fe.prototype.delete=wu,Fe.prototype.get=_u,Fe.prototype.has=Nu,Fe.prototype.set=ju;function st(f){var w=-1,k=f==null?0:f.length;for(this.clear();++w<k;){var C=f[w];this.set(C[0],C[1])}}function ku(){this.size=0,this.__data__={hash:new Ie,map:new(Un||Fe),string:new Ie}}function Su(f){var w=zt(this,f).delete(f);return this.size-=w?1:0,w}function Eu(f){return zt(this,f).get(f)}function Tu(f){return zt(this,f).has(f)}function Cu(f,w){var k=zt(this,f),C=k.size;return k.set(f,w),this.size+=k.size==C?0:1,this}st.prototype.clear=ku,st.prototype.delete=Su,st.prototype.get=Eu,st.prototype.has=Tu,st.prototype.set=Cu;function ks(f){var w=-1,k=f==null?0:f.length;for(this.__data__=new st;++w<k;)this.add(f[w])}function Ho(f){return this.__data__.set(f,n),this}function Ss(f){return this.__data__.has(f)}ks.prototype.add=ks.prototype.push=Ho,ks.prototype.has=Ss;function cr(f){var w=this.__data__=new Fe(f);this.size=w.size}function Ki(){this.__data__=new Fe,this.size=0}function Au(f){var w=this.__data__,k=w.delete(f);return this.size=w.size,k}function Ou(f){return this.__data__.get(f)}function Ru(f){return this.__data__.has(f)}function Lu(f,w){var k=this.__data__;if(k instanceof Fe){var C=k.__data__;if(!Un||C.length<r-1)return C.push([f,w]),this.size=++k.size,this;k=this.__data__=new st(C)}return k.set(f,w),this.size=k.size,this}cr.prototype.clear=Ki,cr.prototype.delete=Au,cr.prototype.get=Ou,cr.prototype.has=Ru,cr.prototype.set=Lu;function Iu(f,w){var k=Ts(f),C=!k&&Jo(f),J=!k&&!C&&Cs(f),H=!k&&!C&&!J&&Zo(f),te=k||C||J||H,Z=te?lu(f.length,String):[],_e=Z.length;for(var ne in f)kt.call(f,ne)&&!(te&&(ne=="length"||J&&(ne=="offset"||ne=="parent")||H&&(ne=="buffer"||ne=="byteLength"||ne=="byteOffset")||zu(ne,_e)))&&Z.push(ne);return Z}function Es(f,w){for(var k=f.length;k--;)if(Ko(f[k][0],w))return k;return-1}function Ji(f,w,k){var C=w(f);return Ts(f)?C:Mi(C,k(f))}function Bn(f){return f==null?f===void 0?P:g:Bt&&Bt in Object(f)?Cr(f):Go(f)}function Wo(f){return dr(f)&&Bn(f)==l}function Vo(f,w,k,C,J){return f===w?!0:f==null||w==null||!dr(f)&&!dr(w)?f!==f&&w!==w:Pu(f,w,k,C,Vo,J)}function Pu(f,w,k,C,J,H){var te=Ts(f),Z=Ts(w),_e=te?c:ur(f),ne=Z?c:ur(w);_e=_e==l?y:_e,ne=ne==l?y:ne;var He=_e==y,it=ne==y,ke=_e==ne;if(ke&&Cs(f)){if(!Cs(w))return!1;te=!0,He=!1}if(ke&&!He)return H||(H=new cr),te||Zo(f)?Qi(f,w,k,C,J,H):qu(f,w,_e,k,C,J,H);if(!(k&s)){var We=He&&kt.call(f,"__wrapped__"),Pe=it&&kt.call(w,"__wrapped__");if(We||Pe){var nn=We?f.value():f,Ar=Pe?w.value():w;return H||(H=new cr),J(nn,Ar,k,C,H)}}return ke?(H||(H=new cr),Uu(f,w,k,C,J,H)):!1}function $u(f){if(!Yo(f)||Hu(f))return!1;var w=Qo(f)?du:ze;return w.test(Ze(f))}function Du(f){return dr(f)&&Zi(f.length)&&!!ee[Bn(f)]}function Mu(f){if(!Wu(f))return qn(f);var w=[];for(var k in Object(f))kt.call(f,k)&&k!="constructor"&&w.push(k);return w}function Qi(f,w,k,C,J,H){var te=k&s,Z=f.length,_e=w.length;if(Z!=_e&&!(te&&_e>Z))return!1;var ne=H.get(f);if(ne&&H.get(w))return ne==w;var He=-1,it=!0,ke=k&i?new ks:void 0;for(H.set(f,w),H.set(w,f);++He<Z;){var We=f[He],Pe=w[He];if(C)var nn=te?C(Pe,We,He,w,f,H):C(We,Pe,He,f,w,H);if(nn!==void 0){if(nn)continue;it=!1;break}if(ke){if(!$o(w,function(Ar,Fn){if(!xs(ke,Fn)&&(We===Ar||J(We,Ar,k,C,H)))return ke.push(Fn)})){it=!1;break}}else if(!(We===Pe||J(We,Pe,k,C,H))){it=!1;break}}return H.delete(f),H.delete(w),it}function qu(f,w,k,C,J,H,te){switch(k){case Q:if(f.byteLength!=w.byteLength||f.byteOffset!=w.byteOffset)return!1;f=f.buffer,w=w.buffer;case R:return!(f.byteLength!=w.byteLength||!H(new Bo(f),new Bo(w)));case h:case p:case _:return Ko(+f,+w);case d:return f.name==w.name&&f.message==w.message;case S:case T:return f==w+"";case b:var Z=Do;case N:var _e=C&s;if(Z||(Z=lr),f.size!=w.size&&!_e)return!1;var ne=te.get(f);if(ne)return ne==w;C|=i,te.set(f,w);var He=Qi(Z(f),Z(w),C,J,H,te);return te.delete(f),He;case A:if(Gi)return Gi.call(f)==Gi.call(w)}return!1}function Uu(f,w,k,C,J,H){var te=k&s,Z=zn(f),_e=Z.length,ne=zn(w),He=ne.length;if(_e!=He&&!te)return!1;for(var it=_e;it--;){var ke=Z[it];if(!(te?ke in w:kt.call(w,ke)))return!1}var We=H.get(f);if(We&&H.get(w))return We==w;var Pe=!0;H.set(f,w),H.set(w,f);for(var nn=te;++it<_e;){ke=Z[it];var Ar=f[ke],Fn=w[ke];if(C)var ep=te?C(Fn,Ar,ke,w,f,H):C(Ar,Fn,ke,f,w,H);if(!(ep===void 0?Ar===Fn||J(Ar,Fn,k,C,H):ep)){Pe=!1;break}nn||(nn=ke=="constructor")}if(Pe&&!nn){var Xo=f.constructor,el=w.constructor;Xo!=el&&"constructor"in f&&"constructor"in w&&!(typeof Xo=="function"&&Xo instanceof Xo&&typeof el=="function"&&el instanceof el)&&(Pe=!1)}return H.delete(f),H.delete(w),Pe}function zn(f){return Ji(f,Xi,Bu)}function zt(f,w){var k=f.__data__;return Fu(w)?k[typeof w=="string"?"string":"hash"]:k.map}function Tr(f,w){var k=qi(f,w);return $u(k)?k:void 0}function Cr(f){var w=kt.call(f,Bt),k=f[Bt];try{f[Bt]=void 0;var C=!0}catch{}var J=Uo.call(f);return C&&(w?f[Bt]=k:delete f[Bt]),J}var Bu=js?function(f){return f==null?[]:(f=Object(f),Po(js(f),function(w){return Ns.call(f,w)}))}:Gu,ur=Bn;(Fi&&ur(new Fi(new ArrayBuffer(1)))!=Q||Un&&ur(new Un)!=b||Hi&&ur(Hi.resolve())!=v||Wi&&ur(new Wi)!=N||Vi&&ur(new Vi)!=U)&&(ur=function(f){var w=Bn(f),k=w==y?f.constructor:void 0,C=k?Ze(k):"";if(C)switch(C){case zo:return Q;case Er:return b;case hu:return v;case fu:return N;case mu:return U}return w});function zu(f,w){return w=w??a,!!w&&(typeof f=="number"||Nt.test(f))&&f>-1&&f%1==0&&f<w}function Fu(f){var w=typeof f;return w=="string"||w=="number"||w=="symbol"||w=="boolean"?f!=="__proto__":f===null}function Hu(f){return!!qo&&qo in f}function Wu(f){var w=f&&f.constructor,k=typeof w=="function"&&w.prototype||Dn;return f===k}function Go(f){return Uo.call(f)}function Ze(f){if(f!=null){try{return Ui.call(f)}catch{}try{return f+""}catch{}}return""}function Ko(f,w){return f===w||f!==f&&w!==w}var Jo=Wo(function(){return arguments}())?Wo:function(f){return dr(f)&&kt.call(f,"callee")&&!Ns.call(f,"callee")},Ts=Array.isArray;function Yi(f){return f!=null&&Zi(f.length)&&!Qo(f)}var Cs=zi||Ku;function Vu(f,w){return Vo(f,w)}function Qo(f){if(!Yo(f))return!1;var w=Bn(f);return w==m||w==x||w==u||w==j}function Zi(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=a}function Yo(f){var w=typeof f;return f!=null&&(w=="object"||w=="function")}function dr(f){return f!=null&&typeof f=="object"}var Zo=Di?cu(Di):Du;function Xi(f){return Yi(f)?Iu(f):Mu(f)}function Gu(){return[]}function Ku(){return!1}t.exports=Vu})(Tc,Tc.exports);var k1=Tc.exports,zm={};Object.defineProperty(zm,"__esModule",{value:!0});const u4=j1,d4=k1;var hf;(function(t){function e(i={},a={},l=!1){typeof i!="object"&&(i={}),typeof a!="object"&&(a={});let c=u4(a);l||(c=Object.keys(c).reduce((u,h)=>(c[h]!=null&&(u[h]=c[h]),u),{}));for(const u in i)i[u]!==void 0&&a[u]===void 0&&(c[u]=i[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function r(i={},a={}){typeof i!="object"&&(i={}),typeof a!="object"&&(a={});const l=Object.keys(i).concat(Object.keys(a)).reduce((c,u)=>(d4(i[u],a[u])||(c[u]=a[u]===void 0?null:a[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=r;function n(i={},a={}){i=i||{};const l=Object.keys(a).reduce((c,u)=>(a[u]!==i[u]&&i[u]!==void 0&&(c[u]=a[u]),c),{});return Object.keys(i).reduce((c,u)=>(i[u]!==a[u]&&a[u]===void 0&&(c[u]=null),c),l)}t.invert=n;function s(i,a,l=!1){if(typeof i!="object")return a;
351if(typeof a!="object")return;if(!l)return a;const c=Object.keys(a).reduce((u,h)=>(i[h]===void 0&&(u[h]=a[h]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=s})(hf||(hf={}));zm.default=hf;var su={};Object.defineProperty(su,"__esModule",{value:!0});var ff;(function(t){function e(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}t.length=e})(ff||(ff={}));su.default=ff;var Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});const b0=su;class h4{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const r=this.ops[this.index];if(r){const n=this.offset,s=b0.default.length(r);if(e>=s-n?(e=s-n,this.index+=1,this.offset=0):this.offset+=e,typeof r.delete=="number")return{delete:e};{const i={};return r.attributes&&(i.attributes=r.attributes),typeof r.retain=="number"?i.retain=e:typeof r.retain=="object"&&r.retain!==null?i.retain=r.retain:typeof r.insert=="string"?i.insert=r.insert.substr(n,e):i.insert=r.insert,i}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?b0.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,r=this.index,n=this.next(),s=this.ops.slice(this.index);return this.offset=e,this.index=r,[n].concat(s)}}else return[]}}Fm.default=h4;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const r=c4,n=j1,s=k1,i=zm;e.AttributeMap=i.default;const a=su;e.Op=a.default;const l=Fm;e.OpIterator=l.default;const c="\0",u=(p,d)=>{if(typeof p!="object"||p===null)throw new Error(`cannot retain a ${typeof p}`);if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);const m=Object.keys(p)[0];if(!m||m!==Object.keys(d)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(d)[0]}`);return[m,p[m],d[m]]};class h{constructor(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]}static registerEmbed(d,m){this.handlers[d]=m}static unregisterEmbed(d){delete this.handlers[d]}static getHandler(d){const m=this.handlers[d];if(!m)throw new Error(`no handlers for embed type "${d}"`);return m}insert(d,m){const x={};return typeof d=="string"&&d.length===0?this:(x.insert=d,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(x.attributes=m),this.push(x))}delete(d){return d<=0?this:this.push({delete:d})}retain(d,m){if(typeof d=="number"&&d<=0)return this;const x={retain:d};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(x.attributes=m),this.push(x)}push(d){let m=this.ops.length,x=this.ops[m-1];if(d=n(d),typeof x=="object"){if(typeof d.delete=="number"&&typeof x.delete=="number")return this.ops[m-1]={delete:x.delete+d.delete},this;if(typeof x.delete=="number"&&d.insert!=null&&(m-=1,x=this.ops[m-1],typeof x!="object"))return this.ops.unshift(d),this;if(s(d.attributes,x.attributes)){if(typeof d.insert=="string"&&typeof x.insert=="string")return this.ops[m-1]={insert:x.insert+d.insert},typeof d.attributes=="object"&&(this.ops[m-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof x.retain=="number")return this.ops[m-1]={retain:x.retain+d.retain},typeof d.attributes=="object"&&(this.ops[m-1].attributes=d.attributes),this}}return m===this.ops.length?this.ops.push(d):this.ops.splice(m,0,d),this}chop(){const d=this.ops[this.ops.length-1];return d&&typeof d.retain=="number"&&!d.attributes&&this.ops.pop(),this}filter(d){return this.ops.filter(d)}forEach(d){this.ops.forEach(d)}map(d){return this.ops.map(d)}partition(d){const m=[],x=[];return this.forEach(b=>{(d(b)?m:x).push(b)}),[m,x]}reduce(d,m){return this.ops.reduce(d,m)}changeLength(){return this.reduce((d,m)=>m.insert?d+a.default.length(m):m.delete?d-m.delete:d,0)}length(){return this.reduce((d,m)=>d+a.default.length(m),0)}slice(d=0,m=1/0){const x=[],b=new l.default(this.ops);let _=0;for(;_<m&&b.hasNext();){let g;_<d?g=b.next(d-_):(g=b.next(m-_),x.push(g)),_+=a.default.length(g)}return new h(x)}compose(d){const m=new l.default(this.ops),x=new l.default(d.ops),b=[],_=x.peek();if(_!=null&&typeof _.retain=="number"&&_.attributes==null){let y=_.retain;for(;m.peekType()==="insert"&&m.peekLength()<=y;)y-=m.peekLength(),b.push(m.next());_.retain-y>0&&x.next(_.retain-y)}const g=new h(b);for(;m.hasNext()||x.hasNext();)if(x.peekType()==="insert")g.push(x.next());
351else if(m.peekType()==="delete")g.push(m.next());else{const y=Math.min(m.peekLength(),x.peekLength()),v=m.next(y),j=x.next(y);if(j.retain){const S={};if(typeof v.retain=="number")S.retain=typeof j.retain=="number"?y:j.retain;else if(typeof j.retain=="number")v.retain==null?S.insert=v.insert:S.retain=v.retain;else{const T=v.retain==null?"insert":"retain",[A,P,U]=u(v[T],j.retain),R=h.getHandler(A);S[T]={[A]:R.compose(P,U,T==="retain")}}const N=i.default.compose(v.attributes,j.attributes,typeof v.retain=="number");if(N&&(S.attributes=N),g.push(S),!x.hasNext()&&s(g.ops[g.ops.length-1],S)){const T=new h(m.rest());return g.concat(T).chop()}}else typeof j.delete=="number"&&(typeof v.retain=="number"||typeof v.retain=="object"&&v.retain!==null)&&g.push(j)}return g.chop()}concat(d){const m=new h(this.ops.slice());return d.ops.length>0&&(m.push(d.ops[0]),m.ops=m.ops.concat(d.ops.slice(1))),m}diff(d,m){if(this.ops===d.ops)return new h;const x=[this,d].map(v=>v.map(j=>{if(j.insert!=null)return typeof j.insert=="string"?j.insert:c;const S=v===d?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),b=new h,_=r(x[0],x[1],m,!0),g=new l.default(this.ops),y=new l.default(d.ops);return _.forEach(v=>{let j=v[1].length;for(;j>0;){let S=0;switch(v[0]){case r.INSERT:S=Math.min(y.peekLength(),j),b.push(y.next(S));break;case r.DELETE:S=Math.min(j,g.peekLength()),g.next(S),b.delete(S);break;case r.EQUAL:S=Math.min(g.peekLength(),y.peekLength(),j);const N=g.next(S),T=y.next(S);s(N.insert,T.insert)?b.retain(S,i.default.diff(N.attributes,T.attributes)):b.push(T).delete(S);break}j-=S}}),b.chop()}eachLine(d,m=`
352`){const x=new l.default(this.ops);let b=new h,_=0;for(;x.hasNext();){if(x.peekType()!=="insert")return;const g=x.peek(),y=a.default.length(g)-x.peekLength(),v=typeof g.insert=="string"?g.insert.indexOf(m,y)-y:-1;if(v<0)b.push(x.next());else if(v>0)b.push(x.next(v));else{if(d(b,x.next(1).attributes||{},_)===!1)return;_+=1,b=new h}}b.length()>0&&d(b,{},_)}invert(d){const m=new h;return this.reduce((x,b)=>{if(b.insert)m.delete(a.default.length(b));else{if(typeof b.retain=="number"&&b.attributes==null)return m.retain(b.retain),x+b.retain;if(b.delete||typeof b.retain=="number"){const _=b.delete||b.retain;return d.slice(x,x+_).forEach(y=>{b.delete?m.push(y):b.retain&&b.attributes&&m.retain(a.default.length(y),i.default.invert(b.attributes,y.attributes))}),x+_}else if(typeof b.retain=="object"&&b.retain!==null){const _=d.slice(x,x+1),g=new l.default(_.ops).next(),[y,v,j]=u(b.retain,g.insert),S=h.getHandler(y);return m.retain({[y]:S.invert(v,j)},i.default.invert(b.attributes,g.attributes)),x+1}}return x},0),m.chop()}transform(d,m=!1){if(m=!!m,typeof d=="number")return this.transformPosition(d,m);const x=d,b=new l.default(this.ops),_=new l.default(x.ops),g=new h;for(;b.hasNext()||_.hasNext();)if(b.peekType()==="insert"&&(m||_.peekType()!=="insert"))g.retain(a.default.length(b.next()));else if(_.peekType()==="insert")g.push(_.next());else{const y=Math.min(b.peekLength(),_.peekLength()),v=b.next(y),j=_.next(y);if(v.delete)continue;if(j.delete)g.push(j);else{const S=v.retain,N=j.retain;let T=typeof N=="object"&&N!==null?N:y;if(typeof S=="object"&&S!==null&&typeof N=="object"&&N!==null){const A=Object.keys(S)[0];if(A===Object.keys(N)[0]){const P=h.getHandler(A);P&&(T={[A]:P.transform(S[A],N[A],m)})}}g.retain(T,i.default.transform(v.attributes,j.attributes,m))}}return g.chop()}transformPosition(d,m=!1){m=!!m;const x=new l.default(this.ops);let b=0;for(;x.hasNext()&&b<=d;){const _=x.peekLength(),g=x.peekType();if(x.next(),g==="delete"){d-=Math.min(_,d-b);continue}else g==="insert"&&(b<d||!m)&&(d+=_);b+=_}return d}}h.Op=a.default,h.OpIterator=l.default,h.AttributeMap=i.default,h.handlers={},e.default=h,t.exports=h,t.exports.default=h})(df,df.exports);var It=df.exports;const B=F0(It);class ar extends _t{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}ar.blotName="break";ar.tagName="BR";let sr=class extends Sc{};const f4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function iu(t){return t.replace(/[&<>"']/g,e=>f4[e])}const mr=class mr extends Mm{static compare(e,r){const n=mr.order.indexOf(e),s=mr.order.indexOf(r);return n>=0||s>=0?n-s:e===r?0:e<r?-1:1}formatAt(e,r,n,s){if(mr.compare(this.statics.blotName,n)<0&&this.scroll.query(n,z.BLOT)){const i=this.isolate(e,r);s&&i.wrap(n,s)}else super.formatAt(e,r,n,s)}optimize(e){if(super.optimize(e),this.parent instanceof mr&&mr.compare(this.statics.blotName,this.parent.statics.blotName)>0){const r=this.parent.isolate(this.offset(),this.length());this.moveChildren(r),r.wrap(this)}}};I(mr,"allowedChildren",[mr,ar,_t,sr]),I(mr,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let Nr=mr;const w0=1;class Ue extends co{constructor(){super(...arguments);
vendor: 12,859 bytes, lines 352-355
352I(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=S1(this)),this.cache.delta}deleteAt(r,n){super.deleteAt(r,n),this.cache={}}formatAt(r,n,s,i){n<=0||(this.scroll.query(s,z.BLOCK)?r+n===this.length()&&this.format(s,i):super.formatAt(r,Math.min(n,this.length()-r-1),s,i),this.cache={})}insertAt(r,n,s){if(s!=null){super.insertAt(r,n,s),this.cache={};return}if(n.length===0)return;const i=n.split(`
353`),a=i.shift();a.length>0&&(r<this.length()-1||this.children.tail==null?super.insertAt(Math.min(r,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});let l=this;i.reduce((c,u)=>(l=l.split(c,!0),l.insertAt(0,u),u.length),r+a.length)}insertBefore(r,n){const{head:s}=this.children;super.insertBefore(r,n),s instanceof ar&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+w0),this.cache.length}moveChildren(r,n){super.moveChildren(r,n),this.cache={}}optimize(r){super.optimize(r),this.cache={}}path(r){return super.path(r,!0)}removeChild(r){super.removeChild(r),this.cache={}}split(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(r===0||r>=this.length()-w0)){const i=this.clone();return r===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const s=super.split(r,n);return this.cache={},s}}Ue.blotName="block";Ue.tagName="P";Ue.defaultChild=ar;Ue.allowedChildren=[ar,Nr,_t,sr];class Rt extends _t{attach(){super.attach(),this.attributes=new eu(this.domNode)}delta(){return new B().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,r){const n=this.scroll.query(e,z.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,r)}formatAt(e,r,n,s){this.format(n,s)}insertAt(e,r,n){if(n!=null){super.insertAt(e,r,n);return}const s=r.split(`
354`),i=s.pop(),a=s.map(c=>{const u=this.scroll.create(Ue.blotName);return u.insertAt(0,c),u}),l=this.split(e);a.forEach(c=>{this.parent.insertBefore(c,l)}),i&&this.parent.insertBefore(this.scroll.create("text",i),l)}}Rt.scope=z.BLOCK_BLOT;function S1(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.descendants(Je).reduce((r,n)=>n.length()===0?r:r.insert(n.value(),At(n,{},e)),new B).insert(`
355`,At(t))}function At(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return t==null||("formats"in t&&typeof t.formats=="function"&&(e={...e,...t.formats()},r&&delete e["code-token"]),t.parent==null||t.parent.statics.blotName==="scroll"||t.parent.statics.scope!==t.statics.scope)?e:At(t.parent,e,r)}const Et=class Et extends _t{static value(){}constructor(e,r,n){super(e,r),this.selection=n,this.textNode=document.createTextNode(Et.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,r){if(this.savedLength!==0){super.format(e,r);return}let n=this,s=0;for(;n!=null&&n.statics.scope!==z.BLOCK_BLOT;)s+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=Et.CONTENTS.length,n.optimize(),n.formatAt(s,Et.CONTENTS.length,e,r),this.savedLength=0)}index(e,r){return e===this.textNode?0:super.index(e,r)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const r=this.prev instanceof sr?this.prev:null,n=r?r.length():0,s=this.next instanceof sr?this.next:null,i=s?s.text:"",{textNode:a}=this,l=a.data.split(Et.CONTENTS).join("");a.data=Et.CONTENTS;let c;if(r)c=r,(l||s)&&(r.insertAt(r.length(),l+i),s&&s.remove());else if(s)c=s,s.insertAt(0,l);else{const u=document.createTextNode(l);c=this.scroll.create(u),this.parent.insertBefore(c,this)}if(this.remove(),e){const u=(d,m)=>r&&d===r.domNode?m:d===a?n+m-1:s&&d===s.domNode?n+l.length+m:null,h=u(e.start.node,e.start.offset),p=u(e.end.node,e.end.offset);if(h!==null&&p!==null)return{startNode:c.domNode,startOffset:h,endNode:c.domNode,endOffset:p}}return null}update(e,r){if(e.some(n=>n.type==="characterData"&&n.target===this.textNode)){const n=this.restore();n&&(r.range=n)}}optimize(e){super.optimize(e);let{parent:r}=this;for(;r;){if(r.domNode.tagName==="A"){this.savedLength=Et.CONTENTS.length,r.isolate(this.offset(r),this.length()).unwrap(),this.savedLength=0;break}r=r.parent}}value(){return""}};I(Et,"blotName","cursor"),I(Et,"className","ql-cursor"),I(Et,"tagName","span"),I(Et,"CONTENTS","\uFEFF");let ji=Et;var E1={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(c,u,h){this.fn=c,this.context=u,this.once=h||!1}function i(c,u,h,p,d){if(typeof h!="function")throw new TypeError("The listener must be a function");var m=new s(h,p||c,d),x=r?r+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],m]:c._events[x].push(m):(c._events[x]=m,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],h,p;if(this._eventsCount===0)return u;for(p in h=this._events)e.call(h,p)&&u.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},l.prototype.listeners=function(u){var h=r?r+u:u,p=this._events[h];if(!p)return[];if(p.fn)return[p.fn];for(var d=0,m=p.length,x=new Array(m);d<m;d++)x[d]=p[d].fn;return x},l.prototype.listenerCount=function(u){var h=r?r+u:u,p=this._events[h];return p?p.fn?1:p.length:0},l.prototype.emit=function(u,h,p,d,m,x){var b=r?r+u:u;if(!this._events[b])return!1;var _=this._events[b],g=arguments.length,y,v;if(_.fn){switch(_.once&&this.removeListener(u,_.fn,void 0,!0),g){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,h),!0;case 3:return _.fn.call(_.context,h,p),!0;case 4:return _.fn.call(_.context,h,p,d),!0;case 5:return _.fn.call(_.context,h,p,d,m),!0;case 6:return _.fn.call(_.context,h,p,d,m,x),!0}for(v=1,y=new Array(g-1);v<g;v++)y[v-1]=arguments[v];_.fn.apply(_.context,y)}else{var j=_.length,S;for(v=0;v<j;v++)switch(_[v].once&&this.removeListener(u,_[v].fn,void 0,!0),g){case 1:_[v].fn.call(_[v].context);break;case 2:_[v].fn.call(_[v].context,h);break;case 3:_[v].fn.call(_[v].context,h,p);break;case 4:_[v].fn.call(_[v].context,h,p,d);break;default:if(!y)for(S=1,y=new Array(g-1);S<g;S++)y[S-1]=arguments[S];_[v].fn.apply(_[v].context,y)}}return!0},l.prototype.on=function(u,h,p){return i(this,u,h,p,!1)},l.prototype.once=function(u,h,p){return i(this,u,h,p,!0)},l.prototype.removeListener=function(u,h,p,d){var m=r?r+u:u;if(!this._events[m])return this;if(!h)return a(this,m),this;var x=this._events[m];if(x.fn)x.fn===h&&(!d||x.once)&&(!p||x.context===p)&&a(this,m);else{for(var b=0,_=[],g=x.length;b<g;b++)(x[b].fn!==h||d&&!x[b].once||p&&x[b].context!==p)&&_.push(x[b]);_.length?this._events[m]=_.length===1?_[0]:_:a(this,m)}return this},l.prototype.removeAllListeners=function(u){var h;return u?(h=r?r+u:u,this._events[h]&&a(this,h)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(E1);var m4=E1.exports;const p4=F0(m4),mf=new WeakMap,pf=["error","warn","log","info"];let gf="warn";function T1(t){if(gf&&pf.indexOf(t)<=pf.indexOf(gf)){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];console[t](...r)}}function Xr(t){return pf.reduce((e,r)=>(e[r]=T1.bind(console,r,t),e),{})}Xr.level=t=>{gf=t};T1.level=Xr.level;const qd=Xr("quill:events"),g4=["selectionchange","mousedown","mouseup","click"];g4.forEach(t=>{document.addEventListener(t,function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=mf.get(s);i&&i.emitter&&i.emitter.handleDOM(...r)})})});class q extends p4{constructor(){super(),this.domListeners={},this.on("error",qd.error)}emit(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return qd.log.call(qd,...r),super.emit(...r)}handleDOM(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];(this.domListeners[e.type]||[]).forEach(i=>{let{node:a,handler:l}=i;(e.target===a||a.contains(e.target))&&l(e,...n)})}listenDOM(e,r,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:r,handler:n})}}I(q,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),I(q,"sources",{API:"api",SILENT:"silent",USER:"user"});const Ud=Xr("quill:selection");class us{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=r}}class y4{constructor(e,r){this.emitter=r,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new us(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,q.sources.USER),1)}),this.emitter.on(q.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const n=this.getNativeRange();n!=null&&n.start.node!==this.cursor.textNode&&this.emitter.once(q.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(n.start.node)&&this.root.contains(n.end.node)&&this.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset);const a=i.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(a?q.sources.SILENT:s)}catch{}})}),this.emitter.on(q.events.SCROLL_OPTIMIZE,(n,s)=>{if(s.range){const{startNode:i,startOffset:a,endNode:l,endOffset:c}=s.range;this.setNativeRange(i,a,l,c),this.update(q.sources.SILENT)}}),this.update(q.sources.SILENT)}handleComposition(){this.emitter.on(q.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(q.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(q.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,r){this.scroll.update();const n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(e,z.BLOCK))){if(n.start.node!==this.cursor.textNode){const s=this.scroll.find(n.start.node,!1);if(s==null)return;if(s instanceof Je){const i=s.split(n.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,r),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const n=this.scroll.length();e=Math.min(e,n-1),r=Math.min(e+r,n-1)-e;let s,[i,a]=this.scroll.leaf(e);if(i==null)return null;if(r>0&&a===i.length()){const[h]=this.scroll.leaf(e+1);if(h){const[p]=this.scroll.line(e),[d]=this.scroll.line(e+1);p===d&&(i=h,a=0)}}[s,a]=i.position(a,!0);const l=document.createRange();if(r>0)return l.setStart(s,a),[i,a]=this.scroll.leaf(e+r),i==null?null:([s,a]=i.position(a,!0),l.setEnd(s,a),l.getBoundingClientRect());let c="left",u;if(s instanceof Text){if(!s.data.length)return null;a<s.data.length?(l.setStart(s,a),l.setEnd(s,a+1)):(l.setStart(s,a-1),l.setEnd(s,a),c="right"),u=l.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),a>0&&(c="right")}return{bottom:u.top+u.height,height:u.height,left:u[c],right:u[c],top:u.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const r=e.getRangeAt(0);if(r==null)return null;const n=this.normalizeNative(r);return Ud.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;
355if("isConnected"in e&&!e.isConnected)return[null,null];const r=this.getNativeRange();return r==null?[null,null]:[this.normalizedToRange(r),r]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Bd(this.root,document.activeElement)}normalizedToRange(e){const r=[[e.start.node,e.start.offset]];e.native.collapsed||r.push([e.end.node,e.end.offset]);const n=r.map(a=>{const[l,c]=a,u=this.scroll.find(l,!0),h=u.offset(this.scroll);return c===0?h:u instanceof Je?h+u.index(l,c):h+u.length()}),s=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(s,...n);return new us(i,s-i)}normalizeNative(e){if(!Bd(this.root,e.startContainer)||!e.collapsed&&!Bd(this.root,e.endContainer))return null;const r={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[r.start,r.end].forEach(n=>{let{node:s,offset:i}=n;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;n.node=s,n.offset=i}),r}rangeToNative(e){const r=this.scroll.length(),n=(s,i)=>{s=Math.min(r-1,s);const[a,l]=this.scroll.leaf(s);return a?a.position(l,i):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ud.info("setNativeRange",e,r,n,s),e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))return;const a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:l}=this.getNativeRange()||{};if(l==null||i||e!==l.startContainer||r!==l.startOffset||n!==l.endContainer||s!==l.endOffset){e instanceof Element&&e.tagName==="BR"&&(r=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&n.tagName==="BR"&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const c=document.createRange();c.setStart(e,r),c.setEnd(n,s),a.removeAllRanges(),a.addRange(c)}}else a.removeAllRanges(),this.root.blur()}setRange(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:q.sources.API;if(typeof r=="string"&&(n=r,r=!1),Ud.info("setRange",e),e!=null){const s=this.rangeToNative(e);this.setNativeRange(...s,r)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q.sources.USER;const r=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!Dm(r,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const i=[q.events.SELECTION_CHANGE,hi(this.lastRange),hi(r),e];this.emitter.emit(q.events.EDITOR_CHANGE,...i),e!==q.sources.SILENT&&this.emitter.emit(...i)}}}function Bd(t,e){try{e.parentNode}catch{return!1}return t.contains(e)}const v4=/^[ -~]*$/;class x4{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let r=this.scroll.length();this.scroll.batchStart();const n=_0(e),s=new B;return w4(n.ops.slice()).reduce((a,l)=>{const c=It.Op.length(l);let u=l.attributes||{},h=!1,p=!1;if(l.insert!=null){if(s.retain(c),typeof l.insert=="string"){const x=l.insert;p=!x.endsWith(`
356`)&&(r<=a||!!this.scroll.descendant(Rt,a)[0]),this.scroll.insertAt(a,x);const[b,_]=this.scroll.line(a);let g=En({},At(b));if(b instanceof Ue){const[y]=b.descendant(Je,_);y&&(g=En(g,At(y)))}u=It.AttributeMap.diff(g,u)||{}}else if(typeof l.insert=="object"){const x=Object.keys(l.insert)[0];if(x==null)return a;const b=this.scroll.query(x,z.INLINE)!=null;if(b)(r<=a||this.scroll.descendant(Rt,a)[0])&&(p=!0);else if(a>0){const[_,g]=this.scroll.descendant(Je,a-1);_ instanceof sr?_.value()[g]!==`
357`&&(h=!0):_ instanceof _t&&_.statics.scope===z.INLINE_BLOT&&(h=!0)}if(this.scroll.insertAt(a,x,l.insert[x]),b){const[_]=this.scroll.descendant(Je,a);if(_){const g=En({},At(_));u=It.AttributeMap.diff(g,u)||{}}}}r+=c}else if(s.push(l),l.retain!==null&&typeof l.retain=="object"){const x=Object.keys(l.retain)[0];if(x==null)return a;this.scroll.updateEmbedAt(a,x,l.retain[x])}Object.keys(u).forEach(x=>{this.scroll.formatAt(a,c,x,u[x])});const d=h?1:0,m=p?1:0;return r+=d+m,s.retain(d),s.delete(m),a+c+d+m},0),s.reduce((a,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(a,l.delete),a):a+It.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,r){return this.scroll.deleteAt(e,r),this.update(new B().retain(e).delete(r))}formatLine(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};
357this.scroll.update(),Object.keys(n).forEach(i=>{this.scroll.lines(e,Math.max(r,1)).forEach(a=>{a.format(i,n[i])})}),this.scroll.optimize();const s=new B().retain(e).retain(r,hi(n));return this.update(s)}formatText(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(i=>{this.scroll.formatAt(e,r,i,n[i])});const s=new B().retain(e).retain(r,hi(n));return this.update(s)}getContents(e,r){return this.delta.slice(e,e+r)}getDelta(){return this.scroll.lines().reduce((e,r)=>e.concat(r.delta()),new B)}getFormat(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],s=[];r===0?this.scroll.path(e).forEach(l=>{const[c]=l;c instanceof Ue?n.push(c):c instanceof Je&&s.push(c)}):(n=this.scroll.lines(e,r),s=this.scroll.descendants(Je,e,r));const[i,a]=[n,s].map(l=>{const c=l.shift();if(c==null)return{};let u=At(c);for(;Object.keys(u).length>0;){const h=l.shift();if(h==null)return u;u=b4(At(h),u)}return u});return{...i,...a}}getHTML(e,r){const[n,s]=this.scroll.line(e);if(n){const i=n.length();return n.length()>=s+r&&!(s===0&&r===i)?ho(n,s,r,!0):ho(this.scroll,e,r,!0)}return""}getText(e,r){return this.getContents(e,r).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(e,r){const n=_0(r),s=new B().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(s)}insertEmbed(e,r,n){return this.scroll.insertAt(e,r,n),this.update(new B().retain(e).insert({[r]:n}))}insertText(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return r=r.replace(/\r\n/g,`
358`).replace(/\r/g,`
359`),this.scroll.insertAt(e,r),Object.keys(n).forEach(s=>{this.scroll.formatAt(e,r.length,s,n[s])}),this.update(new B().retain(e).insert(r,hi(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==Ue.blotName)return!1;const r=e;return r.children.length>1?!1:r.children.head instanceof ar}removeFormat(e,r){const n=this.getText(e,r),[s,i]=this.scroll.line(e+r);let a=0,l=new B;s!=null&&(a=s.length()-i,l=s.delta().slice(i,i+a-1).insert(`
360`));const u=this.getContents(e,r+a).diff(new B().insert(n).concat(l)),h=new B().retain(e).concat(u);return this.applyDelta(h)}update(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(r.length===1&&r[0].type==="characterData"&&r[0].target.data.match(v4)&&this.scroll.find(r[0].target)){const i=this.scroll.find(r[0].target),a=At(i),l=i.offset(this.scroll),c=r[0].oldValue.replace(ji.CONTENTS,""),u=new B().insert(c),h=new B().insert(i.value()),p=n&&{oldRange:N0(n.oldRange,-l),newRange:N0(n.newRange,-l)};e=new B().retain(l).concat(u.diff(h,p)).reduce((m,x)=>x.insert?m.insert(x.insert,a):m.push(x),new B),this.delta=s.compose(e)}else this.delta=this.getDelta(),(!e||!Dm(s.compose(e),this.delta))&&(e=s.diff(this.delta,n));return e}}function Hs(t,e,r){if(t.length===0){const[m]=zd(r.pop());return e<=0?`</li></${m}>`:`</li></${m}>${Hs([],e-1,r)}`}const[{child:n,offset:s,length:i,indent:a,type:l},...c]=t,[u,h]=zd(l);if(a>e)return r.push(l),a===e+1?`<${u}><li${h}>${ho(n,s,i)}${Hs(c,a,r)}`:`<${u}><li>${Hs(t,e+1,r)}`;const p=r[r.length-1];if(a===e&&l===p)return`</li><li${h}>${ho(n,s,i)}${Hs(c,a,r)}`;const[d]=zd(r.pop());return`</li></${d}>${Hs(t,e-1,r)}`}function ho(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in t&&typeof t.html=="function")return t.html(e,r);if(t instanceof sr)return iu(t.value().slice(e,e+r)).replaceAll(" ","&nbsp;");if(t instanceof rr){if(t.statics.blotName==="list-container"){const u=[];return t.children.forEachAt(e,r,(h,p,d)=>{const m="formats"in h&&typeof h.formats=="function"?h.formats():{};u.push({child:h,offset:p,length:d,indent:m.indent||0,type:m.list})}),Hs(u,-1,[])}const s=[];if(t.children.forEachAt(e,r,(u,h,p)=>{s.push(ho(u,h,p))}),n||t.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:a}=t.domNode,[l,c]=i.split(`>${a}<`);return l==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${c}`:`${l}>${s.join("")}<${c}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function b4(t,e){return Object.keys(e).reduce((r,n)=>{if(t[n]==null)return r;const s=e[n];return s===t[n]?r[n]=s:Array.isArray(s)?s.indexOf(t[n])<0?r[n]=s.concat([t[n]]):r[n]=s:r[n]=[s,t[n]],r},{})}function zd(t){const e=t==="ordered"?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function _0(t){return t.reduce((e,r)=>{if(typeof r.insert=="string"){const n=r.insert.replace(/\r\n/g,`
361`).replace(/\r/g,`
362`);return e.insert(n,r.attributes)}return e.push(r)},new B)}function N0(t,e){let{index:r,length:n}=t;return new us(r+e,n)}function w4(t){const e=[];return t.forEach(r=>{typeof r.insert=="string"?r.insert.split(`
363`).forEach((s,i)=>{i&&e.push({insert:`
364`,attributes:r.attributes}),s&&e.push({insert:s,attributes:r.attributes})}):e.push(r)}),e}class or{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=r}}I(or,"DEFAULTS",{});const El="\uFEFF";class Hm extends _t{constructor(e,r){super(e,r),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEac
364h(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(El),this.rightGuard=document.createTextNode(El),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,r){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,r)}restore(e){let r=null,n;const s=e.data.split(El).join("");if(e===this.leftGuard)if(this.prev instanceof sr){const i=this.prev.length();this.prev.insertAt(i,s),r={startNode:this.prev.domNode,startOffset:i+s.length}}else n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this),r={startNode:n,startOffset:s.length};else e===this.rightGuard&&(this.next instanceof sr?(this.next.insertAt(0,s),r={startNode:this.next.domNode,startOffset:s.length}):(n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this.next),r={startNode:n,startOffset:s.length}));return e.data=El,r}update(e,r){e.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){const s=this.restore(n.target);s&&(r.range=s)}})}}class _4{constructor(e,r){I(this,"isComposing",!1);this.scroll=e,this.emitter=r,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const r=e.target instanceof Node?this.scroll.find(e.target,!0):null;r&&!(r instanceof Hm)&&(this.emitter.emit(q.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(q.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(q.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(q.events.COMPOSITION_END,e),this.isComposing=!1}}const Oa=class Oa{constructor(e,r){I(this,"modules",{});this.quill=e,this.options=r}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const r=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new r(this.quill,this.options.modules[e]||{}),this.modules[e]}};I(Oa,"DEFAULTS",{modules:{}}),I(Oa,"themes",{default:Oa});let ki=Oa;const N4=t=>t.parentElement||t.getRootNode().host||null,j4=t=>{const e=t.getBoundingClientRect(),r="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,n="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*r,bottom:e.top+t.clientHeight*n,left:e.left}},Tl=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},j0=(t,e,r,n,s,i)=>t<r&&e>n?0:t<r?-(r-t+s):e>n?e-t>n-r?t+s-r:e-n+i:0,k4=(t,e)=>{var i,a,l;const r=t.ownerDocument;let n=e,s=t;for(;s;){const c=s===r.body,u=c?{top:0,right:((i=window.visualViewport)==null?void 0:i.width)??r.documentElement.clientWidth,bottom:((a=window.visualViewport)==null?void 0:a.height)??r.documentElement.clientHeight,left:0}:j4(s),h=getComputedStyle(s),p=j0(n.left,n.right,u.left,u.right,Tl(h.scrollPaddingLeft),Tl(h.scrollPaddingRight)),d=j0(n.top,n.bottom,u.top,u.bottom,Tl(h.scrollPaddingTop),Tl(h.scrollPaddingBottom));if(p||d)if(c)(l=r.defaultView)==null||l.scrollBy(p,d);else{const{scrollLeft:m,scrollTop:x}=s;d&&(s.scrollTop+=d),p&&(s.scrollLeft+=p);const b=s.scrollLeft-m,_=s.scrollTop-x;n={left:n.left-b,top:n.top-_,right:n.right-b,bottom:n.bottom-_}}s=c||h.position==="fixed"?null:N4(s)}},S4=100,E4=["block","break","cursor","inline","scroll","text"],T4=(t,e,r)=>{const n=new Ni;return E4.forEach(s=>{const i=e.query(s);i&&n.register(i)}),t.forEach(s=>{let i=e.query(s);i||r.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;i;)if(n.register(i),i="blotName"in i?i.requiredContainer??null:null,a+=1,a>S4){r.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),n},mi=Xr("quill"),Cl=new Ni;rr.uiClass="ql-ui";const Vt=class Vt{static debug(e){e===!0&&(e="log"),Xr.level(e)}static find(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return mf.get(e)||Cl.find(e,r)}static import(e){return this.imports[e]==null&&mi.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],r=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in e?e.attrName:e.blotName;typeof n=="string"?this.register(`formats/${n}`,e,r):Object.keys(e).forEach(s=>{this.register(s,e[s],r)})}else{const e=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!n&&mi.warn(`Overwriting ${e} with`,r),this.imports[e]=r,(e.startsWith("blots/")||e.startsWith("formats/"))&&r&&typeof r!="boolean"&&r.blotName!=="abstract"&&Cl.register(r),typeof r.register=="function"&&r.register(Cl)}}constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=C4(e,r),this.container=this.options.container,this.container==null){mi.error("Invalid Quill container",e);return}this.options.debug&&Vt.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",mf.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new q;const s=qm.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);
vendor: 6,953 bytes, lines 364-365
364if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new x4(this.scroll),this.selection=new y4(this.scroll,this.emitter),this.composition=new _4(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(q.events.EDITOR_CHANGE,a=>{a===q.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(q.events.SCROLL_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),h=c&&u?{oldRange:c,newRange:u}:void 0;Ht.call(this,()=>this.editor.update(null,l,h),a)}),this.emitter.on(q.events.SCROLL_EMBED_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),h=c&&u?{oldRange:c,newRange:u}:void 0;Ht.call(this,()=>{const p=new B().retain(a.offset(this)).retain({[a.statics.blotName]:l});return this.editor.update(p,[],h)},Vt.sources.USER)}),n){const a=this.clipboard.convert({html:`${n}<p><br></p>`,text:`
365`});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const n=e;e=document.createElement("div"),e.classList.add(n)}return this.container.insertBefore(e,r),e}blur(){this.selection.setRange(null)}deleteText(e,r,n){return[e,r,,n]=Or(e,r,n),Ht.call(this,()=>this.editor.deleteText(e,r),n,e,-1*r)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const r=e();return this.allowReadOnlyEdits=!1,r}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:q.sources.API;return Ht.call(this,()=>{const s=this.getSelection(!0);let i=new B;if(s==null)return i;if(this.scroll.query(e,z.BLOCK))i=this.editor.formatLine(s.index,s.length,{[e]:r});else{if(s.length===0)return this.selection.format(e,r),i;i=this.editor.formatText(s.index,s.length,{[e]:r})}return this.setSelection(s,q.sources.SILENT),i},n)}formatLine(e,r,n,s,i){let a;return[e,r,a,i]=Or(e,r,n,s,i),Ht.call(this,()=>this.editor.formatLine(e,r,a),i,e,0)}formatText(e,r,n,s,i){let a;return[e,r,a,i]=Or(e,r,n,s,i),Ht.call(this,()=>this.editor.formatText(e,r,a),i,e,0)}getBounds(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof e=="number"?n=this.selection.getBounds(e,r):n=this.selection.getBounds(e.index,e.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,r]=Or(e,r),this.editor.getContents(e,r)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,r):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,r)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(r=r??this.getLength()-e),[e,r]=Or(e,r),this.editor.getHTML(e,r)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(r=r??this.getLength()-e),[e,r]=Or(e,r),this.editor.getText(e,r)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,r,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Vt.sources.API;return Ht.call(this,()=>this.editor.insertEmbed(e,r,n),s,e)}insertText(e,r,n,s,i){let a;return[e,,a,i]=Or(e,0,n,s,i),Ht.call(this,()=>this.editor.insertText(e,r,a),i,e,r.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,r,n){return[e,r,,n]=Or(e,r,n),Ht.call(this,()=>this.editor.removeFormat(e,r),n,e)}scrollRectIntoView(e){k4(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,r=e&&this.selection.getBounds(e.index,e.length);r&&this.scrollRectIntoView(r)}setContents(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q.sources.API;return Ht.call(this,()=>{e=new B(e);const n=this.getLength(),s=this.editor.deleteText(0,n),i=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(a)},r)}setSelection(e,r,n){e==null?this.selection.setRange(null,r||Vt.sources.API):([e,r,,n]=Or(e,r,n),this.selection.setRange(new us(Math.max(0,e),r),n),n!==q.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q.sources.API;const n=new B().insert(e);return this.setContents(n,r)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q.sources.USER;const r=this.scroll.update(e);return this.selection.update(e),r}updateContents(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q.sources.API;return Ht.call(this,()=>(e=new B(e),this.editor.applyDelta(e)),r,!0)}};I(Vt,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Cl,theme:"default"}),I(Vt,"events",q.events),I(Vt,"sources",q.sources),I(Vt,"version","2.0.3"),I(Vt,"imports",{delta:B,parchment:XA,"core/module":or,"core/theme":ki});let O=Vt;function k0(t){return typeof t=="string"?document.querySelector(t):t}function Fd(t){return Object.entries(t??{}).reduce((e,r)=>
365{let[n,s]=r;return{...e,[n]:s===!0?{}:s}},{})}function S0(t){return Object.fromEntries(Object.entries(t).filter(e=>e[1]!==void 0))}function C4(t,e){const r=k0(t);if(!r)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===O.DEFAULTS.theme?ki:O.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:i,...a}=O.DEFAULTS,{modules:l,...c}=s.DEFAULTS;let u=Fd(e.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});const h=En({},Fd(i),Fd(l),u),p={...a,...S0(c),...S0(e)};let d=e.registry;return d?e.formats&&mi.warn('Ignoring "formats" option because "registry" is specified'):d=e.formats?T4(e.formats,p.registry,mi):p.registry,{...p,registry:d,container:r,theme:s,modules:Object.entries(h).reduce((m,x)=>{let[b,_]=x;if(!_)return m;const g=O.import(`modules/${b}`);return g==null?(mi.error(`Cannot load ${b} module. Are you sure you registered it?`),m):{...m,[b]:En({},g.DEFAULTS||{},_)}},{}),bounds:k0(p.bounds)}}function Ht(t,e,r,n){if(!this.isEnabled()&&e===q.sources.USER&&!this.allowReadOnlyEdits)return new B;let s=r==null?null:this.getSelection();const i=this.editor.delta,a=t();if(s!=null&&(r===!0&&(r=s.index),n==null?s=E0(s,a,e):n!==0&&(s=E0(s,r,n,e)),this.setSelection(s,q.sources.SILENT)),a.length()>0){const l=[q.events.TEXT_CHANGE,a,i,e];this.emitter.emit(q.events.EDITOR_CHANGE,...l),e!==q.sources.SILENT&&this.emitter.emit(...l)}return a}function Or(t,e,r,n,s){let i={};return typeof t.index=="number"&&typeof t.length=="number"?typeof e!="number"?(s=n,n=r,r=e,e=t.length,t=t.index):(e=t.length,t=t.index):typeof e!="number"&&(s=n,n=r,r=e,e=0),typeof r=="object"?(i=r,s=n):typeof r=="string"&&(n!=null?i[r]=n:s=r),s=s||q.sources.API,[t,e,i,s]}function E0(t,e,r,n){const s=typeof r=="number"?r:0;if(t==null)return null;let i,a;return e&&typeof e.transformPosition=="function"?[i,a]=[t.index,t.index+t.length].map(l=>e.transformPosition(l,n!==q.sources.USER)):[i,a]=[t.index,t.index+t.length].map(l=>l<e||l===e&&n===q.sources.USER?l:s>=0?l+s:Math.max(e,l+s)),new us(i,a-i)}class gs extends tu{}function T0(t){return t instanceof Ue||t instanceof Rt}function C0(t){return typeof t.updateContent=="function"}class Ws extends qm{constructor(e,r,n){let{emitter:s}
365=n;super(e,r),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(q.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(q.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,r){this.emitter.emit(q.events.SCROLL_EMBED_UPDATE,e,r)}deleteAt(e,r){const[n,s]=this.line(e),[i]=this.line(e+r);if(super.deleteAt(e,r),i!=null&&n!==i&&s>0){if(n instanceof Rt||i instanceof Rt){this.optimize();return}const a=i.children.head instanceof ar?null:i.children.head;n.moveChildren(i,a),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,r,n,s){super.formatAt(e,r,n,s),this.optimize()}insertAt(e,r,n){if(e>=this.length())if(n==null||this.scroll.query(r,z.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),n==null&&r.endsWith(`
366`)?s.insertAt(0,r.slice(0,-1),n):s.insertAt(0,r,n)}else{const s=this.scroll.create(r,n);this.appendChild(s)}else super.insertAt(e,r,n);this.optimize()}insertBefore(e,r){if(e.statics.scope===z.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,r)}else super.insertBefore(e,r)}insertContents(e,r){const n=this.deltaToRenderBlocks(r.concat(new B().insert(`
367`))),s=n.pop();if(s==null)return;this.batchStart();const i=n.shift();if(i){const c=i.type==="block"&&(i.delta.length()===0||!this.descendant(Rt,e)[0]&&e<this.length()),u=i.type==="block"?i.delta:new B().insert({[i.key]:i.value});Hd(this,e,u);const h=i.type==="block"?1:0,p=e+u.length()+h;c&&this.insertAt(p-1,`
368`);const d=At(this.line(e)[0]),m=It.AttributeMap.diff(d,i.attributes)||{};Object.keys(m).forEach(x=>{this.formatAt(p-1,1,x,m[x])}),e=p}let[a,l]=this.children.find(e);
368if(n.length&&(a&&(a=a.split(l),l=0),n.forEach(c=>{if(c.type==="block"){const u=this.createBlock(c.attributes,a||void 0);Hd(u,0,c.delta)}else{const u=this.create(c.key,c.value);this.insertBefore(u,a||void 0),Object.keys(c.attributes).forEach(h=>{u.format(h,c.attributes[h])})}})),s.type==="block"&&s.delta.length()){const c=a?a.offset(a.scroll)+l:this.length();Hd(this,c,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const r=this.path(e).pop();if(!r)return[null,-1];const[n,s]=r;return n instanceof Je?[n,s]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(T0,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const n=(s,i,a)=>{let l=[],c=a;return s.children.forEachAt(i,a,(u,h,p)=>{T0(u)?l.push(u):u instanceof tu&&(l=l.concat(n(u,h,c))),c-=p}),l};return n(this,e,r)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,r),e.length>0&&this.emitter.emit(q.events.SCROLL_OPTIMIZE,e,r))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let r=q.sources.USER;typeof e=="string"&&(r=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(n=>{let{target:s}=n;const i=this.find(s,!0);return i&&!C0(i)}),e.length>0&&this.emitter.emit(q.events.SCROLL_BEFORE_UPDATE,r,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(q.events.SCROLL_UPDATE,r,e)}updateEmbedAt(e,r,n){const[s]=this.descendant(i=>i instanceof Rt,e);s&&s.statics.blotName===r&&C0(s)&&s.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const r=[];let n=new B;return e.forEach(s=>{const i=s==null?void 0:s.insert;if(i)if(typeof i=="string"){const a=i.split(`
369`);a.slice(0,-1).forEach(c=>{n.insert(c,s.attributes),r.push({type:"block",delta:n,attributes:s.attributes??{}}),n=new B});const l=a[a.length-1];l&&n.insert(l,s.attributes)}else{const a=Object.keys(i)[0];if(!a)return;this.query(a,z.INLINE)?n.push(s):(n.length()&&r.push({type:"block",delta:n,attributes:{}}),n=new B,r.push({type:"blockEmbed",key:a,value:i[a],attributes:s.attributes??{}}))}}),n.length()&&r.push({type:"block",delta:n,attributes:{}}),r}createBlock(e,r){let n;const s={};Object.entries(e).forEach(l=>{let[c,u]=l;this.query(c,z.BLOCK&z.BLOT)!=null?n=c:s[c]=u});const i=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(i,r||void 0);const a=i.length();return Object.entries(s).forEach(l=>{let[c,u]=l;i.formatAt(0,a,c,u)}),i}}I(Ws,"blotName","scroll"),I(Ws,"className","ql-editor"),I(Ws,"tagName","DIV"),I(Ws,"defaultChild",Ue),I(Ws,"allowedChildren",[Ue,Rt,gs]);function Hd(t,e,r){r.reduce((n,s)=>{const i=It.Op.length(s);let a=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const l=s.insert;t.insertAt(n,l);const[c]=t.descendant(Je,n),u=At(c);a=It.AttributeMap.diff(u,a)||{}}else if(typeof s.insert=="object"){const l=Object.keys(s.insert)[0];if(l==null)return n;if(t.insertAt(n,l,s.insert[l]),t.scroll.query(l,z.INLINE)!=null){const[u]=t.descendant(Je,n),h=At(u);a=It.AttributeMap.diff(h,a)||{}}}}return Object.keys(a).forEach(l=>{t.formatAt(n,i,l,a[l])}),n+i},e)}const Wm={scope:z.BLOCK,whitelist:["right","center","justify"]},A4=new _r("align","align",Wm),C1=new ir("align","ql-align",Wm),A1=new Pn("align","text-align",Wm);class O1 extends Pn{value(e){let r=super.value(e);return r.startsWith("rgb(")?(r=r.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${r.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):r}}const O4=new ir("color","ql-color",{scope:z.INLINE}),Vm=new O1("color","color",{scope:z.INLINE}),R4=new ir("background","ql-bg",{scope:z.INLINE}),Gm=new O1("background","background-color",{scope:z.INLINE});class ys extends gs{static create(e){const r=super.create(e);return r.setAttribute("spellcheck","false"),r}code(e,r){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
370`).slice(e,e+r)}html(e,r){return`<pre>
371${iu(this.code(e,r))}
372</pre>`}}class Qe extends Ue{static register(){O.register(ys)}}I(Qe,"TAB","  ");class Km extends Nr{}Km.blotName="code";Km.tagName="CODE";Qe.blotName="code-block";Qe.className="ql-code-block";Qe.tagName="DIV";ys.blotName="code-block-container";ys.className="ql-code-block-container";ys.tagName="DIV";ys.allowedChildren=[Qe];Qe.allowedChildren=[sr,ar,ji];Qe.requiredContainer=ys;const Jm={scope:z.BLOCK,whitelist:["rtl"]},R1=new _r("direction","dir",Jm),L1=new ir("direction","ql-direction",Jm),I1=new Pn("direction","direction",Jm),P1={scope:z.INLINE,whitelist:["serif","monospace"]},$1=new ir("font","ql-font",P1);class L4 extends Pn{value(e){return super.value(e).replace(/["']/g,"")}}const D1=new L4("font","font-family",P1),M1=new ir("size","ql-size",{scope:z.INLINE,whitelist:["small","large","huge"]}),q1=new Pn("size","font-size",{scope:z.INLINE,whitelist:["10px","18px","32px"]}),I4=Xr("quill:keyboard"),P4=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class au extends or{static match(e,r){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!r[n]!==e[n]&&r[n]!==null)?!1:r.key===e.key||r.key===e.which}constructor(e,r){super(e,r),this.bindings={}
vendor: 11,425 bytes, lines 372-377
372,Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=D4(e);if(s==null){I4.warn("Attempted to add invalid keyboard binding",s);return}typeof r=="function"&&(r={handler:r}),typeof n=="function"&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach(a=>{const l={...s,key:a,...r,...n};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const s=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(g=>au.match(e,g));if(s.length===0)return;const i=O.find(e.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[l,c]=this.quill.getLine(a.index),[u,h]=this.quill.getLeaf(a.index),[p,d]=a.length===0?[u,h]:this.quill.getLeaf(a.index+a.length),m=u instanceof Sc?u.value().slice(0,h):"",x=p instanceof Sc?p.value().slice(d):"",b={collapsed:a.length===0,empty:a.length===0&&l.length()<=1,format:this.quill.getFormat(a),line:l,offset:c,prefix:m,suffix:x,event:e};s.some(g=>{if(g.collapsed!=null&&g.collapsed!==b.collapsed||g.empty!=null&&g.empty!==b.empty||g.offset!=null&&g.offset!==b.offset)return!1;if(Array.isArray(g.format)){if(g.format.every(y=>b.format[y]==null))return!1}else if(typeof g.format=="object"&&!Object.keys(g.format).every(y=>g.format[y]===!0?b.format[y]!=null:g.format[y]===!1?b.format[y]==null:Dm(g.format[y],b.format[y])))return!1;return g.prefix!=null&&!g.prefix.test(b.prefix)||g.suffix!=null&&!g.suffix.test(b.suffix)?!1:g.handler.call(this,a,b,g)!==!0})&&e.preventDefault()})}handleBackspace(e,r){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(r.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(e.index);let a=new B().retain(e.index-n).delete(n);if(r.offset===0){const[l]=this.quill.getLine(e.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){const u=i.formats(),h=this.quill.getFormat(e.index-1,1);if(s=It.AttributeMap.diff(u,h)||{},Object.keys(s).length>0){const p=new B().retain(e.index+i.length()-2).retain(1,s);a=a.compose(p)}}}this.quill.updateContents(a,O.sources.USER),this.quill.focus()}handleDelete(e,r){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(r.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let s={};const[i]=this.quill.getLine(e.index);let a=new B().retain(e.index).delete(n);if(r.offset>=i.length()-1){const[l]=this.quill.getLine(e.index+1);if(l){const c=i.formats(),u=this.quill.getFormat(e.index,1);s=It.AttributeMap.diff(c,u)||{},Object.keys(s).length>0&&(a=a.retain(l.length()-1).retain(1,s))}}this.quill.updateContents(a,O.sources.USER),this.quill.focus()}handleDeleteRange(e){Qm({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,r){const n=Object.keys(r.format).reduce((i,a)=>(this.quill.scroll.query(a,z.BLOCK)&&!Array.isArray(r.format[a])&&(i[a]=r.format[a]),i),{}),s=new B().retain(e.index).delete(e.length).insert(`
373`,n);this.quill.updateContents(s,O.sources.USER),this.quill.setSelection(e.index+1,O.sources.SILENT),this.quill.focus()}}const $4={bindings:{bold:Wd("bold"),italic:Wd("italic"),underline:Wd("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",O.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",O.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){e.format.indent!=null?this.quill.format("indent","-1",O.sources.USER):e.format.list!=null&&this.quill.format("list",!1,O.sources.USER)}},"indent code-block":A0(!0),"outdent code-block":A0(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,O.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const r=new B().retain(t.index).delete(t.length).insert("	");return this.quill.updateContents(r,O.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,O.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,O.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const r={list:!1};e.format.indent&&(r.indent=!1),this.quill.formatLine(t.index,t.length,r,O.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,r]=this.quill.getLine(t.index),n={...e.formats(),list:"checked"},s=new B().retain(t.index).insert(`
374`,n).retain(e.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,O.sources.USER),this.quill.setSelection(t.index+1,O.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[r,n]=this.quill.getLine(t.index),s=new B().retain(t.index).insert(`
375`,e.format).retain(r.length()-n-1).retain(1,{header:null});this.quill.updateContents(s,O.sources.USER),this.quill.setSelection(t.index+1,O.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const e=this.quill.getModule("table");if(e){const[r,n,s,i]=e.getTable(t),a=M4(r,n,s,i);if(a==null)return;let l=r.offset();if(a<0){const c=new B().retain(l).insert(`
376`);this.quill.updateContents(c,O.sources.USER),this.quill.setSelection(t.index+1,t.length,O.sources.SILENT)}else if(a>0){l+=r.length();const c=new B().retain(l).insert(`
377`);this.quill.updateContents(c,O.sources.USER),this.quill.setSelection(l,O.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:r,line:n}=e,s=n.offset(this.quill.scroll);r.shiftKey?this.quill.setSelection(s-1,O.sources.USER):this.quill.setSelection(s+n.length(),O.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(this.quill.scroll.query("list")==null)return!0;const{length:r}=e.prefix,[n,s]=this.quill.getLine(t.index);if(s>r)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(t.index," ",O.sources.USER),this.quill.history.cutoff();const a=new B().retain(t.index-s).delete(r+1).retain(n.length()-2-s).retain(1,{list:i});return this.quill.updateContents(a,O.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,O.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,r]=this.quill.getLine(t.index);let n=2,s=e;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,n-=1,n<=0){const i=new B().retain(t.index+e.length()-r-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,O.sources.USER),this.quill.setSelection(t.index-1,O.sources.SILENT),!1}return!0}},"embed left":Al("ArrowLeft",!1),"embed left shift":Al("ArrowLeft",!0),"embed right":Al("ArrowRight",!1),"embed right shift":Al("ArrowRight",!0),"table down":O0(!1),"table up":O0(!0)}};au.DEFAULTS=$4;function A0(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,r){let{event:n}=r;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(e.length===0&&!n.shiftKey){this.quill.insertText(e.index,i,O.sources.USER),this.quill.setSelection(e.index+i.length,O.sources.SILENT);return}const a=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:l,length:c}=e;a.forEach((u,h)=>{t?(u.insertAt(0,i),h===0?l+=i.length:c+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),h===0?l-=i.length:c-=i.length)}),this.quill.update(O.sources.USER),this.quill.setSelection(l,c,O.sources.SILENT)}}}function Al(t,e){return{key:t,shiftKey:e,altKey:null,[t==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;t==="ArrowRight"&&(s+=n.length+1);const[i]=this.quill.getLeaf(s);return i instanceof _t?(t==="ArrowLeft"?e?this.quill.setSelection(n.index-1,n.length+1,O.sources.USER):this.quill.setSelection(n.index-1,O.sources.USER):e?this.quill.setSelection(n.index,n.length+1,O.sources.USER):this.quill.setSelection(n.index+n.length+1,O.sources.USER),!1):!0}}}function Wd(t){return{key:t[0],shortKey:!0,handler(e,r){this.quill.format(t,!r.format[t],O.sources.USER)}}}function O0(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,r){const n=t?"prev":"next",s=r.line,i=s.parent[n];if(i!=null){if(i.statics.blotName==="table-row"){let a=i.children.head,l=s;for(;l.prev!=null;)l=l.prev,a=a.next;const c=a.offset(this.quill.scroll)+Math.min(r.offset,a.length()-1);this.quill.setSelection(c,0,O.sources.USER)}}else{const a=s.table()[n];a!=null&&(t?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,O.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,O.sources.USER))}return!1}}}function D4(t){if(typeof t=="string"||typeof t=="number")t={key:t};else if(typeof t=="object")t=hi(t);else return null;return t.shortKey&&(t[P4]=t.shortKey,delete t.shortKey),t}function Qm(t){let{quill:e,range:r}=t;const n=e.getLines(r);let s={};if(n.length>1){const i=n[0].formats(),a=n[n.length-1].formats();s=It.AttributeMap.diff(a,i)||{}}e.deleteText(r,O.sources.USER),Object.keys(s).length>0&&e.formatLine(r.index,1,s,O.sources.USER),e.setSelection(r.index,O.sources.SILENT)}function M4(t,e,r,n){return e.prev==null&&e.next==null?r.prev==null&&r.next==null?n===0?-1:1:r.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const q4=/font-weight:\s*normal/,U4=["P","OL","UL"],R0=t=>t&&U4.includes(t.tagName),B4=t=>{Array.from(t.querySelectorAll("br")).filter(e=>R0(e.previousElementSibling)&&R0(e.nextElementSibling)).forEach(e=>{var r;(r=e.parentNode)==null||r.removeChild(e)})},z4=t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var r;return(r=e.getAttribute("style"))==null?void 0:r.match(q4)}
377).forEach(e=>{var n;const r=t.createDocumentFragment();r.append(...e.childNodes),(n=e.parentNode)==null||n.replaceChild(r,e)})};function F4(t){t.querySelector('[id^="docs-internal-guid-"]')&&(z4(t),B4(t))}const H4=/\bmso-list:[^;]*ignore/i,W4=/\bmso-list:[^;]*\bl(\d+)/i,V4=/\bmso-list:[^;]*\blevel(\d+)/i,G4=(t,e)=>{const r=t.getAttribute("style"),n=r==null?void 0:r.match(W4);if(!n)return null;const s=Number(n[1]),i=r==null?void 0:r.match(V4),a=i?Number(i[1]):1,l=new RegExp(`@list l${s}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),c=e.match(l),u=c&&c[1]==="bullet"?"bullet":"ordered";return{id:s,indent:a,type:u,element:t}},K4=t=>{var a,l;const e=Array.from(t.querySelectorAll("[style*=mso-list]")),r=[],n=[];e.forEach(c=>{(c.getAttribute("style")||"").match(H4)?r.push(c):n.push(c)}),r.forEach(c=>{var u;return(u=c.parentNode)==null?void 0:u.removeChild(c)});const s=t.documentElement.innerHTML,i=n.map(c=>G4(c,s)).filter(c=>c);for(;i.length;){const c=[];let u=i.shift();for(;u;)c.push(u),u=i.length&&((a=i[0])==null?void 0:a.element)===u.element.nextElementSibling&&i[0].id===u.id?i.shift():null;const h=document.createElement("ul");c.forEach(m=>{const x=document.createElement("li");x.setAttribute("data-list",m.type),m.indent>1&&x.setAttribute("class",`ql-indent-${m.indent-1}`),x.innerHTML=m.element.innerHTML,h.appendChild(x)});const p=(l=c[0])==null?void 0:l.element,{parentNode:d}=p??{};p&&(d==null||d.replaceChild(h,p)),c.slice(1).forEach(m=>{let{element:x}=m;d==null||d.removeChild(x)})}};function J4(t){t.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&K4(t)}const Q4=[J4,F4],Y4=t=>{t.documentElement&&Q4.forEach(e=>{e(t)})},Z4=Xr("quill:clipboard"),X4=[[Node.TEXT_NODE,dO],[Node.TEXT_NODE,I0],["br",sO],[Node.ELEMENT_NODE,I0],[Node.ELEMENT_NODE,nO],[Node.ELEMENT_NODE,rO],[Node.ELEMENT_NODE,cO],["li",oO],["ol, ul",lO],["pre",iO],["tr",uO],["b",Vd("bold")],["i",Vd("italic")],["strike",Vd("strike")],["style",aO]
377],eO=[A4,R1].reduce((t,e)=>(t[e.keyName]=e,t),{}),L0=[A1,Gm,Vm,I1,D1,q1].reduce((t,e)=>(t[e.keyName]=e,t),{});class U1 extends or{constructor(e,r){super(e,r),this.quill.root.addEventListener("copy",n=>this.onCaptureCopy(n,!1)),this.quill.root.addEventListener("cut",n=>this.onCaptureCopy(n,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],X4.concat(this.options.matchers??[]).forEach(n=>{let[s,i]=n;this.addMatcher(s,i)})}addMatcher(e,r){this.matchers.push([e,r])}convert(e){let{html:r,text:n}=e,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[Qe.blotName])return new B().insert(n||"",{[Qe.blotName]:s[Qe.blotName]});if(!r)return new B().insert(n||"",s);const i=this.convertHTML(r);return To(i,`
378`)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new B().retain(i.length()-1).delete(1)):i}normalizeHTML(e){Y4(e)}convertHTML(e){const r=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(r);const n=r.body,s=new WeakMap,[i,a]=this.prepareMatching(n,s);return Ym(this.quill.scroll,n,i,a,s)}dangerouslyPasteHTML(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O.sources.API;if(typeof e=="string"){const s=this.convert({html:e,text:""});this.quill.setContents(s,r),this.quill.setSelection(0,O.sources.SILENT)}else{const s=this.convert({html:r,text:""});this.quill.updateContents(new B().retain(e).concat(s),n),this.quill.setSelection(e+s.length(),O.s
378ources.SILENT)}}onCaptureCopy(e){var a,l;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(n==null)return;const{html:s,text:i}=this.onCopy(n,r);(a=e.clipboardData)==null||a.setData("text/plain",i),(l=e.clipboardData)==null||l.setData("text/html",s),r&&Qm({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(r=>r[0]!=="#").join(`
379`)}onCapturePaste(e){var a,l,c,u,h;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const r=this.quill.getSelection(!0);if(r==null)return;const n=(a=e.clipboardData)==null?void 0:a.getData("text/html");let s=(l=e.clipboardData)==null?void 0:l.getData("text/plain");if(!n&&!s){const p=(c=e.clipboardData)==null?void 0:c.getData("text/uri-list");p&&(s=this.normalizeURIList(p))}const i=Array.from(((u=e.clipboardData)==null?void 0:u.files)||[]);if(!n&&i.length>0){this.quill.uploader.upload(r,i);return}if(n&&i.length>0){const p=new DOMParser().parseFromString(n,"text/html");if(p.body.childElementCount===1&&((h=p.body.firstElementChild)==null?void 0:h.tagName)==="IMG"){this.quill.uploader.upload(r,i);return}}this.onPaste(r,{html:n,text:s})}onCopy(e){const r=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:r}}onPaste(e,r){let{text:n,html:s}=r;const i=this.quill.getFormat(e.index),a=this.convert({text:n,html:s},i);Z4.log("onPaste",a,{text:n,html:s});const l=new B().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(l,O.sources.USER),this.quill.setSelection(l.length()-e.length,O.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,r){const n=[],s=[];return this.matchers.forEach(i=>{const[a,l]=i;switch(a){case Node.TEXT_NODE:s.push(l);break;case Node.ELEMENT_NODE:n.push(l);break;default:Array.from(e.querySelectorAll(a)).forEach(c=>{if(r.has(c)){const u=r.get(c);u==null||u.push(l)}else r.set(c,[l])});break}}),[n,s]}}I(U1,"DEFAULTS",{matchers:[]});function vs(t,e,r,n){return n.query(e)?t.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[e])return s.push(i);const a=r?{[e]:r}:{};return s.insert(i.insert,{...a,...i.attributes})},new B):t}function To(t,e){let r="";for(let n=t.ops.length-1;n>=0&&r.length<e.length;--n){const s=t.ops[n];if(typeof s.insert!="string")break;r=s.insert+r}return r.slice(-1*e.length)===e}function gn(t,e){if(!(t instanceof Element))return!1;const r=e.query(t);return r&&r.prototype instanceof _t?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}function tO(t,e){return t.previousElementSibling&&t.nextElementSibling&&!gn(t.previousElementSibling,e)&&!gn(t.nextElementSibling,e)}const Ol=new WeakMap;function B1(t){return t==null?!1:(Ol.has(t)||(t.tagName==="PRE"?Ol.set(t,!0):Ol.set(t,B1(t.parentNode))),Ol.get(t))}function Ym(t,e,r,n,s){return e.nodeType===e.TEXT_NODE?n.reduce((i,a)=>a(e,i,t),new B):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,a)=>{let l=Ym(t,a,r,n,s);return a.nodeType===e.ELEMENT_NODE&&(l=r.reduce((c,u)=>u(a,c,t),l),l=(s.get(a)||[]).reduce((c,u)=>u(a,c,t),l)),i.concat(l)},new B):new B}function Vd(t){return(e,r,n)=>vs(r,t,!0,n)}function rO(t,e,r){const n=_r.keys(t),s=ir.keys(t),i=Pn.keys(t),a={};return n.concat(s).concat(i).forEach(l=>{let c=r.query(l,z.ATTRIBUTE);c!=null&&(a[c.attrName]=c.value(t),a[c.attrName])||(c=eO[l],c!=null&&(c.attrName===l||c.keyName===l)&&(a[c.attrName]=c.value(t)||void 0),c=L0[l],c!=null&&(c.attrName===l||c.keyName===l)&&(c=L0[l],a[c.attrName]=c.value(t)||void 0))}),Object.entries(a).reduce((l,c)=>{let[u,h]=c;return vs(l,u,h,r)},e)}function nO(t,e,r){const n=r.query(t);if(n==null)return e;if(n.prototype instanceof _t){const s={},i=n.value(t);if(i!=null)return s[n.blotName]=i,new B().insert(s,n.formats(t,r))}else if(n.prototype instanceof co&&!To(e,`
380`)&&e.insert(`
381`),"blotName"in n&&"formats"in n&&typeof n.formats=="function")return vs(e,n.blotName,n.formats(t,r),r);return e}function sO(t,e){return To(e,`
382`)||e.insert(`
383`),e}function iO(t,e,r){const n=r.query("code-block"),s=n&&"formats"in n&&typeof n.formats=="function"?n.formats(t,r):!0;return vs(e,"code-block",s,r)}function aO(){return new B}function oO(t,e,r){const n=r.query(t);if(n==null||n.blotName!=="list"||!To(e,`
384`))return e;let s=-1,i=t.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce((a,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?a.push(l):a.insert(l.insert,{indent:s,...l.attributes||{}}):a,new B)}function lO(t,e,r){const n=t;let s=n.tagName==="OL"?"ordered":"bullet";const i=n.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),vs(e,"list",s,r)}function I0(t,e,r){if(!To(e,`
385`)){if(gn(t,r)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert(`
386`);if(e.length()>0&&t.nextSibling){let n=t.nextSibling;for(;n!=null;){if(gn(n,r))return e.insert(`
387`);const s=r.query(n);if(s&&s.prototype instanceof Rt)return e.insert(`
388`);n=n.firstChild}}}return e}function cO(t,e,r){var i;const n={},s=t.style||{};return s.fontStyle==="italic"&&(n.italic=!0),s.textDecoration==="underline"&&(n.underline=!0),s.textDecoration==="line-through"&&(n.strike=!0),((i=s.fontWeight)!=null&&i.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(n.bold=!0),e=Object.entries(n).reduce((a,l)=>{let[c,u]=l;return vs(a,c,u,r)},e),parseFloat(s.textIndent||0)>0?new B().insert("	").concat(e):e}function uO(t,e,r){var s,i;const n=((s=t.parentElement)==null?void 0:s.tagName)==="TABLE"?t.parentElement:(i=t.parentElement)==null?void 0:i.parentElement;if(n!=null){const l=Array.from(n.querySelectorAll("tr")).indexOf(t)+1;return vs(e,"table",l,r)}return e}function dO(t,e,r){var s;let n=t.data;
388if(((s=t.parentElement)==null?void 0:s.tagName)==="O:P")return e.insert(n.trim());if(!B1(t)){if(n.trim().length===0&&n.includes(`
389`)&&!tO(t,r))return e;n=n.replace(/[^\S\u00a0]/g," "),n=n.replace(/ {2,}/g," "),(t.previousSibling==null&&t.parentElement!=null&&gn(t.parentElement,r)||t.previousSibling instanceof Element&&gn(t.previousSibling,r))&&(n=n.replace(/^ /,"")),(t.nextSibling==null&&t.parentElement!=null&&gn(t.parentElement,r)||t.nextSibling instanceof Element&&gn(t.nextSibling,r))&&(n=n.replace(/ $/,"")),n=n.replaceAll(" "," ")}return e.insert(n)}class z1 extends or{constructor(r,n){super(r,n);I(this,"lastRecorded",0);I(this,"ignoreChange",!1);I(this,"stack",{undo:[],redo:[]});I(this,"currentRange",null);this.quill.on(O.events.EDITOR_CHANGE,(s,i,a,l)=>{s===O.events.SELECTION_CHANGE?i&&l!==O.sources.SILENT&&(this.currentRange=i):s===O.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===O.sources.USER?this.record(i,a):this.transform(i)),this.currentRange=yf(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(r,n){if(this.stack[r].length===0)return;const s=this.stack[r].pop();if(!s)return;const i=this.quill.getContents(),a=s.delta.invert(i);this.stack[n].push({delta:a,range:yf(s.range,a)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,O.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(r,n){if(r.ops.length===0)return;this.stack.redo=[];let s=r.invert(n),i=this.currentRange;const a=Date.now();if(this.lastRecorded+this.options.delay>a&&this.stack.undo.length>0){const l=this.stack.undo.pop();l&&(s=s.compose(l.delta),i=l.range)}else this.lastRecorded=a;s.length()!==0&&(this.stack.undo.push({delta:s,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(r){P0(this.stack.undo,r),P0(this.stack.redo,r)}undo(){this.change("undo","redo")}restoreSelection(r){if(r.range)this.quill.setSelection(r.range,O.sources.USER);else{const n=fO(this.quill.scroll,r.delta);this.quill.setSelection(n,O.sources.USER)}}}I(z1,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function P0(t,e){let r=e;for(let n=t.length-1;n>=0;n-=1){const s=t[n];t[n]={delta:r.transform(s.delta,!0),range:s.range&&yf(s.range,r)},r=s.delta.transform(r),t[n].delta.length()===0&&t.splice(n,1)}}function hO(t,e){const r=e.ops[e.ops.length-1];return r==null?!1:r.insert!=null?typeof r.insert=="string"&&r.insert.endsWith(`
390`):r.attributes!=null?Object.keys(r.attributes).some(n=>t.query(n,z.BLOCK)!=null):!1}function fO(t,e){const r=e.reduce((s,i)=>s+(i.delete||0),0);let n=e.length()-r;return hO(t,e)&&(n-=1),n}function yf(t,e){if(!t)return t;const r=e.transformPosition(t.index),n=e.transformPosition(t.index+t.length);return{index:r,length:n-r}}class F1 extends or{constructor(e,r){super(e,r),e.root.addEventListener("drop",n=>{var a;n.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const l=document.caretPositionFromPoint(n.clientX,n.clientY);s=document.createRange(),s.setStart(l.offsetNode,l.offset),s.setEnd(l.offsetNode,l.offset)}const i=s&&e.selection.normalizeNative(s);if(i){const l=e.selection.normalizedToRange(i);(a=n.dataTransfer)!=null&&a.files&&this.upload(l,n.dataTransfer.files)}})}upload(e,r){const n=[];Array.from(r).forEach(s=>{var i;s&&((i=this.options.mimetypes)!=null&&i.includes(s.type))&&n.push(s)}),n.length>0&&this.options.handler.call(this,e,n)}}F1.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const r=e.map(n=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(n)}));Promise.all(r).then(n=>{const s=n.reduce((i,a)=>i.insert({image:a}),new B().retain(t.index).delete(t.length));this.quill.updateContents(s,q.sources.USER),this.quill.setSelection(t.index+n.length,q.sources.SILENT)})}};const mO=["insertText","insertReplacementText"];class pO extends or{constructor(e,r){super(e,r),e.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||e.on(O.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Qm({range:e,quill:this.quill})}replaceText(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(r){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new B().retain(e.index).insert(r,n),O.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+r.length,0,O.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!mO.includes(e.inputType))return;const r=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!r||r.collapsed===!0)return;const n=gO(e);if(n==null)return;const s=this.quill.selection.normalizeNative(r),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function gO(t){var e;
390return typeof t.data=="string"?t.data:(e=t.dataTransfer)!=null&&e.types.includes("text/plain")?t.dataTransfer.getData("text/plain"):null}const yO=/Mac/i.test(navigator.platform),vO=100,xO=t=>!!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||yO&&t.key==="a"&&t.ctrlKey===!0);class bO extends or{constructor(r,n){super(r,n);I(this,"isListening",!1);I(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(r,n){let{line:s,event:i}=n;if(!(s instanceof rr)||!s.uiNode)return!0;const a=getComputedStyle(s.domNode).direction==="rtl";return a&&i.key!=="ArrowRight"||!a&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(r.index-1,r.length+(i.shiftKey?1:0),O.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",r=>{!r.defaultPrevented&&xO(r)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+vO,this.isListening)return;this.isListening=!0;const r=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",r,{once:!0})}handleSelectionChange(){const r=document.getSelection();if(!r)return;const n=r.getRangeAt(0);if(n.collapsed!==!0||n.startOffset!==0)return;const s=this.quill.scroll.find(n.startContainer);if(!(s instanceof rr)||!s.uiNode)return;const i=document.createRange();i.setStartAfter(s.uiNode),i.setEndAfter(s.uiNode),r.removeAllRanges(),r.addRange(i)}}O.register({"blots/block":Ue,"blots/block/embed":Rt,"blots/break":ar,"blots/container":gs,"blots/cursor":ji,"blots/embed":Hm,"blots/inline":Nr,"blots/scroll":Ws,"blots/text":sr,"modules/clipboard":U1,"modules/history":z1,"modules/keyboard":au,"modules/uploader":F1,"modules/input":pO,"modules/uiNode":bO});class wO extends ir{add(e,r){let n=0;if(r==="+1"||r==="-1"){const s=this.value(e)||0;n=r==="+1"?s+1:s-1}else typeof r=="number"&&(n=r);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,r){return super.canAdd(e,r)||super.canAdd(e,parseInt(r,10))}value(e){return parseInt(super.value(e),10)||void 0}}const _O=new wO("indent","ql-indent",{scope:z.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class vf extends Ue{}I(vf,"blotName","blockquote"),I(vf,"tagName","blockquote");class xf extends Ue{static formats(e){return this.tagName.indexOf(e.tagName)+1}}I(xf,"blotName","header"),I(xf,"tagName",["H1","H2","H3","H4","H5","H6"]);class Co extends gs{}Co.blotName="list-container";Co.tagName="OL";class Ao extends Ue{static create(e){const r=super.create();return r.setAttribute("data-list",e),r}static formats(e){return e.getAttribute("data-list")||void 0}static register(){O.register(Co)}constructor(e,r){super(e,r);const n=r.ownerDocument.createElement("span"),s=i=>{if(!e.isEnabled())return;const a=this.statics.formats(r,e);a==="checked"?(this.format("list","unchecked"),i.preventDefault()):a==="unchecked"&&(this.format("list","checked"),i.preventDefault())};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),this.attachUI(n)}format(e,r){e===this.statics.blotName&&r?this.domNode.setAttribute("data-list",r):super.format(e,r)}}Ao.blotName="list";Ao.tagName="LI";Co.allowedChildren=[Ao];Ao.requiredContainer=Co;class fo extends Nr{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}I(fo,"blotName","bold"),I(fo,"tagName",["STRONG","B"]);class bf extends fo{}I(bf,"blotName","italic"),I(bf,"tagName",["EM","I"]);class yn extends Nr{static create(e){const r=super.create(e);return r.setAttribute("href",this.sanitize(e)),r.setAttribute("rel","noopener noreferrer"),r.setAttribute("target","_blank"),r}static formats(e){return e.getAttribute("href")}static sanitize(e){return H1(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,r){e!==this.statics.blotName||!r?super.format(e,r):this.domNode.setAttribute("href",this.constructor.sanitize(r))}}I(yn,"blotName","link"),I(yn,"tagName","A"),I(yn,"SANITIZED_URL","about:blank"),I(yn,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function H1(t,e){const r=document.createElement("a");r.href=t;const n=r.href.slice(0,r.href.indexOf(":"));return e.indexOf(n)>-1}class wf extends Nr{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}I(wf,"blotName","script"),I(wf,"tagName",["SUB","SUP"]);class _f extends fo{}I(_f,"blotName","strike"),I(_f,"tagName",["S","STRIKE"]);class Nf extends Nr{}I(Nf,"blotName","underline"),I(Nf,"tagName","U");class Gl extends Hm{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const r=super.create(e);return typeof e=="string"&&(window.katex.render(e,r,{throwOnError:!1,errorColor:"#f00"}),r.setAttribute("data-value",e)),r}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}I(Gl,"blotName","formula"),I(Gl,"className","ql-formula"),I(Gl,"tagName","SPAN");const $0=["alt","height","width"];class jf extends _t{static create(e){const r=super.create(e);return typeof e=="string"&&r.setAttribute("src",this.sanitize(e)),r}static formats(e){return $0.reduce((r,n)=>(e.hasAttribute(n)&&(r[n]=e.getAttribute(n)),r),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return H1(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,r){$0.indexOf(e)>-1?r?this.domNode.setAttribute(e,r):this.domNode.removeAttribute(e):super.format(e,r)}}
390I(jf,"blotName","image"),I(jf,"tagName","IMG");const D0=["height","width"];class Kl extends Rt{static create(e){const r=super.create(e);return r.setAttribute("frameborder","0"),r.setAttribute("allowfullscreen","true"),r.setAttribute("src",this.sanitize(e)),r}static formats(e){return D0.reduce((r,n)=>(e.hasAttribute(n)&&(r[n]=e.getAttribute(n)),r),{})}static sanitize(e){return yn.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,r){D0.indexOf(e)>-1?r?this.domNode.setAttribute(e,r):this.domNode.removeAttribute(e):super.format(e,r)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}I(Kl,"blotName","video"),I(Kl,"className","ql-video"),I(Kl,"tagName","IFRAME");const ya=new ir("code-token","hljs",{scope:z.INLINE});class Gr extends Nr{static formats(e,r){for(;e!=null&&e!==r.domNode;){if(e.classList&&e.classList.contains(Qe.className))return super.formats(e,r);e=e.parentNode}}constructor(e,r,n){super(e,r,n),ya.add(this.domNode,n)}format(e,r){e!==Gr.blotName?super.format(e,r):r?ya.add(this.domNode,r):(ya.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),ya.value(this.domNode)||this.unwrap()}}Gr.blotName="code-token";Gr.className="ql-token";class Ot extends Qe{static create(e){const r=super.create(e);return typeof e=="string"&&r.setAttribute("data-language",e),r}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,r){e===this.statics.blotName&&r?this.domNode.setAttribute("data-language",r):super.format(e,r)}replaceWith(e,r){return this.formatAt(0,this.length(),Gr.blotName,!1),super.replaceWith(e,r)}}class Aa extends ys{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,r){e===Ot.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,r)}))}formatAt(e,r,n,s){n===Ot.blotName&&(this.forceNext=!0),super.formatAt(e,r,n,s)}highlight(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(`
391`)}
392`,i=Ot.formats(this.children.head.domNode);if(r||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const a=this.children.reduce((c,u)=>c.concat(S1(u,!1)),new B),l=e(s,i);a.diff(l).reduce((c,u)=>{let{retain:h,attributes:p}=u;return h?(p&&Object.keys(p).forEach(d=>{[Ot.blotName,Gr.blotName].includes(d)&&this.formatAt(c,h,d,p[d])}),c+h):c},0)}this.cachedText=s,this.forceNext=!1}}html(e,r){const[n]=this.children.find(e);return`<pre data-language="${n?Ot.formats(n.domNode):"plain"}">
393${iu(this.code(e,r))}
394</pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const r=Ot.formats(this.children.head.domNode);r!==this.uiNode.value&&(this.uiNode.value=r)}}}Aa.allowedChildren=[Ot];Ot.requiredContainer=Aa;Ot.allowedChildren=[Gr,ji,sr,ar];const NO=(t,e,r)=>{if(typeof t.versionString=="string"){const n=t.versionString.split(".")[0];if(parseInt(n,10)>=11)return t.highlight(r,{language:e}).value}return t.highlight(e,r).value};class W1 extends or{static register(){O.register(Gr,!0),O.register(Ot,!0),O.register(Aa,!0)}constructor(e,r){if(super(e,r),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((n,s)=>{let{key:i}=s;return n[i]=!0,n},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(O.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof Aa))return;const r=this.quill.root.ownerDocument.createElement("select");
394this.options.languages.forEach(n=>{let{key:s,label:i}=n;const a=r.ownerDocument.createElement("option");a.textContent=i,a.setAttribute("value",s),r.appendChild(a)}),r.addEventListener("change",()=>{e.format(Ot.blotName,r.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(r),e.children.head&&(r.value=Ot.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(O.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(O.sources.USER);const n=this.quill.getSelection();(e==null?this.quill.scroll.descendants(Aa):[e]).forEach(i=>{i.highlight(this.highlightBlot,r)}),this.quill.update(O.sources.SILENT),n!=null&&this.quill.setSelection(n,O.sources.SILENT)}highlightBlot(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(r=this.languages[r]?r:"plain",r==="plain")return iu(e).split(`
395`).reduce((s,i,a)=>(a!==0&&s.insert(`
396`,{[Qe.blotName]:r}),s.insert(i)),new B);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(Qe.className),n.innerHTML=NO(this.options.hljs,r,e),Ym(this.quill.scroll,n,[(s,i)=>{const a=ya.value(s);return a?i.compose(new B().retain(i.length(),{[Gr.blotName]:a})):i}],[(s,i)=>s.data.split(`
397`).reduce((a,l,c)=>(c!==0&&a.insert(`
398`,{[Qe.blotName]:r}),a.insert(l)),i)],new WeakMap)}}W1.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Ra=class Ra extends Ue{static create(e){const r=super.create();return e?r.setAttribute("data-row",e):r.setAttribute("data-row",Zm()),r}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,r){e===Ra.blotName&&r?this.domNode.setAttribute("data-row",r):super.format(e,r)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};I(Ra,"blotName","table"),I(Ra,"tagName","TD");let Xt=Ra;class Kr extends gs{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),r=this.children.tail.formats(),n=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===r.table&&e.table===n.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(r=>{if(r.next==null)return;const n=r.formats(),s=r.next.formats();if(n.table!==s.table){const i=this.splitAfter(r);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}I(Kr,"blotName","table-row"),I(Kr,"tagName","TR");class br extends gs{}I(br,"blotName","table-body"),I(br,"tagName","TBODY");class Si extends gs{balanceCells(){const e=this.descendants(Kr),r=e.reduce((n,s)=>Math.max(s.children.length,n),0);e.forEach(n=>{new Array(r-n.children.length).fill(0).forEach(()=>{let s;n.children.head!=null&&(s=Xt.formats(n.children.head.domNode));const i=this.scroll.create(Xt.blotName,s);n.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(r=>r.children.at(e))}deleteColumn(e){const[r]=this.descendant(br);r==null||r.children.head==null||r.children.forEach(n=>{const s=n.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[r]=this.descendant(br);r==null||r.children.head==null||r.children.forEach(n=>{const s=n.children.at(e),i=Xt.formats(n.children.head.domNode),a=this.scroll.create(Xt.blotName,i);n.insertBefore(a,s)})}insertRow(e){const[r]=this.descendant(br);if(r==null||r.children.head==null)return;const n=Zm(),s=this.scroll.create(Kr.blotName);
398r.children.head.children.forEach(()=>{const a=this.scroll.create(Xt.blotName,n);s.appendChild(a)});const i=r.children.at(e);r.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(r=>r)}}I(Si,"blotName","table-container"),I(Si,"tagName","TABLE");Si.allowedChildren=[br];br.requiredContainer=Si;br.allowedChildren=[Kr];Kr.requiredContainer=br;Kr.allowedChildren=[Xt];Xt.requiredContainer=Kr;function Zm(){return`row-${Math.random().toString(36).slice(2,6)}`}class jO extends or{static register(){O.register(Xt),O.register(Kr),O.register(br),O.register(Si)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Si).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,r]=this.getTable();r!=null&&(e.deleteColumn(r.cellOffset()),this.quill.update(O.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(O.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const r=e.offset();e.remove(),this.quill.update(O.sources.USER),this.quill.setSelection(r,O.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[r,n]=this.quill.getLine(e.index);if(r==null||r.statics.blotName!==Xt.blotName)return[null,null,null,-1];const s=r.parent;return[s.parent.parent,s,r,n]}insertColumn(e){const r=this.quill.getSelection();if(!r)return;const[n,s,i]=this.getTable(r);if(i==null)return;const a=i.cellOffset();n.insertColumn(a+e),this.quill.update(O.sources.USER);let l=s.rowOffset();e===0&&(l+=1),this.quill.setSelection(r.index+l,r.length,O.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const r=this.quill.getSelection();if(!r)return;const[n,s,i]=this.getTable(r);if(i==null)return;const a=s.rowOffset();n.insertRow(a+e),this.quill.update(O.sources.USER),e>0?this.quill.setSelection(r,O.sources.SILENT):this.quill.setSelection(r.index+s.children.length,r.length,O.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,r){const n=this.quill.getSelection();if(n==null)return;const s=new Array(e).fill(0).reduce(i=>{const a=new Array(r).fill(`
399`).join("");return i.insert(a,{table:Zm()})},new B().retain(n.index));this.quill.updateContents(s,O.sources.USER),this.quill.setSelection(n.index,O.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(O.events.SCROLL_OPTIMIZE,e=>{e.some(r=>["TD","TR","TBODY","TABLE"].includes(r.target.tagName)?(this.quill.once(O.events.TEXT_CHANGE,(n,s,i)=>{i===O.sources.USER&&this.balanceTables()}),!0):!1)})}}const M0=Xr("quill:toolbar");class Xm extends or{constructor(e,r){var n,s;if(super(e,r),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),kO(i,this.options.container),(s=(n=e.container)==null?void 0:n.parentNode)==null||s.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){M0.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var l;const a=(l=this.options.handlers)==null?void 0:l[i];a&&this.addHandler(i,a)}),Array.from(this.container.querySelectorAll("button, select")).forEac
vendor: 6,589 bytes, line 399
399h(i=>{this.attach(i)}),this.quill.on(O.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,r){this.handlers[e]=r}attach(e){let r=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!r)return;if(r=r.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[r]==null&&this.quill.scroll.query(r)==null){M0.warn("ignoring attaching to nonexistent format",r,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const l=e.options[e.selectedIndex];l.hasAttribute("selected")?i=!1:i=l.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[r]!=null)this.handlers[r].call(this,i);else if(this.quill.scroll.query(r).prototype instanceof _t){if(i=prompt(`Enter ${r}`),!i)return;this.quill.updateContents(new B().retain(a.index).delete(a.length).insert({[r]:i}),O.sources.USER)}else this.quill.format(r,i,O.sources.USER);this.update(a)}),this.controls.push([r,e])}update(e){const r=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[s,i]=n;if(i.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(r[s]==null)a=i.querySelector("option[selected]");else if(!Array.isArray(r[s])){let l=r[s];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),a=i.querySelector(`option[value="${l}"]`)}a==null?(i.value="",i.selectedIndex=-1):a.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const a=r[s],l=a===i.getAttribute("value")||a!=null&&a.toString()===i.getAttribute("value")||a==null&&!i.getAttribute("value");i.classList.toggle("ql-active",l),i.setAttribute("aria-pressed",l.toString())}else{const a=r[s]!=null;i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}})}}Xm.DEFAULTS={};function q0(t,e,r){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),r!=null?(n.value=r,n.setAttribute("aria-label",`${e}: ${r}`)):n.setAttribute("aria-label",e),t.appendChild(n)}function kO(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(r=>{const n=document.createElement("span");n.classList.add("ql-formats"),r.forEach(s=>{if(typeof s=="string")q0(n,s);else{const i=Object.keys(s)[0],a=s[i];Array.isArray(a)?SO(n,i,a):q0(n,i,a)}}),t.appendChild(n)})}function SO(t,e,r){const n=document.createElement("select");n.classList.add(`ql-${e}`),r.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),n.appendChild(i)}),t.appendChild(n)}Xm.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(t!=null)if(t.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(r=>{this.quill.scroll.query(r,z.INLINE)!=null&&this.quill.format(r,!1,O.sources.USER)})}else this.quill.removeFormat(t.index,t.length,O.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();t==="rtl"&&e==null?this.quill.format("align","right",O.sources.USER):!t&&e==="right"&&this.quill.format("align",!1,O.sources.USER),this.quill.format("direction",t,O.sources.USER)},indent(t){const e=this.quill.getSelection(),r=this.quill.getFormat(e),n=parseInt(r.indent||0,10);if(t==="+1"||t==="-1"){let s=t==="+1"?1:-1;r.direction==="rtl"&&(s*=-1),this.quill.format("indent",n+s,O.sources.USER)}},link(t){t===!0&&(t=prompt("Enter link URL:")),this.quill.format("link",t,O.sources.USER)},list(t){const e=this.quill.getSelection(),r=this.quill.getFormat(e);t==="check"?r.list==="checked"||r.list==="unchecked"?this.quill.format("list",!1,O.sources.USER):this.quill.format("list","unchecked",O.sources.USER):this.quill.format("list",t,O.sources.USER)}}};const EO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',TO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',CO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',AO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',OO='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/>
399<path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',RO='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',LO='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',IO='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',U0='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',PO='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',$O='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',DO='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',MO='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',qO='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',UO='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',BO='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816
399H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',zO='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',FO='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',HO='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',WO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',VO='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',GO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',KO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',JO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',QO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',YO='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ZO='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/>
399<path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',XO='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',e3='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',t3='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',r3='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',n3='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',s3='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',mo={align:{"":EO,center:TO,right:CO,justify:AO},background:OO,blockquote:RO,bold:LO,clean:IO,code:U0,"code-block":U0,color:PO,direction:{"":$O,rtl:DO},formula:MO,header:{1:qO,2:UO,3:BO,4:zO,5:FO,6:HO},italic:WO,image:VO,indent:{"+1":GO,"-1":KO},link:JO,list:{bullet:QO,check:YO,ordered:ZO},script:{sub:XO,super:e3},strike:t3,table:r3,underline:n3,video:s3},i3='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let B0=0;function z0(t,e){t.setAttribute(e,`${t.getAttribute(e)!=="true"}`)}class ou{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",r=>{switch(r.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),r.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),z0(this.label,"aria-expanded"),z0(this.options,"aria-hidden")}buildItem(e){const r=document.createElement("span");r.tabIndex="0",r.setAttribute("role","button"),r.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&r.setAttribute("data-value",n),e.textContent&&r.setAttribute("data-label",e.textContent),r.addEventListener("click",()=>{this.selectItem(r,!0)}),r.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(r,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),r}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=i3,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","fal
399se"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${B0}`,B0+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(r=>{const n=this.buildItem(r);e.appendChild(n),r.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n!=null&&n.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),r&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const r=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",r)}}class V1 extends ou{constructor(e,r){super(e),this.label.innerHTML=r,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const r=super.buildItem(e);return r.style.backgroundColor=e.getAttribute("value")||"",r}selectItem(e,r){super.selectItem(e,r);const n=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=s:n.style.fill=s)}}class G1 extends ou{constructor(e,r){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=r[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,r){super.selectItem(e,r);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const a3=t=>{const{overflowY:e}=getComputedStyle(t,null);return e!=="visible"&&e!=="clip"};class K1{constructor(e,r){this.quill=e,this.boundsContainer=r||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,a3(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const r=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${r}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let a=0;if(i.right>s.right&&(a=s.right-i.right,this.root.style.left=`${r+a}px`),i.left<s.left&&(a=s.left-i.left,this.root.style.left=`${r+a}px`),i.bottom>s.bottom){const l=i.bottom-i.top,c=e.bottom-e.top+l;this.root.style.top=`${n-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const o3=[!1,"center","right","justify"],l3=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],c3=[!1,"serif","monospace"],u3=["1","2","3",!1],d3=["small",!1,"large","huge"];class Oo extends ki{constructor(e,r){super(e,r);const n=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEac
vendor: 4,189 bytes, line 399
399h(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const r=super.addModule(e);return e==="toolbar"&&this.extendToolbar(r),r}buildButtons(e,r){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),r[i]!=null))if(i==="direction")n.innerHTML=r[i][""]+r[i].rtl;else if(typeof r[i]=="string")n.innerHTML=r[i];else{const a=n.value||"";a!=null&&r[i][a]&&(n.innerHTML=r[i][a])}})})}buildPickers(e,r){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&da(s,o3),typeof r.align=="object"))return new G1(s,r.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&da(s,l3,i==="background"?"#ffffff":"#000000"),new V1(s,r[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?da(s,c3):s.classList.contains("ql-header")?da(s,u3):s.classList.contains("ql-size")&&da(s,d3)),new ou(s)});const n=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(q.events.EDITOR_CHANGE,n)}}Oo.DEFAULTS=En({},ki.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");t==null&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),t.classList.add("ql-image"),t.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,t.files),t.value=""}),this.container.appendChild(t)),t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class J1 extends K1{constructor(e,r){super(e,r),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;r!=null?this.textbox.value=r:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:r}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,q.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,q.sources.USER)),this.quill.root.scrollTop=r;break}case"video":e=h3(e);case"formula":{if(!e)break;const r=this.quill.getSelection(!0);if(r!=null){const n=r.index+r.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,q.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",q.sources.USER),this.quill.setSelection(n+2,q.sources.USER)}break}}this.textbox.value="",this.hide()}}function h3(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:t}function da(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const s=document.createElement("option");n===r?s.setAttribute("selected","selected"):s.setAttribute("value",String(n)),t.appendChild(s)})}const f3=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Q1 extends J1{constructor(e,r){super(e,r),this.quill.on(q.events.EDITOR_CHANGE,(n,s,i,a)=>
399{if(n===q.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&a===q.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const l=this.quill.getLines(s.index,s.length);if(l.length===1){const c=this.quill.getBounds(s);c!=null&&this.position(c)}else{const c=l[l.length-1],u=this.quill.getIndex(c),h=Math.min(c.length()-1,s.index+s.length-u),p=this.quill.getBounds(new us(u,h));p!=null&&this.position(p)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(q.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const r=this.quill.getBounds(e);r!=null&&this.position(r)}},1)})}cancel(){this.show()}position(e){const r=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",r!==0&&(n.style.marginLeft=`${-1*r-n.offsetWidth/2}px`),r}}I(Q1,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Y1 extends Oo{constructor(e,r){r.modules.toolbar!=null&&r.modules.toolbar.container==null&&(r.modules.toolbar.container=f3),super(e,r),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Q1(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),mo),this.buildPickers(e.container.querySelectorAll("select"),mo))}}Y1.DEFAULTS=En({},Oo.DEFAULTS,{modules:{toolbar:{handlers:{link(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1,O.sources.USER)}}}}});const m3=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Z1 extends J1{constructor(){super(...arguments);I(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",r=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),r.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",r=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,q.sources.USER),delete this.linkRange}r.preventDefault(),this.hide()}),this.quill.on(q.events.SELECTION_CHANGE,(r,n,s)=>{if(r!=null){if(r.length===0&&s===q.sources.USER){const[i,a]=this.quill.scroll.descendant(yn,r.index);if(i!=null){this.linkRange=new us(r.index-a,i.length());const l=yn.formats(i.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();const c=this.quill.getBounds(this.linkRange);c!=null&&this.position(c);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}I(Z1,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class X1 extends Oo{constructor(e,r){r.modules.toolbar!=null&&r.modules.toolbar.container==null&&(r.modules.toolbar.container=m3),super(e,r),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),mo),this.buildPickers(e.container.querySelectorAll("select"),mo),this.tooltip=new Z1(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(r,n)=>{e.handlers.link.call(e,!n.format.link)}))}}X1.DEFAULTS=En({},Oo.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const e=this.quill.getSelection();if(e==null||e.length===0)return;let r=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(r)&&r.indexOf("mailto:")!==0&&(r=`mailto:${r}`);const{tooltip:n}=this.quill.theme;n.edit("link",r)}else this.quill.format("link",!1,O.sources.USER)}}}}});O.register({"attributors/attribute/direction":R1,"attributors/class/align":C1,"attributors/class/background":R4,"attributors/class/color":O4,"attributors/class/direction":L1,"attributors/class/font":$1,"attributors/class/size":M1,"attributors/style/align":A1,"attributors/style/background":Gm,"attributors/style/color":Vm,"attributors/style/direction":I1,"attributors/style/font":D1,"attributors/style/size":q1},!0);O.register({"formats/align":C1,"formats/direction":L1,"formats/indent":_O,"formats/background":Gm,"formats/color":Vm,"formats/font":$1,"formats/size":M1,"formats/blockquote":vf,"formats/code-block":Qe,"formats/header":xf,"formats/list":Ao,"formats/bold":fo,"formats/code":Km,"formats/ital
399ic":bf,"formats/link":yn,"formats/script":wf,"formats/strike":_f,"formats/underline":Nf,"formats/formula":Gl,"formats/image":jf,"formats/video":Kl,"modules/syntax":W1,"modules/table":jO,"modules/toolbar":Xm,"themes/bubble":Y1,"themes/snow":X1,"ui/icons":mo,"ui/picker":ou,"ui/icon-picker":G1,"ui/color-picker":V1,"ui/tooltip":K1},!0);const p3=[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["blockquote"],["link","image"],["clean"]];async function eb(t){const e=t.name.split(".").pop(),n=`inline/${`${Date.now()}-${Math.random().toString(36).substring(2,8)}.${e}`}`,{error:s}=await Re.storage.from("news-images").upload(n,t,{cacheControl:"3600",upsert:!1});if(s)return console.error("Upload error:",s),null;const{data:i}=Re.storage.from("news-images").getPublicUrl(n);return i.publicUrl}function g3(t){const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("accept","image/*"),e.click(),e.onchange=async()=>{var i;const r=(i=e.files)==null?void 0:i[0];if(!r)return;const n=t.getSelection(!0);
399t.insertText(n.index,"Uploading image...",{italic:!0,color:"#999"}),t.setSelection(n.index+19,0);const s=await eb(r);t.deleteText(n.index,19),s&&(t.insertEmbed(n.index,"image",s),t.setSelection(n.index+1,0))}}const y3=({value:t,onChange:e})=>{const r=E.useRef(null),n=E.useRef(null),s=E.useRef(e),i=E.useRef(!1);s.current=e;const a=E.useCallback(async l=>{var h;l.preventDefault(),l.stopPropagation();const c=n.current;if(!c)return;const u=(h=l.dataTransfer)==null?void 0:h.files;if(u!=null&&u.length)for(let p=0;p<u.length;p++){const d=u[p];if(!d.type.startsWith("image/"))continue;const m=c.getSelection(!0),x=await eb(d);x&&c.insertEmbed(m.index+p,"image",x)}},[]);return E.useEffect(()=>{if(!r.current||n.current)return;const l=document.createElement("div");r.current.appendChild(l);const c=new O(l,{theme:"snow",modules:{toolbar:{container:p3,handlers:{image:function(){g3(c)}}}},placeholder:"Write your content here... Use the toolbar to format text, add images, and more."});n.current=c,t&&(i.current=!0,c.root.innerHTML=t,i.current=!1),c.on("text-change",()=>{if(i.current)return;const h=c.root.innerHTML;s.current(h==="<p><br></p>"?"":h)});const u=c.root;return u.addEventListener("drop",a),u.addEventListener("dragover",h=>{h.preventDefault()}),()=>{u.removeEventListener("drop",a),c.off("text-change"),r.current&&(r.current.innerHTML=""),n.current=null}},[]),E.useEffect(()=>{const l=n.current;if(!l)return;l.root.innerHTML!==t&&t!==void 0&&(i.current=!0,l.root.innerHTML=t||"",i.current=!1)},[t]),o.jsxs("div",{className:"rich-text-editor",children:[o.jsx("div",{ref:r}),o.jsx("style",{children:`
400        .rich-text-editor .ql-container {
401          min-height: 300px;
402          font-size: 16px;
403          font-family: inherit;
404          border-bottom-left-radius: 0.5rem;
405          border-bottom-right-radius: 0.5rem;
406        }
407        .rich-text-editor .ql-toolbar {
408          border-top-left-radius: 0.5rem;
409          border-top-right-radius: 0.5rem;
410          background: #f9fafb;
411        }
412        .rich-text-editor .ql-editor {
413          min-height: 300px;
414          line-height: 1.6;
415        }
416        .rich-text-editor .ql-editor img {
417          max-width: 100%;
418          height: auto;
419          border-radius: 0.5rem;
420          margin: 1rem 0;
421        }
422        .rich-text-editor .ql-editor h1 { font-size: 2em; font-weight: bold; margin: 0.67em 0; }
423        .rich-text-editor .ql-editor h2 { font-size: 1.5em; font-weight: bold; margin: 0.75em 0; }
424        .rich-text-editor .ql-editor h3 { font-size: 1.17em; font-weight: bold; margin: 0.83em 0; }
425        .rich-text-editor .ql-editor p { margin-bottom: 1em; }
426        .rich-text-editor .ql-editor blockquote {
427          border-left: 4px solid #3b82f6;
428          padding-left: 1rem;
429          margin: 1rem 0;
430          color: #4b5563;
431          font-style: italic;
432        }
433        .rich-text-editor .ql-editor ul,
434        .rich-text-editor .ql-editor ol {
435          padding-left: 1.5rem;
436          margin: 0.5em 0;
437        }
438      `})]})},v3=({value:t,onChange:e,label:r="Featured Image"})=>{const[n,s]=E.useState(!1),[i,a]=E.useState(!1),[l,c]=E.useState(""),u=E.useRef(null),h=E.useCallback(async m=>{if(!m.type.startsWith("image/")){c("Please select an image file");return}if(m.size>10*1024*1024){c("Image must be under 10MB");return}s(!0),c("");const x=m.name.split(".").pop(),_=`featured/${`${Date.now()}-${Math.random().toString(36).substring(2,8)}.${x}`}`,{error:g}=await Re.storage.from("news-images").upload(_,m,{cacheControl:"3600",upsert:!1});if(g){c("Upload failed. Please try again."),s(!1);return}const{data:y}=Re.storage.from("news-images").getPublicUrl(_);e(y.publicUrl),s(!1)},[e]),p=E.useCallback(m=>{m.preventDefault(),a(!1);const x=m.dataTransfer.files[0];x&&h(x)},[h]),d=E.useCallback(m=>{var b;const x=(b=m.target.files)==null?void 0:b[0];x&&h(x)},[h]);return o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:r}),t?o.jsxs("div",{className:"relative group rounded-lg overflow-hidden border border-gray-200",children:[o.jsx("img",{src:t,alt:"Featured",className:"w-full h-48 object-cover"}),o.jsxs("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-3",children:[o.jsx("button",{type:"button",onClick:()=>{var m;return(m=u.current)==null?void 0:m.click()},className:"bg-white text-gray-800 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-100 transition-colors",children:"Replace"}),o.jsx("button",{type:"button",onClick:()=>e(""),className:"bg-red-600 text-white p-2 rounded-lg hover:bg-red-700 transition-colors",children:o.jsx(km,{size:18})})]})]}):o.jsx("div",{onDragOver:m=>{m.preventDefault(),a(!0)},onDragLeave:()=>a(!1),onDrop:p,onClick:()=>{var m;return!n&&((m=u.current)==null?void 0:m.click())},className:`border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-all duration-200 ${i?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-blue-400 hover:bg-gray-50"} ${n?"pointer-events-none opacity-60":""}`,children:n?o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(f2,{className:"animate-spin text-blue-600 mb-3",size:32}),o.jsx("p",{className:"text-sm text-gray-600",children:"Uploading image..."})]}):o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx("div",{className:"w-14 h-14 roun
438ded-full bg-blue-50 flex items-center justify-center mb-3",children:i?o.jsx(k2,{className:"text-blue-600",size:24}):o.jsx(u2,{className:"text-blue-600",size:24})}),o.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:i?"Drop image here":"Click to upload or drag and drop"}),o.jsx("p",{className:"text-xs text-gray-500",children:"PNG, JPG, GIF, WebP up to 10MB"})]})}),l&&o.jsx("p",{className:"text-sm text-red-600 mt-2",children:l}),o.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:d,className:"hidden"})]})},x3=()=>{const[t,e]=E.useState([]),[r,n]=E.useState(!0),[s,i]=E.useState(!1),[a,l]=E.useState(null),[c,u]=E.useState("all"),[h,p]=E.useState("all"),[d,m]=E.useState({title:"",slug:"",content:"",excerpt:"",featured_image:"",category:"Program Update",type:"news",author:"",status:"draft",event_date:"",event_time:"",event_location:"",publish_date:new Date().toISOString().split("T")[0]}),x=["Program Update","Community Health","Technology","Program Launch","Public Health","Youth Development","Economic Development","Education","Broadband Access"];E.useEffect(()=>{b()},[c,h]);const b=async()=>{try{n(!0);let N=Re.from("news_items").select("*").order("publish_date",{ascending:!1});c!=="all"&&(N=N.eq("type",c)),h!=="all"&&(N=N.eq("status",h));const{data:T,error:A}=await N;if(A)throw A;e(T||[])}catch(N){console.error("Error fetching news items:",N),alert("Failed to load news items")}finally{n(!1)}},_=N=>N.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),g=N=>{m({...d,title:N,slug:a?d.slug:_(N)})},y=async N=>{var T;if(N.preventDefault(),!d.title||!d.content||!d.excerpt||!d.author){alert("Please fill in all required fields");return}try{const A={title:d.title,slug:d.slug,content:d.content,excerpt:d.excerpt,featured_image:d.featured_image||null,category:d.category,type:d.type,author:d.author,status:d.status,event_date:d.event_date||null,event_time:d.event_time||null,event_location:d.event_location||null,publish_date:d.publish_date};if(a){const{error:P}=await Re.from("news_items").update(A).eq("id",a.id);if(P)throw P;alert("News item updated successfully!")}else{const{error:P}=await Re.from("news_items").insert([A]);if(P)throw P;alert("News item created successfully!")}S(),b()}catch(A){console.error("Error saving news item:",A),(T=A.message)!=null&&T.includes("duplicate key")?alert("A news item with this slug already exists. Please use a different title or slug."):alert("Failed to save news item")}},v=N=>{l(N),m({title:N.title,slug:N.slug,content:N.content,excerpt:N.excerpt,featured_image:N.featured_image||"",category:N.category,type:N.type,author:N.author,status:N.status,event_date:N.event_date?N.event_date.split("T")[0]:"",event_time:N.event_time||"",event_location:N.event_location||"",publish_date:N.publish_date.split("T")[0]}),i(!0)},j=async N=>{if(confirm("Are you sure you want to delete this item?"))try{const{error:T}=await Re.from("news_items").delete().eq("id",N);if(T)throw T;alert("News item deleted successfully!"),b()}catch(T){console.error("Error deleting news item:",T),alert("Failed to delete news item")}},S=()=>{m({title:"",slug:"",content:"",excerpt:"",featured_image:"",category:"Program Update",type:"news",author:"",status:"draft",event_date:"",event_time:"",event_location:"",publish_date:new Date().toISOString().split("T")[0]}),l(null),i(!1)};return s?o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsxs("div",{className:"flex justify-between items-center mb-6",children:[o.jsxs("h2",{className:"text-2xl font-bold text-gray-900",children:[a?"Edit":"Create"," ",d.type==="news"?"News Item":"Event"]}),o.jsx("button",{onClick:S,className:"text-gray-600 hover:text-gray-800",children:"Cancel"})]}),o.jsxs("form",{onSubmit:y,className:"space-y-6",children:[o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Type *"}),o.jsxs("select",{value:d.type,onChange:N=>m({...d,type:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0,children:[o.jsx("option",{value:"news",children:"News Article"}),o.jsx("option",{value:"event",children:"Event"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Status *"}),o.jsxs("select",{value:d.status,onChange:N=>m({...d,status:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0,children:[o.jsx("option",{value:"draft",children:"Draft"}),o.jsx("option",{value:"published",children:"Published"}),o.jsx("option",{value:"archived",children:"Archived"})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Title *"}),o.jsx("input",{type:"text",value:d.title,onChange:N=>g(N.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"URL Slug *"}),o.jsx("input",{type:"text",value:d.slug,onChange:N=>m({...d,slug:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",placeholder:"url-friendly-slug",required:!0})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Excerpt *"}),o.jsx("textarea",{value:d.excerpt,onChange:N=>m({...d,excerpt:N.target.value}),rows:3,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",placeholder:"Short summary for preview...",required:!0})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Content *"}),o.jsx(y3,{value:d.content,onChange:N=>m({...d,content:N})}),o.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Use the toolbar to format text, add headings, lists, links, and images. You can also drag and drop images directly into the editor."})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Category *"}),o.jsx("select",{value:d.category,onChange:N=>m({...d,category:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0,children:x.map(N=>o.jsx("option",{value:N,children:N},N))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Author *"}),o.jsx("input",{type:"text",value:d.author,onChange:N=>m({...d,author:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0})]})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsx(v3,{value:d.featured_image,onChange:N=>m({...d,featured_image:N})}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Publish Date *"}),o.jsx("input",{type:"date",value:d.publish_date,onChange:N=>m({...d,publish_date:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0})]})]}),d.type==="event"&&o.jsxs("div",{className:"border-t pt-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Event Details"}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Event Date"}),o.jsx("input",{type:"date",value:d.event_date,onChange:N=>m({...d,event_date:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Event Time"}),o.jsx("input",{type:"text",value:d.event_time,onChange:N=>m({...d,event_time:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",placeholder:"e.g., 2:00 PM - 4:00 PM"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Event Location"}),o.jsx("input",{type:"text",value:d.event_location,onChange:N=>m({...d,event_location:N.target.value}),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",placeholder:"Location name"})]})]})]}),o.jsxs("div",{className:"flex gap-4 pt-6 border-t",children:[o.jsxs("button",{type:"submit",className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-colors",children:[a?"Update":"Create"," ",d.type==="news"?"Article":"Event"]}),o.jsx("button",{type:"button",onClick:S,className:"flex-1 bg-gray-200 hover:bg-gray-300 text-gray-700 font-semibold py-3 px-6 rounded-lg transition-colors",children:"Cancel"})]})]})]}):o.jsxs("div",{children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6 mb-6",children:[o.jsxs("div",{className:"flex justify-between items-center mb-6",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"News & Events Manager"}),o.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 roun
438ded-lg transition-colors",children:[o.jsx(v2,{size:20}),"Create New"]})]}),o.jsxs("div",{className:"flex flex-wrap gap-4 mb-6",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 py-2",children:"Type:"}),["all","news","event"].map(N=>o.jsx("button",{onClick:()=>u(N),className:`px-4 py-2 rounded-lg font-medium transition-colors ${c===N?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:N.charAt(0).toUpperCase()+N.slice(1)},N))]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 py-2",children:"Status:"}),["all","draft","published","archived"].map(N=>o.jsx("button",{onClick:()=>p(N),className:`px-4 py-2 rounded-lg font-medium transition-colors ${h===N?"bg-green-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:N.charAt(0).toUpperCase()+N.slice(1)},N))]})]})]}),r?o.jsx("div",{className:"text-center py-12",children:o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):t.length===0?o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-12 text-center",children:o.jsx("p",{className:"text-gray-500 text-lg",children:"No items found"})}):o.jsx("div",{className:"grid lg:grid-cols-2 gap-6",children:t.map(N=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:[N.featured_image&&o.jsx("img",{src:N.featured_image,alt:N.title,className:"w-full h-48 object-cover"}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${N.type==="news"?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:N.type}),o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${N.status==="published"?"bg-green-100 text-green-800":N.status==="draft"?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-800"}`,children:N.status}),o.jsx("span",{className:"px-2 py-1 bg-gray-100 text-gray-700 rounded text-xs",children:N.category})]}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:N.title}),o.jsx("p",{className:"text-gray-600 text-sm mb-3",children:N.excerpt}),o.jsxs("div",{className:"text-sm text-gray-500 space-y-1 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(vr,{size:14}),o.jsxs("span",{children:["Publish: ",new Date(N.publish_date).toLocaleDateString()]})]}),N.type==="event"&&N.event_date&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(vr,{size:14}),o.jsxs("span",{children:["Event: ",new Date(N.event_date).toLocaleDateString()]})]}),N.event_time&&o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(_x,{size:14}),o.jsx("span",{children:N.event_time})]}),N.event_location&&o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ri,{size:14}),o.jsx("span",{children:N.event_location})]})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:()=>v(N),className:"flex-1 flex items-center justify-center gap-2 px-3 py-2 bg-blue-100 hover:bg-blue-200 text-blue-800 rounded-lg text-sm font-medium transition-colors",children:[o.jsx(w2,{size:16}),"Edit"]}),o.jsxs("button",{onClick:()=>j(N.id),className:"flex-1 flex items-center justify-center gap-2 px-3 py-2 bg-red-100 hover:bg-red-200 text-red-800 rounded-lg text-sm font-medium transition-colors",children:[o.jsx(N2,{size:16}),"Delete"]})]})]})]},N.id))})]})},b3=()=>{const[t,e]=E.useState("submissions"),[r,n]=E.useState([]),[s,i]=E.useState([]),[a,l]=E.useState(!0),[c,u]=E.useState(""),[h,p]=E.useState("all"),[d,m]=E.useState(null),[x,b]=E.useState(!1),[_,g]=E.useState(""),[y,v]=E.useState(""),j="empower2025",S=R=>{R.preventDefault(),_===j?(b(!0),v(""),N()):v("Incorrect password")},N=async()=>{try{l(!0);let R=Re.from("contact_submissions").select("*").order("created_at",{ascending:!1});h!=="all"&&(R=R.eq("status",h));const{data:Q,error:he}=await R;if(he)throw he;n(Q||[])}catch(R){console.error("Error fetching submissions:",R),u("Failed to load submissions")}finally{l(!1)}},T=async()=>{try{l(!0);const{data:R,error:Q}=await Re.from("email_subscriptions").select("*").order("subscribed_at",{ascending:!1});if(Q)throw Q;i(R||[])}catch(R){console.error("Error fetching subscriptions:",R),u("Failed to load subscriptions")}finally{l(!1)}},A=()=>{const Q=[["Email","Subscribed At","Status"].join(","),...s.map(qt=>
438[qt.email,new Date(qt.subscribed_at).toLocaleString(),qt.is_active?"Active":"Unsubscribed"].join(","))].join(`
439`),he=new Blob([Q],{type:"text/csv;charset=utf-8;"}),Ae=document.createElement("a"),en=URL.createObjectURL(he);Ae.setAttribute("href",en),Ae.setAttribute("download",`email_subscriptions_${new Date().toISOString().split("T")[0]}.csv`),Ae.style.visibility="hidden",document.body.appendChild(Ae),Ae.click(),document.body.removeChild(Ae)},P=async R=>{if(confirm("Are you sure you want to delete this subscription?"))try{const{error:Q}=await Re.from("email_subscriptions").delete().eq("id",R);if(Q)throw Q;i(s.filter(he=>he.id!==R))}catch(Q){console.error("Error deleting subscription:",Q),alert("Failed to delete subscription")}},U=async(R,Q)=>{try{const{error:he}=await Re.from("contact_submissions").update({status:Q}).eq("id",R);if(he)throw he;n(r.map(Ae=>Ae.id===R?{...Ae,status:Q}:Ae)),(d==null?void 0:d.id)===R&&m({...d,status:Q})}catch(he){console.error("Error updating status:",he),alert("Failed to update status")}};return E.useEffect(()=>{x&&(t==="submissions"?N():t==="subscriptions"&&T())},[h,x,t]),x?o.jsxs("div",{className:"min-h-screen bg-gray-100",children:[o.jsx("div",{className:"bg-white border-b border-gray-200",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-6",children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-gray-900",children:"Admin Dashboard"}),o.jsx("p",{className:"text-gray-600 mt-2 text-sm sm:text-base",children:"Manage contact submissions and news content"}),o.jsxs("div",{className:"flex flex-wrap gap-2 sm:gap-4 mt-6",children:[o.jsxs("button",{onClick:()=>e("submissions"),className:`flex items-center gap-2 px-3 sm:px-4 py-2 rounded-lg font-medium transition-colors text-sm sm:text-base ${t==="submissions"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[o.jsx(p2,{size:18,className:"sm:w-5 sm:h-5"}),o.jsx("span",{className:"hidden sm:inline",children:"Contact Submissions"}),o.jsx("span",{className:"sm:hidden",children:"Submissions"})]}),o.jsxs("button",{onClick:()=>e("news"),className:`flex items-center gap-2 px-3 sm:px-4 py-2 rounded-lg font-medium transition-colors text-sm sm:text-base ${t==="news"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[o.jsx(g2,{size:18,className:"sm:w-5 sm:h-5"}),o.jsx("span",{className:"hidden sm:inline",children:"News & Events"}),o.jsx("span",{className:"sm:hidden",children:"News"})]}),o.jsxs("button",{onClick:()=>e("subscriptions"),className:`flex items-center gap-2 px-3 sm:px-4 py-2 rounded-lg font-medium transition-colors text-sm sm:text-base ${t==="subscriptions"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[o.jsx($t,{size:18,className:"sm:w-5 sm:h-5"}),o.jsx("span",{className:"hidden sm:inline",children:"Email Subscriptions"}),o.jsx("span",{className:"sm:hidden",children:"Emails"})]})]})]})}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:t==="news"?o.jsx(x3,{}):t==="subscriptions"?o.jsxs("div",{children:[o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-4 sm:p-6 mb-6",children:o.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-gray-900",children:"Email Subscriptions"}),o.jsxs("p",{className:"text-gray-600 mt-1 text-sm sm:text-base",children:["Total subscribers: ",s.filter(R=>R.is_active).length]})]}),o.jsxs("button",{onClick:A,disabled:s.length===0,className:"flex items-center justify-center gap-2 px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-lg font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm sm:text-base whitespace-nowrap",children:[o.jsx(Nx,{size:18,className:"sm:w-5 sm:h-5"}),"Download CSV"]})]})}),a?o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"}),o.jsx("p",{className:"mt-4 text-gray-600",children:"Loading subscriptions..."})]}):c?o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:o.jsx("p",{className:"text-red-800",children:c})}):s.length===0?o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-12 text-center",children:o.jsx("p",{className:"text-gray-500 text-lg",children:"No email subscriptions yet"})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"hidden md:block bg-white rounded-xl shadow-lg overflow-hidden",children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Email"}),o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Subscribed At"}),o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Status"}),o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-200",children:s.map(R=>o.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex items-center",children:[o.jsx(Sn,{size:16,className:"text-gray-400 mr-2"}),o.jsx("span",{className:"text-gray-900",children:R.email})]})}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-600",children:o.jsxs("div",{className:"flex items-center",children:[o.jsx(vr,{size:14,className:"mr-1"}),new Date(R.subscribed_at).toLocaleDateString()," at"," ",new Date(R.subscribed_at).toLocaleTimeString()]})}),o.jsx("td",{className:"px-6 py-4",children:o.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${R.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:R.is_active?"Active":"Unsubscribed"})}),o.jsx("td",{className:"px-6 py-4",children:o.jsx("button",{onClick:()=>
439P(R.id),className:"text-red-600 hover:text-red-800 transition-colors",title:"Delete subscription",children:o.jsx(gg,{size:18})})})]},R.id))})]})})}),o.jsx("div",{className:"md:hidden space-y-4",children:s.map(R=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-4",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx(Sn,{size:16,className:"text-gray-400 mr-2 flex-shrink-0"}),o.jsx("span",{className:"text-gray-900 font-medium truncate",children:R.email})]}),o.jsx("button",{onClick:()=>P(R.id),className:"text-red-600 hover:text-red-800 transition-colors ml-2 flex-shrink-0",title:"Delete subscription",children:o.jsx(gg,{size:18})})]}),o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs("div",{className:"flex items-center text-gray-600",children:[o.jsx(vr,{size:14,className:"mr-1 flex-shrink-0"}),o.jsxs("span",{className:"truncate",children:[new Date(R.subscribed_at).toLocaleDateString()," at"," ",new Date(R.subscribed_at).toLocaleTimeString()]})]}),o.jsx("div",{children:o.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${R.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:R.is_active?"Active":"Unsubscribed"})})]})]},R.id))})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-4 sm:p-6 mb-6",children:[o.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[o.jsx(l2,{size:18,className:"text-gray-400 sm:w-5 sm:h-5"}),o.jsx("span",{className:"font-medium text-gray-700 text-sm sm:text-base",children:"Filter by Status:"})]}),o.jsx("div",{className:"flex flex-wrap gap-2",children:["all","new","reviewed","responded"].map(R=>o.jsx("button",{onClick:()=>p(R),className:`px-3 sm:px-4 py-2 rounded-lg font-medium transition-colors text-sm sm:text-base ${h===R?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:R.charAt(0).toUpperCase()+R.slice(1)},R))})]}),a?o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"}),o.jsx("p",{className:"mt-4 text-gray-600",children:"Loading submissions..."})]}):c?o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:o.jsx("p",{className:"text-red-800",children:c})}):r.length===0?o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-12 text-center",children:o.jsx("p",{className:"text-gray-500 text-lg",children:"No submissions found"})}):o.jsx("div",{className:"grid lg:grid-cols-2 gap-4 sm:gap-6",children:r.map(R=>o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-4 sm:p-6 hover:shadow-xl transition-shadow cursor-pointer",onClick:()=>m(R),children:[o.jsxs("div",{className:"flex justify-between items-start mb-4 gap-2",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("h3",{className:"text-lg sm:text-xl font-semibold text-gray-900 truncate",children:R.name}),o.jsxs("p",{className:"text-gray-600 text-xs sm:text-sm flex items-center mt-1",children:[o.jsx(vr,{size:14,className:"mr-1 flex-shrink-0"}),o.jsxs("span",{className:"truncate",children:[new Date(R.created_at).toLocaleDateString()," at"," ",new Date(R.created_at).toLocaleTimeString()]})]})]}),o.jsx("span",{className:`px-2 sm:px-3 py-1 rounded-full text-xs font-medium flex-shrink-0 ${R.status==="new"?"bg-blue-100 text-blue-800":R.status==="reviewed"?"bg-yellow-100 text-yellow-800":"bg-green-100 text-green-800"}`,children:R.status})]}),o.jsxs("div",{className:"space-y-2 mb-4",children:[o.jsxs("p",{className:"text-gray-700 flex items-center text-sm sm:text-base",children:[o.jsx(Sn,{size:16,className:"mr-2 text-gray-400 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:R.email})]}),R.phone&&o.jsxs("p",{className:"text-gray-700 flex items-center text-sm sm:text-base",children:[o.jsx(y2,{size:16,className:"mr-2 text-gray-400 flex-shrink-0"}),R.phone]}),R.subject&&o.jsxs("p",{className:"text-gray-700 text-sm sm:text-base",children:[o.jsx("span",{className:"font-medium",children:"Subject:"})," ",R.subject]})]}),o.jsx("p",{className:"text-gray-600 line-clamp-3 mb-4 text-sm sm:text-base",children:R.message}),R.interests&&R.interests.length>0&&o.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:R.interests.map((Q,he)=>o.jsx("span",{className:"px-2 py-1 bg-gray-100 text-gray-700 rounded text-xs",children:Q},he))}),o.jsxs("div",{className:"flex gap-2 pt-4 border-t border-gray-200",children:[o.jsxs("button",{onClick:Q=>{Q.stopPropagation(),U(R.id,"reviewed")},className:"flex-1 px-2 sm:px-3 py-2 bg-yellow-100 hover:bg-yellow-200 text-yellow-800 rounded-lg text-xs sm:text-sm font-medium transition-colors",children:[o.jsx(o2,{size:14,className:"inline mr-1"}),o.jsx("span",{className:"hidden sm:inline",children:"Mark "}),"Reviewed"]}),o.jsxs("button",{onClick:Q=>{Q.stopPropagation(),U(R.id,"responded")},className:"flex-1 px-2 sm:px-3 py-2 bg-green-100 hover:bg-green-200 text-green-800 rounded-lg text-xs sm:text-sm font-medium transition-colors",children:[o.jsx(wx,{size:14,className:"inline mr-1"}),o.jsx("span",{className:"hidden sm:inline",children:"Mark "}),"Responded"]})]})]},R.id))}),d&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",onClick:()=>m(null),children:o.jsxs("div",{className:"bg-white rounded-xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-y-auto p-8",onClick:R=>R.stopPropagation(),children:[o.jsxs("div",{className:"flex justify-between items-start mb-6",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:d.name}),o.jsxs("p",{className:"text-gray-600 mt-1",children:[new Date(d.created_at).toLocaleDateString()," at"," ",new Date(d.created_at).toLocaleTimeString()]})]}),o.jsx("button",{onClick:()=>m(null),className:"text-gray-400 hover:text-gray-600",children:o.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),o.jsx("p",{className:"text-gray-900",children:d.email})]}),d.phone&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone"}),o.jsx("p",{className:"text-gray-900",children:d.phone})]}),d.subject&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Subject"}),o.jsx("p",{className:"text-gray-900",children:d.subject})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message"}),o.jsx("p",{className:"text-gray-900 whitespace-pre-wrap",children:d.message})]}),d.interests&&d.interests.length>0&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Areas of Interest"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:d.interests.map((R,Q)=>
439o.jsx("span",{className:"px-3 py-1 bg-blue-100 text-blue-800 rounded-lg text-sm",children:R},Q))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Status"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>U(d.id,"new"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${d.status==="new"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"New"}),o.jsx("button",{onClick:()=>U(d.id,"reviewed"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${d.status==="reviewed"?"bg-yellow-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Reviewed"}),o.jsx("button",{onClick:()=>U(d.id,"responded"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${d.status==="responded"?"bg-green-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Responded"})]})]})]}),o.jsxs("div",{className:"mt-8 flex gap-4",children:[o.jsx("a",{href:`mailto:${d.email}`,className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-colors text-center",children:"Reply via Email"}),o.jsx("button",{onClick:()=>m(null),className:"flex-1 bg-gray-200 hover:bg-gray-300 text-gray-700 font-semibold py-3 px-6 rounded-lg transition-colors",children:"Close"})]})]})})]})})]}):o.jsx("div",{className:"min-h-screen bg-gray-100 flex items-center justify-center px-4",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8 max-w-md w-full",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-6 text-center",children:"Admin Login"}),o.jsxs("form",{onSubmit:S,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),o.jsx("input",{type:"password",id:"password",value:_,onChange:R=>g(R.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Enter admin password",required:!0})]}),y&&o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:o.jsx("p",{className:"text-red-800 text-sm",children:y})}),o.jsx("button",{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-colors duration-200",children:"Login"})]})]})})},w3=[{icon:No,label:"Expanding broadband access to rural families"},{icon:jm,label:"Supporting education and literacy programs"},{icon:Wr,label:"Improving healthcare access in underserved areas"},{icon:bx,label:"Strengthening economic opportunity for all"}],_3=()=>{const[t,e]=E.useState(!1);return E.useEffect(()=>{const r=setTimeout(()=>e(!0),100);return()=>clearTimeout(r)},[]),o.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-blue-50 to-white",children:[o.jsxs("section",{className:"relative overflow-hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-700 to-blue-900"}),o.jsxs("div",{className:"absolute inset-0 opacity-10",children:[o.jsx("div",{className:"absolute top-0 left-0 w-96 h-96 rounded-full bg-white transform -translate-x-1/2 -translate-y-1/2"}),o.jsx("div",{className:"absolute bottom-0 right-0 w-96 h-96 rounded-full bg-white transform translate-x-1/2 translate-y-1/2"})]}),o.jsx("div",{className:"relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-24 text-center",children:o.jsxs("div",{className:`transition-all duration-700 ease-out ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-6"}`,children:[o.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-white/20 mb-8 ring-4 ring-white/30",children:o.jsx(Wr,{className:"text-white",size:40,fill:"currentColor"})}),o.jsx("h1",{className:"text-4xl sm:text-5xl font-bold text-white mb-6 leading-tight",children:"Thank You for Your Generosity"}),o.jsx("p",{className:"text-xl text-blue-100 max-w-2xl mx-auto leading-relaxed",children:"Your donation makes a real difference in the lives of families across Southwest Georgia. We are grateful for your commitment to building stronger communities."})]})})]}),o.jsx("section",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 -mt-10 relative z-10",children:o.jsxs("div",{className:`bg-white rounded-2xl shadow-xl p-8 sm:p-10 border border-gray-100 transition-all duration-700 delay-200 ease-out ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-6"}`,children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("span",{className:"inline-block bg-green-100 text-green-700 text-sm font-semibold px-4 py-1.5 rounded-full mb-4",children:"Donation Received"}),o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Your support is confirmed"}),o.jsx("p",{className:"text-gray-600 leading-relaxed",children:"A receipt has been sent to your email address. Empower Southwest Georgia is a registered 501(c)(3) nonprofit — your donation is fully tax-deductible."})]}),o.jsxs("div",{className:"border-t border-gray-100 pt-8",children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wider mb-5 text-center",children:"Your gift helps fund"}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:w3.map(({icon:r,label:n})=>o.jsxs("div",{className:"flex items-start space-x-3 p-4 rounded-xl bg-gray-50",children:[o.jsx("div",{className:"flex-shrink-0 w-9 h-9 flex items-center justify-center rounded-lg bg-blue-100 text-blue-700",children:o.jsx(r,{size:18})}),o.jsx("p",{className:"text-sm text-gray-700 leading-snug pt-1",children:n})]},n))})]})]})}),o.jsxs("section",{className:`max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-12 transition-all duration-700 delay-300 ease-out ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-6"}`,children:[o.jsxs("div",{className:"text-center mb-10",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Stay Connected"}),o.jsx("p",{className:"text-gray-600",children:"There are more ways to make an impact in y
439our community."})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[o.jsxs(re,{to:"/programs",className:"group flex flex-col items-center text-center p-6 rounded-xl border border-gray-200 hover:border-blue-300 hover:shadow-md transition-all duration-200 bg-white",children:[o.jsx("div",{className:"w-12 h-12 flex items-center justify-center rounded-full bg-blue-50 text-blue-700 mb-4 group-hover:bg-blue-100 transition-colors duration-200",children:o.jsx(No,{size:22})}),o.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Our Programs"}),o.jsx("p",{className:"text-sm text-gray-500",children:"See the work your gift supports"})]}),o.jsxs(re,{to:"/impact",className:"group flex flex-col items-center text-center p-6 rounded-xl border border-gray-200 hover:border-blue-300 hover:shadow-md transition-all duration-200 bg-white",children:[o.jsx("div",{className:"w-12 h-12 flex items-center justify-center rounded-full bg-green-50 text-green-700 mb-4 group-hover:bg-green-100 transition-colors duration-200",children:o.jsx($t,{size:22})}),o.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Our Impact"}),o.jsx("p",{className:"text-sm text-gray-500",children:"Stories from the community"})]}),o.jsxs(re,{to:"/contact",className:"group flex flex-col items-center text-center p-6 rounded-xl border border-gray-200 hover:border-blue-300 hover:shadow-md transition-all duration-200 bg-white",children:[o.jsx("div",{className:"w-12 h-12 flex items-center justify-center rounded-full bg-orange-50 text-orange-600 mb-4 group-hover:bg-orange-100 transition-colors duration-200",children:o.jsx(Wr,{size:22})}),o.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Get Involved"}),o.jsx("p",{className:"text-sm text-gray-500",children:"Volunteer or partner with us"})]})]}),o.jsx("div",{className:"text-center mt-10",children:o.jsxs(re,{to:"/",className:"inline-flex items-center text-blue-700 font-medium hover:text-blue-800 transition-colors duration-200",children:["Return to home",o.jsx(Pr,{className:"ml-2",size:16})]})})]})]})},N3=()=>{const t=Qr();return E.useEffect(()=>{t.hash?setTimeout(()=>{const e=document.querySelector(t.hash);e&&e.scrollIntoView({behavior:"smooth",block:"start"})},100):window.scrollTo({top:0,behavior:"smooth"})},[t]),null};function j3(){return o.jsx(FN,{children:o.jsxs("div",{className:"min-h-screen bg-white",children:[o.jsx(E2,{}),o.jsx(N3,{}),o.jsx("main",{children:o.jsxs(bN,{children:[o.jsx(St,{path:"/",element:o.jsx(O2,{})}),o.jsx(St,{path:"/about",element:o.jsx(R2,{})}),o.jsx(St,{path:"/programs",element:o.jsx(L2,{})}),o.jsx(St,{path:"/impact",element:o.jsx(I2,{})}),o.jsx(St,{path:"/resources",element:o.jsx(P2,{})}),o.jsx(St,{path:"/offices",element:o.jsx($2,{})}),o.jsx(St,{path:"/news",element:o.jsx(pS,{})}),o.jsx(St,{path:"/news/:slug",element:o.jsx(gS,{})}),o.jsx(St,{path:"/contact",element:o.jsx(yS,{})}),o.jsx(St,{path:"/admin",element:o.jsx(b3,{})}),o.jsx(St,{path:"/thank-you",element:o.jsx(_3,{})})]})}),o.jsx(T2,{})]})})}rx(document.getElementById("root")).render(o.jsx(E.StrictMode,{children:o.jsx(j3,{})}))});export default k3();

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.