PageSourceSearch

https://www.100x100.com/assets/index-CruBMo6I.js

js 100x100.com collected 2026-10-04 13:15:15 UTC 1,559,206 bytes, 274 lines download raw bytes

vendor: 5,676 bytes, line 1
1function Yy(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Qy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function QD(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var s=!1;try{s=this instanceof r}catch{}return s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var tv={exports:{}},sh={};var WT;function Uq(){if(WT)return sh;WT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var l in s)l!=="key"&&(i[l]=s[l])}else i=s;return s=i.ref,{$$typeof:t,type:r,key:a,ref:s!==void 0?s:null,props:i}}return sh.Fragment=e,sh.jsx=n,sh.jsxs=n,sh}var GT;function Bq(){return GT||(GT=1,tv.exports=Uq()),tv.exports}var c=Bq();const Fq=Qy(c),zq=Yy({__proto__:null,default:Fq},[c]);var nv={exports:{}},ih={},rv={exports:{}},sv={};var YT;function qq(){return YT||(YT=1,(function(t){function e($,Q){var re=$.length;$.push(Q);e:for(;0<re;){var le=re-1>>>1,P=$[le];if(0<s(P,Q))$[le]=Q,$[re]=P,re=le;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var Q=$[0],re=$.pop();if(re!==Q){$[0]=re;e:for(var le=0,P=$.length,te=P>>>1;le<te;){var ue=2*(le+1)-1,fe=$[ue],ke=ue+1,Pe=$[ke];if(0>s(fe,re))ke<P&&0>s(Pe,fe)?($[le]=Pe,$[ke]=re,le=ke):($[le]=fe,$[ue]=re,le=ue);else if(ke<P&&0>s(Pe,re))$[le]=Pe,$[ke]=re,le=ke;else break e}}return Q}function s($,Q){var re=$.sortIndex-Q.sortIndex;return re!==0?re:$.id-Q.id}if(t.unstable_now=void 0,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 d=[],h=[],p=1,m=null,g=3,x=!1,v=!1,S=!1,C=!1,j=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D($){for(var Q=n(h);Q!==null;){if(Q.callback===null)r(h);else if(Q.startTime<=$)r(h),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=n(h)}}function M($){if(S=!1,D($),!v)if(n(d)!==null)v=!0,I||(I=!0,ee());else{var Q=n(h);Q!==null&&he(M,Q.startTime-$)}}var I=!1,_=-1,L=5,V=-1;function B(){return C?!0:!(t.unstable_now()-V<L)}function K(){if(C=!1,I){var $=t.unstable_now();V=$;var Q=!0;try{e:{v=!1,S&&(S=!1,E(_),_=-1),x=!0;var re=g;try{t:{for(D($),m=n(d);m!==null&&!(m.expirationTime>$&&B());){var le=m.callback;if(typeof le=="function"){m.callback=null,g=m.priorityLevel;var P=le(m.expirationTime<=$);if($=t.unstable_now(),typeof P=="function"){m.callback=P,D($),Q=!0;break t}m===n(d)&&r(d),D($)}else r(d);m=n(d)}if(m!==null)Q=!0;else{var te=n(h);te!==null&&he(M,te.startTime-$),Q=!1}}break e}finally{m=null,g=re,x=!1}Q=void 0}}finally{Q?ee():I=!1}}}var ee;if(typeof A=="function")ee=function(){A(K)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,se=ie.port2;ie.port1.onmessage=K,ee=function(){se.postMessage(null)}}else ee=function(){j(K,0)};function he($,Q){_=j(function(){$(t.unstable_now())},Q)}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_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"):L=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function($){switch(g){case 1:case 2:case 3:var Q=3;break;default:Q=g}var re=g;g=Q;try{return $()}finally{g=re}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,Q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var re=g;g=$;try{return Q()}finally{g=re}},t.unstable_scheduleCallback=function($,Q,re){var le=t.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?le+re:le):re=le,$){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=re+P,$={id:p++,callback:Q,priorityLevel:$,startTime:re,expirationTime:P,sortIndex:-1},re>le?($.sortIndex=re,e(h,$),n(d)===null&&$===n(h)&&(S?(E(_),_=-1):S=!0,he(M,re-le))):($.sortIndex=P,e
vendor: 9,542 bytes, line 1
1(d,$),v||x||(v=!0,I||(I=!0,ee()))),$},t.unstable_shouldYield=B,t.unstable_wrapCallback=function($){var Q=g;return function(){var re=g;g=Q;try{return $.apply(this,arguments)}finally{g=re}}}})(sv)),sv}var QT;function Vq(){return QT||(QT=1,rv.exports=qq()),rv.exports}var iv={exports:{}},et={};var XT;function $q(){if(XT)return et;XT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function g(P){return P===null||typeof P!="object"?null:(P=m&&P[m]||P["@@iterator"],typeof P=="function"?P:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,S={};function C(P,te,ue){this.props=P,this.context=te,this.refs=S,this.updater=ue||x}C.prototype.isReactComponent={},C.prototype.setState=function(P,te){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,te,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function j(){}j.prototype=C.prototype;function E(P,te,ue){this.props=P,this.context=te,this.refs=S,this.updater=ue||x}var A=E.prototype=new j;A.constructor=E,v(A,C.prototype),A.isPureReactComponent=!0;var D=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},I=Object.prototype.hasOwnProperty;function _(P,te,ue,fe,ke,Pe){return ue=Pe.ref,{$$typeof:t,type:P,key:te,ref:ue!==void 0?ue:null,props:Pe}}function L(P,te){return _(P.type,te,void 0,void 0,void 0,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function B(P){var te={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ue){return te[ue]})}var K=/\/+/g;function ee(P,te){return typeof P=="object"&&P!==null&&P.key!=null?B(""+P.key):te.toString(36)}function ie(){}function se(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(ie,ie):(P.status="pending",P.then(function(te){P.status==="pending"&&(P.status="fulfilled",P.value=te)},function(te){P.status==="pending"&&(P.status="rejected",P.reason=te)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function he(P,te,ue,fe,ke){var Pe=typeof P;(Pe==="undefined"||Pe==="boolean")&&(P=null);var be=!1;if(P===null)be=!0;else switch(Pe){case"bigint":case"string":case"number":be=!0;break;case"object":switch(P.$$typeof){case t:case e:be=!0;break;case p:return be=P._init,he(be(P._payload),te,ue,fe,ke)}}if(be)return ke=ke(P),be=fe===""?"."+ee(P,0):fe,D(ke)?(ue="",be!=null&&(ue=be.replace(K,"$&/")+"/"),he(ke,te,ue,"",function(Je){return Je})):ke!=null&&(V(ke)&&(ke=L(ke,ue+(ke.key==null||P&&P.key===ke.key?"":(""+ke.key).replace(K,"$&/")+"/")+be)),te.push(ke)),1;be=0;var vt=fe===""?".":fe+":";if(D(P))for(var Xe=0;Xe<P.length;Xe++)fe=P[Xe],Pe=vt+ee(fe,Xe),be+=he(fe,te,ue,Pe,ke);else if(Xe=g(P),typeof Xe=="function")for(P=Xe.call(P),Xe=0;!(fe=P.next()).done;)fe=fe.value,Pe=vt+ee(fe,Xe++),be+=he(fe,te,ue,Pe,ke);else if(Pe==="object"){if(typeof P.then=="function")return he(se(P),te,ue,fe,ke);throw te=String(P),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return be}function $(P,te,ue){if(P==null)return P;var fe=[],ke=0;return he(P,fe,"","",function(Pe){return te.call(ue,Pe,ke++)}),fe}function Q(P){if(P._status===-1){var te=P._result;te=te(),te.then(function(ue){(P._status===0||P._status===-1)&&(P._status=1,P._result=ue)},function(ue){(P._status===0||P._status===-1)&&(P._status=2,P._result=ue)}),P._status===-1&&(P._status=0,P._result=te)}if(P._status===1)return P._result.default;throw P._result}var re=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function le(){}return et.Children={map:$,forEach:function(P,te,ue){$(P,function(){te.apply(this,arguments)},ue)},count:function(P){var te=0;return $(P,function(){te++}),te},toArray:function(P){return $(P,function(te){return te})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},et.Component=C,et.Fragment=n,et.Profiler=s,et.PureComponent=E,et.StrictMode=r,et.Suspense=d,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,et.__COMPILER_RUNTIME={__proto__:null,c:function(P){return M.H.useMemoCache(P)}},et.cache=function(P){return function(){return P.apply(null,arguments)}},et.cloneElement=function(P,te,ue){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var fe=v({},P.props),ke=P.key,Pe=void 0;if(te!=null)for(be in te.ref!==void 0&&(Pe=void 0),te.key!==void 0&&(ke=""+te.key),te)!I.call(te,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&te.ref===void 0||(fe[be]=te[be]);var be=arguments.length-2;if(be===1)fe.children=ue;else if(1<be){for(var vt=Array(be),Xe=0;Xe<be;Xe++)vt[Xe]=arguments[Xe+2];fe.children=vt}return _(P.type,ke,void 0,void 0,Pe,fe)},et.createContext=function(P){return P={$$typeof:a,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:i,_context:P},P},et.createElement=function(P,te,ue){var fe,ke={},Pe=null;if(te!=null)for(fe in te.key!==void 0&&(Pe=""+te.key),te)I.call(te,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(ke[fe]=te[fe]);var be=arguments.length-2;if(be===1)ke.children=ue;else if(1<be){for(var vt=Array(be),Xe=0;Xe<be;Xe++)vt[Xe]=arguments[Xe+2];ke.children=vt}if(P&&P.defaultProps)for(fe in be=P.defaultProps,be)ke[fe]===void 0&&(ke[fe]=be[fe]);return _(P,Pe,void 0,void 0,null,ke)},et.createRef=function(){return{current:null}},et.forwardRef=function(P){return{$$typeof:l,render:P}},et.isValidElement=V,et.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:Q}},et.memo=function(P,te){return{$$typeof:h,type:P,compare:te===void 0?null:te}},et.startTransition=function(P){var te=M.T,ue={};M.T=ue;try{var fe=P(),ke=M.S;ke!==null&&ke(ue,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(le,re)}catch(Pe){re(Pe)}finally{M.T=te}},et.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},et.use=function(P){return M.H.use(P)},et.useActionState=function(P,te,ue){return M.H.useActionState(P,te,ue)},et.useCallback=function(P,te){return M.H.useCallback(P,te)},et.useContext=function(P){return M.H.useContext(P)},et.useDebugValue=function(){},et.useDeferredValue=function(P,te){return M.H.useDeferredValue(P,te)},et.useEffect=function(P,te,ue){var fe=M.H;if(typeof ue=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return fe.useEffect(P,te)},et.useId=function(){return M.H.useId()},et.useImperativeHandle=function(P,te,ue){return M.H.useImperativeHandle(P,te,ue)},et.useInsertionEffect=function(P,te){return M.H.useInsertionEffect(P,te)},et.useLayoutEffect=function(P,te){return M.H.useLayoutEffect(P,te)},et.useMemo=function(P,te){return M.H.useMemo(P,te)},et.useOptimistic=function(P,te){return M.H.useOptimistic(P,te)},et.useReducer=function(P,te,ue){return M.H.useReducer(P,te,ue)},et.useRef=function(P){return M.H.useRef(P)},et.useState=function(P){return M.H.useState(P)},et.useSyncExternalStore=function(P,te,ue){return M.H.useSyncExternalStore(P,te,ue)},et.useTransition=function(){return M.H.useTransition()},et.version="19.1.0",et}var JT;function Af(){return JT||(JT=1,iv.exports=$q()),iv.exports}var av={exports:{}},ir={};var ZT;function Hq(){if(ZT)return ir;ZT=1;var t=Af();function e(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function i(d,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:h,implementation:p}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ir.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ir.createPortal=function(d,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return i(d,h,null,p)},ir.flushSync=function(d){var h=a.T,p=r.p;try{if(a.T=null,r.p=2,d)return d()}finally{a.T=h,r.p=p,r.d.f()}}
vendor: 4,879 bytes, line 1
1,ir.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},ir.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},ir.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var p=h.as,m=l(p,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:x}):p==="script"&&r.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ir.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=l(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},ir.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=l(p,h.crossOrigin);r.d.L(d,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ir.preloadModule=function(d,h){if(typeof d=="string")if(h){var p=l(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},ir.requestFormReset=function(d){r.d.r(d)},ir.unstable_batchedUpdates=function(d,h){return d(h)},ir.useFormState=function(d,h,p){return a.H.useFormState(d,h,p)},ir.useFormStatus=function(){return a.H.useHostTransitionStatus()},ir.version="19.1.0",ir}var eA;function XD(){if(eA)return av.exports;eA=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),av.exports=Hq(),av.exports}var tA;function Kq(){if(tA)return ih;tA=1;var t=Vq(),e=Af(),n=XD();function r(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)u+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var u=o,f=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(f=u.return),o=u.return;while(o)}return u.tag===3?f:null}function a(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function l(o){if(i(o)!==o)throw Error(r(188))}function d(o){var u=o.alternate;if(!u){if(u=i(o),u===null)throw Error(r(188));return u!==o?null:o}for(var f=o,y=u;;){var w=f.return;if(w===null)break;var k=w.alternate;if(k===null){if(y=w.return,y!==null){f=y;continue}break}if(w.child===k.child){for(k=w.child;k;){if(k===f)return l(w),o;if(k===y)return l(w),u;k=k.sibling}throw Error(r(188))}if(f.return!==y.return)f=w,y=k;else{for(var T=!1,R=w.child;R;){if(R===f){T=!0,f=w,y=k;break}if(R===y){T=!0,y=w,f=k;break}R=R.sibling}if(!T){for(R=k.child;R;){if(R===f){T=!0,f=k,y=w;break}if(R===y){T=!0,y=k,f=w;break}R=R.sibling}if(!T)throw Error(r(189))}}if(f.alternate!==y)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?o:u}function h(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=h(o),u!==null)return u;o=o.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),E=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function ee(o){return o===null||typeof o!="object"?null:(o=K&&o[K]||o["@@iterator"],typeof o=="function"?o:null)}var ie=Symbol.for("react.client.reference");function se(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===ie?null:o.displayName||o.name||null;
vendor: 6,438 bytes, line 1
1if(typeof o=="string")return o;switch(o){case v:return"Fragment";case C:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case I:return"SuspenseList";case V:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case x:return"Portal";case A:return(o.displayName||"Context")+".Provider";case E:return(o._context.displayName||"Context")+".Consumer";case D:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case _:return u=o.displayName||null,u!==null?u:se(o.type)||"Memo";case L:u=o._payload,o=o._init;try{return se(o(u))}catch{}}return null}var he=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},le=[],P=-1;function te(o){return{current:o}}function ue(o){0>P||(o.current=le[P],le[P]=null,P--)}function fe(o,u){P++,le[P]=o.current,o.current=u}var ke=te(null),Pe=te(null),be=te(null),vt=te(null);function Xe(o,u){switch(fe(be,u),fe(Pe,o),fe(ke,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?wT(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=wT(u),o=ST(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}ue(ke),fe(ke,o)}function Je(){ue(ke),ue(Pe),ue(be)}function Ze(o){o.memoizedState!==null&&fe(vt,o);var u=ke.current,f=ST(u,o.type);u!==f&&(fe(Pe,o),fe(ke,f))}function an(o){Pe.current===o&&(ue(ke),ue(Pe)),vt.current===o&&(ue(vt),Zd._currentValue=re)}var Kt=Object.prototype.hasOwnProperty,Jt=t.unstable_scheduleCallback,dn=t.unstable_cancelCallback,Es=t.unstable_shouldYield,Ts=t.unstable_requestPaint,dr=t.unstable_now,nc=t.unstable_getCurrentPriorityLevel,Bo=t.unstable_ImmediatePriority,Tr=t.unstable_UserBlockingPriority,F=t.unstable_NormalPriority,W=t.unstable_LowPriority,ne=t.unstable_IdlePriority,we=t.log,ye=t.unstable_setDisableYieldValue,pe=null,Se=null;function Ge(o){if(typeof we=="function"&&ye(o),Se&&typeof Se.setStrictMode=="function")try{Se.setStrictMode(pe,o)}catch{}}var $e=Math.clz32?Math.clz32:zr,hn=Math.log,_n=Math.LN2;function zr(o){return o>>>=0,o===0?32:31-(hn(o)/_n|0)|0}var ba=256,ni=4194304;function hr(o){var u=o&42;if(u!==0)return u;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Mi(o,u,f){var y=o.pendingLanes;if(y===0)return 0;var w=0,k=o.suspendedLanes,T=o.pingedLanes;o=o.warmLanes;var R=y&134217727;return R!==0?(y=R&~k,y!==0?w=hr(y):(T&=R,T!==0?w=hr(T):f||(f=R&~o,f!==0&&(w=hr(f))))):(R=y&~k,R!==0?w=hr(R):T!==0?w=hr(T):f||(f=y&~o,f!==0&&(w=hr(f)))),w===0?0:u!==0&&u!==w&&(u&k)===0&&(k=w&-w,f=u&-u,k>=f||k===32&&(f&4194048)!==0)?u:w}function ri(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function rc(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fo(){var o=ba;return ba<<=1,(ba&4194048)===0&&(ba=256),o}function tp(){var o=ni;return ni<<=1,(ni&62914560)===0&&(ni=4194304),o}function ud(o){for(var u=[],f=0;31>f;f++)u.push(o);return u}function Zt(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function fr(o,u,f,y,w,k){var T=o.pendingLanes;o.pendingLanes=f,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=f,o.entangledLanes&=f,o.errorRecoveryDisabledLanes&=f,o.shellSuspendCounter=0;var R=o.entanglements,U=o.expirationTimes,Y=o.hiddenUpdates;for(f=T&~f;0<f;){var ae=31-$e(f),ce=1<<ae;R[ae]=0,U[ae]=-1;var X=Y[ae];if(X!==null)for(Y[ae]=null,ae=0;ae<X.length;ae++){var Z=X[ae];Z!==null&&(Z.lane&=-536870913)}f&=~ce}y!==0&&tr(o,y,0),k!==0&&w===0&&o.tag!==0&&(o.suspendedLanes|=k&~(T&~u))}function tr(o,u,f){o.pendingLanes|=u,o.suspendedLanes&=~u;var y=31-$e(u);o.entangledLanes|=u,o.entanglements[y]=o.entanglements[y]|1073741824|f&4194090}function As(o,u){var f=o.entangledLanes|=u;for(o=o.entanglements;f;){var y=31-$e(f),w=1<<y;w&u|o[y]&u&&(o[y]|=u),f&=~w}}function nr(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Hn(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function qr(){var o=Q.p;return o!==0?o:(o=window.event,o===void 0?32:zT(o.type))}function va(o,u){var f=Q.p;try{return Q.p=o,u()}finally{Q.p=f}}var Pt=Math.random().toString(36).slice(2),It="__reactFiber$"+Pt,Ut="__reactProps$"+Pt,rr="__reactContainer$"+Pt,Oi="__reactEvents$"+Pt,zo="__reactListeners$"+Pt,si="__reactHandles$"+Pt,wa="__reactResources$"+Pt,Ri="__reactMarker$"+Pt;function Gx(o){delete o[It],delete o[Ut],delete o[Oi],delete o[zo],delete o[si]}function sc(o){var u=o[It];if(u)return u;for(var f=o.parentNode;f;){if(u=f[rr]||f[It]){if(f=u.alternate,u.child!==null||f!==null&&f.child!==null)for(o=jT(o);o!==null;){if(f=o[It])return f;o=jT(o)}return u}o=f,f=o.parentNode}return null}function ic(o){if(o=o[It]||o[rr]){var u=o.tag;if(u===5||u===6||u===13||u===26||u===27||u===3)return o}return null}function dd(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(r(33))}function ac(o){var u=o[wa];return u||(u=o[wa]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Pn(o){o[Ri]=!0}var uN=new Set,dN={};function qo(o,u){oc(o,u),oc(o+"Capture",u)}function oc(o,u){for(dN[o]=u,o=0;o<u.length;o++)uN.add(u[o])}var MF=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
1037D\\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]*$"),hN={},fN={};function OF(o){return Kt.call(fN,o)?!0:Kt.call(hN,o)?!1:MF.test(o)?fN[o]=!0:(hN[o]=!0,!1)}function np(o,u,f){if(OF(u))if(f===null)o.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+f)}}function rp(o,u,f){if(f===null)o.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+f)}}function Di(o,u,f,y){if(y===null)o.removeAttribute(f);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(f);return}o.setAttributeNS(u,f,""+y)}}var Yx,pN;function lc(o){if(Yx===void 0)try{throw Error()}catch(f){var u=f.stack.trim().match(/\n( *(at )?)/);Yx=u&&u[1]||"",pN=-1<f.stack.indexOf(`
2    at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
3`+Yx+o+pN}var Qx=!1;function Xx(o,u){if(!o||Qx)return"";Qx=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(Z){var X=Z}Reflect.construct(o,[],ce)}else{try{ce.call()}catch(Z){X=Z}o.call(ce.prototype)}}else{try{throw Error()}catch(Z){X=Z}(ce=o())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(Z){if(Z&&X&&typeof Z.stack=="string")return[Z.stack,X.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=y.DetermineComponentFrameRoot(),T=k[0],R=k[1];if(T&&R){var U=T.split(`
4`),Y=R.split(`
5`);for(w=y=0;y<U.length&&!U[y].includes("DetermineComponentFrameRoot");)y++;for(;w<Y.length&&!Y[w].includes("DetermineComponentFrameRoot");)w++;if(y===U.length||w===Y.length)for(y=U.length-1,w=Y.length-1;1<=y&&0<=w&&U[y]!==Y[w];)w--;for(;1<=y&&0<=w;y--,w--)if(U[y]!==Y[w]){if(y!==1||w!==1)do if(y--,w--,0>w||U[y]!==Y[w]){var ae=`
6`+U[y].replace(" at new "," at ");return o.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",o.displayName)),ae}while(1<=y&&0<=w);break}}}finally{Qx=!1,Error.prepareStackTrace=f}return(f=o?o.displayName||o.name:"")?lc(f):""}function RF(o){switch(o.tag){case 26:case 27:case 5:return lc(o.type);case 16:return lc("Lazy");case 13:return lc("Suspense");case 19:return lc("SuspenseList");case 0:case 15:return Xx(o.type,!1);case 11:return Xx(o.type.render,!1);case 1:return Xx(o.type,!0);case 31:return lc("Activity");default:return""}}function mN(o){try{var u="";do u+=RF(o),o=o.return;while(o);return u}catch(f){return`
7Error generating stack: `+f.message+`
8`+f.stack}}function rs(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function gN(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function DF(o){var u=gN(o)?"checked":"value",f=Object.getOwnPropertyDescriptor(o.constructor.prototype,u),y=""+o[u];if(!o.hasOwnProperty(u)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var w=f.get,k=f.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return w.call(this)},set:function(T){y=""+T,k.call(this,T)}}),Object.defineProperty(o,u,{enumerable:f.enumerable}),{getValue:function(){return y},setValue:function(T){y=""+T},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function sp(o){o._valueTracker||(o._valueTracker=DF(o))}
vendor: 4,801 bytes, line 8
8function yN(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var f=u.getValue(),y="";return o&&(y=gN(o)?o.checked?"true":"false":o.value),o=y,o!==f?(u.setValue(o),!0):!1}function ip(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var _F=/[\n"\\]/g;function ss(o){return o.replace(_F,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Jx(o,u,f,y,w,k,T,R){o.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?o.type=T:o.removeAttribute("type"),u!=null?T==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+rs(u)):o.value!==""+rs(u)&&(o.value=""+rs(u)):T!=="submit"&&T!=="reset"||o.removeAttribute("value"),u!=null?Zx(o,T,rs(u)):f!=null?Zx(o,T,rs(f)):y!=null&&o.removeAttribute("value"),w==null&&k!=null&&(o.defaultChecked=!!k),w!=null&&(o.checked=w&&typeof w!="function"&&typeof w!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?o.name=""+rs(R):o.removeAttribute("name")}function xN(o,u,f,y,w,k,T,R){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(o.type=k),u!=null||f!=null){if(!(k!=="submit"&&k!=="reset"||u!=null))return;f=f!=null?""+rs(f):"",u=u!=null?""+rs(u):f,R||u===o.value||(o.value=u),o.defaultValue=u}y=y??w,y=typeof y!="function"&&typeof y!="symbol"&&!!y,o.checked=R?o.checked:!!y,o.defaultChecked=!!y,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(o.name=T)}function Zx(o,u,f){u==="number"&&ip(o.ownerDocument)===o||o.defaultValue===""+f||(o.defaultValue=""+f)}function cc(o,u,f,y){if(o=o.options,u){u={};for(var w=0;w<f.length;w++)u["$"+f[w]]=!0;for(f=0;f<o.length;f++)w=u.hasOwnProperty("$"+o[f].value),o[f].selected!==w&&(o[f].selected=w),w&&y&&(o[f].defaultSelected=!0)}else{for(f=""+rs(f),u=null,w=0;w<o.length;w++){if(o[w].value===f){o[w].selected=!0,y&&(o[w].defaultSelected=!0);return}u!==null||o[w].disabled||(u=o[w])}u!==null&&(u.selected=!0)}}function bN(o,u,f){if(u!=null&&(u=""+rs(u),u!==o.value&&(o.value=u),f==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=f!=null?""+rs(f):""}function vN(o,u,f,y){if(u==null){if(y!=null){if(f!=null)throw Error(r(92));if(he(y)){if(1<y.length)throw Error(r(93));y=y[0]}f=y}f==null&&(f=""),u=f}f=rs(u),o.defaultValue=f,y=o.textContent,y===f&&y!==""&&y!==null&&(o.value=y)}function uc(o,u){if(u){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=u;return}}o.textContent=u}var PF=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function wN(o,u,f){var y=u.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?y?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":y?o.setProperty(u,f):typeof f!="number"||f===0||PF.has(u)?u==="float"?o.cssFloat=f:o[u]=(""+f).trim():o[u]=f+"px"}function SN(o,u,f){if(u!=null&&typeof u!="object")throw Error(r(62));if(o=o.style,f!=null){for(var y in f)!f.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?o.setProperty(y,""):y==="float"?o.cssFloat="":o[y]="");for(var w in u)y=u[w],u.hasOwnProperty(w)&&f[w]!==y&&wN(o,w,y)}else for(var k in u)u.hasOwnProperty(k)&&wN(o,k,u[k])}function eb(o){if(o.indexOf("-")===-1)return!1;switch(o){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 LF=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
8dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),IF=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ap(o){return IF.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var tb=null;function nb(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var dc=null,hc=null;function kN(o){var u=ic(o);if(u&&(o=u.stateNode)){var f=o[Ut]||null;e:switch(o=u.stateNode,u.type){case"input":if(Jx(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),u=f.name,f.type==="radio"&&u!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+ss(""+u)+'"][type="radio"]'),u=0;u<f.length;u++){var y=f[u];if(y!==o&&y.form===o.form){var w=y[Ut]||null;if(!w)throw Error(r(90));Jx(y,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(u=0;u<f.length;u++)y=f[u],y.form===o.form&&yN(y)}break e;case"textarea":bN(o,f.value,f.defaultValue);break e;case"select":u=f.value,u!=null&&cc(o,!!f.multiple,u,!1)}}}var rb=!1;function CN(o,u,f){if(rb)return o(u,f);rb=!0;try{var y=o(u);return y}finally{if(rb=!1,(dc!==null||hc!==null)&&(Hp(),dc&&(u=dc,o=hc,hc=dc=null,kN(u),o)))for(u=0;u<o.length;u++)kN(o[u])}}function hd(o,u){var f=o.stateNode;if(f===null)return null;var y=f[Ut]||null;if(y===null)return null;f=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(o=o.type,y=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!y;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(r(231,u,typeof f));return f}var _i=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=!1;if(_i)try{var fd={};Object.defineProperty(fd,"passive",{get:function(){sb=!0}}),window.addEventListener("test",fd,fd),window.removeEventListener("test",fd,fd)}catch{sb=!1}var Sa=null,ib=null,op=null;function NN(){if(op)return op;var o,u=ib,f=u.length,y,w="value"in Sa?Sa.value:Sa.textContent,k=w.length;for(o=0;o<f&&u[o]===w[o];o++);var T=f-o;for(y=1;y<=T&&u[f-y]===w[k-y];y++);return op=w.slice(o,1<y?1-y:void 0)}function lp(o){var u=o.keyCode;
vendor: 2,821 bytes, line 8
8return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function cp(){return!0}function jN(){return!1}function Ar(o){function u(f,y,w,k,T){this._reactName=f,this._targetInst=w,this.type=y,this.nativeEvent=k,this.target=T,this.currentTarget=null;for(var R in o)o.hasOwnProperty(R)&&(f=o[R],this[R]=f?f(k):k[R]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?cp:jN,this.isPropagationStopped=jN,this}return p(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=cp)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=cp)},persist:function(){},isPersistent:cp}),u}var Vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},up=Ar(Vo),pd=p({},Vo,{view:0,detail:0}),UF=Ar(pd),ab,ob,md,dp=p({},pd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cb,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==md&&(md&&o.type==="mousemove"?(ab=o.screenX-md.screenX,ob=o.screenY-md.screenY):ob=ab=0,md=o),ab)},movementY:function(o){return"movementY"in o?o.movementY:ob}}),EN=Ar(dp),BF=p({},dp,{dataTransfer:0}),FF=Ar(BF),zF=p({},pd,{relatedTarget:0}),lb=Ar(zF),qF=p({},Vo,{animationName:0,elapsedTime:0,pseudoElement:0}),VF=Ar(qF),$F=p({},Vo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),HF=Ar($F),KF=p({},Vo,{data:0}),TN=Ar(KF),WF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GF={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"},YF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QF(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=YF[o])?!!u[o]:!1}function cb(){return QF}var XF=p({},pd,{key:function(o){if(o.key){var u=WF[o.key]||o.key;if(u!=="Unidentified")return u}
vendor: 5,147 bytes, line 8
8return o.type==="keypress"?(o=lp(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?GF[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cb,charCode:function(o){return o.type==="keypress"?lp(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?lp(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),JF=Ar(XF),ZF=p({},dp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AN=Ar(ZF),ez=p({},pd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cb}),tz=Ar(ez),nz=p({},Vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),rz=Ar(nz),sz=p({},dp,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),iz=Ar(sz),az=p({},Vo,{newState:0,oldState:0}),oz=Ar(az),lz=[9,13,27,32],ub=_i&&"CompositionEvent"in window,gd=null;_i&&"documentMode"in document&&(gd=document.documentMode);var cz=_i&&"TextEvent"in window&&!gd,MN=_i&&(!ub||gd&&8<gd&&11>=gd),ON=" ",RN=!1;function DN(o,u){switch(o){case"keyup":return lz.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _N(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var fc=!1;function uz(o,u){switch(o){case"compositionend":return _N(u);case"keypress":return u.which!==32?null:(RN=!0,ON);case"textInput":return o=u.data,o===ON&&RN?null:o;default:return null}}function dz(o,u){if(fc)return o==="compositionend"||!ub&&DN(o,u)?(o=NN(),op=ib=Sa=null,fc=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return MN&&u.locale!=="ko"?null:u.data;default:return null}}var hz={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 PN(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!hz[o.type]:u==="textarea"}function LN(o,u,f,y){dc?hc?hc.push(y):hc=[y]:dc=y,u=Xp(u,"onChange"),0<u.length&&(f=new up("onChange","change",null,f,y),o.push({event:f,listeners:u}))}var yd=null,xd=null;function fz(o){gT(o,0)}function hp(o){var u=dd(o);if(yN(u))return o}function IN(o,u){if(o==="change")return u}var UN=!1;if(_i){var db;if(_i){var hb="oninput"in document;if(!hb){var BN=document.createElement("div");BN.setAttribute("oninput","return;"),hb=typeof BN.oninput=="function"}db=hb}else db=!1;UN=db&&(!document.documentMode||9<document.documentMode)}function FN(){yd&&(yd.detachEvent("onpropertychange",zN),xd=yd=null)}function zN(o){if(o.propertyName==="value"&&hp(xd)){var u=[];LN(u,xd,o,nb(o)),CN(fz,u)}}function pz(o,u,f){o==="focusin"?(FN(),yd=u,xd=f,yd.attachEvent("onpropertychange",zN)):o==="focusout"&&FN()}function mz(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return hp(xd)}function gz(o,u){if(o==="click")return hp(u)}function yz(o,u){if(o==="input"||o==="change")return hp(u)}function xz(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var Vr=typeof Object.is=="function"?Object.is:xz;function bd(o,u){if(Vr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var f=Object.keys(o),y=Object.keys(u);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var w=f[y];if(!Kt.call(u,w)||!Vr(o[w],u[w]))return!1}return!0}function qN(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function VN(o,u){var f=qN(o);o=0;for(var y;f;){if(f.nodeType===3){if(y=o+f.textContent.length,o<=u&&y>=u)return{node:f,offset:u-o};o=y}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=qN(f)}}function $N(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?$N(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function HN(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=ip(o.document);u instanceof o.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)o=u.contentWindow;else break;u=ip(o.document)}return u}function fb(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var bz=_i&&"documentMode"in document&&11>=document.documentMode,pc=null,pb=null,vd=null,mb=!1;function KN(o,u,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;mb||pc==null||pc!==ip(y)||(y=pc,"selectionStart"in y&&fb(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anch
vendor: 123,621 bytes, lines 8-9
8orNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),vd&&bd(vd,y)||(vd=y,y=Xp(pb,"onSelect"),0<y.length&&(u=new up("onSelect","select",null,u,f),o.push({event:u,listeners:y}),u.target=pc)))}function $o(o,u){var f={};return f[o.toLowerCase()]=u.toLowerCase(),f["Webkit"+o]="webkit"+u,f["Moz"+o]="moz"+u,f}var mc={animationend:$o("Animation","AnimationEnd"),animationiteration:$o("Animation","AnimationIteration"),animationstart:$o("Animation","AnimationStart"),transitionrun:$o("Transition","TransitionRun"),transitionstart:$o("Transition","TransitionStart"),transitioncancel:$o("Transition","TransitionCancel"),transitionend:$o("Transition","TransitionEnd")},gb={},WN={};_i&&(WN=document.createElement("div").style,"AnimationEvent"in window||(delete mc.animationend.animation,delete mc.animationiteration.animation,delete mc.animationstart.animation),"TransitionEvent"in window||delete mc.transitionend.transition);function Ho(o){if(gb[o])return gb[o];if(!mc[o])return o;var u=mc[o],f;for(f in u)if(u.hasOwnProperty(f)&&f in WN)return gb[o]=u[f];return o}var GN=Ho("animationend"),YN=Ho("animationiteration"),QN=Ho("animationstart"),vz=Ho("transitionrun"),wz=Ho("transitionstart"),Sz=Ho("transitioncancel"),XN=Ho("transitionend"),JN=new Map,yb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");yb.push("scrollEnd");function Ms(o,u){JN.set(o,u),qo(u,[o])}var ZN=new WeakMap;function is(o,u){if(typeof o=="object"&&o!==null){var f=ZN.get(o);return f!==void 0?f:(u={value:o,source:u,stack:mN(u)},ZN.set(o,u),u)}return{value:o,source:u,stack:mN(u)}}var as=[],gc=0,xb=0;function fp(){for(var o=gc,u=xb=gc=0;u<o;){var f=as[u];as[u++]=null;var y=as[u];as[u++]=null;var w=as[u];as[u++]=null;var k=as[u];if(as[u++]=null,y!==null&&w!==null){var T=y.pending;T===null?w.next=w:(w.next=T.next,T.next=w),y.pending=w}k!==0&&ej(f,w,k)}}function pp(o,u,f,y){as[gc++]=o,as[gc++]=u,as[gc++]=f,as[gc++]=y,xb|=y,o.lanes|=y,o=o.alternate,o!==null&&(o.lanes|=y)}function bb(o,u,f,y){return pp(o,u,f,y),mp(o)}function yc(o,u){return pp(o,null,null,u),mp(o)}function ej(o,u,f){o.lanes|=f;var y=o.alternate;y!==null&&(y.lanes|=f);for(var w=!1,k=o.return;k!==null;)k.childLanes|=f,y=k.alternate,y!==null&&(y.childLanes|=f),k.tag===22&&(o=k.stateNode,o===null||o._visibility&1||(w=!0)),o=k,k=k.return;return o.tag===3?(k=o.stateNode,w&&u!==null&&(w=31-$e(f),o=k.hiddenUpdates,y=o[w],y===null?o[w]=[u]:y.push(u),u.lane=f|536870912),k):null}function mp(o){if(50<Hd)throw Hd=0,N0=null,Error(r(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var xc={};function kz(o,u,f,y){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(o,u,f,y){return new kz(o,u,f,y)}function vb(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Pi(o,u){var f=o.alternate;return f===null?(f=$r(o.tag,u,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=u,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&65011712,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,u=o.dependencies,f.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f.refCleanup=o.refCleanup,f}function tj(o,u){o.flags&=65011714;var f=o.alternate;return f===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=f.childLanes,o.lanes=f.lanes,o.child=f.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=f.memoizedProps,o.memoizedState=f.memoizedState,o.updateQueue=f.updateQueue,o.type=f.type,u=f.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function gp(o,u,f,y,w,k){var T=0;if(y=o,typeof o=="function")vb(o)&&(T=1);else if(typeof o=="string")T=Nq(o,f,ke.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case V:return o=$r(31,f,u,w),o.elementType=V,o.lanes=k,o;case v:return Ko(f.children,w,k,u);case S:T=8,w|=24;break;case C:return o=$r(12,f,u,w|2),o.elementType=C,o.lanes=k,o;case M:return o=$r(13,f,u,w),o.elementType=M,o.lanes=k,o;case I:return o=$r(19,f,u,w),o.elementType=I,o.lanes=k,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case j:case A:T=10;break e;case E:T=9;break e;case D:T=11;break e;case _:T=14;break e;case L:T=16,y=null;break e}T=29,f=Error(r(130,o===null?"null":typeof o,"")),y=null}return u=$r(T,f,u,w),u.elementType=o,u.type=y,u.lanes=k,u}function Ko(o,u,f,y){return o=$r(7,o,y,u),o.lanes=f,o}function wb(o,u,f){return o=$r(6,o,null,u),o.lanes=f,o}function Sb(o,u,f){return u=$r(4,o.children!==null?o.children:[],o.key,u),u.lanes=f,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var bc=[],vc=0,yp=null,xp=0,ls=[],cs=0,Wo=null,Li=1,Ii="";function Go(o,u){bc[vc++]=xp,bc[vc++]=yp,yp=o,xp=u}function nj(o,u,f){ls[cs++]=Li,ls[cs++]=Ii,ls[cs++]=Wo,Wo=o;var y=Li;o=Ii;var w=32-$e(y)-1;y&=~(1<<w),f+=1;var k=32-$e(u)+w;if(30<k){var T=w-w%5;k=(y&(1<<T)-1).toString(32),y>>=T,w-=T,Li=1<<32-$e(u)+w|f<<w|y,Ii=k+o}else Li=1<<k|f<<w|y,Ii=o}function kb(o){o.return!==null&&(Go(o,1),nj(o,1,0))}function Cb(o){for(;o===yp;)yp=bc[--vc],bc[vc]=null,xp=bc[--vc],bc[vc]=null;for(;o===Wo;)Wo=ls[--cs],ls[cs]=null,Ii=ls[--cs],ls[cs]=null,Li=ls[--cs],ls[cs]=null}var pr=null,en=null,wt=!1,Yo=null,ii=!1,Nb=Error(r(519));function Qo(o){var u=Error(r(418,""));throw kd(is(u,o)),Nb}function rj(o){var u=o.stateNode,f=o.type,y=o.memoizedProps;switch(u[It]=o,u[Ut]=y,f){case"dialog":dt("cancel",u),dt("close",u);break;case"iframe":case"object":case"embed":dt("load",u);break;case"video":case"audio":for(f=0;f<Wd.length;f++)dt(Wd[f],u);break;case"source":dt("error",u);break;case"img":case"image":case"link":dt("error",u),dt("load",u);break;case"details":dt("toggle",u);break;case"input":dt("invalid",u),xN(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0),sp(u);break;case"select":dt("invalid",u);break;case"textarea":dt("invalid",u),vN(u,y.value,y.defaultValue,y.children),sp(u)}f=y.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||u.textContent===""+f||y.suppressHydrationWarning===!0||vT(u.textContent,f)?(y.popover!=null&&(dt("beforetoggle",u),dt("toggle",u)),y.onScroll!=null&&dt("scroll",u),y.onScrollEnd!=null&&dt("scrollend",u),y.onClick!=null&&(u.onclick=Jp),u=!0):u=!1,u||Qo(o)}function sj(o){for(pr=o.return;pr;)switch(pr.tag){case 5:case 13:ii=!1;return;case 27:case 3:ii=!0;return;default:pr=pr.return}}function wd(o){if(o!==pr)return!1;if(!wt)return sj(o),wt=!0,!1;var u=o.tag,f;if((f=u!==3&&u!==27)&&((f=u===5)&&(f=o.type,f=!(f!=="form"&&f!=="button")||z0(o.type,o.memoizedProps)),f=!f),f&&en&&Qo(o),sj(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,u=0;o;){if(o.nodeType===8)if(f=o.data,f==="/$"){if(u===0){en=Rs(o.nextSibling);break e}u--}else f!=="$"&&f!=="$!"&&f!=="$?"||u++;o=o.nextSibling}en=null}}else u===27?(u=en,Ua(o.type)?(o=H0,H0=null,en=o):en=u):en=pr?Rs(o.stateNode.nextSibling):null;return!0}function Sd(){en=pr=null,wt=!1}function ij(){var o=Yo;return o!==null&&(Rr===null?Rr=o:Rr.push.apply(Rr,o),Yo=null),o}function kd(o){Yo===null?Yo=[o]:Yo.push(o)}var jb=te(null),Xo=null,Ui=null;function ka(o,u,f){fe(jb,u._currentValue),u._currentValue=f}function Bi(o){o._currentValue=jb.current,ue(jb)}function Eb(o,u,f){for(;o!==null;){var y=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),o===f)break;o=o.return}}function Tb(o,u,f,y){var w=o.child;for(w!==null&&(w.return=o);w!==null;){var k=w.dependencies;if(k!==null){var T=w.child;k=k.firstContext;e:for(;k!==null;){var R=k;k=w;for(var U=0;U<u.length;U++)if(R.context===u[U]){k.lanes|=f,R=k.alternate,R!==null&&(R.lanes|=f),Eb(k.return,f,o),y||(T=null);break e}k=R.next}}else if(w.tag===18){if(T=w.return,T===null)throw Error(r(341));T.lanes|=f,k=T.alternate,k!==null&&(k.lanes|=f),Eb(T,f,o),T=null}else T=w.child;if(T!==null)T.return=w;else for(T=w;T!==null;){if(T===o){T=null;break}if(w=T.sibling,w!==null){w.return=T.return,T=w;break}T=T.return}w=T}}function Cd(o,u,f,y){o=null;for(var w=u,k=!1;w!==null;){if(!k){if((w.flags&524288)!==0)k=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var T=w.alternate;if(T===null)throw Error(r(387));if(T=T.memoizedProps,T!==null){var R=w.type;Vr(w.pendingProps.value,T.value)||(o!==null?o.push(R):o=[R])}}else if(w===vt.current){if(T=w.alternate,T===null)throw Error(r(387));T.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(o!==null?o.push(Zd):o=[Zd])}w=w.return}o!==null&&Tb(u,o,f,y),u.flags|=262144}function bp(o){for(o=o.firstContext;o!==null;){if(!Vr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Jo(o){Xo=o,Ui=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function sr(o){return aj(Xo,o)}function vp(o,u){return Xo===null&&Jo(o),aj(o,u)}function aj(o,u){var f=u._currentValue;if(u={context:u,memoizedValue:f,next:null},Ui===null){if(o===null)throw Error(r(308));Ui=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else Ui=Ui.next=u;return f}var Cz=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(f,y){o.push(y)}};this.abort=function(){u.aborted=!0,o.forEach(function(f){return f()})}},Nz=t.unstable_scheduleCallback,jz=t.unstable_NormalPriority,Nn={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ab(){return{controller:new Cz,data:new Map,refCount:0}}function Nd(o){o.refCount--,o.refCount===0&&Nz(jz,function(){o.controller.abort()})}var jd=null,Mb=0,wc=0,Sc=null;function Ez(o,u){if(jd===null){var f=jd=[];Mb=0,wc=R0(),Sc={status:"pending",value:void 0,then:function(y){f.push(y)}}}return Mb++,u.then(oj,oj),u}function oj(){if(--Mb===0&&jd!==null){Sc!==null&&(Sc.status="fulfilled");var o=jd;jd=null,wc=0,Sc=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function Tz(o,u){var f=[],y={status:"pending",value:null,reason:null,then:function(w){f.push(w)}};return o.then(function(){y.status="fulfilled",y.value=u;for(var w=0;w<f.length;w++)(0,f[w])(u)},function(w){for(y.status="rejected",y.reason=w,w=0;w<f.length;w++)(0,f[w])(void 0)}),y}var lj=$.S;$.S=function(o,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&Ez(o,u),lj!==null&&lj(o,u)};var Zo=te(null);function Ob(){var o=Zo.current;return o!==null?o:Lt.pooledCache}function wp(o,u){u===null?fe(Zo,Zo.current):fe(Zo,u.pool)}function cj(){var o=Ob();return o===null?null:{parent:Nn._currentValue,pool:o}}var Ed=Error(r(460)),uj=Error(r(474)),Sp=Error(r(542)),Rb={then:function(){}};function dj(o){return o=o.status,o==="fulfilled"||o==="rejected"}function kp(){}function hj(o,u,f){switch(f=o[f],f===void 0?o.push(u):f!==u&&(u.then(kp,kp),u=f),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,pj(o),o;default:if(typeof u.status=="string")u.then(kp,kp);else{if(o=Lt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=u,o.status="pending",o.then(function(y){if(u.status==="pending"){var w=u;w.status="fulfilled",w.value=y}},function(y){if(u.status==="pending"){var w=u;w.status="rejected",w.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,pj(o),o}throw Td=u,Ed}}var Td=null;function fj(){if(Td===null)throw Error(r(459));var o=Td;return Td=null,o}function pj(o){if(o===Ed||o===Sp)throw Error(r(483))}var Ca=!1;function Db(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _b(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Na(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function ja(o,u,f){var y=o.updateQueue;if(y===null)return null;if(y=y.shared,(Ct&2)!==0){var w=y.pending;return w===null?u.next=u:(u.next=w.next,w.next=u),y.pending=u,u=mp(o),ej(o,null,f),u}return pp(o,y,u,f),mp(o)}function Ad(o,u,f){if(u=u.updateQueue,u!==null&&(u=u.shared,(f&4194048)!==0)){var y=u.lanes;y&=o.pendingLanes,f|=y,u.lanes=f,As(o,f)}}function Pb(o,u){var f=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var w=null,k=null;if(f=f.firstBaseUpdate,f!==null){do{var T={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};k===null?w=k=T:k=k.next=T,f=f.next}while(f!==null);k===null?w=k=u:k=k.next=u}else w=k=u;f={baseState:y.baseState,firstBaseUpdate:w,lastBaseUpdate:k,shared:y.shared,callbacks:y.callbacks},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=u}var Lb=!1;function Md(){if(Lb){var o=Sc;if(o!==null)throw o}}function Od(o,u,f,y){Lb=!1;var w=o.updateQueue;Ca=!1;var k=w.firstBaseUpdate,T=w.lastBaseUpdate,R=w.shared.pending;if(R!==null){w.shared.pending=null;var U=R,Y=U.next;U.next=null,T===null?k=Y:T.next=Y,T=U;var ae=o.alternate;ae!==null&&(ae=ae.updateQueue,R=ae.lastBaseUpdate,R!==T&&(R===null?ae.firstBaseUpdate=Y:R.next=Y,ae.lastBaseUpdate=U))}if(k!==null){var ce=w.baseState;T=0,ae=Y=U=null,R=k;do{var X=R.lane&-536870913,Z=X!==R.lane;if(Z?(gt&X)===X:(y&X)===X){X!==0&&X===wc&&(Lb=!0),ae!==null&&(ae=ae.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var He=o,qe=R;X=u;var Mt=f;switch(qe.tag){case 1:if(He=qe.payload,typeof He=="function"){ce=He.call(Mt,ce,X);break e}ce=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=qe.payload,X=typeof He=="function"?He.call(Mt,ce,X):He,X==null)break e;ce=p({},ce,X);break e;case 2:Ca=!0}}X=R.callback,X!==null&&(o.flags|=64,Z&&(o.flags|=8192),Z=w.callbacks,Z===null?w.callbacks=[X]:Z.push(X))}else Z={lane:X,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ae===null?(Y=ae=Z,U=ce):ae=ae.next=Z,T|=X;if(R=R.next,R===null){if(R=w.shared.pending,R===null)break;Z=R,R=Z.next,Z.next=null,w.lastBaseUpdate=Z,w.shared.pending=null}}while(!0);ae===null&&(U=ce),w.baseState=U,w.firstBaseUpdate=Y,w.lastBaseUpdate=ae,k===null&&(w.shared.lanes=0),_a|=T,o.lanes=T,o.memoizedState=ce}}function mj(o,u){if(typeof o!="function")throw Error(r(191,o));o.call(u)}function gj(o,u){var f=o.callbacks;if(f!==null)for(o.callbacks=null,o=0;o<f.length;o++)mj(f[o],u)}var kc=te(null),Cp=te(0);function yj(o,u){o=Ki,fe(Cp,o),fe(kc,u),Ki=o|u.baseLanes}function Ib(){fe(Cp,Ki),fe(kc,kc.current)}function Ub(){Ki=Cp.current,ue(kc),ue(Cp)}var Ea=0,it=null,Tt=null,fn=null,Np=!1,Cc=!1,el=!1,jp=0,Rd=0,Nc=null,Az=0;function on(){throw Error(r(321))}function Bb(o,u){if(u===null)return!1;for(var f=0;f<u.length&&f<o.length;f++)if(!Vr(o[f],u[f]))return!1;return!0}function Fb(o,u,f,y,w,k){return Ea=k,it=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,$.H=o===null||o.memoizedState===null?eE:tE,el=!1,k=f(y,w),el=!1,Cc&&(k=bj(u,f,y,w)),xj(o),k}function xj(o){$.H=Rp;var u=Tt!==null&&Tt.next!==null;if(Ea=0,fn=Tt=it=null,Np=!1,Rd=0,Nc=null,u)throw Error(r(300));o===null||Ln||(o=o.dependencies,o!==null&&bp(o)&&(Ln=!0))}function bj(o,u,f,y){it=o;var w=0;do{if(Cc&&(Nc=null),Rd=0,Cc=!1,25<=w)throw Error(r(301));if(w+=1,fn=Tt=null,o.updateQueue!=null){var k=o.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}$.H=Lz,k=u(f,y)}while(Cc);return k}function Mz(){var o=$.H,u=o.useState()[0];return u=typeof u.then=="function"?Dd(u):u,o=o.useState()[0],(Tt!==null?Tt.memoizedState:null)!==o&&(it.flags|=1024),u}function zb(){var o=jp!==0;return jp=0,o}function qb(o,u,f){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~f}function Vb(o){if(Np){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}Np=!1}Ea=0,fn=Tt=it=null,Cc=!1,Rd=jp=0,Nc=null}function Mr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?it.memoizedState=fn=o:fn=fn.next=o,fn}function pn(){if(Tt===null){var o=it.alternate;o=o!==null?o.memoizedState:null}else o=Tt.next;var u=fn===null?it.memoizedState:fn.next;if(u!==null)fn=u,Tt=o;else{if(o===null)throw it.alternate===null?Error(r(467)):Error(r(310));Tt=o,o={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},fn===null?it.memoizedState=fn=o:fn=fn.next=o}return fn}function $b(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dd(o){var u=Rd;return Rd+=1,Nc===null&&(Nc=[]),o=hj(Nc,o,u),u=it,(fn===null?u.memoizedState:fn.next)===null&&(u=u.alternate,$.H=u===null||u.memoizedState===null?eE:tE),o}function Ep(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Dd(o);if(o.$$typeof===A)return sr(o)}throw Error(r(438,String(o)))}function Hb(o){var u=null,f=it.updateQueue;if(f!==null&&(u=f.memoCache),u==null){var y=it.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(w){return w.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),f===null&&(f=$b(),it.updateQueue=f),f.memoCache=u,f=u.data[u.index],f===void 0)for(f=u.data[u.index]=Array(o),y=0;y<o;y++)f[y]=B;return u.index++,f}function Fi(o,u){return typeof u=="function"?u(o):u}function Tp(o){var u=pn();return Kb(u,Tt,o)}function Kb(o,u,f){var y=o.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=f;var w=o.baseQueue,k=y.pending;if(k!==null){if(w!==null){var T=w.next;w.next=k.next,k.next=T}u.baseQueue=w=k,y.pending=null}if(k=o.baseState,w===null)o.memoizedState=k;else{u=w.next;var R=T=null,U=null,Y=u,ae=!1;do{var ce=Y.lane&-536870913;if(ce!==Y.lane?(gt&ce)===ce:(Ea&ce)===ce){var X=Y.revertLane;if(X===0)U!==null&&(U=U.next={lane:0,revertLane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),ce===wc&&(ae=!0);else if((Ea&X)===X){Y=Y.next,X===wc&&(ae=!0);continue}else ce={lane:0,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},U===null?(R=U=ce,T=k):U=U.next=ce,it.lanes|=X,_a|=X;ce=Y.action,el&&f(k,ce),k=Y.hasEagerState?Y.eagerState:f(k,ce)}else X={lane:ce,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},U===null?(R=U=X,T=k):U=U.next=X,it.lanes|=ce,_a|=ce;Y=Y.next}while(Y!==null&&Y!==u);if(U===null?T=k:U.next=R,!Vr(k,o.memoizedState)&&(Ln=!0,ae&&(f=Sc,f!==null)))throw f;o.memoizedState=k,o.baseState=T,o.baseQueue=U,y.lastRenderedState=k}return w===null&&(y.lanes=0),[o.memoizedState,y.dispatch]}function Wb(o){var u=pn(),f=u.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=o;var y=f.dispatch,w=f.pending,k=u.memoizedState;if(w!==null){f.pending=null;var T=w=w.next;do k=o(k,T.action),T=T.next;while(T!==w);Vr(k,u.memoizedState)||(Ln=!0),u.memoizedState=k,u.baseQueue===null&&(u.baseState=k),f.lastRenderedState=k}return[k,y]}function vj(o,u,f){var y=it,w=pn(),k=wt;if(k){if(f===void 0)throw Error(r(407));f=f()}else f=u();var T=!Vr((Tt||w).memoizedState,f);T&&(w.memoizedState=f,Ln=!0),w=w.queue;var R=kj.bind(null,y,w,o);if(_d(2048,8,R,[o]),w.getSnapshot!==u||T||fn!==null&&fn.memoizedState.tag&1){if(y.flags|=2048,jc(9,Ap(),Sj.bind(null,y,w,f,u),null),Lt===null)throw Error(r(349));k||(Ea&124)!==0||wj(y,u,f)}return f}function wj(o,u,f){o.flags|=16384,o={getSnapshot:u,value:f},u=it.updateQueue,u===null?(u=$b(),it.updateQueue=u,u.stores=[o]):(f=u.stores,f===null?u.stores=[o]:f.push(o))}function Sj(o,u,f,y){u.value=f,u.getSnapshot=y,Cj(u)&&Nj(o)}function kj(o,u,f){return f(function(){Cj(u)&&Nj(o)})}function Cj(o){var u=o.getSnapshot;o=o.value;try{var f=u();return!Vr(o,f)}catch{return!0}}function Nj(o){var u=yc(o,2);u!==null&&Yr(u,o,2)}function Gb(o){var u=Mr();if(typeof o=="function"){var f=o;if(o=f(),el){Ge(!0);try{f()}finally{Ge(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:o},u}function jj(o,u,f,y){return o.baseState=f,Kb(o,Tt,typeof y=="function"?y:Fi)}function Oz(o,u,f,y,w){if(Op(o))throw Error(r(485));if(o=u.action,o!==null){var k={payload:w,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){k.listeners.push(T)}};$.T!==null?f(!0):k.isTransition=!1,y(k),f=u.pending,f===null?(k.next=u.pending=k,Ej(u,k)):(k.next=f.next,u.pending=f.next=k)}}function Ej(o,u){var f=u.action,y=u.payload,w=o.state;if(u.isTransition){var k=$.T,T={};$.T=T;try{var R=f(w,y),U=$.S;U!==null&&U(T,R),Tj(o,u,R)}catch(Y){Yb(o,u,Y)}finally{$.T=k}}else try{k=f(w,y),Tj(o,u,k)}catch(Y){Yb(o,u,Y)}}function Tj(o,u,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(y){Aj(o,u,y)},function(y){return Yb(o,u,y)}):Aj(o,u,f)}function Aj(o,u,f){u.status="fulfilled",u.value=f,Mj(u),o.state=f,u=o.pending,u!==null&&(f=u.next,f===u?o.pending=null:(f=f.next,u.next=f,Ej(o,f)))}function Yb(o,u,f){var y=o.pending;if(o.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=f,Mj(u),u=u.next;while(u!==y)}o.action=null}function Mj(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function Oj(o,u){return u}function Rj(o,u){if(wt){var f=Lt.formState;if(f!==null){e:{var y=it;if(wt){if(en){t:{for(var w=en,k=ii;w.nodeType!==8;){if(!k){w=null;break t}if(w=Rs(w.nextSibling),w===null){w=null;break t}}k=w.data,w=k==="F!"||k==="F"?w:null}if(w){en=Rs(w.nextSibling),y=w.data==="F!";break e}}Qo(y)}y=!1}y&&(u=f[0])}}return f=Mr(),f.memoizedState=f.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oj,lastRenderedState:u},f.queue=y,f=Xj.bind(null,it,y),y.dispatch=f,y=Gb(!1),k=e0.bind(null,it,!1,y.queue),y=Mr(),w={state:u,dispatch:null,action:o,pending:null},y.queue=w,f=Oz.bind(null,it,w,k,f),w.dispatch=f,y.memoizedState=o,[u,f,!1]}function Dj(o){var u=pn();return _j(u,Tt,o)}function _j(o,u,f){if(u=Kb(o,u,Oj)[0],o=Tp(Fi)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=Dd(u)}catch(T){throw T===Ed?Sp:T}else y=u;u=pn();var w=u.queue,k=w.dispatch;return f!==u.memoizedState&&(it.flags|=2048,jc(9,Ap(),Rz.bind(null,w,f),null)),[y,k,o]}function Rz(o,u){o.action=u}function Pj(o){var u=pn(),f=Tt;if(f!==null)return _j(u,f,o);pn(),u=u.memoizedState,f=pn();var y=f.queue.dispatch;return f.memoizedState=o,[u,y,!1]}function jc(o,u,f,y){return o={tag:o,create:f,deps:y,inst:u,next:null},u=it.updateQueue,u===null&&(u=$b(),it.updateQueue=u),f=u.lastEffect,f===null?u.lastEffect=o.next=o:(y=f.next,f.next=o,o.next=y,u.lastEffect=o),o}function Ap(){return{destroy:void 0,resource:void 0}}function Lj(){return pn().memoizedState}function Mp(o,u,f,y){var w=Mr();y=y===void 0?null:y,it.flags|=o,w.memoizedState=jc(1|u,Ap(),f,y)}function _d(o,u,f,y){var w=pn();y=y===void 0?null:y;var k=w.memoizedState.inst;Tt!==null&&y!==null&&Bb(y,Tt.memoizedState.deps)?w.memoizedState=jc(u,k,f,y):(it.flags|=o,w.memoizedState=jc(1|u,k,f,y))}function Ij(o,u){Mp(8390656,8,o,u)}function Uj(o,u){_d(2048,8,o,u)}function Bj(o,u){return _d(4,2,o,u)}function Fj(o,u){return _d(4,4,o,u)}function zj(o,u){if(typeof u=="function"){o=o();var f=u(o);return function(){typeof f=="function"?f():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function qj(o,u,f){f=f!=null?f.concat([o]):null,_d(4,4,zj.bind(null,u,o),f)}function Qb(){}function Vj(o,u){var f=pn();u=u===void 0?null:u;var y=f.memoizedState;return u!==null&&Bb(u,y[1])?y[0]:(f.memoizedState=[o,u],o)}function $j(o,u){var f=pn();u=u===void 0?null:u;var y=f.memoizedState;if(u!==null&&Bb(u,y[1]))return y[0];if(y=o(),el){Ge(!0);try{o()}finally{Ge(!1)}}return f.memoizedState=[y,u],y}function Xb(o,u,f){return f===void 0||(Ea&1073741824)!==0?o.memoizedState=u:(o.memoizedState=f,o=WE(),it.lanes|=o,_a|=o,f)}function Hj(o,u,f,y){return Vr(f,u)?f:kc.current!==null?(o=Xb(o,f,y),Vr(o,u)||(Ln=!0),o):(Ea&42)===0?(Ln=!0,o.memoizedState=f):(o=WE(),it.lanes|=o,_a|=o,u)}function Kj(o,u,f,y,w){var k=Q.p;Q.p=k!==0&&8>k?k:8;var T=$.T,R={};$.T=R,e0(o,!1,u,f);try{var U=w(),Y=$.S;if(Y!==null&&Y(R,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ae=Tz(U,y);Pd(o,u,ae,Gr(o))}else Pd(o,u,y,Gr(o))}catch(ce){Pd(o,u,{then:function(){},status:"rejected",reason:ce},Gr())}finally{Q.p=k,$.T=T}}function Dz(){}function Jb(o,u,f,y){if(o.tag!==5)throw Error(r(476));var w=Wj(o).queue;Kj(o,w,u,re,f===null?Dz:function(){return Gj(o),f(y)})}function Wj(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:re},next:null};var f={};return u.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:f},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function Gj(o){var u=Wj(o).next.queue;Pd(o,u,{},Gr())}function Zb(){return sr(Zd)}function Yj(){return pn().memoizedState}function Qj(){return pn().memoizedState}function _z(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var f=Gr();o=Na(f);var y=ja(u,o,f);y!==null&&(Yr(y,u,f),Ad(y,u,f)),u={cache:Ab()},o.payload=u;return}u=u.return}}function Pz(o,u,f){var y=Gr();f={lane:y,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},Op(o)?Jj(u,f):(f=bb(o,u,f,y),f!==null&&(Yr(f,o,y),Zj(f,u,y)))}function Xj(o,u,f){var y=Gr();Pd(o,u,f,y)}function Pd(o,u,f,y){var w={lane:y,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(Op(o))Jj(u,w);else{var k=o.alternate;if(o.lanes===0&&(k===null||k.lanes===0)&&(k=u.lastRenderedReducer,k!==null))try{var T=u.lastRenderedState,R=k(T,f);if(w.hasEagerState=!0,w.eagerState=R,Vr(R,T))return pp(o,u,w,0),Lt===null&&fp(),!1}catch{}if(f=bb(o,u,w,y),f!==null)return Yr(f,o,y),Zj(f,u,y),!0}return!1}function e0(o,u,f,y){if(y={lane:2,revertLane:R0(),action:y,hasEagerState:!1,eagerState:null,next:null},Op(o)){if(u)throw Error(r(479))}else u=bb(o,f,y,2),u!==null&&Yr(u,o,2)}function Op(o){var u=o.alternate;return o===it||u!==null&&u===it}function Jj(o,u){Cc=Np=!0;var f=o.pending;f===null?u.next=u:(u.next=f.next,f.next=u),o.pending=u}function Zj(o,u,f){if((f&4194048)!==0){var y=u.lanes;y&=o.pendingLanes,f|=y,u.lanes=f,As(o,f)}}var Rp={readContext:sr,use:Ep,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useLayoutEffect:on,useInsertionEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useSyncExternalStore:on,useId:on,useHostTransitionStatus:on,useFormState:on,useActionState:on,useOptimistic:on,useMemoCache:on,useCacheRefresh:on},eE={readContext:sr,use:Ep,useCallback:function(o,u){return Mr().memoizedState=[o,u===void 0?null:u],o},useContext:sr,useEffect:Ij,useImperativeHandle:function(o,u,f){f=f!=null?f.concat([o]):null,Mp(4194308,4,zj.bind(null,u,o),f)},useLayoutEffect:function(o,u){return Mp(4194308,4,o,u)},useInsertionEffect:function(o,u){Mp(4,2,o,u)},useMemo:function(o,u){var f=Mr();u=u===void 0?null:u;var y=o();if(el){Ge(!0);try{o()}finally{Ge(!1)}}return f.memoizedState=[y,u],y},useReducer:function(o,u,f){var y=Mr();if(f!==void 0){var w=f(u);if(el){Ge(!0);try{f(u)}finally{Ge(!1)}}}else w=u;return y.memoizedState=y.baseState=w,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:w},y.queue=o,o=o.dispatch=Pz.bind(null,it,o),[y.memoizedState,o]},useRef:function(o){var u=Mr();return o={current:o},u.memoizedState=o},useState:function(o){o=Gb(o);var u=o.queue,f=Xj.bind(null,it,u);return u.dispatch=f,[o.memoizedState,f]},useDebugValue:Qb,useDeferredValue:function(o,u){var f=Mr();return Xb(f,o,u)},useTransition:function(){var o=Gb(!1);return o=Kj.bind(null,it,o.queue,!0,!1),Mr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,f){var y=it,w=Mr();if(wt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=u(),Lt===null)throw Error(r(349));(gt&124)!==0||wj(y,u,f)}w.memoizedState=f;var k={value:f,getSnapshot:u};return w.queue=k,Ij(kj.bind(null,y,k,o),[o]),y.flags|=2048,jc(9,Ap(),Sj.bind(null,y,k,f,u),null),f},useId:function(){var o=Mr(),u=Lt.identifierPrefix;if(wt){var f=Ii,y=Li;f=(y&~(1<<32-$e(y)-1)).toString(32)+f,u="«"+u+"R"+f,f=jp++,0<f&&(u+="H"+f.toString(32)),u+="»"}else f=Az++,u="«"+u+"r"+f.toString(32)+"»";return o.memoizedState=u},useHostTransitionStatus:Zb,useFormState:Rj,useActionState:Rj,useOptimistic:function(o){var u=Mr();u.memoizedState=u.baseState=o;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=f,u=e0.bind(null,it,!0,f),f.dispatch=u,[o,u]},useMemoCache:Hb,useCacheRefresh:function(){return Mr().memoizedState=_z.bind(null,it)}},tE={readContext:sr,use:Ep,useCallback:Vj,useContext:sr,useEffect:Uj,useImperativeHandle:qj,useInsertionEffect:Bj,useLayoutEffect:Fj,useMemo:$j,useReducer:Tp,useRef:Lj,useState:function(){return Tp(Fi)},useDebugValue:Qb,useDeferredValue:function(o,u){var f=pn();return Hj(f,Tt.memoizedState,o,u)},useTransition:function(){var o=Tp(Fi)[0],u=pn().memoizedState;return[typeof o=="boolean"?o:Dd(o),u]},useSyncExternalStore:vj,useId:Yj,useHostTransitionStatus:Zb,useFormState:Dj,useActionState:Dj,useOptimistic:function(o,u){var f=pn();return jj(f,Tt,o,u)},useMemoCache:Hb,useCacheRefresh:Qj},Lz={readContext:sr,use:Ep,useCallback:Vj,useContext:sr,useEffect:Uj,useImperativeHandle:qj,useInsertionEffect:Bj,useLayoutEffect:Fj,useMemo:$j,useReducer:Wb,useRef:Lj,useState:function(){return Wb(Fi)},useDebugValue:Qb,useDeferredValue:function(o,u){var f=pn();return Tt===null?Xb(f,o,u):Hj(f,Tt.memoizedState,o,u)},useTransition:function(){var o=Wb(Fi)[0],u=pn().memoizedState;return[typeof o=="boolean"?o:Dd(o),u]},useSyncExternalStore:vj,useId:Yj,useHostTransitionStatus:Zb,useFormState:Pj,useActionState:Pj,useOptimistic:function(o,u){var f=pn();return Tt!==null?jj(f,Tt,o,u):(f.baseState=o,[o,f.queue.dispatch])},useMemoCache:Hb,useCacheRefresh:Qj},Ec=null,Ld=0;function Dp(o){var u=Ld;return Ld+=1,Ec===null&&(Ec=[]),hj(Ec,o,u)}function Id(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function _p(o,u){throw u.$$typeof===m?Error(r(525)):(o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function nE(o){var u=o._init;return u(o._payload)}function rE(o){function u(H,q){if(o){var G=H.deletions;G===null?(H.deletions=[q],H.flags|=16):G.push(q)}}function f(H,q){if(!o)return null;for(;q!==null;)u(H,q),q=q.sibling;return null}function y(H){for(var q=new Map;H!==null;)H.key!==null?q.set(H.key,H):q.set(H.index,H),H=H.sibling;return q}function w(H,q){return H=Pi(H,q),H.index=0,H.sibling=null,H}function k(H,q,G){return H.index=G,o?(G=H.alternate,G!==null?(G=G.index,G<q?(H.flags|=67108866,q):G):(H.flags|=67108866,q)):(H.flags|=1048576,q)}function T(H){return o&&H.alternate===null&&(H.flags|=67108866),H}function R(H,q,G,oe){return q===null||q.tag!==6?(q=wb(G,H.mode,oe),q.return=H,q):(q=w(q,G),q.return=H,q)}function U(H,q,G,oe){var Te=G.type;return Te===v?ae(H,q,G.props.children,oe,G.key):q!==null&&(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===L&&nE(Te)===q.type)?(q=w(q,G.props),Id(q,G),q.return=H,q):(q=gp(G.type,G.key,G.props,null,H.mode,oe),Id(q,G),q.return=H,q)}function Y(H,q,G,oe){return q===null||q.tag!==4||q.stateNode.containerInfo!==G.containerInfo||q.stateNode.implementation!==G.implementation?(q=Sb(G,H.mode,oe),q.return=H,q):(q=w(q,G.children||[]),q.return=H,q)}function ae(H,q,G,oe,Te){return q===null||q.tag!==7?(q=Ko(G,H.mode,oe,Te),q.return=H,q):(q=w(q,G),q.return=H,q)}function ce(H,q,G){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=wb(""+q,H.mode,G),q.return=H,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case g:return G=gp(q.type,q.key,q.props,null,H.mode,G),Id(G,q),G.return=H,G;case x:return q=Sb(q,H.mode,G),q.return=H,q;case L:var oe=q._init;return q=oe(q._payload),ce(H,q,G)}if(he(q)||ee(q))return q=Ko(q,H.mode,G,null),q.return=H,q;if(typeof q.then=="function")return ce(H,Dp(q),G);if(q.$$typeof===A)return ce(H,vp(H,q),G);_p(H,q)}return null}function X(H,q,G,oe){var Te=q!==null?q.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Te!==null?null:R(H,q,""+G,oe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case g:return G.key===Te?U(H,q,G,oe):null;case x:return G.key===Te?Y(H,q,G,oe):null;case L:return Te=G._init,G=Te(G._payload),X(H,q,G,oe)}if(he(G)||ee(G))return Te!==null?null:ae(H,q,G,oe,null);if(typeof G.then=="function")return X(H,q,Dp(G),oe);if(G.$$typeof===A)return X(H,q,vp(H,G),oe);_p(H,G)}return null}function Z(H,q,G,oe,Te){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return H=H.get(G)||null,R(q,H,""+oe,Te);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case g:return H=H.get(oe.key===null?G:oe.key)||null,U(q,H,oe,Te);case x:return H=H.get(oe.key===null?G:oe.key)||null,Y(q,H,oe,Te);case L:var ct=oe._init;return oe=ct(oe._payload),Z(H,q,G,oe,Te)}if(he(oe)||ee(oe))return H=H.get(G)||null,ae(q,H,oe,Te,null);if(typeof oe.then=="function")return Z(H,q,G,Dp(oe),Te);if(oe.$$typeof===A)return Z(H,q,G,vp(q,oe),Te);_p(q,oe)}return null}function He(H,q,G,oe){for(var Te=null,ct=null,Le=q,Ve=q=0,Un=null;Le!==null&&Ve<G.length;Ve++){Le.index>Ve?(Un=Le,Le=null):Un=Le.sibling;var yt=X(H,Le,G[Ve],oe);if(yt===null){Le===null&&(Le=Un);break}o&&Le&&yt.alternate===null&&u(H,Le),q=k(yt,q,Ve),ct===null?Te=yt:ct.sibling=yt,ct=yt,Le=Un}if(Ve===G.length)return f(H,Le),wt&&Go(H,Ve),Te;if(Le===null){for(;Ve<G.length;Ve++)Le=ce(H,G[Ve],oe),Le!==null&&(q=k(Le,q,Ve),ct===null?Te=Le:ct.sibling=Le,ct=Le);return wt&&Go(H,Ve),Te}for(Le=y(Le);Ve<G.length;Ve++)Un=Z(Le,H,Ve,G[Ve],oe),Un!==null&&(o&&Un.alternate!==null&&Le.delete(Un.key===null?Ve:Un.key),q=k(Un,q,Ve),ct===null?Te=Un:ct.sibling=Un,ct=Un);return o&&Le.forEach(function(Va){return u(H,Va)}),wt&&Go(H,Ve),Te}function qe(H,q,G,oe){if(G==null)throw Error(r(151));for(var Te=null,ct=null,Le=q,Ve=q=0,Un=null,yt=G.next();Le!==null&&!yt.done;Ve++,yt=G.next()){Le.index>Ve?(Un=Le,Le=null):Un=Le.sibling;var Va=X(H,Le,yt.value,oe);if(Va===null){Le===null&&(Le=Un);break}o&&Le&&Va.alternate===null&&u(H,Le),q=k(Va,q,Ve),ct===null?Te=Va:ct.sibling=Va,ct=Va,Le=Un}if(yt.done)return f(H,Le),wt&&Go(H,Ve),Te;if(Le===null){for(;!yt.done;Ve++,yt=G.next())yt=ce(H,yt.value,oe),yt!==null&&(q=k(yt,q,Ve),ct===null?Te=yt:ct.sibling=yt,ct=yt);return wt&&Go(H,Ve),Te}for(Le=y(Le);!yt.done;Ve++,yt=G.next())yt=Z(Le,H,Ve,yt.value,oe),yt!==null&&(o&&yt.alternate!==null&&Le.delete(yt.key===null?Ve:yt.key),q=k(yt,q,Ve),ct===null?Te=yt:ct.sibling=yt,ct=yt);return o&&Le.forEach(function(Iq){return u(H,Iq)}),wt&&Go(H,Ve),Te}function Mt(H,q,G,oe){if(typeof G=="object"&&G!==null&&G.type===v&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case g:e:{for(var Te=G.key;q!==null;){if(q.key===Te){if(Te=G.type,Te===v){if(q.tag===7){f(H,q.sibling),oe=w(q,G.props.children),oe.return=H,H=oe;break e}}else if(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===L&&nE(Te)===q.type){f(H,q.sibling),oe=w(q,G.props),Id(oe,G),oe.return=H,H=oe;break e}f(H,q);break}else u(H,q);q=q.sibling}G.type===v?(oe=Ko(G.props.children,H.mode,oe,G.key),oe.return=H,H=oe):(oe=gp(G.type,G.key,G.props,null,H.mode,oe),Id(oe,G),oe.return=H,H=oe)}return T(H);case x:e:{for(Te=G.key;q!==null;){if(q.key===Te)if(q.tag===4&&q.stateNode.containerInfo===G.containerInfo&&q.stateNode.implementation===G.implementation){f(H,q.sibling),oe=w(q,G.children||[]),oe.return=H,H=oe;break e}else{f(H,q);break}else u(H,q);q=q.sibling}oe=Sb(G,H.mode,oe),oe.return=H,H=oe}return T(H);case L:return Te=G._init,G=Te(G._payload),Mt(H,q,G,oe)}if(he(G))return He(H,q,G,oe);if(ee(G)){if(Te=ee(G),typeof Te!="function")throw Error(r(150));return G=Te.call(G),qe(H,q,G,oe)}if(typeof G.then=="function")return Mt(H,q,Dp(G),oe);if(G.$$typeof===A)return Mt(H,q,vp(H,G),oe);_p(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,q!==null&&q.tag===6?(f(H,q.sibling),oe=w(q,G),oe.return=H,H=oe):(f(H,q),oe=wb(G,H.mode,oe),oe.return=H,H=oe),T(H)):f(H,q)}return function(H,q,G,oe){try{Ld=0;var Te=Mt(H,q,G,oe);return Ec=null,Te}catch(Le){if(Le===Ed||Le===Sp)throw Le;var ct=$r(29,Le,null,H.mode);return ct.lanes=oe,ct.return=H,ct}}}var Tc=rE(!0),sE=rE(!1),us=te(null),ai=null;function Ta(o){var u=o.alternate;fe(jn,jn.current&1),fe(us,o),ai===null&&(u===null||kc.current!==null||u.memoizedState!==null)&&(ai=o)}function iE(o){if(o.tag===22){if(fe(jn,jn.current),fe(us,o),ai===null){var u=o.alternate;u!==null&&u.memoizedState!==null&&(ai=o)}}else Aa()}function Aa(){fe(jn,jn.current),fe(us,us.current)}function zi(o){ue(us),ai===o&&(ai=null),ue(jn)}var jn=te(0);function Pp(o){for(var u=o;u!==null;){if(u.tag===13){var f=u.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||$0(f)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function t0(o,u,f,y){u=o.memoizedState,f=f(y,u),f=f==null?u:p({},u,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var n0={enqueueSetState:function(o,u,f){o=o._reactInternals;var y=Gr(),w=Na(y);w.payload=u,f!=null&&(w.callback=f),u=ja(o,w,y),u!==null&&(Yr(u,o,y),Ad(u,o,y))},enqueueReplaceState:function(o,u,f){o=o._reactInternals;var y=Gr(),w=Na(y);w.tag=1,w.payload=u,f!=null&&(w.callback=f),u=ja(o,w,y),u!==null&&(Yr(u,o,y),Ad(u,o,y))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var f=Gr(),y=Na(f);y.tag=2,u!=null&&(y.callback=u),u=ja(o,y,f),u!==null&&(Yr(u,o,f),Ad(u,o,f))}};function aE(o,u,f,y,w,k,T){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(y,k,T):u.prototype&&u.prototype.isPureReactComponent?!bd(f,y)||!bd(w,k):!0}function oE(o,u,f,y){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(f,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(f,y),u.state!==o&&n0.enqueueReplaceState(u,u.state,null)}function tl(o,u){var f=u;if("ref"in u){f={};for(var y in u)y!=="ref"&&(f[y]=u[y])}if(o=o.defaultProps){f===u&&(f=p({},f));for(var w in o)f[w]===void 0&&(f[w]=o[w])}return f}var Lp=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function lE(o){Lp(o)}function cE(o){console.error(o)}function uE(o){Lp(o)}function Ip(o,u){try{var f=o.onUncaughtError;f(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function dE(o,u,f){try{var y=o.onCaughtError;y(f.value,{componentStack:f.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function r0(o,u,f){return f=Na(f),f.tag=3,f.payload={element:null},f.callback=function(){Ip(o,u)},f}function hE(o){return o=Na(o),o.tag=3,o}function fE(o,u,f,y){var w=f.type.getDerivedStateFromError;if(typeof w=="function"){var k=y.value;o.payload=function(){return w(k)},o.callback=function(){dE(u,f,y)}}var T=f.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(o.callback=function(){dE(u,f,y),typeof w!="function"&&(Pa===null?Pa=new Set([this]):Pa.add(this));var R=y.stack;this.componentDidCatch(y.value,{componentStack:R!==null?R:""})})}function Iz(o,u,f,y,w){if(f.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=f.alternate,u!==null&&Cd(u,f,w,!0),f=us.current,f!==null){switch(f.tag){case 13:return ai===null?E0():f.alternate===null&&tn===0&&(tn=3),f.flags&=-257,f.flags|=65536,f.lanes=w,y===Rb?f.flags|=16384:(u=f.updateQueue,u===null?f.updateQueue=new Set([y]):u.add(y),A0(o,y,w)),!1;case 22:return f.flags|=65536,y===Rb?f.flags|=16384:(u=f.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},f.updateQueue=u):(f=u.retryQueue,f===null?u.retryQueue=new Set([y]):f.add(y)),A0(o,y,w)),!1}throw Error(r(435,f.tag))}return A0(o,y,w),E0(),!1}if(wt)return u=us.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=w,y!==Nb&&(o=Error(r(422),{cause:y}),kd(is(o,f)))):(y!==Nb&&(u=Error(r(423),{cause:y}),kd(is(u,f))),o=o.current.alternate,o.flags|=65536,w&=-w,o.lanes|=w,y=is(y,f),w=r0(o.stateNode,y,w),Pb(o,w),tn!==4&&(tn=2)),!1;var k=Error(r(520),{cause:y});if(k=is(k,f),$d===null?$d=[k]:$d.push(k),tn!==4&&(tn=2),u===null)return!0;y=is(y,f),f=u;do{switch(f.tag){case 3:return f.flags|=65536,o=w&-w,f.lanes|=o,o=r0(f.stateNode,y,o),Pb(f,o),!1;case 1:if(u=f.type,k=f.stateNode,(f.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Pa===null||!Pa.has(k))))return f.flags|=65536,w&=-w,f.lanes|=w,w=hE(w),fE(w,o,f,y),Pb(f,w),!1}f=f.return}while(f!==null);return!1}var pE=Error(r(461)),Ln=!1;function Kn(o,u,f,y){u.child=o===null?sE(u,null,f,y):Tc(u,o.child,f,y)}function mE(o,u,f,y,w){f=f.render;var k=u.ref;if("ref"in y){var T={};for(var R in y)R!=="ref"&&(T[R]=y[R])}else T=y;return Jo(u),y=Fb(o,u,f,T,k,w),R=zb(),o!==null&&!Ln?(qb(o,u,w),qi(o,u,w)):(wt&&R&&kb(u),u.flags|=1,Kn(o,u,y,w),u.child)}function gE(o,u,f,y,w){if(o===null){var k=f.type;return typeof k=="function"&&!vb(k)&&k.defaultProps===void 0&&f.compare===null?(u.tag=15,u.type=k,yE(o,u,k,y,w)):(o=gp(f.type,null,y,u,u.mode,w),o.ref=u.ref,o.return=u,u.child=o)}if(k=o.child,!d0(o,w)){var T=k.memoizedProps;if(f=f.compare,f=f!==null?f:bd,f(T,y)&&o.ref===u.ref)return qi(o,u,w)}return u.flags|=1,o=Pi(k,y),o.ref=u.ref,o.return=u,u.child=o}function yE(o,u,f,y,w){if(o!==null){var k=o.memoizedProps;if(bd(k,y)&&o.ref===u.ref)if(Ln=!1,u.pendingProps=y=k,d0(o,w))(o.flags&131072)!==0&&(Ln=!0);else return u.lanes=o.lanes,qi(o,u,w)}return s0(o,u,f,y,w)}function xE(o,u,f){var y=u.pendingProps,w=y.children,k=o!==null?o.memoizedState:null;if(y.mode==="hidden"){if((u.flags&128)!==0){if(y=k!==null?k.baseLanes|f:f,o!==null){for(w=u.child=o.child,k=0;w!==null;)k=k|w.lanes|w.childLanes,w=w.sibling;u.childLanes=k&~y}else u.childLanes=0,u.child=null;return bE(o,u,y,f)}if((f&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&wp(u,k!==null?k.cachePool:null),k!==null?yj(u,k):Ib(),iE(u);else return u.lanes=u.childLanes=536870912,bE(o,u,k!==null?k.baseLanes|f:f,f)}else k!==null?(wp(u,k.cachePool),yj(u,k),Aa(),u.memoizedState=null):(o!==null&&wp(u,null),Ib(),Aa());return Kn(o,u,w,f),u.child}function bE(o,u,f,y){var w=Ob();return w=w===null?null:{parent:Nn._currentValue,pool:w},u.memoizedState={baseLanes:f,cachePool:w},o!==null&&wp(u,null),Ib(),iE(u),o!==null&&Cd(o,u,y,!0),null}function Up(o,u){var f=u.ref;if(f===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(o===null||o.ref!==f)&&(u.flags|=4194816)}}function s0(o,u,f,y,w){return Jo(u),f=Fb(o,u,f,y,void 0,w),y=zb(),o!==null&&!Ln?(qb(o,u,w),qi(o,u,w)):(wt&&y&&kb(u),u.flags|=1,Kn(o,u,f,w),u.child)}function vE(o,u,f,y,w,k){return Jo(u),u.updateQueue=null,f=bj(u,y,f,w),xj(o),y=zb(),o!==null&&!Ln?(qb(o,u,k),qi(o,u,k)):(wt&&y&&kb(u),u.flags|=1,Kn(o,u,f,k),u.child)}function wE(o,u,f,y,w){if(Jo(u),u.stateNode===null){var k=xc,T=f.contextType;typeof T=="object"&&T!==null&&(k=sr(T)),k=new f(y,k),u.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=n0,u.stateNode=k,k._reactInternals=u,k=u.stateNode,k.props=y,k.state=u.memoizedState,k.refs={},Db(u),T=f.contextType,k.context=typeof T=="object"&&T!==null?sr(T):xc,k.state=u.memoizedState,T=f.getDerivedStateFromProps,typeof T=="function"&&(t0(u,f,T,y),k.state=u.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(T=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),T!==k.state&&n0.enqueueReplaceState(k,k.state,null),Od(u,y,k,w),Md(),k.state=u.memoizedState),typeof k.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(o===null){k=u.stateNode;var R=u.memoizedProps,U=tl(f,R);k.props=U;var Y=k.context,ae=f.contextType;T=xc,typeof ae=="object"&&ae!==null&&(T=sr(ae));var ce=f.getDerivedStateFromProps;ae=typeof ce=="function"||typeof k.getSnapshotBeforeUpdate=="function",R=u.pendingProps!==R,ae||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(R||Y!==T)&&oE(u,k,y,T),Ca=!1;var X=u.memoizedState;k.state=X,Od(u,y,k,w),Md(),Y=u.memoizedState,R||X!==Y||Ca?(typeof ce=="function"&&(t0(u,f,ce,y),Y=u.memoizedState),(U=Ca||aE(u,f,U,y,X,Y,T))?(ae||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(u.flags|=4194308)):(typeof k.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=Y),k.props=y,k.state=Y,k.context=T,y=U):(typeof k.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{k=u.stateNode,_b(o,u),T=u.memoizedProps,ae=tl(f,T),k.props=ae,ce=u.pendingProps,X=k.context,Y=f.contextType,U=xc,typeof Y=="object"&&Y!==null&&(U=sr(Y)),R=f.getDerivedStateFromProps,(Y=typeof R=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(T!==ce||X!==U)&&oE(u,k,y,U),Ca=!1,X=u.memoizedState,k.state=X,Od(u,y,k,w),Md();var Z=u.memoizedState;T!==ce||X!==Z||Ca||o!==null&&o.dependencies!==null&&bp(o.dependencies)?(typeof R=="function"&&(t0(u,f,R,y),Z=u.memoizedState),(ae=Ca||aE(u,f,ae,y,X,Z,U)||o!==null&&o.dependencies!==null&&bp(o.dependencies))?(Y||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(y,Z,U),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(y,Z,U)),typeof k.componentDidUpdate=="function"&&(u.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof k.componentDidUpdate!="function"||T===o.memoizedProps&&X===o.memoizedState||(u.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||T===o.memoizedProps&&X===o.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Z),k.props=y,k.state=Z,k.context=U,y=ae):(typeof k.componentDidUpdate!="function"||T===o.memoizedProps&&X===o.memoizedState||(u.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||T===o.memoizedProps&&X===o.memoizedState||(u.flags|=1024),y=!1)}return k=y,Up(o,u),y=(u.flags&128)!==0,k||y?(k=u.stateNode,f=y&&typeof f.getDerivedStateFromError!="function"?null:k.render(),u.flags|=1,o!==null&&y?(u.child=Tc(u,o.child,null,w),u.child=Tc(u,null,f,w)):Kn(o,u,f,w),u.memoizedState=k.state,o=u.child):o=qi(o,u,w),o}function SE(o,u,f,y){return Sd(),u.flags|=256,Kn(o,u,f,y),u.child}var i0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function a0(o){return{baseLanes:o,cachePool:cj()}}function o0(o,u,f){return o=o!==null?o.childLanes&~f:0,u&&(o|=ds),o}function kE(o,u,f){var y=u.pendingProps,w=!1,k=(u.flags&128)!==0,T;if((T=k)||(T=o!==null&&o.memoizedState===null?!1:(jn.current&2)!==0),T&&(w=!0,u.flags&=-129),T=(u.flags&32)!==0,u.flags&=-33,o===null){if(wt){if(w?Ta(u):Aa(),wt){var R=en,U;if(U=R){e:{for(U=R,R=ii;U.nodeType!==8;){if(!R){R=null;break e}if(U=Rs(U.nextSibling),U===null){R=null;break e}}R=U}R!==null?(u.memoizedState={dehydrated:R,treeContext:Wo!==null?{id:Li,overflow:Ii}:null,retryLane:536870912,hydrationErrors:null},U=$r(18,null,null,0),U.stateNode=R,U.return=u,u.child=U,pr=u,en=null,U=!0):U=!1}U||Qo(u)}if(R=u.memoizedState,R!==null&&(R=R.dehydrated,R!==null))return $0(R)?u.lanes=32:u.lanes=536870912,null;zi(u)}return R=y.children,y=y.fallback,w?(Aa(),w=u.mode,R=Bp({mode:"hidden",children:R},w),y=Ko(y,w,f,null),R.return=u,y.return=u,R.sibling=y,u.child=R,w=u.child,w.memoizedState=a0(f),w.childLanes=o0(o,T,f),u.memoizedState=i0,y):(Ta(u),l0(u,R))}if(U=o.memoizedState,U!==null&&(R=U.dehydrated,R!==null)){if(k)u.flags&256?(Ta(u),u.flags&=-257,u=c0(o,u,f)):u.memoizedState!==null?(Aa(),u.child=o.child,u.flags|=128,u=null):(Aa(),w=y.fallback,R=u.mode,y=Bp({mode:"visible",children:y.children},R),w=Ko(w,R,f,null),w.flags|=2,y.return=u,w.return=u,y.sibling=w,u.child=y,Tc(u,o.child,null,f),y=u.child,y.memoizedState=a0(f),y.childLanes=o0(o,T,f),u.memoizedState=i0,u=w);else if(Ta(u),$0(R)){if(T=R.nextSibling&&R.nextSibling.dataset,T)var Y=T.dgst;T=Y,y=Error(r(419)),y.stack="",y.digest=T,kd({value:y,source:null,stack:null}),u=c0(o,u,f)}else if(Ln||Cd(o,u,f,!1),T=(f&o.childLanes)!==0,Ln||T){if(T=Lt,T!==null&&(y=f&-f,y=(y&42)!==0?1:nr(y),y=(y&(T.suspendedLanes|f))!==0?0:y,y!==0&&y!==U.retryLane))throw U.retryLane=y,yc(o,y),Yr(T,o,y),pE;R.data==="$?"||E0(),u=c0(o,u,f)}else R.data==="$?"?(u.flags|=192,u.child=o.child,u=null):(o=U.treeContext,en=Rs(R.nextSibling),pr=u,wt=!0,Yo=null,ii=!1,o!==null&&(ls[cs++]=Li,ls[cs++]=Ii,ls[cs++]=Wo,Li=o.id,Ii=o.overflow,Wo=u),u=l0(u,y.children),u.flags|=4096);return u}return w?(Aa(),w=y.fallback,R=u.mode,U=o.child,Y=U.sibling,y=Pi(U,{mode:"hidden",children:y.children}),y.subtreeFlags=U.subtreeFlags&65011712,Y!==null?w=Pi(Y,w):(w=Ko(w,R,f,null),w.flags|=2),w.return=u,y.return=u,y.sibling=w,u.child=y,y=w,w=u.child,R=o.child.memoizedState,R===null?R=a0(f):(U=R.cachePool,U!==null?(Y=Nn._currentValue,U=U.parent!==Y?{parent:Y,pool:Y}:U):U=cj(),R={baseLanes:R.baseLanes|f,cachePool:U}),w.memoizedState=R,w.childLanes=o0(o,T,f),u.memoizedState=i0,y):(Ta(u),f=o.child,o=f.sibling,f=Pi(f,{mode:"visible",children:y.children}),f.return=u,f.sibling=null,o!==null&&(T=u.deletions,T===null?(u.deletions=[o],u.flags|=16):T.push(o)),u.child=f,u.memoizedState=null,f)}function l0(o,u){return u=Bp({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function Bp(o,u){return o=$r(22,o,null,u),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function c0(o,u,f){return Tc(u,o.child,null,f),o=l0(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function CE(o,u,f){o.lanes|=u;var y=o.alternate;y!==null&&(y.lanes|=u),Eb(o.return,u,f)}function u0(o,u,f,y,w){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:w}:(k.isBackwards=u,k.rendering=null,k.renderingStartTime=0,k.last=y,k.tail=f,k.tailMode=w)}function NE(o,u,f){var y=u.pendingProps,w=y.revealOrder,k=y.tail;if(Kn(o,u,y.children,f),y=jn.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&CE(o,f,u);else if(o.tag===19)CE(o,f,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}y&=1}switch(fe(jn,y),w){case"forwards":for(f=u.child,w=null;f!==null;)o=f.alternate,o!==null&&Pp(o)===null&&(w=f),f=f.sibling;f=w,f===null?(w=u.child,u.child=null):(w=f.sibling,f.sibling=null),u0(u,!1,w,f,k);break;case"backwards":for(f=null,w=u.child,u.child=null;w!==null;){if(o=w.alternate,o!==null&&Pp(o)===null){u.child=w;break}o=w.sibling,w.sibling=f,f=w,w=o}u0(u,!0,f,null,k);break;case"together":u0(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function qi(o,u,f){if(o!==null&&(u.dependencies=o.dependencies),_a|=u.lanes,(f&u.childLanes)===0)if(o!==null){if(Cd(o,u,f,!1),(f&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,f=Pi(o,o.pendingProps),u.child=f,f.return=u;o.sibling!==null;)o=o.sibling,f=f.sibling=Pi(o,o.pendingProps),f.return=u;f.sibling=null}return u.child}function d0(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&bp(o)))}function Uz(o,u,f){switch(u.tag){case 3:Xe(u,u.stateNode.containerInfo),ka(u,Nn,o.memoizedState.cache),Sd();break;case 27:case 5:Ze(u);break;case 4:Xe(u,u.stateNode.containerInfo);break;case 10:ka(u,u.type,u.memoizedProps.value);break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(Ta(u),u.flags|=128,null):(f&u.child.childLanes)!==0?kE(o,u,f):(Ta(u),o=qi(o,u,f),o!==null?o.sibling:null);Ta(u);break;case 19:var w=(o.flags&128)!==0;if(y=(f&u.childLanes)!==0,y||(Cd(o,u,f,!1),y=(f&u.childLanes)!==0),w){if(y)return NE(o,u,f);u.flags|=128}if(w=u.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),fe(jn,jn.current),y)break;return null;case 22:case 23:return u.lanes=0,xE(o,u,f);case 24:ka(u,Nn,o.memoizedState.cache)}return qi(o,u,f)}function jE(o,u,f){if(o!==null)if(o.memoizedProps!==u.pendingProps)Ln=!0;else{if(!d0(o,f)&&(u.flags&128)===0)return Ln=!1,Uz(o,u,f);Ln=(o.flags&131072)!==0}else Ln=!1,wt&&(u.flags&1048576)!==0&&nj(u,xp,u.index);switch(u.lanes=0,u.tag){case 16:e:{o=u.pendingProps;var y=u.elementType,w=y._init;if(y=w(y._payload),u.type=y,typeof y=="function")vb(y)?(o=tl(y,o),u.tag=1,u=wE(null,u,y,o,f)):(u.tag=0,u=s0(null,u,y,o,f));else{if(y!=null){if(w=y.$$typeof,w===D){u.tag=11,u=mE(null,u,y,o,f);break e}else if(w===_){u.tag=14,u=gE(null,u,y,o,f);break e}}throw u=se(y)||y,Error(r(306,u,""))}}return u;case 0:return s0(o,u,u.type,u.pendingProps,f);case 1:return y=u.type,w=tl(y,u.pendingProps),wE(o,u,y,w,f);case 3:e:{if(Xe(u,u.stateNode.containerInfo),o===null)throw Error(r(387));y=u.pendingProps;var k=u.memoizedState;w=k.element,_b(o,u),Od(u,y,null,f);var T=u.memoizedState;if(y=T.cache,ka(u,Nn,y),y!==k.cache&&Tb(u,[Nn],f,!0),Md(),y=T.element,k.isDehydrated)if(k={element:y,isDehydrated:!1,cache:T.cache},u.updateQueue.baseState=k,u.memoizedState=k,u.flags&256){u=SE(o,u,y,f);break e}else if(y!==w){w=is(Error(r(424)),u),kd(w),u=SE(o,u,y,f);break e}else for(o=u.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,en=Rs(o.firstChild),pr=u,wt=!0,Yo=null,ii=!0,f=sE(u,null,y,f),u.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Sd(),y===w){u=qi(o,u,f);break e}Kn(o,u,y,f)}u=u.child}return u;case 26:return Up(o,u),o===null?(f=MT(u.type,null,u.pendingProps,null))?u.memoizedState=f:wt||(f=u.type,o=u.pendingProps,y=Zp(be.current).createElement(f),y[It]=u,y[Ut]=o,Gn(y,f,o),Pn(y),u.stateNode=y):u.memoizedState=MT(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return Ze(u),o===null&&wt&&(y=u.stateNode=ET(u.type,u.pendingProps,be.current),pr=u,ii=!0,w=en,Ua(u.type)?(H0=w,en=Rs(y.firstChild)):en=w),Kn(o,u,u.pendingProps.children,f),Up(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&wt&&((w=y=en)&&(y=hq(y,u.type,u.pendingProps,ii),y!==null?(u.stateNode=y,pr=u,en=Rs(y.firstChild),ii=!1,w=!0):w=!1),w||Qo(u)),Ze(u),w=u.type,k=u.pendingProps,T=o!==null?o.memoizedProps:null,y=k.children,z0(w,k)?y=null:T!==null&&z0(w,T)&&(u.flags|=32),u.memoizedState!==null&&(w=Fb(o,u,Mz,null,null,f),Zd._currentValue=w),Up(o,u),Kn(o,u,y,f),u.child;case 6:return o===null&&wt&&((o=f=en)&&(f=fq(f,u.pendingProps,ii),f!==null?(u.stateNode=f,pr=u,en=null,o=!0):o=!1),o||Qo(u)),null;case 13:return kE(o,u,f);case 4:return Xe(u,u.stateNode.containerInfo),y=u.pendingProps,o===null?u.child=Tc(u,null,y,f):Kn(o,u,y,f),u.child;case 11:return mE(o,u,u.type,u.pendingProps,f);case 7:return Kn(o,u,u.pendingProps,f),u.child;case 8:return Kn(o,u,u.pendingProps.children,f),u.child;case 12:return Kn(o,u,u.pendingProps.children,f),u.child;case 10:return y=u.pendingProps,ka(u,u.type,y.value),Kn(o,u,y.children,f),u.child;case 9:return w=u.type._context,y=u.pendingProps.children,Jo(u),w=sr(w),y=y(w),u.flags|=1,Kn(o,u,y,f),u.child;case 14:return gE(o,u,u.type,u.pendingProps,f);case 15:return yE(o,u,u.type,u.pendingProps,f);case 19:return NE(o,u,f);case 31:return y=u.pendingProps,f=u.mode,y={mode:y.mode,children:y.children},o===null?(f=Bp(y,f),f.ref=u.ref,u.child=f,f.return=u,u=f):(f=Pi(o.child,y),f.ref=u.ref,u.child=f,f.return=u,u=f),u;case 22:return xE(o,u,f);case 24:return Jo(u),y=sr(Nn),o===null?(w=Ob(),w===null&&(w=Lt,k=Ab(),w.pooledCache=k,k.refCount++,k!==null&&(w.pooledCacheLanes|=f),w=k),u.memoizedState={parent:y,cache:w},Db(u),ka(u,Nn,w)):((o.lanes&f)!==0&&(_b(o,u),Od(u,null,null,f),Md()),w=o.memoizedState,k=u.memoizedState,w.parent!==y?(w={parent:y,cache:y},u.memoizedState=w,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=w),ka(u,Nn,y)):(y=k.cache,ka(u,Nn,y),y!==w.cache&&Tb(u,[Nn],f,!0))),Kn(o,u,u.pendingProps.children,f),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Vi(o){o.flags|=4}function EE(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!PT(u)){if(u=us.current,u!==null&&((gt&4194048)===gt?ai!==null:(gt&62914560)!==gt&&(gt&536870912)===0||u!==ai))throw Td=Rb,uj;o.flags|=8192}}function Fp(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?tp():536870912,o.lanes|=u,Rc|=u)}function Ud(o,u){if(!wt)switch(o.tailMode){case"hidden":u=o.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o.tail=null:f.sibling=null;break;case"collapsed":f=o.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:y.sibling=null}}function Wt(o){var u=o.alternate!==null&&o.alternate.child===o.child,f=0,y=0;if(u)for(var w=o.child;w!==null;)f|=w.lanes|w.childLanes,y|=w.subtreeFlags&65011712,y|=w.flags&65011712,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)f|=w.lanes|w.childLanes,y|=w.subtreeFlags,y|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=y,o.childLanes=f,u}function Bz(o,u,f){var y=u.pendingProps;switch(Cb(u),u.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(u),null;case 1:return Wt(u),null;case 3:return f=u.stateNode,y=null,o!==null&&(y=o.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Bi(Nn),Je(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(o===null||o.child===null)&&(wd(u)?Vi(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,ij())),Wt(u),null;case 26:return f=u.memoizedState,o===null?(Vi(u),f!==null?(Wt(u),EE(u,f)):(Wt(u),u.flags&=-16777217)):f?f!==o.memoizedState?(Vi(u),Wt(u),EE(u,f)):(Wt(u),u.flags&=-16777217):(o.memoizedProps!==y&&Vi(u),Wt(u),u.flags&=-16777217),null;case 27:an(u),f=be.current;var w=u.type;if(o!==null&&u.stateNode!=null)o.memoizedProps!==y&&Vi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return Wt(u),null}o=ke.current,wd(u)?rj(u):(o=ET(w,y,f),u.stateNode=o,Vi(u))}return Wt(u),null;case 5:if(an(u),f=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==y&&Vi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return Wt(u),null}if(o=ke.current,wd(u))rj(u);else{switch(w=Zp(be.current),o){case 1:o=w.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:o=w.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":o=w.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":o=w.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":o=w.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof y.is=="string"?w.createElement("select",{is:y.is}):w.createElement("select"),y.multiple?o.multiple=!0:y.size&&(o.size=y.size);break;default:o=typeof y.is=="string"?w.createElement(f,{is:y.is}):w.createElement(f)}}o[It]=u,o[Ut]=y;e:for(w=u.child;w!==null;){if(w.tag===5||w.tag===6)o.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===u)break e;for(;w.sibling===null;){if(w.return===null||w.return===u)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}u.stateNode=o;e:switch(Gn(o,f,y),f){case"button":case"input":case"select":case"textarea":o=!!y.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Vi(u)}}return Wt(u),u.flags&=-16777217,null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==y&&Vi(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(o=be.current,wd(u)){if(o=u.stateNode,f=u.memoizedProps,y=null,w=pr,w!==null)switch(w.tag){case 27:case 5:y=w.memoizedProps}o[It]=u,o=!!(o.nodeValue===f||y!==null&&y.suppressHydrationWarning===!0||vT(o.nodeValue,f)),o||Qo(u)}else o=Zp(o).createTextNode(y),o[It]=u,u.stateNode=o}return Wt(u),null;case 13:if(y=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(w=wd(u),y!==null&&y.dehydrated!==null){if(o===null){if(!w)throw Error(r(318));if(w=u.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[It]=u}else Sd(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Wt(u),w=!1}else w=ij(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=w),w=!0;if(!w)return u.flags&256?(zi(u),u):(zi(u),null)}if(zi(u),(u.flags&128)!==0)return u.lanes=f,u;if(f=y!==null,o=o!==null&&o.memoizedState!==null,f){y=u.child,w=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(w=y.alternate.memoizedState.cachePool.pool);var k=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(k=y.memoizedState.cachePool.pool),k!==w&&(y.flags|=2048)}return f!==o&&f&&(u.child.flags|=8192),Fp(u,u.updateQueue),Wt(u),null;case 4:return Je(),o===null&&L0(u.stateNode.containerInfo),Wt(u),null;case 10:return Bi(u.type),Wt(u),null;case 19:if(ue(jn),w=u.memoizedState,w===null)return Wt(u),null;if(y=(u.flags&128)!==0,k=w.rendering,k===null)if(y)Ud(w,!1);else{if(tn!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(k=Pp(o),k!==null){for(u.flags|=128,Ud(w,!1),o=k.updateQueue,u.updateQueue=o,Fp(u,o),u.subtreeFlags=0,o=f,f=u.child;f!==null;)tj(f,o),f=f.sibling;return fe(jn,jn.current&1|2),u.child}o=o.sibling}w.tail!==null&&dr()>Vp&&(u.flags|=128,y=!0,Ud(w,!1),u.lanes=4194304)}else{if(!y)if(o=Pp(k),o!==null){if(u.flags|=128,y=!0,o=o.updateQueue,u.updateQueue=o,Fp(u,o),Ud(w,!0),w.tail===null&&w.tailMode==="hidden"&&!k.alternate&&!wt)return Wt(u),null}else 2*dr()-w.renderingStartTime>Vp&&f!==536870912&&(u.flags|=128,y=!0,Ud(w,!1),u.lanes=4194304);w.isBackwards?(k.sibling=u.child,u.child=k):(o=w.last,o!==null?o.sibling=k:u.child=k,w.last=k)}return w.tail!==null?(u=w.tail,w.rendering=u,w.tail=u.sibling,w.renderingStartTime=dr(),u.sibling=null,o=jn.current,fe(jn,y?o&1|2:o&1),u):(Wt(u),null);case 22:case 23:return zi(u),Ub(),y=u.memoizedState!==null,o!==null?o.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(f&536870912)!==0&&(u.flags&128)===0&&(Wt(u),u.subtreeFlags&6&&(u.flags|=8192)):Wt(u),f=u.updateQueue,f!==null&&Fp(u,f.retryQueue),f=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==f&&(u.flags|=2048),o!==null&&ue(Zo),null;case 24:return f=null,o!==null&&(f=o.memoizedState.cache),u.memoizedState.cache!==f&&(u.flags|=2048),Bi(Nn),Wt(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function Fz(o,u){switch(Cb(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return Bi(Nn),Je(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return an(u),null;case 13:if(zi(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Sd()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return ue(jn),null;case 4:return Je(),null;case 10:return Bi(u.type),null;case 22:case 23:return zi(u),Ub(),o!==null&&ue(Zo),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return Bi(Nn),null;case 25:return null;default:return null}}function TE(o,u){switch(Cb(u),u.tag){case 3:Bi(Nn),Je();break;case 26:case 27:case 5:an(u);break;case 4:Je();break;case 13:zi(u);break;case 19:ue(jn);break;case 10:Bi(u.type);break;case 22:case 23:zi(u),Ub(),o!==null&&ue(Zo);break;case 24:Bi(Nn)}}function Bd(o,u){try{var f=u.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var w=y.next;f=w;do{if((f.tag&o)===o){y=void 0;var k=f.create,T=f.inst;y=k(),T.destroy=y}f=f.next}while(f!==w)}}catch(R){Rt(u,u.return,R)}}function Ma(o,u,f){try{var y=u.updateQueue,w=y!==null?y.lastEffect:null;if(w!==null){var k=w.next;y=k;do{if((y.tag&o)===o){var T=y.inst,R=T.destroy;if(R!==void 0){T.destroy=void 0,w=u;var U=f,Y=R;try{Y()}catch(ae){Rt(w,U,ae)}}}y=y.next}while(y!==k)}}catch(ae){Rt(u,u.return,ae)}}function AE(o){var u=o.updateQueue;if(u!==null){var f=o.stateNode;try{gj(u,f)}catch(y){Rt(o,o.return,y)}}}function ME(o,u,f){f.props=tl(o.type,o.memoizedProps),f.state=o.memoizedState;try{f.componentWillUnmount()}catch(y){Rt(o,u,y)}}function Fd(o,u){try{var f=o.ref;if(f!==null){switch(o.tag){case 26:case 27:case 5:var y=o.stateNode;break;case 30:y=o.stateNode;break;default:y=o.stateNode}typeof f=="function"?o.refCleanup=f(y):f.current=y}}catch(w){Rt(o,u,w)}}function oi(o,u){var f=o.ref,y=o.refCleanup;if(f!==null)if(typeof y=="function")try{y()}catch(w){Rt(o,u,w)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(w){Rt(o,u,w)}else f.current=null}function OE(o){var u=o.type,f=o.memoizedProps,y=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":f.autoFocus&&y.focus();break e;case"img":f.src?y.src=f.src:f.srcSet&&(y.srcset=f.srcSet)}}catch(w){Rt(o,o.return,w)}}function h0(o,u,f){try{var y=o.stateNode;oq(y,o.type,f,u),y[Ut]=u}catch(w){Rt(o,o.return,w)}}function RE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Ua(o.type)||o.tag===4}function f0(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||RE(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Ua(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function p0(o,u,f){var y=o.tag;if(y===5||y===6)o=o.stateNode,u?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(o,u):(u=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,u.appendChild(o),f=f._reactRootContainer,f!=null||u.onclick!==null||(u.onclick=Jp));else if(y!==4&&(y===27&&Ua(o.type)&&(f=o.stateNode,u=null),o=o.child,o!==null))for(p0(o,u,f),o=o.sibling;o!==null;)p0(o,u,f),o=o.sibling}function zp(o,u,f){var y=o.tag;if(y===5||y===6)o=o.stateNode,u?f.insertBefore(o,u):f.appendChild(o);else if(y!==4&&(y===27&&Ua(o.type)&&(f=o.stateNode),o=o.child,o!==null))for(zp(o,u,f),o=o.sibling;o!==null;)zp(o,u,f),o=o.sibling}function DE(o){var u=o.stateNode,f=o.memoizedProps;try{for(var y=o.type,w=u.attributes;w.length;)u.removeAttributeNode(w[0]);Gn(u,y,f),u[It]=o,u[Ut]=f}catch(k){Rt(o,o.return,k)}}var $i=!1,ln=!1,m0=!1,_E=typeof WeakSet=="function"?WeakSet:Set,In=null;function zz(o,u){if(o=o.containerInfo,B0=im,o=HN(o),fb(o)){if("selectionStart"in o)var f={start:o.selectionStart,end:o.selectionEnd};else e:{f=(f=o.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var w=y.anchorOffset,k=y.focusNode;y=y.focusOffset;try{f.nodeType,k.nodeType}catch{f=null;break e}var T=0,R=-1,U=-1,Y=0,ae=0,ce=o,X=null;t:for(;;){for(var Z;ce!==f||w!==0&&ce.nodeType!==3||(R=T+w),ce!==k||y!==0&&ce.nodeType!==3||(U=T+y),ce.nodeType===3&&(T+=ce.nodeValue.length),(Z=ce.firstChild)!==null;)X=ce,ce=Z;for(;;){if(ce===o)break t;if(X===f&&++Y===w&&(R=T),X===k&&++ae===y&&(U=T),(Z=ce.nextSibling)!==null)break;ce=X,X=ce.parentNode}ce=Z}f=R===-1||U===-1?null:{start:R,end:U}}else f=null}f=f||{start:0,end:0}}else f=null;for(F0={focusedElem:o,selectionRange:f},im=!1,In=u;In!==null;)if(u=In,o=u.child,(u.subtreeFlags&1024)!==0&&o!==null)o.return=u,In=o;else for(;In!==null;){switch(u=In,k=u.alternate,o=u.flags,u.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&k!==null){o=void 0,f=u,w=k.memoizedProps,k=k.memoizedState,y=f.stateNode;try{var He=tl(f.type,w,f.elementType===f.type);o=y.getSnapshotBeforeUpdate(He,k),y.__reactInternalSnapshotBeforeUpdate=o}catch(qe){Rt(f,f.return,qe)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,f=o.nodeType,f===9)V0(o);else if(f===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":V0(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=u.sibling,o!==null){o.return=u.return,In=o;break}In=u.return}}function PE(o,u,f){var y=f.flags;switch(f.tag){case 0:case 11:case 15:Oa(o,f),y&4&&Bd(5,f);break;case 1:if(Oa(o,f),y&4)if(o=f.stateNode,u===null)try{o.componentDidMount()}catch(T){Rt(f,f.return,T)}else{var w=tl(f.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(w,u,o.__reactInternalSnapshotBeforeUpdate)}catch(T){Rt(f,f.return,T)}}y&64&&AE(f),y&512&&Fd(f,f.return);break;case 3:if(Oa(o,f),y&64&&(o=f.updateQueue,o!==null)){if(u=null,f.child!==null)switch(f.child.tag){case 27:case 5:u=f.child.stateNode;break;case 1:u=f.child.stateNode}try{gj(o,u)}catch(T){Rt(f,f.return,T)}}break;case 27:u===null&&y&4&&DE(f);case 26:case 5:Oa(o,f),u===null&&y&4&&OE(f),y&512&&Fd(f,f.return);break;case 12:Oa(o,f);break;case 13:Oa(o,f),y&4&&UE(o,f),y&64&&(o=f.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(f=Qz.bind(null,f),pq(o,f))));break;case 22:if(y=f.memoizedState!==null||$i,!y){u=u!==null&&u.memoizedState!==null||ln,w=$i;var k=ln;$i=y,(ln=u)&&!k?Ra(o,f,(f.subtreeFlags&8772)!==0):Oa(o,f),$i=w,ln=k}break;case 30:break;default:Oa(o,f)}}function LE(o){var u=o.alternate;u!==null&&(o.alternate=null,LE(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&Gx(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Ft=null,Or=!1;function Hi(o,u,f){for(f=f.child;f!==null;)IE(o,u,f),f=f.sibling}function IE(o,u,f){if(Se&&typeof Se.onCommitFiberUnmount=="function")try{Se.onCommitFiberUnmount(pe,f)}catch{}switch(f.tag){case 26:ln||oi(f,u),Hi(o,u,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:ln||oi(f,u);var y=Ft,w=Or;Ua(f.type)&&(Ft=f.stateNode,Or=!1),Hi(o,u,f),Yd(f.stateNode),Ft=y,Or=w;break;case 5:ln||oi(f,u);case 6:if(y=Ft,w=Or,Ft=null,Hi(o,u,f),Ft=y,Or=w,Ft!==null)if(Or)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(f.stateNode)}catch(k){Rt(f,u,k)}else try{Ft.removeChild(f.stateNode)}catch(k){Rt(f,u,k)}break;case 18:Ft!==null&&(Or?(o=Ft,NT(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,f.stateNode),rh(o)):NT(Ft,f.stateNode));break;case 4:y=Ft,w=Or,Ft=f.stateNode.containerInfo,Or=!0,Hi(o,u,f),Ft=y,Or=w;break;case 0:case 11:case 14:case 15:ln||Ma(2,f,u),ln||Ma(4,f,u),Hi(o,u,f);break;case 1:ln||(oi(f,u),y=f.stateNode,typeof y.componentWillUnmount=="function"&&ME(f,u,y)),Hi(o,u,f);break;case 21:Hi(o,u,f);break;case 22:ln=(y=ln)||f.memoizedState!==null,Hi(o,u,f),ln=y;break;default:Hi(o,u,f)}}function UE(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{rh(o)}catch(f){Rt(u,u.return,f)}}function qz(o){switch(o.tag){case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new _E),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new _E),u;default:throw Error(r(435,o.tag))}}function g0(o,u){var f=qz(o);u.forEach(function(y){var w=Xz.bind(null,o,y);f.has(y)||(f.add(y),y.then(w,w))})}function Hr(o,u){var f=u.deletions;if(f!==null)for(var y=0;y<f.length;y++){var w=f[y],k=o,T=u,R=T;e:for(;R!==null;){switch(R.tag){case 27:if(Ua(R.type)){Ft=R.stateNode,Or=!1;break e}break;case 5:Ft=R.stateNode,Or=!1;break e;case 3:case 4:Ft=R.stateNode.containerInfo,Or=!0;break e}R=R.return}if(Ft===null)throw Error(r(160));IE(k,T,w),Ft=null,Or=!1,k=w.alternate,k!==null&&(k.return=null),w.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)BE(u,o),u=u.sibling}var Os=null;function BE(o,u){var f=o.alternate,y=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Hr(u,o),Kr(o),y&4&&(Ma(3,o,o.return),Bd(3,o),Ma(5,o,o.return));break;case 1:Hr(u,o),Kr(o),y&512&&(ln||f===null||oi(f,f.return)),y&64&&$i&&(o=o.updateQueue,o!==null&&(y=o.callbacks,y!==null&&(f=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=f===null?y:f.concat(y))));break;case 26:var w=Os;if(Hr(u,o),Kr(o),y&512&&(ln||f===null||oi(f,f.return)),y&4){var k=f!==null?f.memoizedState:null;if(y=o.memoizedState,f===null)if(y===null)if(o.stateNode===null){e:{y=o.type,f=o.memoizedProps,w=w.ownerDocument||w;t:switch(y){case"title":k=w.getElementsByTagName("title")[0],(!k||k[Ri]||k[It]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=w.createElement(y),w.head.insertBefore(k,w.querySelector("head > title"))),Gn(k,y,f),k[It]=o,Pn(k),y=k;break e;case"link":var T=DT("link","href",w).get(y+(f.href||""));if(T){for(var R=0;R<T.length;R++)if(k=T[R],k.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&k.getAttribute("rel")===(f.rel==null?null:f.rel)&&k.getAttribute("title")===(f.title==null?null:f.title)&&k.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){T.splice(R,1);break t}}k=w.createElement(y),Gn(k,y,f),w.head.appendChild(k);break;case"meta":if(T=DT("meta","content",w).get(y+(f.content||""))){for(R=0;R<T.length;R++)if(k=T[R],k.getAttribute("content")===(f.content==null?null:""+f.content)&&k.getAttribute("name")===(f.name==null?null:f.name)&&k.getAttribute("property")===(f.property==null?null:f.property)&&k.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&k.getAttribute("charset")===(f.charSet==null?null:f.charSet)){T.splice(R,1);break t}}k=w.createElement(y),Gn(k,y,f),w.head.appendChild(k);break;default:throw Error(r(468,y))}k[It]=o,Pn(k),y=k}o.stateNode=y}else _T(w,o.type,o.stateNode);else o.stateNode=RT(w,y,o.memoizedProps);else k!==y?(k===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):k.count--,y===null?_T(w,o.type,o.stateNode):RT(w,y,o.memoizedProps)):y===null&&o.stateNode!==null&&h0(o,o.memoizedProps,f.memoizedProps)}break;case 27:Hr(u,o),Kr(o),y&512&&(ln||f===null||oi(f,f.return)),f!==null&&y&4&&h0(o,o.memoizedProps,f.memoizedProps);break;case 5:if(Hr(u,o),Kr(o),y&512&&(ln||f===null||oi(f,f.return)),o.flags&32){w=o.stateNode;try{uc(w,"")}catch(Z){Rt(o,o.return,Z)}}y&4&&o.stateNode!=null&&(w=o.memoizedProps,h0(o,w,f!==null?f.memoizedProps:w)),y&1024&&(m0=!0);break;case 6:if(Hr(u,o),Kr(o),y&4){if(o.stateNode===null)throw Error(r(162));y=o.memoizedProps,f=o.stateNode;try{f.nodeValue=y}catch(Z){Rt(o,o.return,Z)}}break;case 3:if(nm=null,w=Os,Os=em(u.containerInfo),Hr(u,o),Os=w,Kr(o),y&4&&f!==null&&f.memoizedState.isDehydrated)try{rh(u.containerInfo)}catch(Z){Rt(o,o.return,Z)}m0&&(m0=!1,FE(o));break;case 4:y=Os,Os=em(o.stateNode.containerInfo),Hr(u,o),Kr(o),Os=y;break;case 12:Hr(u,o),Kr(o);break;case 13:Hr(u,o),Kr(o),o.child.flags&8192&&o.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(S0=dr()),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,g0(o,y)));break;case 22:w=o.memoizedState!==null;var U=f!==null&&f.memoizedState!==null,Y=$i,ae=ln;if($i=Y||w,ln=ae||U,Hr(u,o),ln=ae,$i=Y,Kr(o),y&8192)e:for(u=o.stateNode,u._visibility=w?u._visibility&-2:u._visibility|1,w&&(f===null||U||$i||ln||nl(o)),f=null,u=o;;){if(u.tag===5||u.tag===26){if(f===null){U=f=u;try{if(k=U.stateNode,w)T=k.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{R=U.stateNode;var ce=U.memoizedProps.style,X=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;R.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(Z){Rt(U,U.return,Z)}}}else if(u.tag===6){if(f===null){U=u;try{U.stateNode.nodeValue=w?"":U.memoizedProps}catch(Z){Rt(U,U.return,Z)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=o.updateQueue,y!==null&&(f=y.retryQueue,f!==null&&(y.retryQueue=null,g0(o,f))));break;case 19:Hr(u,o),Kr(o),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,g0(o,y)));break;case 30:break;case 21:break;default:Hr(u,o),Kr(o)}}function Kr(o){var u=o.flags;if(u&2){try{for(var f,y=o.return;y!==null;){if(RE(y)){f=y;break}y=y.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var w=f.stateNode,k=f0(o);zp(o,k,w);break;case 5:var T=f.stateNode;f.flags&32&&(uc(T,""),f.flags&=-33);var R=f0(o);zp(o,R,T);break;case 3:case 4:var U=f.stateNode.containerInfo,Y=f0(o);p0(o,Y,U);break;default:throw Error(r(161))}}catch(ae){Rt(o,o.return,ae)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function FE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;FE(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function Oa(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)PE(o,u.alternate,u),u=u.sibling}function nl(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:Ma(4,u,u.return),nl(u);break;case 1:oi(u,u.return);var f=u.stateNode;typeof f.componentWillUnmount=="function"&&ME(u,u.return,f),nl(u);break;case 27:Yd(u.stateNode);case 26:case 5:oi(u,u.return),nl(u);break;case 22:u.memoizedState===null&&nl(u);break;case 30:nl(u);break;default:nl(u)}o=o.sibling}}function Ra(o,u,f){for(f=f&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,w=o,k=u,T=k.flags;switch(k.tag){case 0:case 11:case 15:Ra(w,k,f),Bd(4,k);break;case 1:if(Ra(w,k,f),y=k,w=y.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(Y){Rt(y,y.return,Y)}if(y=k,w=y.updateQueue,w!==null){var R=y.stateNode;try{var U=w.shared.hiddenCallbacks;if(U!==null)for(w.shared.hiddenCallbacks=null,w=0;w<U.length;w++)mj(U[w],R)}catch(Y){Rt(y,y.return,Y)}}f&&T&64&&AE(k),Fd(k,k.return);break;case 27:DE(k);case 26:case 5:Ra(w,k,f),f&&y===null&&T&4&&OE(k),Fd(k,k.return);break;case 12:Ra(w,k,f);break;case 13:Ra(w,k,f),f&&T&4&&UE(w,k);break;case 22:k.memoizedState===null&&Ra(w,k,f),Fd(k,k.return);break;case 30:break;default:Ra(w,k,f)}u=u.sibling}}function y0(o,u){var f=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==f&&(o!=null&&o.refCount++,f!=null&&Nd(f))}function x0(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Nd(o))}function li(o,u,f,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)zE(o,u,f,y),u=u.sibling}function zE(o,u,f,y){var w=u.flags;switch(u.tag){case 0:case 11:case 15:li(o,u,f,y),w&2048&&Bd(9,u);break;case 1:li(o,u,f,y);break;case 3:li(o,u,f,y),w&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Nd(o)));break;case 12:if(w&2048){li(o,u,f,y),o=u.stateNode;try{var k=u.memoizedProps,T=k.id,R=k.onPostCommit;typeof R=="function"&&R(T,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(U){Rt(u,u.return,U)}}else li(o,u,f,y);break;case 13:li(o,u,f,y);break;case 23:break;case 22:k=u.stateNode,T=u.alternate,u.memoizedState!==null?k._visibility&2?li(o,u,f,y):zd(o,u):k._visibility&2?li(o,u,f,y):(k._visibility|=2,Ac(o,u,f,y,(u.subtreeFlags&10256)!==0)),w&2048&&y0(T,u);break;case 24:li(o,u,f,y),w&2048&&x0(u.alternate,u);break;default:li(o,u,f,y)}}function Ac(o,u,f,y,w){for(w=w&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var k=o,T=u,R=f,U=y,Y=T.flags;switch(T.tag){case 0:case 11:case 15:Ac(k,T,R,U,w),Bd(8,T);break;case 23:break;case 22:var ae=T.stateNode;T.memoizedState!==null?ae._visibility&2?Ac(k,T,R,U,w):zd(k,T):(ae._visibility|=2,Ac(k,T,R,U,w)),w&&Y&2048&&y0(T.alternate,T);break;case 24:Ac(k,T,R,U,w),w&&Y&2048&&x0(T.alternate,T);break;default:Ac(k,T,R,U,w)}u=u.sibling}}function zd(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var f=o,y=u,w=y.flags;switch(y.tag){case 22:zd(f,y),w&2048&&y0(y.alternate,y);break;case 24:zd(f,y),w&2048&&x0(y.alternate,y);break;default:zd(f,y)}u=u.sibling}}var qd=8192;function Mc(o){if(o.subtreeFlags&qd)for(o=o.child;o!==null;)qE(o),o=o.sibling}function qE(o){switch(o.tag){case 26:Mc(o),o.flags&qd&&o.memoizedState!==null&&Eq(Os,o.memoizedState,o.memoizedProps);break;case 5:Mc(o);break;case 3:case 4:var u=Os;Os=em(o.stateNode.containerInfo),Mc(o),Os=u;break;case 22:o.memoizedState===null&&(u=o.alternate,u!==null&&u.memoizedState!==null?(u=qd,qd=16777216,Mc(o),qd=u):Mc(o));break;default:Mc(o)}}function VE(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function Vd(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];In=y,HE(y,o)}VE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)$E(o),o=o.sibling}function $E(o){switch(o.tag){case 0:case 11:case 15:Vd(o),o.flags&2048&&Ma(9,o,o.return);break;case 3:Vd(o);break;case 12:Vd(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,qp(o)):Vd(o);break;default:Vd(o)}}function qp(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];In=y,HE(y,o)}VE(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:Ma(8,u,u.return),qp(u);break;case 22:f=u.stateNode,f._visibility&2&&(f._visibility&=-3,qp(u));break;default:qp(u)}o=o.sibling}}function HE(o,u){for(;In!==null;){var f=In;switch(f.tag){case 0:case 11:case 15:Ma(8,f,u);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var y=f.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Nd(f.memoizedState.cache)}if(y=f.child,y!==null)y.return=f,In=y;else e:for(f=o;In!==null;){y=In;var w=y.sibling,k=y.return;if(LE(y),y===f){In=null;break e}if(w!==null){w.return=k,In=w;break e}In=k}}}var Vz={getCacheForType:function(o){var u=sr(Nn),f=u.data.get(o);return f===void 0&&(f=o(),u.data.set(o,f)),f}},$z=typeof WeakMap=="function"?WeakMap:Map,Ct=0,Lt=null,ut=null,gt=0,Nt=0,Wr=null,Da=!1,Oc=!1,b0=!1,Ki=0,tn=0,_a=0,rl=0,v0=0,ds=0,Rc=0,$d=null,Rr=null,w0=!1,S0=0,Vp=1/0,$p=null,Pa=null,Wn=0,La=null,Dc=null,_c=0,k0=0,C0=null,KE=null,Hd=0,N0=null;function Gr(){if((Ct&2)!==0&&gt!==0)return gt&-gt;if($.T!==null){var o=wc;return o!==0?o:R0()}return qr()}function WE(){ds===0&&(ds=(gt&536870912)===0||wt?Fo():536870912);var o=us.current;return o!==null&&(o.flags|=32),ds}function Yr(o,u,f){(o===Lt&&(Nt===2||Nt===9)||o.cancelPendingCommit!==null)&&(Pc(o,0),Ia(o,gt,ds,!1)),Zt(o,f),((Ct&2)===0||o!==Lt)&&(o===Lt&&((Ct&2)===0&&(rl|=f),tn===4&&Ia(o,gt,ds,!1)),ci(o))}function GE(o,u,f){if((Ct&6)!==0)throw Error(r(327));var y=!f&&(u&124)===0&&(u&o.expiredLanes)===0||ri(o,u),w=y?Wz(o,u):T0(o,u,!0),k=y;do{if(w===0){Oc&&!y&&Ia(o,u,0,!1);break}else{if(f=o.current.alternate,k&&!Hz(f)){w=T0(o,u,!1),k=!1;continue}if(w===2){if(k=u,o.errorRecoveryDisabledLanes&k)var T=0;else T=o.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){u=T;e:{var R=o;w=$d;var U=R.current.memoizedState.isDehydrated;if(U&&(Pc(R,T).flags|=256),T=T0(R,T,!1),T!==2){if(b0&&!U){R.errorRecoveryDisabledLanes|=k,rl|=k,w=4;break e}k=Rr,Rr=w,k!==null&&(Rr===null?Rr=k:Rr.push.apply(Rr,k))}w=T}if(k=!1,w!==2)continue}}if(w===1){Pc(o,0),Ia(o,u,0,!0);break}e:{switch(y=o,k=w,k){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:Ia(y,u,ds,!Da);break e;case 2:Rr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(w=S0+300-dr(),10<w)){if(Ia(y,u,ds,!Da),Mi(y,0,!0)!==0)break e;y.timeoutHandle=kT(YE.bind(null,y,f,Rr,$p,w0,u,ds,rl,Rc,Da,k,2,-0,0),w);break e}YE(y,f,Rr,$p,w0,u,ds,rl,Rc,Da,k,0,-0,0)}}break}while(!0);ci(o)}function YE(o,u,f,y,w,k,T,R,U,Y,ae,ce,X,Z){if(o.timeoutHandle=-1,ce=u.subtreeFlags,(ce&8192||(ce&16785408)===16785408)&&(Jd={stylesheets:null,count:0,unsuspend:jq},qE(u),ce=Tq(),ce!==null)){o.cancelPendingCommit=ce(nT.bind(null,o,u,k,f,y,w,T,R,U,ae,1,X,Z)),Ia(o,k,T,!Y);return}nT(o,u,k,f,y,w,T,R,U)}function Hz(o){for(var u=o;;){var f=u.tag;if((f===0||f===11||f===15)&&u.flags&16384&&(f=u.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var y=0;y<f.length;y++){var w=f[y],k=w.getSnapshot;w=w.value;try{if(!Vr(k(),w))return!1}catch{return!1}}if(f=u.child,u.subtreeFlags&16384&&f!==null)f.return=u,u=f;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Ia(o,u,f,y){u&=~v0,u&=~rl,o.suspendedLanes|=u,o.pingedLanes&=~u,y&&(o.warmLanes|=u),y=o.expirationTimes;for(var w=u;0<w;){var k=31-$e(w),T=1<<k;y[k]=-1,w&=~T}f!==0&&tr(o,f,u)}function Hp(){return(Ct&6)===0?(Kd(0),!1):!0}function j0(){if(ut!==null){if(Nt===0)var o=ut.return;else o=ut,Ui=Xo=null,Vb(o),Ec=null,Ld=0,o=ut;for(;o!==null;)TE(o.alternate,o),o=o.return;ut=null}}function Pc(o,u){var f=o.timeoutHandle;f!==-1&&(o.timeoutHandle=-1,cq(f)),f=o.cancelPendingCommit,f!==null&&(o.cancelPendingCommit=null,f()),j0(),Lt=o,ut=f=Pi(o.current,null),gt=u,Nt=0,Wr=null,Da=!1,Oc=ri(o,u),b0=!1,Rc=ds=v0=rl=_a=tn=0,Rr=$d=null,w0=!1,(u&8)!==0&&(u|=u&32);var y=o.entangledLanes;if(y!==0)for(o=o.entanglements,y&=u;0<y;){var w=31-$e(y),k=1<<w;u|=o[w],y&=~k}return Ki=u,fp(),f}function QE(o,u){it=null,$.H=Rp,u===Ed||u===Sp?(u=fj(),Nt=3):u===uj?(u=fj(),Nt=4):Nt=u===pE?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Wr=u,ut===null&&(tn=1,Ip(o,is(u,o.current)))}function XE(){var o=$.H;return $.H=Rp,o===null?Rp:o}function JE(){var o=$.A;return $.A=Vz,o}function E0(){tn=4,Da||(gt&4194048)!==gt&&us.current!==null||(Oc=!0),(_a&134217727)===0&&(rl&134217727)===0||Lt===null||Ia(Lt,gt,ds,!1)}function T0(o,u,f){var y=Ct;Ct|=2;var w=XE(),k=JE();(Lt!==o||gt!==u)&&($p=null,Pc(o,u)),u=!1;var T=tn;e:do try{if(Nt!==0&&ut!==null){var R=ut,U=Wr;switch(Nt){case 8:j0(),T=6;break e;case 3:case 2:case 9:case 6:us.current===null&&(u=!0);var Y=Nt;if(Nt=0,Wr=null,Lc(o,R,U,Y),f&&Oc){T=0;break e}break;default:Y=Nt,Nt=0,Wr=null,Lc(o,R,U,Y)}}Kz(),T=tn;break}catch(ae){QE(o,ae)}while(!0);return u&&o.shellSuspendCounter++,Ui=Xo=null,Ct=y,$.H=w,$.A=k,ut===null&&(Lt=null,gt=0,fp()),T}function Kz(){for(;ut!==null;)ZE(ut)}function Wz(o,u){var f=Ct;Ct|=2;var y=XE(),w=JE();Lt!==o||gt!==u?($p=null,Vp=dr()+500,Pc(o,u)):Oc=ri(o,u);e:do try{if(Nt!==0&&ut!==null){u=ut;var k=Wr;t:switch(Nt){case 1:Nt=0,Wr=null,Lc(o,u,k,1);break;case 2:case 9:if(dj(k)){Nt=0,Wr=null,eT(u);break}u=function(){Nt!==2&&Nt!==9||Lt!==o||(Nt=7),ci(o)},k.then(u,u);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:dj(k)?(Nt=0,Wr=null,eT(u)):(Nt=0,Wr=null,Lc(o,u,k,7));break;case 5:var T=null;switch(ut.tag){case 26:T=ut.memoizedState;case 5:case 27:var R=ut;if(!T||PT(T)){Nt=0,Wr=null;var U=R.sibling;if(U!==null)ut=U;else{var Y=R.return;Y!==null?(ut=Y,Kp(Y)):ut=null}break t}}Nt=0,Wr=null,Lc(o,u,k,5);break;case 6:Nt=0,Wr=null,Lc(o,u,k,6);break;case 8:j0(),tn=6;break e;default:throw Error(r(462))}}Gz();break}catch(ae){QE(o,ae)}while(!0);return Ui=Xo=null,$.H=y,$.A=w,Ct=f,ut!==null?0:(Lt=null,gt=0,fp(),tn)}function Gz(){for(;ut!==null&&!Es();)ZE(ut)}function ZE(o){var u=jE(o.alternate,o,Ki);o.memoizedProps=o.pendingProps,u===null?Kp(o):ut=u}function eT(o){var u=o,f=u.alternate;switch(u.tag){case 15:case 0:u=vE(f,u,u.pendingProps,u.type,void 0,gt);break;case 11:u=vE(f,u,u.pendingProps,u.type.render,u.ref,gt);break;case 5:Vb(u);default:TE(f,u),u=ut=tj(u,Ki),u=jE(f,u,Ki)}o.memoizedProps=o.pendingProps,u===null?Kp(o):ut=u}function Lc(o,u,f,y){Ui=Xo=null,Vb(u),Ec=null,Ld=0;var w=u.return;try{if(Iz(o,w,u,f,gt)){tn=1,Ip(o,is(f,o.current)),ut=null;return}}catch(k){if(w!==null)throw ut=w,k;tn=1,Ip(o,is(f,o.current)),ut=null;return}u.flags&32768?(wt||y===1?o=!0:Oc||(gt&536870912)!==0?o=!1:(Da=o=!0,(y===2||y===9||y===3||y===6)&&(y=us.current,y!==null&&y.tag===13&&(y.flags|=16384))),tT(u,o)):Kp(u)}function Kp(o){var u=o;do{if((u.flags&32768)!==0){tT(u,Da);return}o=u.return;var f=Bz(u.alternate,u,Ki);if(f!==null){ut=f;return}if(u=u.sibling,u!==null){ut=u;return}ut=u=o}while(u!==null);tn===0&&(tn=5)}function tT(o,u){do{var f=Fz(o.alternate,o);if(f!==null){f.flags&=32767,ut=f;return}if(f=o.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!u&&(o=o.sibling,o!==null)){ut=o;return}ut=o=f}while(o!==null);tn=6,ut=null}function nT(o,u,f,y,w,k,T,R,U){o.cancelPendingCommit=null;do Wp();while(Wn!==0);if((Ct&6)!==0)throw Error(r(327));if(u!==null){if(u===o.current)throw Error(r(177));if(k=u.lanes|u.childLanes,k|=xb,fr(o,f,k,T,R,U),o===Lt&&(ut=Lt=null,gt=0),Dc=u,La=o,_c=f,k0=k,C0=w,KE=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,Jz(F,function(){return oT(),null})):(o.callbackNode=null,o.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=$.T,$.T=null,w=Q.p,Q.p=2,T=Ct,Ct|=4;try{zz(o,u,f)}finally{Ct=T,Q.p=w,$.T=y}}Wn=1,rT(),sT(),iT()}}function rT(){if(Wn===1){Wn=0;var o=La,u=Dc,f=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||f){f=$.T,$.T=null;var y=Q.p;Q.p=2;var w=Ct;Ct|=4;try{BE(u,o);var k=F0,T=HN(o.containerInfo),R=k.focusedElem,U=k.selectionRange;if(T!==R&&R&&R.ownerDocument&&$N(R.ownerDocument.documentElement,R)){if(U!==null&&fb(R)){var Y=U.start,ae=U.end;if(ae===void 0&&(ae=Y),"selectionStart"in R)R.selectionStart=Y,R.selectionEnd=Math.min(ae,R.value.length);else{var ce=R.ownerDocument||document,X=ce&&ce.defaultView||window;if(X.getSelection){var Z=X.getSelection(),He=R.textContent.length,qe=Math.min(U.start,He),Mt=U.end===void 0?qe:Math.min(U.end,He);!Z.extend&&qe>Mt&&(T=Mt,Mt=qe,qe=T);var H=VN(R,qe),q=VN(R,Mt);if(H&&q&&(Z.rangeCount!==1||Z.anchorNode!==H.node||Z.anchorOffset!==H.offset||Z.focusNode!==q.node||Z.focusOffset!==q.offset)){var G=ce.createRange();G.setStart(H.node,H.offset),Z.removeAllRanges(),qe>Mt?(Z.addRange(G),Z.extend(q.node,q.offset)):(G.setEnd(q.node,q.offset),Z.addRange(G))}}}}for(ce=[],Z=R;Z=Z.parentNode;)Z.nodeType===1&&ce.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ce.length;R++){var oe=ce[R];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}im=!!B0,F0=B0=null}finally{Ct=w,Q.p=y,$.T=f}}o.current=u,Wn=2}}function sT(){if(Wn===2){Wn=0;var o=La,u=Dc,f=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||f){f=$.T,$.T=null;var y=Q.p;Q.p=2;var w=Ct;Ct|=4;try{PE(o,u.alternate,u)}finally{Ct=w,Q.p=y,$.T=f}}Wn=3}}function iT(){if(Wn===4||Wn===3){Wn=0,Ts();var o=La,u=Dc,f=_c,y=KE;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Wn=5:(Wn=0,Dc=La=null,aT(o,o.pendingLanes));var w=o.pendingLanes;if(w===0&&(Pa=null),Hn(f),u=u.stateNode,Se&&typeof Se.onCommitFiberRoot=="function")try{Se.onCommitFiberRoot(pe,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=$.T,w=Q.p,Q.p=2,$.T=null;try{for(var k=o.onRecoverableError,T=0;T<y.length;T++){var R=y[T];k(R.value,{componentStack:R.stack})}}finally{$.T=u,Q.p=w}}(_c&3)!==0&&Wp(),ci(o),w=o.pendingLanes,(f&4194090)!==0&&(w&42)!==0?o===N0?Hd++:(Hd=0,N0=o):Hd=0,Kd(0)}}function aT(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,Nd(u)))}function Wp(o){return rT(),sT(),iT(),oT()}function oT(){if(Wn!==5)return!1;var o=La,u=k0;k0=0;var f=Hn(_c),y=$.T,w=Q.p;try{Q.p=32>f?32:f,$.T=null,f=C0,C0=null;var k=La,T=_c;if(Wn=0,Dc=La=null,_c=0,(Ct&6)!==0)throw Error(r(331));var R=Ct;if(Ct|=4,$E(k.current),zE(k,k.current,T,f),Ct=R,Kd(0,!1),Se&&typeof Se.onPostCommitFiberRoot=="function")try{Se.onPostCommitFiberRoot(pe,k)}catch{}return!0}finally{Q.p=w,$.T=y,aT(o,u)}}function lT(o,u,f){u=is(f,u),u=r0(o.stateNode,u,2),o=ja(o,u,2),o!==null&&(Zt(o,2),ci(o))}function Rt(o,u,f){if(o.tag===3)lT(o,o,f);else for(;u!==null;){if(u.tag===3){lT(u,o,f);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Pa===null||!Pa.has(y))){o=is(f,o),f=hE(2),y=ja(u,f,2),y!==null&&(fE(f,y,u,o),Zt(y,2),ci(y));break}}u=u.return}}function A0(o,u,f){var y=o.pingCache;if(y===null){y=o.pingCache=new $z;var w=new Set;y.set(u,w)}else w=y.get(u),w===void 0&&(w=new Set,y.set(u,w));w.has(f)||(b0=!0,w.add(f),o=Yz.bind(null,o,u,f),u.then(o,o))}function Yz(o,u,f){var y=o.pingCache;y!==null&&y.delete(u),o.pingedLanes|=o.suspendedLanes&f,o.warmLanes&=~f,Lt===o&&(gt&f)===f&&(tn===4||tn===3&&(gt&62914560)===gt&&300>dr()-S0?(Ct&2)===0&&Pc(o,0):v0|=f,Rc===gt&&(Rc=0)),ci(o)}function cT(o,u){u===0&&(u=tp()),o=yc(o,u),o!==null&&(Zt(o,u),ci(o))}function Qz(o){var u=o.memoizedState,f=0;u!==null&&(f=u.retryLane),cT(o,f)}function Xz(o,u){var f=0;switch(o.tag){case 13:var y=o.stateNode,w=o.memoizedState;w!==null&&(f=w.retryLane);break;case 19:y=o.stateNode;break;case 22:y=o.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),cT(o,f)}function Jz(o,u){return Jt(o,u)}var Gp=null,Ic=null,M0=!1,Yp=!1,O0=!1,sl=0;function ci(o){o!==Ic&&o.next===null&&(Ic===null?Gp=Ic=o:Ic=Ic.next=o),Yp=!0,M0||(M0=!0,eq())}function Kd(o,u){if(!O0&&Yp){O0=!0;do for(var f=!1,y=Gp;y!==null;){if(o!==0){var w=y.pendingLanes;if(w===0)var k=0;else{var T=y.suspendedLanes,R=y.pingedLanes;k=(1<<31-$e(42|o)+1)-1,k&=w&~(T&~R),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(f=!0,fT(y,k))}else k=gt,k=Mi(y,y===Lt?k:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(k&3)===0||ri(y,k)||(f=!0,fT(y,k));y=y.next}while(f);O0=!1}}function Zz(){uT()}function uT(){Yp=M0=!1;var o=0;sl!==0&&(lq()&&(o=sl),sl=0);for(var u=dr(),f=null,y=Gp;y!==null;){var w=y.next,k=dT(y,u);k===0?(y.next=null,f===null?Gp=w:f.next=w,w===null&&(Ic=f)):(f=y,(o!==0||(k&3)!==0)&&(Yp=!0)),y=w}Kd(o)}function dT(o,u){for(var f=o.suspendedLanes,y=o.pingedLanes,w=o.expirationTimes,k=o.pendingLanes&-62914561;0<k;){var T=31-$e(k),R=1<<T,U=w[T];U===-1?((R&f)===0||(R&y)!==0)&&(w[T]=rc(R,u)):U<=u&&(o.expiredLanes|=R),k&=~R}if(u=Lt,f=gt,f=Mi(o,o===u?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y=o.callbackNode,f===0||o===u&&(Nt===2||Nt===9)||o.cancelPendingCommit!==null)return y!==null&&y!==null&&dn(y),o.callbackNode=null,o.callbackPriority=0;if((f&3)===0||ri(o,f)){if(u=f&-f,u===o.callbackPriority)return u;switch(y!==null&&dn(y),Hn(f)){case 2:case 8:f=Tr;break;case 32:f=F;break;case 268435456:f=ne;break;default:f=F}return y=hT.bind(null,o),f=Jt(f,y),o.callbackPriority=u,o.callbackNode=f,u}return y!==null&&y!==null&&dn(y),o.callbackPriority=2,o.callbackNode=null,2}function hT(o,u){if(Wn!==0&&Wn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var f=o.callbackNode;if(Wp()&&o.callbackNode!==f)return null;var y=gt;return y=Mi(o,o===Lt?y:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y===0?null:(GE(o,y,u),dT(o,dr()),o.callbackNode!=null&&o.callbackNode===f?hT.bind(null,o):null)}function fT(o,u){if(Wp())return null;GE(o,u,!0)}function eq(){uq(function(){(Ct&6)!==0?Jt(Bo,Zz):uT()})}function R0(){return sl===0&&(sl=Fo()),sl}function pT(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:ap(""+o)}function mT(o,u){var f=u.ownerDocument.createElement("input");return f.name=u.name,f.value=u.value,o.id&&f.setAttribute("form",o.id),u.parentNode.insertBefore(f,u),o=new FormData(o),f.parentNode.removeChild(f),o}function tq(o,u,f,y,w){if(u==="submit"&&f&&f.stateNode===w){var k=pT((w[Ut]||null).action),T=y.submitter;T&&(u=(u=T[Ut]||null)?pT(u.formAction):T.getAttribute("formAction"),u!==null&&(k=u,T=null));var R=new up("action","action",null,y,w);o.push({event:R,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(sl!==0){var U=T?mT(w,T):new FormData(w);Jb(f,{pending:!0,data:U,method:w.method,action:k},null,U)}}else typeof k=="function"&&(R.preventDefault(),U=T?mT(w,T):new FormData(w),Jb(f,{pending:!0,data:U,method:w.method,action:k},k,U))},currentTarget:w}]})}}for(var D0=0;D0<yb.length;D0++){var _0=yb[D0],nq=_0.toLowerCase(),rq=_0[0].toUpperCase()+_0.slice(1);Ms(nq,"on"+rq)}Ms(GN,"onAnimationEnd"),Ms(YN,"onAnimationIteration"),Ms(QN,"onAnimationStart"),Ms("dblclick","onDoubleClick"),Ms("focusin","onFocus"),Ms("focusout","onBlur"),Ms(vz,"onTransitionRun"),Ms(wz,"onTransitionStart"),Ms(Sz,"onTransitionCancel"),Ms(XN,"onTransitionEnd"),oc("onMouseEnter",["mouseout","mouseover"]),oc("onMouseLeave",["mouseout","mouseover"]),oc("onPointerEnter",["pointerout","pointerover"]),oc("onPointerLeave",["pointerout","pointerover"]),qo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qo("onBeforeInput",["compositionend","keypress","textInput","paste"]),qo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wd="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(" "),sq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wd));function gT(o,u){u=(u&4)!==0;for(var f=0;f<o.length;f++){var y=o[f],w=y.event;y=y.listeners;e:{var k=void 0;if(u)for(var T=y.length-1;0<=T;T--){var R=y[T],U=R.instance,Y=R.currentTarget;if(R=R.listener,U!==k&&w.isPropagationStopped())break e;k=R,w.currentTarget=Y;try{k(w)}catch(ae){Lp(ae)}w.currentTarget=null,k=U}else for(T=0;T<y.length;T++){if(R=y[T],U=R.instance,Y=R.currentTarget,R=R.listener,U!==k&&w.isPropagationStopped())break e;k=R,w.currentTarget=Y;try{k(w)}catch(ae){Lp(ae)}w.currentTarget=null,k=U}}}}function dt(o,u){var f=u[Oi];f===void 0&&(f=u[Oi]=new Set);var y=o+"__bubble";f.has(y)||(yT(u,o,2,!1),f.add(y))}function P0(o,u,f){var y=0;u&&(y|=4),yT(f,o,y,u)}var Qp="_reactListening"+Math.random().toString(36).slice(2);function L0(o){if(!o[Qp]){o[Qp]=!0,uN.forEach(function(f){f!=="selectionchange"&&(sq.has(f)||P0(f,!1,o),P0(f,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[Qp]||(u[Qp]=!0,P0("selectionchange",!1,u))}}function yT(o,u,f,y){switch(zT(u)){case 2:var w=Oq;break;case 8:w=Rq;break;default:w=Q0}f=w.bind(null,u,f,o),w=void 0,!sb||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(w=!0),y?w!==void 0?o.addEventListener(u,f,{capture:!0,passive:w}):o.addEventListener(u,f,!0):w!==void 0?o.addEventListener(u,f,{passive:w}):o.addEventListener(u,f,!1)}function I0(o,u,f,y,w){var k=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var T=y.tag;if(T===3||T===4){var R=y.stateNode.containerInfo;if(R===w)break;if(T===4)for(T=y.return;T!==null;){var U=T.tag;if((U===3||U===4)&&T.stateNode.containerInfo===w)return;T=T.return}for(;R!==null;){if(T=sc(R),T===null)return;if(U=T.tag,U===5||U===6||U===26||U===27){y=k=T;continue e}R=R.parentNode}}y=y.return}CN(function(){var Y=k,ae=nb(f),ce=[];e:{var X=JN.get(o);if(X!==void 0){var Z=up,He=o;switch(o){case"keypress":if(lp(f)===0)break e;case"keydown":case"keyup":Z=JF;break;case"focusin":He="focus",Z=lb;break;case"focusout":He="blur",Z=lb;break;case"beforeblur":case"afterblur":Z=lb;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=EN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=FF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=tz;break;case GN:case YN:case QN:Z=VF;break;case XN:Z=rz;break;case"scroll":case"scrollend":Z=UF;break;case"wheel":Z=iz;break;case"copy":case"cut":case"paste":Z=HF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=AN;break;case"toggle":case"beforetoggle":Z=oz}var qe=(u&4)!==0,Mt=!qe&&(o==="scroll"||o==="scrollend"),H=qe?X!==null?X+"Capture":null:X;qe=[];for(var q=Y,G;q!==null;){var oe=q;if(G=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||G===null||H===null||(oe=hd(q,H),oe!=null&&qe.push(Gd(q,oe,G))),Mt)break;q=q.return}0<qe.length&&(X=new Z(X,He,null,f,ae),ce.push({event:X,listeners:qe}))}}if((u&7)===0){e:{if(X=o==="mouseover"||o==="pointerover",Z=o==="mouseout"||o==="pointerout",X&&f!==tb&&(He=f.relatedTarget||f.fromElement)&&(sc(He)||He[rr]))break e;if((Z||X)&&(X=ae.window===ae?ae:(X=ae.ownerDocument)?X.defaultView||X.parentWindow:window,Z?(He=f.relatedTarget||f.toElement,Z=Y,He=He?sc(He):null,He!==null&&(Mt=i(He),qe=He.tag,He!==Mt||qe!==5&&qe!==27&&qe!==6)&&(He=null)):(Z=null,He=Y),Z!==He)){if(qe=EN,oe="onMouseLeave",H="onMouseEnter",q="mouse",(o==="pointerout"||o==="pointerover")&&(qe=AN,oe="onPointerLeave",H="onPointerEnter",q="pointer"),Mt=Z==null?X:dd(Z),G=He==null?X:dd(He),X=new qe(oe,q+"leave",Z,f,ae),X.target=Mt,X.relatedTarget=G,oe=null,sc(ae)===Y&&(qe=new qe(H,q+"enter",He,f,ae),qe.target=G,qe.relatedTarget=Mt,oe=qe),Mt=oe,Z&&He)t:{for(qe=Z,H=He,q=0,G=qe;G;G=Uc(G))q++;for(G=0,oe=H;oe;oe=Uc(oe))G++;for(;0<q-G;)qe=Uc(qe),q--;for(;0<G-q;)H=Uc(H),G--;for(;q--;){if(qe===H||H!==null&&qe===H.alternate)break t;qe=Uc(qe),H=Uc(H)}qe=null}else qe=null;Z!==null&&xT(ce,X,Z,qe,!1),He!==null&&Mt!==null&&xT(ce,Mt,He,qe,!0)}}e:{if(X=Y?dd(Y):window,Z=X.nodeName&&X.nodeName.toLowerCase(),Z==="select"||Z==="input"&&X.type==="file")var Te=IN;else if(PN(X))if(UN)Te=yz;else{Te=mz;var ct=pz}else Z=X.nodeName,!Z||Z.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&eb(Y.elementType)&&(Te=IN):Te=gz;if(Te&&(Te=Te(o,Y))){LN(ce,Te,f,ae);break e}ct&&ct(o,X,Y),o==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&Zx(X,"number",X.value)}switch(ct=Y?dd(Y):window,o){case"focusin":(PN(ct)||ct.contentEditable==="true")&&(pc=ct,pb=Y,vd=null);break;case"focusout":vd=pb=pc=null;break;case"mousedown":mb=!0;break;case"contextmenu":case"mouseup":case"dragend":mb=!1,KN(ce,f,ae);break;case"selectionchange":if(bz)break;case"keydown":case"keyup":KN(ce,f,ae)}var Le;if(ub)e:{switch(o){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else fc?DN(o,f)&&(Ve="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(Ve="onCompositionStart");Ve&&(MN&&f.locale!=="ko"&&(fc||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&fc&&(Le=NN()):(Sa=ae,ib="value"in Sa?Sa.value:Sa.textContent,fc=!0)),ct=Xp(Y,Ve),0<ct.length&&(Ve=new TN(Ve,o,null,f,ae),ce.push({event:Ve,listeners:ct}),Le?Ve.data=Le:(Le=_N(f),Le!==null&&(Ve.data=Le)))),(Le=cz?uz(o,f):dz(o,f))&&(Ve=Xp(Y,"onBeforeInput"),0<Ve.length&&(ct=new TN("onBeforeInput","beforeinput",null,f,ae),ce.push({event:ct,listeners:Ve}),ct.data=Le)),tq(ce,o,Y,f,ae)}gT(ce,u)})}function Gd(o,u,f){return{instance:o,listener:u,currentTarget:f}}function Xp(o,u){for(var f=u+"Capture",y=[];o!==null;){var w=o,k=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||k===null||(w=hd(o,f),w!=null&&y.unshift(Gd(o,w,k)),w=hd(o,u),w!=null&&y.push(Gd(o,w,k))),o.tag===3)return y;o=o.return}return[]}function Uc(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function xT(o,u,f,y,w){for(var k=u._reactName,T=[];f!==null&&f!==y;){var R=f,U=R.alternate,Y=R.stateNode;if(R=R.tag,U!==null&&U===y)break;R!==5&&R!==26&&R!==27||Y===null||(U=Y,w?(Y=hd(f,k),Y!=null&&T.unshift(Gd(f,Y,U))):w||(Y=hd(f,k),Y!=null&&T.push(Gd(f,Y,U)))),f=f.return}T.length!==0&&o.push({event:u,listeners:T})}var iq=/\r\n?/g,aq=/\u0000|\uFFFD/g;function bT(o){return(typeof o=="string"?o:""+o).replace(iq,`
9`).replace(aq,"")}function vT(o,u){return u=bT(u),bT(o)===u}function Jp(){}function At(o,u,f,y,w,k){switch(f){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||uc(o,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&uc(o,""+y);break;case"className":rp(o,"class",y);break;case"tabIndex":rp(o,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":rp(o,f,y);break;case"style":SN(o,y,k);break;case"data":if(u!=="object"){rp(o,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||f!=="href")){o.removeAttribute(f);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(f);break}y=ap(""+y),o.setAttribute(f,y);break;case"action":case"formAction":if(typeof y=="function"){o.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(f==="formAction"?(u!=="input"&&At(o,u,"name",w.name,w,null),At(o,u,"formEncType",w.formEncType,w,null),At(o,u,"formMethod",w.formMethod,w,null),At(o,u,"formTarget",w.formTarget,w,null)):(At(o,u,"encType",w.encType,w,null),At(o,u,"method",w.method,w,null),At(o,u,"target",w.target,w,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(f);break}y=ap(""+y),o.setAttribute(f,y);break;case"onClick":y!=null&&(o.onclick=Jp);break;case"onScroll":y!=null&&dt("scroll",o);break;case"onScrollEnd":y!=null&&dt("scrollend",o);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(f=y.__html,f!=null){if(w.children!=null)throw Error(r(60));o.innerHTML=f}}break;case"multiple":o.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":o.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){o.removeAttribute("xlink:href");break}f=ap(""+y),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(f,""+y):o.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(f,""):o.removeAttribute(f);break;case"capture":case"download":y===!0?o.setAttribute(f,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(f,y):o.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?o.setAttribute(f,y):o.removeAttribute(f);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?o.removeAttribute(f):o.setAttribute(f,y);break;case"popover":dt("beforetoggle",o),dt("toggle",o),np(o,"popover",y);break;case"xlinkActuate":Di(o,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Di(o,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Di(o,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Di(o,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Di(o,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Di(o,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Di(o,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Di(o,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Di(o,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":np(o,"is",y);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=LF.get(f)||f,np(o,f,y))}}function U0(o,u,f,y,w,k){switch(f){case"style":SN(o,y,k);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(f=y.__html,f!=null){if(w.children!=null)throw Error(r(60));o.innerHTML=f}}break;case"children":typeof y=="string"?uc(o,y):(typeof y=="number"||typeof y=="bigint")&&uc(o,""+y);break;case"onScroll":y!=null&&dt("scroll",o);break;case"onScrollEnd":y!=null&&dt("scrollend",o);break;case"onClick":y!=null&&(o.onclick=Jp);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dN.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(w=f.endsWith("Capture"),u=f.slice(2,w?f.length-7:void 0),k=o[Ut]||null,k=k!=null?k[f]:null,typeof k=="function"&&o.removeEventListener(u,k,w),typeof y=="function")){typeof k!="function"&&k!==null&&(f in o?o[f]=null:o.hasAttribute(f)&&o.removeAttribute(f)),o.addEventListener(u,y,w);break e}f in o?o[f]=y:y===!0?o.setAttribute(f,""):np(o,f,y)}}}function Gn(o,u,f){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dt("error",o),dt("load",o);var y=!1,w=!1,k;for(k in f)if(f.hasOwnProperty(k)){var T=f[k];if(T!=null)switch(k){case"src":y=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:At(o,u,k,T,f,null)}}w&&At(o,u,"srcSet",f.srcSet,f,null),y&&At(o,u,"src",f.src,f,null);return;case"input":dt("invalid",o);var R=k=T=w=null,U=null,Y=null;for(y in f)if(f.hasOwnProperty(y)){var ae=f[y];if(ae!=null)switch(y){case"name":w=ae;break;case"type":T=ae;break;case"checked":U=ae;break;case"defaultChecked":Y=ae;break;case"value":k=ae;break;case"defaultValue":R=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,u));break;default:At(o,u,y,ae,f,null)}}xN(o,k,R,U,Y,T,w,!1),sp(o);return;case"select":dt("invalid",o),y=T=k=null;for(w in f)if(f.hasOwnProperty(w)&&(R=f[w],R!=null))switch(w){case"value":k=R;break;case"defaultValue":T=R;break;case"multiple":y=R;default:At(o,u,w,R,f,null)}u=k,f=T,o.multiple=!!y,u!=null?cc(o,!!y,u,!1):f!=null&&cc(o,!!y,f,!0);return;case"textarea":dt("invalid",o),k=w=y=null;for(T in f)if(f.hasOwnProperty(T)&&(R=f[T],R!=null))switch(T){case"value":y=R;break;case"defaultValue":w=R;break;case"children":k=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:At(o,u,T,R,f,null)}vN(o,y,w,k),sp(o);return;case"option":for(U in f)f.hasOwnProperty(U)&&(y=f[U],y!=null)&&(U==="selected"?o.selected=y&&typeof y!="function"&&typeof y!="symbol":At(o,u,U,y,f,null));return;case"dialog":dt("beforetoggle",o),dt("toggle",o),dt("cancel",o),dt("close",o);break;case"iframe":case"object":dt("load",o);break;case"video":case"audio":for(y=0;y<Wd.length;y++)dt(Wd[y],o);break;case"image":dt("error",o),dt("load",o);break;case"details":dt("toggle",o);break;case"embed":case"source":case"link":dt("error",o),dt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in f)if(f.hasOwnProperty(Y)&&(y=f[Y],y!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:At(o,u,Y,y,f,null)}return;default:if(eb(u)){for(ae in f)f.hasOwnProperty(ae)&&(y=f[ae],y!==void 0&&U0(o,u,ae,y,f,void 0));return}}for(R in f)f.hasOwnProperty(R)&&(y=f[R],y!=null&&At(o,u,R,y,f,null))}function oq(o,u,f,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,k=null,T=null,R=null,U=null,Y=null,ae=null;for(Z in f){var ce=f[Z];if(f.hasOwnProperty(Z)&&ce!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":U=ce;default:y.hasOwnProperty(Z)||At(o,u,Z,null,y,ce)}}for(var X in y){var Z=y[X];if(ce=f[X],y.hasOwnProperty(X)&&(Z!=null||ce!=null))switch(X){case"type":k=Z;break;case"name":w=Z;break;case"checked":Y=Z;break;case"defaultChecked":ae=Z;break;case"value":T=Z;break;case"defaultValue":R=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,u));break;default:Z!==ce&&At(o,u,X,Z,y,ce)}}Jx(o,T,R,U,Y,ae,k,w);return;case"select":Z=T=R=X=null;for(k in f)if(U=f[k],f.hasOwnProperty(k)&&U!=null)switch(k){case"value":break;case"multiple":Z=U;default:y.hasOwnProperty(k)||At(o,u,k,null,y,U)}for(w in y)if(k=y[w],U=f[w],y.hasOwnProperty(w)&&(k!=null||U!=null))switch(w){case"value":X=k;break;case"defaultValue":R=k;break;case"multiple":T=k;default:k!==U&&At(o,u,w,k,y,U)}u=R,f=T,y=Z,X!=null?cc(o,!!f,X,!1):!!y!=!!f&&(u!=null?cc(o,!!f,u,!0):cc(o,!!f,f?[]:"",!1));return;case"textarea":Z=X=null;for(R in f)if(w=f[R],f.hasOwnProperty(R)&&w!=null&&!y.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:At(o,u,R,null,y,w)}for(T in y)if(w=y[T],k=f[T],y.hasOwnProperty(T)&&(w!=null||k!=null))switch(T){case"value":X=w;break;case"defaultValue":Z=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:w!==k&&At(o,u,T,w,y,k)}bN(o,X,Z);return;case"option":for(var He in f)X=f[He],f.hasOwnProperty(He)&&X!=null&&!y.hasOwnProperty(He)&&(He==="selected"?o.selected=!1:At(o,u,He,null,y,X));for(U in y)X=y[U],Z=f[U],y.hasOwnProperty(U)&&X!==Z&&(X!=null||Z!=null)&&(U==="selected"?o.selected=X&&typeof X!="function"&&typeof X!="symbol":At(o,u,U,X,y,Z));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var qe in f)X=f[qe],f.hasOwnProperty(qe)&&X!=null&&!y.hasOwnProperty(qe)&&At(o,u,qe,null,y,X);for(Y in y)if(X=y[Y],Z=f[Y],y.hasOwnProperty(Y)&&X!==Z&&(X!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,u));break;default:At(o,u,Y,X,y,Z)}return;default:if(eb(u)){for(var Mt in f)X=f[Mt],f.hasOwnProperty(Mt)&&X!==void 0&&!y.hasOwnProperty(Mt)&&U0(o,u,Mt,void 0,y,X);for(ae in y)X=y[ae],Z=f[ae],!y.hasOwnProperty(ae)||X===Z||X===void 0&&Z===void 0||U0(o,u,ae,X,y,Z);return}}for(var H in f)X=f[H],f.hasOwnProperty(H)&&X!=null&&!y.hasOwnProperty(H)&&At(o,u,H,null,y,X);for(ce in y)X=y[ce],Z=f[ce],!y.hasOwnProperty(ce)||X===Z||X==null&&Z==null||At(o,u,ce,X,y,Z)}var B0=null,F0=null;function Zp(o){return o.nodeType===9?o:o.ownerDocument}function wT(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ST(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function z0(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var q0=null;function lq(){var o=window.event;return o&&o.type==="popstate"?o===q0?!1:(q0=o,!0):(q0=null,!1)}var kT=typeof setTimeout=="function"?setTimeout:void 0,cq=typeof clearTimeout=="function"?clearTimeout:void 0,CT=typeof Promise=="function"?Promise:void 0,uq=typeof queueMicrotask=="function"?queueMicrotask:typeof CT<"u"?function(o){return CT.resolve(null).then(o).catch(dq)}:kT;function dq(o){setTimeout(function(){throw o})}function Ua(o){return o==="head"}function NT(o,u){var f=u,y=0,w=0;do{var k=f.nextSibling;if(o.removeChild(f),k&&k.nodeType===8)if(f=k.data,f==="/$"){if(0<y&&8>y){f=y;var T=o.ownerDocument;if(f&1&&Yd(T.documentElement),f&2&&Yd(T.body),f&4)for(f=T.head,Yd(f),T=f.firstChild;T;){var R=T.nextSibling,U=T.nodeName;T[Ri]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&T.rel.toLowerCase()==="stylesheet"||f.removeChild(T),T=R}}if(w===0){o.removeChild(k),rh(u);return}w--}else f==="$"||f==="$?"||f==="$!"?w++:y=f.charCodeAt(0)-48;else y=0;f=k}while(f);rh(u)}function V0(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var f=u;switch(u=u.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":V0(f),Gx(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}o.removeChild(f)}}function hq(o,u,f,y){for(;o.nodeType===1;){var w=f;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(y){if(!o[Ri])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(k=o.getAttribute("rel"),k==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(k!==w.rel||o.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||o.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||o.getAttribute("title")!==(w.title==null?null:w.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(k=o.getAttribute("src"),(k!==(w.src==null?null:w.src)||o.getAttribute("type")!==(w.type==null?null:w.type)||o.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&k&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var k=w.name==null?null:""+w.name;if(w.type==="hidden"&&o.getAttribute("name")===k)return o}else return o;if(o=Rs(o.nextSibling),o===null)break}return null}function fq(o,u,f){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!f||(o=Rs(o.nextSibling),o===null))return null;return o}function $0(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function pq(o,u){var f=o.ownerDocument;if(o.data!=="$?"||f.readyState==="complete")u();else{var y=function(){u(),f.removeEventListener("DOMContentLoaded",y)};f.addEventListener("DOMContentLoaded",y),o._reactRetry=y}}function Rs(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="F!"||u==="F")break;if(u==="/$")return null}}return o}var H0=null;function jT(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"){if(u===0)return o;u--}else f==="/$"&&u++}o=o.previousSibling}return null}function ET(o,u,f){switch(u=Zp(f),o){case"html":if(o=u.documentElement,!o)throw Error(r(452));return o;case"head":if(o=u.head,!o)throw Error(r(453));return o;case"body":if(o=u.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Yd(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);Gx(o)}var hs=new Map,TT=new Set;function em(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Wi=Q.d;Q.d={f:mq,r:gq,D:yq,C:xq,L:bq,m:vq,X:Sq,S:wq,M:kq};function mq(){var o=Wi.f(),u=Hp();return o||u}function gq(o){var u=ic(o);u!==null&&u.tag===5&&u.type==="form"?Gj(u):Wi.r(o)}var Bc=typeof document>"u"?null:document;function AT(o,u,f){var y=Bc;if(y&&typeof u=="string"&&u){var w=ss(u);w='link[rel="'+o+'"][href="'+w+'"]',typeof f=="string"&&(w+='[crossorigin="'+f+'"]'),TT.has(w)||(TT.add(w),o={rel:o,crossOrigin:f,href:u},y.querySelector(w)===null&&(u=y.createElement("link"),Gn(u,"link",o),Pn(u),y.head.appendChild(u)))}}function yq(o){Wi.D(o),AT("dns-prefetch",o,null)}function xq(o,u){Wi.C(o,u),AT("preconnect",o,u)}function bq(o,u,f){Wi.L(o,u,f);var y=Bc;if(y&&o&&u){var w='link[rel="preload"][as="'+ss(u)+'"]';u==="image"&&f&&f.imageSrcSet?(w+='[imagesrcset="'+ss(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(w+='[imagesizes="'+ss(f.imageSizes)+'"]')):w+='[href="'+ss(o)+'"]';var k=w;switch(u){case"style":k=Fc(o);break;case"script":k=zc(o)}hs.has(k)||(o=p({rel:"preload",href:u==="image"&&f&&f.imageSrcSet?void 0:o,as:u},f),hs.set(k,o),y.querySelector(w)!==null||u==="style"&&y.querySelector(Qd(k))||u==="script"&&y.querySelector(Xd(k))||(u=y.createElement("link"),Gn(u,"link",o),Pn(u),y.head.appendChild(u)))}}function vq(o,u){Wi.m(o,u);var f=Bc;if(f&&o){var y=u&&typeof u.as=="string"?u.as:"script",w='link[rel="modulepreload"][as="'+ss(y)+'"][href="'+ss(o)+'"]',k=w;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=zc(o)}if(!hs.has(k)&&(o=p({rel:"modulepreload",href:o},u),hs.set(k,o),f.querySelector(w)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Xd(k)))return}y=f.createElement("link"),Gn(y,"link",o),Pn(y),f.head.appendChild(y)}}}function wq(o,u,f){Wi.S(o,u,f);var y=Bc;if(y&&o){var w=ac(y).hoistableStyles,k=Fc(o);u=u||"default";var T=w.get(k);if(!T){var R={loading:0,preload:null};if(T=y.querySelector(Qd(k)))R.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":u},f),(f=hs.get(k))&&K0(o,f);var U=T=y.createElement("link");Pn(U),Gn(U,"link",o),U._p=new Promise(function(Y,ae){U.onload=Y,U.onerror=ae}),U.addEventListener("load",function(){R.loading|=1}),U.addEventListener("error",function(){R.loading|=2}),R.loading|=4,tm(T,u,y)}T={type:"stylesheet",instance:T,count:1,state:R},w.set(k,T)}}}function Sq(o,u){Wi.X(o,u);var f=Bc;if(f&&o){var y=ac(f).hoistableScripts,w=zc(o),k=y.get(w);k||(k=f.querySelector(Xd(w)),k||(o=p({src:o,async:!0},u),(u=hs.get(w))&&W0(o,u),k=f.createElement("script"),Pn(k),Gn(k,"link",o),f.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},y.set(w,k))}}function kq(o,u){Wi.M(o,u);var f=Bc;if(f&&o){var y=ac(f).hoistableScripts,w=zc(o),k=y.get(w);k||(k=f.querySelector(Xd(w)),k||(o=p({src:o,async:!0,type:"module"},u),(u=hs.get(w))&&W0(o,u),k=f.createElement("script"),Pn(k),Gn(k,"link",o),f.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},y.set(w,k))}}function MT(o,u,f,y){var w=(w=be.current)?em(w):null;if(!w)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(u=Fc(f.href),f=ac(w).hoistableStyles,y=f.get(u),y||(y={type:"style",instance:null,count:0,state:null}
vendor: 4,541 bytes, line 9
9,f.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){o=Fc(f.href);var k=ac(w).hoistableStyles,T=k.get(o);if(T||(w=w.ownerDocument||w,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(o,T),(k=w.querySelector(Qd(o)))&&!k._p&&(T.instance=k,T.state.loading=5),hs.has(o)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},hs.set(o,f),k||Cq(w,o,f,T.state))),u&&y===null)throw Error(r(528,""));return T}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=f.async,f=f.src,typeof f=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=zc(f),f=ac(w).hoistableScripts,y=f.get(u),y||(y={type:"script",instance:null,count:0,state:null},f.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Fc(o){return'href="'+ss(o)+'"'}function Qd(o){return'link[rel="stylesheet"]['+o+"]"}function OT(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function Cq(o,u,f,y){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=o.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),Gn(u,"link",f),Pn(u),o.head.appendChild(u))}function zc(o){return'[src="'+ss(o)+'"]'}function Xd(o){return"script[async]"+o}function RT(o,u,f){if(u.count++,u.instance===null)switch(u.type){case"style":var y=o.querySelector('style[data-href~="'+ss(f.href)+'"]');if(y)return u.instance=y,Pn(y),y;var w=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return y=(o.ownerDocument||o).createElement("style"),Pn(y),Gn(y,"style",w),tm(y,f.precedence,o),u.instance=y;case"stylesheet":w=Fc(f.href);var k=o.querySelector(Qd(w));if(k)return u.state.loading|=4,u.instance=k,Pn(k),k;y=OT(f),(w=hs.get(w))&&K0(y,w),k=(o.ownerDocument||o).createElement("link"),Pn(k);var T=k;return T._p=new Promise(function(R,U){T.onload=R,T.onerror=U}),Gn(k,"link",y),u.state.loading|=4,tm(k,f.precedence,o),u.instance=k;case"script":return k=zc(f.src),(w=o.querySelector(Xd(k)))?(u.instance=w,Pn(w),w):(y=f,(w=hs.get(k))&&(y=p({},f),W0(y,w)),o=o.ownerDocument||o,w=o.createElement("script"),Pn(w),Gn(w,"link",y),o.head.appendChild(w),u.instance=w);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,tm(y,f.precedence,o));return u.instance}function tm(o,u,f){for(var y=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=y.length?y[y.length-1]:null,k=w,T=0;T<y.length;T++){var R=y[T];if(R.dataset.precedence===u)k=R;else if(k!==w)break}k?k.parentNode.insertBefore(o,k.nextSibling):(u=f.nodeType===9?f.head:f,u.insertBefore(o,u.firstChild))}function K0(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function W0(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var nm=null;function DT(o,u,f){if(nm===null){var y=new Map,w=nm=new Map;w.set(f,y)}else w=nm,y=w.get(f),y||(y=new Map,w.set(f,y));if(y.has(o))return y;for(y.set(o,null),f=f.getElementsByTagName(o),w=0;w<f.length;w++){var k=f[w];if(!(k[Ri]||k[It]||o==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var T=k.getAttribute(u)||"";T=o+T;var R=y.get(T);R?R.push(k):y.set(T,[k])}}return y}function _T(o,u,f){o=o.ownerDocument||o,o.head.insertBefore(f,u==="title"?o.querySelector("head > title"):null)}function Nq(o,u,f){if(f===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;return u.rel==="stylesheet"?(o=u.disabled,typeof u.precedence=="string"&&o==null):!0;case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function PT(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var Jd=null;function jq(){}function Eq(o,u,f){if(Jd===null)throw Error(r(475));var y=Jd;
vendor: 11,719 bytes, line 9
9if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var w=Fc(f.href),k=o.querySelector(Qd(w));if(k){o=k._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(y.count++,y=rm.bind(y),o.then(y,y)),u.state.loading|=4,u.instance=k,Pn(k);return}k=o.ownerDocument||o,f=OT(f),(w=hs.get(w))&&K0(f,w),k=k.createElement("link"),Pn(k);var T=k;T._p=new Promise(function(R,U){T.onload=R,T.onerror=U}),Gn(k,"link",f),u.instance=k}y.stylesheets===null&&(y.stylesheets=new Map),y.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(y.count++,u=rm.bind(y),o.addEventListener("load",u),o.addEventListener("error",u))}}function Tq(){if(Jd===null)throw Error(r(475));var o=Jd;return o.stylesheets&&o.count===0&&G0(o,o.stylesheets),0<o.count?function(u){var f=setTimeout(function(){if(o.stylesheets&&G0(o,o.stylesheets),o.unsuspend){var y=o.unsuspend;o.unsuspend=null,y()}},6e4);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(f)}}:null}function rm(){if(this.count--,this.count===0){if(this.stylesheets)G0(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var sm=null;function G0(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,sm=new Map,u.forEach(Aq,o),sm=null,rm.call(o))}function Aq(o,u){if(!(u.state.loading&4)){var f=sm.get(o);if(f)var y=f.get(null);else{f=new Map,sm.set(o,f);for(var w=o.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<w.length;k++){var T=w[k];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(f.set(T.dataset.precedence,T),y=T)}y&&f.set(null,y)}w=u.instance,T=w.getAttribute("data-precedence"),k=f.get(T)||y,k===y&&f.set(null,w),f.set(T,w),this.count++,y=rm.bind(this),w.addEventListener("load",y),w.addEventListener("error",y),k?k.parentNode.insertBefore(w,k.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(w,o.firstChild)),u.state.loading|=4}}var Zd={$$typeof:A,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function Mq(o,u,f,y,w,k,T,R){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ud(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ud(0),this.hiddenUpdates=ud(null),this.identifierPrefix=y,this.onUncaughtError=w,this.onCaughtError=k,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function LT(o,u,f,y,w,k,T,R,U,Y,ae,ce){return o=new Mq(o,u,f,T,R,U,Y,ce),u=1,k===!0&&(u|=24),k=$r(3,null,null,u),o.current=k,k.stateNode=o,u=Ab(),u.refCount++,o.pooledCache=u,u.refCount++,k.memoizedState={element:y,isDehydrated:f,cache:u},Db(k),o}function IT(o){return o?(o=xc,o):xc}function UT(o,u,f,y,w,k){w=IT(w),y.context===null?y.context=w:y.pendingContext=w,y=Na(u),y.payload={element:f},k=k===void 0?null:k,k!==null&&(y.callback=k),f=ja(o,y,u),f!==null&&(Yr(f,o,u),Ad(f,o,u))}function BT(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<u?f:u}}function Y0(o,u){BT(o,u),(o=o.alternate)&&BT(o,u)}function FT(o){if(o.tag===13){var u=yc(o,67108864);u!==null&&Yr(u,o,67108864),Y0(o,67108864)}}var im=!0;function Oq(o,u,f,y){var w=$.T;$.T=null;var k=Q.p;try{Q.p=2,Q0(o,u,f,y)}finally{Q.p=k,$.T=w}}function Rq(o,u,f,y){var w=$.T;$.T=null;var k=Q.p;try{Q.p=8,Q0(o,u,f,y)}finally{Q.p=k,$.T=w}}function Q0(o,u,f,y){if(im){var w=X0(y);if(w===null)I0(o,u,y,am,f),qT(o,y);else if(_q(w,o,u,f,y))y.stopPropagation();else if(qT(o,y),u&4&&-1<Dq.indexOf(o)){for(;w!==null;){var k=ic(w);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var T=hr(k.pendingLanes);if(T!==0){var R=k;for(R.pendingLanes|=2,R.entangledLanes|=2;T;){var U=1<<31-$e(T);R.entanglements[1]|=U,T&=~U}ci(k),(Ct&6)===0&&(Vp=dr()+500,Kd(0))}}break;case 13:R=yc(k,2),R!==null&&Yr(R,k,2),Hp(),Y0(k,2)}if(k=X0(y),k===null&&I0(o,u,y,am,f),k===w)break;w=k}w!==null&&y.stopPropagation()}else I0(o,u,y,null,f)}}function X0(o){return o=nb(o),J0(o)}var am=null;function J0(o){if(am=null,o=sc(o),o!==null){var u=i(o);if(u===null)o=null;else{var f=u.tag;if(f===13){if(o=a(u),o!==null)return o;o=null}else if(f===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return am=o,null}function zT(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nc()){case Bo:return 2;case Tr:return 8;case F:case W:return 32;case ne:return 268435456;default:return 32}default:return 32}}var Z0=!1,Ba=null,Fa=null,za=null,eh=new Map,th=new Map,qa=[],Dq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function qT(o,u){switch(o){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Fa=null;break;case"mouseover":case"mouseout":za=null;break;case"pointerover":case"pointerout":eh.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":th.delete(u.pointerId)}}function nh(o,u,f,y,w,k){return o===null||o.nativeEvent!==k?(o={blockedOn:u,domEventName:f,eventSystemFlags:y,nativeEvent:k,targetContainers:[w]},u!==null&&(u=ic(u),u!==null&&FT(u)),o):(o.eventSystemFlags|=y,u=o.targetContainers,w!==null&&u.indexOf(w)===-1&&u.push(w),o)}function _q(o,u,f,y,w){switch(u){case"focusin":return Ba=nh(Ba,o,u,f,y,w),!0;case"dragenter":return Fa=nh(Fa,o,u,f,y,w),!0;case"mouseover":return za=nh(za,o,u,f,y,w),!0;case"pointerover":var k=w.pointerId;return eh.set(k,nh(eh.get(k)||null,o,u,f,y,w)),!0;case"gotpointercapture":return k=w.pointerId,th.set(k,nh(th.get(k)||null,o,u,f,y,w)),!0}return!1}function VT(o){var u=sc(o.target);if(u!==null){var f=i(u);if(f!==null){if(u=f.tag,u===13){if(u=a(f),u!==null){o.blockedOn=u,va(o.priority,function(){if(f.tag===13){var y=Gr();y=nr(y);var w=yc(f,y);w!==null&&Yr(w,f,y),Y0(f,y)}});return}}else if(u===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function om(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var f=X0(o.nativeEvent);if(f===null){f=o.nativeEvent;var y=new f.constructor(f.type,f);tb=y,f.target.dispatchEvent(y),tb=null}else return u=ic(f),u!==null&&FT(u),o.blockedOn=f,!1;u.shift()}return!0}function $T(o,u,f){om(o)&&f.delete(u)}function Pq(){Z0=!1,Ba!==null&&om(Ba)&&(Ba=null),Fa!==null&&om(Fa)&&(Fa=null),za!==null&&om(za)&&(za=null),eh.forEach($T),th.forEach($T)}function lm(o,u){o.blockedOn===u&&(o.blockedOn=null,Z0||(Z0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pq)))}var cm=null;function HT(o){cm!==o&&(cm=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){cm===o&&(cm=null);for(var u=0;u<o.length;u+=3){var f=o[u],y=o[u+1],w=o[u+2];if(typeof y!="function"){if(J0(y||f)===null)continue;break}var k=ic(f);k!==null&&(o.splice(u,3),u-=3,Jb(k,{pending:!0,data:w,method:f.method,action:y},y,w))}}))}function rh(o){function u(U){return lm(U,o)}Ba!==null&&lm(Ba,o),Fa!==null&&lm(Fa,o),za!==null&&lm(za,o),eh.forEach(u),th.forEach(u);for(var f=0;f<qa.length;f++){var y=qa[f];y.blockedOn===o&&(y.blockedOn=null)}for(;0<qa.length&&(f=qa[0],f.blockedOn===null);)VT(f),f.blockedOn===null&&qa.shift();if(f=(o.ownerDocument||o).$$reactFormReplay,f!=null)for(y=0;y<f.length;y+=3){var w=f[y],k=f[y+1],T=w[Ut]||null;if(typeof k=="function")T||HT(f);else if(T){var R=null;if(k&&k.hasAttribute("formAction")){if(w=k,T=k[Ut]||null)R=T.formAction;else if(J0(w)!==null)continue}else R=T.action;typeof R=="function"?f[y+1]=R:(f.splice(y,3),y-=3),HT(f)}}}function ev(o){this._internalRoot=o}um.prototype.render=ev.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));var f=u.current,y=Gr();UT(f,y,o,u,null,null)},um.prototype.unmount=ev.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;UT(o.current,2,null,o,null,null),Hp(),u[rr]=null}};function um(o){this._internalRoot=o}um.prototype.unstable_scheduleHydration=function(o){if(o){var u=qr();o={blockedOn:null,target:o,priority:u};for(var f=0;f<qa.length&&u!==0&&u<qa[f].priority;f++);qa.splice(f,0,o),f===0&&VT(o)}};var KT=e.version;if(KT!=="19.1.0")throw Error(r(527,KT,"19.1.0"));Q.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(u),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var Lq={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dm.isDisabled&&dm.supportsFiber)try{pe=dm.inject(Lq),Se=dm}catch{}}return ih.createRoot=function(o,u){if(!s(o))throw Error(r(299));var f=!1,y="",w=lE,k=cE,T=uE,R=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(k=u.onCaughtError),u.onRecoverableError!==void 0&&(T=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(R=u.unstable_transitionCallbacks)),u=LT(o,1,!1,null,null,f,y,w,k,T,R,null),o[rr]=u.current,L0(o),new ev(u)},ih.hydrateRoot=function(o,u,f){if(!s(o))throw Error(r(299));var y=!1,w="",k=lE,T=cE,R=uE,U=null,Y=null;return f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(w=f.identifierPrefix),f.onUncaughtError!==void 0&&(k=f.onUncaughtError),f.onCaughtError!==void 0&&(T=f.onCaughtError),f.onRecoverableError!==void 0&&(R=f.onRecoverableError),f.unstable_transitionCallbacks!==void 0&&(U=f.unstable_transitionCallbacks),f.formState!==void 0&&(Y=f.formState)),u=LT(o,1,!0,u,f??null,y,w,k,T,R,U,Y),u.context=IT(null),f=u.current,y=Gr(),y=nr(y),w=Na(y),w.callback=null,ja(f,w,y),f=y,u.current.lanes=f,Zt(u,f),ci(u),o[rr]=u.current,L0(o),new um(u)},ih.version="19.1.0",ih}var nA;function Wq(){if(nA)return nv.exports;nA=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}
9return t(),nv.exports=Kq(),nv.exports}var PS=Wq();const Gq=Qy(PS),Yq=Yy({__proto__:null,default:Gq},[PS]);var N=Af();const z=Qy(N),Mf=Yy({__proto__:null,default:z},[N]);function Qq(t,e){if(t instanceof RegExp)return{keys:!1,pattern:t};var n,r,s,i,a=[],l="",d=t.split("/");for(d[0]||d.shift();s=d.shift();)n=s[0],n==="*"?(a.push(n),l+=s[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(r=s.indexOf("?",1),i=s.indexOf(".",1),a.push(s.substring(1,~r?r:~i?i:s.length)),l+=~r&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(l+=(~r?"?":"")+"\\"+s.substring(i))):l+="/"+s;return{keys:a,pattern:new RegExp("^"+l+(e?"(?=$|/)":"/?$"),"i")}}var ov={exports:{}},lv={};var rA;function Xq(){if(rA)return lv;rA=1;var t=Af();function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function l(m,g){var x=g(),v=r({inst:{value:x,getSnapshot:g}}),S=v[0].inst,C=v[1];return i(function(){S.value=x,S.getSnapshot=g,d(S)&&C({inst:S})},[m,x,g]),s(function(){return d(S)&&C({inst:S}),m(function(){d(S)&&C({inst:S})})},[m]),a(x),x}function d(m){var g=m.getSnapshot;m=m.value;try{var x=g();return!n(m,x)}catch{return!0}}function h(m,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return lv.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,lv}var sA;function JD(){return sA||(sA=1,ov.exports=Xq()),ov.exports}var LS=JD();const Jq=Mf.useInsertionEffect,Zq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e6=Zq?N.useLayoutEffect:N.useEffect,t6=Jq||e6,ZD=t=>{const e=N.useRef([t,(...n)=>e[0](...n)]).current;return t6(()=>{e[0]=t}),e[1]},n6="popstate",IS="pushState",US="replaceState",r6="hashchange",iA=[n6,IS,US,r6],s6=t=>{for(const e of iA)addEventListener(e,t);return()=>{for(const e of iA)removeEventListener(e,t)}},e_=(t,e)=>LS.useSyncExternalStore(s6,t,e),aA=()=>location.search,i6=({ssrSearch:t}={})=>e_(aA,t!=null?()=>t:aA),oA=()=>location.pathname,a6=({ssrPath:t}={})=>e_(oA,t!=null?()=>t:oA),o6=(t,{replace:e=!1,state:n=null}={})=>history[e?US:IS](n,"",t),l6=(t={})=>[a6(t),o6],lA=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[lA]>"u"){for(const t of[IS,US]){const e=history[t];history[t]=function(){const n=e.apply(this,arguments),r=new Event(t);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,lA,{value:!0})}const c6=(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())?"~"+e:e.slice(t.length)||"/",t_=(t="")=>t==="/"?"":t,u6=(t,e)=>t[0]==="~"?t.slice(1):t_(e)+t,d6=(t="",e)=>c6(cA(t_(t)),cA(e)),cA=t=>{try{return decodeURI(t)}catch{return t}},n_={hook:l6,searchHook:i6,parser:Qq,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,e,n)=>t(e,n)},r_=N.createContext(n_),Gl=()=>N.useContext(r_),s_={},i_=N.createContext(s_),Xy=()=>N.useContext(i_),Jy=t=>{const[e,n]=t.hook(t);return[d6(t.base,e),ZD((r,s)=>t.aroundNav(n,u6(r,t.base),s))]},Ti=()=>Jy(Gl()),BS=(t,e,n,r)=>{const{pattern:s,keys:i}=e instanceof RegExp?{keys:!1,pattern:e}:t(e||"*",r),a=s.exec(n)||[],[l,...d]=a;return l!==void 0?[!0,(()=>{const h=i!==!1?Object.fromEntries(i.map((m,g)=>[m,d[g]])):a.groups;let p={...d};return h&&Object.assign(p,h),p})(),...r?[l]:[]]:[!1,null]},h6=t=>BS(Gl().parser,t,Ti()[0]),a_=({children:t,...e})=>{const n=Gl(),r=e.hook?n_:n;let s=r;const[i,a=e.ssrSearch??""]=e.ssrPath?.split("?")??[];i&&(e.ssrSearch=a,e.ssrPath=i),e.hrefs=e.hrefs??e.hook?.hrefs,e.searchHook=e.searchHook??e.hook?.searchHook;let l=N.useRef({}),d=l.current,h=d;for(let p in r){const m=p==="base"?r[p]+(e[p]??""):e[p]??r[p];d===h&&m!==h[p]&&(l.current=h={...h}),h[p]=m,(m!==r[p]||m!==s[p])&&(s=h)}return N.createElement(r_.Provider,{value:s,children:t})},uA=({children:t,component:e},n)=>e?N.createElement(e,{params:n}):typeof t=="function"?t(n):t,f6=t=>{let e=N.useRef(s_);const n=e.current;return e.current=Object.keys(t).length!==Object.keys(n).length||Object.entries(t).some(([r,s])=>s!==n[r])?t:n},nt=({path:t,nest:e,match:n,...r})=>{const s=Gl(),[i]=Jy(s),[a,l,d]=n??BS(s.parser,t,i,e),h=f6({...Xy(),...l});if(!a)return null;const p=d?N.createElement(a_,{base:d},uA(r,h)):uA(r,h);return N.createElement(i_.Provider,{value:h,children:p})},Qe=N.forwardRef((t,e)=>{const n=Gl(),[r,s]=Jy(n),{to:i="",href:a=i,onClick:l,asChild:d,children:h,className:p,replace:m,state:g,transition:x,...v}=t,S=ZD(j=>{j.ctrlKey||j.metaKey||j.altKey||j.shiftKey||j.button!==0||(l?.(j),j.defaultPrevented||(j.preventDefault(),s(a,t)))}),C=n.hrefs(a[0]==="~"?a.slice(1):n.base+a,n);return d&&N.isValidElement(h)?N.cloneElement(h,{onClick:S,href:C}):N.createElement("a",{...v,onClick:S,href:C,className:p?.call?p(r===a):p,children:h,ref:e})}),o_=t=>Array.isArray(t)?t.flatMap(e=>o_(e&&e.type===N.Fragment?e.props.children:e)):[t],FS=({children:t,location:e})=>{const n=Gl(),[r]=Jy(n);for(const s of o_(t)){let i=0;if(N.isValidElement(s)&&(i=BS(n.parser,s.props.path,e||r,s.props.nest))[0])return N.cloneElement(s,{match:i})}return null};var Qu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},p6={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},m6=class{#e=p6;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},vl=new m6;function g6(t){setTimeout(t,0)}var _l=typeof window>"u"||"Deno"in globalThis;function br(){}function y6(t,e){return typeof t=="function"?t(e):t}function Jw(t){return typeof t=="number"&&t>=0&&t!==1/0}function l_(t,e){return Math.max(t+(e||0)-Date.now(),0)}function vo(t,e){return typeof t=="function"?t(e):t}function gs(t,e){return typeof t=="function"?t(e):t}function dA(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:l}=t;if(a){if(r){if(e.queryHash!==zS(a,e.options))return!1}else if(!nf(e.queryKey,a))return!1}if(n!=="all"){const d=e.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||s&&s!==e.state.fetchStatus||i&&!i(e))}function hA(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Pl(e.options.mutationKey)!==Pl(i))return!1}else if(!nf(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function zS(t,e){return(e?.queryKeyHashFn||Pl)(t)}function Pl(t){return JSON.stringify(t,(e,n)=>Zw(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function nf(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>nf(t[n],e[n])):!1}var x6=Object.prototype.hasOwnProperty;function c_(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=fA(t)&&fA(e);
vendor: 23,308 bytes, line 9
9if(!r&&!(Zw(t)&&Zw(e)))return e;const i=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),l=a.length,d=r?new Array(l):{};let h=0;for(let p=0;p<l;p++){const m=r?p:a[p],g=t[m],x=e[m];if(g===x){d[m]=g,(r?p<i:x6.call(t,m))&&h++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){d[m]=x;continue}const v=c_(g,x,n+1);d[m]=v,v===g&&h++}return i===l&&h===i?t:d}function vg(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function fA(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Zw(t){if(!pA(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!pA(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function pA(t){return Object.prototype.toString.call(t)==="[object Object]"}function b6(t){return new Promise(e=>{vl.setTimeout(e,t)})}function e1(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?c_(t,e):e}function v6(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function w6(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var qS=Symbol();function u_(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===qS?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function VS(t,e){return typeof t=="function"?t(...e):!!t}function S6(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}var k6=class extends Qu{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!_l&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},$S=new k6;function t1(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}var C6=g6;function N6(){let t=[],e=0,n=l=>{l()},r=l=>{l()},s=C6;const i=l=>{e?t.push(l):s(()=>{n(l)})},a=()=>{const l=t;t=[],l.length&&s(()=>{r(()=>{l.forEach(d=>{n(d)})})})};return{batch:l=>{let d;e++;try{d=l()}finally{e--,e||a()}return d},batchCalls:l=>(...d)=>{i(()=>{l(...d)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var On=N6(),j6=class extends Qu{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!_l&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},wg=new j6;function E6(t){return Math.min(1e3*2**t,3e4)}function d_(t){return(t??"online")==="online"?wg.isOnline():!0}var n1=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function h_(t){let e=!1,n=0,r;const s=t1(),i=()=>s.status!=="pending",a=S=>{if(!i()){const C=new n1(S);g(C),t.onCancel?.(C)}},l=()=>{e=!0},d=()=>{e=!1},h=()=>$S.isFocused()&&(t.networkMode==="always"||wg.isOnline())&&t.canRun(),p=()=>d_(t.networkMode)&&t.canRun(),m=S=>{i()||(r?.(),s.resolve(S))},g=S=>{i()||(r?.(),s.reject(S))},x=()=>new Promise(S=>{r=C=>{(i()||h())&&S(C)},t.onPause?.()}).then(()=>{r=void 0,i()||t.onContinue?.()}),v=()=>{if(i())return;let S;const C=n===0?t.initialPromise:void 0;try{S=C??t.fn()}catch(j){S=Promise.reject(j)}Promise.resolve(S).then(m).catch(j=>{if(i())return;const E=t.retry??(_l?0:3),A=t.retryDelay??E6,D=typeof A=="function"?A(n,j):A,M=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,j);if(e||!M){g(j);return}n++,t.onFail?.(n,j),b6(D).then(()=>h()?void 0:x()).then(()=>{e?g(j):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r?.(),s),cancelRetry:l,continueRetry:d,canStart:p,start:()=>(p()?v():x().then(v),s)}}var f_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jw(this.gcTime)&&(this.#e=vl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_l?1/0:300*1e3))}clearGcTimeout(){this.#e&&(vl.clearTimeout(this.#e),this.#e=void 0)}},T6=class extends f_{#e;#t;#n;#s;#r;#a;#o;constructor(t){super(),this.#o=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#n=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=gA(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=gA(this.options);e.data!==void 0&&(this.setState(mA(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const n=e1(this.state.data,t,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#i({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>gs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!l_(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,r=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const l=u_(this.options,e),h=(()=>{const p={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#o=!1,this.options.persister?this.options.persister(l,h,this):l(h)},a=(()=>{const l={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return r(l),l})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#i({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=h_({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:l=>{l instanceof n1&&l.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(l,d)=>{this.#i({type:"failed",failureCount:l,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const l=await this.#r.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#n.config.onSuccess?.(l,this),this.#n.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof n1){if(l.silent)return this.#r.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#i({type:"error",error:l}),this.#n.config.onError?.(l,this),this.#n.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#i(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...p_(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...mA(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?r:void 0,r;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),On.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function p_(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:d_(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function mA(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gA(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var A6=class extends Qu{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#o=t1(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#m;#h;#f;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),yA(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return r1(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return r1(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#w(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof gs(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),e._defaulted&&!vg(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&xA(this.#t,n,this.options,e)&&this.#d(),this.updateResult(),r&&(this.#t!==n||gs(this.options.enabled,this.#t)!==gs(e.enabled,this.#t)||vo(this.options.staleTime,this.#t)!==vo(e.staleTime,this.#t))&&this.#g();const s=this.#y();r&&(this.#t!==n||gs(this.options.enabled,this.#t)!==gs(e.enabled,this.#t)||s!==this.#l)&&this.#x(s)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return O6(this,n)&&(this.#s=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(t){this.#S();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(br)),e}#g(){this.#v();const t=vo(this.options.staleTime,this.#t);if(_l||this.#s.isStale||!Jw(t))return;const n=l_(this.#s.dataUpdatedAt,t)+1;this.#c=vl.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(t){this.#w(),this.#l=t,!(_l||gs(this.options.enabled,this.#t)===!1||!Jw(this.#l)||this.#l===0)&&(this.#u=vl.setInterval(()=>{(this.options.refetchIntervalInBackground||$S.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#x(this.#y())}#v(){this.#c&&(vl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(vl.clearInterval(this.#u),this.#u=void 0)}createResult(t,e){const n=this.#t,r=this.options,s=this.#s,i=this.#r,a=this.#a,d=t!==n?t.state:this.#n,{state:h}=t;let p={...h},m=!1,g;if(e._optimisticResults){const L=this.hasListeners(),V=!L&&yA(t,e),B=L&&xA(t,n,e,r);(V||B)&&(p={...p,...p_(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:v,status:S}=p;g=p.data;let C=!1;if(e.placeholderData!==void 0&&g===void 0&&S==="pending"){let L;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(L=s.data,C=!0):L=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,L!==void 0&&(S="success",g=e1(s?.data,L,e),m=!0)}if(e.select&&g!==void 0&&!C)if(s&&g===i?.data&&e.select===this.#m)g=this.#h;else try{this.#m=e.select,g=e.select(g),g=e1(s?.data,g,e),this.#h=g,this.#i=null}catch(L){this.#i=L}this.#i&&(x=this.#i,g=this.#h,v=Date.now(),S="error");const j=p.fetchStatus==="fetching",E=S==="pending",A=S==="error",D=E&&j,M=g!==void 0,_={status:S,fetchStatus:p.fetchStatus,isPending:E,isSuccess:S==="success",isError:A,isInitialLoading:D,isLoading:D,data:g,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:v,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:j,isRefetching:j&&!E,isLoadingError:A&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&M,isStale:HS(t,e),refetch:this.refetch,promise:this.#o,isEnabled:gs(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=_.data!==void 0,V=_.status==="error"&&!L,B=ie=>{V?ie.reject(_.error):L&&ie.resolve(_.data)},K=()=>{const ie=this.#o=_.promise=t1();B(ie)},ee=this.#o;switch(ee.status){case"pending":t.queryHash===n.queryHash&&B(ee);break;case"fulfilled":(V||_.data!==ee.value)&&K();break;case"rejected":(!V||_.error!==ee.reason)&&K();break}}return _}updateResult(){const t=this.#s,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#f=this.#t),vg(e,t))return;this.#s=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#p.size)return!0;const i=new Set(s??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(a=>{const l=a;return this.#s[l]!==t[l]&&i.has(l)})};this.#k({listeners:n()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#k(t){On.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function M6(t,e){return gs(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function yA(t,e){return M6(t,e)||t.state.data!==void 0&&r1(t,e,e.refetchOnMount)}function r1(t,e,n){if(gs(e.enabled,t)!==!1&&vo(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&HS(t,e)}return!1}function xA(t,e,n,r){return(t!==e||gs(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&HS(t,n)}function HS(t,e){return gs(e.enabled,t)!==!1&&t.isStaleByTime(vo(e.staleTime,t))}function O6(t,e){return!vg(t.getCurrentResult(),e)}function bA(t){return{onFetch:(e,n)=>{const r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let l={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const m=v=>{S6(v,()=>e.signal,()=>p=!0)},g=u_(e.options,e.fetchOptions),x=async(v,S,C)=>{if(p)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const I={client:e.client,queryKey:e.queryKey,pageParam:S,direction:C?"backward":"forward",meta:e.options.meta};return m(I),I})(),A=await g(E),{maxPages:D}=e.options,M=C?w6:v6;return{pages:M(v.pages,A,D),pageParams:M(v.pageParams,S,D)}};if(s&&i.length){const v=s==="backward",S=v?R6:vA,C={pages:i,pageParams:a},j=S(r,C);l=await x(C,j,v)}else{const v=t??i.length;do{const S=d===0?a[0]??r.initialPageParam:vA(r,l);if(d>0&&S==null)break;l=await x(l,S),d++}while(d<v)}return l};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=h}}}function vA(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function R6(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var D6=class extends f_{#e;#t;#n;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||m_(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=h_({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#r({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#s.canStart();try{if(r)e();else{this.#r({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:t,isPaused:s})}const i=await this.#s.start();return await this.#n.config.onSuccess?.(i,t,this.state.context,this,n),await this.options.onSuccess?.(i,t,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,t,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(i,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,i,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),On.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function m_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _6=class extends Qu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const r=new D6({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=hm(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=hm(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=hm(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=hm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>
9r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){On.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>hA(e,n))}findAll(t={}){return this.getAll().filter(e=>hA(t,e))}notify(t){On.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return On.batch(()=>Promise.all(t.map(e=>e.continue().catch(br))))}};function hm(t){return t.options.scope?.id}var P6=class extends Qu{#e;#t=void 0;#n;#s;constructor(e,n){super(),this.#e=e,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const n=this.options;this.options=this.#e.defaultMutationOptions(e),vg(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Pl(n.mutationKey)!==Pl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(e,n){return this.#s=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#r(){const e=this.#n?.state??m_();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#a(e){On.batch(()=>{if(this.#s&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,n,r,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(e.data,null,n,r,s)}catch(i){Promise.reject(i)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,n,r,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(void 0,e.error,n,r,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(n=>{n(this.#t)})})}},L6=class extends Qu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??zS(r,e);let i=this.get(s);return i||(i=new T6({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);
vendor: 5,330 bytes, line 9
9e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){On.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>dA(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>dA(t,n)):e}notify(t){On.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){On.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){On.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},I6=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(t={}){this.#e=t.queryCache||new L6,this.#t=t.mutationCache||new _6,this.#n=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=$S.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=wg.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(vo(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=this.#e.get(r.queryHash)?.state.data,a=y6(e,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return On.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;On.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return On.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=On.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(br).catch(br)}invalidateQueries(t,e={}){return On.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=On.batch(()=>this.#e.findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(br)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(br)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(vo(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(br).catch(br)}fetchInfiniteQuery(t){return t.behavior=bA(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(br).catch(br)}ensureInfiniteQueryData(t){return t.behavior=bA(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return wg.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#s.set(Pl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(r=>{nf(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#r.set(Pl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{nf(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=zS(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===qS&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},g_=N.createContext(void 0),kn=t=>{const e=N.useContext(g_);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},U6=({client:t,children:e})=>(N.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),c.jsx(g_.Provider,{value:t,children:e})),y_=N.createContext(!1),B6=()=>N.useContext(y_);y_.Provider;function F6(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var z6=N.createContext(F6()),q6=()=>N.useContext(z6),V6=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?VS(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOn
9Mount=!1))},$6=t=>{N.useEffect(()=>{t.clearReset()},[t])},H6=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||VS(n,[t.error,r])),K6=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},W6=(t,e)=>t.isLoading&&t.isFetching&&!e,G6=(t,e)=>t?.suspense&&e.isPending,wA=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Y6(t,e,n){const r=B6(),s=q6(),i=kn(),a=i.defaultQueryOptions(t);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const l=i.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",K6(a),V6(a,s,l),$6(s);const d=!i.getQueryCache().get(a.queryHash),[h]=N.useState(()=>new e(i,a)),p=h.getOptimisticResult(a),m=!r&&t.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(g=>{const x=m?h.subscribe(On.batchCalls(g)):br;return h.updateResult(),x},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),N.useEffect(()=>{h.setOptions(a)},[a,h]),G6(a,p))throw wA(a,h,s);if(H6({result:p,errorResetBoundary:s,throwOnError:a.throwOnError,query:l,suspense:a.suspense}))throw p.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,p),a.experimental_prefetchInRender&&!_l&&W6(p,r)&&(d?wA(a,h,s):l?.promise)?.catch(br).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?p:h.trackResult(p)}function lt(t,e){return Y6(t,A6)}function ft(t,e){const n=kn(),[r]=N.useState(()=>new P6(n,t));N.useEffect(()=>{r.setOptions(t)},[r,t]);const s=N.useSyncExternalStore(N.useCallback(a=>r.subscribe(On.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=N.useCallback((a,l)=>{r.mutate(a,l).catch(br)},[r]);if(s.error&&VS(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}var Q6=class x_ extends Error{static kind="ClerkError";clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(e){super(new.target.formatMessage(new.target.kind,e.message,e.code,e.docsUrl),{cause:e.cause}),Object.setPrototypeOf(this,x_.prototype),this.code=e.code,this.docsUrl=e.docsUrl,this.longMessage=e.longMessage,this.cause=e.cause}toString(){return`[${this.name}]
10Message:${this.message}`}static formatMessage(e,n,r,s){const i="Clerk:",a=new RegExp(i.replace(" ","\\s*"),"i");return n=n.replace(a,""),n=`${i} ${n.trim()}
11
12(code="${r}")
13
14`,s&&(n+=`
15
16Docs: ${s}`),n}},KS=class b_ extends Q6{static kind="ClerkRuntimeError";clerkRuntimeError=!0;constructor(e,n){super({...n,message:e}),Object.setPrototypeOf(this,b_.prototype)}};const X6=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invali
16d. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function v_({packageName:t,customMessages:e}){let n=t;function r(i,a){if(!a)return`${n}: ${i}`;let l=i;const d=i.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(const h of d){const p=(a[h[1]]||"").toString();l=l.replace(`{{${h[1]}}}`,p)}return`${n}: ${l}`}const s={...X6,...e};return{setPackageName({packageName:i}){return typeof i=="string"&&(n=i),this},setMessages({customMessages:i}){return Object.assign(s,i||{}),this},throwInvalidPublishableKeyError(i){throw new Error(r(s.InvalidPublishableKeyErrorMessage,i))},throwInvalidProxyUrl(i){throw new Error(r(s.InvalidProxyUrlErrorMessage,i))},throwMissingPublishableKeyError(){throw new Error(r(s.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw new Error(r(s.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(i){throw new Error(r(s.MissingClerkProvider,i))},throw(i){throw new Error(r(i))}}}const J6=[".lcl.dev",".lclstage.dev",".lclclerk.com"],Z6=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],w_=t=>typeof atob<"u"&&typeof atob=="function"?atob(t):typeof globalThis.Buffer<"u"?globalThis.Buffer.from(t,"base64").toString():t,eV=t=>typeof btoa<"u"&&typeof btoa=="function"?btoa(t):typeof globalThis.Buffer<"u"?globalThis.Buffer.from(t).toString("base64"):t,WS="pk_live_",S_="pk_test_",tV=/^(([a-z]+)-){2}([0-9]{1,2})\.clerk\.accounts([a-z.]*)(dev|com)$/i;function nV(t){return`${tV.test(t)||t.startsWith("clerk.")&&J6.some(e=>t.endsWith(e))?S_:WS}${eV(`${t}$`).replace(/=+$/,"")}`}function rV(t,e){if(iV(e))return e;const n=t.toLowerCase().replace(/:\d+$/,"");if(!n)throw new Error("Host must not be empty.");return nV(`clerk.${n}`)}function k_(t){if(!t.endsWith("$"))return!1;const e=t.slice(0,-1);return e.includes("$")?!1:e.includes(".")}function SA(t,e={}){if(t=t||"",!t||!kA(t)){if(e.fatal&&!t)throw new Error("Publishable key is missing. Ensure that your publishable key is correctly configured. Double-check your environment configuration for your keys, or access them here: https://dashboard.clerk.com/last-active?path=api-keys");if(e.fatal&&!kA(t))throw new Error("Publishable key not valid.");return null}const n=t.startsWith(WS)?"production":"development";let r;try{r=w_(t.split("_")[2])}catch{if(e.fatal)throw new Error("Publishable key not valid: Failed to decode key.");return null}if(!k_(r)){if(e.fatal)throw new Error("Publishable key not valid: Decoded key has invalid format.");return null}let s=r.slice(0,-1);return e.proxyUrl?s=e.proxyUrl:n!=="development"&&e.domain&&e.isSatellite&&(s=`clerk.${e.domain}`),{instanceType:n,frontendApi:s}}function kA(t=""){try{if(!(t.startsWith(WS)||t.startsWith(S_)))return!1;const e=t.split("_");if(e.length!==3)return!1;const n=e[2];return n?k_(w_(n)):!1}catch{return!1}}function sV(){const t=new Map;return{isDevOrStagingUrl:e=>{if(!e)return!1;const n=typeof e=="string"?e:e.hostname;let r=t.get(n);return r===void 0&&(r=Z6.some(s=>n.endsWith(s)),t.set(n,r)),r}}}function iV(t){return t.startsWith("test_")||t.startsWith("pk_test_")}const aV={strict_mfa:{afterMinutes:10,level:"multi_factor"},strict:{afterMinutes:10,level:"second_factor"},moderate:{afterMinutes:60,level:"second_factor"},lax:{afterMinutes:1440,level:"second_factor"}},oV=new Set(["first_factor","second_factor","multi_factor"]),lV=new Set(["strict_mfa","strict","moderate","lax"]),CA=new Set(["o","org","organization"]),NA=new Set(["u","user"]),cV=t=>typeof t=="number"&&t>0,uV=t=>oV.has(t),dV=t=>lV.has(t),jA=t=>typeof t=="number"&&Number.isFinite(t)&&(t===-1||t>=0),cv=t=>t.replace(/^(org:)*/,"org:"),hV=(t,e)=>{const{orgId:n,orgRole:r,orgPermissions:s}=e,i=t.role!==void 0,a=t.permission!==void 0;return!i&&!a?"skip":i&&typeof t.role!="string"||a&&typeof t.permission!="string"||!n||i&&(typeof r!="string"||!r||cv(r)!==cv(t.role))||a&&(!Array.isArray(s)||
16!s.includes(cv(t.permission)))?"fail":"pass"},EA=(t,e)=>{const{org:n,user:r}=pV(t),[s,i]=e.split(":"),a=i!==void 0,l=s,d=i||s;if(a&&!CA.has(l)&&!NA.has(l))throw new Error(`Invalid scope: ${l}`);if(a){if(CA.has(l))return n.includes(d);if(NA.has(l))return r.includes(d)}return[...n,...r].includes(d)},fV=(t,e)=>{const{features:n,plans:r}=e,s=t.feature!==void 0,i=t.plan!==void 0;if(!s&&!i)return"skip";if(s&&typeof t.feature!="string"||i&&typeof t.plan!="string")return"fail";if(s){if(typeof n!="string"||!n)return"fail";try{if(!EA(n,t.feature))return"fail"}catch{return"fail"}}if(i){if(typeof r!="string"||!r)return"fail";try{if(!EA(r,t.plan))return"fail"}catch{return"fail"}}return"pass"},pV=t=>{const e=[],n=[];if(!t)return{org:e,user:n};const r=t.split(",");for(let s=0;s<r.length;s++){const i=r[s].trim(),a=i.indexOf(":");if(a===-1)throw new Error(`Invalid claim element (missing colon): ${i}`);const l=i.slice(0,a),d=i.slice(a+1);l==="o"?e.push(d):l==="u"?n.push(d):(l==="ou"||l==="uo")&&(e.push(d),n.push(d))}return{org:e,user:n}},mV=t=>{if(!t)return!1;const e=s=>typeof s=="string"?aV[s]:s,n=typeof t=="string"&&dV(t),r=typeof t=="object"&&uV(t.level)&&cV(t.afterMinutes);return n||r?e.bind(null,t):!1},gV=(t,{factorVerificationAge:e})=>{if(t.reverification===void 0)return"skip";if(!e||!Array.isArray(e)||e.length!==2||!jA(e[0])||!jA(e[1]))return"fail";const n=mV(t.reverification);if(!n)return"fail";const{level:r,afterMinutes:s}=n(),[i,a]=e;if(i===-1&&a===-1)return"fail";const l=i!==-1&&s>i,d=a!==-1&&s>a;switch(r){case"first_factor":return l?"pass":"fail";case"second_factor":return a===-1?l?"pass":"fail":d?"pass":"fail";case"multi_factor":return a===-1?l?"pass":"fail":i===-1?"fail":l&&d?"pass":"fail"}},yV=t=>t.some(e=>e==="pass")&&t.every(e=>e==="pass"||e==="skip"),xV=t=>e=>t.userId?yV([hV(e,t),fV(e,t),gV(e,t)]):!1,bV=({authObject:{sessionId:t,sessionStatus:e,userId:n,actor:r,orgId:s,orgRole:i,orgSlug:a,signOut:l,getToken:d,has:h,sessionClaims:p},options:{treatPendingAsSignedOut:m=!0}})=>{if(t===void 0&&n===void 0)return{actor:void 0,getToken:d,has:()=>!1,isLoaded:!1,isSignedIn:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:t,signOut:l,userId:n};if(t===null&&n===null)return{actor:null,getToken:d,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:t,signOut:l,userId:n};if(m&&e==="pending")return{actor:null,getToken:d,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:null,
16signOut:l,userId:null};if(t&&p&&n&&s&&i)return{actor:r||null,getToken:d,has:h,isLoaded:!0,isSignedIn:!0,orgId:s,orgRole:i,orgSlug:a||null,sessionClaims:p,sessionId:t,signOut:l,userId:n};if(t&&p&&n&&!s)return{actor:r||null,getToken:d,has:h,isLoaded:!0,isSignedIn:!0,orgId:null,orgRole:null,orgSlug:null,sessionClaims:p,sessionId:t,signOut:l,userId:n}},TA=(t,e,n)=>!t&&n?vV(n):wV(e),vV=t=>{const e=t.userId,n=t.user,r=t.sessionId,s=t.sessionStatus,i=t.sessionClaims;return{userId:e,user:n,sessionId:r,session:t.session,sessionStatus:s,sessionClaims:i,organization:t.organization,orgId:t.orgId,orgRole:t.orgRole,orgPermissions:t.orgPermissions,orgSlug:t.orgSlug,actor:t.actor,factorVerificationAge:t.factorVerificationAge}},wV=t=>{const e=t.user?t.user.id:t.user,n=t.user,r=t.session?t.session.id:t.session,s=t.session,i=t.session?.status,a=t.session?t.session.lastActiveToken?.jwt?.claims:null,l=t.session?t.session.factorVerificationAge:null,d=s?.actor,h=t.organization,p=t.organization?t.organization.id:t.organization,m=h?.slug,g=h&&n?.organizationMemberships?.find(v=>v.organization.id===p),x=g&&g.permissions;return{userId:e,user:n,sessionId:r,session:s,sessionStatus:i,sessionClaims:a,organization:h,orgId:p,orgRole:g&&g.role,orgSlug:m,orgPermissions:x,actor:d,factorVerificationAge:l}},SV="METHOD_CALLED",kV=.1;function C_(t,e){return{event:SV,eventSamplingRate:kV,payload:{method:t,...e}}}const CV="ClerkJS:";function NV(){throw new Error(`${CV} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`)}var AA=Object.prototype.hasOwnProperty;function MA(t,e,n){for(n of t.keys())if(Mh(n,e))return n}function Mh(t,e){var n,r,s;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Mh(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(s=r,s&&typeof s=="object"&&(s=MA(e,s),!s)||!e.has(s))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(s=r[0],s&&typeof s=="object"&&(s=MA(e,s),!s)||!Mh(r[1],e.get(s)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(AA.call(t,n)&&++r&&!AA.call(e,n)||!(n in e)||!Mh(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function jV(t,e){if(!t)throw typeof e=="string"?new Error(e):new Error(`${e.displayName} not found`)}const Xu=(t,e)=>{const{assertCtxFn:n=jV}={},r=z.createContext(void 0);return r.displayName=t,[r,()=>{const a=z.useContext(r);return n(a,`${t} not found`),a.value},()=>{const a=z.useContext(r);return a?a.value:{}}]},[N_,Of]=Xu("ClerkInstanceContext"),[EV,TV]=Xu("InitialStateContext");function AV({children:t,initialState:e}){const[n]=N.useState(e),r=z.useMemo(()=>({value:n}),[n]);return z.createElement(EV.Provider,{value:r},t)}function j_(){const t=TV();if(t instanceof Promise){if("use"in z&&typeof z.use=="function")return z.use(t);throw new Error("initialState cannot be a promise if React version is less than 19")}return t}z.createContext({});const[MV]=Xu("CheckoutContext"),OV=({children:t,...e})=>z.createElement(MV.Provider,{value:{value:e}},t);function GS(t){if(!z.useContext(N_)){if(typeof t=="function"){t();return}throw new Error(`${t} can only be used within the <ClerkProvider /> component.
17
18Possible fixes:
191. Ensure that the <ClerkProvider /> is correctly wrapping your application where this component is used.
202. Check for multiple versions of the \`@clerk/shared\` package in your project. Use a tool like \`npm ls @clerk/shared\` to identify multiple versions, and update your dependencies to only rely on one.
21
22Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}function RV(t){const e=function(){};let n;return n=new Proxy(e,{get(r,s){if(s!=="then")return s==="toString"?()=>`[${t}]`:s===Symbol.toPrimitive?()=>0:n},apply(){return n},construct(){return n},has(){return!1},set(){return!1}}),n}RV("ClerkMockQueryClient");function DV(){const t=Of(),e=j_(),n=N.useCallback(()=>e?.user,[e?.user]);return N.useSyncExternalStore(N.useCallback(r=>t.addListener(r,{skipInitialEmit:!0}),[t]),N.useCallback(()=>!t.loaded||!t.__internal_lastEmittedResources?n():t.__internal_lastEmittedResources.user,[t,n]),n)}const E_=()=>(GS("useClerk"),Of());typeof window<"u"?z.useLayoutEffect:z.useEffect;const OA="useUser";function _V(){GS(OA);const t=DV();return Of().telemetry?.record(C_(OA)),t===void 0?{isLoaded:!1,isSignedIn:void 0,user:void 0}:t===null?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:t}}const RA=Mh;function PV(t){t||NV()}function LV(t){const e=t.clerk;if(PV(e),t.initialState instanceof Promise&&!("use"in z&&typeof z.use=="function"))throw new Error("initialState cannot be a promise if React version is less than 19");const n=z.useMemo(()=>({value:e}),[t.clerkStatus]);return z.createElement(AV,{initialState:t.initialState},z.createElement(N_.Provider,{value:n},z.createElement(OV,{value:void 0},t.children)))}const IV=t=>{const e=N.useRef(t);return N.useEffect(()=>{e.current=t},[t]),e.current},Qr=(t,e,n)=>{const r=!!n,s=N.useRef(n);N.useEffect(()=>{s.current=n},[n]),N.useEffect(()=>{if(!r||!t)return()=>{};const i=(...a)=>{s.current&&s.current(...a)};
22return t.on(e,i),()=>{t.off(e,i)}},[r,e,t,s])},T_=z.createContext(null);T_.displayName="ElementsContext";const UV=(t,e)=>{if(!t)throw new Error(`Could not find Elements context; You need to wrap the part of your app that ${e} in an <Elements> provider.`);return t},Sg=t=>t!==null&&typeof t=="object",BV=(t,e,n)=>Sg(t)?Object.keys(t).reduce((r,s)=>{const i=!Sg(e)||!A_(t[s],e[s]);return n.includes(s)?(i&&console.warn(`Unsupported prop change: options.${s} is not a mutable property.`),r):i?{...r||{},[s]:t[s]}:r},null):null,DA="[object Object]",A_=(t,e)=>{if(!Sg(t)||!Sg(e))return t===e;const n=Array.isArray(t);if(n!==Array.isArray(e))return!1;const r=Object.prototype.toString.call(t)===DA;if(r!==(Object.prototype.toString.call(e)===DA))return!1;if(!r&&!n)return t===e;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;const a={};for(let m=0;m<s.length;m+=1)a[s[m]]=!0;for(let m=0;m<i.length;m+=1)a[i[m]]=!0;const l=Object.keys(a);if(l.length!==s.length)return!1;const d=t,h=e,p=m=>A_(d[m],h[m]);return l.every(p)},_A=t=>UV(z.useContext(T_),t),FV=t=>t.charAt(0).toUpperCase()+t.slice(1),zV=(t,e)=>{const n=`${FV(t)}Element`,i=e?a=>{_A(`mounts <${n}>`);const{id:l,className:d}=a;return z.createElement("div",{id:l,className:d})}:({id:a,className:l,fallback:d,options:h={},onBlur:p,onFocus:m,onReady:g,onChange:x,onEscape:v,onClick:S,onLoadError:C,onLoaderStart:j,onNetworksChange:E,onConfirm:A,onCancel:D,onShippingAddressChange:M,onShippingRateChange:I})=>{const _=_A(`mounts <${n}>`),L="elements"in _?_.elements:null,[V,B]=z.useState(null),K=z.useRef(null),ee=z.useRef(null),[ie,se]=N.useState(!1);Qr(V,"blur",p),Qr(V,"focus",m),Qr(V,"escape",v),Qr(V,"click",S),Qr(V,"loaderror",C),Qr(V,"loaderstart",j),Qr(V,"networkschange",E),Qr(V,"confirm",A),Qr(V,"cancel",D),Qr(V,"shippingaddresschange",M),Qr(V,"shippingratechange",I),Qr(V,"change",x);let he;g&&(he=()=>{se(!0),g(V)}),Qr(V,"ready",he),z.useLayoutEffect(()=>{if(K.current===null&&ee.current!==null&&L){let Q=null;L&&(Q=L.create(t,h)),K.current=Q,B(Q),Q&&Q.mount(ee.current)}},[L,h]);const $=IV(h);return z.useEffect(()=>{if(!K.current)return;const Q=BV(h,$,["paymentRequest"]);Q&&"update"in K.current&&K.current.update(Q)},[h,$]),z.useLayoutEffect(()=>()=>{if(K.current&&typeof K.current.destroy=="function")try{K.current.destroy(),K.current=null}catch{}},[]),z.createElement(z.Fragment,null,!ie&&d,z.createElement("div",{id:a,style:{height:ie?"unset":"0px",visibility:ie?"visible":"hidden"},className:l,ref:ee}))};return i.displayName=n,i.__elementType=t,i};zV("payment",typeof window>"u");Xu("PaymentElementContext");Xu("StripeUtilsContext");const[Lke,,qV]=Xu("PortalProvider"),VV=()=>{const t=qV();return t&&"getContainer"in t&&t.getContainer?t.getContainer:()=>null};var oa=v_({packageName:"@clerk/react"});function $V(t){oa.setMessages(t).setPackageName(t)}var M_=Of,YS=t=>{GS(()=>{oa.throwMissingClerkProviderError({source:t})})};const HV=()=>{try{return!1}catch{}return!1},KV=()=>{try{return!1}catch{}return!1},WV=()=>{try{return!0}catch{}return!1};function uv(t,e,n){if(typeof t=="function")return t(e);if(typeof t<"u")return t;if(typeof n<"u")return n}const vr=t=>{HV()&&console.error(`Clerk: ${t}`)},dv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_CLERK_PROXY_URL:"/api/__clerk",VITE_CLERK_PUBLISHABLE_KEY:"pk_live_Y2xlcmsud3d3LjEwMHgxMDAuY29tJA"};var hv={};const PA=(t,e)=>{if(typeof process<"u"&&hv&&typeof hv[t]=="string")return hv[t];if(typeof import.meta<"u"&&dv&&typeof dv[t]=="string")return dv[t];try{return globalThis[t]}catch{}return""};var $s=XD();const QS=Qy($s),GV=Yy({__proto__:null,default:QS},[$s]),LA=(t,...e)=>{const n={...t};for(const r of e)delete n[r];return n};function rf(){return typeof window<"u"}var YV="You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",QV=t=>`You've passed multiple children components to <${t}/>. You can only pass a single child component or text.`,XV="Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support",fv="Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",JV="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",ZV="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",e$="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",t$="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",n$=t=>`<${t} /> can only accept <${t}.Page /> and <${t}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,r$=t=>`Missing props. <${t}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,s$=t=>`Missing props. <${t}.Link /> component requires the following props: url, label and labelIcon.`,i$="<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.",a$="<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.",o$="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",l$="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",c$="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",u$="Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.",d$="Missing props. <UserButton.Action /> component requires the following props: label.",Zy=t=>e=>{try{return z.Children.only(t)}catch{return oa.throw(QV(e))}},ex=(t,e)=>(t||(t=e),typeof t=="string"&&(t=z.createElement("button",null,t)),t),tx=t=>(...e)=>{if(t&&typeof t=="function")return t(...e)},h$=t=>PA(`VITE_${t}`)||PA(t),f$=(t,e)=>t!==void 0?t:h$(e)||void 0,p$=t=>{const e=f$(t.publishableKey,"CLERK_PUBLISHABLE_KEY");return{...t,...e!==void 0&&{publishableKey:e}}};function IA(t){return typeof t=="function"}
22var fm=new Map;function m$(t,e,n=1){z.useEffect(()=>{const r=fm.get(t)||0;return r==n?oa.throw(e):(fm.set(t,r+1),()=>{fm.set(t,(fm.get(t)||1)-1)})},[])}function g$(t,e,n){const r=t.displayName||t.name||e||"Component",s=i=>(m$(e,n),z.createElement(t,{...i}));return s.displayName=`withMaxAllowedInstancesGuard(${r})`,s}var Oh=t=>{const[e,n]=N.useState(new Map);return t.map(r=>({id:r.id,mount:s=>n(i=>new Map(i).set(String(r.id),s)),unmount:()=>n(s=>{const i=new Map(s);return i.set(String(r.id),null),i}),portal:()=>{const s=e.get(String(r.id));return s?$s.createPortal(r.component,s):null}}))},xr=(t,e)=>!!t&&z.isValidElement(t)&&t?.type===e,O_=(t,e)=>__({children:t,reorderItemsLabels:["account","security","billing","apiKeys"],LinkComponent:Df,PageComponent:Rf,MenuItemsComponent:rx,componentName:"UserProfile"},e),R_=(t,e)=>__({children:t,reorderItemsLabels:["general","members","billing","apiKeys"],LinkComponent:ix,PageComponent:sx,componentName:"OrganizationProfile"},e),D_=t=>{const e=[],n=[ix,sx,rx,Rf,Df];return z.Children.forEach(t,r=>{n.some(s=>xr(r,s))||e.push(r)}),e},__=(t,e)=>{const{children:n,LinkComponent:r,PageComponent:s,MenuItemsComponent:i,reorderItemsLabels:a,componentName:l}=t,{allowForAnyChildren:d=!1}=e||{},h=[];z.Children.forEach(n,E=>{if(!xr(E,s)&&!xr(E,r)&&!xr(E,i)){E&&!d&&vr(n$(l));return}const{props:A}=E,{children:D,label:M,url:I,labelIcon:_}=A;if(xr(E,s))if(UA(A,a))h.push({label:M});else if(pv(A))h.push({label:M,labelIcon:_,children:D,url:I});else{vr(r$(l));return}if(xr(E,r))if(mv(A))h.push({label:M,labelIcon:_,url:I});else{vr(s$(l));return}});const p=[],m=[],g=[];h.forEach((E,A)=>{if(pv(E)){p.push({component:E.children,id:A}),m.push({component:E.labelIcon,id:A});return}mv(E)&&g.push({component:E.labelIcon,id:A})});const x=Oh(p),v=Oh(m),S=Oh(g),C=[],j=[];return h.forEach((E,A)=>{if(UA(E,a)){C.push({label:E.label});return}if(pv(E)){const{portal:D,mount:M,unmount:I}=x.find(B=>B.id===A),{portal:_,mount:L,unmount:V}=v.find(B=>B.id===A);C.push({label:E.label,url:E.url,mount:M,unmount:I,mountIcon:L,unmountIcon:V}),j.push(D),j.push(_);return}if(mv(E)){const{portal:D,mount:M,unmount:I}=S.find(_=>_.id===A);C.push({label:E.label,url:E.url,mountIcon:M,unmountIcon:I}),j.push(D);return}}),{customPages:C,customPagesPortals:j}},UA=(t,e)=>{const{children:n,label:r,url:s,labelIcon:i}=t;return!n&&!s&&!i&&e.some(a=>a===r)},pv=t=>{const{children:e,label:n,url:r,labelIcon:s}=t;return!!e&&!!r&&!!s&&!!n},mv=t=>{const{children:e,label:n,url:r,labelIcon:s}=t;return!e&&!!r&&!!s&&!!n},y$=(t,e)=>{var n;return x$({children:t,reorderItemsLabels:["manageAccount","signOut"],MenuItemsComponent:rx,MenuActionComponent:L_,MenuLinkComponent:I_,UserProfileLinkComponent:Df,UserProfilePageComponent:Rf,allowForAnyChildren:(n=e?.allowForAnyChildren)!=null?n:!1})},x$=({children:t,MenuItemsComponent:e,MenuActionComponent:n,MenuLinkComponent:r,UserProfileLinkComponent:s,UserProfilePageComponent:i,reorderItemsLabels:a,allowForAnyChildren:l=!1})=>{const d=[],h=[],p=[];z.Children.forEach(t,S=>{if(!xr(S,e)&&!xr(S,s)&&!xr(S,i)){S&&!l&&vr(i$);return}if(xr(S,s)||xr(S,i))return;const{props:C}=S;z.Children.forEach(C.children,j=>{if(!xr(j,n)&&!xr(j,r)){j&&vr(a$);return}const{props:E}=j,{label:A,labelIcon:D,href:M,onClick:I,open:_}=E;if(xr(j,n))if(BA(E,a))d.push({label:A});else if(gv(E)){const L={label:A,labelIcon:D};if(I!==void 0)d.push({...L,onClick:I});else if(_!==void 0)d.push({...L,open:_.startsWith("/")?_:`/${_}`});else{vr("Custom menu item must have either onClick or open property");return}}else{vr(d$);return}if(xr(j,r))if(yv(E))d.push({label:A,labelIcon:D,href:M});else{vr(u$);return}})});const m=[],g=[];d.forEach((S,C)=>{gv(S)&&m.push({component:S.labelIcon,id:C}),yv(S)&&g.push({component:S.labelIcon,id:C})});const x=Oh(m),v=Oh(g);return d.forEach((S,C)=>{if(BA(S,a)&&h.push({label:S.label}),gv(S)){const{portal:j,mount:E,unmount:A}=x.find(M=>M.id===C),D={label:S.label,mountIcon:E,unmountIcon:A};"onClick"in S?D.onClick=S.onClick:"open"in S&&(D.open=S.open),h.push(D),p.push(j)}if(yv(S)){const{portal:j,mount:E,unmount:A}=v.find(D=>D.id===C);h.push({label:S.label,href:S.href,mountIcon:E,unmountIcon:A}),p.push(j)}}),{customMenuItems:h,customMenuItemsPortals:p}},BA=(t,e)=>{const{children:n,label:r,onClick:s,labelIcon:i}=t;return!n&&!s&&!i&&e.some(a=>a===r)},gv=t=>{const{label:e,labelIcon:n,onClick:r,open:s}=t;return!!n&&!!e&&(typeof r=="function"||typeof s=="string")},yv=t=>{const{label:e,href:n,labelIcon:r}=t;return!!n&&!!r&&!!e},b$=t=>{const e=t?.isReady;return n=>new Promise((r,s)=>{const{root:i=document?.body,selector:a,timeout:l=0}=n;if(!i){s(new Error("No root element provided"));return}let d=i;
22if(a&&(d=i?.querySelector(a)),e(d,a)){r();return}const h=new MutationObserver(p=>{for(const m of p)if(!d&&a&&(d=i?.querySelector(a)),(t.childList&&m.type==="childList"||t.attributes&&m.type==="attributes")&&e(d,a)){h.disconnect(),r();return}});h.observe(i,t),l>0&&setTimeout(()=>{h.disconnect(),s(new Error(`Timeout waiting for ${a}`))},l)})},v$=b$({childList:!0,subtree:!0,isReady:(t,e)=>{var n;return!!t?.childElementCount&&((n=t?.matches)==null?void 0:n.call(t,e))&&t.childElementCount>0}});function Zn(t,e){const n=N.useRef(),[r,s]=N.useState("rendering");return N.useEffect(()=>{if(!t)throw new Error("Clerk: no component name provided, unable to detect mount.");if(typeof window<"u"&&!n.current){const i=`[data-clerk-component="${t}"]`,a=e?.selector;n.current=v$({selector:a?i+a:i}).then(()=>{s("rendered")}).catch(()=>{s("error")})}},[t,e?.selector]),r}var pm=t=>"mount"in t,FA=t=>"open"in t,zA=t=>t?.map(({mountIcon:e,unmountIcon:n,...r})=>r),Rn=class extends z.PureComponent{constructor(){super(...arguments),this.rootRef=z.createRef()}componentDidUpdate(t){var e,n,r,s;if(!pm(t)||!pm(this.props))return;const i=LA(t.props,"customPages","customMenuItems","children"),a=LA(this.props.props,"customPages","customMenuItems","children"),l=((e=i.customPages)==null?void 0:e.length)!==((n=a.customPages)==null?void 0:n.length),d=((r=i.customMenuItems)==null?void 0:r.length)!==((s=a.customMenuItems)==null?void 0:s.length),h=zA(t.props.customMenuItems),p=zA(this.props.props.customMenuItems);(!RA(i,a)||!RA(h,p)||l||d)&&this.rootRef.current&&this.props.updateProps({node:this.rootRef.current,props:this.props.props})}componentDidMount(){this.rootRef.current&&(pm(this.props)&&this.props.mount(this.rootRef.current,this.props.props),FA(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.rootRef.current&&(pm(this.props)&&this.props.unmount(this.rootRef.current),FA(this.props)&&this.props.close())}render(){const{hideRootHtmlElement:t=!1}=this.props,e={ref:this.rootRef,...this.props.rootProps,...this.props.component&&{"data-clerk-component":this.props.component}};return z.createElement(z.Fragment,null,!t&&z.createElement("div",{...e}),this.props.children)}},Ot=(t,e)=>{const r=(typeof e=="string"?e:e?.component)||t.displayName||t.name||"Component";t.displayName=r;const s=typeof e=="string"?void 0:e,i=a=>{YS(r||"withClerk");const l=M_(),d=VV();return!l.loaded&&!s?.renderWhileLoading?null:z.createElement(t,{getContainer:d,...a,component:r,clerk:l})};return i.displayName=`withClerk(${r})`,i},nx=t=>{var e,n;return z.createElement(z.Fragment,null,(e=t?.customPagesPortals)==null?void 0:e.map((r,s)=>N.createElement(r,{key:s})),(n=t?.customMenuItemsPortals)==null?void 0:n.map((r,s)=>N.createElement(r,{key:s})))},w$=Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountSignIn,unmount:t.unmountSignIn,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"SignIn",renderWhileLoading:!0}),S$=Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountSignUp,unmount:t.unmountSignUp,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"SignUp",renderWhileLoading:!0});function Rf({children:t}){return vr(JV),z.createElement(z.Fragment,null,t)}function Df({children:t}){return vr(ZV),z.createElement(z.Fragment,null,t)}var k$=Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}},{customPages:l,customPagesPortals:d}=O_(r.children);return z.createElement(z.Fragment,null,i&&n,z.createElement(Rn,{component:e,mount:t.mountUserProfile,unmount:t.unmountUserProfile,updateProps:t.__internal_updateProps,props:{...r,customPages:l},rootProps:a},z.createElement(nx,{customPagesPortals:d})))},{component:"UserProfile",renderWhileLoading:!0});Object.assign(k$,{Page:Rf,Link:Df});var P_=N.createContext({mount:()=>{},unmount:()=>{},updateProps:()=>{}}
22),C$=Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}},{customPages:l,customPagesPortals:d}=O_(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),h={...r.userProfileProps,customPages:l},{customMenuItems:p,customMenuItemsPortals:m}=y$(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),g=D_(r.children),x={mount:t.mountUserButton,unmount:t.unmountUserButton,updateProps:t.__internal_updateProps,props:{...r,userProfileProps:h,customMenuItems:p}},v={customPagesPortals:d,customMenuItemsPortals:m};return z.createElement(P_.Provider,{value:x},i&&n,t.loaded&&z.createElement(Rn,{component:e,...x,hideRootHtmlElement:!!r.__experimental_asProvider,rootProps:a},r.__experimental_asProvider?g:null,z.createElement(nx,{...v})))},{component:"UserButton",renderWhileLoading:!0});function rx({children:t}){return vr(o$),z.createElement(z.Fragment,null,t)}function L_({children:t}){return vr(l$),z.createElement(z.Fragment,null,t)}function I_({children:t}){return vr(c$),z.createElement(z.Fragment,null,t)}function N$(t){const e=N.useContext(P_),n={...e,props:{...e.props,...t}};return z.createElement(Rn,{...n})}Object.assign(C$,{UserProfilePage:Rf,UserProfileLink:Df,MenuItems:rx,Action:L_,Link:I_,__experimental_Outlet:N$});function sx({children:t}){return vr(e$),z.createElement(z.Fragment,null,t)}function ix({children:t}){return vr(t$),z.createElement(z.Fragment,null,t)}var j$=Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}},{customPages:l,customPagesPortals:d}=R_(r.children);return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountOrganizationProfile,unmount:t.unmountOrganizationProfile,updateProps:t.__internal_updateProps,props:{...r,customPages:l},rootProps:a},z.createElement(nx,{customPagesPortals:d})))},{component:"OrganizationProfile",renderWhileLoading:!0});Object.assign(j$,{Page:sx,Link:ix});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountCreateOrganization,unmount:t.unmountCreateOrganization,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"CreateOrganization",renderWhileLoading:!0});var U_=N.createContext({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),E$=Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}},{customPages:l,customPagesPortals:d}=R_(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),h={...r.organizationProfileProps,customPages:l},p=D_(r.children),m={mount:t.mountOrganizationSwitcher,unmount:t.unmountOrganizationSwitcher,updateProps:t.__internal_updateProps,props:{...r,organizationProfileProps:h},rootProps:a,component:e};return t.__experimental_prefetchOrganizationSwitcher(),z.createElement(U_.Provider,{value:m},z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{...m,hideRootHtmlElement:!!r.__experimental_asProvider},r.__experimental_asProvider?p:null,z.createElement(nx,{customPagesPortals:d}))))},{component:"OrganizationSwitcher",renderWhileLoading:!0});function T$(t){const e=N.useContext(U_),n={...e,props:{...e.props,...t}};return z.createElement(Rn,{...n})}Object.assign(E$,{OrganizationProfilePage:sx,OrganizationProfileLink:ix,__experimental_Outlet:T$});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountOrganizationList,unmount:t.unmountOrganizationList,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"OrganizationList",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,open:t.openGoogleOneTap,close:t.closeGoogleOneTap,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"GoogleOneTap",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountWaitlist,unmount:t.unmountWaitlist,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"Waitlist",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e,{selector:'[data-component-status="ready"]'})==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountPricingTable,unmount:t.unmountPricingTable,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"PricingTable",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountAPIKeys,unmount:t.unmountAPIKeys,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"ApiKeys",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.__internal_mountOAuthConsent,unmount:t.__internal_unmountOAuthConsent,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"OAuthConsent",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountUserAvatar,unmount:t.unmountUserAvatar,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"UserAvatar",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountTaskChooseOrganization,unmount:t.unmountTaskChooseOrganization,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"TaskChooseOrganization",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountTaskResetPassword,unmount:t.unmountTaskResetPassword,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"TaskResetPassword",renderWhileLoading:!0});Ot(({clerk:t,component:e,fallback:n,...r})=>{const i=Zn(e)==="rendering"||!t.loaded,a={...i&&n&&{style:{display:"none"}}};return z.createElement(z.Fragment,null,i&&n,t.loaded&&z.createElement(Rn,{component:e,mount:t.mountTaskSetupMFA,unmount:t.unmountTaskSetupMFA,updateProps:t.__internal_updateProps,props:r,rootProps:a}))},{component:"TaskSetupMFA",renderWhileLoading:!0});var A$={actor:void 0,factorVerificationAge:null,orgId:void 0,orgPermissions:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:void 0,sessionStatus:void 0,userId:void 0};function M$(){const t=Of(),e=j_(),n=N.useCallback(()=>e,[e]),r=N.useSyncExternalStore(N.useCallback(i=>t.addListener(i,{skipInitialEmit:!0}),[t]),N.useCallback(()=>!t.loaded||!t.__internal_lastEmittedResources?n():t.__internal_lastEmittedResources,[t,n]),n);return N.useMemo(()=>
22{if(!r)return A$;const i=R$(r)?TA(!1,{},r):TA(!0,r,void 0);return O$(i)},[r])}function O$(t){return{sessionId:t.sessionId,sessionStatus:t.sessionStatus,sessionClaims:t.sessionClaims,userId:t.userId,actor:t.actor,orgId:t.orgId,orgRole:t.orgRole,orgSlug:t.orgSlug,orgPermissions:t.orgPermissions,factorVerificationAge:t.factorVerificationAge}}function R$(t){return!("client"in t)}var B_=t=>new Promise(e=>{const n=r=>{["ready","degraded"].includes(r)&&(e(),t.off("status",n))};t.on("status",n,{notify:!0})}),D$=t=>async e=>{if(!rf())throw new KS("useAuth().getToken() can only be used in browser environments. To access auth data server-side, see the Auth object reference doc: https://clerk.com/docs/reference/backend/types/auth-object",{code:"clerk_runtime_not_browser"});return await B_(t),t.session?t.session.getToken(e):null},_$=t=>async(...e)=>(await B_(t),t.signOut(...e)),ax=(t={})=>{var e;YS("useAuth");const{treatPendingAsSignedOut:n}=t??{},r=M$(),s=M_(),i=N.useCallback(D$(s),[s]),a=N.useCallback(_$(s),[s]);return(e=s.telemetry)==null||e.record(C_("useAuth",{treatPendingAsSignedOut:n})),P$({...r,getToken:i,signOut:a},{treatPendingAsSignedOut:n})};function P$(t,{treatPendingAsSignedOut:e=!0}={}){const{userId:n,orgId:r,orgRole:s,has:i,signOut:a,getToken:l,orgPermissions:d,factorVerificationAge:h,sessionClaims:p}=t??{},m=N.useCallback(x=>i?i(x):xV({userId:n,orgId:r,orgRole:s,orgPermissions:d,factorVerificationAge:h,features:p?.fea||"",plans:p?.pla||""})(x),[i,n,r,s,d,h,p]),g=bV({authObject:{...t,getToken:l,signOut:a,has:m},options:{treatPendingAsSignedOut:e}});return g||oa.throw(XV)}var F_=t=>{throw TypeError(t)},XS=(t,e,n)=>e.has(t)||F_("Cannot "+n),St=(t,e,n)=>(XS(t,e,"read from private field"),n?n.call(t):e.get(t)),eo=(t,e,n)=>e.has(t)?F_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),il=(t,e,n,r)=>(XS(t,e,"write to private field"),e.set(t,n),n),xv=(t,e,n)=>(XS(t,e,"access private method"),n),L$=[[18,0,-1,0],[19,0,0,3],[19,1,1,4],[19,2,2,3],[19,3,3,0]];const qA=new Set,ox=(t,e,n)=>{const r=KV()||WV(),s=t;qA.has(s)||r||(qA.add(s),console.warn(`Clerk - DEPRECATION WARNING: "${t}" is deprecated and will be removed in the next major release.
23${e}`))};function I$(t){const e=t.match(/^(\d+)\.(\d+)\.(\d+)/);if(!e)return null;const[,n,r,s]=e;return{major:parseInt(n,10),minor:parseInt(r,10),patch:parseInt(s,10)}}function U$(t,e){const{major:n,minor:r,patch:s}=t;return e.some(([i,a,l,d])=>n!==i?!1:l===-1?r>a||r===a&&s>=d:r===l&&s>=d)}function B$(t,e){const n=I$(t);return n?U$(n,e):!1}const VA=(t,e,n,r,s)=>{const{notify:i}=s||{};let a=t.get(n);a||(a=[],t.set(n,a)),a.push(r),i&&e.has(n)&&r(e.get(n))},$A=(t,e,n)=>(t.get(e)||[]).map(r=>r(n)),HA=(t,e,n)=>{const r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},F$=()=>{const t=new Map,e=new Map,n=new Map;return{on:(...s)=>VA(t,e,...s),prioritizedOn:(...s)=>VA(n,e,...s),emit:(s,i)=>{e.set(s,i),$A(n,s,i),$A(t,s,i)},off:(...s)=>HA(t,...s),prioritizedOff:(...s)=>HA(n,...s),internal:{retrieveListeners:s=>t.get(s)||[]}}},qc={Status:"status"},z$=()=>F$(),q$={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(t,e)=>e<5,retryImmediately:!1,jitter:!0},V$=100,z_=async t=>new Promise(e=>setTimeout(e,t)),q_=(t,e)=>e?t*(1+Math.random()):t,$$=t=>{let e=0;const n=()=>{const r=t.initialDelay,s=t.factor;let i=r*Math.pow(s,e);return i=q_(i,t.jitter),Math.min(t.maxDelayBetweenRetries||i,i)};return async()=>{await z_(n()),e++}},H$=async(t,e={})=>{let n=0;const{shouldRetry:r,initialDelay:s,maxDelayBetweenRetries:i,factor:a,retryImmediately:l,jitter:d,onBeforeRetry:h}={...q$,...e},p=$$({initialDelay:s,maxDelayBetweenRetries:i,factor:a,jitter:d});for(;;)try{return await t()}catch(m){if(n++,!r(m,n))throw m;h&&await h(n),l&&n===1?await z_(q_(V$,d)):await p()}},K$="loadScript cannot be called when document does not exist",W$="loadScript cannot be called without a src";async function V_(t="",e){const{async:n,defer:r,beforeLoad:s,crossOrigin:i,nonce:a}=e||{};return H$(()=>new Promise((d,h)=>{t||h(new Error(W$)),(!document||!document.body)&&h(new Error(K$));const p=document.createElement("script");i&&p.setAttribute("crossorigin",i),p.async=n||!1,p.defer=r||!1,p.addEventListener("load",()=>{p.remove(),d(p)}),p.addEventListener("error",m=>{p.remove(),h(m.error??new Error(`failed to load script: ${t}`))}),p.src=t,p.nonce=a,s?.(p),document.body.appendChild(p)}),{shouldRetry:(d,h)=>h<=5})}function G$(t){return t?Y$(t)||$_(t):!0}function Y$(t){return/^http(s)?:\/\//.test(t||"")}function $_(t){return t.startsWith("/")}function Q$(t){return t?$_(t)?new URL(t,window.location.origin).toString():t:""}
23function X$(t){if(!t)return"";let e;if(t.match(/^(clerk\.)+\w*$/))e=/(clerk\.)*(?=clerk\.)/;else{if(t.match(/\.clerk.accounts/))return t;e=/^(clerk\.)*/gi}return`clerk.${t.replace(e,"")}`}const H_=(t,e="6.7.7")=>{if(t)return t;const n=J$(e);return n?n==="snapshot"?e:n:Z$(e)},J$=t=>t.trim().replace(/^v/,"").match(/-(.+?)(\.|$)/)?.[1],Z$=t=>t.trim().replace(/^v/,"").split(".")[0],{isDevOrStagingUrl:e9}=sV(),JS=v_({packageName:"@clerk/shared"});function K_(t){return typeof window>"u"||!window[t]?!1:!!window[t]}const bv=()=>K_("Clerk"),vv=()=>K_("__internal_ClerkUICtor");function W_(t){if(typeof window>"u"||!window.performance)return!1;const e=performance.getEntriesByName(t,"resource");if(e.length===0)return!1;const n=e[e.length-1];return n.transferSize===0&&n.decodedBodySize===0&&(n.responseEnd===0||n.responseEnd>0&&n.responseStart>0||"responseStatus"in n&&(n.responseStatus>=400||n.responseStatus===0))}const t9=async t=>{const e=t?.scriptLoadTimeout??15e3,n=a=>new KS("Failed to load Clerk JS"+(a?.message?`, ${a.message}`:""),{code:"failed_to_load_clerk_js",cause:a});if(bv())return null;if(!t?.publishableKey)return JS.throwMissingPublishableKeyError(),null;const r=r9(t),s=document.querySelector("script[data-clerk-js-script]");if(s)if(W_(r))s.remove();else try{return await kg(e,bv,n(),s),null}catch{s.remove()}const i=kg(e,bv,n());return V_(r,{async:!0,crossOrigin:"anonymous",nonce:t.nonce,beforeLoad:Y_(G_(t))}).catch(a=>{throw n(a)}),i},n9=async t=>{const e=t?.scriptLoadTimeout??15e3,n=a=>new KS("Failed to load Clerk UI"+(a?.message?`, ${a.message}`:""),{code:"failed_to_load_clerk_ui",cause:a});if(vv())return null;if(!t?.publishableKey)return JS.throwMissingPublishableKeyError(),null;const r=s9(t),s=document.querySelector("script[data-clerk-ui-script]");if(s)if(W_(r))s.remove();else try{return await kg(e,vv,n(),s),null}catch{s.remove()}const i=kg(e,vv,n());return V_(r,{async:!0,crossOrigin:"anonymous",nonce:t.nonce,beforeLoad:Y_(i9(t))}).catch(a=>{throw n(a)}),i},r9=t=>{const{__internal_clerkJSUrl:e,__internal_clerkJSVersion:n,proxyUrl:r,domain:s,publishableKey:i}=t;return e||`https://${Q_({publishableKey:i,proxyUrl:r,domain:s})}/npm/@clerk/clerk-js@${H_(n)}/dist/clerk.browser.js`},s9=t=>{const{__internal_clerkUIUrl:e,__internal_clerkUIVersion:n,proxyUrl:r,domain:s,publishableKey:i}=t;return e||`https://${Q_({publishableKey:i,proxyUrl:r,domain:s})}/npm/@clerk/ui@${H_(n,"1.6.7")}/dist/ui.browser.js`},G_=t=>{const e={};return t.publishableKey&&(e["data-clerk-publishable-key"]=t.publishableKey),t.proxyUrl&&(e["data-clerk-proxy-url"]=t.proxyUrl),t.domain&&(e["data-clerk-domain"]=t.domain),t.nonce&&(e.nonce=t.nonce),e},i9=t=>G_(t),Y_=t=>e=>{for(const n in t)e.setAttribute(n,t[n])},Q_=t=>{const{proxyUrl:e,domain:n,publishableKey:r}=t;return e&&G$(e)?Q$(e).replace(/http(s)?:\/\//,""):n&&!e9(SA(r)?.frontendApi||"")?X$(n):SA(r)?.frontendApi||""};function kg(t,e,n,r){return new Promise((s,i)=>{let a=!1;const l=(g,x)=>{clearTimeout(g),clearInterval(x)};r?.addEventListener("error",()=>{l(p,m),i(n)});const d=()=>{a||e()&&(a=!0,l(p,m),s(null))},p=setTimeout(()=>{a||(a=!0,l(p,m),e()?s(null):i(n))},t);d();const m=setInterval(()=>{if(a){clearInterval(m);return}d()},100)})}function a9(t){JS.setPackageName({packageName:t})}var s1=({children:t,fallback:e,treatPendingAsSignedOut:n,when:r})=>{YS("Show");const{has:s,isLoaded:i,userId:a}=ax({treatPendingAsSignedOut:n});if(!i)return null;const l=r,d=t,h=e??null;return l==="signed-out"?a?h:d:a&&(l==="signed-in"||o9(l,s))?d:h};function o9(t,e){return typeof t=="function"?t(e):e(t)}Ot(({clerk:t,...e})=>{var n,r;const{client:s,session:i}=t,a=((r=(n=s.signedInSessions)==null?void 0:n.length)!=null?r:0)>0;return z.useEffect(()=>{i===null&&a?t.redirectToAfterSignOut():t.redirectToSignIn(e)},[]),null},"RedirectToSignIn");Ot(({clerk:t,...e})=>(z.useEffect(()=>{t.redirectToSignUp(e)},[]),null),"RedirectToSignUp");Ot(({clerk:t,...e})=>(z.useEffect(()=>{t.redirectToTasks(e)},[]),null),"RedirectToTasks");Ot(({clerk:t})=>(z.useEffect(()=>{ox("RedirectToUserProfile","Use the `redirectToUserProfile()` method instead."),t.redirectToUserProfile()},[]),null),"RedirectToUserProfile");Ot(({clerk:t})=>(z.useEffect(()=>{ox("RedirectToOrganizationProfile","Use the `redirectToOrganizationProfile()` method instead."),t.redirectToOrganizationProfile()},[]),null),"RedirectToOrganizationProfile");Ot(({clerk:t})=>(z.useEffect(()=>{ox("RedirectToCreateOrganization","Use the `redirectToCreateOrganization()` method instead."),t.redirectToCreateOrganization()},[]),null),"RedirectToCreateOrganization");Ot(({clerk:t,...e})=>(z.useEffect(()=>{t.handleRedirectCallback(e)},[]),null),"AuthenticateWithRedirectCallback");function l9(){try{return B$(z.version,L$)}catch{return!1}}var c9=l9(),u9=()=>({fields:{identifier:null,password:null,code:null},raw:null,global:null}),d9=()=>({fields:{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null},raw:null,global:null}),h9=()=>({fields:{emailAddress:null},raw:null,global:null}),KA=()=>({pathRoot:"",attempts:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient(){return!1},reload(){throw new Error("reload() called before Clerk is loaded")},__internal_toSnapshot(){return{object:"verification",id:"",attempts:null,error:{code:"",message:""},expire_at:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verified_at_client:null}}}),mm=()=>({...KA(),supportedStrategies:[],nextAction:"",reload(){throw new Error("reload() called before Clerk is loaded")},__internal_toSnapshot(){return{...KA().__internal_toSnapshot(),next_action:this.nextAction,supported_strategies:this.supportedStrategies}}}),f9=class{constructor(t){this.isomorphicClerk=t,this.signInSignalProxy=this.buildSignInProxy(),this.signUpSignalProxy=this.buildSignUpProxy(),this.waitlistSignalProxy=this.buildWaitlistProxy()}signInSignal(){return this.signInSignalProxy}signUpSignal(){return this.signUpSignalProxy}waitlistSignal(){return this.waitlistSignalProxy}get __internal_waitlist(){return this.state.__internal_waitlist}checkoutSignal(t){return this.buildCheckoutProxy(t)}buildSignInProxy(){const t=this.gateProperty.bind(this),e=()=>this.client.signIn.__internal_future;return{errors:u9(),fetchStatus:"idle",signIn:{status:"needs_identifier",availableStrategies:[],get isTransferable(){return t(e,"isTransferable",!1)},get id(){return t(e,"id",void 0)},get supportedFirstFactors(){return t(e,"supportedFirstFactors",[])},get supportedSecondFactors(){return t(e,"supportedSecondFactors",[])},get secondFactorVerification(){return t(e,"secondFactorVerification",{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw new Error("__internal_toSnapshot called before Clerk is loaded")},pathRoot:"",reload:()=>{throw new Error("__internal_toSnapshot called before Clerk is loaded")}})},get identifier(){return t(e,"identifier",null)}
23,get createdSessionId(){return t(e,"createdSessionId",null)},get userData(){return t(e,"userData",{})},get firstFactorVerification(){return t(e,"firstFactorVerification",{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw new Error("__internal_toSnapshot called before Clerk is loaded")},pathRoot:"",reload:()=>{throw new Error("__internal_toSnapshot called before Clerk is loaded")}})},get canBeDiscarded(){return t(e,"canBeDiscarded",!1)},create:this.gateMethod(e,"create"),password:this.gateMethod(e,"password"),sso:this.gateMethod(e,"sso"),finalize:this.gateMethod(e,"finalize"),reset:this.gateMethod(e,"reset"),emailCode:this.wrapMethods(()=>e().emailCode,["sendCode","verifyCode"]),emailLink:this.wrapStruct(()=>e().emailLink,["sendLink","waitForVerification"],["verification"],{verification:null}),resetPasswordEmailCode:this.wrapMethods(()=>e().resetPasswordEmailCode,["sendCode","verifyCode","submitPassword"]),resetPasswordPhoneCode:this.wrapMethods(()=>e().resetPasswordPhoneCode,["sendCode","verifyCode","submitPassword"]),phoneCode:this.wrapMethods(()=>e().phoneCode,["sendCode","verifyCode"]),mfa:this.wrapMethods(()=>e().mfa,["sendPhoneCode","verifyPhoneCode","sendEmailCode","verifyEmailCode","verifyTOTP","verifyBackupCode"]),ticket:this.gateMethod(e,"ticket"),passkey:this.gateMethod(e,"passkey"),web3:this.gateMethod(e,"web3")}}}buildSignUpProxy(){const t=this.gateProperty.bind(this),e=this.gateMethod.bind(this),n=()=>this.client.signUp.__internal_future;return{errors:d9(),fetchStatus:"idle",signUp:{get id(){return t(n,"id",void 0)},get requiredFields(){return t(n,"requiredFields",[])},get optionalFields(){return t(n,"optionalFields",[])},get missingFields(){return t(n,"missingFields",[])},get username(){return t(n,"username",null)},get firstName(){return t(n,"firstName",null)},get lastName(){return t(n,"lastName",null)},get emailAddress(){return t(n,"emailAddress",null)},get phoneNumber(){return t(n,"phoneNumber",null)},get web3Wallet(){return t(n,"web3Wallet",null)},get hasPassword(){return t(n,"hasPassword",!1)},get unsafeMetadata(){return t(n,"unsafeMetadata",{})},get createdSessionId(){return t(n,"createdSessionId",null)},get createdUserId(){return t(n,"createdUserId",null)},get abandonAt(){return t(n,"abandonAt",null)},get legalAcceptedAt(){return t(n,"legalAcceptedAt",null)},get locale(){return t(n,"locale",null)},get status(){return t(n,"status","missing_requirements")},get unverifiedFields(){return t(n,"unverifiedFields",[])},get isTransferable(){return t(n,"isTransferable",!1)},get canBeDiscarded(){return t(n,"canBeDiscarded",!1)},create:e(n,"create"),update:e(n,"update"),sso:e(n,"sso"),password:e(n,"password"),ticket:e(n,"ticket"),web3:e(n,"web3"),finalize:e(n,"finalize"),reset:e(n,"reset"),verifications:this.wrapStruct(()=>n().verifications,["sendEmailCode","verifyEmailCode","sendEmailLink","waitForEmailLinkVerification","sendPhoneCode","verifyPhoneCode"],["emailAddress","phoneNumber","web3Wallet","externalAccount","emailLinkVerification"],{emailAddress:mm(),phoneNumber:mm(),web3Wallet:mm(),externalAccount:mm(),emailLinkVerification:null})}}}buildWaitlistProxy(){const t=this.gateProperty.bind(this),e=this.gateMethod.bind(this),n=()=>this.state.__internal_waitlist;return{errors:h9(),fetchStatus:"idle",waitlist:{pathRoot:"/waitlist",get id(){return t(n,"id","")},get createdAt(){return t(n,"createdAt",null)},get updatedAt(){return t(n,"updatedAt",null)},join:e(n,"join"),reload:e(n,"reload")}}}buildCheckoutProxy(t){const e=this.gateProperty.bind(this),n=()=>this.checkout(t),r=()=>n().checkout;return{errors:{raw:null,global:null},fetchStatus:"idle",checkout:{get status(){return e(r,"status","needs_initialization")},get externalClientSecret(){return e(r,"externalClientSecret",null)},get externalGatewayId(){return e(r,"externalGatewayId",null)},get paymentMethod(){return e(r,"paymentMethod",null)},get plan(){return e(r,"plan",null)},get planPeriod(){return e(r,"planPeriod",null)},get totals(){return e(r,"totals",null)},get isImmediatePlanChange(){return e(r,"isImmediatePlanChange",!1)},get freeTrialEndsAt(){return e(r,"freeTrialEndsAt",null)},get payer(){return e(r,"payer",null)},get planPeriodStart(){return e(r,"planPeriodStart",null)},get needsPaymentMethod(){return e(r,"needsPaymentMethod",null)},start:this.gateMethod(r,"start"),confirm:this.gateMethod(r,"confirm"),finalize:this.gateMethod(r,"finalize")}}}__internal_effect(t){throw new Error("__internal_effect called before Clerk is loaded")}__internal_computed(t){throw new Error("__internal_computed called before Clerk is loaded")}get state(){const t=this.isomorphicClerk.__internal_state;if(!t)throw new Error("Clerk state not ready");return t}get client(){const t=this.isomorphicClerk.client;if(!t)throw new Error("Clerk client not ready");return t}get checkout(){const t=this.isomorphicClerk.__experimental_checkout;if(!t)throw new Error("Clerk checkout not ready");return t}gateProperty(t,e,n){return!rf()||!this.isomorphicClerk.loaded?n:t()[e]}gateMethod(t,e){return(async(...n)=>{if(!rf())return oa.throw(`Attempted to call a method (${e}) that is not supported on the server.`);this.isomorphicClerk.loaded||await new Promise(s=>this.isomorphicClerk.addOnLoaded(s));const r=t();return r[e].apply(r,n)})}wrapMethods(t,e){return Object.fromEntries(e.map(n=>[n,this.gateMethod(t,n)]))}wrapStruct(t,e,n,r){const s={};for(const i of e)s[i]=this.gateMethod(t,i);for(const i of n)Object.defineProperty(s,i,{get:()=>this.gateProperty(t,i,r[i]),enumerable:!0});return s}};typeof globalThis.__BUILD_DISABLE_RHC__>"u"&&(globalThis.__BUILD_DISABLE_RHC__=!1);var p9={name:"@clerk/react",version:"6.4.5",environment:"production"},Zm,lu,cu,Us,ps,bh,io,vh,eg,X_=class J_{constructor(e){eo(this,vh),this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenEnableOrganizationsPrompt=null,this.preopenSignIn=null,this.preopenCheckout=null,this.preopenPlanDetails=null,this.preopenSubscriptionDetail
23s=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.preOpenWaitlist=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserAvatarNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountWaitlistNodes=new Map,this.premountPricingTableNodes=new Map,this.premountAPIKeysNodes=new Map,this.premountOAuthConsentNodes=new Map,this.premountTaskChooseOrganizationNodes=new Map,this.premountTaskResetPasswordNodes=new Map,this.premountTaskSetupMFANodes=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],eo(this,Zm,"loading"),eo(this,lu),eo(this,cu),eo(this,Us),eo(this,ps,z$()),eo(this,bh),this.buildSignInUrl=r=>{const s=()=>{var i;return((i=this.clerkjs)==null?void 0:i.buildSignInUrl(r))||""};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("buildSignInUrl",s)},this.buildSignUpUrl=r=>{const s=()=>{var i;return((i=this.clerkjs)==null?void 0:i.buildSignUpUrl(r))||""};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("buildSignUpUrl",s)},this.buildAfterSignInUrl=(...r)=>{const s=()=>{var i;return((i=this.clerkjs)==null?void 0:i.buildAfterSignInUrl(...r))||""};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("buildAfterSignInUrl",s)},this.buildAfterSignUpUrl=(...r)=>{const s=()=>{var i;return((i=this.clerkjs)==null?void 0:i.buildAfterSignUpUrl(...r))||""};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("buildAfterSignUpUrl",s)},this.buildAfterSignOutUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildAfterSignOutUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildAfterSignOutUrl",r)},this.buildNewSubscriptionRedirectUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildNewSubscriptionRedirectUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildNewSubscriptionRedirectUrl",r)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildAfterMultiSessionSingleSignOutUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildAfterMultiSessionSingleSignOutUrl",r)},this.buildUserProfileUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildUserProfileUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildUserProfileUrl",r)},this.buildCreateOrganizationUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildCreateOrganizationUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildCreateOrganizationUrl",r)},this.buildOrganizationProfileUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildOrganizationProfileUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildOrganizationProfileUrl",r)},this.buildWaitlistUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildWaitlistUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildWaitlistUrl",r)},this.buildTasksUrl=()=>{const r=()=>{var s;return((s=this.clerkjs)==null?void 0:s.buildTasksUrl())||""};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("buildTasksUrl",r)},this.buildUrlWithAuth=r=>{const s=()=>{var i;return((i=this.clerkjs)==null?void 0:i.buildUrlWithAuth(r))||""};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("buildUrlWithAuth",s)},this.handleUnauthenticated=async()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.handleUnauthenticated()};this.clerkjs&&this.loaded?r():this.premountMethodCalls.set("handleUnauthenticated",r)},this.on=(...r)=>{var s;if((s=this.clerkjs)!=null&&s.on)return this.clerkjs.on(...r);St(this,ps).on(...r)},this.off=(...r)=>{var s;if((s=this.clerkjs)!=null&&s.off)return this.clerkjs.off(...r);St(this,ps).off(...r)},this.addOnLoaded=r=>{this.loadedListeners.push(r),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>
23{this.loadedListeners.forEach(r=>r()),this.loadedListeners=[]},this.beforeLoad=r=>{if(!r)throw new Error("Failed to hydrate latest Clerk JS")},this.replayInterceptedInvocations=r=>{var s,i;if(!r)throw new Error("Failed to hydrate latest Clerk JS");return this.clerkjs=r,this.premountMethodCalls.forEach(a=>a()),this.premountAddListenerCalls.forEach((a,l)=>{a.handlers.nativeUnsubscribe=r.addListener(l,a.options)}),(s=St(this,ps).internal.retrieveListeners("status"))==null||s.forEach(a=>{this.on("status",a,{notify:!0})}),(i=St(this,ps).internal.retrieveListeners("queryClientStatus"))==null||i.forEach(a=>{this.on("queryClientStatus",a,{notify:!0})}),this.preopenSignIn!==null&&r.openSignIn(this.preopenSignIn),this.preopenCheckout!==null&&r.__internal_openCheckout(this.preopenCheckout),this.preopenPlanDetails!==null&&r.__internal_openPlanDetails(this.preopenPlanDetails),this.preopenSubscriptionDetails!==null&&r.__internal_openSubscriptionDetails(this.preopenSubscriptionDetails),this.preopenSignUp!==null&&r.openSignUp(this.preopenSignUp),this.preopenUserProfile!==null&&r.openUserProfile(this.preopenUserProfile),this.preopenUserVerification!==null&&r.__internal_openReverification(this.preopenUserVerification),this.preopenOneTap!==null&&r.openGoogleOneTap(this.preopenOneTap),this.preopenOrganizationProfile!==null&&r.openOrganizationProfile(this.preopenOrganizationProfile),this.preopenCreateOrganization!==null&&r.openCreateOrganization(this.preopenCreateOrganization),this.preOpenWaitlist!==null&&r.openWaitlist(this.preOpenWaitlist),this.preopenEnableOrganizationsPrompt&&r.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt),this.premountSignInNodes.forEach((a,l)=>{r.mountSignIn(l,a)}),this.premountSignUpNodes.forEach((a,l)=>{r.mountSignUp(l,a)}),this.premountUserProfileNodes.forEach((a,l)=>{r.mountUserProfile(l,a)}),this.premountUserAvatarNodes.forEach((a,l)=>{r.mountUserAvatar(l,a)}),this.premountUserButtonNodes.forEach((a,l)=>{r.mountUserButton(l,a)}),this.premountOrganizationListNodes.forEach((a,l)=>{r.mountOrganizationList(l,a)}),this.premountWaitlistNodes.forEach((a,l)=>{r.mountWaitlist(l,a)}),this.premountPricingTableNodes.forEach((a,l)=>{r.mountPricingTable(l,a)}),this.premountAPIKeysNodes.forEach((a,l)=>{r.mountAPIKeys(l,a)}),this.premountOAuthConsentNodes.forEach((a,l)=>{r.__internal_mountOAuthConsent(l,a)}),this.premountTaskChooseOrganizationNodes.forEach((a,l)=>{r.mountTaskChooseOrganization(l,a)}),this.premountTaskResetPasswordNodes.forEach((a,l)=>{r.mountTaskResetPassword(l,a)}),this.premountTaskSetupMFANodes.forEach((a,l)=>{r.mountTaskSetupMFA(l,a)}),typeof this.clerkjs.status>"u"&&St(this,ps).emit(qc.Status,"ready"),this.emitLoaded(),this.clerkjs},this.__experimental_checkout=(...r)=>this.loaded&&this.clerkjs?this.clerkjs.__experimental_checkout(...r):St(this,bh).checkoutSignal(...r),this.__internal_updateProps=async r=>{const s=await xv(this,vh,eg).call(this);if(s&&"__internal_updateProps"in s)return s.__internal_updateProps(r)},this.setActive=r=>this.clerkjs?this.clerkjs.setActive(r):Promise.reject(),this.openSignIn=r=>{this.clerkjs&&this.loaded?this.clerkjs.openSignIn(r):this.preopenSignIn=r},this.closeSignIn=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__internal_openCheckout=r=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openCheckout(r):this.preopenCheckout=r},this.__internal_closeCheckout=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeCheckout():this.preopenCheckout=null},this.__internal_openPlanDetails=r=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openPlanDetails(r):this.preopenPlanDetails=r},this.__internal_closePlanDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closePlanDetails():this.preopenPlanDetails=null},this.__internal_openSubscriptionDetails=r=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openSubscriptionDetails(r):this.preopenSubscriptionDetails=r??null},this.__internal_closeSubscriptionDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeSubscriptionDetails():this.preopenSubscriptionDetail
23s=null},this.__internal_openReverification=r=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openReverification(r):this.preopenUserVerification=r},this.__internal_closeReverification=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeReverification():this.preopenUserVerification=null},this.__internal_openEnableOrganizationsPrompt=r=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openEnableOrganizationsPrompt(r):this.preopenEnableOrganizationsPrompt=r},this.__internal_closeEnableOrganizationsPrompt=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeEnableOrganizationsPrompt():this.preopenEnableOrganizationsPrompt=null},this.openGoogleOneTap=r=>{this.clerkjs&&this.loaded?this.clerkjs.openGoogleOneTap(r):this.preopenOneTap=r},this.closeGoogleOneTap=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=r=>{this.clerkjs&&this.loaded?this.clerkjs.openUserProfile(r):this.preopenUserProfile=r},this.closeUserProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=r=>{this.clerkjs&&this.loaded?this.clerkjs.openOrganizationProfile(r):this.preopenOrganizationProfile=r},this.closeOrganizationProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=r=>{this.clerkjs&&this.loaded?this.clerkjs.openCreateOrganization(r):this.preopenCreateOrganization=r},this.closeCreateOrganization=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openWaitlist=r=>{this.clerkjs&&this.loaded?this.clerkjs.openWaitlist(r):this.preOpenWaitlist=r},this.closeWaitlist=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeWaitlist():this.preOpenWaitlist=null},this.openSignUp=r=>{this.clerkjs&&this.loaded?this.clerkjs.openSignUp(r):this.preopenSignUp=r},this.closeSignUp=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignIn(r,s):this.premountSignInNodes.set(r,s)},this.unmountSignIn=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignIn(r):this.premountSignInNodes.delete(r)},this.mountSignUp=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignUp(r,s):this.premountSignUpNodes.set(r,s)},this.unmountSignUp=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignUp(r):this.premountSignUpNodes.delete(r)},this.mountUserAvatar=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserAvatar(r,s):this.premountUserAvatarNodes.set(r,s)},this.unmountUserAvatar=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserAvatar(r):this.premountUserAvatarNodes.delete(r)},this.mountUserProfile=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserProfile(r,s):this.premountUserProfileNodes.set(r,s)},this.unmountUserProfile=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserProfile(r):this.premountUserProfileNodes.delete(r)},this.mountOrganizationProfile=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationProfile(r,s):this.premountOrganizationProfileNodes.set(r,s)},this.unmountOrganizationProfile=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationProfile(r):this.premountOrganizationProfileNodes.delete(r)},this.mountCreateOrganization=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountCreateOrganization(r,s):this.premountCreateOrganizationNodes.set(r,s)},this.unmountCreateOrganization=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountCreateOrganization(r):this.premountCreateOrganizationNodes.delete(r)},this.mountOrganizationSwitcher=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationSwitcher(r,s):this.premountOrganizationSwitcherNodes.set(r,s)},this.unmountOrganizationSwitcher=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationSwitcher(r):this.premountOrganizationSwitcherNodes.delete(r)},this.__experimental_prefetchOrganizationSwitcher=()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.__experimental_prefetchOrganizationSwitcher()};this.clerkjs&&this.loaded?r():this.premountMethodCalls.set("__experimental_prefetchOrganizationSwitcher",r)},this.mountOrganizationList=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationList(r,s):this.premountOrganizationListNodes.set(r,s)},this.unmountOrganizationList=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationList(r):this.premountOrganizationListNodes.delete(r)},this.mountUserButton=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserButton(r,s):this.premountUserButtonNodes.set(r,s)},this.unmountUserButton=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserButton(r):this.premountUserButtonNodes.delete(r)},this.mountWaitlist=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountWaitlist(r,s):this.premountWaitlistNodes.set(r,s)},this.unmountWaitlist=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountWaitlist(r):this.premountWaitlistNodes.delete(r)},this.mountPricingTable=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountPricingTable(r,s):this.premountPricingTableNodes.set(r,s)},this.unmountPricingTable=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountPricingTable(r):this.premountPricingTableNodes.delete(r)},this.mountAPIKeys=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountAPIKeys(r,s):this.premountAPIKeysNodes.set(r,s)},this.unmountAPIKeys=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountAPIKeys(r):this.premountAPIKeysNodes.delete(r)},this.__internal_mountOAuthConsent=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountOAuthConsent(r,s):this.premountOAuthConsentNodes.set(r,s)},this.__internal_unmountOAuthConsent=r=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountOAuthConsent(r):this.premountOAuthConsentNodes.delete(r)},this.mountTaskChooseOrganization=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskChooseOrganization(r,s):this.premountTaskChooseOrganizationNodes.set(r,s)},this.unmountTaskChooseOrganization=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskChooseOrganization(r):this.premountTaskChooseOrganizationNodes.delete(r)},this.mountTaskResetPassword=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskResetPassword(r,s):this.premountTaskResetPasswordNodes.set(r,s)},this.unmountTaskResetPassword=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskResetPassword(r):this.premountTaskResetPasswordNodes.delete(r)},this.mountTaskSetupMFA=(r,s)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskSetupMFA(r,s):this.premountTaskSetupMFANodes.set(r,s)},this.unmountTaskSetupMFA=r=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskSetupMFA(r):this.premountTaskSetupMFANodes.delete(r)},this.addListener=(r,s)=>{if(this.clerkjs)return this.clerkjs.addListener(r,s);{const i=()=>{var a,l;const d=this.premountAddListenerCalls.get(r);d?.handlers&&((l=d==null?void 0:(a=d.handlers).nativeUnsubscribe)==null||l.call(a),this.premountAddListenerCalls.delete(r))};return this.premountAddListenerCalls.set(r,{options:s,handlers:{unsubscribe:i,nativeUnsubscribe:void 0}}),i}},this.navigate=r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.navigate(r)};this.clerkjs&&this.loaded?s():this.premountMethodCalls.set("navigate",s)},this.redirectWithAuth=async(...r)=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.redirectWithAuth(...r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("redirectWithAuth",s)},this.redirectToSignIn=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.redirectToSignIn(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("redirectToSignIn",s)},this.redirectToSignUp=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.redirectToSignUp(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("redirectToSignUp",s)},this.redirectToUserProfile=async()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToUserProfile()};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("redirectToUserProfile",r)},this.redirectToAfterSignUp=()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToAfterSignUp()};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("redirectToAfterSignUp",r)},this.redirectToAfterSignIn=()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToAfterSignIn()};this.clerkjs&&this.loaded?r():this.premountMethodCalls.set("redirectToAfterSignIn",r)},this.redirectToAfterSignOut=()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToAfterSignOut()};this.clerkjs&&this.loaded?r():this.premountMethodCalls.set("redirectToAfterSignOut",r)},this.redirectToOrganizationProfile=async()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToOrganizationProfile()};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("redirectToOrganizationProfile",r)},this.redirectToCreateOrganization=async()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToCreateOrganization()};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("redirectToCreateOrganization",r)},this.redirectToWaitlist=async()=>{const r=()=>{var s;return(s=this.clerkjs)==null?void 0:s.redirectToWaitlist()};if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set("redirectToWaitlist",r)},this.redirectToTasks=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.redirectToTasks(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("redirectToTasks",s)},this.handleRedirectCallback=async r=>{var s;const i=()=>{var a;return(a=this.clerkjs)==null?void 0:a.handleRedirectCallback(r)};this.clerkjs&&this.loaded?(s=i())==null||s.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",i)},this.handleGoogleOneTapCallback=async(r,s)=>{var i;const a=()=>{var l;return(l=this.clerkjs)==null?void 0:l.handleGoogleOneTapCallback(r,s)};this.clerkjs&&this.loaded?(i=a())==null||i.catch(()=>{}):this.premountMethodCalls.set("handleGoogleOneTapCallback",a)},this.handleEmailLinkVerification=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.handleEmailLinkVerification(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("handleEmailLinkVerification",s)},this.authenticateWithMetamask=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.authenticateWithMetamask(r)}
23;if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("authenticateWithMetamask",s)},this.authenticateWithCoinbaseWallet=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.authenticateWithCoinbaseWallet(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("authenticateWithCoinbaseWallet",s)},this.authenticateWithBase=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.authenticateWithBase(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("authenticateWithBase",s)},this.authenticateWithOKXWallet=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.authenticateWithOKXWallet(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("authenticateWithOKXWallet",s)},this.authenticateWithSolana=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.authenticateWithSolana(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("authenticateWithSolana",s)},this.authenticateWithWeb3=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.authenticateWithWeb3(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("authenticateWithWeb3",s)},this.authenticateWithGoogleOneTap=async r=>(await xv(this,vh,eg).call(this)).authenticateWithGoogleOneTap(r),this.__internal_loadStripeJs=async()=>(await xv(this,vh,eg).call(this)).__internal_loadStripeJs(),this.createOrganization=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.createOrganization(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("createOrganization",s)},this.getOrganization=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.getOrganization(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("getOrganization",s)},this.joinWaitlist=async r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.joinWaitlist(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("joinWaitlist",s)},this.signOut=async(...r)=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.signOut(...r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("signOut",s)},this.__internal_attemptToEnableEnvironmentSetting=r=>{const s=()=>{var i;return(i=this.clerkjs)==null?void 0:i.__internal_attemptToEnableEnvironmentSetting(r)};if(this.clerkjs&&this.loaded)return s();this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting",s)};var n;il(this,Us,e?.publishableKey),il(this,cu,e?.proxyUrl),il(this,lu,e?.domain),this.options=e,this.Clerk=e?.Clerk||null,this.mode=rf()?"browser":"server",il(this,bh,new f9(this)),this.options.sdkMetadata||(this.options.sdkMetadata=p9),St(this,ps).emit(qc.Status,"loading"),St(this,ps).prioritizedOn(qc.Status,r=>il(this,Zm,r)),St(this,Us)&&((n=this.options.experimental)==null?void 0:n.runtimeEnvironment)==="headless"&&this.options.Clerk?this.loadHeadlessClerk():St(this,Us)&&this.getEntryChunks()}get publishableKey(){return St(this,Us)}get loaded(){var e;return((e=this.clerkjs)==null?void 0:e.loaded)||!1}get status(){var e;return this.clerkjs?((e=this.clerkjs)==null?void 0:e.status)||(this.clerkjs.loaded?"ready":"loading"):St(this,Zm)}static getOrCreateInstance(e){return(!rf()||!St(this,io)||e.Clerk&&St(this,io).Clerk!==e.Clerk||St(this,io).publishableKey!==e.publishableKey)&&il(this,io,new J_(e)),St(this,io)}static clearInstance(){il(this,io,null)}get domain(){return typeof window<"u"&&window.location?uv(St(this,lu),new URL(window.location.href),""):typeof St(this,lu)=="function"?oa.throw(fv):St(this,lu)||""}get proxyUrl(){return typeof window<"u"&&window.location?uv(St(this,cu),new URL(window.location.href),""):typeof St(this,cu)=="function"?oa.throw(fv):St(this,cu)||""}__internal_getOption(e){var n,r;return(n=this.clerkjs)!=null&&n.__internal_getOption?(r=this.clerkjs)==null?void 0:r.__internal_getOption(e):this.options[e]}loadHeadlessClerk(){const e=IA(this.options.Clerk)?new this.options.Clerk(St(this,Us),{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk;if(!e){St(this,ps).emit(qc.Status,"error");return}const n=()=>{this.replayInterceptedInvocations(e)};e.loaded?n():e.load(this.options).then(()=>n()).catch(r=>{St(this,ps).emit(qc.Status,"error"),this.emitLoaded()})}get sdkMetadata(){var e;return((e=this.clerkjs)==null?void 0:e.sdkMetadata)||this.options.sdkMetadata||void 0}get instanceType(){var e;return(e=this.clerkjs)==null?void 0:e.instanceType}get frontendApi(){var e;return((e=this.clerkjs)==null?void 0:e.frontendApi)||""}get isStandardBrowser(){var e;return((e=this.clerkjs)==null?void 0:e.isStandardBrowser)||this.options.standardBrowser||!1}get __internal_queryClient(){var e;return(e=this.clerkjs)==null?void 0:e.__internal_queryClient}get isSatellite(){return typeof window<"u"&&window.location?uv(this.options.isSatellite,new URL(window.location.href),!1):typeof this.options.isSatellite=="function"?oa.throw(fv):!1}async getEntryChunks(){var e;if(!(this.mode!=="browser"||this.loaded)){typeof window<"u"&&(window.__clerk_publishable_key=St(this,Us),window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{const n=await this.getClerkJsEntryChunk();if(!n.loaded){this.beforeLoad(n);const s=this.options.standardBrowser!==!1&&!this.options.Clerk||!!((e=this.options.ui)!=null&&e.ClerkUI)?await this.getClerkUIEntryChunk():void 0;await n.load({...this.options,ui:{...this.options.ui,ClerkUI:s}})}n.loaded&&this.replayInterceptedInvocations(n)}catch(n){const r=n;St(this,ps).emit(qc.Status,"error"),console.error(r.stack||r.message||r);return}}}async getClerkJsEntryChunk(){if((!this.options.Clerk||this.options.__internal_clerkJSUrl)&&!__BUILD_DISABLE_RHC__&&await t9({...this.options,publishableKey:St(this,Us),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}
23),this.options.Clerk&&!this.options.__internal_clerkJSUrl&&(global.Clerk=IA(this.options.Clerk)?new this.options.Clerk(St(this,Us),{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk),!global.Clerk)throw new Error("Failed to download latest ClerkJS. Contact [email protected].");return global.Clerk}async getClerkUIEntryChunk(){const e=this.options.ui,n=!!this.options.__internal_clerkUIUrl;if(e?.ClerkUI&&!n)return e.ClerkUI;if(!((e||this.options.prefetchUI===!1)&&!n)){if(await n9({...this.options,publishableKey:St(this,Us),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!global.__internal_ClerkUICtor)throw new Error("Failed to download latest Clerk UI. Contact [email protected].");return global.__internal_ClerkUICtor}}get version(){var e;return(e=this.clerkjs)==null?void 0:e.version}get client(){if(this.clerkjs)return this.clerkjs.client}get session(){if(this.clerkjs)return this.clerkjs.session}get user(){if(this.clerkjs)return this.clerkjs.user}get organization(){if(this.clerkjs)return this.clerkjs.organization}get telemetry(){if(this.clerkjs)return this.clerkjs.telemetry}get __internal_environment(){if(this.clerkjs)return this.clerkjs.__internal_environment}get isSignedIn(){return this.clerkjs?this.clerkjs.isSignedIn:!1}get billing(){var e;return(e=this.clerkjs)==null?void 0:e.billing}get __internal_state(){return this.loaded&&this.clerkjs?this.clerkjs.__internal_state:St(this,bh)}get apiKeys(){var e;return(e=this.clerkjs)==null?void 0:e.apiKeys}get oauthApplication(){var e;return(e=this.clerkjs)==null?void 0:e.oauthApplication}__internal_setEnvironment(...e){if(this.clerkjs&&"__internal_setEnvironment"in this.clerkjs)this.clerkjs.__internal_setEnvironment(e);else return}get __internal_lastEmittedResources(){var e;return(e=this.clerkjs)==null?void 0:e.__internal_lastEmittedResources}};Zm=new WeakMap;lu=new WeakMap;cu=new WeakMap;Us=new WeakMap;ps=new WeakMap;bh=new WeakMap;io=new WeakMap;vh=new WeakSet;eg=function(){return new Promise(t=>{this.addOnLoaded(()=>t(this.clerkjs))})};eo(X_,io);var WA=X_;function m9(t){const{initialState:e,children:n,...r}=t,s=p$(r),{isomorphicClerk:i,clerkStatus:a}=y9(s);return z.createElement(LV,{initialState:e,clerk:i,clerkStatus:a},n)}var Z_=g$(m9,"ClerkProvider",YV);Z_.displayName="ClerkProvider";var g9=c9?"shared":"",y9=t=>{const e=z.useMemo(()=>({clerkUIVariant:g9,...t}),[t]),n=z.useRef(WA.getOrCreateInstance(e)),[r,s]=z.useState(n.current.status);return z.useEffect(()=>{n.current.__internal_updateProps({appearance:t.appearance})},[t.appearance]),z.useEffect(()=>{n.current.__internal_updateProps({options:t})},[t.localization]),z.useEffect(()=>(n.current.on("status",s),()=>{n.current&&n.current.off("status",s),WA.clearInstance()}),[]),{isomorphicClerk:n.current,clerkStatus:r}};typeof window<"u"&&!window.global&&(window.global=typeof global>"u"?window:global);var GA;if(globalThis.__clerkSharedModules){const t=(GA=globalThis.__clerkSharedModules.react)==null?void 0:GA.version;t&&t!==N.version&&console.warn(`[@clerk/ui/register] React version mismatch detected. Already registered: ${t}, current import: ${N.version}. This may cause issues with the shared @clerk/ui variant.`)}else globalThis.__clerkSharedModules={react:Mf,"react-dom":GV,"react-dom/client":Yq,"react/jsx-runtime":zq};Ot(({clerk:t,children:e,...n})=>{const{appearance:r,getContainer:s,component:i,signUpFallbackRedirectUrl:a,forceRedirectUrl:l,fallbackRedirectUrl:d,signUpForceRedirectUrl:h,mode:p,initialValues:m,withSignUp:g,oauthFlow:x,...v}=n;e=ex(e,"Sign in");const S=Zy(e)("SignInButton"),C=()=>{const A={forceRedirectUrl:l,fallbackRedirectUrl:d,signUpFallbackRedirectUrl:a,signUpForceRedirectUrl:h,initialValues:m,withSignUp:g,oauthFlow:x};return p==="modal"?t.openSignIn({...A,appearance:r,getContainer:s}):t.redirectToSignIn({...A,signInFallbackRedirectUrl:d,signInForceRedirectUrl:l})},E={...v,onClick:async A=>(S&&typeof S=="object"&&"props"in S&&await tx(S.props.onClick)(A),C())};return z.cloneElement(S,E)},{component:"SignInButton",renderWhileLoading:!0});Ot(({clerk:t,children:e,...n})=>{const{redirectUrl:r,getContainer:s,component:i,...a}=n;e=ex(e,"Sign in with Metamask");const l=Zy(e)("SignInWithMetamaskButton"),d=async()=>{async function m(){await t.authenticateWithMetamask({redirectUrl:r||void 0})}m()},p={...a,onClick:async m=>(await tx(l.props.onClick)(m),d())};return z.cloneElement(l,p)}
23,{component:"SignInWithMetamask",renderWhileLoading:!0});Ot(({clerk:t,children:e,...n})=>{const{redirectUrl:r="/",sessionId:s,signOutOptions:i,getContainer:a,component:l,...d}=n;i&&ox("SignOutButton `signOutOptions`","Use the `redirectUrl` and `sessionId` props directly instead."),e=ex(e,"Sign out");const h=Zy(e)("SignOutButton"),p=()=>t.signOut({redirectUrl:r,...s!==void 0&&{sessionId:s},...i}),g={...d,onClick:async x=>(await tx(h.props.onClick)(x),p())};return z.cloneElement(h,g)},{component:"SignOutButton",renderWhileLoading:!0});Ot(({clerk:t,children:e,...n})=>{const{appearance:r,unsafeMetadata:s,getContainer:i,component:a,fallbackRedirectUrl:l,forceRedirectUrl:d,signInFallbackRedirectUrl:h,signInForceRedirectUrl:p,mode:m,initialValues:g,oauthFlow:x,...v}=n;e=ex(e,"Sign up");const S=Zy(e)("SignUpButton"),C=()=>{const A={fallbackRedirectUrl:l,forceRedirectUrl:d,signInFallbackRedirectUrl:h,signInForceRedirectUrl:p,initialValues:g,oauthFlow:x};return m==="modal"?t.openSignUp({...A,appearance:r,unsafeMetadata:s,getContainer:i}):t.redirectToSignUp({...A,signUpFallbackRedirectUrl:l,signUpForceRedirectUrl:d})},E={...v,onClick:async A=>(S&&typeof S=="object"&&"props"in S&&await tx(S.props.onClick)(A),C())};return z.cloneElement(S,E)},{component:"SignUpButton",renderWhileLoading:!0});$V({packageName:"@clerk/react"});a9("@clerk/react");var wv={exports:{}};const Ju=t=>({...t,__type:"prebuilt_appearance"}),x9=Object.freeze(Object.defineProperty({__proto__:null,experimental_createTheme:Ju},Symbol.toStringTag,{value:"Module"})),b9=QD(x9),eP=Ju({name:"dark",variables:{colorBackground:"#212126",colorNeutral:"white",colorPrimary:"#ffffff",colorPrimaryForeground:"black",colorForeground:"white",colorInputForeground:"white",colorInput:"#26262B"},elements:{providerIcon__apple:{filter:"invert(1)"},providerIcon__github:{filter:"invert(1)"},providerIcon__okx_wallet:{filter:"invert(1)"},providerIcon__vercel:{filter:"invert(1)"},activeDeviceIcon:{"--cl-chassis-bottom":"#d2d2d2","--cl-chassis-back":"#e6e6e6","--cl-chassis-screen":"#e6e6e6","--cl-screen":"#111111"}}}),v9=Ju({name:"shadesOfPurple",baseTheme:eP,variables:{colorBackground:"#3f3c77",colorPrimary:"#f8d80d",colorPrimaryForeground:"#38375f",colorInputForeground:"#a1fdfe",colorShimmer:"rgba(161,253,254,0.36)"}}),$a={boxShadow:"3px 3px 0px #000",border:"2px solid #000","&:focus":{boxShadow:"4px 4px 0px #000",border:"2px solid #000",transform:"scale(1.01)"},"&:active":{boxShadow:"2px 2px 0px #000",transform:"translate(1px)"}},al={boxShadow:"3px 3px 0px #000",border:"2px solid #000"},w9=Ju({name:"neobrutalism",simpleStyles:!0,variables:{colorPrimary:"#DF1B1B",colorShimmer:"rgba(255,255,255,0.64)",fontWeight:{normal:500,medium:600,bold:700}},elements:{cardBox:{boxShadow:"7px 7px 0px #000",border:"3px solid #000"},card:{borderRadius:"0"},headerSubtitle:{color:"#212126"},alternativeMethodsBlockButton:$a,socialButtonsIconButton:{...$a},selectButton:{...$a,...al,transition:"all 0.2s ease-in-out","&:focus":{boxShadow:"4px 4px 0px #000",border:"2px solid #000",transform:"scale(1.01)"}},socialButtonsBlockButton:{...$a,color:"#212126"},profileSectionPrimaryButton:$a,profileSectionItem:{color:"#212126"},avatarImageActionsUpload:$a,menuButton:al,menuList:al,formButtonPrimary:$a,navbarButton:$a,formFieldAction:{fontWeight:"700"},formFieldInput:{...al,transition:"all 0.2s ease-in-out","&:focus":{boxShadow:"4px 4px 0px #000",border:"2px solid #000",transform:"scale(1.01)"},"&:hover":{...al,transform:"scale(1.01)"}},table:al,tableHead:{color:"#212126"},dividerLine:{background:"#000"},dividerText:{fontWeight:"700",color:"#212126"},footer:{background:"#fff","& div":{color:"#212126"}},footerActionText:{color:"#212126"},footerActionLink:{fontWeight:"700",borderBottom:"3px solid","&:focus":{boxShadow:"none"}},actionCard:{...al},badge:{border:"1px solid #000",background:"#fff",color:"#212126"}}}),S9=Ju({name:"shadcn",cssLayerName:"components",variables:{colorBackground:"var(--card)",colorDanger:"var(--destructive)",colorForeground:"var(--card-foreground)",colorInput:"var(--input)",colorInputForeground:"var(--card-foreground)",colorMod
23alBackdrop:"var(--color-black)",colorMuted:"var(--muted)",colorMutedForeground:"var(--muted-foreground)",colorNeutral:"var(--foreground)",colorPrimary:"var(--primary)",colorPrimaryForeground:"var(--primary-foreground)",colorRing:"var(--ring)",fontWeight:{normal:"var(--font-weight-normal)",medium:"var(--font-weight-medium)",semibold:"var(--font-weight-semibold)",bold:"var(--font-weight-semibold)"}},elements:{input:"bg-transparent dark:bg-input/30",cardBox:"shadow-sm border",popoverBox:"shadow-sm border",button:{'&[data-variant="solid"]::after':{display:"none"}},providerIcon__apple:"dark:invert",providerIcon__github:"dark:invert",providerIcon__okx_wallet:"dark:invert",providerIcon__vercel:"dark:invert"}}),k9=Ju({name:"simple",simpleStyles:!0}),C9=Object.freeze(Object.defineProperty({__proto__:null,dark:eP,experimental__simple:k9,neobrutalism:w9,shadcn:S9,shadesOfPurple:v9},Symbol.toStringTag,{value:"Module"})),N9=QD(C9);var YA;function j9(){return YA||(YA=1,(function(t){var e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(h,p,m,g)=>{if(p&&typeof p=="object"||typeof p=="function")for(let x of r(p))!s.call(h,x)&&x!==m&&e(h,x,{get:()=>p[x],enumerable:!(g=n(p,x))||g.enumerable});return h},a=(h,p,m)=>(i(h,p,"default"),m&&i(m,p,"default")),l=h=>i(e({},"__esModule",{value:!0}),h),d={};t.exports=l(d),a(d,b9,t.exports),a(d,N9,t.exports)})(wv)),wv.exports}var E9=j9();const T9=1,A9=1e6;let Sv=0;function M9(){return Sv=(Sv+1)%Number.MAX_SAFE_INTEGER,Sv.toString()}const kv=new Map,QA=t=>{if(kv.has(t))return;const e=setTimeout(()=>{kv.delete(t),Rh({type:"REMOVE_TOAST",toastId:t})},A9);kv.set(t,e)},O9=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,T9)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?QA(n):t.toasts.forEach(r=>{QA(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},tg=[];let ng={toasts:[]};function Rh(t){ng=O9(ng,t),tg.forEach(e=>{e(ng)})}function R9({...t}){const e=M9(),n=s=>Rh({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Rh({type:"DISMISS_TOAST",toastId:e});return Rh({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function ZS(){const[t,e]=N.useState(ng);return N.useEffect(()=>
vendor: 5,214 bytes, line 23
23(tg.push(e),()=>{const n=tg.indexOf(e);n>-1&&tg.splice(n,1)}),[t]),{...t,toast:R9,dismiss:n=>Rh({type:"DISMISS_TOAST",toastId:n})}}function Ht(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t?.(s),n===!1||!s.defaultPrevented)return e?.(s)}}function XA(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ek(...t){return e=>{let n=!1;const r=t.map(s=>{const i=XA(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():XA(t[s],null)}}}}function Cr(...t){return N.useCallback(ek(...t),t)}function D9(t,e){const n=N.createContext(e),r=i=>{const{children:a,...l}=i,d=N.useMemo(()=>l,Object.values(l));return c.jsx(n.Provider,{value:d,children:a})};r.displayName=t+"Provider";function s(i){const a=N.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function _f(t,e=[]){let n=[];function r(i,a){const l=N.createContext(a),d=n.length;n=[...n,a];const h=m=>{const{scope:g,children:x,...v}=m,S=g?.[t]?.[d]||l,C=N.useMemo(()=>v,Object.values(v));return c.jsx(S.Provider,{value:C,children:x})};h.displayName=i+"Provider";function p(m,g){const x=g?.[t]?.[d]||l,v=N.useContext(x);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return[h,p]}const s=()=>{const i=n.map(a=>N.createContext(a));return function(l){const d=l?.[t]||i;return N.useMemo(()=>({[`__scope${t}`]:{...l,[t]:d}}),[l,d])}};return s.scopeName=t,[r,_9(s,...e)]}function _9(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((l,{useScope:d,scopeName:h})=>{const m=d(i)[`__scope${h}`];return{...l,...m}},{});return N.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Cg(t){const e=P9(t),n=N.forwardRef((r,s)=>{const{children:i,...a}=r,l=N.Children.toArray(i),d=l.find(I9);if(d){const h=d.props.children,p=l.map(m=>m===d?N.Children.count(h)>1?N.Children.only(null):N.isValidElement(h)?h.props.children:null:m);return c.jsx(e,{...a,ref:s,children:N.isValidElement(h)?N.cloneElement(h,void 0,p):null})}return c.jsx(e,{...a,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}function P9(t){const e=N.forwardRef((n,r)=>{const{children:s,...i}=n;if(N.isValidElement(s)){const a=B9(s),l=U9(i,s.props);return s.type!==N.Fragment&&(l.ref=r?ek(r,a):a),N.cloneElement(s,l)}return N.Children.count(s)>1?N.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var tP=Symbol("radix.slottable");function L9(t){const e=({children:n})=>c.jsx(c.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=tP,e}function I9(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tP}function U9(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...l)=>{const d=i(...l);return s(...l),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function B9(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function F9(t){const e=t+"CollectionProvider",[n,r]=_f(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=S=>{const{scope:C,children:j}=S,E=z.useRef(null),A=z.useRef(new Map).current;return c.jsx(s,{scope:C,itemMap:A,collectionRef:E,children:j})};a.displayName=e;const l=t+"CollectionSlot",d=Cg(l),h=z.forwardRef((S,C)=>{const{scope:j,children:E}=S,A=i(l,j),D=Cr(C,A.collectionRef);return c.jsx(d,{ref:D,children:E})});h.displayName=l;const p=t+"CollectionItemSlot",m="data-radix-collection-item",g=Cg(p),x=z.forwardRef((S,C)=>{const{scope:j,children:E,...A}=S,D=z.useRef(null),M=Cr(C,D),I=i(p,j);return z.useEffect(()=>(I.itemMap.set(D,{ref:D,...A}),()=>{I.itemMap.delete(D)})),c.jsx(g,{[m]:"",ref:M,children:E})});x.displayName=p;function v(S){const C=i(t+"CollectionConsumer",S);return z.useCallback(()=>{const E=C.collectionRef.current;if(!E)return[];const A=Array.from(E.querySelectorAll(`[${m}]`));return Array.from(C.itemMap.values()).sort((I,_)=>A.indexOf(I.ref.current)-A.indexOf(_.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:a,Slot:h,ItemSlot:x},v,r]}var z9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cn=z9.reduce((t,e)=>{const n=Cg(`Primitive.${e}`),r=N.forwardRef((s,i)=>{const{asChild:a,...l}=s,d=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function nP(t,e){t&&$s.flushSync(()=>t.dispatchEvent(e))}function ki(t){const e=N.useRef(t);return N.useEffect(()=>{e.current=t}),N.useMemo(()=>(...n)=>e.current?.(...n),[])}function q9(t,e=globalThis?.document){const n=ki(t);N.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}
vendor: 4,466 bytes, line 23
23var V9="DismissableLayer",i1="dismissableLayer.update",$9="dismissableLayer.pointerDownOutside",H9="dismissableLayer.focusOutside",JA,rP=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lx=N.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...d}=t,h=N.useContext(rP),[p,m]=N.useState(null),g=p?.ownerDocument??globalThis?.document,[,x]=N.useState({}),v=Cr(e,_=>m(_)),S=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),j=S.indexOf(C),E=p?S.indexOf(p):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,D=E>=j,M=W9(_=>{const L=_.target,V=[...h.branches].some(B=>B.contains(L));!D||V||(s?.(_),a?.(_),_.defaultPrevented||l?.())},g),I=G9(_=>{const L=_.target;[...h.branches].some(B=>B.contains(L))||(i?.(_),a?.(_),_.defaultPrevented||l?.())},g);return q9(_=>{E===h.layers.size-1&&(r?.(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},g),N.useEffect(()=>{if(p)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(JA=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),ZA(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=JA)}},[p,g,n,h]),N.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),ZA())},[p,h]),N.useEffect(()=>{const _=()=>x({});return document.addEventListener(i1,_),()=>document.removeEventListener(i1,_)},[]),c.jsx(Cn.div,{...d,ref:v,style:{pointerEvents:A?D?"auto":"none":void 0,...t.style},onFocusCapture:Ht(t.onFocusCapture,I.onFocusCapture),onBlurCapture:Ht(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ht(t.onPointerDownCapture,M.onPointerDownCapture)})});lx.displayName=V9;var K9="DismissableLayerBranch",sP=N.forwardRef((t,e)=>{const n=N.useContext(rP),r=N.useRef(null),s=Cr(e,r);return N.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),c.jsx(Cn.div,{...t,ref:s})});sP.displayName=K9;function W9(t,e=globalThis?.document){const n=ki(t),r=N.useRef(!1),s=N.useRef(()=>{});return N.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let d=function(){iP($9,n,h,{discrete:!0})};const h={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=d,e.addEventListener("click",s.current,{once:!0})):d()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function G9(t,e=globalThis?.document){const n=ki(t),r=N.useRef(!1);return N.useEffect(()=>{const s=i=>{i.target&&!r.current&&iP(H9,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ZA(){const t=new CustomEvent(i1);document.dispatchEvent(t)}function iP(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?nP(s,i):s.dispatchEvent(i)}var Y9=lx,Q9=sP,ua=globalThis?.document?N.useLayoutEffect:()=>{},X9="Portal",cx=N.forwardRef((t,e)=>{const{container:n,...r}=t,[s,i]=N.useState(!1);ua(()=>i(!0),[]);const a=n||s&&globalThis?.document?.body;return a?QS.createPortal(c.jsx(Cn.div,{...r,ref:e}),a):null});cx.displayName=X9;function J9(t,e){return N.useReducer((n,r)=>e[n][r]??n,t)}var Yl=t=>{const{present:e,children:n}=t,r=Z9(e),s=typeof n=="function"?n({present:r.isPresent}):N.Children.only(n),i=Cr(r.ref,eH(s));return typeof n=="function"||r.isPresent?N.cloneElement(s,{ref:i}):null};Yl.displayName="Presence";function Z9(t){const[e,n]=N.useState(),r=N.useRef(null),s=N.useRef(t),i=N.useRef("none"),a=t?"mounted":"unmounted",[l,d]=J9(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const h=gm(r.current);i.current=l==="mounted"?h:"none"},[l]),ua(()=>{const h=r.current,p=s.current;if(p!==t){const g=i.current,x=gm(h);t?d("MOUNT"):x==="none"||h?.display==="none"?d("UNMOUNT"):d(p&&g!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,d]),ua(()=>
23{if(e){let h;const p=e.ownerDocument.defaultView??window,m=x=>{const S=gm(r.current).includes(CSS.escape(x.animationName));if(x.target===e&&S&&(d("ANIMATION_END"),!s.current)){const C=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=C)})}},g=x=>{x.target===e&&(i.current=gm(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:N.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function gm(t){return t?.animationName||"none"}function eH(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var tH=Mf[" useInsertionEffect ".trim().toString()]||ua;function aP({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,a]=nH({defaultProp:e,onChange:n}),l=t!==void 0,d=l?t:s;{const p=N.useRef(t!==void 0);N.useEffect(()=>{const m=p.current;m!==l&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,r])}const h=N.useCallback(p=>{if(l){const m=rH(p)?p(t):p;m!==t&&a.current?.(m)}else i(p)},[l,t,i,a]);return[d,h]}function nH({defaultProp:t,onChange:e}){const[n,r]=N.useState(t),s=N.useRef(n),i=N.useRef(e);return tH(()=>{i.current=e},[e]),N.useEffect(()=>{s.current!==n&&(i.current?.(n),s.current=n)},[n,s]),[n,r,i]}function rH(t){return typeof t=="function"}var sH=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),iH="VisuallyHidden",ux=N.forwardRef((t,e)=>c.jsx(Cn.span,{...t,ref:e,style:{...sH,...t.style}}));ux.displayName=iH;var aH=ux,tk="ToastProvider",[nk,oH,lH]=F9("Toast"),[oP]=_f("Toast",[lH]),[cH,dx]=oP(tk),lP=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[l,d]=N.useState(null),[h,p]=N.useState(0),m=N.useRef(!1),g=N.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${tk}\`. Expected non-empty \`string\`.`),c.jsx(nk.Provider,{scope:e,children:c.jsx(cH,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:h,viewport:l,onViewportChange:d,onToastAdd:N.useCallback(()=>p(x=>x+1),[]),onToastRemove:N.useCallback(()=>p(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:g,children:a})})};lP.displayName=tk;var cP="ToastViewport",uH=["F8"],a1="toast.viewportPause",o1="toast.viewportResume",uP=N.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=uH,label:s="Notifications ({hotkey})",...i}=t,a=dx(cP,n),l=oH(n),d=N.useRef(null),h=N.useRef(null),p=N.useRef(null),m=N.useRef(null),g=Cr(e,m,a.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;N.useEffect(()=>{const C=j=>{r.length!==0&&r.every(A=>j[A]||j.code===A)&&m.current?.focus()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]),N.useEffect(()=>{const C=d.current,j=m.current;if(v&&C&&j){const E=()=>{if(!a.isClosePausedRef.current){const I=new CustomEvent(a1);j.dispatchEvent(I),a.isClosePausedRef.current=!0}},A=()=>{if(a.isClosePausedRef.current){const I=new CustomEvent(o1);j.dispatchEvent(I),a.isClosePausedRef.current=!1}},D=I=>{!C.contains(I.relatedTarget)&&A()},M=()=>{C.contains(document.activeElement)||A()};return C.addEventListener("focusin",E),C.addEventListener("focusout",D),C.addEventListener("pointermove",E),C.addEventListener("pointerleave",M),window.addEventListener("blur",E),window.addEventListener("focus",A),()=>{C.removeEventListener("focusin",E),C.removeEventListener("focusout",D),C.removeEventListener("pointermove",E),C.removeEventListener("pointerleave",M),window.removeEventListener("blur",E),window.removeEventListener("focus",A)}}},[v,a.isClosePausedRef]);const S=N.useCallback(({tabbingDirection:C})=>{const E=l().map(A=>{const D=A.ref.current,M=[D,...kH(D)];return C==="forwards"?M:M.reverse()});return(C==="forwards"?E.reverse():E).flat()},[l]);return N.useEffect(()=>{const C=m.current;if(C){const j=E=>{const A=E.altKey||E.ctrlKey||E.metaKey;if(E.key==="Tab"&&!A){const M=document.activeElement,I=E.shiftKey;if(E.target===C&&I){h.current?.focus();return}const V=S({tabbingDirection:I?"backwards":"forwards"}),B=V.findIndex(K=>
vendor: 4,196 bytes, line 23
23K===M);Cv(V.slice(B+1))?E.preventDefault():I?h.current?.focus():p.current?.focus()}};return C.addEventListener("keydown",j),()=>C.removeEventListener("keydown",j)}},[l,S]),c.jsxs(Q9,{ref:d,role:"region","aria-label":s.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&c.jsx(l1,{ref:h,onFocusFromOutsideViewport:()=>{const C=S({tabbingDirection:"forwards"});Cv(C)}}),c.jsx(nk.Slot,{scope:n,children:c.jsx(Cn.ol,{tabIndex:-1,...i,ref:g})}),v&&c.jsx(l1,{ref:p,onFocusFromOutsideViewport:()=>{const C=S({tabbingDirection:"backwards"});Cv(C)}})]})});uP.displayName=cP;var dP="ToastFocusProxy",l1=N.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=dx(dP,n);return c.jsx(ux,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:a=>{const l=a.relatedTarget;!i.viewport?.contains(l)&&r()}})});l1.displayName=dP;var Pf="Toast",dH="toast.swipeStart",hH="toast.swipeMove",fH="toast.swipeCancel",pH="toast.swipeEnd",hP=N.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...a}=t,[l,d]=aP({prop:r,defaultProp:s??!0,onChange:i,caller:Pf});return c.jsx(Yl,{present:n||l,children:c.jsx(yH,{open:l,...a,ref:e,onClose:()=>d(!1),onPause:ki(t.onPause),onResume:ki(t.onResume),onSwipeStart:Ht(t.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ht(t.onSwipeMove,h=>{const{x:p,y:m}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Ht(t.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ht(t.onSwipeEnd,h=>{const{x:p,y:m}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),d(!1)})})})});hP.displayName=Pf;var[mH,gH]=oP(Pf,{onClose(){}}),yH=N.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:l,onPause:d,onResume:h,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:g,onSwipeEnd:x,...v}=t,S=dx(Pf,n),[C,j]=N.useState(null),E=Cr(e,se=>j(se)),A=N.useRef(null),D=N.useRef(null),M=s||S.duration,I=N.useRef(0),_=N.useRef(M),L=N.useRef(0),{onToastAdd:V,onToastRemove:B}=S,K=ki(()=>{C?.contains(document.activeElement)&&S.viewport?.focus(),a()}),ee=N.useCallback(se=>{!se||se===1/0||(window.clearTimeout(L.current),I.current=new Date().getTime(),L.current=window.setTimeout(K,se))},[K]);N.useEffect(()=>{const se=S.viewport;if(se){const he=()=>{ee(_.current),h?.()},$=()=>{const Q=new Date().getTime()-I.current;_.current=_.current-Q,window.clearTimeout(L.current),d?.()};return se.addEventListener(a1,$),se.addEventListener(o1,he),()=>{se.removeEventListener(a1,$),se.removeEventListener(o1,he)}}},[S.viewport,M,d,h,ee]),N.useEffect(()=>{i&&!S.isClosePausedRef.current&&ee(M)},[i,M,S.isClosePausedRef,ee]),N.useEffect(()=>(V(),()=>B()),[V,B]);const ie=N.useMemo(()=>C?bP(C):null,[C]);return S.viewport?c.jsxs(c.Fragment,{children:[ie&&c.jsx(xH,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:ie}),c.jsx(mH,{scope:n,onClose:K,children:$s.createPortal(c.jsx(nk.ItemSlot,{scope:n,children:c.jsx(Y9,{asChild:!0,onEscapeKeyDown:Ht(l,()=>{S.isFocusedToastEscapeKeyDownRef.current||K(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Cn.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":S.swipeDirection,...v,ref:E,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ht(t.onKeyDown,se=>{se.key==="Escape"&&(l?.(se.nativeEvent),se.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,K())
23)}),onPointerDown:Ht(t.onPointerDown,se=>{se.button===0&&(A.current={x:se.clientX,y:se.clientY})}),onPointerMove:Ht(t.onPointerMove,se=>{if(!A.current)return;const he=se.clientX-A.current.x,$=se.clientY-A.current.y,Q=!!D.current,re=["left","right"].includes(S.swipeDirection),le=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,P=re?le(0,he):0,te=re?0:le(0,$),ue=se.pointerType==="touch"?10:2,fe={x:P,y:te},ke={originalEvent:se,delta:fe};Q?(D.current=fe,ym(hH,m,ke,{discrete:!1})):e2(fe,S.swipeDirection,ue)?(D.current=fe,ym(dH,p,ke,{discrete:!1}),se.target.setPointerCapture(se.pointerId)):(Math.abs(he)>ue||Math.abs($)>ue)&&(A.current=null)}),onPointerUp:Ht(t.onPointerUp,se=>{const he=D.current,$=se.target;if($.hasPointerCapture(se.pointerId)&&$.releasePointerCapture(se.pointerId),D.current=null,A.current=null,he){const Q=se.currentTarget,re={originalEvent:se,delta:he};e2(he,S.swipeDirection,S.swipeThreshold)?ym(pH,x,re,{discrete:!0}):ym(fH,g,re,{discrete:!0}),Q.addEventListener("click",le=>le.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),xH=t=>{const{__scopeToast:e,children:n,...r}=t,s=dx(Pf,e),[i,a]=N.useState(!1),[l,d]=N.useState(!1);return wH(()=>a(!0)),N.useEffect(()=>{const h=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(h)},[]),l?null:c.jsx(cx,{asChild:!0,children:c.jsx(ux,{...r,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",n]})})})},bH="ToastTitle",fP=N.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return c.jsx(Cn.div,{...r,ref:e})});fP.displayName=bH;var vH="ToastDescription",pP=N.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return c.jsx(Cn.div,{...r,ref:e})});pP.displayName=vH;var mP="ToastAction",gP=N.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?c.jsx(xP,{altText:n,asChild:!0,children:c.jsx(rk,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${mP}\`. Expected non-empty \`string\`.`),null)});gP.displayName=mP;var yP="ToastClose",rk=N.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=gH(yP,n);return c.jsx(xP,{asChild:!0,children:c.jsx(Cn.button,{type:"button",...r,ref:e,onClick:Ht(t.onClick,s.onClose)})})});rk.displayName=yP;var xP=N.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return c.jsx(Cn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function bP(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),SH(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...bP(r))}}),e}function ym(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?nP(s,i):s.dispatchEvent(i)}var e2=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function wH(t=()=>{}){const e=ki(t);ua(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function SH(t){return t.nodeType===t.ELEMENT_NODE}function kH(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Cv(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var CH=lP,vP=uP,wP=hP,SP=fP,kP=pP,CP=gP,NP=rk;function jP(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=jP(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function EP(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=jP(t))&&(r&&(r+=" "),r+=e);return r}const t2=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,n2=EP,sk=(t,e)=>n=>{var r;if(e?.variants==null)return n2(t,n?.class,n?.className);const{variants:s,defaultVariants:i}=e,a=Object.keys(s).map(h=>{const p=n?.[h],m=i?.[h];if(p===null)return null;const g=t2(p)||t2(m);return s[h][g]}),l=n&&Object.entries(n).reduce((h,p)=>{let[m,g]=p;return g===void 0||(h[m]=g),h},{}),d=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:g,...x}=p;return Object.entries(x).every(v=>{let[S,C]=v;return Array.isArray(C)?C.includes({...i,...l}[S]):{...i,...l}[S]===C})?[...h,m,g]:h},[]);return n2(t,a,d,n?.class,n?.className)};const NH=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jH=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),r2=t=>{const e=jH(t);return e.charAt(0).toUpperCase()+e.slice(1)},TP=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),EH=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var TH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const AH=N.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...l},d)=>N.createElement("svg",{ref:d,...TH,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:TP("lucide",s),...!i&&!EH(l)&&{"aria-hidden":"true"},...l},[...a.map(([h,p])=>N.createElement(h,p)),...Array.isArray(i)?i:[i]]));const Ee=(t,e)=>{const n=N.forwardRef(({className:r,...s},i)=>N.createElement(AH,{ref:i,iconNode:e,className:TP(`lucide-${NH(r2(t))}`,`lucide-${t}`,r),...s}));return n.displayName=r2(t),n};const MH=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],OH=Ee("arrow-down",MH);const RH=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ws=Ee("arrow-left",RH);const DH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sf=Ee("arrow-right",DH);const _H=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],AP=Ee("arrow-up-right",_H);const PH=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],LH=Ee("arrow-up",PH);const IH=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],UH=Ee("bold",IH);const BH=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],MP=Ee("book-open",BH);const FH=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ru=Ee("briefcase",FH);const zH=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}
23],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Zu=Ee("building-2",zH);const qH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Lf=Ee("check",qH);const VH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ql=Ee("chevron-down",VH);const $H=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],OP=Ee("chevron-left",$H);const HH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ik=Ee("chevron-right",HH);const KH=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],WH=Ee("chevron-up",KH);const GH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],kt=Ee("circle-alert",GH);const YH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],If=Ee("circle-check",YH);const QH=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],XH=Ee("clipboard-list",QH);const JH=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ak=Ee("clock",JH);const ZH=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],e8=Ee("cloud-upload",ZH);const t8=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],RP=Ee("download",t8);const n8=[["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"}]],da=Ee("external-link",n8);const r8=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],s8=Ee("eye-off",r8);const i8=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],DP=Ee("eye",i8);const a8=[["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"}]],Ng=Ee("file-text",a8);const o8=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],_P=Ee("grip-vertical",o8);const l8=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],c8=Ee("heading-2",l8);const u8=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],d8=Ee("heading-3",u8);const h8=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],PP=Ee("history",h8);const f8=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],p8=Ee("house",f8);const m8=[["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"}]],LP=Ee("image",m8);const g8=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],Du=Ee("inbox",g8);const y8=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],x8=Ee("italic",y8);const b8=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],v8=Ee("layout-dashboard",b8);const w8=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],S8=Ee("leaf",w8);const k8=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],C8=Ee("link",k8);const N8=[["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"}]],IP=Ee("linkedin",N8);const j8=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m7 8-4 4 4 4",key:"o5hrat"}]],E8=Ee("list-indent-decrease",j8);const T8=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m3 8 4 4-4 4",key:"1a3j6y"}]],A8=Ee("list-indent-increase",T8);
23const M8=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],O8=Ee("list-ordered",M8);const R8=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],D8=Ee("list",R8);const _8=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Be=Ee("loader-circle",_8);const P8=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],s2=Ee("log-out",P8);const L8=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],I8=Ee("lock",L8);const U8=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],ok=Ee("mail",U8);const B8=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],lk=Ee("map-pin",B8);const F8=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],UP=Ee("map",F8);const z8=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],q8=Ee("menu",z8);const V8=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],$8=Ee("mouse-pointer-click",V8);const H8=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],BP=Ee("pencil",H8);const K8=[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]],W8=Ee("pilcrow",K8);const G8=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zn=Ee("plus",G8);const Y8=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Q8=Ee("quote",Y8);const X8=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],J8=Ee("redo-2",X8);const Z8=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],eK=Ee("rocket",Z8);const tK=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Xl=Ee("save",tK);const nK=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Uf=Ee("search",nK);const rK=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sK=Ee("settings",rK);const iK=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 4,607 bytes, line 23
23y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],af=Ee("shield-check",iK);const aK=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],oK=Ee("shield",aK);const lK=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],cK=Ee("smartphone",lK);const uK=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qn=Ee("trash-2",uK);const dK=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],ck=Ee("trending-up",dK);const hK=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],FP=Ee("triangle-alert",hK);const fK=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],pK=Ee("undo-2",fK);const mK=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],gK=Ee("underline",mK);const yK=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],uk=Ee("users",yK);const xK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zs=Ee("x",xK),bK=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},vK=(t,e)=>({classGroupId:t,validator:e}),zP=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),jg="-",i2=[],wK="arbitrary..",SK=t=>{const e=CK(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return kK(a);const l=a.split(jg),d=l[0]===""&&l.length>1?1:0;return qP(l,d,e)},getConflictingClassGroupIds:(a,l)=>{if(l){const d=r[a],h=n[a];return d?h?bK(h,d):d:h||i2}return n[a]||i2}}},qP=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const s=t[e],i=n.nextPart.get(s);if(i){const h=qP(t,e+1,i);if(h)return h}const a=n.validators;if(a===null)return;const l=e===0?t.join(jg):t.slice(e).join(jg),d=a.length;for(let h=0;h<d;h++){const p=a[h];if(p.validator(l))return p.classGroupId}},kK=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?wK+r:void 0})(),CK=t=>{const{theme:e,classGroups:n}=t;return NK(n,e)},NK=(t,e)=>{const n=zP();for(const r in t){const s=t[r];dk(s,n,r,e)}return n},dk=(t,e,n,r)=>{const s=t.length;for(let i=0;i<s;i++){const a=t[i];jK(a,e,n,r)}},jK=(t,e,n,r)=>{if(typeof t=="string"){EK(t,e,n);return}if(typeof t=="function"){TK(t,e,n,r);return}AK(t,e,n,r)},EK=(t,e,n)=>{const r=t===""?e:VP(e,t);r.classGroupId=n},TK=(t,e,n,r)=>{if(MK(t)){dk(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(vK(n,t))},AK=(t,e,n,r)=>{const s=Object.entries(t),i=s.length;for(let a=0;a<i;a++){const[l,d]=s[a];dk(d,VP(e,l),n,r)}},VP=(t,e)=>{let n=t;const r=e.split(jg),s=r.length;for(let i=0;i<s;i++){const a=r[i];let l=n.nextPart.get(a);l||(l=zP(),n.nextPart.set(a,l)),n=l}return n},MK=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,OK=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const s=(i,a)=>{n[i]=a,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in n?n[i]=a:s(i,a)}}},c1="!",a2=":",RK=[],o2=(t,e,n,r,s)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),DK=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=s=>{const i=[];let a=0,l=0,d=0,h;const p=s.length;for(let S=0;S<p;S++){const C=s[S];if(a===0&&l===0){if(C===a2){i.push(s.slice(d,S)),d=S+1;continue}if(C==="/"){h=S;continue}}C==="["?a++:C==="]"?a--:C==="("?l++:C===")"&&l--}const m=i.length===0?s:s.slice(d);let g=m,x=!1;m.endsWith(c1)?(g=m.slice(0,-1),x=!0):m.startsWith(c1)&&(g=m.slice(1),x=!0);const v=h&&h>d?h-d:void 0;return o2(i,x,g,v)};if(e){const s=e+a2,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):o2(RK,!1,a,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},_K=t=>{const e=new Map;
vendor: 5,462 bytes, line 23
23return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let i=0;i<n.length;i++){const a=n[i],l=a[0]==="[",d=e.has(a);l||d?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},PK=t=>({cache:OK(t.cacheSize),parseClassName:DK(t),sortModifiers:_K(t),...SK(t)}),LK=/\s+/,IK=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i}=e,a=[],l=t.trim().split(LK);let d="";for(let h=l.length-1;h>=0;h-=1){const p=l[h],{isExternal:m,modifiers:g,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:S}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let C=!!S,j=r(C?v.substring(0,S):v);if(!j){if(!C){d=p+(d.length>0?" "+d:d);continue}if(j=r(v),!j){d=p+(d.length>0?" "+d:d);continue}C=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),A=x?E+c1:E,D=A+j;if(a.indexOf(D)>-1)continue;a.push(D);const M=s(j,C);for(let I=0;I<M.length;++I){const _=M[I];a.push(A+_)}d=p+(d.length>0?" "+d:d)}return d},UK=(...t)=>{let e=0,n,r,s="";for(;e<t.length;)(n=t[e++])&&(r=$P(n))&&(s&&(s+=" "),s+=r);return s},$P=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=$P(t[r]))&&(n&&(n+=" "),n+=e);return n},BK=(t,...e)=>{let n,r,s,i;const a=d=>{const h=e.reduce((p,m)=>m(p),t());return n=PK(h),r=n.cache.get,s=n.cache.set,i=l,l(d)},l=d=>{const h=r(d);if(h)return h;const p=IK(d,n);return s(d,p),p};return i=a,(...d)=>i(UK(...d))},FK=[],En=t=>{const e=n=>n[t]||FK;return e.isThemeGetter=!0,e},HP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,KP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zK=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VK=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$K=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ha=t=>zK.test(t),ot=t=>!!t&&!Number.isNaN(Number(t)),Ka=t=>!!t&&Number.isInteger(Number(t)),Nv=t=>t.endsWith("%")&&ot(t.slice(0,-1)),Gi=t=>qK.test(t),WP=()=>!0,WK=t=>VK.test(t)&&!$K.test(t),hk=()=>!1,GK=t=>HK.test(t),YK=t=>KK.test(t),QK=t=>!Ae(t)&&!De(t),XK=t=>Do(t,QP,hk),Ae=t=>HP.test(t),ol=t=>Do(t,XP,WK),l2=t=>Do(t,iW,ot),JK=t=>Do(t,ZP,WP),ZK=t=>Do(t,JP,hk),c2=t=>Do(t,GP,hk),eW=t=>Do(t,YP,YK),xm=t=>Do(t,eL,GK),De=t=>KP.test(t),ah=t=>Jl(t,XP),tW=t=>Jl(t,JP),u2=t=>Jl(t,GP),nW=t=>Jl(t,QP),rW=t=>Jl(t,YP),bm=t=>Jl(t,eL,!0),sW=t=>Jl(t,ZP,!0),Do=(t,e,n)=>{const r=HP.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Jl=(t,e,n=!1)=>{const r=KP.exec(t);return r?r[1]?e(r[1]):n:!1},GP=t=>t==="position"||t==="percentage",YP=t=>t==="image"||t==="url",QP=t=>t==="length"||t==="size"||t==="bg-size",XP=t=>t==="length",iW=t=>t==="number",JP=t=>t==="family-name",ZP=t=>t==="number"||t==="weight",eL=t=>t==="shadow",aW=()=>{const t=En("color"),e=En("font"),n=En("text"),r=En("font-weight"),s=En("tracking"),i=En("leading"),a=En("breakpoint"),l=En("container"),d=En("spacing"),h=En("radius"),p=En("shadow"),m=En("inset-shadow"),g=En("text-shadow"),x=En("drop-shadow"),v=En("blur"),S=En("perspective"),C=En("aspect"),j=En("ease"),E=En("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...D(),De,Ae],I=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],L=()=>[De,Ae,d],V=()=>[Ha,"full","auto",...L()],B=()=>[Ka,"none","subgrid",De,Ae],K=()=>["auto",{span:["full",Ka,De,Ae]},Ka,De,Ae],ee=()=>[Ka,"auto",De,Ae],ie=()=>["auto","min","max","fr",De,Ae],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...L()],Q=()=>[Ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],re=()=>[Ha,"screen","full","dvw","lvw","svw","min","max","fit",...L()],le=()=>[Ha,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],P=()=>[t,De,Ae],te=()=>[...D(),u2,c2,{position:[De,Ae]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",nW,XK,{size:[De,Ae]}],ke=()=>[Nv,ah,ol],Pe=()=>["","none","full",h,De,Ae],be=()=>["",ot,ah,ol],vt=()=>["solid","dashed","dotted","double"],Xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Je=()=>[ot,Nv,u2,c2],Ze=()=>["","none",v,De,Ae],an=()=>["none",ot,De,Ae],Kt=()=>["none",ot,De,Ae],Jt=()=>[ot,De,Ae],dn=()=>[Ha,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gi],breakpoint:[Gi],color:[WP],container:[Gi],"drop-shadow":[Gi],ease:["in","out","in-out"],font:[QK],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gi],shadow:[Gi],spacing:["px",ot],text:[Gi],"text-shadow":[Gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ha,Ae,De,C]}
vendor: 6,116 bytes, line 23
23],container:["container"],columns:[{columns:[ot,Ae,De,l]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Ka,"auto",De,Ae]}],basis:[{basis:[Ha,"full","auto",l,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ot,Ha,"auto","initial","none",Ae]}],grow:[{grow:["",ot,De,Ae]}],shrink:[{shrink:["",ot,De,Ae]}],order:[{order:[Ka,"first","last","none",De,Ae]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[l,"screen",...Q()]}],"min-w":[{"min-w":[l,"screen","none",...Q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",n,ah,ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,sW,JK]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nv,Ae]}],"font-family":[{font:[tW,ZK,e]}],"font-features":[{"font-features":[Ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,De,Ae]}],"line-clamp":[{"line-clamp":[ot,"none",De,l2]}],leading:[{leading:[i,...L()]}],"list-image":[{"list-image":["none",De,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...vt(),"wavy"]}],"text-decoration-thickness":[{decoration:[ot,"from-font","auto",De,ol]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ot,"auto",De,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ka,De,Ae],radial:["",De,Ae],conic:[Ka,De,Ae]},rW,eW]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ke()}
23],"gradient-via-pos":[{via:ke()}],"gradient-to-pos":[{to:ke()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:Pe()}],"rounded-s":[{"rounded-s":Pe()}],"rounded-e":[{"rounded-e":Pe()}],"rounded-t":[{"rounded-t":Pe()}],"rounded-r":[{"rounded-r":Pe()}],"rounded-b":[{"rounded-b":Pe()}],"rounded-l":[{"rounded-l":Pe()}],"rounded-ss":[{"rounded-ss":Pe()}],"rounded-se":[{"rounded-se":Pe()}],"rounded-ee":[{"rounded-ee":Pe()}],"rounded-es":[{"rounded-es":Pe()}],"rounded-tl":[{"rounded-tl":Pe()}],"rounded-tr":[{"rounded-tr":Pe()}],"rounded-br":[{"rounded-br":Pe()}],"rounded-bl":[{"rounded-bl":Pe()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-bs":[{"border-bs":be()}],"border-w-be":[{"border-be":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...vt(),"hidden","none"]}],"divide-style":[{divide:[...vt(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}
vendor: 5,978 bytes, line 23
23],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...vt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ot,De,Ae]}],"outline-w":[{outline:["",ot,ah,ol]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",p,bm,xm]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",m,bm,xm]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ot,ol]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",g,bm,xm]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ot,De,Ae]}],"mix-blend":[{"mix-blend":[...Xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":Je()}],"mask-image-linear-to-pos":[{"mask-linear-to":Je()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":Je()}],"mask-image-t-to-pos":[{"mask-t-to":Je()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":Je()}],"mask-image-r-to-pos":[{"mask-r-to":Je()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":Je()}],"mask-image-b-to-pos":[{"mask-b-to":Je()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":Je()}],"mask-image-l-to-pos":[{"mask-l-to":Je()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":Je()}],"mask-image-x-to-pos":[{"mask-x-to":Je()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":Je()}],"mask-image-y-to-pos":[{"mask-y-to":Je()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[De,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Je()}],"mask-image-radial-to-pos":[{"mask-radial-to":Je()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":Je()}],"mask-image-conic-to-pos":[{"mask-conic-to":Je()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Ae]}],filter:[{filter:["","none",De,Ae]}],blur:[{blur:Ze()}],brightness:[{brightness:[ot,De,Ae]}],contrast:[{contrast:[ot,De,Ae]}],"drop-shadow":[{"drop-shadow":["","none",x,bm,xm]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",ot,De,Ae]}],"hue-rotate":[{"hue-rotate":[ot,De,Ae]}],invert:[{invert:["",ot,De,Ae]}],saturate:[{saturate:[ot,De,Ae]}],sepia:[{sepia:["",ot,De,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Ae]}],"backdrop-blur":[{"backdrop-blur":Ze()}],"backdrop-brightness":[{"backdrop-brightness":[ot,De,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[ot,De,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ot,De,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,De,Ae]}],"backdrop-invert":[{"backdrop-invert":["",ot,De,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[ot,De,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[ot,De,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",ot,De,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ot,"initial",De,Ae]}],ease:[{ease:["linear","initial",j,De,Ae]}],delay:[{delay:[ot,De,Ae]}],animate:[{animate:["none",E,De,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,De,Ae]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:an()}],"rotate-x":[{"rotate-x":an()}],"rotate-y":[{"rotate-y":an()}],"rotate-z":[{"rotate-z":an()}],scale:[{scale:Kt()}],"scale-x":[{"scale-x":Kt()}],"scale-y":[{"scale-y":Kt()}],"scale-z":[{"scale-z":Kt()}],"scale-3d":["scale-3d"],skew:[{skew:Jt()}],"skew-x":[{"skew-x":Jt()}],"skew-y":[{"skew-y":Jt()}],transform:[{transform:[De,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:dn()}],"translate-x":[{"translate-x":dn()}],"translate-y":[{"translate-y":dn()}],"translate-z":[{"translate-z":dn()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}
vendor: 6,737 bytes, line 23
23],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Ae]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[ot,ah,ol,l2]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oW=BK(aW);function er(...t){return oW(EP(t))}const lW=CH,tL=N.forwardRef(({className:t,...e},n)=>c.jsx(vP,{ref:n,className:er("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));tL.displayName=vP.displayName;const cW=sk("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),nL=N.forwardRef(({className:t,variant:e,...n},r)=>c.jsx(wP,{ref:r,className:er(cW({variant:e}),t),...n}));nL.displayName=wP.displayName;const uW=N.forwardRef(({className:t,...e},n)=>c.jsx(CP,{ref:n,className:er("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));uW.displayName=CP.displayName;const rL=N.forwardRef(({className:t,...e},n)=>c.jsx(NP,{ref:n,className:er("absolute right-2 top-2 rounded-md p-1 text-foreground
23/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:c.jsx(Zs,{className:"h-4 w-4"})}));rL.displayName=NP.displayName;const sL=N.forwardRef(({className:t,...e},n)=>c.jsx(SP,{ref:n,className:er("text-sm font-semibold",t),...e}));sL.displayName=SP.displayName;const iL=N.forwardRef(({className:t,...e},n)=>c.jsx(kP,{ref:n,className:er("text-sm opacity-90",t),...e}));iL.displayName=kP.displayName;function dW(){const{toasts:t}=ZS();return c.jsxs(lW,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return c.jsxs(nL,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(sL,{children:n}),r&&c.jsx(iL,{children:r})]}),s,c.jsx(rL,{})]},e)}),c.jsx(tL,{})]})}var hW=Mf[" useId ".trim().toString()]||(()=>{}),fW=0;function jv(t){const[e,n]=N.useState(hW());return ua(()=>{n(r=>r??String(fW++))},[t]),t||(e?`radix-${e}`:"")}const pW=["top","right","bottom","left"],jo=Math.min,Xr=Math.max,Eg=Math.round,vm=Math.floor,vi=t=>({x:t,y:t}
vendor: 11,916 bytes, line 23
23),mW={left:"right",right:"left",bottom:"top",top:"bottom"};function u1(t,e,n){return Xr(t,jo(e,n))}function ha(t,e){return typeof t=="function"?t(e):t}function fa(t){return t.split("-")[0]}function ed(t){return t.split("-")[1]}function fk(t){return t==="x"?"y":"x"}function pk(t){return t==="y"?"height":"width"}function xi(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function mk(t){return fk(xi(t))}function gW(t,e,n){n===void 0&&(n=!1);const r=ed(t),s=mk(t),i=pk(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Tg(a)),[a,Tg(a)]}function yW(t){const e=Tg(t);return[d1(t),e,d1(e)]}function d1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const d2=["left","right"],h2=["right","left"],xW=["top","bottom"],bW=["bottom","top"];function vW(t,e,n){switch(t){case"top":case"bottom":return n?e?h2:d2:e?d2:h2;case"left":case"right":return e?xW:bW;default:return[]}}function wW(t,e,n,r){const s=ed(t);let i=vW(fa(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(d1)))),i}function Tg(t){const e=fa(t);return mW[e]+t.slice(e.length)}function SW(t){return{top:0,right:0,bottom:0,left:0,...t}}function aL(t){return typeof t!="number"?SW(t):{top:t,right:t,bottom:t,left:t}}function Ag(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function f2(t,e,n){let{reference:r,floating:s}=t;const i=xi(e),a=mk(e),l=pk(a),d=fa(e),h=i==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,g=r[l]/2-s[l]/2;let x;switch(d){case"top":x={x:p,y:r.y-s.height};break;case"bottom":x={x:p,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-s.width,y:m};break;default:x={x:r.x,y:r.y}}switch(ed(e)){case"start":x[a]-=g*(n&&h?-1:1);break;case"end":x[a]+=g*(n&&h?-1:1);break}return x}async function kW(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:a,elements:l,strategy:d}=t,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:x=0}=ha(e,t),v=aL(x),C=l[g?m==="floating"?"reference":"floating":m],j=Ag(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(C)))==null||n?C:C.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:p,strategy:d})),E=m==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},M=Ag(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:A,strategy:d}):E);return{top:(j.top-M.top+v.top)/D.y,bottom:(M.bottom-j.bottom+v.bottom)/D.y,left:(j.left-M.left+v.left)/D.x,right:(M.right-j.right+v.right)/D.x}}const CW=50,NW=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:kW},d=await(a.isRTL==null?void 0:a.isRTL(e));let h=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:p,y:m}=f2(h,r,d),g=r,x=0;const v={};for(let S=0;S<i.length;S++){const C=i[S];if(!C)continue;const{name:j,fn:E}=C,{x:A,y:D,data:M,reset:I}=await E({x:p,y:m,initialPlacement:r,placement:g,strategy:s,middlewareData:v,rects:h,platform:l,elements:{reference:t,floating:e}});p=A??p,m=D??m,v[j]={...v[j],...M},I&&x<CW&&(x++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(h=I.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):I.rects),{x:p,y:m}=f2(h,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:s,middlewareData:v}},jW=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:a,elements:l,middlewareData:d}=e,{element:h,padding:p=0}=ha(t,e)||{};if(h==null)return{};const m=aL(p),g={x:n,y:r},x=mk(s),v=pk(x),S=await a.getDimensions(h),C=x==="y",j=C?"top":"left",E=C?"bottom":"right",A=C?"clientHeight":"clientWidth",D=i.reference[v]+i.reference[x]-g[x]-i.floating[v],M=g[x]-i.reference[x],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let _=I?I[A]:0;(!_||!await(a.isElement==null?void 0:a.isElement(I)))&&(_=l.floating[A]||i.floating[v]);const L=D/2-M/2,V=_/2-S[v]/2-1,B=jo(m[j],V),K=jo(m[E],V),ee=B,ie=_-S[v]-K,se=_/2-S[v]/2+L,he=u1(ee,se,ie),$=!d.arrow&&ed(s)!=null&&se!==he&&i.reference[v]/2-(se<ee?B:K)-S[v]/2<0,Q=$?se<ee?se-ee:se-ie:0;return{[x]:g[x]+Q,data:{[x]:he,centerOffset:se-he-Q,...$&&{alignmentOffset:Q}},reset:$}}}),EW=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:l,platform:d,elements:h}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...C}=ha(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const j=fa(s),E=xi(l),A=fa(l)===l,D=await(d.isRTL==null?void 0:d.isRTL(h.floating)),M=g||(A||!S?[Tg(l)]:yW(l)),I=v!=="none";!g&&I&&M.push(...wW(l,S,v,D));const _=[l,...M],L=await d.detectOverflow(e,C),V=[];let B=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&V.push(L[j]),m){const se=gW(s,a,D);V.push(L[se[0]],L[se[1]])}if(B=[...B,{placement:s,overflows:V}],!V.every(se=>se<=0)){var K,ee;const se=(((K=i.flip)==null?void 0:K.index)||0)+1,he=_[se];if(he&&(!(m==="alignment"?E!==xi(he):!1)||B.every(re=>xi(re.placement)===E?re.overflows[0]>0:!0)))return{data:{index:se,overflows:B},reset:{placement:he}};let $=(ee=B.filter(Q=>Q.overflows[0]<=0).sort((Q,re)=>Q.overflows[1]-re.overflows[1])[0])==null?void 0:ee.placement;if(!$)switch(x){case"bestFit":{var ie;const Q=(ie=B.filter(re=>{if(I){const le=xi(re.placement);return le===E||le==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(le=>le>0).reduce((le,P)=>le+P,0)]).sort((re,le)=>re[1]-le[1])[0])==null?void 0:ie[0];Q&&($=Q);break}case"initialPlacement":$=l;break}if(s!==$)return{reset:{placement:$}}}return{}}}};function p2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function m2(t){return pW.some(e=>t[e]>=0)}const TW=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:s="referenceHidden",...i}=ha(t,e);switch(s){case"referenceHidden":{const a=await r.detectOverflow(e,{...i,elementContext:"reference"}),l=p2(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:m2(l)}}}case"escaped":{const a=await r.detectOverflow(e,{...i,altBoundary:!0}),l=p2(a,n.floating);return{data:{escapedOffsets:l,escaped:m2(l)}}}default:return{}}}}},oL=new Set(["left","top"]);async function AW(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=fa(n),l=ed(n),d=xi(n)==="y",h=oL.has(a)?-1:1,p=i&&d?-1:1,m=ha(e,t);let{mainAxis:g,crossAxis:x,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(x=l==="end"?v*-1:v),d?{x:x*p,y:g*h}:{x:g*h,y:x*p}}const MW=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:a,middlewareData:l}=e,d=await AW(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:i+d.y,data:{...d,placement:a}}}}},OW=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s,platform:i}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:d={fn:j=>{let{x:E,y:A}=j;return{x:E,y:A}}},...h}=ha(t,e),p={x:n,y:r},m=await i.detectOverflow(e,h),g=xi(fa(s)),x=fk(g);let v=p[x],S=p[g];if(a){const j=x==="y"?"top":"left",E=x==="y"?"bottom":"right",A=v+m[j],D=v-m[E];v=u1(A,v,D)}if(l){const j=g==="y"?"top":"left",E=g==="y"?"bottom":"right",A=S+m[j],D=S-m[E];S=u1(A,S,D)}const C=d.fn({...e,[x]:v,[g]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[x]:a,[g]:l}}}}}},RW=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:a}=e,{offset:l=0,mainAxis:d=!0,crossAxis:h=!0}=ha(t,e),p={x:n,y:r},m=xi(s),g=fk(m);let x=p[g],v=p[m];const S=ha(l,e),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const A=g==="y"?"height":"width",D=i.reference[g]-i.floating[A]+C.mainAxis,M=i.reference[g]+i.reference[A]-C.mainAxis;x<D?x=D:x>M&&(x=M)}if(h){var j,E;const A=g==="y"?"width":"height",D=oL.has(fa(s)),M=i.reference[m]-i.floating[A]+(D&&((j=a.offset)==null?void 0:j[m])||0)+(D?0:C.crossAxis),I=i.reference[m]+i.reference[A]+(D?0:((E=a.offset)==null?void 0:E[m])||0)-(D?C.crossAxis:0);v<M?v=M:v>I&&(v=I)}return{[g]:x,[m]:v}}}},DW=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:a,elements:l}=e,{apply:d=()=>{},...h}=ha(t,e),p=await a.detectOverflow(e,h),m=fa(s),g=ed(s),x=xi(s)==="y",{width:v,height:S}=i.floating;let C,j;m==="top"||m==="bottom"?(C=m,j=g===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(j=m,C=g==="end"?"top":"bottom");const E=S-p.top-p.bottom,A=v-p.left-p.right,D=jo(S-p[C],E),M=jo(v-p[j],A),I=!e.middlewareData.shift;let _=D,L=M;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=A),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(_=E),I&&!g){const B=Xr(p.left,0),K=Xr(p.right,0),ee=Xr(p.top,0),ie=Xr(p.bottom,0);x?L=v-2*(B!==0||K!==0?B+K:Xr(p.left,p.right)):_=S-2*(ee!==0||ie!==0?ee+ie:Xr(p.top,p.bottom))}await d({...e,availableWidth:L,availableHeight:_});const V=await a.getDimensions(l.floating);return v!==V.width||S!==V.height?{reset:{rects:!0}}:{}}}};function hx(){return typeof window<"u"}function td(t){return lL(t)?(t.nodeName||"").toLowerCase():"#document"}function es(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ai(t){var e;return(e=(lL(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lL(t){return hx()?t instanceof Node||t instanceof es(t).Node:!1}function Ys(t){return hx()?t instanceof Element||t instanceof es(t).Element:!1}function ya(t){return hx()?t instanceof HTMLElement||t instanceof es(t).HTMLElement:!1}function g2(t){return!hx()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof es(t).ShadowRoot}function Bf(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Qs(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&s!=="inline"&&s!=="contents"}function _W(t){return/^(table|td|th)$/.test(td(t))}function fx(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const PW=/transform|translate|scale|rotate|perspective|filter/,LW=/paint|layout|strict|content/,ll=t=>!!t&&t!=="none";let Ev;function gk(t){const e=Ys(t)?Qs(t):t;return ll(e.transform)||ll(e.translate)||ll(e.scale)||ll(e.rotate)||ll(e.perspective)||!yk()&&(ll(e.backdropFilter)||ll(e.filter))||PW.test(e.willChange||"")||LW.test(e.contain||"")}function IW(t){let e=Eo(t);for(;ya(e)&&!_u(e);){if(gk(e))return e;if(fx(e))return null;e=Eo(e)}return null}function yk(){return Ev==null&&(Ev=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ev}function _u(t){return/^(html|body|#document)$/.test(td(t))}function Qs(t){return es(t).getComputedStyle(t)}function px(t){return Ys(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Eo(t){if(td(t)==="html")return t;const e=t.assignedSlot||t.parentNode||g2(t)&&t.host||Ai(t);return g2(e)?e.host:e}function cL(t){const e=Eo(t);return _u(e)?t.ownerDocument?t.ownerDocument.body:t.body:ya(e)&&Bf(e)?e:cL(e)}function of(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=cL(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=es(s);if(i){const l=h1(a);
vendor: 6,994 bytes, line 23
23return e.concat(a,a.visualViewport||[],Bf(s)?s:[],l&&n?of(l):[])}else return e.concat(s,of(s,[],n))}function h1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function uL(t){const e=Qs(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ya(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,l=Eg(n)!==i||Eg(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function xk(t){return Ys(t)?t:t.contextElement}function Nu(t){const e=xk(t);if(!ya(e))return vi(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=uL(e);let a=(i?Eg(n.width):n.width)/r,l=(i?Eg(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const UW=vi(0);function dL(t){const e=es(t);return!yk()||!e.visualViewport?UW:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function BW(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==es(t)?!1:e}function Ll(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=xk(t);let a=vi(1);e&&(r?Ys(r)&&(a=Nu(r)):a=Nu(t));const l=BW(i,n,r)?dL(i):vi(0);let d=(s.left+l.x)/a.x,h=(s.top+l.y)/a.y,p=s.width/a.x,m=s.height/a.y;if(i){const g=es(i),x=r&&Ys(r)?es(r):r;let v=g,S=h1(v);for(;S&&r&&x!==v;){const C=Nu(S),j=S.getBoundingClientRect(),E=Qs(S),A=j.left+(S.clientLeft+parseFloat(E.paddingLeft))*C.x,D=j.top+(S.clientTop+parseFloat(E.paddingTop))*C.y;d*=C.x,h*=C.y,p*=C.x,m*=C.y,d+=A,h+=D,v=es(S),S=h1(v)}}return Ag({width:p,height:m,x:d,y:h})}function mx(t,e){const n=px(t).scrollLeft;return e?e.left+n:Ll(Ai(t)).left+n}function hL(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-mx(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function FW(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=Ai(r),l=e?fx(e.floating):!1;if(r===a||l&&i)return n;let d={scrollLeft:0,scrollTop:0},h=vi(1);const p=vi(0),m=ya(r);if((m||!m&&!i)&&((td(r)!=="body"||Bf(a))&&(d=px(r)),m)){const x=Ll(r);h=Nu(r),p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}const g=a&&!m&&!i?hL(a,d):vi(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+g.x,y:n.y*h.y-d.scrollTop*h.y+p.y+g.y}}function zW(t){return Array.from(t.getClientRects())}function qW(t){const e=Ai(t),n=px(t),r=t.ownerDocument.body,s=Xr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Xr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mx(t);const l=-n.scrollTop;return Qs(r).direction==="rtl"&&(a+=Xr(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:a,y:l}}const y2=25;function VW(t,e){const n=es(t),r=Ai(t),s=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,d=0;if(s){i=s.width,a=s.height;const p=yk();(!p||p&&e==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const h=mx(r);if(h<=0){const p=r.ownerDocument,m=p.body,g=getComputedStyle(m),x=p.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(r.clientWidth-m.clientWidth-x);v<=y2&&(i-=v)}else h<=y2&&(i+=h);return{width:i,height:a,x:l,y:d}}function $W(t,e){const n=Ll(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=ya(t)?Nu(t):vi(1),a=t.clientWidth*i.x,l=t.clientHeight*i.y,d=s*i.x,h=r*i.y;return{width:a,height:l,x:d,y:h}}function x2(t,e,n){let r;if(e==="viewport")r=VW(t,n);else if(e==="document")r=qW(Ai(t));else if(Ys(e))r=$W(e,n);else{const s=dL(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Ag(r)}function fL(t,e){const n=Eo(t);return n===e||!Ys(n)||_u(n)?!1:Qs(n).position==="fixed"||fL(n,e)}function HW(t,e){const n=e.get(t);if(n)return n;let r=of(t,[],!1).filter(l=>Ys(l)&&td(l)!=="body"),s=null;const i=Qs(t).position==="fixed";let a=i?Eo(t):t;for(;Ys(a)&&!_u(a);){const l=Qs(a),d=gk(a);!d&&l.position==="fixed"&&(s=null),(i?!d&&!s:!d&&l.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Bf(a)&&!d&&fL(t,a))?r=r.filter(p=>p!==a):s=l,a=Eo(a)}return e.set(t,r),r}function KW(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?fx(e)?[]:HW(e,this._c):[].concat(n),r],l=x2(e,a[0],s);let d=l.top,h=l.right,p=l.bottom,m=l.left;for(let g=1;g<a.length;g++){const x=x2(e,a[g],s);d=Xr(x.top,d),h=jo(x.right,h),p=jo(x.bottom,p),m=Xr(x.left,m)}return{width:h-m,height:p-d,x:m,y:d}}function WW(t){const{width:e,height:n}=uL(t);return{width:e,height:n}}function GW(t,e,n){const r=ya(e),s=Ai(e),i=n==="fixed",a=Ll(t,!0,i,e);let l={scrollLeft:0,scrollTop:0};const d=vi(0);function h(){d.x=mx(s)}if(r||!r&&!i)if((td(e)!=="body"||Bf(s))&&(l=px(e)),r){const x=Ll(e,!0,i,e);d.x=x.x+e.clientLeft,d.y=x.y+e.clientTop}else s&&h();i&&!r&&s&&h();const p=s&&!r&&!i?hL(s,l):vi(0),m=a.left+l.scrollLeft-d.x-p.x,g=a.top+l.scrollTop-d.y-p.y;return{x:m,y:g,width:a.width,height:a.height}}function Tv(t){return Qs(t).position==="static"}function b2(t,e){if(!ya(t)||Qs(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ai(t)===n&&(n=n.ownerDocument.body),n}function pL(t,e){const n=es(t);if(fx(t))return n;if(!ya(t)){let s=Eo(t);for(;s&&!_u(s);){if(Ys(s)&&!Tv(s))return s;s=Eo(s)}return n}let r=b2(t,e);for(;r&&_W(r)&&Tv(r);)r=b2(r,e);return r&&_u(r)&&Tv(r)&&!gk(r)?n:r||IW(t)||n}const YW=async function(t){const e=this.getOffsetParent||pL,n=this.getDimensions,r=await n(t.floating);return{reference:GW(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QW(t){return Qs(t).direction==="rtl"}const XW={convertOffsetParentRelativeRectToViewportRelativeRect:FW,getDocumentElement:Ai,getClippingRect:KW,getOffsetParent:pL,getElementRects:YW,getClientRects:zW,getDimensions:WW,getScale:Nu,isElement:Ys,isRTL:QW};function mL(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function JW(t,e){let n=null,r;const s=Ai(t);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),i();const h=t.getBoundingClientRect(),{left:p,top:m,width:g,height:x}=h;if(l||e(),!g||!x)return;const v=vm(m),S=vm(s.clientWidth-(p+g)),C=vm(s.clientHeight-(m+x)),j=vm(p),A={rootMargin:-v+"px "+-S+"px "+-C+"px "+-j+"px",threshold:Xr(0,jo(1,d))||1};let D=!0;function M(I){const _=I[0].intersectionRatio;if(_!==d){if(!D)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!mL(h,t.getBoundingClientRect())&&a(),D=!1}try{n=new IntersectionObserver(M,{...A,root:s.ownerDocument})}catch{n=new IntersectionObserver(M,A)}n.observe(t)}return a(!0),i}function ZW(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=xk(t),p=s||i?[...h?of(h):[],...e?of(e):[]]:[];p.forEach(j=>{s&&j.addEventListener("scroll",n,{passive:!0}),i&&j.addEventListener("resize",n)});const m=h&&l?JW(h,n):null;let g=-1,x=null;a&&(x=new ResizeObserver(j=>{let[E]=j;E&&E.target===h&&x&&e&&(x.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var A;(A=x)==null||A.observe(e)})),n()}
vendor: 10,737 bytes, line 23
23),h&&!d&&x.observe(h),e&&x.observe(e));let v,S=d?Ll(t):null;d&&C();function C(){const j=Ll(t);S&&!mL(S,j)&&n(),S=j,v=requestAnimationFrame(C)}return n(),()=>{var j;p.forEach(E=>{s&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),m?.(),(j=x)==null||j.disconnect(),x=null,d&&cancelAnimationFrame(v)}}const e7=MW,t7=OW,n7=EW,r7=DW,s7=TW,v2=jW,i7=RW,a7=(t,e,n)=>{const r=new Map,s={platform:XW,...n},i={...s.platform,_c:r};return NW(t,e,{...s,platform:i})};var o7=typeof document<"u",l7=function(){},rg=o7?N.useLayoutEffect:l7;function Mg(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Mg(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Mg(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function gL(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function w2(t,e){const n=gL(t);return Math.round(e*n)/n}function Av(t){const e=N.useRef(t);return rg(()=>{e.current=t}),e}function c7(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:d,open:h}=t,[p,m]=N.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,x]=N.useState(r);Mg(g,r)||x(r);const[v,S]=N.useState(null),[C,j]=N.useState(null),E=N.useCallback(re=>{re!==I.current&&(I.current=re,S(re))},[]),A=N.useCallback(re=>{re!==_.current&&(_.current=re,j(re))},[]),D=i||v,M=a||C,I=N.useRef(null),_=N.useRef(null),L=N.useRef(p),V=d!=null,B=Av(d),K=Av(s),ee=Av(h),ie=N.useCallback(()=>{if(!I.current||!_.current)return;const re={placement:e,strategy:n,middleware:g};K.current&&(re.platform=K.current),a7(I.current,_.current,re).then(le=>{const P={...le,isPositioned:ee.current!==!1};se.current&&!Mg(L.current,P)&&(L.current=P,$s.flushSync(()=>{m(P)}))})},[g,e,n,K,ee]);rg(()=>{h===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,m(re=>({...re,isPositioned:!1})))},[h]);const se=N.useRef(!1);rg(()=>(se.current=!0,()=>{se.current=!1}),[]),rg(()=>{if(D&&(I.current=D),M&&(_.current=M),D&&M){if(B.current)return B.current(D,M,ie);ie()}},[D,M,ie,B,V]);const he=N.useMemo(()=>({reference:I,floating:_,setReference:E,setFloating:A}),[E,A]),$=N.useMemo(()=>({reference:D,floating:M}),[D,M]),Q=N.useMemo(()=>{const re={position:n,left:0,top:0};if(!$.floating)return re;const le=w2($.floating,p.x),P=w2($.floating,p.y);return l?{...re,transform:"translate("+le+"px, "+P+"px)",...gL($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:le,top:P}},[n,l,$.floating,p.x,p.y]);return N.useMemo(()=>({...p,update:ie,refs:he,elements:$,floatingStyles:Q}),[p,ie,he,$,Q])}const u7=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?v2({element:r.current,padding:s}).fn(n):{}:r?v2({element:r,padding:s}).fn(n):{}}}},d7=(t,e)=>{const n=e7(t);return{name:n.name,fn:n.fn,options:[t,e]}},h7=(t,e)=>{const n=t7(t);return{name:n.name,fn:n.fn,options:[t,e]}},f7=(t,e)=>({fn:i7(t).fn,options:[t,e]}),p7=(t,e)=>{const n=n7(t);return{name:n.name,fn:n.fn,options:[t,e]}},m7=(t,e)=>{const n=r7(t);return{name:n.name,fn:n.fn,options:[t,e]}},g7=(t,e)=>{const n=s7(t);return{name:n.name,fn:n.fn,options:[t,e]}},y7=(t,e)=>{const n=u7(t);return{name:n.name,fn:n.fn,options:[t,e]}};var x7="Arrow",yL=N.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return c.jsx(Cn.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});yL.displayName=x7;var b7=yL;function v7(t){const[e,n]=N.useState(void 0);return ua(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,l;if("borderBoxSize"in i){const d=i.borderBoxSize,h=Array.isArray(d)?d[0]:d;a=h.inlineSize,l=h.blockSize}else a=t.offsetWidth,l=t.offsetHeight;n({width:a,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var xL="Popper",[bL,vL]=_f(xL),[Ike,wL]=bL(xL),SL="PopperAnchor",kL=N.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=wL(SL,n),a=N.useRef(null),l=Cr(e,a),d=N.useRef(null);return N.useEffect(()=>{const h=d.current;d.current=r?.current||a.current,h!==d.current&&i.onAnchorChange(d.current)}),r?null:c.jsx(Cn.div,{...s,ref:l})});kL.displayName=SL;var bk="PopperContent",[w7,S7]=bL(bk),CL=N.forwardRef((t,e)=>{const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:v,...S}=t,C=wL(bk,n),[j,E]=N.useState(null),A=Cr(e,vt=>E(vt)),[D,M]=N.useState(null),I=v7(D),_=I?.width??0,L=I?.height??0,V=r+(i!=="center"?"-"+i:""),B=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},K=Array.isArray(h)?h:[h],ee=K.length>0,ie={padding:B,boundary:K.filter(C7),altBoundary:ee},{refs:se,floatingStyles:he,placement:$,isPositioned:Q,middlewareData:re}=c7({strategy:"fixed",placement:V,whileElementsMounted:(...vt)=>ZW(...vt,{animationFrame:x==="always"}),elements:{reference:C.anchor},middleware:[d7({mainAxis:s+L,alignmentAxis:a}),d&&h7({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?f7():void 0,...ie}),d&&p7({...ie}),m7({...ie,apply:({elements:vt,rects:Xe,availableWidth:Je,availableHeight:Ze})=>{const{width:an,height:Kt}=Xe.reference,Jt=vt.floating.style;Jt.setProperty("--radix-popper-available-width",`${Je}px`),Jt.setProperty("--radix-popper-available-height",`${Ze}px`),Jt.setProperty("--radix-popper-anchor-width",`${an}px`),Jt.setProperty("--radix-popper-anchor-height",`${Kt}px`)}}),D&&y7({element:D,padding:l}),N7({arrowWidth:_,arrowHeight:L}),g&&g7({strategy:"referenceHidden",...ie})]}),[le,P]=EL($),te=ki(v);ua(()=>{Q&&te?.()},[Q,te]);const ue=re.arrow?.x,fe=re.arrow?.y,ke=re.arrow?.centerOffset!==0,[Pe,be]=N.useState();return ua(()=>{j&&be(window.getComputedStyle(j).zIndex)},[j]),c.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:Q?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(" "),...re.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:c.jsx(w7,{scope:n,placedSide:le,onArrowChange:M,arrowX:ue,arrowY:fe,shouldHideArrow:ke,children:c.jsx(Cn.div,{"data-side":le,"data-align":P,...S,ref:A,style:{...S.style,animation:Q?void 0:"none"}})})})});CL.displayName=bk;var NL="PopperArrow",k7={top:"bottom",right:"left",bottom:"top",left:"right"},jL=N.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=S7(NL,r),a=k7[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(b7,{...s,ref:n,style:{...s.style,display:"block"}})})});jL.displayName=NL;function C7(t){return t!==null}var N7=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:s}=e,a=s.arrow?.centerOffset!==0,l=a?0:t.arrowWidth,d=a?0:t.arrowHeight,[h,p]=EL(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(s.arrow?.x??0)+l/2,x=(s.arrow?.y??0)+d/2;let v="",S="";return h==="bottom"?(v=a?m:`${g}px`,S=`${-d}px`):h==="top"?(v=a?m:`${g}px`,S=`${r.floating.height+d}px`):h==="right"?(v=`${-d}px`,S=a?m:`${x}px`):h==="left"&&(v=`${r.floating.width+d}px`,S=a?m:`${x}px`),{data:{x:v,y:S}}}});function EL(t){const[e,n="center"]=t.split("-");return[e,n]}var j7=kL,E7=CL,T7=jL,[gx]=_f("Tooltip",[vL]),vk=vL(),TL="TooltipProvider",A7=700,S2="tooltip.open",[M7,AL]=gx(TL),ML=t=>{const{__scopeTooltip:e,delayDuration:n=A7,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,a=N.useRef(!0),l=N.useRef(!1),d=N.useRef(0);return N.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),c.jsx(M7,{scope:e,isOpenDelayedRef:a,delayDuration:n,onOpen:N.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:N.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:N.useCallback(h=>{l.current=h},[]),disableHoverableContent:s,children:i})};ML.displayName=TL;var OL="Tooltip",[Uke,Ff]=gx(OL),f1="TooltipTrigger",O7=N.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ff(f1,n),i=AL(f1,n),a=vk(n),l=N.useRef(null),d=Cr(e,l,s.onTriggerChange),h=N.useRef(!1),p=N.useRef(!1),m=N.useCallback(()=>h.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsx(j7,{asChild:!0,...a,children:c.jsx(Cn.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:d,onPointerMove:Ht(t.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ht(t.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:Ht(t.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ht(t.onFocus,()=>{h.current||s.onOpen()}),onBlur:Ht(t.onBlur,s.onClose),onClick:Ht(t.onClick,s.onClose)})})});O7.displayName=f1;var wk="TooltipPortal",[R7,D7]=gx(wk,{forceMount:void 0}),RL=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:s}=t,i=Ff(wk,e);return c.jsx(R7,{scope:e,forceMount:n,children:c.jsx(Yl,{present:n||i.open,children:c.jsx(cx,{asChild:!0,container:s,children:r})})})};RL.displayName=wk;var Pu="TooltipContent",DL=N.forwardRef((t,e)=>{const n=D7(Pu,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,a=Ff(Pu,t.__scopeTooltip);return c.jsx(Yl,{present:r||a.open,children:a.disableHoverableContent?c.jsx(_L,{side:s,...i,ref:e}):c.jsx(_7,{side:s,...i,ref:e})})}),_7=N.forwardRef((t,e)=>{const n=Ff(Pu,t.__scopeTooltip),r=AL(Pu,t.__scopeTooltip),s=N.useRef(null),i=Cr(e,s),[a,l]=N.useState(null),{trigger:d,onClose:h}=n,p=s.current,{onPointerInTransitChange:m}=r,g=N.useCallback(()=>
vendor: 4,130 bytes, line 23
23{l(null),m(!1)},[m]),x=N.useCallback((v,S)=>{const C=v.currentTarget,j={x:v.clientX,y:v.clientY},E=B7(j,C.getBoundingClientRect()),A=F7(j,E),D=z7(S.getBoundingClientRect()),M=V7([...A,...D]);l(M),m(!0)},[m]);return N.useEffect(()=>()=>g(),[g]),N.useEffect(()=>{if(d&&p){const v=C=>x(C,p),S=C=>x(C,d);return d.addEventListener("pointerleave",v),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",v),p.removeEventListener("pointerleave",S)}}},[d,p,x,g]),N.useEffect(()=>{if(a){const v=S=>{const C=S.target,j={x:S.clientX,y:S.clientY},E=d?.contains(C)||p?.contains(C),A=!q7(j,a);E?g():A&&(g(),h())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[d,p,a,h,g]),c.jsx(_L,{...t,ref:i})}),[P7,L7]=gx(OL,{isInside:!1}),I7=L9("TooltipContent"),_L=N.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=t,d=Ff(Pu,n),h=vk(n),{onClose:p}=d;return N.useEffect(()=>(document.addEventListener(S2,p),()=>document.removeEventListener(S2,p)),[p]),N.useEffect(()=>{if(d.trigger){const m=g=>{g.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),c.jsx(lx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:c.jsxs(E7,{"data-state":d.stateAttribute,...h,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(I7,{children:r}),c.jsx(P7,{scope:n,isInside:!0,children:c.jsx(aH,{id:d.contentId,role:"tooltip",children:s||r})})]})})});DL.displayName=Pu;var PL="TooltipArrow",U7=N.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=vk(n);return L7(PL,n).isInside?null:c.jsx(T7,{...s,...r,ref:e})});U7.displayName=PL;function B7(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function F7(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function z7(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function q7(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){const l=e[i],d=e[a],h=l.x,p=l.y,m=d.x,g=d.y;p>r!=g>r&&n<(m-h)*(r-p)/(g-p)+h&&(s=!s)}return s}function V7(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),$7(e)}function $7(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var H7=ML,K7=RL,LL=DL;const W7=H7,G7=N.forwardRef(({className:t,sideOffset:e=4,...n},r)=>c.jsx(K7,{children:c.jsx(LL,{ref:r,sideOffset:e,className:er("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
23de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...n})}));G7.displayName=LL.displayName;const Y7=new Set([204,205,304]),Q7="application/json, application/problem+json";function IL(t){return typeof Request<"u"&&t instanceof Request}function X7(t,e){return e?e.toUpperCase():IL(t)?t.method.toUpperCase():"GET"}function J7(t){return typeof URL<"u"&&t instanceof URL}function Z7(t){return typeof t=="string"?t:J7(t)?t.toString():t.url}function eG(...t){const e=new Headers;for(const n of t)n&&new Headers(n).forEach((r,s)=>{e.set(s,r)});return e}function UL(t){const e=t.get("content-type");return e?e.split(";",1)[0].trim().toLowerCase():null}function p1(t){return t==="application/json"||!!t?.endsWith("+json")}function BL(t){return!!(t&&(t.startsWith("text/")||t==="application/xml"||t==="text/xml"||t.endsWith("+xml")||t==="application/x-www-form-urlencoded"))}function FL(t,e){return!!(e==="HEAD"||Y7.has(t.status)||t.headers.get("content-length")==="0"||t.body===null)}function zL(t){return t.charCodeAt(0)===65279?t.slice(1):t}function qL(t){const e=t.trimStart();return e.startsWith("{")||e.startsWith("[")}function oh(t,e){if(!t||typeof t!="object")return;const n=t[e];if(typeof n!="string")return;const r=n.trim();return r===""?void 0:r}function tG(t,e=300){return t.length>e?`${t.slice(0,e-1)}…`:t}function nG(t,e){const n=`HTTP ${t.status} ${t.statusText}`;if(typeof e=="string"){const a=e.trim();return a?`${n}: ${tG(a)}`:n}const r=oh(e,"title"),s=oh(e,"detail"),i=oh(e,"message")??oh(e,"error_description")??oh(e,"error");return r&&s?`${n}: ${r} — ${s}`:s?`${n}: ${s}`:i?`${n}: ${i}`:r?`${n}: ${r}`:n}
23class _o extends Error{name="ApiError";status;statusText;data;headers;response;method;url;constructor(e,n,r){super(nG(e,n)),Object.setPrototypeOf(this,new.target.prototype),this.status=e.status,this.statusText=e.statusText,this.data=n,this.headers=e.headers,this.response=e,this.method=r.method,this.url=e.url||r.url}}class rG extends Error{name="ResponseParseError";status;statusText;headers;response;method;url;rawBody;cause;constructor(e,n,r,s){super(`Failed to parse response from ${s.method} ${e.url||s.url} (${e.status} ${e.statusText}) as JSON`),Object.setPrototypeOf(this,new.target.prototype),this.status=e.status,this.statusText=e.statusText,this.headers=e.headers,this.response=e,this.method=s.method,this.url=e.url||s.url,this.rawBody=n,this.cause=r}}async function sG(t,e){const n=await t.text(),r=zL(n);if(r.trim()==="")return null;try{return JSON.parse(r)}catch(s){throw new rG(t,n,s,e)}}async function iG(t,e){if(FL(t,e))return null;const n=UL(t.headers);if(n&&!p1(n)&&!BL(n))return typeof t.blob=="function"?t.blob():t.text();const r=await t.text(),s=zL(r);if(s.trim()==="")return null;if(p1(n)||qL(s))try{return JSON.parse(s)}catch{return r}return r}function aG(t){const e=UL(t.headers);return p1(e)?"json":BL(e)||e==null?"text":"blob"}async function oG(t,e,n){if(FL(t,n.method))return null;switch(e==="auto"?aG(t):e){case"json":return sG(t,n);case"text":{const s=await t.text();return s===""?null:s}case"blob":if(typeof t.blob!="function")throw new TypeError('Blob responses are not supported in this runtime. Use responseType "json" or "text" instead.');return t.blob()}}async function ve(t,e={}){t=t;const{responseType:n="auto",headers:r,...s}=e,i=X7(t,s.method);if(s.body!=null&&(i==="GET"||i==="HEAD"))throw new TypeError(`customFetch: ${i} requests cannot have a body.`);const a=eG(IL(t)?t.headers:void 0,r);typeof s.body=="string"&&!a.has("content-type")&&qL(s.body)&&a.set("content-type","application/json"),n==="json"&&!a.has("accept")&&a.set("accept",Q7);const l={method:i,url:Z7(t)},d=await fetch(t,{...s,method:i,headers:a});if(!d.ok){const h=await iG(d,i);throw new _o(d,h,l)}return await oG(d,n,l)}const lG=()=>"/api/homepage",cG=async t=>ve(lG(),{...t,method:"GET"}),uG=()=>["/api/homepage"],dG=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??uG(),queryFn:({signal:i})=>cG({signal:i,...n}),...e}};function hG(t){const e=dG();return{...lt(e),queryKey:e.queryKey}}const fG=()=>"/api/admin/homepage",pG=async t=>ve(fG(),{...t,method:"GET"}),mG=()=>["/api/admin/homepage"],gG=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??mG(),queryFn:({signal:i})=>pG({signal:i,...n}),...e}};function yG(t){const e=gG();return{...lt(e),queryKey:e.queryKey}}const xG=()=>"/api/admin/homepage",bG=async(t,e)=>ve(xG(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),vG=t=>{const e=["adminUpdateHomepage"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return bG(a,r)},...n}},wG=t=>ft(vG(t)),SG=t=>{const e=new URLSearchParams;Object.entries(t||{}).forEach(([r,s])=>{s!==void 0&&e.append(r,s===null?"null":s.toString())});const n=e.toString();return n.length>0?`/api/careers/jobs?${n}`:"/api/careers/jobs"},kG=async(t,e)=>ve(SG(t),{...e,method:"GET"}),CG=t=>["/api/careers/jobs",...t?[t]:[]],NG=(t,e)=>{const{query:n,request:r}={};return{queryKey:n?.queryKey??CG(t),queryFn:({signal:a})=>kG(t,{signal:a,...r}),...n}};function jG(t,e){const n=NG(t);return{...lt(n),queryKey:n.queryKey}}const EG=t=>`/api/careers/jobs/${t}`,TG=async(t,e)=>ve(EG(t),{...e,method:"GET"}),AG=t=>[`/api/careers/jobs/${t}`],MG=(t,e)=>{const{query:n,request:r}={};return{queryKey:n?.queryKey??AG(t),queryFn:({signal:a})=>TG(t,{signal:a,...r}),enabled:!!t,...n}};function OG(t,e){const n=MG(t);return{...lt(n),queryKey:n.queryKey}}const RG=()=>"/api/founder-applications",DG=async(t,e)=>ve(RG(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),_G=t=>{const e=["submitFounderApplication"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return DG(a,r)},...n}},PG=t=>ft(_G()),LG=()=>"/api/team",IG=async t=>ve(LG(),{...t,method:"GET"}),UG=()=>["/api/team"],BG=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??UG(),queryFn:({signal:i})=>IG({signal:i,...n}),...e}};function FG(t){const e=BG();return{...lt(e),queryKey:e.queryKey}}const zG=()=>"/api/team-content",qG=async t=>ve(zG(),{...t,method:"GET"}),VG=()=>["/api/team-content"],$G=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??VG(),queryFn:({signal:i})=>qG({signal:i,...n}),...e}};function HG(t){const e=$G();return{...lt(e),queryKey:e.queryKey}}const KG=()=>"/api/companies",WG=async t=>ve(KG(),{...t,method:"GET"}),GG=()=>["/api/companies"],YG=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??GG(),queryFn:({signal:i})=>WG({signal:i,...n}),...e}};function QG(t){const e=YG();return{...lt(e),queryKey:e.queryKey}}const XG=()=>"/api/admin/me",JG=async t=>ve(XG(),{...t,method:"GET"}),VL=()=>["/api/admin/me"],ZG=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??VL(),queryFn:({signal:i})=>JG({signal:i,...n}),...e}};
23function nd(t){const e=ZG(t);return{...lt(e),queryKey:e.queryKey}}const eY=t=>{const e=new URLSearchParams;Object.entries(t||{}).forEach(([r,s])=>{s!==void 0&&e.append(r,s===null?"null":s.toString())});const n=e.toString();return n.length>0?`/api/admin/jobs?${n}`:"/api/admin/jobs"},tY=async(t,e)=>ve(eY(t),{...e,method:"GET"}),Dh=t=>["/api/admin/jobs",...t?[t]:[]],nY=(t,e)=>{const{query:n,request:r}={};return{queryKey:n?.queryKey??Dh(t),queryFn:({signal:a})=>tY(t,{signal:a,...r}),...n}};function $L(t,e){const n=nY(t);return{...lt(n),queryKey:n.queryKey}}const rY=()=>"/api/admin/jobs",sY=async(t,e)=>ve(rY(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),iY=t=>{const e=["adminCreateJob"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return sY(a,r)},...n}},aY=t=>ft(iY()),oY=t=>`/api/admin/jobs/${t}`,lY=async(t,e)=>ve(oY(t),{...e,method:"GET"}),cY=t=>[`/api/admin/jobs/${t}`],uY=(t,e)=>{const{query:n,request:r}=e??{};return{queryKey:n?.queryKey??cY(t),queryFn:({signal:a})=>lY(t,{signal:a,...r}),enabled:!!t,...n}};function dY(t,e){const n=uY(t,e);return{...lt(n),queryKey:n.queryKey}}const hY=t=>`/api/admin/jobs/${t}`,fY=async(t,e,n)=>ve(hY(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),pY=t=>{const e=["adminUpdateJob"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return fY(a,l,r)},...n}},mY=t=>ft(pY()),gY=t=>`/api/admin/jobs/${t}`,yY=async(t,e)=>ve(gY(t),{...e,method:"DELETE"}),xY=t=>{const e=["adminDeleteJob"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return yY(a,r)},...n}},HL=t=>ft(xY()),bY=()=>"/api/admin/companies",vY=async t=>ve(bY(),{...t,method:"GET"}),sg=()=>["/api/admin/companies"],wY=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??sg(),queryFn:({signal:i})=>vY({signal:i,...n}),...e}};function zf(t){const e=wY(t);return{...lt(e),queryKey:e.queryKey}}const SY=()=>"/api/admin/companies",kY=async(t,e)=>ve(SY(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),CY=t=>{const e=["adminCreateCompany"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return kY(a,r)},...n}},NY=t=>ft(CY()),jY=t=>`/api/admin/companies/${t}`,EY=async(t,e)=>ve(jY(t),{...e,method:"GET"}),KL=t=>[`/api/admin/companies/${t}`],TY=(t,e)=>{const{query:n,request:r}=e??{};return{queryKey:n?.queryKey??KL(t),queryFn:({signal:a})=>EY(t,{signal:a,...r}),enabled:!!t,...n}};function AY(t,e){const n=TY(t,e);return{...lt(n),queryKey:n.queryKey}}const MY=t=>`/api/admin/companies/${t}`,OY=async(t,e,n)=>ve(MY(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),RY=t=>{const e=["adminUpdateCompany"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return OY(a,l,r)},...n}},DY=t=>ft(RY()),_Y=t=>`/api/admin/companies/${t}`,PY=async(t,e)=>ve(_Y(t),{...e,method:"DELETE"}),LY=t=>{const e=["adminDeleteCompany"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return PY(a,r)},...n}},IY=t=>ft(LY()),UY=()=>"/api/admin/team",BY=async t=>ve(UY(),{...t,method:"GET"}),pa=()=>["/api/admin/team"],FY=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??pa(),queryFn:({signal:i})=>BY({signal:i,...n}),...e}};function zY(t){const e=FY();return{...lt(e),queryKey:e.queryKey}}const qY=()=>"/api/admin/team/sections",VY=async(t,e)=>ve(qY(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),$Y=t=>{const e=["adminCreateTeamSection"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return VY(a,r)},...n}},HY=t=>ft($Y(t)),KY=t=>`/api/admin/team/sections/${t}`,WY=async(t,e,n)=>ve(KY(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),GY=t=>{const e=["adminUpdateTeamSection"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return WY(a,l,r)},...n}},YY=t=>ft(GY(t)),QY=t=>`/api/admin/team/sections/${t}`,XY=async(t,e)=>ve(QY(t),{...e,method:"DELETE"}),JY=t=>{const e=["adminDeleteTeamSection"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return XY(a,r)},...n}},ZY=t=>ft(JY(t)),eQ=()=>"/api/admin/team/members",tQ=async(t,e)=>ve(eQ(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),nQ=t=>{const e=["adminCreateTeamMember"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return tQ(a,r)},...n}},rQ=t=>ft(nQ(t)),sQ=t=>`/api/admin/team/members/${t}`,iQ=async(t,e,n)=>ve(sQ(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),aQ=t=>{const e=["adminUpdateTeamMember"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return iQ(a,l,r)},...n}},oQ=t=>ft(aQ(t)),lQ=t=>`/api/admin/team/members/${t}`,cQ=async(t,e)=>ve(lQ(t),{...e,method:"DELETE"}),uQ=t=>{const e=["adminDeleteTeamMember"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return cQ(a,r)},...n}},dQ=t=>ft(uQ(t)),hQ=()=>"/api/admin/team/order",fQ=async(t,e)=>ve(hQ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),pQ=t=>{const e=["adminReorderTeam"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return fQ(a,r)},...n}},mQ=t=>ft(pQ(t)),gQ=()=>"/api/admin/team-content",yQ=async t=>ve(gQ(),{...t,method:"GET"}),WL=()=>["/api/admin/team-content"],xQ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??WL(),queryFn:({signal:i})=>yQ({signal:i,...n}),...e}};function bQ(t){const e=xQ();return{...lt(e),queryKey:e.queryKey}}const vQ=()=>"/api/admin/team-content",wQ=async(t,e)=>ve(vQ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),SQ=t=>{const e=["adminUpdateTeamContent"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return wQ(a,r)},...n}},kQ=t=>ft(SQ(t)),CQ=()=>"/api/admin/founder-applications",NQ=async t=>ve(CQ(),{...t,method:"GET"}),jQ=()=>["/api/admin/founder-applications"],EQ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??jQ(),queryFn:({signal:i})=>NQ({signal:i,...n}),...e}};function TQ(t){const e=EQ();return{...lt(e),queryKey:e.queryKey}}const AQ=()=>
23"/api/admin/email-settings",MQ=async t=>ve(AQ(),{...t,method:"GET"}),OQ=()=>["/api/admin/email-settings"],RQ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??OQ(),queryFn:({signal:i})=>MQ({signal:i,...n}),...e}};function GL(t){const e=RQ();return{...lt(e),queryKey:e.queryKey}}const DQ=()=>"/api/admin/email-settings",_Q=async(t,e)=>ve(DQ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),PQ=t=>{const e=["adminUpdateEmailSettings"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return _Q(a,r)},...n}},YL=t=>ft(PQ()),LQ=()=>"/api/admin/settings/brand-colors",IQ=async t=>ve(LQ(),{...t,method:"GET"}),Sk=()=>["/api/admin/settings/brand-colors"],UQ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??Sk(),queryFn:({signal:i})=>IQ({signal:i,...n}),...e}};function BQ(t){const e=UQ(t);return{...lt(e),queryKey:e.queryKey}}const FQ=()=>"/api/admin/settings/brand-colors",zQ=async(t,e)=>ve(FQ(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),qQ=t=>{const e=["adminCreateBrandColor"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return zQ(a,r)},...n}},VQ=t=>ft(qQ(t)),$Q=t=>`/api/admin/settings/brand-colors/${t}`,HQ=async(t,e,n)=>ve($Q(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),KQ=t=>{const e=["adminUpdateBrandColor"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return HQ(a,l,r)},...n}},WQ=t=>ft(KQ(t)),GQ=t=>`/api/admin/settings/brand-colors/${t}`,YQ=async(t,e)=>ve(GQ(t),{...e,method:"DELETE"}),QQ=t=>{const e=["adminDeleteBrandColor"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return YQ(a,r)},...n}},XQ=t=>ft(QQ(t)),JQ=t=>`/api/admin/settings/brand-colors/${t}/activate`,ZQ=async(t,e)=>ve(JQ(t),{...e,method:"POST"}),eX=t=>{const e=["adminActivateBrandColor"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return ZQ(a,r)},...n}},tX=t=>ft(eX(t)),nX=t=>{const e=new URLSearchParams;Object.entries(t||{}).forEach(([r,s])=>{s!==void 0&&e.append(r,s===null?"null":s.toString())});const n=e.toString();return n.length>0?`/api/admin/audit-log?${n}`:"/api/admin/audit-log"},rX=async(t,e)=>ve(nX(t),{...e,method:"GET"}),sX=t=>["/api/admin/audit-log",...t?[t]:[]],iX=(t,e)=>{const{query:n,request:r}=e??{};return{queryKey:n?.queryKey??sX(t),queryFn:({signal:a})=>rX(t,{signal:a,...r}),...n}};function QL(t,e){const n=iX(t,e);return{...lt(n),queryKey:n.queryKey}}const aX=()=>"/api/admin/stories",oX=async t=>ve(aX(),{...t,method:"GET"}),Og=()=>["/api/admin/stories"],lX=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??Og(),queryFn:({signal:i})=>oX({signal:i,...n}),...e}};function cX(t){const e=lX(t);return{...lt(e),queryKey:e.queryKey}}const uX=()=>"/api/admin/stories",dX=async(t,e)=>ve(uX(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),hX=t=>{const e=["adminCreateStory"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return dX(a,r)},...n}},fX=t=>ft(hX(t)),pX=t=>`/api/admin/stories/${t}`,mX=async(t,e,n)=>ve(pX(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),gX=t=>{const e=["adminUpdateStory"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return mX(a,l,r)},...n}},yX=t=>ft(gX(t)),xX=t=>`/api/admin/stories/${t}`,bX=async(t,e)=>ve(xX(t),{...e,method:"DELETE"}),vX=t=>{const e=["adminDeleteStory"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return bX(a,r)},...n}},wX=t=>ft(vX(t)),SX=t=>`/api/careers/jobs/${t}/applications`,kX=async(t,e,n)=>ve(SX(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),CX=t=>{const e=["submitJobApplication"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{slug:a,data:l}=i??{};return kX(a,l,r)},...n}},NX=t=>ft(CX()),jX=()=>"/api/stories-page-content",EX=async t=>ve(jX(),{...t,method:"GET"}),TX=()=>["/api/stories-page-content"],AX=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??TX(),queryFn:({signal:i})=>EX({signal:i,...n}),...e}};function MX(t){const e=AX();return{...lt(e),queryKey:e.queryKey}}const OX=()=>"/api/founders-content",RX=async t=>ve(OX(),{...t,method:"GET"}),DX=()=>["/api/founders-content"],_X=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??DX(),queryFn:({signal:i})=>RX({signal:i,...n}),...e}};function PX(t){const e=_X();return{...lt(e),queryKey:e.queryKey}}const LX=()=>"/api/stories",IX=async t=>ve(LX(),{...t,method:"GET"}),UX=()=>["/api/stories"],BX=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??UX(),queryFn:({signal:i})=>IX({signal:i,...n}),...e}};function XL(t){const e=BX();return{...lt(e),queryKey:e.queryKey}}const FX=t=>`/api/stories/${t}`,zX=async(t,e)=>ve(FX(t),{...e,method:"GET"}),qX=t=>[`/api/stories/${t}`],VX=(t,e)=>{const{query:n,request:r}={};return{queryKey:n?.queryKey??qX(t),queryFn:({signal:a})=>zX(t,{signal:a,...r}),enabled:!!t,...n}};function $X(t,e){const n=VX(t);return{...lt(n),queryKey:n.queryKey}}const HX=()=>"/api/admin/stories-page-content",KX=async t=>ve(HX(),{...t,method:"GET"}),WX=()=>["/api/admin/stories-page-content"],GX=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??WX(),queryFn:({signal:i})=>KX({signal:i,...n}),...e}};function YX(t){const e=GX();return{...lt(e),queryKey:e.queryKey}}const QX=()=>"/api/admin/stories-page-content",XX=async(t,e)=>ve(QX(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),JX=t=>{const e=["adminUpdateStoriesPageContent"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return XX(a,r)},...n}},ZX=t=>ft(JX()),eJ=()=>"/api/admin/founders-content",tJ=async t=>ve(eJ(),{...t,method:"GET"}),nJ=()=>["/api/admin/founders-content"],rJ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??nJ(),queryFn:({signal:i})=>tJ({signal:i,...n}),...e}};function sJ(t){const e=rJ();return{...lt(e),queryKey:e.queryKey}}const iJ=()=>"/api/admin/founders-content",aJ=async(t,e)=>ve(iJ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),oJ=t=>{const e=["adminUpdateFoundersContent"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return aJ(a,r)},...n}},lJ=t=>ft(oJ(t)),cJ=()=>"/api/apply-content",uJ=async t=>ve(cJ(),{...t,method:"GET"}),dJ=()=>["/api/apply-content"],hJ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??dJ(),queryFn:({signal:i})=>uJ({signal:i,...n}),...e}};function fJ(t){const e=hJ(t);return{...lt(e),queryKey:e.queryKey}}const pJ=()=>"/api/admin/apply-content",mJ=async t=>ve(pJ(),{...t,method:"GET"}),gJ=()=>["/api/admin/apply-content"],yJ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??gJ(),queryFn:({signal:i})=>mJ({signal:i,...n}),...e}};function xJ(t){const e=yJ();return{...lt(e),queryKey:e.queryKey}}const bJ=()=>"/api/admin/apply-content",vJ=async(t,e)=>ve(bJ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),wJ=t=>{const e=["adminUpdateApplyContent"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return vJ(a,r)},...n}},SJ=t=>ft(wJ(t)),kJ=()=>"/api/admin/users",CJ=async t=>ve(kJ(),{...t,method:"GET"}),kk=()=>["/api/admin/users"],NJ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??kk(),queryFn:({signal:i})=>CJ({signal:i,...n}),...e}};function jJ(t){const e=NJ(t);return{...lt(e),queryKey:e.queryKey}}const EJ=()=>"/api/admin/users",TJ=async(t,e)=>ve(EJ(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),AJ=t=>{const e=["adminCreateUser"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return TJ(a,r)},...n}},MJ=t=>
23ft(AJ(t)),OJ=t=>`/api/admin/users/${t}`,RJ=async(t,e,n)=>ve(OJ(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),DJ=t=>{const e=["adminUpdateUser"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return RJ(a,l,r)},...n}},_J=t=>ft(DJ(t)),PJ=t=>`/api/admin/users/${t}`,LJ=async(t,e)=>ve(PJ(t),{...e,method:"DELETE"}),IJ=t=>{const e=["adminDeleteUser"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a}=i??{};return LJ(a,r)},...n}},UJ=t=>ft(IJ(t)),BJ=()=>"/api/admin/integrity/companies",FJ=async t=>ve(BJ(),{...t,method:"GET"}),zJ=()=>["/api/admin/integrity/companies"],qJ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??zJ(),queryFn:({signal:i})=>FJ({signal:i,...n}),...e}};function VJ(t){const e=qJ(t);return{...lt(e),queryKey:e.queryKey}}const $J=t=>{const e=new URLSearchParams;Object.entries(t||{}).forEach(([r,s])=>{s!==void 0&&e.append(r,s===null?"null":s.toString())});const n=e.toString();return n.length>0?`/api/admin/analytics/summary?${n}`:"/api/admin/analytics/summary"},HJ=async(t,e)=>ve($J(t),{...e,method:"GET"}),KJ=t=>["/api/admin/analytics/summary",...t?[t]:[]],WJ=(t,e)=>{const{query:n,request:r}=e??{};return{queryKey:n?.queryKey??KJ(t),queryFn:({signal:a})=>HJ(t,{signal:a,...r}),...n}};function GJ(t,e){const n=WJ(t,e);return{...lt(n),queryKey:n.queryKey}}const YJ=()=>"/api/investors",QJ=async t=>ve(YJ(),{...t,method:"GET"}),XJ=()=>["/api/investors"],JJ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??XJ(),queryFn:({signal:i})=>QJ({signal:i,...n}),...e}};function ZJ(t){const e=JJ();return{...lt(e),queryKey:e.queryKey}}const eZ=()=>"/api/admin/investors",tZ=async t=>ve(eZ(),{...t,method:"GET"}),nZ=()=>["/api/admin/investors"],rZ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??nZ(),queryFn:({signal:i})=>tZ({signal:i,...n}),...e}};function sZ(t){const e=rZ();return{...lt(e),queryKey:e.queryKey}}const iZ=()=>"/api/admin/investors",aZ=async(t,e)=>ve(iZ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),oZ=t=>{const e=["adminUpdateInvestors"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return aZ(a,r)},...n}},lZ=t=>ft(oZ(t)),cZ=()=>"/api/thesis",uZ=async t=>ve(cZ(),{...t,method:"GET"}),dZ=()=>["/api/thesis"],hZ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??dZ(),queryFn:({signal:i})=>uZ({signal:i,...n}),...e}};function fZ(t){const e=hZ();return{...lt(e),queryKey:e.queryKey}}const pZ=()=>"/api/admin/thesis",mZ=async t=>ve(pZ(),{...t,method:"GET"}),gZ=()=>["/api/admin/thesis"],yZ=t=>{const{query:e,request:n}={};return{queryKey:e?.queryKey??gZ(),queryFn:({signal:i})=>mZ({signal:i,...n}),...e}};function xZ(t){const e=yZ();return{...lt(e),queryKey:e.queryKey}}const bZ=()=>"/api/admin/thesis",vZ=async(t,e)=>ve(bZ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),wZ=t=>{const e=["adminUpdateThesis"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return vZ(a,r)},...n}},SZ=t=>ft(wZ(t)),kZ=()=>"/api/grievance-redressal",CZ=async t=>ve(kZ(),{...t,method:"GET"}),NZ=()=>["/api/grievance-redressal"],jZ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??NZ(),queryFn:({signal:i})=>CZ({signal:i,...n}),...e}};function EZ(t){const e=jZ(t);return{...lt(e),queryKey:e.queryKey}}const TZ=()=>"/api/grievance-redressal/submissions",AZ=async(t,e)=>ve(TZ(),{...e,method:"POST",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),MZ=t=>{const e=["submitGrievance"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return AZ(a,r)},...n}},OZ=t=>ft(MZ()),RZ=()=>"/api/admin/grievance-redressal",DZ=async t=>ve(RZ(),{...t,method:"GET"}),JL=()=>["/api/admin/grievance-redressal"],_Z=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??JL(),queryFn:({signal:i})=>DZ({signal:i,...n}),...e}};function PZ(t){const e=_Z(t);return{...lt(e),queryKey:e.queryKey}}const LZ=()=>"/api/admin/grievance-redressal",IZ=async(t,e)=>ve(LZ(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),UZ=t=>{const e=["adminUpdateGrievanceRedressal"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return IZ(a,r)},...n}},BZ=t=>ft(UZ(t)),FZ=()=>"/api/admin/grievance-submissions",zZ=async t=>ve(FZ(),{...t,method:"GET"}),ZL=()=>["/api/admin/grievance-submissions"],qZ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??ZL(),queryFn:({signal:i})=>zZ({signal:i,...n}),...e}};function VZ(t){const e=qZ(t);return{...lt(e),queryKey:e.queryKey}}const $Z=t=>`/api/admin/grievance-submissions/${t}`,HZ=async(t,e,n)=>ve($Z(t),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)}),KZ=t=>{const e=["adminUpdateGrievanceSubmission"],{mutation:n,request:r}=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:{...t,mutation:{...t.mutation,mutationKey:e}}:{mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{id:a,data:l}=i??{};return HZ(a,l,r)},...n}},WZ=t=>ft(KZ(t)),GZ=()=>"/api/site-settings",YZ=async t=>ve(GZ(),{...t,method:"GET"}),e3=()=>["/api/site-settings"],QZ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??e3(),queryFn:({signal:i})=>YZ({signal:i,...n}),...e}};function yx(t){const e=QZ(t);return{...lt(e),queryKey:e.queryKey}}const XZ=()=>"/api/admin/site-settings",JZ=async t=>ve(XZ(),{...t,method:"GET"}),t3=()=>["/api/admin/site-settings"],ZZ=t=>{const{query:e,request:n}=t??{};return{queryKey:e?.queryKey??t3(),queryFn:({signal:i})=>JZ({signal:i,...n}),...e}};function eee(t){const e=ZZ(t);return{...lt(e),queryKey:e.queryKey}}const tee=()=>"/api/admin/site-settings",nee=async(t,e)=>ve(tee(),{...e,method:"PUT",headers:{"Content-Type":"application/json",...e?.headers},body:JSON.stringify(t)}),ree=t=>{const e=["adminUpdateSiteSettings"],{mutation:n,request:r}={mutation:{mutationKey:e},request:void 0};return{mutationFn:i=>{const{data:a}=i??{};return nee(a,r)},...n}},see=t=>ft(ree()),wm={white:"white","mint-bright":"mint-bright","mint-bright-x":"mint-bright-x","mint-duo-dark":"mint-duo-dark"},Ck=N.createContext({});function To(t){const e=N.useRef(null);return e.current===null&&(e.current=t()),e.current}const iee=typeof window<"u",xx=iee?N.useLayoutEffect:N.useEffect,bx=N.createContext(null);function Nk(t,e){t.indexOf(e)===-1&&t.push(e)}function Rg(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Xs=(t,e,n)=>n>e?e:n<t?t:n;let lf=()=>{};const ma={},n3=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function r3(t){return typeof t=="object"&&t!==null}const s3=t=>/^0[^.\s]+$/u.test(t);function i3(t){let e;return()=>(e===void 0&&(e=t()),e)}const Lr=t=>t,aee=(t,e)=>n=>e(t(n)),qf=(...t)=>t.reduce(aee),Lu=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class jk{constructor(){this.subscriptions=[]}add(e){return Nk(this.subscriptions,e),()=>Rg(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ws=t=>t*1e3,vs=t=>t/1e3;function Ek(t,e){return e?t*(1e3/e):0}const a3=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,oee=1e-7,lee=12;function cee(t,e,n,r,s){let i,a,l=0;do a=e+(n-e)/2,i=a3(a,r,s)-t,i>0?n=a:e=a;while(Math.abs(i)>oee&&++l<lee);return a}function Vf(t,e,n,r){if(t===e&&n===r)return Lr;const s=i=>cee(i,0,1,t,n);return i=>i===0||i===1?i:a3(s(i),e,r)}const o3=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,l3=t=>e=>1-t(1-e),c3=Vf(.33,1.53,.69,.99),Tk=l3(c3),u3=o3(Tk),d3=t=>(t*=2)<1?.5*Tk(t):.5*(2-Math.pow(2,-10*(t-1))),Ak=t=>1-Math.sin(Math.acos(t)),h3=l3(Ak),f3=o3(Ak),uee=Vf(.42,0,1,1),dee=Vf(0,0,.58,1),p3=Vf(.42,0,.58,1),hee=t=>Array.isArray(t)&&typeof t[0]!="number",m3=t=>Array.isArray(t)&&typeof t[0]=="number",fee={linear:Lr,easeIn:uee,easeInOut:p3,easeOut:dee,circIn:Ak,circInOut:f3,circOut:h3,backIn:Tk,backInOut:u3,backOut:c3,anticipate:d3},pee=t=>typeof t=="string",k2=t=>{if(m3(t)){lf(t.length===4);const[e,n,r,s]=t;return Vf(e,n,r,s)}else if(pee(t))return fee[t];return t},Sm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function mee(t,e){let n=new Set,r=new Set,s=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function d(p){a.has(p)&&(h.schedule(p),t()),p(l)}const h={schedule:(p,m=!1,g=!1)=>{const v=g&&s?n:r;return m&&a.add(p),v.has(p)||v.add(p),p},cancel:p=>{r.delete(p),a.delete(p)},process:p=>{if(l=p,s){i=!0;return}
vendor: 14,560 bytes, line 23
23s=!0,[n,r]=[r,n],n.forEach(d),n.clear(),s=!1,i&&(i=!1,h.process(p))}};return h}const gee=40;function g3(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Sm.reduce((A,D)=>(A[D]=mee(i),A),{}),{setup:l,read:d,resolveKeyframes:h,preUpdate:p,update:m,preRender:g,render:x,postRender:v}=a,S=()=>{const A=ma.useManualTiming?s.timestamp:performance.now();n=!1,ma.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(A-s.timestamp,gee),1)),s.timestamp=A,s.isProcessing=!0,l.process(s),d.process(s),h.process(s),p.process(s),m.process(s),g.process(s),x.process(s),v.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(S))},C=()=>{n=!0,r=!0,s.isProcessing||t(S)};return{schedule:Sm.reduce((A,D)=>{const M=a[D];return A[D]=(I,_=!1,L=!1)=>(n||C(),M.schedule(I,_,L)),A},{}),cancel:A=>{for(let D=0;D<Sm.length;D++)a[Sm[D]].cancel(A)},state:s,steps:a}}const{schedule:bt,cancel:Ns,state:Bn,steps:Mv}=g3(typeof requestAnimationFrame<"u"?requestAnimationFrame:Lr,!0);let ig;function yee(){ig=void 0}const wr={now:()=>(ig===void 0&&wr.set(Bn.isProcessing||ma.useManualTiming?Bn.timestamp:performance.now()),ig),set:t=>{ig=t,queueMicrotask(yee)}},y3=t=>e=>typeof e=="string"&&e.startsWith(t),x3=y3("--"),xee=y3("var(--"),Mk=t=>xee(t)?bee.test(t.split("/*")[0].trim()):!1,bee=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function C2(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const rd={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},cf={...rd,transform:t=>Xs(0,1,t)},km={...rd,default:1},_h=t=>Math.round(t*1e5)/1e5,Ok=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vee(t){return t==null}const wee=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rk=(t,e)=>n=>!!(typeof n=="string"&&wee.test(n)&&n.startsWith(t)||e&&!vee(n)&&Object.prototype.hasOwnProperty.call(n,e)),b3=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,l]=r.match(Ok);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},See=t=>Xs(0,255,t),Ov={...rd,transform:t=>Math.round(See(t))},wl={test:Rk("rgb","red"),parse:b3("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Ov.transform(t)+", "+Ov.transform(e)+", "+Ov.transform(n)+", "+_h(cf.transform(r))+")"};function kee(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const m1={test:Rk("#"),parse:kee,transform:wl.transform},$f=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),to=$f("deg"),wi=$f("%"),Oe=$f("px"),Cee=$f("vh"),Nee=$f("vw"),N2={...wi,parse:t=>wi.parse(t)/100,transform:t=>wi.transform(t*100)},bu={test:Rk("hsl","hue"),parse:b3("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+wi.transform(_h(e))+", "+wi.transform(_h(n))+", "+_h(cf.transform(r))+")"},yn={test:t=>wl.test(t)||m1.test(t)||bu.test(t),parse:t=>wl.test(t)?wl.parse(t):bu.test(t)?bu.parse(t):m1.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?wl.transform(t):bu.transform(t),getAnimatableNone:t=>{const e=yn.parse(t);return e.alpha=0,yn.transform(e)}},jee=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Eee(t){return isNaN(t)&&typeof t=="string"&&(t.match(Ok)?.length||0)+(t.match(jee)?.length||0)>0}const v3="number",w3="color",Tee="var",Aee="var(",j2="${}",Mee=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function uf(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=e.replace(Mee,d=>(yn.test(d)?(r.color.push(i),s.push(w3),n.push(yn.parse(d))):d.startsWith(Aee)?(r.var.push(i),s.push(Tee),n.push(d)):(r.number.push(i),s.push(v3),n.push(parseFloat(d))),++i,j2)).split(j2);return{values:n,split:l,indexes:r,types:s}}function S3(t){return uf(t).values}function k3(t){const{split:e,types:n}=uf(t),r=e.length;return s=>{let i="";for(let a=0;a<r;a++)if(i+=e[a],s[a]!==void 0){const l=n[a];l===v3?i+=_h(s[a]):l===w3?i+=yn.transform(s[a]):i+=s[a]}return i}}const Oee=t=>typeof t=="number"?0:yn.test(t)?yn.getAnimatableNone(t):t;function Ree(t){const e=S3(t);return k3(t)(e.map(Oee))}const Gs={test:Eee,parse:S3,createTransformer:k3,getAnimatableNone:Ree};function Rv(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Dee({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,a=0;if(!e)s=i=a=n;else{const l=n<.5?n*(1+e):n+e-n*e,d=2*n-l;s=Rv(d,l,t+1/3),i=Rv(d,l,t),a=Rv(d,l,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Dg(t,e){return n=>n>0?e:t}const Qt=(t,e,n)=>t+(e-t)*n,Dv=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},_ee=[m1,wl,bu],Pee=t=>_ee.find(e=>e.test(t));function E2(t){const e=Pee(t);if(!e)return!1;let n=e.parse(t);return e===bu&&(n=Dee(n)),n}const T2=(t,e)=>{const n=E2(t),r=E2(e);if(!n||!r)return Dg(t,e);const s={...n};return i=>(s.red=Dv(n.red,r.red,i),s.green=Dv(n.green,r.green,i),s.blue=Dv(n.blue,r.blue,i),s.alpha=Qt(n.alpha,r.alpha,i),wl.transform(s))},g1=new Set(["none","hidden"]);function Lee(t,e){return g1.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Iee(t,e){return n=>Qt(t,e,n)}function Dk(t){return typeof t=="number"?Iee:typeof t=="string"?Mk(t)?Dg:yn.test(t)?T2:Fee:Array.isArray(t)?C3:typeof t=="object"?yn.test(t)?T2:Uee:Dg}function C3(t,e){const n=[...t],r=n.length,s=t.map((i,a)=>Dk(i)(i,e[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function Uee(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=Dk(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function Bee(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],a=t.indexes[i][r[i]],l=t.values[a]??0;n[s]=l,r[i]++}return n}const Fee=(t,e)=>{const n=Gs.createTransformer(e),r=uf(t),s=uf(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?g1.has(t)&&!s.values.length||g1.has(e)&&!r.values.length?Lee(t,e):qf(C3(Bee(r,s),s.values),n):Dg(t,e)};function N3(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Qt(t,e,n):Dk(t)(t,e)}const zee=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>bt.update(e,n),stop:()=>Ns(e),now:()=>Bn.isProcessing?Bn.timestamp:wr.now()}},j3=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},_g=2e4;function _k(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<_g;)e+=n,r=t.next(e);return e>=_g?1/0:e}function qee(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(_k(r),_g);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:vs(s)}}const Vee=5;function E3(t,e,n){const r=Math.max(e-Vee,0);return Ek(n-t(r),e-r)}const rn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},_v=.001;function $ee({duration:t=rn.duration,bounce:e=rn.bounce,velocity:n=rn.velocity,mass:r=rn.mass}){let s,i,a=1-e;a=Xs(rn.minDamping,rn.maxDamping,a),t=Xs(rn.minDuration,rn.maxDuration,vs(t)),a<1?(s=h=>{const p=h*a,m=p*t,g=p-n,x=y1(h,a),v=Math.exp(-m);return _v-g/x*v},i=h=>{const m=h*a*t,g=m*n+n,x=Math.pow(a,2)*Math.pow(h,2)*t,v=Math.exp(-m),S=y1(Math.pow(h,2),a);return(-s(h)+_v>0?-1:1)*((g-x)*v)/S}):(s=h=>{const p=Math.exp(-h*t),m=(h-n)*t+1;return-_v+p*m},i=h=>{const p=Math.exp(-h*t),m=(n-h)*(t*t);return p*m});const l=5/t,d=Kee(s,i,l);if(t=Ws(t),isNaN(d))return{stiffness:rn.stiffness,damping:rn.damping,duration:t};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:a*2*Math.sqrt(r*h),duration:t}}}const Hee=12;function Kee(t,e,n){let r=n;for(let s=1;s<Hee;s++)r=r-t(r)/e(r);return r}function y1(t,e){return t*Math.sqrt(1-e*e)}const Wee=["duration","bounce"],Gee=["stiffness","damping","mass"];function A2(t,e){return e.some(n=>t[n]!==void 0)}function Yee(t){let e={velocity:rn.velocity,stiffness:rn.stiffness,damping:rn.damping,mass:rn.mass,isResolvedFromDuration:!1,...t};if(!A2(t,Gee)&&A2(t,Wee))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Xs(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:rn.mass,stiffness:s,damping:i}}else{const n=$ee({...t,velocity:0});e={...e,...n,mass:rn.mass},e.isResolvedFromDuration=!0}return e}function Pg(t=rn.visualDuration,e=rn.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:d,damping:h,mass:p,duration:m,velocity:g,isResolvedFromDuration:x}=Yee({...n,velocity:-vs(n.velocity||0)}),v=g||0,S=h/(2*Math.sqrt(d*p)),C=a-i,j=vs(Math.sqrt(d/p)),E=Math.abs(C)<5;r||(r=E?rn.restSpeed.granular:rn.restSpeed.default),s||(s=E?rn.restDelta.granular:rn.restDelta.default);let A;if(S<1){const M=y1(j,S);A=I=>{const _=Math.exp(-S*j*I);return a-_*((v+S*j*C)/M*Math.sin(M*I)+C*Math.cos(M*I))}}else if(S===1)A=M=>a-Math.exp(-j*M)*(C+(v+j*C)*M);else{const M=j*Math.sqrt(S*S-1);A=I=>{const _=Math.exp(-S*j*I),L=Math.min(M*I,300);return a-_*((v+S*j*C)*Math.sinh(L)+M*C*Math.cosh(L))/M}}const D={calculatedDuration:x&&m||null,next:M=>{const I=A(M);if(x)l.done=M>=m;else{let _=M===0?v:0;S<1&&(_=M===0?Ws(v):E3(A,M,I));const L=Math.abs(_)<=r,V=Math.abs(a-I)<=s;l.done=L&&V}return l.value=l.done?a:I,l},toString:()=>{const M=Math.min(_k(D),_g),I=j3(_=>D.next(M*_).value,M,30);return M+"ms "+I},toTransition:()=>{}};return D}Pg.applyToOptions=t=>{const e=qee(t,100,Pg);return t.ease=e.ease,t.duration=Ws(e.duration),t.type="keyframes",t};function x1({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:d,restDelta:h=.5,restSpeed:p}){const m=t[0],g={done:!1,value:m},x=L=>l!==void 0&&L<l||d!==void 0&&L>d,v=L=>l===void 0?d:d===void 0||Math.abs(l-L)<Math.abs(d-L)?l:d;let S=n*e;const C=m+S,j=a===void 0?C:a(C);j!==C&&(S=j-m);const E=L=>-S*Math.exp(-L/r),A=L=>j+E(L),D=L=>{const V=E(L),B=A(L);g.done=Math.abs(V)<=h,g.value=g.done?j:B};let M,I;const _=L=>{x(g.value)&&(M=L,I=Pg({keyframes:[g.value,v(g.value)],velocity:E3(A,L,g.value),damping:s,stiffness:i,restDelta:h,restSpeed:p}))};return _(0),{calculatedDuration:null,next:L=>{let V=!1;return!I&&M===void 0&&(V=!0,D(L),_(L)),M!==void 0&&L>=M?I.next(L-M):(!V&&D(L),g)}}}function Qee(t,e,n){const r=[],s=n||ma.mix||N3,i=t.length-1;for(let a=0;a<i;a++){let l=s(t[a],t[a+1]);if(e){const d=Array.isArray(e)?e[a]||Lr:e;l=qf(d,l)}r.push(l)}return r}function Pk(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(lf(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const l=Qee(e,r,s),d=l.length,h=p=>{if(a&&p<t[0])return e[0];let m=0;if(d>1)for(;m<t.length-2&&!(p<t[m+1]);m++);const g=Lu(t[m],t[m+1],p);return l[m](g)};return n?p=>h(Xs(t[0],t[i-1],p)):h}function Xee(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Lu(0,e,r);t.push(Qt(n,1,s))}}function T3(t){const e=[0];return Xee(e,t.length-1),e}function Jee(t,e){return t.map(n=>n*e)}function Zee(t,e){return t.map(()=>e||p3).splice(0,t.length-1)}function Ph({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=hee(r)?r.map(k2):k2(r),i={done:!1,value:e[0]},a=Jee(n&&n.length===e.length?n:T3(e),t),l=Pk(a,e,{ease:Array.isArray(s)?s:Zee(e,s)});return{calculatedDuration:t,next:d=>(i.value=l(d),i.done=d>=t,i)}}const ete=t=>t!==null;function Lk(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(ete),l=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const tte={decay:x1,inertia:x1,tween:Ph,keyframes:Ph,spring:Pg};function A3(t){typeof t.type=="string"&&(t.type=tte[t.type])}class Ik{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const nte=t=>t/100;class Uk extends Ik{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==wr.now()&&this.tick(wr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;A3(e);const{type:n=Ph,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=e;let{keyframes:l}=e;const d=n||Ph;d!==Ph&&typeof l[0]!="number"&&(this.mixKeyframes=qf(nte,N3(l[0],l[1])),l=[0,100]);const h=d({...e,keyframes:l});i==="mirror"&&(this.mirroredGenerator=d({...e,keyframes:[...l].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=_k(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=h}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:p,repeat:m,repeatType:g,repeatDelay:x,type:v,onUpdate:S,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const j=this.currentTime-h*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?j<0:j>s;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let A=this.currentTime,D=r;if(m){const L=Math.min(this.currentTime,s)/l;let V=Math.floor(L),B=L%1;
vendor: 23,545 bytes, line 23
23!B&&L>=1&&(B=1),B===1&&V--,V=Math.min(V,m+1),V%2&&(g==="reverse"?(B=1-B,x&&(B-=x/l)):g==="mirror"&&(D=a)),A=Xs(0,1,B)*l}const M=E?{done:!1,value:p[0]}:D.next(A);i&&!E&&(M.value=i(M.value));let{done:I}=M;!E&&d!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return _&&v!==x1&&(M.value=Lk(p,this.options,C,this.speed)),S&&S(M.value),_&&this.finish(),M}then(e,n){return this.finished.then(e,n)}get duration(){return vs(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+vs(e)}get time(){return vs(this.currentTime)}set time(e){e=Ws(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(wr.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=vs(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=zee,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(wr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function rte(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Sl=t=>t*180/Math.PI,b1=t=>{const e=Sl(Math.atan2(t[1],t[0]));return v1(e)},ste={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:b1,rotateZ:b1,skewX:t=>Sl(Math.atan(t[1])),skewY:t=>Sl(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},v1=t=>(t=t%360,t<0&&(t+=360),t),M2=b1,O2=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),R2=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ite={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:O2,scaleY:R2,scale:t=>(O2(t)+R2(t))/2,rotateX:t=>v1(Sl(Math.atan2(t[6],t[5]))),rotateY:t=>v1(Sl(Math.atan2(-t[2],t[0]))),rotateZ:M2,rotate:M2,skewX:t=>Sl(Math.atan(t[4])),skewY:t=>Sl(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function w1(t){return t.includes("scale")?1:0}function S1(t,e){if(!t||t==="none")return w1(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=ite,s=n;else{const l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ste,s=l}if(!s)return w1(e);const i=r[e],a=s[1].split(",").map(ote);return typeof i=="function"?i(a):a[i]}const ate=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return S1(n,e)};function ote(t){return parseFloat(t.trim())}const sd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],id=new Set(sd),D2=t=>t===rd||t===Oe,lte=new Set(["x","y","z"]),cte=sd.filter(t=>!lte.has(t));function ute(t){const e=[];return cte.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const go={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>S1(e,"x"),y:(t,{transform:e})=>S1(e,"y")};go.translateX=go.x;go.translateY=go.y;const Tl=new Set;let k1=!1,C1=!1,N1=!1;function M3(){if(C1){const t=Array.from(Tl).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=ute(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}C1=!1,k1=!1,Tl.forEach(t=>t.complete(N1)),Tl.clear()}function O3(){Tl.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(C1=!0)})}function dte(){N1=!0,O3(),M3(),N1=!1}class Bk{constructor(e,n,r,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Tl.add(this),k1||(k1=!0,bt.read(O3),bt.resolveKeyframes(M3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),s&&i===void 0&&s.set(e[0])}rte(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Tl.delete(this)}cancel(){this.state==="scheduled"&&(Tl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hte=t=>t.startsWith("--");function R3(t,e,n){hte(e)?t.style.setProperty(e,n):t.style[e]=n}const fte={};function Fk(t,e){const n=i3(t);return()=>fte[e]??n()}const zk=Fk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),D3=Fk(()=>window.ViewTimeline!==void 0,"viewTimeline"),_3=Fk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wh=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,_2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wh([0,.65,.55,1]),circOut:wh([.55,0,1,.45]),backIn:wh([.31,.01,.66,-.59]),backOut:wh([.33,1.53,.69,.99])};function P3(t,e){if(t)return typeof t=="function"?_3()?j3(t,e):"ease-out":m3(t)?wh(t):Array.isArray(t)?t.map(n=>P3(n,e)||_2.easeOut):_2[t]}function pte(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:l="easeOut",times:d}={},h=void 0){const p={[e]:n};d&&(p.offset=d);const m=P3(l,s);Array.isArray(m)&&(p.easing=m);const g={delay:r,duration:s,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return h&&(g.pseudoElement=h),t.animate(p,g)}function L3(t){return typeof t=="function"&&"applyToOptions"in t}function mte({type:t,...e}){return L3(t)&&_3()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class I3 extends Ik{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:l,onComplete:d}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,lf(typeof e.type!="string");const h=mte(e);this.animation=pte(n,r,s,h,i),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const p=Lk(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(p),R3(n,r,p),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return vs(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+vs(e)}get time(){return vs(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ws(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&zk()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Lr):s(this)}}const U3={anticipate:d3,backInOut:u3,circInOut:f3};function gte(t){return t in U3}function yte(t){typeof t.ease=="string"&&gte(t.ease)&&(t.ease=U3[t.ease])}const Pv=10;class xte extends I3{constructor(e){yte(e),A3(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...a}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const l=new Uk({...a,autoplay:!1}),d=Math.max(Pv,wr.now()-this.startTime),h=Xs(0,Pv,d-Pv),p=l.sample(d).value,{name:m}=this.options;i&&m&&R3(i,m,p),n.setWithVelocity(l.sample(Math.max(0,d-h)).value,p,h),l.stop()}}const P2=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Gs.test(t)||t==="0")&&!t.startsWith("url("));function bte(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function vte(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],a=P2(s,e),l=P2(i,e);return!a||!l?!1:bte(t)||(n==="spring"||L3(n))&&r}function j1(t){t.duration=0,t.type="keyframes"}const wte=new Set(["opacity","clipPath","filter","transform"]),Ste=i3(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kte(t){const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=e.owner.getProps();return Ste()&&n&&wte.has(n)&&(n!=="transform"||!h)&&!d&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}const Cte=40;class Nte extends Ik{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:l,name:d,motionValue:h,element:p,...m}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wr.now();const g={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,name:d,motionValue:h,element:p,...m},x=p?.KeyframeResolver||Bk;this.keyframeResolver=new x(l,(v,S,C)=>this.onKeyframesResolved(v,S,g,!C),d,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,r,s){this.keyframeResolver=void 0;const{name:i,type:a,velocity:l,delay:d,isHandoff:h,onUpdate:p}=r;this.resolvedAt=wr.now(),vte(e,i,a,l)||((ma.instantAnimations||!d)&&p?.(Lk(e,r,n)),e[0]=e[e.length-1],j1(r),r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Cte?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},x=!h&&kte(g),v=g.motionValue?.owner?.current,S=x?new xte({...g,element:v}):new Uk(g);S.finished.then(()=>{this.notifyFinished()}).catch(Lr),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),dte()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function B3(t,e,n,r=0,s=1){const i=Array.from(t).sort((h,p)=>h.sortNodePosition(p)).indexOf(e),a=t.size,l=(a-1)*r;return typeof n=="function"?n(i,a):s===1?i*r:l-i*r}const jte=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ete(t){const e=jte.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}function F3(t,e,n=1){const[r,s]=Ete(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const a=i.trim();return n3(a)?parseFloat(a):a}return Mk(s)?F3(s,e,n+1):s}const Tte={type:"spring",stiffness:500,damping:25,restSpeed:10},Ate=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Mte={type:"keyframes",duration:.8},Ote={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Rte=(t,{keyframes:e})=>e.length>2?Mte:id.has(t)?t.startsWith("scale")?Ate(e[1]):Tte:Ote,Dte=t=>t!==null;function _te(t,{repeat:e,repeatType:n="loop"},r){const s=t.filter(Dte),i=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[i]}function z3(t,e){if(t?.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function qk(t,e){const n=t?.[e]??t?.default??t;return n!==t?z3(n,t):n}function Pte({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:a,repeatDelay:l,from:d,elapsed:h,...p}){return!!Object.keys(p).length}const Vk=(t,e,n,r={},s,i)=>a=>{const l=qk(r,t)||{},d=l.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Ws(d);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:g=>{e.set(g),l.onUpdate&&l.onUpdate(g)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:i?void 0:s};Pte(l)||Object.assign(p,Rte(t,p)),p.duration&&(p.duration=Ws(p.duration)),p.repeatDelay&&(p.repeatDelay=Ws(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let m=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(j1(p),p.delay===0&&(m=!0)),(ma.instantAnimations||ma.skipAnimations||s?.shouldSkipAnimations)&&(m=!0,j1(p),p.delay=0),p.allowFlatten=!l.type&&!l.ease,m&&!i&&e.get()!==void 0){const g=_te(p.keyframes,l);if(g!==void 0){bt.update(()=>{p.onUpdate(g),p.onComplete()});return}}return l.isSync?new Uk(p):new Nte(p)};function L2(t){const e=[{},{}];return t?.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function $k(t,e,n,r){if(typeof e=="function"){const[s,i]=L2(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=L2(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function ju(t,e,n){const r=t.getProps();return $k(r,e,n!==void 0?n:r.custom,t)}const q3=new Set(["width","height","top","left","right","bottom",...sd]),I2=30,Lte=t=>!isNaN(parseFloat(t)),Lh={current:void 0};class Ite{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=wr.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=wr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lte(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new jk);const r=this.events[e].add(n);return e==="change"?()=>{r(),bt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Lh.current&&Lh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=wr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>I2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,I2);return Ek(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hs(t,e){return new Ite(t,e)}const E1=t=>Array.isArray(t);function Ute(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Hs(n))}function Bte(t){return E1(t)?t[t.length-1]||0:t}function Fte(t,e){const n=ju(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const l=Bte(i[a]);Ute(t,a,l)}}const lr=t=>!!(t&&t.getVelocity);function zte(t){return!!(lr(t)&&t.add)}function T1(t,e){const n=t.getValue("willChange");if(zte(n))return n.add(e);if(!n&&ma.WillChange){const r=new ma.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Hk(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const qte="framerAppearId",V3="data-"+Hk(qte);function $3(t){return t.props[V3]}function Vte({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function H3(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:a,...l}=e;const d=t.getDefaultTransition();i=i?z3(i,d):d;const h=i?.reduceMotion;r&&(i=r);const p=[],m=s&&t.animationState&&t.animationState.getState()[s];for(const g in l){const x=t.getValue(g,t.latestValues[g]??null),v=l[g];if(v===void 0||m&&Vte(m,g))continue;const S={delay:n,...qk(i||{},g)},C=x.get();if(C!==void 0&&!x.isAnimating&&!Array.isArray(v)&&v===C&&!S.velocity)continue;let j=!1;if(window.MotionHandoffAnimation){const D=$3(t);if(D){const M=window.MotionHandoffAnimation(D,g,bt);M!==null&&(S.startTime=M,j=!0)}}T1(t,g);const E=h??t.shouldReduceMotion;x.start(Vk(g,x,v,E&&q3.has(g)?{type:!1}:S,t,j));const A=x.animation;A&&p.push(A)}if(a){const g=()=>bt.update(()=>{a&&Fte(t,a)});p.length?Promise.all(p).then(g):g()}return p}function A1(t,e,n={}){const r=ju(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(H3(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=s;return $te(t,e,d,h,p,m,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[d,h]=l==="beforeChildren"?[i,a]:[a,i];return d().then(()=>h())}else return Promise.all([i(),a(n.delay)])}function $te(t,e,n=0,r=0,s=0,i=1,a){const l=[];for(const d of t.variantChildren)d.notify("AnimationStart",e),l.push(A1(d,e,{...a,delay:n+(typeof r=="function"?0:r)+B3(t.variantChildren,d,r,s,i)}).then(()=>d.notify("AnimationComplete",e)));return Promise.all(l)}function Hte(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>A1(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=A1(t,e,n);else{const s=typeof e=="function"?ju(t,e,n.custom):e;r=Promise.all(H3(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const Kte={test:t=>t==="auto",parse:t=>t},K3=t=>e=>e.test(t),W3=[rd,Oe,wi,to,Nee,Cee,Kte],U2=t=>W3.find(K3(t));function Wte(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||s3(t):!0}const Gte=new Set(["brightness","contrast","saturate","opacity"]);function Yte(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Ok)||[];if(!r)return t;const s=n.replace(r,"");let i=Gte.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const Qte=/\b([a-z-]*)\(.*?\)/gu,M1={...Gs,getAnimatableNone:t=>{const e=t.match(Qte);return e?e.map(Yte).join(" "):t}},O1={...Gs,getAnimatableNone:t=>{const e=Gs.parse(t);return Gs.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},B2={...rd,transform:Math.round},Xte={rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:km,scaleX:km,scaleY:km,scaleZ:km,skew:to,skewX:to,skewY:to,distance:Oe,translateX:Oe,translateY:Oe,translateZ:Oe,x:Oe,y:Oe,z:Oe,perspective:Oe,transformPerspective:Oe,opacity:cf,originX:N2,originY:N2,originZ:Oe},Kk={borderWidth:Oe,borderTopWidth:Oe,borderRightWidth:Oe,borderBottomWidth:Oe,borderLeftWidth:Oe,borderRadius:Oe,borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomRightRadius:Oe,borderBottomLeftRadius:Oe,width:Oe,maxWidth:Oe,height:Oe,maxHeight:Oe,top:Oe,right:Oe,bottom:Oe,left:Oe,inset:Oe,insetBlock:Oe,insetBlockStart:Oe,insetBlockEnd:Oe,insetInline:Oe,insetInlineStart:Oe,insetInlineEnd:Oe,padding:Oe,paddingTop:Oe,paddingRight:Oe,paddingBottom:Oe,paddingLeft:Oe,paddingBlock:Oe,paddingBlockStart:Oe,paddingBlockEnd:Oe,paddingInline:Oe,paddingInlineStart:Oe,paddingInlineEnd:Oe,margin:Oe,marginTop:Oe,marginRight:Oe,marginBottom:Oe,marginLeft:Oe,marginBlock:Oe,marginBlockStart:Oe,marginBlockEnd:Oe,marginInline:Oe,marginInlineStart:Oe,marginInlineEnd:Oe,fontSize:Oe,backgroundPositionX:Oe,backgroundPositionY:Oe,...Xte,zIndex:B2,fillOpacity:cf,strokeOpacity:cf,numOctaves:B2},Jte={...Kk,color:yn,backgroundColor:yn,outlineColor:yn,fill:yn,stroke:yn,borderColor:yn,borderTopColor:yn,borderRightColor:yn,borderBottomColor:yn,borderLeftColor:yn,filter:M1,WebkitFilter:M1,mask:O1,WebkitMask:O1},G3=t=>Jte[t],Zte=new Set([M1,O1]);function Y3(t,e){let n=G3(t);return Zte.has(n)||(n=Gs),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,705 bytes, line 23
23const ene=new Set(["auto","none","0"]);function tne(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!ene.has(i)&&uf(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=Y3(n,s)}class nne extends Bk{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<e.length;p++){let m=e[p];if(typeof m=="string"&&(m=m.trim(),Mk(m))){const g=F3(m,n.current);g!==void 0&&(e[p]=g),p===e.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!q3.has(r)||e.length!==2)return;const[s,i]=e,a=U2(s),l=U2(i),d=C2(s),h=C2(i);if(d!==h&&go[r]){this.needsMeasurement=!0;return}if(a!==l)if(D2(a)&&D2(l))for(let p=0;p<e.length;p++){const m=e[p];typeof m=="string"&&(e[p]=parseFloat(m))}else go[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||Wte(e[s]))&&r.push(s);r.length&&tne(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=go[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=go[n](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
vendor: 11,068 bytes, line 23
23h(([l,d])=>{e.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const rne=new Set(["opacity","clipPath","filter","transform"]);function Q3(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const X3=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Lg(t){return r3(t)&&"offsetHeight"in t}const{schedule:Wk}=g3(queueMicrotask,!1),Fs={x:!1,y:!1};function J3(){return Fs.x||Fs.y}function sne(t){return t==="x"||t==="y"?Fs[t]?null:(Fs[t]=!0,()=>{Fs[t]=!1}):Fs.x||Fs.y?null:(Fs.x=Fs.y=!0,()=>{Fs.x=Fs.y=!1})}function Z3(t,e){const n=Q3(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function ine(t){return!(t.pointerType==="touch"||J3())}function ane(t,e,n={}){const[r,s,i]=Z3(t,n);return r.forEach(a=>{let l=!1,d=!1,h;const p=()=>{a.removeEventListener("pointerleave",v)},m=C=>{h&&(h(C),h=void 0),p()},g=C=>{l=!1,window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),d&&(d=!1,m(C))},x=()=>{l=!0,window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",g,s)},v=C=>{if(C.pointerType!=="touch"){if(l){d=!0;return}m(C)}},S=C=>{if(!ine(C))return;d=!1;const j=e(a,C);typeof j=="function"&&(h=j,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",S,s),a.addEventListener("pointerdown",x,s)}),i}const e4=(t,e)=>e?t===e?!0:e4(t,e.parentElement):!1,Gk=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,one=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lne(t){return one.has(t.tagName)||t.isContentEditable===!0}const cne=new Set(["INPUT","SELECT","TEXTAREA"]);function une(t){return cne.has(t.tagName)||t.isContentEditable===!0}const ag=new WeakSet;function F2(t){return e=>{e.key==="Enter"&&t(e)}}function Lv(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const dne=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=F2(()=>{if(ag.has(n))return;Lv(n,"down");const s=F2(()=>{Lv(n,"up")}),i=()=>Lv(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function z2(t){return Gk(t)&&!J3()}const q2=new WeakSet;function hne(t,e,n={}){const[r,s,i]=Z3(t,n),a=l=>{const d=l.currentTarget;if(!z2(l)||q2.has(l))return;ag.add(d),n.stopPropagation&&q2.add(l);const h=e(d,l),p=(x,v)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",g),ag.has(d)&&ag.delete(d),z2(x)&&typeof h=="function"&&h(x,{success:v})},m=x=>{p(x,d===window||d===document||n.useGlobalTarget||e4(d,x.target))},g=x=>{p(x,!1)};window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",g,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),Lg(l)&&(l.addEventListener("focus",h=>dne(h,s)),!lne(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function Yk(t){return r3(t)&&"ownerSVGElement"in t}const og=new WeakMap;let lg;const t4=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:Yk(r)&&"getBBox"in r?r.getBBox()[e]:r[n],fne=t4("inline","width","offsetWidth"),pne=t4("block","height","offsetHeight");function mne({target:t,borderBoxSize:e}){og.get(t)?.forEach(n=>{n(t,{get width(){return fne(t,e)},get height(){return pne(t,e)}})})}function gne(t){t.forEach(mne)}function yne(){typeof ResizeObserver>"u"||(lg=new ResizeObserver(gne))}function xne(t,e){lg||yne();const n=Q3(t);return n.forEach(r=>{let s=og.get(r);s||(s=new Set,og.set(r,s)),s.add(e),lg?.observe(r)}),()=>{n.forEach(r=>{const s=og.get(r);s?.delete(e),s?.size||lg?.unobserve(r)})}}const cg=new Set;let vu;function bne(){vu=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};cg.forEach(e=>e(t))},window.addEventListener("resize",vu)}function vne(t){return cg.add(t),vu||bne(),()=>{cg.delete(t),!cg.size&&typeof vu=="function"&&(window.removeEventListener("resize",vu),vu=void 0)}}function R1(t,e){return typeof t=="function"?vne(t):xne(t,e)}function n4(t,e){let n;const r=()=>{const{currentTime:s}=e,a=(s===null?0:s.value)/100;n!==a&&t(a),n=a};return bt.preUpdate(r,!0),()=>Ns(r)}function wne(t){return Yk(t)&&t.tagName==="svg"}function Sne(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],s=t[1+n],i=t[2+n],a=t[3+n],l=Pk(s,i,a);return e?l(r):l}const kne=[...W3,yn,Gs],Cne=t=>kne.find(K3(t)),V2=()=>({translate:0,scale:1,origin:0,originPoint:0}),wu=()=>({x:V2(),y:V2()}),$2=()=>({min:0,max:0}),An=()=>({x:$2(),y:$2()}),Nne=new WeakMap;function vx(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function df(t){return typeof t=="string"||Array.isArray(t)}const Qk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xk=["initial",...Qk];function wx(t){return vx(t.animate)||Xk.some(e=>df(t[e]))}function r4(t){return!!(wx(t)||t.variants)}function jne(t,e,n){for(const r in e){const s=e[r],i=n[r];if(lr(s))t.addValue(r,s);else if(lr(i))t.addValue(r,Hs(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const a=t.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=t.getStaticValue(r);t.addValue(r,Hs(a!==void 0?a:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const D1={current:null},s4={current:!1},Ene=typeof window<"u";function Tne(){if(s4.current=!0,!!Ene)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>D1.current=t.matches;t.addEventListener("change",e),e()}else D1.current=!1}const H2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ig={};function i4(t){Ig=t}function Ane(){return Ig}class Mne{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:a,visualState:l},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Bk,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=wr.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,bt.render(this.render,!1,!0))};const{latestValues:h,renderState:p}=l;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=p,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=d,this.blockInitialAnimation=!!a,this.isControllingVariants=wx(n),this.isVariantNode=r4(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:m,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in g){const v=g[x];h[x]!==void 0&&lr(v)&&v.set(h[x])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Nne.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(s4.current||Tne(),this.shouldReduceMotion=D1.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ns(this.notifyUpdate),Ns(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&rne.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:l,times:d,ease:h,duration:p}=n.accelerate,m=new I3({element:this.current,name:e,keyframes:l,times:d,ease:h,duration:Ws(p)}),g=a(m);this.valueSubscriptions.set(e,()=>{g(),m.cancel()});return}const r=id.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&bt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ig){const n=Ig[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):An()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<H2.length;r++){const s=H2[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=e[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=jne(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
vendor: 4,453 bytes, line 23
23addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Hs(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(n3(r)||s3(r))?r=parseFloat(r):!Cne(r)&&Gs.test(n)&&(r=Y3(e,n)),this.setBaseTarget(e,lr(r)?r.get():r)),lr(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=$k(this.props,n,this.presenceContext?.custom);i&&(r=i[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!lr(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new jk),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Wk.render(this.render)}}class a4 extends Mne{constructor(){super(...arguments),this.KeyframeResolver=nne}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;lr(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Po{constructor(e){this.isMounted=!1,this.node=e}update(){}}function o4({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function One({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Rne(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Iv(t){return t===void 0||t===1}function _1({scale:t,scaleX:e,scaleY:n}){return!Iv(t)||!Iv(e)||!Iv(n)}function gl(t){return _1(t)||l4(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function l4(t){return K2(t.x)||K2(t.y)}function K2(t){return t&&t!=="0%"}function Ug(t,e,n){const r=t-n,s=e*r;return n+s}function W2(t,e,n,r,s){return s!==void 0&&(t=Ug(t,s,r)),Ug(t,n,r)+e}function P1(t,e=0,n=1,r,s){t.min=W2(t.min,e,n,r,s),t.max=W2(t.max,e,n,r,s)}function c4(t,{x:e,y:n}){P1(t.x,e.translate,e.scale,e.originPoint),P1(t.y,n.translate,n.scale,n.originPoint)}const G2=.999999999999,Y2=1.0000000000001;function Dne(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.y=1;let i,a;for(let l=0;l<s;l++){i=n[l],a=i.projectionDelta;const{visualElement:d}=i.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ku(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,c4(t,a)),r&&gl(i.latestValues)&&ku(t,i.latestValues))}e.x<Y2&&e.x>G2&&(e.x=1),e.y<Y2&&e.y>G2&&(e.y=1)}function Su(t,e){t.min=t.min+e,t.max=t.max+e}function Q2(t,e,n,r,s=.5){const i=Qt(t.min,t.max,s);P1(t,e,n,i,r)}function X2(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ku(t,e){Q2(t.x,X2(e.x,t.x),e.scaleX,e.scale,e.originX),Q2(t.y,X2(e.y,t.y),e.scaleY,e.scale,e.originY)}function u4(t,e){return o4(Rne(t.getBoundingClientRect(),e))}function _ne(t,e,n){const r=u4(t,n),{scroll:s}=e;return s&&(Su(r.x,s.offset.x),Su(r.y,s.offset.y)),r}const Pne={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lne=sd.length;function Ine(t,e,n){let r="",s=!0;for(let i=0;i<Lne;i++){const a=sd[i],l=t[a];if(l===void 0)continue;let d=!0;if(typeof l=="number")d=l===(a.startsWith("scale")?1:0);else{const h=parseFloat(l);d=a.startsWith("scale")?h===1:h===0}if(!d||n){const h=X3(l,Kk[a]);if(!d){s=!1;const p=Pne[a]||a;r+=`${p}(${h}
23) `}n&&(e[a]=h)}}return r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function Jk(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let a=!1,l=!1;for(const d in e){const h=e[d];if(id.has(d)){a=!0;continue}else if(x3(d)){s[d]=h;continue}else{const p=X3(h,Kk[d]);d.startsWith("origin")?(l=!0,i[d]=p):r[d]=p}}if(e.transform||(a||n?r.transform=Ine(e,t.transform,n):r.transform&&(r.transform="none")),l){const{originX:d="50%",originY:h="50%",originZ:p=0}=i;r.transformOrigin=`${d} ${h} ${p}`}}function d4(t,{style:e,vars:n},r,s){const i=t.style;let a;for(a in e)i[a]=e[a];s?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function J2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const lh={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Oe.test(t))t=parseFloat(t);else return t;const n=J2(t,e.target.x),r=J2(t,e.target.y);return`${n}% ${r}%`}},Une={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=Gs.parse(t);if(s.length>5)return r;const i=Gs.createTransformer(t),a=typeof s[0]!="number"?1:0,l=n.x.scale*e.x,d=n.y.scale*e.y;s[0+a]/=l,s[1+a]/=d;const h=Qt(l,d,.5);return typeof s[2+a]=="number"&&(s[2+a]/=h),typeof s[3+a]=="number"&&(s[3+a]/=h),i(s)}},L1={borderRadius:{...lh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lh,borderTopRightRadius:lh,borderBottomLeftRadius:lh,borderBottomRightRadius:lh,boxShadow:Une};function h4(t,{layout:e,layoutId:n}){return id.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!L1[t]||t==="opacity")}function Zk(t,e,n){const r=t.style,s=e?.style,i={};if(!r)return i;for(const a in r)(lr(r[a])||s&&lr(s[a])||h4(a,t)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function Bne(t){return window.getComputedStyle(t)}class Fne extends a4{constructor(){super(...arguments),this.type="html",this.renderInstance=d4}readValueFromInstance(e,n){if(id.has(n))return this.projection?.isProjecting?w1(n):ate(e,n);{const r=Bne(e),s=(x3(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return u4(e,n)}build(e,n,r){Jk(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Zk(e,n,r)}}const zne={offset:"stroke-dashoffset",array:"stroke-dasharray"},qne={offset:"strokeDashoffset",array:"strokeDasharray"};function Vne(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?zne:qne;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const $ne=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function f4(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...l},d,h,p){if(Jk(t,l,h),d){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:m,style:g}=t;m.transform&&(g.transform=m.transform,delete m.transform),(g.transform||m.transformOrigin)&&(g.transformOrigin=m.transformOrigin??"50% 50%",delete m.transformOrigin),g.transform&&(g.transformBox=p?.transformBox??"fill-box",delete m.transformBox);for(const x of $ne)m[x]!==void 0&&(g[x]=m[x],delete m[x]);e!==void 0&&(m.x=e),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),s!==void 0&&Vne(m,s,i,a,!1)}const p4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),m4=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Hne(t,e,n,r){d4(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(p4.has(s)?s:Hk(s),e.attrs[s])}function g4(t,e,n){const r=Zk(t,e,n);for(const s in t)if(lr(t[s])||lr(e[s])){const i=sd.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class Kne extends a4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=An}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(id.has(n)){const r=G3(n);return r&&r.default||0}return n=p4.has(n)?n:Hk(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return g4(e,n,r)}build(e,n,r){f4(e,n,this.isSVGTag,r.transformTemplate,r.style)}
vendor: 9,838 bytes, line 23
23renderInstance(e,n,r,s){Hne(e,n,r,s)}mount(e){this.isSVGTag=m4(e.tagName),super.mount(e)}}const Wne=Xk.length;function y4(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?y4(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Wne;n++){const r=Xk[n],s=t.props[r];(df(s)||s===!1)&&(e[r]=s)}return e}function x4(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const Gne=[...Qk].reverse(),Yne=Qk.length;function Qne(t){return e=>Promise.all(e.map(({animation:n,options:r})=>Hte(t,n,r)))}function Xne(t){let e=Qne(t),n=Z2(),r=!0,s=!1;const i=h=>(p,m)=>{const g=ju(t,m,h==="exit"?t.presenceContext?.custom:void 0);if(g){const{transition:x,transitionEnd:v,...S}=g;p={...p,...S,...v}}return p};function a(h){e=h(t)}function l(h){const{props:p}=t,m=y4(t.parent)||{},g=[],x=new Set;let v={},S=1/0;for(let j=0;j<Yne;j++){const E=Gne[j],A=n[E],D=p[E]!==void 0?p[E]:m[E],M=df(D),I=E===h?A.isActive:null;I===!1&&(S=j);let _=D===m[E]&&D!==p[E]&&M;if(_&&(r||s)&&t.manuallyAnimateOnMount&&(_=!1),A.protectedKeys={...v},!A.isActive&&I===null||!D&&!A.prevProp||vx(D)||typeof D=="boolean")continue;if(E==="exit"&&A.isActive&&I!==!0){A.prevResolvedValues&&(v={...v,...A.prevResolvedValues});continue}const L=Jne(A.prevProp,D);let V=L||E===h&&A.isActive&&!_&&M||j>S&&M,B=!1;const K=Array.isArray(D)?D:[D];let ee=K.reduce(i(E),{});I===!1&&(ee={});const{prevResolvedValues:ie={}}=A,se={...ie,...ee},he=re=>{V=!0,x.has(re)&&(B=!0,x.delete(re)),A.needsAnimating[re]=!0;const le=t.getValue(re);le&&(le.liveStyle=!1)};for(const re in se){const le=ee[re],P=ie[re];if(v.hasOwnProperty(re))continue;let te=!1;E1(le)&&E1(P)?te=!x4(le,P):te=le!==P,te?le!=null?he(re):x.add(re):le!==void 0&&x.has(re)?he(re):A.protectedKeys[re]=!0}A.prevProp=D,A.prevResolvedValues=ee,A.isActive&&(v={...v,...ee}),(r||s)&&t.blockInitialAnimation&&(V=!1);const $=_&&L;V&&(!$||B)&&g.push(...K.map(re=>{const le={type:E};if(typeof re=="string"&&(r||s)&&!$&&t.manuallyAnimateOnMount&&t.parent){const{parent:P}=t,te=ju(P,re);if(P.enteringChildren&&te){const{delayChildren:ue}=te.transition||{};le.delay=B3(P.enteringChildren,t,ue)}}return{animation:re,options:le}}))}if(x.size){const j={};if(typeof p.initial!="boolean"){const E=ju(t,Array.isArray(p.initial)?p.initial[0]:p.initial);E&&E.transition&&(j.transition=E.transition)}x.forEach(E=>{const A=t.getBaseTarget(E),D=t.getValue(E);D&&(D.liveStyle=!0),j[E]=A??null}),g.push({animation:j})}let C=!!g.length;return r&&(p.initial===!1||p.initial===p.animate)&&!t.manuallyAnimateOnMount&&(C=!1),r=!1,s=!1,C?e(g):Promise.resolve()}function d(h,p){if(n[h].isActive===p)return Promise.resolve();t.variantChildren?.forEach(g=>g.animationState?.setActive(h,p)),n[h].isActive=p;const m=l(h);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:l,setActive:d,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Z2(),s=!0}}}function Jne(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!x4(e,t):!1}function cl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z2(){return{animate:cl(!0),whileInView:cl(),whileHover:cl(),whileTap:cl(),whileDrag:cl(),whileFocus:cl(),exit:cl()}}function eM(t,e){t.min=e.min,t.max=e.max}function Ds(t,e){eM(t.x,e.x),eM(t.y,e.y)}function tM(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const b4=1e-4,Zne=1-b4,ere=1+b4,v4=.01,tre=0-v4,nre=0+v4;function Sr(t){return t.max-t.min}function rre(t,e,n){return Math.abs(t-e)<=n}function nM(t,e,n,r=.5){t.origin=r,t.originPoint=Qt(e.min,e.max,t.origin),t.scale=Sr(n)/Sr(e),t.translate=Qt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Zne&&t.scale<=ere||isNaN(t.scale))&&(t.scale=1),(t.translate>=tre&&t.translate<=nre||isNaN(t.translate))&&(t.translate=0)}function Ih(t,e,n,r){nM(t.x,e.x,n.x,r?r.originX:void 0),nM(t.y,e.y,n.y,r?r.originY:void 0)}function rM(t,e,n){t.min=n.min+e.min,t.max=t.min+Sr(e)}function sre(t,e,n){rM(t.x,e.x,n.x),rM(t.y,e.y,n.y)}function sM(t,e,n){t.min=e.min-n.min,t.max=t.min+Sr(e)}function Bg(t,e,n){sM(t.x,e.x,n.x),sM(t.y,e.y,n.y)}function iM(t,e,n,r,s){return t-=e,t=Ug(t,1/n,r),s!==void 0&&(t=Ug(t,1/s,r)),t}function ire(t,e=0,n=1,r=.5,s,i=t,a=t){if(wi.test(e)&&(e=parseFloat(e),e=Qt(a.min,a.max,e/100)-a.min),typeof e!="number")return;let l=Qt(i.min,i.max,r);t===i&&(l-=e),t.min=iM(t.min,e,n,l,s),t.max=iM(t.max,e,n,l,s)}function aM(t,e,[n,r,s],i,a){ire(t,e[n],e[r],e[s],e.scale,i,a)}const are=["x","scaleX","originX"],ore=["y","scaleY","originY"];function oM(t,e,n,r){aM(t.x,e,are,n?n.x:void 0,r?r.x:void 0),aM(t.y,e,ore,n?n.y:void 0,r?r.y:void 0)}function lM(t){return t.translate===0&&t.scale===1}function w4(t){return lM(t.x)&&lM(t.y)}function cM(t,e){return t.min===e.min&&t.max===e.max}function lre(t,e){return cM(t.x,e.x)&&cM(t.y,e.y)}function uM(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function S4(t,e){return uM(t.x,e.x)&&uM(t.y,e.y)}function dM(t){return Sr(t.x)/Sr(t.y)}function hM(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ui(t){return[t("x"),t("y")]}function cre(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,a=n?.z||0;if((s||i||a)&&(r=`translate3d(${s}px, ${i}px, ${a}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:h,rotate:p,rotateX:m,rotateY:g,skewX:x,skewY:v}=n;h&&(r=`perspective(${h}px) ${r}`),p&&(r+=`rotate(${p}deg) `),m&&(r+=`rotateX(${m}deg) `),g&&(r+=`rotateY(${g}deg) `),x&&(r+=`skewX(${x}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=t.x.scale*e.x,d=t.y.scale*e.y;return(l!==1||d!==1)&&(r+=`scale(${l}, ${d})`),r||"none"}const k4=["TopLeft","TopRight","BottomLeft","BottomRight"],ure=k4.length,fM=t=>typeof t=="string"?parseFloat(t):t,pM=t=>typeof t=="number"||Oe.test(t);function dre(t,e,n,r,s,i){s?(t.opacity=Qt(0,n.opacity??1,hre(r)),t.opacityExit=Qt(e.opacity??1,0,fre(r))):i&&(t.opacity=Qt(e.opacity??1,n.opacity??1,r));for(let a=0;a<ure;a++){const l=`border${k4[a]}Radius`;let d=mM(e,l),h=mM(n,l);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||pM(d)===pM(h)?(t[l]=Math.max(Qt(fM(d),fM(h),r),0),(wi.test(h)||wi.test(d))&&(t[l]+="%")):t[l]=h}(e.rotate||n.rotate)&&(t.rotate=Qt(e.rotate||0,n.rotate||0,r))}function mM(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const hre=C4(0,.5,h3),fre=C4(.5,.95,Lr);function C4(t,e,n){return r=>r<t?0:r>e?1:n(Lu(t,e,r))}function pre(t,e,n){const r=lr(t)?t:Hs(t);return r.start(Vk("",r,e,n)),r.animation}function hf(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const mre=(t,e)=>t.depth-e.depth;class gre{constructor(){this.children=[],this.isDirty=!1}add(e){Nk(this.children,e),this.isDirty=!0}remove(e){Rg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(mre),this.isDirty=!1,this.children.forEach(e)}}function yre(t,e){const n=wr.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(Ns(r),t(i-e))};return bt.setup(r,!0),()=>Ns(r)}function ug(t){return lr(t)?t.get():t}class xre{constructor(){this.members=[]}add(e){Nk(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Rg(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Rg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const r=this.members[n];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=r.options,{layoutDependency:i}=e.options;(s===void 0||s!==i)&&(e.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const dg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Uv=["","X","Y","Z"],bre=1e3;let vre=0;function Bv(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function N4(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=$3(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",bt,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&N4(r)}function j4({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},l=e?.()){this.id=vre++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 10,438 bytes, line 23
23{this.projectionUpdateScheduled=!1,this.nodes.forEach(kre),this.nodes.forEach(Ere),this.nodes.forEach(Tre),this.nodes.forEach(Cre)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new gre)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new jk),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const d=this.eventHandlers.get(a);d&&d.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Yk(a)&&!wne(a),this.instance=a;const{layoutId:l,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||l)&&(this.isLayoutDirty=!0),t){let p,m=0;const g=()=>this.root.updateBlockedByResize=!1;bt.read(()=>{m=window.innerWidth}),t(a,()=>{const x=window.innerWidth;x!==m&&(m=x,this.root.updateBlockedByResize=!0,p&&p(),p=yre(g,250),dg.hasAnimatedSinceResize&&(dg.hasAnimatedSinceResize=!1,this.nodes.forEach(xM)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeLayoutChanged:g,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||Dre,{onLayoutAnimationStart:S,onLayoutAnimationComplete:C}=h.getProps(),j=!this.targetLayout||!S4(this.targetLayout,x),E=!m&&g;if(this.options.layoutRoot||this.resumeFrom||E||m&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...qk(v,"layout"),onPlay:S,onComplete:C};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(p,E)}else m||xM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ns(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Are),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&N4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const m=this.path[p];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:l,layout:d}=this.options;if(l===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(gM);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(yM);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jre),this.nodes.forEach(wre),this.nodes.forEach(Sre)):this.nodes.forEach(yM),this.clearAllSnapshots();const l=wr.now();Bn.delta=Xs(0,1e3/60,l-Bn.timestamp),Bn.timestamp=l,Bn.isProcessing=!0,Mv.update.process(Bn),Mv.preRender.process(Bn),Mv.render.process(Bn),Bn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wk.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nre),this.sharedNodes.forEach(Mre)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Sr(this.snapshot.measuredBox.x)&&!Sr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=An(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!w4(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;a&&this.instance&&(l||gl(this.latestValues)||p)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let d=this.removeElementScroll(l);return a&&(d=this.removeTransform(d)),_re(d),{animationId:this.root.animationId,measuredBox:l,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return An();const l=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Pre))){const{scroll:h}=this.root;h&&(Su(l.x,h.offset.x),Su(l.y,h.offset.y))}return l}removeElementScroll(a){const l=An();if(Ds(l,a),this.scroll?.wasRoot)return l;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:m}=h;h!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&Ds(l,a),Su(l.x,p.offset.x),Su(l.y,p.offset.y))}return l}applyTransform(a,l=!1){const d=An();Ds(d,a);for(let h=0;h<this.path.length;h++){const p=this.path[h];!l&&p.options.layoutScroll&&p.scroll&&p!==p.root&&ku(d,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),gl(p.latestValues)&&ku(d,p.latestValues)}return gl(this.latestValues)&&ku(d,this.latestValues),d}removeTransform(a){const l=An();Ds(l,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!gl(h.latestValues))continue;_1(h.latestValues)&&h.updateSnapshot();const p=An(),m=h.measurePageBox();Ds(p,m),oM(l,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return gl(this.latestValues)&&oM(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Bn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==l;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:m}=this.options;if(!this.layout||!(p||m))return;this.resolvedRelativeTargetAt=Bn.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=An(),this.targetWithTransforms=An()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sre(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ds(this.target,this.layout.layoutBox),c4(this.target,this.targetDelta)):Ds(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||_1(this.parent.latestValues)||l4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,l,d){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=An(),this.relativeTargetOrigin=An(),Bg(this.relativeTargetOrigin,l,d),Ds(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),l=!!this.resumingFrom||this!==a;let d=!0;
vendor: 4,776 bytes, line 23
23if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Bn.timestamp&&(d=!1),d)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;Ds(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,g=this.treeScale.y;Dne(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=An());const{target:x}=a;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tM(this.prevProjectionDelta.x,this.projectionDelta.x),tM(this.prevProjectionDelta.y,this.projectionDelta.y)),Ih(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==g||!hM(this.projectionDelta.x,this.prevProjectionDelta.x)||!hM(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wu(),this.projectionDelta=wu(),this.projectionDeltaWithTransform=wu()}setAnimationOrigin(a,l=!1){const d=this.snapshot,h=d?d.latestValues:{},p={...this.latestValues},m=wu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=An(),x=d?d.source:void 0,v=this.layout?this.layout.source:void 0,S=x!==v,C=this.getStack(),j=!C||C.members.length<=1,E=!!(S&&!j&&this.options.crossfade===!0&&!this.path.some(Rre));this.animationProgress=0;let A;this.mixTargetDelta=D=>{const M=D/1e3;bM(m.x,a.x,M),bM(m.y,a.y,M),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bg(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ore(this.relativeTarget,this.relativeTargetOrigin,g,M),A&&lre(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=An()),Ds(A,this.relativeTarget)),S&&(this.animationValues=p,dre(p,h,this.latestValues,M,E,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ns(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(()=>{dg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hs(0)),this.motionValue.jump(0,!1),this.currentAnimation=pre(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bre),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:d,layout:h,latestValues:p}=a;if(!(!l||!d||!h)){if(this!==a&&this.layout&&h&&E4(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||An();const m=Sr(this.layout.layoutBox.x);d.x.min=a.target.x.min,d.x.max=d.x.min+m;const g=Sr(this.layout.layoutBox.y);d.y.min=a.target.y.min,d.y.max=d.y.min+g}Ds(l,d),ku(l,p),Ih(this.projectionDeltaWithTransform,this.layoutCorrected,l,p)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new xre),this.sharedNodes.get(a).add(l);const h=l.options.initialPromotionConfig;l.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;
vendor: 13,780 bytes, lines 23-31
23return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:d}=a;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(l=!0),!l)return;const h={};d.z&&Bv("z",a,h,this.animationValues);for(let p=0;p<Uv.length;p++)Bv(`rotate${Uv[p]}`,a,h,this.animationValues),Bv(`skew${Uv[p]}`,a,h,this.animationValues);a.render();for(const p in h)a.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);a.scheduleRender()}applyProjectionStyles(a,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=ug(l?.pointerEvents)||"",a.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=ug(l?.pointerEvents)||""),this.hasProjected&&!gl(this.latestValues)&&(a.transform=d?d({},""):"none",this.hasProjected=!1);return}a.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let m=cre(this.projectionDeltaWithTransform,this.treeScale,p);d&&(m=d(p,m)),a.transform=m;const{x:g,y:x}=this.projectionDelta;a.transformOrigin=`${g.origin*100}% ${x.origin*100}% 0`,h.animationValues?a.opacity=h===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:a.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const v in L1){if(p[v]===void 0)continue;const{correct:S,applyTo:C,isCSSVariable:j}=L1[v],E=m==="none"?p[v]:S(p[v],h);if(C){const A=C.length;for(let D=0;D<A;D++)a[C[D]]=E}else j?this.options.visualElement.renderState.vars[v]=E:a[v]=E}this.options.layoutId&&(a.pointerEvents=h===this?ug(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(gM),this.root.sharedNodes.clear()}}}function wre(t){t.updateLayout()}function Sre(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=t.layout,{animationType:s}=t.options,i=e.source!==t.layout.source;s==="size"?ui(p=>{const m=i?e.measuredBox[p]:e.layoutBox[p],g=Sr(m);m.min=n[p].min,m.max=m.min+g}):E4(s,e.layoutBox,n)&&ui(p=>{const m=i?e.measuredBox[p]:e.layoutBox[p],g=Sr(n[p]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[p].max=t.relativeTarget[p].min+g)});const a=wu();Ih(a,n,e.layoutBox);const l=wu();i?Ih(l,t.applyTransform(r,!0),e.measuredBox):Ih(l,n,e.layoutBox);const d=!w4(a);let h=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:g}=p;if(m&&g){const x=An();Bg(x,e.layoutBox,m.layoutBox);const v=An();Bg(v,n,g.layoutBox),S4(x,v)||(h=!0),p.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=x,t.relativeParent=p)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function kre(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Cre(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Nre(t){t.clearSnapshot()}function gM(t){t.clearMeasurements()}function yM(t){t.isLayoutDirty=!1}function jre(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xM(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ere(t){t.resolveTargetDelta()}function Tre(t){t.calcProjection()}function Are(t){t.resetSkewAndRotation()}function Mre(t){t.removeLeadSnapshot()}function bM(t,e,n){t.translate=Qt(e.translate,0,n),t.scale=Qt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vM(t,e,n,r){t.min=Qt(e.min,n.min,r),t.max=Qt(e.max,n.max,r)}function Ore(t,e,n,r){vM(t.x,e.x,n.x,r),vM(t.y,e.y,n.y,r)}function Rre(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Dre={duration:.45,ease:[.4,0,.1,1]},wM=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),SM=wM("applewebkit/")&&!wM("chrome/")?Math.round:Lr;function kM(t){t.min=SM(t.min),t.max=SM(t.max)}function _re(t){kM(t.x),kM(t.y)}function E4(t,e,n){return t==="position"||t==="preserve-aspect"&&!rre(dM(e),dM(n),.2)}function Pre(t){return t!==t.root&&t.scroll?.wasRoot}const Lre=j4({attachResizeListener:(t,e)=>hf(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Fv={current:void 0},T4=j4({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Fv.current){const t=new Lre({});t.mount(window),t.setOptions({layoutScroll:!0}),Fv.current=t}return Fv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Sx=N.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function CM(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ire(...t){return e=>{let n=!1;const r=t.map(s=>{const i=CM(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():CM(t[s],null)}}}}function Ure(...t){return N.useCallback(Ire(...t),t)}class Bre extends N.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Lg(r)&&r.offsetWidth||0,i=Lg(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Fre({children:t,isPresent:e,anchorX:n,anchorY:r,root:s,pop:i}){const a=N.useId(),l=N.useRef(null),d=N.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=N.useContext(Sx),p=t.props?.ref??t?.ref,m=Ure(l,p);return N.useInsertionEffect(()=>{const{width:g,height:x,top:v,left:S,right:C,bottom:j}=d.current;if(e||i===!1||!l.current||!g||!x)return;const E=n==="left"?`left: ${S}`:`right: ${C}`,A=r==="bottom"?`bottom: ${j}`:`top: ${v}`;l.current.dataset.motionPopId=a;const D=document.createElement("style");h&&(D.nonce=h);const M=s??document.head;return M.appendChild(D),D.sheet&&D.sheet.insertRule(`
24          [data-motion-pop-id="${a}"] {
25            position: absolute !important;
26            width: ${g}px !important;
27            height: ${x}px !important;
28            ${E}px !important;
29            ${A}px !important;
30          }
31        `),()=>{M.contains(D)&&M.removeChild(D)}},[e]),c.jsx(Bre,{isPresent:e,childRef:l,sizeRef:d,pop:i,children:i===!1?t:N.cloneElement(t,{ref:m})})}const zre=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:a,anchorX:l,anchorY:d,root:h})=>{const p=To(qre),m=N.useId();let g=!0,x=N.useMemo(()=>(g=!1,{id:m,initial:e,isPresent:n,custom:s,onExitComplete:v=>{p.set(v,!0);for(const S of p.values())if(!S)return;r&&r()},register:v=>(p.set(v,!1),()=>p.delete(v))}),[n,p,r]);return i&&g&&(x={...x}),N.useMemo(()=>{p.forEach((v,S)=>p.set(S,!1))},[n]),N.useEffect(()=>{!n&&!p.size&&r&&r()},[n]),t=c.jsx(Fre,{pop:a==="popLayout",isPresent:n,anchorX:l,anchorY:d,root:h,children:t}),c.jsx(bx.Provider,{value:x,children:t})};function qre(){return new Map}function A4(t=!0){const e=N.useContext(bx);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=N.useId();N.useEffect(()=>{if(t)return s(i)},[t]);const a=N.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,a]:[!0]}const Cm=t=>t.key||"";function NM(t){const e=[];return N.Children.forEach(t,n=>{N.isValidElement(n)&&e.push(n)}),e}const Vre=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1,anchorX:l="left",anchorY:d="top",root:h})=>{const[p,m]=A4(a),g=N.useMemo(()=>NM(t),[t]),x=a&&!p?[]:g.map(Cm),v=N.useRef(!0),S=N.useRef(g),C=To(()=>new Map),j=N.useRef(new Set),[E,A]=N.useState(g),[D,M]=N.useState(g);xx(()=>{v.current=!1,S.current=g;for(let L=0;L<D.length;L++){const V=Cm(D[L]);x.includes(V)?(C.delete(V),j.current.delete(V)):C.get(V)!==!0&&C.set(V,!1)}},[D,x.length,x.join("-")]);const I=[];if(g!==E){let L=[...g];for(let V=0;V<D.length;V++){const B=D[V],K=Cm(B);x.includes(K)||(L.splice(V,0,B),I.push(B))}return i==="wait"&&I.length&&(L=I),M(NM(L)),A(g),null}const{forceRender:_}=N.useContext(Ck);return c.jsx(c.Fragment,{children:D.map(L=>{const V=Cm(L),B=a&&!p?!1:g===D||x.includes(V),K=()=>{if(j.current.has(V))return;if(j.current.add(V),C.has(V))C.set(V,!0);else return;let ee=!0;C.forEach(ie=>{ie||(ee=!1)}),ee&&(_?.(),M(S.current),a&&m?.(),r&&r())};return c.jsx(zre,{isPresent:B,initial:!v.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:h,onExitComplete:B?void 0:K,anchorX:l,anchorY:d,children:L},V)})})},M4=N.createContext({strict:!1}),jM={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let EM=!1;function $re(){if(EM)return;const t={};for(const e in jM)t[e]={isEnabled:n=>jM[e].some(r=>!!n[r])};i4(t),EM=!0}function O4(){return $re(),Ane()}function Hre(t){const e=O4();for(const n in t)e[n]={...e[n],...t[n]};i4(e)}const Kre=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Fg(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Kre.has(t)}let R4=t=>!Fg(t);function Wre(t){typeof t=="function"&&(R4=e=>e.startsWith("on")?!Fg(e):t(e))}try{Wre(require("@emotion/is-prop-valid").default)}catch{}function Gre(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||(R4(s)||n===!0&&Fg(s)||!e&&!Fg(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const kx=N.createContext({});function Yre(t,e){if(wx(t)){const{initial:n,animate:r}=t;return{initial:n===!1||df(n)?n:void 0,animate:df(r)?r:void 0}}return t.inherit!==!1?e:{}}function Qre(t){const{initial:e,animate:n}=Yre(t,N.useContext(kx));return N.useMemo(()=>({initial:e,animate:n}),[TM(e),TM(n)])}function TM(t){return Array.isArray(t)?t.join(" "):t}const eC=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function D4(t,e,n){for(const r in e)!lr(e[r])&&!h4(r,n)&&(t[r]=e[r])}function Xre({transformTemplate:t},e){return N.useMemo(()=>{const n=eC();return Jk(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Jre(t,e){const n=t.style||{},r={};return D4(r,n,t),Object.assign(r,Xre(t,e)),r}function Zre(t,e){const n={},r=Jre(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const _4=()=>({...eC(),attrs:{}});function ese(t,e,n,r){const s=N.useMemo(()=>{const i=_4();return f4(i,e,m4(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};D4(i,t.style,t),s.style={...i,...s.style}}return s}const tse=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function tC(t){return typeof t!="string"||t.includes("-")?!1:!!(tse.indexOf(t)>-1||/[A-Z]/u.test(t))}function nse(t,e,n,{latestValues:r},s,i=!1,a){const d=(a??tC(t)?ese:Zre)(e,r,s,t),h=Gre(e,typeof t=="string",i),p=t!==N.Fragment?{...h,...d,ref:n}:{},{children:m}=e,g=N.useMemo(()=>lr(m)?m.get():m,[m]);return N.createElement(t,{...p,children:g})}function rse({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:sse(n,r,s,t),renderState:e()}}function sse(t,e,n,r){const s={},i=r(t,{});for(const g in i)s[g]=ug(i[g]);let{initial:a,animate:l}=t;const d=wx(t),h=r4(t);
vendor: 20,018 bytes, line 31
31e&&h&&!d&&t.inherit!==!1&&(a===void 0&&(a=e.initial),l===void 0&&(l=e.animate));let p=n?n.initial===!1:!1;p=p||a===!1;const m=p?l:a;if(m&&typeof m!="boolean"&&!vx(m)){const g=Array.isArray(m)?m:[m];for(let x=0;x<g.length;x++){const v=$k(t,g[x]);if(v){const{transitionEnd:S,transition:C,...j}=v;for(const E in j){let A=j[E];if(Array.isArray(A)){const D=p?A.length-1:0;A=A[D]}A!==null&&(s[E]=A)}for(const E in S)s[E]=S[E]}}}return s}const P4=t=>(e,n)=>{const r=N.useContext(kx),s=N.useContext(bx),i=()=>rse(t,e,r,s);return n?i():To(i)},ise=P4({scrapeMotionValuesFromProps:Zk,createRenderState:eC}),ase=P4({scrapeMotionValuesFromProps:g4,createRenderState:_4}),ose=Symbol.for("motionComponentSymbol");function lse(t,e,n){const r=N.useRef(n);N.useInsertionEffect(()=>{r.current=n});const s=N.useRef(null);return N.useCallback(i=>{i&&t.onMount?.(i);const a=r.current;if(typeof a=="function")if(i){const l=a(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):a(i);else a&&(a.current=i);e&&(i?e.mount(i):e.unmount())},[e])}const L4=N.createContext({});function uu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function cse(t,e,n,r,s,i){const{visualElement:a}=N.useContext(kx),l=N.useContext(M4),d=N.useContext(bx),h=N.useContext(Sx),p=h.reducedMotion,m=h.skipAnimations,g=N.useRef(null),x=N.useRef(!1);r=r||l.renderer,!g.current&&r&&(g.current=r(t,{visualState:e,parent:a,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:i}),x.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const v=g.current,S=N.useContext(L4);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&use(g.current,n,s,S);const C=N.useRef(!1);N.useInsertionEffect(()=>{v&&C.current&&v.update(n,d)});const j=n[V3],E=N.useRef(!!j&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(j)&&window.MotionHasOptimisedAnimation?.(j));return xx(()=>{x.current=!0,v&&(C.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),E.current&&v.animationState&&v.animationState.animateChanges())}),N.useEffect(()=>{v&&(!E.current&&v.animationState&&v.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(j)}),E.current=!1),v.enteringChildren=void 0)}),v}function use(t,e,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:l,layoutScroll:d,layoutRoot:h,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:I4(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||l&&uu(l),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:p,layoutScroll:d,layoutRoot:h})}function I4(t){if(t)return t.options.allowProjection!==!1?t.projection:I4(t.parent)}function zv(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&Hre(r);const i=n?n==="svg":tC(t),a=i?ase:ise;function l(h,p){let m;const g={...N.useContext(Sx),...h,layoutId:dse(h)},{isStatic:x}=g,v=Qre(h),S=a(h,x);if(!x&&typeof window<"u"){hse();const C=fse(g);m=C.MeasureLayout,v.visualElement=cse(t,S,g,s,C.ProjectionNode,i)}return c.jsxs(kx.Provider,{value:v,children:[m&&v.visualElement?c.jsx(m,{visualElement:v.visualElement,...g}):null,nse(t,h,lse(S,v.visualElement,p),S,x,e,i)]})}l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const d=N.forwardRef(l);return d[ose]=t,d}function dse({layoutId:t}){const e=N.useContext(Ck).id;return e&&t!==void 0?e+"-"+t:t}function hse(t,e){N.useContext(M4).strict}function fse(t){const e=O4(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n?.isEnabled(t)||r?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function pse(t,e){if(typeof Proxy>"u")return zv;const n=new Map,r=(i,a)=>zv(i,a,t,e),s=(i,a)=>r(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,zv(a,void 0,t,e)),n.get(a))})}const mse=(t,e)=>e.isSVG??tC(t)?new Kne(e):new Fne(e,{allowProjection:t!==N.Fragment});class gse extends Po{constructor(e){super(e),e.animationState||(e.animationState=Xne(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();vx(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let yse=0;class xse extends Po{constructor(){super(...arguments),this.id=yse++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const bse={animation:{Feature:gse},exit:{Feature:xse}};function Hf(t){return{point:{x:t.pageX,y:t.pageY}}}const vse=t=>e=>Gk(e)&&t(e,Hf(e));function Uh(t,e,n,r){return hf(t,e,vse(n),r)}const U4=({current:t})=>t?t.ownerDocument.defaultView:null,AM=(t,e)=>Math.abs(t-e);function wse(t,e){const n=AM(t.x,e.x),r=AM(t.y,e.y);return Math.sqrt(n**2+r**2)}const MM=new Set(["auto","scroll"]);class B4{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vv(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,S=wse(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!S)return;const{point:C}=x,{timestamp:j}=Bn;this.history.push({...C,timestamp:j});const{onStart:E,onMove:A}=this.handlers;v||(E&&E(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,x)},this.handlePointerMove=(x,v)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=qv(v,this.transformPagePoint),bt.update(this.updatePoint,!0)},this.handlePointerUp=(x,v)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Vv(x.type==="pointercancel"?this.lastMoveEventInfo:qv(v,this.transformPagePoint),this.history);this.startEvent&&S&&S(x,E),C&&C(x,E)},!Gk(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const d=Hf(e),h=qv(d,this.transformPagePoint),{point:p}=h,{timestamp:m}=Bn;this.history=[{...p,timestamp:m}];const{onSessionStart:g}=n;g&&g(e,Vv(h,this.history)),this.removeListeners=qf(Uh(this.contextWindow,"pointermove",this.handlePointerMove),Uh(this.contextWindow,"pointerup",this.handlePointerUp),Uh(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(MM.has(r.overflowX)||MM.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),bt.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ns(this.updatePoint)}}function qv(t,e){return e?{point:e(t.point)}:t}function OM(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Vv({point:t},e){return{point:t,delta:OM(t,F4(e)),offset:OM(t,Sse(e)),velocity:kse(e,.1)}}function Sse(t){return t[0]}function F4(t){return t[t.length-1]}function kse(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=F4(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Ws(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>Ws(e)*2&&(r=t[1]);const i=vs(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Cse(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Qt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Qt(n,t,r.max):Math.min(t,n)),t}function RM(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Nse(t,{top:e,left:n,bottom:r,right:s}){return{x:RM(t.x,n,s),y:RM(t.y,e,r)}}function DM(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function jse(t,e){return{x:DM(t.x,e.x),y:DM(t.y,e.y)}}function Ese(t,e){let n=.5;const r=Sr(t),s=Sr(e);return s>r?n=Lu(e.min,e.max-r,t.min):r>s&&(n=Lu(t.min,t.max-s,e.min)),Xs(0,1,n)}function Tse(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const I1=.35;function Ase(t=I1){return t===!1?t=0:t===!0&&(t=I1),{x:_M(t,"left","right"),y:_M(t,"top","bottom")}}function _M(t,e,n){return{min:PM(t,e),max:PM(t,n)}}function PM(t,e){return typeof t=="number"?t:t[e]||0}const Mse=new WeakMap;class Ose{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=An(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=m=>{n&&this.snapToCursor(Hf(m).point),this.stopAnimation()},a=(m,g)=>{const{drag:x,dragPropagation:v,onDragStart:S}=this.getProps();if(x&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sne(x),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ui(j=>{let E=this.getAxisMotionValue(j).get()||0;if(wi.test(E)){const{projection:A}=this.visualElement;if(A&&A.layout){const D=A.layout.layoutBox[j];D&&(E=Sr(D)*(parseFloat(E)/100))}}this.originPoint[j]=E}),S&&bt.update(()=>S(m,g),!1,!0),T1(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},l=(m,g)=>{this.latestPointerEvent=m,this.latestPanInfo=g;const{dragPropagation:x,dragDirectionLock:v,onDirectionLock:S,onDrag:C}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:j}=g;if(v&&this.currentDirection===null){this.currentDirection=Dse(j),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",g.point,j),this.updateAxis("y",g.point,j),this.visualElement.render(),C&&bt.update(()=>C(m,g),!1,!0)},d=(m,g)=>{this.latestPointerEvent=m,this.latestPanInfo=g,this.stop(m,g),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new B4(e,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:r,contextWindow:U4(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&bt.postRender(()=>l(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!Nm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=Cse(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;e&&uu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=Nse(r.layoutBox,e):this.constraints=!1,this.elastic=Ase(n),s!==this.constraints&&!uu(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ui(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Tse(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!uu(e))return!1;const r=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=_ne(r,s.root,this.visualElement.getTransformPagePoint());let a=jse(s.layout.layoutBox,i);if(n){const l=n(One(a));this.hasMutatedConstraints=!!l,l&&(a=o4(l))}return a}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),d=this.constraints||{},h=ui(p=>{if(!Nm(p,n,this.currentDirection))return;let m=d&&d[p]||{};a&&(m={min:0,max:0});const g=s?200:1e6,x=s?40:1e7,v={type:"inertia",velocity:r?e[p]:0,bounceStiffness:g,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...i,...m};return this.startAxisValueAnimation(p,v)});return Promise.all(h).then(l)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return T1(this.visualElement,e),r.start(Vk(e,r,0,n,this.visualElement,!1))}stopAnimation(){ui(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ui(n=>{const{drag:r}=this.getProps();if(!Nm(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[n],d=i.get()||0;i.set(e[n]-Qt(a,l,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!uu(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ui(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const d=l.get();s[a]=Ese({min:d,max:d},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ui(a=>{if(!Nm(a,e,null))return;const l=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];l.set(Qt(d,h,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Mse.set(this.visualElement,this);const e=this.visualElement.current,n=Uh(e,"pointerdown",h=>{const{drag:p,dragListener:m=!0}=this.getProps(),g=h.target,x=g!==e&&une(g);p&&m&&!x&&this.start(h)});let r;const s=()=>{const{dragConstraints:h}=this.getProps();uu(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Rse(e,h.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),bt.read(s);const l=hf(window,"resize",()=>this.scalePositionWithinConstraints()),d=i.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(ui(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=h[m].translate,g.set(g.get()+h[m].translate))}),this.visualElement.render())}));return()=>{l(),n(),a(),d&&d(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=I1,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function LM(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Rse(t,e,n){const r=R1(t,LM(n)),s=R1(e,LM(n));return()=>{r(),s()}}function Nm(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Dse(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class _se extends Po{constructor(e){super(e),this.removeGroupControls=Lr,this.removeListeners=Lr,this.controls=new Ose(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lr}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const $v=t=>(e,n)=>{t&&bt.update(()=>t(e,n),!1,!0)};class Pse extends Po{constructor(){super(...arguments),this.removePointerDownListener=Lr}onPointerDown(e){this.session=new B4(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:U4(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:$v(e),onStart:$v(n),onMove:$v(r),onEnd:(i,a)=>{delete this.session,s&&bt.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Uh(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Hv=!1;class Lse extends N.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Hv&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),dg.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,e.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Hv=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||bt.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wk.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;Hv=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}
31function z4(t){const[e,n]=A4(),r=N.useContext(Ck);return c.jsx(Lse,{...t,layoutGroup:r,switchLayoutGroup:N.useContext(L4),isPresent:e,safeToRemove:n})}const Ise={pan:{Feature:Pse},drag:{Feature:_se,ProjectionNode:T4,MeasureLayout:z4}};function IM(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&bt.postRender(()=>i(e,Hf(e)))}class Use extends Po{mount(){const{current:e}=this.node;e&&(this.unmount=ane(e,(n,r)=>(IM(this.node,r,"Start"),s=>IM(this.node,s,"End"))))}unmount(){}}class Bse extends Po{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=qf(hf(this.node.current,"focus",()=>this.onFocus()),hf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function UM(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&bt.postRender(()=>i(e,Hf(e)))}class Fse extends Po{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=hne(e,(s,i)=>(UM(this.node,i,"Start"),(a,{success:l})=>UM(this.node,a,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const U1=new WeakMap,Kv=new WeakMap,zse=t=>{const e=U1.get(t.target);e&&e(t)},qse=t=>{t.forEach(zse)};function Vse({root:t,...e}){const n=t||document;Kv.has(n)||Kv.set(n,{});const r=Kv.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(qse,{root:t,...e})),r[s]}function $se(t,e,n){const r=Vse(e);return U1.set(t,n),r.observe(t),()=>{U1.delete(t),r.unobserve(t)}}const Hse={some:0,all:1};class Kse extends Po{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Hse[s]},l=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,i&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),g=h?p:m;g&&g(d)};return $se(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Wse(e,n))&&this.startObserver()}unmount(){}}function Wse({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Gse={inView:{Feature:Kse},tap:{Feature:Fse},focus:{Feature:Bse},hover:{Feature:Use}},Yse={layout:{ProjectionNode:T4,MeasureLayout:z4}},Qse={...bse,...Gse,...Ise,...Yse},Ue=pse(Qse,mse);function zg(t){return typeof window>"u"?!1:t?D3():zk()}const Xse=50,BM=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Jse=()=>({time:0,x:BM(),y:BM()}),Zse={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function FM(t,e,n,r){const s=n[e],{length:i,position:a}=Zse[e],l=s.current,d=n.time;s.current=Math.abs(t[`scroll${a}`]),s.scrollLength=t[`scroll${i}`]-t[`client${i}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Lu(0,s.scrollLength,s.current);const h=r-d;s.velocity=h>Xse?0:Ek(s.current-l,h)}function eie(t,e,n){FM(t,"x",e,n),FM(t,"y",e,n),e.time=n}function tie(t,e){const n={x:0,y:0};let r=t;for(;r&&r!==e;)if(Lg(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const s=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=s.left-i.left,n.y+=s.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:s,y:i}=r.getBBox();n.x+=s,n.y+=i;let a=null,l=r.parentNode;for(;!a;)l.tagName==="svg"&&(a=l),l=r.parentNode;r=a}else break;return n}const B1={start:0,center:.5,end:1};function zM(t,e,n=0){let r=0;if(t in B1&&(t=B1[t]),typeof t=="string"){const s=parseFloat(t);t.endsWith("px")?r=s:t.endsWith("%")?t=s/100:t.endsWith("vw")?r=s/100*document.documentElement.clientWidth:t.endsWith("vh")?r=s/100*document.documentElement.clientHeight:t=s}return typeof t=="number"&&(r=e*t),n+r}const nie=[0,0];function rie(t,e,n,r){let s=Array.isArray(t)?t:nie,i=0,a=0;return typeof t=="number"?s=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?s=t.split(" "):s=[t,B1[t]?t:"0"]),i=zM(s[0],n,r),a=zM(s[1],e),i-a}const Sh={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},sie={x:0,y:0};function iie(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function aie(t,e,n){const{offset:r=Sh.All}=n,{target:s=t,axis:i="y"}=n,a=i==="y"?"height":"width",l=s!==t?tie(s,t):sie,d=s===t?{width:t.scrollWidth,height:t.scrollHeight}:iie(s),h={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let p=!e[i].interpolate;const m=r.length;for(let g=0;g<m;g++){const x=rie(r[g],h[a],d[a],l[i]);
31!p&&x!==e[i].interpolatorOffsets[g]&&(p=!0),e[i].offset[g]=x}p&&(e[i].interpolate=Pk(e[i].offset,T3(r),{clamp:!1}),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=Xs(0,1,e[i].interpolate(e[i].current))}function oie(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let r=e;for(;r&&r!==t;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}function lie(t,e,n,r={}){return{measure:s=>{oie(t,r.target,n),eie(t,n,s),(r.offset||r.target)&&aie(t,n,r)},notify:()=>e(n)}}const Vc=new WeakMap,qM=new WeakMap,Wv=new WeakMap,VM=new WeakMap,jm=new WeakMap,$M=t=>t===document.scrollingElement?window:t;function q4(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!e)return Lr;let s=Wv.get(e);s||(s=new Set,Wv.set(e,s));const i=Jse(),a=lie(e,t,i,r);if(s.add(a),!Vc.has(e)){const d=()=>{for(const g of s)g.measure(Bn.timestamp);bt.preUpdate(h)},h=()=>{for(const g of s)g.notify()},p=()=>bt.read(d);Vc.set(e,p);const m=$M(e);window.addEventListener("resize",p),e!==document.documentElement&&qM.set(e,R1(e,p)),m.addEventListener("scroll",p),p()}if(n&&!jm.has(e)){const d=Vc.get(e),h={width:e.scrollWidth,height:e.scrollHeight};VM.set(e,h);const p=()=>{const g=e.scrollWidth,x=e.scrollHeight;(h.width!==g||h.height!==x)&&(d(),h.width=g,h.height=x)},m=bt.read(p,!0);jm.set(e,m)}const l=Vc.get(e);return bt.read(l,!1,!0),()=>{Ns(l);const d=Wv.get(e);if(!d||(d.delete(a),d.size))return;const h=Vc.get(e);Vc.delete(e),h&&($M(e).removeEventListener("scroll",h),qM.get(e)?.(),window.removeEventListener("resize",h));const p=jm.get(e);p&&(Ns(p),jm.delete(e)),VM.delete(e)}}const cie=[[Sh.Enter,"entry"],[Sh.Exit,"exit"],[Sh.Any,"cover"],[Sh.All,"contain"]];function uie(t,e){if(t.length!==2)return!1;for(let n=0;n<2;n++){const r=t[n],s=e[n];if(!Array.isArray(r)||r.length!==2||r[0]!==s[0]||r[1]!==s[1])return!1}return!0}function nC(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of cie)if(uie(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const HM=new Map;function KM(t){const e={value:0},n=q4(r=>{e.value=r[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function V4({source:t,container:e,...n}){const{axis:r}=n;t&&(e=t);let s=HM.get(e);s||(s=new Map,HM.set(e,s));const i=n.target??"self";let a=s.get(i);a||(a={},s.set(i,a));const l=r+(n.offset??[]).join(",");return a[l]||(n.target&&zg(n.target)?nC(n.offset)?a[l]=new ViewTimeline({subject:n.target,axis:r}):a[l]=KM({container:e,...n}):zg()?a[l]=new ScrollTimeline({source:e,axis:r}):a[l]=KM({container:e,...n})),a[l]}function die(t,e){const n=V4(e),r=e.target?nC(e.offset):void 0,s=e.target?zg(e.target)&&!!r:zg();return t.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:i=>(i.pause(),n4(a=>{i.time=i.iterationDuration*a},n))})}function hie(t){return t.length===2}function fie(t,e){return hie(t)?q4(n=>{t(n[e.axis].progress,n)},e):n4(t,V4(e))}function $4(t,{axis:e="y",container:n=document.scrollingElement,...r}={}){if(!n)return Lr;const s={axis:e,container:n,...r};return typeof t=="function"?fie(t,s):die(t,s)}const pie=()=>({scrollX:Hs(0),scrollY:Hs(0),scrollXProgress:Hs(0),scrollYProgress:Hs(0)}),Em=t=>t?!t.current:!1;function WM(t,e,n,r){return{factory:s=>$4(s,{...e,axis:t,container:n?.current||void 0,target:r?.current||void 0}),times:[0,1],keyframes:[0,1],ease:s=>s,duration:1}}function mie(t,e){return typeof window>"u"?!1:t?D3()&&!!nC(e):zk()}function gie({container:t,target:e,...n}={}){const r=To(pie);mie(e,n.offset)&&(r.scrollXProgress.accelerate=WM("x",n,t,e),r.scrollYProgress.accelerate=WM("y",n,t,e));const s=N.useRef(null),i=N.useRef(!1),a=N.useCallback(()=>(s.current=$4((l,{x:d,y:h})=>{r.scrollX.set(d.current),r.scrollXProgress.set(d.progress),r.scrollY.set(h.current),r.scrollYProgress.set(h.progress)},{...n,container:t?.current||void 0,target:e?.current||void 0}),()=>{s.current?.()}),[t,e,JSON.stringify(n.offset)]);return xx(()=>
31{if(i.current=!1,Em(t)||Em(e)){i.current=!0;return}else return a()},[a]),N.useEffect(()=>{if(i.current)return lf(!Em(t)),lf(!Em(e)),a()},[a]),r}function yie(t){const e=To(()=>Hs(t)),{isStatic:n}=N.useContext(Sx);if(n){const[,r]=N.useState(t);N.useEffect(()=>e.on("change",r),[])}return e}function H4(t,e){const n=yie(e()),r=()=>n.set(e());return r(),xx(()=>{const s=()=>bt.preRender(r,!1,!0),i=t.map(a=>a.on("change",s));return()=>{i.forEach(a=>a()),Ns(r)}}),n}function xie(t){Lh.current=[],t();const e=H4(Lh.current,t);return Lh.current=void 0,e}function na(t,e,n,r){if(typeof t=="function")return xie(t);if(n!==void 0&&!Array.isArray(n)&&typeof e!="function")return bie(t,e,n,r);const a=typeof e=="function"?e:Sne(e,n,r),l=Array.isArray(t)?GM(t,a):GM([t],([h])=>a(h)),d=Array.isArray(t)?void 0:t.accelerate;return d&&!d.isTransformed&&typeof e!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(l.accelerate={...d,times:e,keyframes:n,isTransformed:!0}),l}function GM(t,e){const n=To(()=>[]);return H4(t,()=>{n.length=0;const r=t.length;for(let s=0;s<r;s++)n[s]=t[s].get();return e(n)})}function bie(t,e,n,r){const s=To(()=>Object.keys(n)),i=To(()=>({}));for(const a of s)i[a]=na(t,e,n[a],r);return i}const YM="mint-duo-dark";function Gv(t){return`/logos/${t}.png`}const QM=[{href:"/founders",label:"For Founders"},{href:"/investors",label:"For Investors"},{href:"/companies",label:"Portfolio"},{href:"/thesis",label:"Thesis"},{href:"/team",label:"Team"},{href:"/stories",label:"Stories"},{href:"https://100x100.teamtailor.com/",label:"Careers",external:!0}],vie=["/apply"];function wie(t){return vie.some(e=>t===e||t.startsWith(`${e}/`))}function K4(){const[t]=Ti(),[e,n]=N.useState(!1),[r,s]=N.useState(!1),{data:i}=yx({query:{retry:!1,staleTime:6e4}}),a=Gv(i?.navbarLogoKey??YM);N.useEffect(()=>{const g=()=>n(window.scrollY>50);return window.addEventListener("scroll",g),()=>window.removeEventListener("scroll",g)},[]);const l=wie(t)&&!e,d=l?"text-neutral-700 hover:text-neutral-900":"text-white/70 hover:text-white",h=l?"text-neutral-900":"text-white",p=(i?.navbarLogoKey??YM)==="mint-duo-dark",m=Gv("mint-duo-dark-accent-mask");return c.jsxs(c.Fragment,{children:[c.jsx("header",{className:`fixed top-0 w-full z-50 transition-all duration-500 border-b border-transparent ${e?"bg-background/80 backdrop-blur-md border-border py-3":"bg-transparent py-5"}`,children:c.jsxs("div",{className:"container mx-auto px-6 md:px-12 flex items-center justify-between",children:[c.jsx(Qe,{href:"/",className:"relative z-50 flex items-center shrink-0",children:p?c.jsxs("span",{className:`relative block aspect-[350/114] shrink-0 transition-all duration-500 ${e?"h-8 md:h-9":"h-10 md:h-12"} ${l?"invert":""}`,role:"img","aria-label":"100x100",children:[c.jsx("img",{src:Gv("mint-duo-dark-white"),alt:"","aria-hidden":"true",className:"absolute inset-0 h-full w-full"}),c.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 bg-[var(--feature-color)]",style:{maskImage:`url("${m}")`,WebkitMaskImage:`url("${m}")`,maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskPosition:"center",WebkitMaskPosition:"center",maskSize:"contain",WebkitMaskSize:"contain"}})]}):c.jsx("img",{src:a,alt:"100x100",className:`w-auto shrink-0 transition-all duration-500 ${e?"h-8 md:h-9":"h-10 md:h-12"} ${l?"invert":""}`,style:l?void 0:{filter:"hue-rotate(var(--logo-hue-rotate, 0deg))"}})}),c.jsxs("nav",{className:"hidden md:flex items-center gap-8",children:[QM.map(g=>{const x=`text-sm uppercase tracking-widest font-medium transition-colors ${t===g.href?"text-[var(--feature-color-hover)]":d}`;return g.external?c.jsx("a",{href:g.href,className:x,children:g.label},g.href):c.jsx(Qe,{href:g.href,className:x,children:g.label},g.href)}),c.jsx(Qe,{href:"/apply","data-testid":"nav-apply",className:"bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] transition-colors text-xs font-black uppercase tracking-widest px-4 py-2",children:"Apply to Build"})]}),c.jsx("button",{className:`md:hidden relative z-50 transition-colors ${h}`,onClick:()=>s(!r),children:r?c.jsx(Zs,{size:28}):c.jsx(q8,{size:28})})]})}),c.jsx(Vre,{children:r&&c.jsxs(Ue.div,{initial:{opacity:0,y:-20}
31,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"fixed inset-0 z-40 bg-background flex flex-col items-center justify-center gap-8",children:[QM.map(g=>{const x=`text-2xl uppercase tracking-widest font-bold ${t===g.href?"text-[var(--feature-color)]":"text-white"}`;return g.external?c.jsx("a",{href:g.href,onClick:()=>s(!1),className:x,children:g.label},g.href):c.jsx(Qe,{href:g.href,onClick:()=>s(!1),className:x,children:g.label},g.href)}),c.jsx(Qe,{href:"/apply",onClick:()=>s(!1),className:"mt-4 bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] transition-colors text-base font-black uppercase tracking-widest px-8 py-4",children:"Apply to Build"})]})})]})}const Sie="white";function kie(t){return`/logos/${t}.png`}function W4(){const{data:t}=yx({query:{retry:!1,staleTime:6e4}}),e=kie(t?.footerLogoKey??Sie);return c.jsx("footer",{className:"bg-card border-t border-border py-20 px-6 md:px-12",children:c.jsxs("div",{className:"container mx-auto grid grid-cols-1 md:grid-cols-2 gap-12",children:[c.jsxs("div",{children:[c.jsx(Qe,{href:"/",className:"inline-block mb-6",children:c.jsx("img",{src:e,alt:"100x100",className:"h-10 w-auto"})}),c.jsx("p",{className:"text-2xl md:text-4xl font-black uppercase tracking-tight text-white max-w-md",children:"Building a future worth investing in."})]}),c.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-12",children:[c.jsxs("nav",{className:"flex flex-col items-start gap-3",children:[c.jsx(Qe,{href:"/founders",className:"text-sm font-medium uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Founders"}),c.jsx(Qe,{href:"/investors",className:"text-sm font-medium uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Investors"}),c.jsx(Qe,{href:"/companies",className:"text-sm font-medium uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Companies"}),c.jsx(Qe,{href:"/thesis",className:"text-sm font-medium uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Thesis"}),c.jsx(Qe,{href:"/team",className:"text-sm font-medium uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Team"}),c.jsx(Qe,{href:"/stories",className:"text-sm font-medium uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Stories"})]}),c.jsxs("div",{className:"text-sm text-white/70 uppercase tracking-widest font-bold flex flex-col items-start md:items-end gap-2",children:[c.jsx("a",{href:"mailto:[email protected]",className:"hover:text-[var(--feature-color)] transition-colors",children:"[email protected]"}),c.jsx(Qe,{href:"/sitemap",className:"hover:text-[var(--feature-color)] transition-colors text-xs text-white/50",children:"Sitemap"}),c.jsx(Qe,{href:"/grievance-redressal",className:"hover:text-[var(--feature-color)] transition-colors text-xs text-white/50",children:"Grievance Redressal"}),c.jsxs("span",{children:["© ",new Date().getFullYear()," | 100x100 Pte Ltd"]})]})]})]})})}function G4(){return c.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-background px-6",children:c.jsxs("div",{className:"max-w-xl text-center",children:[c.jsxs("div",{className:"flex mb-6 gap-3 justify-center items-center",children:[c.jsx(kt,{className:"h-8 w-8 text-[var(--feature-color)]"}),c.jsx("h1",{className:"text-3xl md:text-4xl font-black uppercase tracking-tight text-white",children:"404"})]}),c.jsx("p",{className:"text-xl md:text-2xl text-white font-bold uppercase tracking-widest mb-8",children:"The page you're looking for doesn't exist."}),c.jsx(Qe,{href:"/",className:"inline-block bg-[var(--feature-color)] text-[#003320] px-8 py-4 text-sm font-black uppercase tracking-widest hover:bg-white transition-colors",children:"Back to home"})]})})}const Cie="100x100",Nie="100x100 is a climate company builder and fund for Southeast Asia. We don't just fund companies, we build them.";function jie(t,e){let n=document.querySelector(`meta[name="${t}"]`);n||(n=document.createElement("meta"),n.name=t,document.head.appendChild(n)),n.content=e}function XM(t,e){let n=document.querySelector(`meta[property="${t}"]`);n||(n=document.createElement("meta"),n.setAttribute("property",t),document.head.appendChild(n)),n.content=e}function ns({title:t,description:e=Nie}){N.useEffect(()=>{const n=`${t} | ${Cie}`;document.title=n,jie("description",e),XM("og:title",n),XM("og:description",e)},[t,e])}const $c=["/videos/rice_farm_flyover.mp4","/videos/solar_field.mp4","/videos/bioenergy_lab.mp4","/videos/logistics_ports.mp4","/videos/dairy_farm_ipad.mp4","/videos/indian_factory_floor.mp4","/videos/bamboo_materials_forest.mp4"],Eie=["/images/sector-energy.png","/images/sector-transport.png","/images/sector-food.png","/images/sector-industry.png","/images/sector-buildings.png","/images/sector-land.png"],Tie="/images/sector-energy.png",Hc={hero:{line1:"We don’t just fund",line2:"companies,",highlight:"we build them.",subTagline:"A climate company builder."}
31,statement:{line1:"$100M in revenue.",line2:"100M tonnes of carbon cut.",line3:"Same company.",kicker:"We built 100×100 not as a trade-off, but as a multiplier."},process:{headline1:"We don’t pick winners.",headline2:"We create them.",intro:"Our process is inverted. We don’t wait for pitches. We identify founders, find the customers, engineer the solution, then launch the company.",ctaLabel:"Join as Founder",ctaHref:"/founders",pillars:[{title:"Identify Problems",desc:"We map regional emissions, identify groups of customers and uncover the most compelling pain points."},{title:"Map Opportunity",desc:"We engineer solutions, build scalable business models around them and test all underlying hypothesis."},{title:"Start the Company",desc:"We start with talented entrepreneurs, provide the capital to launch and start with a first customer."},{title:"Scale to Series B",desc:"We embed deeply for the first 18 months, solving go-to-market problems to get to product-market-fit, and unlocking follow-on capital."}]},sectorsSection:{heading:"The Sectors",subheading:"Targeting 10% of global emissions.",items:[{name:"Energy",challenge:"Countries need reliable, affordable, local and clean energy.",action:"Building next-generation dispatchable clean power and sustainable fuels."},{name:"Transport",challenge:"Moving people and goods accounts for 1/5th of global carbon.",action:"Electrification, alternative fuels, better logistics, more efficient planning."},{name:"Food & Agriculture",challenge:"Feeding 10 billion people is not a constraint problem, it's an enormous product design opportunity.",action:"Developing low-emission protein and regenerative crop systems."},{name:"Industry",challenge:"Manufacturing, materials and chemicals account for 1/3 of the world's emissions.",action:"Building green industrial heat and novel material production."},{name:"Buildings",challenge:"The built environment consumes 40% of our energy.",action:"Unlocking energy efficiency, more efficient cooling and developing and distributing new materials, for low-carbon construction."},{name:"Land Use",challenge:"Nature is our best carbon sink, but it's being degraded.",action:"Building scalable, productive and profitable nature restoration and improving soils."}]},stats:{items:[{value:"$60M",label:"AUM",accent:!0},{value:"28",label:"Companies",accent:!1},{value:"8",label:"Countries",accent:!1},{value:"6",label:"Sectors",accent:!0}]},pathways:{items:[{label:"Build With Us",href:"/founders",accent:!0},{label:"Invest With Us",href:"/thesis",accent:!1}]}},ra="font-['Montserrat'] font-light tracking-tight",Aie=1800,Mie=1.9;function Oie(){const t=N.useRef(0),e=N.useRef(null),n=N.useRef(null),r=N.useRef(!1),[s,i]=N.useState("a");return N.useEffect(()=>{const a=e.current,l=n.current;a&&(a.src=$c[0],a.load(),a.play().catch(()=>{})),l&&(l.src=$c[1%$c.length],l.load())},[]),N.useEffect(()=>{const a=e.current,l=n.current;if(!a||!l)return;const d=v=>{if(r.current)return;r.current=!0;const S=v?a:l,C=v?l:a;C.currentTime=0;const j=C.play(),E=()=>{i(v?"b":"a");const A=(t.current+2)%$c.length;t.current=(t.current+1)%$c.length,window.setTimeout(()=>{S.pause(),S.src=$c[A],S.load(),r.current=!1},Aie+100)};j&&typeof j.then=="function"?j.then(E).catch(E):E()},h=(v,S)=>{r.current||S!==(s==="a")||!isFinite(v.duration)||v.duration<=0||v.duration-v.currentTime<=Mie&&d(S)},p=()=>h(a,!0),m=()=>h(l,!1),g=()=>d(!0),x=()=>d(!1);return a.addEventListener("timeupdate",p),l.addEventListener("timeupdate",m),a.addEventListener("ended",g),l.addEventListener("ended",x),()=>{a.removeEventListener("timeupdate",p),l.removeEventListener("timeupdate",m),a.removeEventListener("ended",g),l.removeEventListener("ended",x)}},[s]),c.jsxs(c.Fragment,{children:[c.jsx("img",{src:"/images/hero-bg.png",alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover"}),c.jsx("video",{ref:e,muted:!0,playsInline:!0,autoPlay:!0,preload:"auto","aria-hidden":"true",className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-[1800ms] ease-in-out ${s==="a"?"opacity-100":"opacity-0"}`}
31),c.jsx("video",{ref:n,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true",className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-[1800ms] ease-in-out ${s==="b"?"opacity-100":"opacity-0"}`})]})}function Rie({sector:t,index:e,total:n}){const r=N.useRef(null),{scrollYProgress:s}=gie({target:r,offset:["start end","end start"]}),i=na(s,[0,.5,1],[1.18,1.04,1]),a=na(s,[0,.5,1],["6%","0%","-6%"]),l=na(s,[.35,.55,.85],[.05,0,.25]),d=na(s,[.25,.5,.85],[80,0,-50]),h=na(s,[.3,.5,.78,.9],[0,1,1,0]),p=na(s,[.35,.55],[0,1]),m=na(s,[.3,.5,.85,1],[4,0,0,3]),g=na(m,x=>`blur(${x}px)`);return c.jsxs("div",{ref:r,className:"h-screen sticky top-0 overflow-hidden",style:{zIndex:e+1},children:[c.jsx(Ue.img,{src:t.image,alt:t.name,style:{scale:i,y:a,filter:g},className:"absolute inset-0 w-full h-full object-cover will-change-transform"}),c.jsx(Ue.div,{style:{opacity:l},className:"absolute inset-0 bg-black pointer-events-none"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/55 via-black/10 to-transparent pointer-events-none"}),c.jsx(Ue.div,{style:{y:d,opacity:h},className:"absolute inset-0 flex flex-col justify-end p-8 md:p-16",children:c.jsxs("div",{className:"container mx-auto max-w-6xl",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[c.jsxs("span",{className:"text-sm font-bold uppercase tracking-[0.3em] text-[var(--feature-color)]",children:["0",e+1," / 0",n]}),c.jsx(Ue.span,{style:{scaleX:p},className:"h-px flex-1 max-w-[160px] bg-[var(--feature-color)] origin-left"})]}),c.jsxs("div",{className:"max-w-3xl",children:[c.jsx("h3",{className:`${ra} text-5xl md:text-8xl uppercase mb-6 text-white drop-shadow-lg`,children:t.name}),c.jsx("p",{className:"text-xl md:text-2xl font-medium mb-4 text-white drop-shadow-md",children:t.challenge}),c.jsx("p",{className:"text-lg md:text-xl text-[var(--feature-color)] font-medium drop-shadow-md",children:t.action})]})]})})]})}function Die(){ns({title:"A Climate Company Builder",description:"100x100 is a climate company builder and fund for Southeast Asia. We don't just fund companies, we build them. $100M in revenue. 100M tonnes of carbon cut."});const e=hG().data,n={...e,hero:e?.hero??Hc.hero,statement:e?.statement??Hc.statement,process:e?.process??Hc.process,sectorsSection:e?.sectorsSection??Hc.sectorsSection,stats:e?.stats??Hc.stats,pathways:e?.pathways??Hc.pathways},r=n.sectorsSection.items.map((s,i)=>({...s,image:(s.image&&s.image.trim().length>0?s.image:null)??Eie[i]??Tie}));return c.jsxs("div",{className:"bg-background min-h-screen text-white overflow-hidden",children:[c.jsxs("section",{className:"relative h-screen w-full flex items-center justify-center overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0 z-0",children:[c.jsx(Oie,{}),c.jsx("div",{className:"absolute inset-0 bg-black/15 z-10"}),c.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_45%,rgba(0,0,0,0.55)_100%)] z-10"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-background z-10"})]}),c.jsxs("div",{className:"relative z-20 container mx-auto px-6 text-center mt-20",children:[c.jsxs(Ue.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:1,ease:"easeOut"},className:"text-[clamp(1.75rem,5.5vw,5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-6 drop-shadow-[0_2px_24px_rgba(0,0,0,0.55)] break-words",children:[n.hero.line1,c.jsx("br",{}),n.hero.line2,c.jsx("br",{}),c.jsx("span",{className:"text-[var(--feature-color)] block drop-shadow-[0_2px_24px_rgba(0,0,0,0.55)]",children:n.hero.highlight})]}),c.jsx(Ue.p,{initial:{opacity:0}
31,animate:{opacity:1},transition:{duration:1,delay:.5},className:"text-base md:text-2xl text-white font-semibold uppercase tracking-[0.3em] drop-shadow-[0_2px_16px_rgba(0,0,0,0.55)]",children:n.hero.subTagline})]})]}),c.jsx("section",{className:"min-h-screen px-6 bg-background relative z-20 flex items-center",children:c.jsx("div",{className:"container mx-auto max-w-6xl py-24 w-full",children:c.jsxs(Ue.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.8},className:"flex flex-col gap-4 md:gap-6 text-center md:text-left",children:[c.jsx("h2",{className:`${ra} text-3xl md:text-5xl lg:text-6xl uppercase leading-[0.95] text-white sm:whitespace-nowrap`,children:n.statement.line1}),c.jsx("h2",{className:`${ra} text-[clamp(1.4rem,4.4vw,3.85rem)] uppercase leading-[0.95] text-white sm:whitespace-nowrap`,children:n.statement.line2}),c.jsx("h2",{className:`${ra} text-3xl md:text-5xl lg:text-6xl uppercase leading-[0.95] text-[var(--feature-color)] sm:whitespace-nowrap`,children:n.statement.line3}),c.jsx("p",{className:"text-xs md:text-sm mt-6 font-medium uppercase tracking-[0.3em] text-white/70",children:n.statement.kicker})]})})}),c.jsx("section",{className:"py-32 px-6 bg-white text-neutral-900 border-t border-neutral-200 relative z-20",children:c.jsx("div",{className:"container mx-auto max-w-7xl",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 lg:gap-24",children:[c.jsxs(Ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"flex flex-col justify-start",children:[c.jsx("h2",{className:`${ra} text-5xl md:text-7xl leading-[0.95] text-neutral-900`,children:n.process.headline1}),c.jsx("h2",{className:`${ra} text-5xl md:text-7xl leading-[0.95] text-neutral-900`,children:n.process.headline2}),c.jsx("div",{className:"h-[3px] w-32 bg-[var(--feature-color)] mt-6 mb-8"}),c.jsx("p",{className:"text-base md:text-lg text-neutral-700 leading-relaxed max-w-md mb-10",children:n.process.intro}),c.jsxs("div",{className:"flex flex-col gap-6",children:[c.jsxs(Qe,{href:n.process.ctaHref,className:"group inline-flex items-center gap-3 self-start border-b border-neutral-400 pb-2 text-sm font-bold uppercase tracking-[0.25em] text-neutral-900 hover:text-[var(--feature-color)] hover:border-[var(--feature-color)] transition-colors",children:[n.process.ctaLabel,c.jsx(sf,{size:16,className:"transition-transform group-hover:translate-x-1"})]}),c.jsxs(Qe,{href:"/investors",className:"group inline-flex items-center gap-3 self-start border-b border-neutral-400 pb-2 text-sm font-bold uppercase tracking-[0.25em] text-neutral-900 hover:text-[var(--feature-color)] hover:border-[var(--feature-color)] transition-colors",children:["Join as Investor",c.jsx(sf,{size:16,className:"transition-transform group-hover:translate-x-1"})]})]})]}),c.jsx("div",{className:"flex flex-col gap-10",children:n.process.pillars.map((s,i)=>c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.08},className:"grid grid-cols-[auto_1fr] gap-6 md:gap-8 items-start",children:[c.jsxs("span",{className:"text-sm md:text-base font-bold tracking-widest text-[var(--feature-color)] pt-1",children:["0",i+1]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-2xl md:text-3xl font-bold tracking-tight text-neutral-900 mb-3",children:s.title}),c.jsx("p",{className:"text-base md:text-lg text-neutral-700 leading-relaxed max-w-xl",children:s.desc})]})]},i))})]})})}),c.jsxs("section",{className:"py-40 px-6 bg-card border-t border-border relative z-20",children:[c.jsx("div",{className:"container mx-auto max-w-none",children:c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-x-8 gap-y-14",children:n.stats.items.map((s,i)=>c.jsxs("div",{className:"flex flex-col text-center",children:[c.jsx("span",{className:`${ra} text-[clamp(2.8rem,5.5vw,5.5rem)] uppercase leading-[0.95] ${s.accent?"text-[var(--feature-color)]":"text-white"}`,children:s.value}),c.jsx("span",{className:"text-xs md:text-sm mt-4 font-medium uppercase tracking-[0.3em] text-white/70",children:s.label})]},i))})}),c.jsx("div",{className:"absolute bottom-0 inset-x-0 h-24 bg-gradient-to-b from-transparent to-black pointer-events-none"})]}),c.jsxs("section",{className:"bg-black relative z-20",children:[c.jsxs("div",{className:"container mx-auto px-6 pt-32 pb-20",children:[c.jsx("h2",{className:`${ra} text-[clamp(3rem,6vw,7rem)] uppercase leading-[0.95] text-white`,children:n.sectorsSection.heading}),c.jsx("p",{className:"text-xl md:text-2xl text-white/70 font-medium uppercase mt-4 tracking-[0.2em]",children:n.sectorsSection.subheading})]}),c.jsx("div",{className:"relative",children:r.map((s,i)=>c.jsx(Rie,{sector:s,index:i,total:r.length},i))})]}),c.jsx("section",{className:"flex flex-col md:flex-row md:h-[50vh] relative z-20",children:n.pathways.items.map((s,i)=>
31c.jsxs(Qe,{href:s.href,className:`flex-1 min-h-[40vh] md:min-h-0 ${s.accent?"bg-[var(--feature-color)] text-[#003320]":"bg-white text-background"} flex items-center justify-center group relative overflow-hidden px-6 py-16 md:py-0`,children:[c.jsx("div",{className:"absolute inset-0 bg-black/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),c.jsx("span",{className:`${ra} relative z-10 text-4xl sm:text-5xl md:text-6xl uppercase group-hover:scale-105 transition-transform duration-300 text-center`,children:s.label})]},i))})]})}const _s={hero:{line1:"We don't invest",line2:"in ideas.",highlight:"We co-build companies."},heroImage:"/founders-hero.png",whatYouGet:{heading:"What you get",intro:"We recognize successful and experienced founders have options. We bring the climate expertise, tried and tested venture build process, network and capital to execute it. A platform to accelerate it. From Day One to Series B.",items:[{num:"01",title:"Validated Thesis",desc:"We map the emissions and design the business model before you even start."},{num:"02",title:"Day One Capital",desc:"Immediate funding so you can stop fundraising and start building."},{num:"03",title:"Expert Platform",desc:"We are operators ourselves, helping you solve one problem at a time."},{num:"04",title:"Scale to Series B",desc:"We are your institutional partner until growth equity takes over."}]},howItWorks:{heading:"How it works",intro:"From day-one onboarding to Series B, we stay close. This is where most startups don't survive. After that, we help find the right investors for the next growth journey of the company."},stages:{items:[{label:"Onboarding",window:"Day 1",body:"We start together, understand your ikigai, map emissions, select a white space and start the journey to uncover a problem worth a decade of work."},{label:"Validation",window:"0–6 months",body:"Three months on the problem, three on the solution. We follow what the customer tells us, we create a thesis that is backed by data and evidence and we launch with conviction."},{label:"Launch + Acceleration",window:"6–24 months",body:"We invest a standard $0.5M ticket and run alongside you for the first 18 months. First revenue typically lands within Q1, at the very latest within Y1."},{label:"Seed → Series A → Series B",window:"Year 1.5 → Year 4",body:"We invest another +$0.5–1M at PMF. We bring a lead co-investor at Series A, and follow on through Series B where institutional investors can come in and lead."}]},signals:{eyebrow:"What we look for",heading:"Five signals.",items:[{num:"01",title:"Large carbon TAM",desc:"Emissions you can move at planetary scale."},{num:"02",title:"Large $ TAM",desc:"A market deep enough to absorb a real business."},{num:"03",title:"Compelling pain",desc:"A customer problem so sharp it pulls the product."},{num:"04",title:"Margin potential",desc:"Unit economics that compound, not subsidise."},{num:"05",title:"Tech is ready",desc:"The fundamentals exist for a fast go-to-market."}],footnote:"When those signals line up, we typically see first revenue within the first quarter — at the very latest, the first year."},testimonials:{eyebrow:"In the words of our founders",items:[]},whoWeLookFor:{heading:"Who we look for",introBold:"Please don't send us your deck",introTagline:"We don't invest in existing ideas. We co-build new ones.",introBody:"If you're shopping a startup that's already underway, we're the wrong fit — and there are great investors who are. What we're looking for is the founder, not the pitch. Bring us your track record, your obsession, and your willingness to throw out every idea you walked in with. We'll find the right problem together.",subheading:"Here's who tends to thrive with us:",items:[{title:"Founders and Operators who've been there.",body:"You've built a real company — revenue, team, customers who cared — or you were an early hire who watched one go from zero to scale. Whether you started it or were employee #5, you know what good looks like because you've built it."},{title:"Commercial instincts, not just functional ones.",body:"You can read a P&L, model unit economics, and tell within ten minutes of a customer call whether there's a real business here. You've owned a number before. You've missed one before. You've learned both ways."},{title:"Recruiters of strong teams.",body:"The people you've hired would work with you again. Some of them will follow you here."},{title:"Obsessed with the problem, flexible on the solution.",body:"Climate is the biggest problem we have. You don’t need a climate background — you need to care enough to learn fast and stay when it gets boring."}]},cta:{heading:"Ready to build?",label:"Talk to us",href:"/apply"}},JM={heading:"If we are serious about tackling climate change, we simply need more women at the top table — in governments, boards, funders, and founders.",paragraphs:["We have an internal 25% target for women founders — still not high enough, but more than 5× the industry standard. We are active members of 2x Global and signatories of the IIX Orange Pledge for gender lens investing.","We actively partner and participate in events and mentoring programmes, and shine a light on successful women founders and funders across Singapore, Indonesia, Philippines, Australia and New Zealand.","If you’re a woman founder building in climate, we’ve built this programme with you in mind."],partners:[]};function _ie(){ns({title:"For Founders",description:"Join 100x100 as a climate founder in Southeast Asia. We provide capital, co-founders, and hands-on company-building support to turn climate ideas into scalable businesses."});const{data:t}=PX(),e=t,n={...e,hero:e?.hero??_s.hero,heroImage:e?.heroImage??_s.heroImage,whatYouGet:e?.whatYouGet??_s.whatYouGet,howItWorks:e?.howItWorks??_s.howItWorks,stages:e?.stages??_s.stages,signals:e?.signals??_s.signals,testimonials:e?.testimonials??_s.testimonials,whoWeLookFor:e?.whoWeLookFor??_s.whoWeLookFor,womenCommitment:e?.womenCommitment??JM,cta:e?.cta??_s.cta},r=n.heroImage||_s.heroImage,s=n.whoWeLookFor??_s.whoWeLookFor,i=n.womenCommitment??JM;return c.jsxs("div",{className:"bg-background min-h-screen text-foreground pt-32",children:[c.jsx("div",{className:"container mx-auto px-6 max-w-6xl",children:c.jsxs(Ue.h1,{initial:{opacity:0,y:20}
31,animate:{opacity:1,y:0},className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-12 break-words",children:[n.hero.line1,c.jsx("br",{}),n.hero.line2,c.jsx("br",{}),c.jsx("span",{className:"text-[var(--feature-color)]",children:n.hero.highlight})]})}),c.jsxs("div",{className:"relative w-screen left-1/2 right-1/2 -ml-[50vw] -mr-[50vw] h-[70vh] md:h-[85vh] overflow-hidden bg-card",children:[c.jsx(Ue.img,{initial:{scale:1.15},animate:{scale:1},transition:{duration:2.4,ease:[.22,1,.36,1]},src:r,alt:"Cinematic hero image",className:"w-full h-full object-cover"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-background/50 via-background/50 to-transparent [mask-image:linear-gradient(to_top,black_30%,transparent_70%)]"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-b from-background/50 via-transparent to-transparent"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 [box-shadow:inset_0_0_180px_60px_rgba(0,0,0,0.35)]"})]}),c.jsx("div",{className:"relative w-screen left-1/2 right-1/2 -ml-[50vw] -mr-[50vw] bg-white py-24 md:py-32 mb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-6xl",children:[c.jsxs("div",{className:"mb-16 md:mb-20",children:[c.jsx("h2",{className:"text-4xl md:text-6xl font-black uppercase tracking-tighter mb-6 text-neutral-900",children:n.whatYouGet.heading}),c.jsx("p",{className:"text-xl md:text-2xl text-neutral-500 font-medium leading-relaxed max-w-2xl",children:n.whatYouGet.intro})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-px bg-neutral-200",children:n.whatYouGet.items.map((a,l)=>c.jsxs(Ue.div,{initial:{opacity:0,y:32},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.6,delay:l*.1,ease:[.22,1,.36,1]},className:"relative bg-white overflow-hidden px-10 pt-10 pb-14 group",children:[c.jsx("span",{"aria-hidden":"true",className:"absolute -bottom-6 -right-3 text-[11rem] font-black leading-none text-neutral-100 select-none transition-colors duration-500 group-hover:text-[var(--feature-color)]/10",children:a.num}),c.jsx("div",{className:"w-10 h-[3px] bg-[var(--feature-color)] mb-8 transition-all duration-500 group-hover:w-16"}),c.jsx("h3",{className:"text-[clamp(1.6rem,2.8vw,2.4rem)] font-black uppercase tracking-tighter leading-tight text-neutral-900 mb-4",children:a.title}),c.jsx("p",{className:"text-base md:text-lg text-neutral-500 leading-relaxed relative z-10 max-w-sm",children:a.desc})]},l))})]})}),c.jsx("div",{className:"container mx-auto px-6 max-w-6xl",children:c.jsx(Vie,{heading:n.howItWorks.heading,intro:n.howItWorks.intro,stages:n.stages.items})}),c.jsx($ie,{signals:n.signals}),c.jsx(Hie,{section:s}),c.jsx(Pie,{section:i}),n.testimonials.items.length>0&&c.jsx("section",{className:"bg-white text-neutral-900 py-24 md:py-32 px-6 mb-32",children:c.jsxs("div",{className:"container mx-auto max-w-5xl",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-neutral-500 mb-16 text-center",children:n.testimonials.eyebrow}),c.jsx("div",{className:"space-y-20 md:space-y-28",children:n.testimonials.items.map((a,l)=>c.jsxs(Ue.figure,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.7},className:`flex flex-col md:flex-row items-center gap-8 md:gap-12 ${a.side==="right"?"md:flex-row-reverse md:text-right":"md:text-left"}`,children:[c.jsx("div",{className:"shrink-0",children:c.jsx("div",{className:"w-40 h-40 md:w-56 md:h-56 rounded-full overflow-hidden border-4 border-white shadow-[0_8px_30px_rgba(0,0,0,0.12)]",children:c.jsx("img",{src:a.photo,alt:a.name,className:"w-full h-full object-cover"})})}),c.jsxs("div",{className:"flex-1",children:[c.jsx("span",{"aria-hidden":"true",className:`block text-[var(--feature-color)] font-bold leading-none text-5xl md:text-6xl mb-2 ${a.side==="right"?"md:text-right":""}`,children:"“"}),c.jsx("blockquote",{className:"text-[0.9375rem] md:text-base font-normal leading-relaxed text-neutral-800 mb-6",children:a.quote}),c.jsxs("figcaption",{children:[c.jsxs("div",{className:`flex items-center gap-3 ${a.side==="right"?"md:justify-end":""}`,children:[c.jsx("span",{className:"font-bold uppercase tracking-[0.2em] text-[#003320] text-sm",children:a.name}),a.linkedin&&c.jsx("a",{href:a.linkedin,target:"_blank",rel:"noopener noreferrer","aria-label":`${a.name} on LinkedIn`,className:"text-neutral-400 hover:text-[var(--feature-color)] transition-colors",children:c.jsx(IP,{size:14,strokeWidth:2.25})})]}),c.jsx("div",{className:"text-neutral-500 uppercase tracking-[0.2em] text-xs mt-1",children:a.role})]})]})]},l))})]})}),c.jsx("div",{className:"container mx-auto px-6 max-w-6xl",children:c.jsxs("div",{className:"text-center pb-32",children:[c.jsx("h2",{className:"text-5xl md:text-7xl font-black uppercase tracking-tighter mb-12",children:n.cta.heading}),c.jsx(Qe,{href:n.cta.href,className:"inline-block bg-[var(--feature-color)] text-[#003320] px-12 py-6 text-2xl font-black uppercase tracking-widest hover:bg-[var(--feature-color-hover)] transition-colors",children:n.cta.label})]})})]})}function Pie({section:t}){return c.jsx("div",{className:"relative w-screen left-1/2 right-1/2 -ml-[50vw] -mr-[50vw] bg-[#050e09] py-24 md:py-32",children:c.jsx("div",{className:"container mx-auto px-6 max-w-6xl",children:c.jsxs(Ue.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7},children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-8",children:"Our commitment to women founders"}),c.jsx("blockquote",{className:"text-[clamp(1.4rem,3vw,2.5rem)] font-black uppercase tracking-tighter leading-[1.1] text-white max-w-4xl mb-16 border-l-4 border-[var(--feature-color)] pl-8",children:t.heading}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[240px_1fr] gap-12 md:gap-20 mb-12",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-[5.5rem] md:text-[7rem] font-black leading-none text-[var(--feature-color)] tracking-tighter tabular-nums mb-5",children:"25%"}),c.jsxs("div",{className:"text-white font-bold uppercase tracking-widest text-[11px] leading-relaxed",children:["target for women",c.jsx("br",{}),"founders"]})]}),c.jsx("div",{className:"space-y-5 self-center",children:t.paragraphs.map((e,n)=>c.jsx("p",{className:"text-base md:text-lg text-white/70 leading-relaxed",children:e},n))})]}),t.partners.length>0&&c.jsxs("div",{className:"border-t border-white/10 pt-8",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-white/40 mb-6",children:"Our partners"}),c.jsx("div",{className:"flex flex-wrap items-center gap-10",children:t.partners.map((e,n)=>c.jsxs("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col items-center gap-2 group opacity-50 hover:opacity-100 transition-opacity duration-300","aria-label":e.name,children:[c.jsx("img",{src:e.logoUrl,alt:e.name,className:"h-10 w-auto object-contain brightness-0 invert"}),c.jsx("span",{className:"text-xs text-white/50 group-hover:text-white/80 transition-colors duration-200",children:e.name})]},n))})]})]})})})}const yl=1200,Eu=600,gn={left:95,right:60,top:80,bottom:140},Lie=yl-gn.left-gn.right,Y4=Eu-gn.top-gn.bottom,Cx=4,qg=.5,Wa="var(--feature-color)",Tm="#9DE0B8",gr=t=>gn.left+t/Cx*Lie,F1=(t,e)=>Eu-gn.bottom-t/e*Y4,rC=t=>t<qg?0:Math.pow(t-qg,2.4),Q4=t=>t<qg?0:.55*Math.pow(t-qg,2.5),z1=22,Iie=[5,10,15,20],ZM=160,Uie=Array.from({length:ZM+1},(t,e)=>e/ZM*Cx),sC=t=>Uie.map((e,n)=>{const r=gr(e),s=F1(t(e),z1);return`${n===0?"M":"L"} ${r.toFixed(2)} ${s.toFixed(2)}`}).join(" "),X4=t=>{const e=(Eu-gn.bottom).toFixed(2),n=gr(0).toFixed(2),r=gr(Cx).toFixed(2);return`${sC(t)} L ${r} ${e} L ${n} ${e} Z`},Bie=sC(rC),Fie=sC(Q4),zie=X4(rC),qie=X4(Q4),eO=[{kind:"phase",name:"6-mo Validation",tStart:0,tEnd:.5,sub:"Founder-Problem-Fit"},{kind:"phase",name:"18-mo Acceleration",tStart:.5,tEnd:2,sub:"Product-Market-Fit"}],Yv=[{kind:"event",name:"Launch",t:.5,sub:"$0 revenue",sub2:"Pre-seed ticket",primary:!0},{kind:"event",name:"Seed",t:1.5,sub:"$1M run-rate",sub2:"Seed follow-on capital",primary:!0},{kind:"event",name:"Series A",t:2.5,sub:"$5M run-rate",sub2:"External Series-A lead",primary:!0},{kind:"event",name:"Series B",t:4,sub:"$20M run-rate",sub2:"Institutional co-investors",primary:!0}],tO=2.6;function Vie({heading:t,intro:e,stages:n}){return c.jsxs("div",{"data-testid":"section-how-it-works",children:[c.jsx("h2",{className:"text-4xl md:text-6xl font-black uppercase tracking-tighter mb-6",children:t}),c.jsx("p",{className:"text-xl md:text-2xl text-white/70 font-medium leading-relaxed max-w-3xl mb-16",children:e}),c.jsx("div",{className:"hidden md:block bg-card border border-border p-4 md:p-8 mb-20 overflow-hidden",children:c.jsx(Kie,{})}),c.jsxs("div",{className:"md:hidden bg-card border border-border p-6 mb-20",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-2",children:"Revenue trajectory"}),c.jsx("div",{className:"text-base text-white/70 mb-8 leading-relaxed",children:"From launch to Series B, every company is built to grow revenue and abate carbon together."}),c.jsx("ol",{className:"relative border-l-2 border-[var(--feature-color)]/30 pl-6 space-y-8",children:[{name:"Launch",phase:"Year 0.5 · Pre-seed",value:"$0",sub:"First customer"},{name:"Seed",phase:"Year 1.5 · Seed follow-on",value:"$1M",sub:"Annual run-rate"},{name:"Series A",phase:"Year 2.5 · External lead",value:"$5M",sub:"Annual run-rate"},{name:"Series B",phase:"Year 4 · Institutional co-investors",value:"$20M",sub:"Annual run-rate"}].map(r=>c.jsxs("li",{className:"relative",children:[c.jsx("span",{className:"absolute -left-[31px] top-1 w-4 h-4 rounded-full bg-[var(--feature-color)] border-4 border-card"}),c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.25em] text-[var(--feature-color)] mb-1",children:r.phase}),c.jsxs("div",{className:"flex items-baseline gap-3 mb-1",children:[c.jsx("span",{className:"text-xl font-black uppercase tracking-tight text-white",children:r.name}),c.jsx("span",{className:"text-2xl font-black text-[var(--feature-color)] tabular-nums tracking-tight",children:r.value})]}),c.jsx("div",{className:"text-sm text-white/60",children:r.sub})]},r.name))})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-px bg-border mb-24",children:n.map((r,s)=>c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{delay:s*.08},className:"bg-background p-8",children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.25em] text-[var(--feature-color)] block mb-2",children:r.window}),c.jsx("h3",{className:"text-xl font-black uppercase tracking-tight mb-3",children:r.label}),c.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:r.body})]},`${r.label}-${s}`))})]})}function $ie({signals:t}){return c.jsx("section",{className:"bg-[var(--feature-color)] text-[#003320] py-16 md:py-24 px-6",children:c.jsxs("div",{className:"container mx-auto max-w-6xl",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#003320] mb-4",children:t.eyebrow}),c.jsx("h3",{className:"text-3xl md:text-5xl font-black uppercase tracking-tighter mb-12 text-[#003320]",children:t.heading}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 ga
31p-6 mb-12",children:t.items.map((e,n)=>c.jsxs(Ue.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{delay:n*.06},className:"border-l-2 border-[#003320] pl-5",children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.25em] text-[#003320] block mb-2",children:e.num}),c.jsx("h4",{className:"text-base font-black uppercase tracking-tight mb-2 leading-tight text-[#003320]",children:e.title}),c.jsx("p",{className:"text-sm text-[#003320]/80 leading-relaxed",children:e.desc})]},`${e.num}-${n}`))}),t.footnote&&c.jsx("p",{className:"text-base md:text-lg text-[#003320]/80 italic max-w-3xl",children:t.footnote})]})})}function Hie({section:t}){return c.jsx("section",{className:"bg-white text-neutral-900 py-16 md:py-24 px-6",children:c.jsxs("div",{className:"container mx-auto max-w-6xl",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-neutral-500 mb-4",children:t.heading}),c.jsx("h2",{className:"text-3xl md:text-5xl font-black uppercase tracking-tighter mb-4 text-neutral-900",children:t.introBold}),c.jsx("p",{className:"text-base md:text-lg text-[var(--feature-color)] font-semibold mb-4",children:t.introTagline}),c.jsx("p",{className:"text-base md:text-lg text-neutral-600 leading-relaxed mb-12 max-w-3xl",children:t.introBody}),c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-neutral-500 mb-6",children:t.subheading}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.items.map((e,n)=>c.jsxs(Ue.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.55,delay:n*.08,ease:[.22,1,.36,1]},className:"border-l-2 border-neutral-200 pl-5 group hover:border-[var(--feature-color)] transition-colors duration-300",children:[c.jsx("h3",{className:"text-base font-black uppercase tracking-tight text-neutral-900 mb-2 leading-tight",children:e.title}),c.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed",children:e.body})]},n))})]})})}function Kie(){const t=[0,1,2,3,4],e=Eu-gn.bottom,n=e+95;return c.jsxs("svg",{viewBox:`0 0 ${yl} ${Eu}`,preserveAspectRatio:"xMidYMid meet",className:"w-full h-auto",role:"img","aria-label":"Process timeline showing revenue and carbon abatement growing from launch through Series B over four years","data-testid":"chart-how-it-works",children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:"chart-reveal-clip",children:c.jsx(Ue.rect,{x:"0",y:"0",height:Eu,initial:{width:0},whileInView:{width:yl},viewport:{once:!0,margin:"-100px"},transition:{duration:tO,ease:[.22,1,.36,1]}})}),c.jsxs("linearGradient",{id:"rev-grad",x1:"0",x2:"0",y1:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:Wa,stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:Wa,stopOpacity:"0"})]}),c.jsxs("linearGradient",{id:"carb-grad",x1:"0",x2:"0",y1:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:Tm,stopOpacity:"0.32"}),c.jsx("stop",{offset:"100%",stopColor:Tm,stopOpacity:"0"})]})]}),Iie.map(r=>{const s=F1(r,z1);return c.jsx("line",{x1:gn.left,x2:yl-gn.right,y1:s,y2:s,stroke:"#ffffff",strokeOpacity:"0.06",strokeDasharray:"2 5"},`ygrid-${r}`)}),t.map(r=>c.jsx("line",{x1:gr(r),x2:gr(r),y1:gn.top,y2:e,stroke:"#ffffff",strokeOpacity:"0.06",strokeDasharray:"2 5"},`xgrid-${r}`)),c.jsx("line",{x1:gn.left,x2:gn.left,y1:gn.top,y2:e,stroke:"#ffffff",strokeOpacity:"0.2"}),c.jsx("line",{x1:gn.left,x2:yl-gn.right,y1:e,y2:e,stroke:"#ffffff",strokeOpacity:"0.25"}),eO.map(r=>c.jsx("rect",{x:gr(r.tStart),y:gn.top,width:gr(r.tEnd)-gr(r.tStart),height:Y4,fill:"#ffffff",fillOpacity:"0.015"},`phase-bg-${r.name}`)),Yv.map(r=>c.jsx("line",{x1:gr(r.t),x2:gr(r.t),y1:gn.top,y2:e,stroke:Wa,strokeOpacity:"0.22",strokeDasharray:"3 4"},`vline-${r.name}`)),c.jsxs("g",{clipPath:"url(#chart-reveal-clip)",children:[c.jsx("path",{d:qie,fill:"url(#carb-grad)"}),c.jsx("path",{d:zie,fill:"url(#rev-grad)"}),c.jsx("path",{d:Fie,stroke:Tm,strokeWidth:"3",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:Bie,stroke:Wa,strokeWidth:"3.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),Yv.map(r=>{const s=gr(r.t),i=F1(rC(r.t),z1),a=s/yl*tO;return c.jsxs(Ue.g,{initial:{opacity:0,scale:.4},whileInView:{opacity:1,scale:1},viewport:{once:!0,margin:"-100px"}
31,transition:{delay:Math.max(a-.05,0),duration:.45,ease:"easeOut"},children:[c.jsx("circle",{cx:s,cy:i,r:"11",fill:Wa,fillOpacity:"0.18"}),c.jsx("circle",{cx:s,cy:i,r:"6",fill:Wa,stroke:"#0a0a0a",strokeWidth:"2"})]},`evt-${r.name}`)}),t.map(r=>c.jsxs("text",{x:gr(r),y:e+22,fill:"#ffffff",fillOpacity:"0.55",fontSize:"10",fontWeight:"700",letterSpacing:"2",textAnchor:"middle",children:["YEAR ",r]},`year-${r}`)),eO.map(r=>{const s=gr(r.tStart),i=gr(r.tEnd),a=(s+i)/2,l=e+42;return c.jsxs("g",{children:[c.jsx("line",{x1:s+4,x2:i-4,y1:l,y2:l,stroke:"#ffffff",strokeOpacity:"0.35"}),c.jsx("line",{x1:s+4,x2:s+4,y1:l-4,y2:l+4,stroke:"#ffffff",strokeOpacity:"0.35"}),c.jsx("line",{x1:i-4,x2:i-4,y1:l-4,y2:l+4,stroke:"#ffffff",strokeOpacity:"0.35"}),c.jsx("text",{x:a,y:l+16,fill:"#ffffff",fillOpacity:"0.85",fontSize:"11",fontWeight:"800",letterSpacing:"2",textAnchor:"middle",children:r.name.toUpperCase()}),r.sub&&c.jsx("text",{x:a,y:l+30,fill:"#ffffff",fillOpacity:"0.45",fontSize:"9.5",fontWeight:"600",letterSpacing:"0.5",textAnchor:"middle",children:r.sub})]}
31,`phase-lbl-${r.name}`)}),Yv.map(r=>{const s=gr(r.t),i=r.t===Cx,a=i?"end":"middle",l=i?6:0;return c.jsxs("g",{children:[c.jsx("line",{x1:s,x2:s,y1:e,y2:n-12,stroke:Wa,strokeOpacity:"0.35",strokeWidth:"1"}),c.jsx("text",{x:s+l,y:n,fill:"var(--feature-color)",fontSize:"12",fontWeight:"800",letterSpacing:"2",textAnchor:a,children:r.name.toUpperCase()}),r.sub&&c.jsx("text",{x:s+l,y:n+14,fill:"#ffffff",fillOpacity:"0.75",fontSize:"9.5",fontWeight:"700",letterSpacing:"0.4",textAnchor:a,children:r.sub}),r.sub2&&c.jsx("text",{x:s+l,y:n+28,fill:"#ffffff",fillOpacity:"0.55",fontSize:"9.5",fontWeight:"600",letterSpacing:"0.4",textAnchor:a,children:r.sub2})]},`evt-lbl-${r.name}`)}),c.jsxs("g",{transform:`translate(${yl-gn.right-320}, ${gn.top-36})`,children:[c.jsx("rect",{x:"0",y:"0",width:"22",height:"3",fill:Wa}),c.jsx("text",{x:"30",y:"6",fill:"#ffffff",fillOpacity:"0.85",fontSize:"11",fontWeight:"800",letterSpacing:"2",children:"REVENUE"}),c.jsx("rect",{x:"130",y:"0",width:"22",height:"3",fill:Tm}),c.jsx("text",{x:"160",y:"6",fill:"#ffffff",fillOpacity:"0.85",fontSize:"11",fontWeight:"800",letterSpacing:"2",children:"CARBON ABATEMENT"})]})]})}const Ga={hero:{line1:"We don't pick winners.",highlight:"We build them."},heroImage:"/investors-hero.png",why:{heading:"Why invest with us",intro:"We are witnessing one of the largest economic transformations in modern history. Energy, food and industrial systems are being rebuilt to meet growing demand, resource constraints and resilience needs. 100x100 gives institutional investors structured access to the companies powering this transition, targeting strong financial returns alongside measurable impact.",reasons:[{num:"01",title:"De-risked Origination",desc:"Every company starts from a validated thesis, a costed business model, and a sized market. No pitch-deck roulette. We know where the next 50-100 companies are."},{num:"02",title:"Companies the planet needs",desc:"We do the climate research, find the gap, and start the company before any pitch exists. You're backing companies that don't exist anywhere else. And won't exist unless we build them."},{num:"03",title:"Founder-Led",desc:"We are not passive capital. Our team identifies founders, co-builds the company, helps recruit the founders, and stays operational through Series B."},{num:"04",title:"Climate + Returns",desc:"Every company is designed to make money. $100M in revenue and 100M tonnes of carbon reduced, within a decade. Same company. Returns and impact aren't a trade-off. They're the same bet."}]},stats:{items:[{stat:"10%",label:"Reduction in global emissions is our goal in life"},{stat:"50",label:"Companies must succeed over our lifetime"},{stat:"100M t",label:"CO₂e abatement mandate each"}]},lpQuote:{quote:"We let our investors speak for themselves.",attribution:"",attributionSub:"LP perspectives — coming soon"},partners:{heading:"Who we work with",items:[{title:"Institutional LPs",desc:"Development Finance Institutions and Multi-laterals, Sovereign wealth, pension, and endowment capital seeking durable, mission-aligned exposure."},{title:"Strategic Corporates",desc:"Industrials and energy majors deploying balance-sheet capital alongside operational partnerships."},{title:"Family Offices",desc:"Multi-generational capital looking for both impact and venture-grade returns."},{title:"Climate Funds",desc:"Co-investment partners and proprietary dealflow builds across our target sectors."}]},cta:{heading:"Ready to invest?",label:"Get in touch",href:"mailto:[email protected]"}},Wie={heading:"Building diverse teams and backing diverse founders isn't a pledge. It's how we operate.",stats:[{value:"25%",label:"Target for women founders"},{value:"50%",label:"Women across our team"}],paragraphs:["We have an internal 25% target for women founders and a firm-wide commitment to 50% women across our team, with active succession and development programmes to maintain it.","We champion women funders and actively partner with 2x Global and are signatories of the IIX Orange Pledge for gender lens investing — two of the leading standards for institutional investors with DEI mandates."],partners:[]};function Gie({dei:t}){return c.jsx("div",{className:"bg-[#0a1a14] text-white py-24 md:py-32 mb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-6xl",children:[c.jsx("p",{className:"text-[var(--feature-color)] text-xs font-bold uppercase tracking-[0.3em] mb-8",children:"Diversity & Inclusion"}),c.jsx(Ue.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl font-black uppercase tracking-tighter leading-none max-w-4xl mb-16",children:t.heading}),t.stats.length>0&&c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 mb-16",children:t.stats.map((e,n)=>c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:n*.08},children:[c.jsx("div",{className:"text-5xl md:text-7xl font-black text-[var(--feature-color)] leading-none mb-3",children:e.value}),c.jsx("div",{className:"text-white/60 text-sm uppercase tracking-widest leading-snug",children:e.label})]},n))}),t.paragraphs.length>0&&c.jsx("div",{className:"max-w-3xl space-y-5 mb-16",children:t.paragraphs.map((e,n)=>c.jsx(Ue.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:n*.05},className:"text-white/70 text-lg leading-relaxed",children:e},n))}),t.partners.length>0&&c.jsx("div",{className:"flex flex-wrap items-center gap-10",children:t.partners.map((e,n)=>{const r=c.jsx("img",{src:e.logoUrl,alt:e.name,className:"h-8 object-contain brightness-0 invert opacity-60 hover:opacity-100 transition-opacity"});return e.websiteUrl?c.jsx("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",children:r},n):c.jsx("span",{children:r},n)})})]})})}function Yie(){ns({title:"For Investors",description:"Invest in climate with 100x100. We build and back the most important climate companies in Southeast Asia, delivering both environmental impact and investor returns."});const{data:t}=ZJ(),e=t,n={...e,hero:e?.hero??Ga.hero,heroImage:e?.heroImage??Ga.heroImage,why:e?.why??Ga.why,stats:e?.stats??Ga.stats,lpQuote:e?.lpQuote??Ga.lpQuote,partners:e?.partners??Ga.partners,deiCommitment:e?.deiCommitment??Wie,cta:e?.cta??Ga.
31cta},r=n.heroImage||Ga.heroImage;return c.jsxs("div",{className:"bg-background min-h-screen text-foreground pt-32",children:[c.jsx("div",{className:"container mx-auto px-6 max-w-6xl",children:c.jsxs(Ue.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-12 break-words",children:[n.hero.line1,c.jsx("br",{}),c.jsx("span",{className:"text-[var(--feature-color)]",children:n.hero.highlight})]})}),c.jsxs("div",{className:"relative w-full h-[80vh] overflow-hidden bg-card mb-32",children:[c.jsx(Ue.img,{initial:{scale:1.08},animate:{scale:1},transition:{duration:1.5,ease:"easeOut"},src:r,alt:"Investors hero",className:"absolute inset-0 w-full h-full object-cover"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-background/50 via-background/50 to-transparent [mask-image:linear-gradient(to_top,black_30%,transparent_70%)]"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-b from-background/50 via-transparent to-transparent"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 [box-shadow:inset_0_0_180px_60px_rgba(0,0,0,0.35)]"})]}),c.jsxs("div",{className:"container mx-auto px-6 max-w-6xl",children:[c.jsxs("div",{className:"mb-32",children:[c.jsxs("div",{className:"mb-16",children:[c.jsx("h2",{className:"text-4xl md:text-6xl font-black uppercase tracking-tighter mb-6 whitespace-nowrap",children:n.why.heading}),c.jsx("p",{className:"text-xl md:text-2xl text-white/70 font-medium leading-relaxed max-w-3xl",children:n.why.intro})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:n.why.reasons.map((s,i)=>{const l=[af,S8,uk,ck][i]??af;return c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.1},className:"border border-white/15 bg-white/5 p-8 flex flex-col gap-5",children:[c.jsx(l,{className:"w-9 h-9 text-[var(--feature-color)]",strokeWidth:1.5}),c.jsx("h3",{className:"text-lg font-bold uppercase tracking-wide",children:s.title}),c.jsx("p",{className:"text-white/60 text-sm leading-relaxed",children:s.desc})]},i)})})]}),c.jsx("div",{className:"grid md:grid-cols-4 gap-px bg-border mb-32",children:n.stats.items.map((s,i)=>c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.1},className:"bg-background px-6 py-12 md:px-10 md:py-16 text-center",children:[c.jsx("div",{className:"text-5xl md:text-6xl font-black text-[var(--feature-color)] mb-4 tracking-tighter whitespace-nowrap",children:s.stat}),c.jsx("div",{className:"text-xs md:text-sm font-bold uppercase tracking-widest text-white/70",children:s.label})]},i))})]}),c.jsx("div",{className:"bg-[var(--feature-color)] text-[#003320]",children:c.jsx("div",{className:"container mx-auto px-6 max-w-6xl py-24 md:py-32",children:c.jsxs("div",{className:"p-4 md:p-12 text-center",children:[c.jsx("p",{className:"text-2xl md:text-4xl font-medium leading-tight mb-8",children:n.lpQuote.quote}),n.lpQuote.attribution&&c.jsx("div",{className:"font-bold uppercase tracking-widest text-lg md:text-xl mb-1",children:n.lpQuote.attribution}),n.lpQuote.attributionSub&&c.jsx("div",{className:"text-[#003320]/70 uppercase tracking-widest text-sm md:text-base",children:n.lpQuote.attributionSub})]})})}),c.jsx("div",{className:"bg-white text-black",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-6xl py-24 md:py-32",children:[c.jsx("h2",{className:"text-4xl md:text-6xl font-black uppercase tracking-tighter mb-12",children:n.partners.heading}),c.jsx("div",{className:"grid md:grid-cols-2 gap-12",children:n.partners.items.map((s,i)=>c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.05},className:"border border-black/20 p-8",children:[c.jsx("h3",{className:"text-2xl font-bold uppercase tracking-wide mb-3",children:s.title}),c.jsx("p",{className:"text-black/80 text-lg",children:s.desc})]},i))})]})}),n.deiCommitment&&c.jsx(Gie,{dei:n.deiCommitment}),c.jsx("div",{className:"container mx-auto px-6 max-w-6xl",children:c.jsxs("div",{className:"text-center pb-32",children:[c.jsx("h2",{className:"text-5xl md:text-7xl font-black uppercase tracking-tighter mb-12",children:n.cta.heading}),c.jsx("a",{href:n.cta.href,className:"inline-block bg-[var(--feature-color)] text-[#003320] px-12 py-6 text-2xl font-black uppercase tracking-widest hover:bg-white hover:text-black transition-colors",children:n.cta.label})]})})]})}
31const Qie=["Energy","Transport","Food & Agriculture","Industry","Buildings","Land Use"],Xie=["Southeast Asia","India","Australia"],Jie=["Fund I","Fund II"],Zie=["Pre-seed","Seed","Series A","Series B"],eae=["Active","Exited","Terminated"],tae={"Food & Agriculture":"Food & Ag"},J4=t=>tae[t]??t,Qv=[{key:"name-asc",label:"Alphabetical (A–Z)"},{key:"name-desc",label:"Alphabetical (Z–A)"},{key:"funded-desc",label:"Funding Date (newest)"},{key:"funded-asc",label:"Funding Date (oldest)"}];function nae(){ns({title:"Portfolio",description:"Explore 100x100's portfolio of climate companies across Southeast Asia — built to cut 100M tonnes of carbon and generate $100M in revenue."});const{data:t,isLoading:e,isError:n}=QG(),r=t??[],[s,i]=N.useState("All"),[a,l]=N.useState("All"),[d,h]=N.useState("All"),[p,m]=N.useState("All"),[g,x]=N.useState("All"),[v,S]=N.useState("name-asc"),C=N.useMemo(()=>{const D=r.filter(M=>(s==="All"||M.sector===s)&&(a==="All"||M.region===a)&&(d==="All"||M.fund===d)&&(p==="All"||M.stage===p)&&(g==="All"||M.status===g)).slice();return D.sort((M,I)=>{switch(v){case"name-asc":return M.name.localeCompare(I.name);case"name-desc":return I.name.localeCompare(M.name);case"funded-desc":case"funded-asc":{const _=M.fundedAt?Date.parse(M.fundedAt):NaN,L=I.fundedAt?Date.parse(I.fundedAt):NaN,V=Number.isNaN(_),B=Number.isNaN(L);return V&&B?M.name.localeCompare(I.name):V?1:B?-1:v==="funded-asc"?_-L:L-_}}}),D},[r,s,a,d,p,g,v]),j=s==="All"&&a==="All"&&d==="All"&&p==="All"&&g==="All",E=()=>{i("All"),l("All"),h("All"),m("All"),x("All")};return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsx(Ue.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-8 break-words",children:"Companies"}),c.jsxs(Ue.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-xl md:text-2xl text-white/70 font-medium leading-relaxed max-w-3xl mb-20",children:["We build from scratch with proven entrepreneurs. Our portfolio is made up of companies with the potential to abate"," ",c.jsx("span",{className:"text-[var(--feature-color)] font-bold",children:"100 million tonnes of CO₂e"})," and generate"," ",c.jsx("span",{className:"text-[var(--feature-color)] font-bold",children:"US$100 million in revenue"})," per year."]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-12",children:[c.jsxs("button",{type:"button",onClick:E,"data-testid":"filter-show-all",className:`px-4 py-2 text-xs font-bold uppercase tracking-[0.2em] transition-colors ${j?"bg-[var(--feature-color)] text-[#003320]":"border border-border text-white/70 hover:text-white hover:border-white/40"}`,children:["Show All · ",C.length]}),c.jsx(ch,{label:"Sector",value:s,options:Qie,labelFor:J4,onChange:i,testid:"filter-sector"}),c.jsx(ch,{label:"Region",value:a,options:Xie,onChange:l,testid:"filter-region"}),c.jsx(ch,{label:"Fund",value:d,options:Jie,onChange:h,testid:"filter-fund"}),c.jsx(ch,{label:"Stage",value:p,options:Zie,onChange:m,testid:"filter-stage"}),c.jsx(ch,{label:"Status",value:g,options:eae,onChange:x,testid:"filter-status"}),c.jsx("div",{className:"flex-1"}),c.jsx(rae,{value:v,onChange:S,testid:"filter-sort"})]}),e&&c.jsx("div",{className:"border border-border py-24 text-center",children:c.jsx("p",{className:"text-white/60 uppercase tracking-[0.2em] text-sm font-bold",children:"Loading portfolio…"})}),n&&c.jsx("div",{className:"border border-red-500/40 bg-red-950/20 py-12 text-center",children:c.jsx("p",{className:"text-red-300 uppercase tracking-[0.2em] text-sm font-bold",children:"Couldn't load the portfolio. Please refresh."})}),!e&&!n&&C.length>0&&c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:C.map((A,D)=>c.jsx(sae,{co:A,delay:Math.min(D*.04,.4)},A.slug))}),!e&&!n&&C.length===0&&c.jsxs("div",{className:"border border-border py-24 text-center",children:[c.jsx("p",{className:"text-white/60 uppercase tracking-[0.2em] text-sm font-bold mb-4",children:"No companies match these filters"}),c.jsx("button",{type:"button",onClick:E,className:"text-xs font-bold uppercase tracking-[0.2em] text-[var(--feature-color)] hover:text-white transition-colors",children:"Reset filters"})]}),c.jsxs("p",{className:"mt-16 text-xs font-bold uppercase tracking-[0.25em] text-white/40",children:["Portfolio current as of ",new Date().toLocaleDateString("en-US",{month:"long",year:"numeric"})]})]})})}function ch({label:t,value:e,options:n,onChange:r,testid:s,labelFor:i}){const a=m=>m==="All"?"All":i?i(m):m,[l,d]=N.useState(!1),h=N.useRef(null),p=e!=="All";return N.useEffect(()=>{if(!l)return;const m=x=>{h.current&&!h.current.contains(x.target)&&d(!1)},g=x=>{x.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",g)}},[l]),c.jsxs("div",{ref:h,className:"relative",children:[c.jsxs("button",{type:"button","data-testid":s,onClick:()=>d(m=>!m),className:`flex items-center gap-2 px-4 py-2 text-xs font-bold uppercase tracking-[0.2em] border transition-colors ${p?"bg-[#003320] border-[#003320] text-white":"border-border text-white/70 hover:text-white hover:border-white/40"}`,children:[c.jsxs("span",{className:p?"text-white/60":"text-white/40",children:[t,":"]}),c.jsx("span",{children:a(e)}),c.jsx(Ql,{size:14,className:`transition-transform ${l?"rotate-180":""}`})]}),l&&c.jsx("div",{className:"absolute top-full left-0 mt-1 z-30 min-w-[180px] bg-background border border-border shadow-[0_8px_30px_rgba(0,0,0,0.6)] py-1",role:"listbox",children:["All",...n].map(m=>{const g=m===e;return c.jsx("button",{type:"button",role:"option","aria-selected":g,"data-testid":s?`${s}-option-${m.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`:void 0,onClick:()=>{r(m),d(!1)},className:`w-full text-left px-4 py-2.5 text-xs font-bold uppercase tracking-[0.2em] transition-colors ${g?"bg-[var(--feature-color)] text-[#003320]":"text-white/70 hover:bg-white/5 hover:text-white"}`,title:a(m),children:a(m)},m)})})]})}function rae({value:t,onChange:e,testid:n}){const[r,s]=N.useState(!1),i=N.useRef(null),a=Qv.find(l=>l.key===t)??Qv[0];return N.useEffect(()=>{if(!r)return;const l=h=>{i.current&&!i.current.contains(h.target)&&s(!1)},d=h=>{h.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",d)}},[r]),c.jsxs("div",{ref:i,className:"relative",children:[c.jsxs("button",{type:"button","data-testid":n,onClick:()=>s(l=>!l),className:"flex items-center gap-2 px-4 py-2 text-xs font-bold uppercase tracking-[0.2em] border border-border text-white/70 hover:text-white hover:border-white/40 transition-colors",children:[c.jsx("span",{className:"text-white/40",children:"Sort:"}),c.jsx("span",{children:a.label}),c.jsx(Ql,{size:14,className:`transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"absolute top-full right-0 mt-1 z-30 min-w-[240px] bg-background border border-border shadow-[0_8px_30px_rgba(0,0,0,0.6)] py-1",role:"listbox",children:Qv.map(l=>{const d=l.key===t;return c.jsx("button",{type:"button",role:"option","aria-selected":d,"data-testid":n?`${n}-option-${l.key}`:void 0,onClick:()=>{e(l.key),s(!1)},className:`w-full text-left px-4 py-2.5 text-xs font-bold uppercase tracking-[0.2em] transition-colors ${d?"bg-[var(--feature-color)] text-[#003320]":"text-white/70 hover:bg-white/5 hover:text-white"}`,children:l.label},l.key)})})]})}function sae({co:t,delay:e}){const[n,r]=N.useState(!1),s=t.status==="Terminated",i=!s&&!!(t.websiteUrl&&t.websiteUrl!=="#"),a=!s&&t.openJobCount>0,l=s&&n?"text-white/70":"",d=s&&n?"text-white/60":"text-white/80",h=s&&n?"text-white/45":"text-white/60";return c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{delay:e},onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),style:{filter:s?"grayscale(0.85)":void 0,opacity:s?.72:1},className:"bg-background flex flex-col p-8 md:p-10 min-h-[340px] relative overflow-hidden transition-opacity","data-testid":`company-card-${t.slug}`,children:[t.imageUrl&&c.jsx("img",{src:t.imageUrl,alt:"",loading:"lazy","aria-hidden":"true",style:{opacity:n?s?.75:1:.5,transform:n?"scale(1)":"scale(1.1)"},className:"absolute inset-0 w-full h-full object-cover transition-all duration-700 ease-out pointer-events-none"}),c.jsx("div",{"aria-hidden":"true",style:{backgroundColor:n?s?"hsl(0 0% 2% / 0.70)":"hsl(0 0% 2% / 0.25)":"hsl(0 0% 2% / 0.60)"},className:"absolute inset-0 transition-colors duration-700 pointer-events-none"}),c.jsx("div",{"aria-hidden":"true",style:{opacity:n?1:0},className:"absolute inset-x-0 bottom-0 h-2/3 bg-gradient-to-t from-black/70 to-transparent transition-opacity duration-700 pointer-events-none"}),c.jsxs("div",{className:"relative z-10 flex flex-col h-full",children:[t.logoUrl&&c.jsx("img",{src:t.logoUrl,alt:`${t.name} logo`,className:"absolute top-0 right-0 h-10 w-auto max-w-[140px] object-contain object-right brightness-0 invert",loading:"lazy"}),c.jsxs("div",{className:"flex-1 pt-16",children:[c.jsx("h3",{className:`text-2xl md:text-3xl font-black uppercase tracking-tight leading-tight mb-2 transition-colors duration-500 ${l}`,children:t.name}),t.tagline&&c.jsx("p",{className:`text-base md:text-lg leading-snug mb-4 transition-colors duration-500 ${d}`,children:t.tagline}
31),t.shortDescription&&c.jsx("p",{className:`text-sm leading-relaxed line-clamp-3 pr-0 transition-colors duration-500 ${h}`,children:t.shortDescription})]}),c.jsxs("div",{className:"mt-6 pt-4 border-t border-white/10 flex flex-wrap items-center gap-x-4 gap-y-2 text-[10px] font-bold uppercase tracking-[0.2em] text-white/50",children:[t.sector&&c.jsx("span",{children:J4(t.sector)}),t.country&&c.jsxs("span",{children:["· ",t.country]}),t.stage&&c.jsxs("span",{children:["· ",t.stage]}),t.fundedAt&&c.jsxs("span",{children:["· Funded"," ",new Date(t.fundedAt).toLocaleDateString("en-US",{month:"short",year:"numeric"})]}),s&&c.jsx("span",{className:"text-white/40",children:"· Terminated"})]}),(i||a)&&c.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[i&&c.jsxs("a",{href:t.websiteUrl,target:"_blank",rel:"noopener noreferrer","data-testid":`company-website-${t.slug}`,className:"inline-flex items-center gap-1 text-xs font-bold uppercase tracking-[0.2em] text-[var(--feature-color)] hover:text-white transition-colors",children:["Visit site ",c.jsx(AP,{size:12})]}),a&&c.jsxs(Qe,{href:`/careers?companySlug=${encodeURIComponent(t.slug)}`,"data-testid":`company-jobs-${t.slug}`,className:"inline-flex items-center gap-1 text-xs font-bold uppercase tracking-[0.2em] text-[var(--feature-color)] hover:text-white transition-colors",children:[c.jsx(Ru,{size:12})," ",t.openJobCount," open role",t.openJobCount===1?"":"s"]})]})]})]})}const iae="Across Singapore · Indonesia · Philippines · Australia · New Zealand";function aae(){ns({title:"Team",description:"Meet the 100x100 team — the operators, investors, and builders behind Southeast Asia's leading climate company builder and fund."});const{data:t,isLoading:e,error:n}=FG(),{data:r}=HG();if(e)return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32 flex items-center justify-center",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-white/40"})});if(n||!t)return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsx("div",{className:"container mx-auto px-6 max-w-3xl",children:c.jsxs("div",{className:"flex items-center gap-2 text-white/60 text-sm",children:[c.jsx(kt,{className:"w-4 h-4"})," Couldn’t load the team right now."]})})});const s=t.sections.filter(a=>a.members.length>0),i=s.reduce((a,l)=>a+l.members.length,0)+t.unassigned.length;return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsxs("div",{className:"mb-20",children:[c.jsxs("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-6",children:[i," operators · 1 mission"]}),c.jsx("h1",{className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-8 break-words",children:"The Team"}),c.jsx("p",{className:"text-xl md:text-2xl text-white/70 max-w-3xl leading-snug",children:"Founders, operators and engineers who have built and exited businesses across Asia Pacific. We co-found, co-build, and stand alongside our portfolio companies from day zero."}),c.jsx("p",{className:"mt-6 text-xs font-bold uppercase tracking-[0.25em] text-white/40",children:r?.geoLine??iae})]}),s.map(a=>c.jsxs("section",{className:"mb-24 last:mb-0",children:[c.jsxs("div",{className:"flex items-baseline gap-6 mb-12 pb-6 border-b border-border",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-black uppercase tracking-tight",children:a.title}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.25em] text-white/40",children:String(a.members.length).padStart(2,"0")})]}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-16",children:a.members.map((l,d)=>c.jsx(oae,{m:l,delay:Math.min(d*.05,.4)},l.id))})]},a.id))]})})}function oae({m:t,delay:e}){const[n,r]=N.useState(!1),s=t.name.split(/\s+/).map(i=>i[0]).filter(Boolean).slice(0,2).join("").toUpperCase();return c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{delay:e},onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),className:"flex flex-col","data-testid":`team-card-${t.id}`,children:[c.jsxs("div",{className:"relative aspect-[3/4] overflow-hidden bg-card mb-5",children:[t.photoUrl?c.jsx("img",{src:t.photoUrl,alt:t.name,loading:"lazy",style:{filter:n?"grayscale(0)":"grayscale(1)",transform:n?"scale(1.05)":"scale(1)"},className:"w-full h-full object-cover transition-all duration-700 ease-out"}):c.jsx("div",{className:"w-full h-full flex items-center justify-center bg-[#003320] text-[var(--feature-color)] text-5xl font-black tracking-tighter uppercase",children:s}),c.jsx("div",{"aria-hidden":"true",style:{opacity:n?0:1}
31,className:"absolute inset-0 bg-gradient-to-t from-[#003320]/60 via-transparent to-transparent transition-opacity duration-700 mix-blend-multiply pointer-events-none"})]}),c.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[c.jsx("h3",{className:"text-xl md:text-2xl font-black uppercase tracking-tight leading-tight",children:t.name}),t.linkedinUrl&&c.jsx("a",{href:t.linkedinUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`${t.name} on LinkedIn`,className:"shrink-0 text-white/40 hover:text-[var(--feature-color)] transition-colors mt-1",children:c.jsx(IP,{size:16,strokeWidth:2})})]}),(t.position||t.location)&&c.jsxs("div",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-[var(--feature-color)] mb-3",children:[t.position,t.position&&t.location&&c.jsx("span",{className:"text-white/40",children:" · "}),t.location&&c.jsx("span",{className:"text-white/60",children:t.location})]}),t.bio&&c.jsx("p",{className:"text-sm text-white/65 leading-relaxed",children:t.bio})]})}const ul={hero:{line1:"The biggest",line2:"emissions are the",highlight:"biggest opportunities."},intro:"We don't invest in green premium, we look for green discount. For climate tech to scale, it must be cheaper and better than the existing fossil alternative. We build companies that win on unit economics first, carbon second.",thesis:{eyebrow:"Our thesis.",statement:"We build climate companies that have the potential to generate $100M in revenue and abate 100MT of CO₂e."},principles:{heading:"",subheading:"",items:[{num:"01",title:"We hunt where the capital isn't",desc:"Southeast and South Asia hold a disproportionate share of the world's unabated emissions but attract a fraction of global climate capital. We create opportunities that can become investable options for others after us.",example:null},{num:"02",title:"No science risk. Revenue in the first quarter.",desc:"We back solutions where the underlying technology is proven. We accept product development and engineering risk, but not fundamental science bets. This means every company we build can generate its first revenue within 90 days of launch, and grow from a real commercial foundation, not a research roadmap.",example:null},{num:"03",title:"Large existing markets, not invent new ones",desc:"We target massive, proven demand where incumbents are inefficient. Our companies offer a fundamentally different product or business model to an existing buyer base, reducing demand risk, shortening sales cycles, and accelerating the path to scale. The market exists. We just serve it better.",example:null},{num:"04",title:"Moat = technology + business model innovation",desc:"Our companies are not defensible because of IP alone. They win through technology-enabled operations combined with business model innovation, making the entire system hard to replicate. Software creates leverage; the business model creates lock-in. Together they build a durable competitive position.",example:null},{num:"05",title:"We co-found. We don't just back.",desc:"We originate the thesis, recruit exceptional founders, then help run operations shoulder-to-shoulder for the first 18 months, supporting commercial access, supply chains, offtake, financial rigour, and regional market knowledge that help founders go faster. We take 30% equity because we earn it.",example:null},{num:"06",title:"Impact comes with financial success.",desc:"Every company we back must credibly be capable of reaching $100M revenue and 100MT CO₂e abatement at scale. Not all will succeed, we need one breakout success, or five companies each delivering 20% of the target or any number in between. This gives us the discipline of a hard per-company screen with the resilience of diversified portfolio construction.",example:null}]},metrics:{eyebrow:"The math",heading:"",subheading:"",items:[{label:"Revenue target per company",value:"$100M",sub:"annual, at scale"},{label:"Abatement target per company",value:"100MT",sub:"of CO₂e"},{label:"Ownership per company",value:"30%",sub:""},{label:"Follow-on invest",value:"Series B",sub:"we invest through to"}
31]},womenCommitment:{heading:"Our commitment to women leaders and founders",stats:[{value:"25%",label:"Target for women founders"},{value:"50%",label:"Women across our team"}],paragraphs:["We believe that the strongest companies are built by teams that bring together different experiences, perspectives, and capabilities. We are committed to creating equal opportunities for talented entrepreneurs and professionals and to supporting merit-based advancement across our organization and portfolio.","Today we see more men starting businesses and raising capital. We want to see more women founding companies, leading businesses, sitting on boards — and we're actively working to make that happen.","We are active members of 2X Global and signatories of the IIX Orange Pledge for gender lens investing. We partner, mentor, and show up."],partners:[{name:"2X Global",logoUrl:"/logo-2x-global.png",websiteUrl:"https://www.2xglobal.org"},{name:"IIX Orange Pledge",logoUrl:"/logo-iix.png",websiteUrl:"https://iixglobal.com"}]}};function lae(){ns({title:"Thesis",description:"Our investment thesis: why Southeast Asia is where the most impactful climate companies will be built, and how 100x100 is building them."});const{data:t}=fZ(),e=t,n={...e,hero:e?.hero??ul.hero,intro:e?.intro??ul.intro,thesis:e?.thesis??ul.thesis,principles:e?.principles??ul.principles,metrics:e?.metrics??ul.metrics,womenCommitment:e?.womenCommitment??ul.womenCommitment},r=n.womenCommitment??ul.womenCommitment;return c.jsxs("div",{className:"bg-background min-h-screen text-foreground pt-32",children:[c.jsxs("div",{className:"container mx-auto px-6 max-w-5xl pb-32",children:[c.jsxs("h1",{className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-12",children:[n.hero.line1,c.jsx("br",{}),n.hero.line2," ",c.jsx("span",{className:"text-[var(--feature-color)]",children:n.hero.highlight})]}),c.jsx("p",{className:"text-xl md:text-2xl font-medium leading-relaxed mb-24 border-l-4 border-[var(--feature-color)] pl-8 text-white/70",children:n.intro}),c.jsxs("div",{className:"mb-12 border-t border-border pt-12",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-3",children:n.thesis.eyebrow}),c.jsx("p",{className:"text-2xl md:text-3xl font-medium text-white/85 leading-snug max-w-3xl",children:n.thesis.statement})]}),(n.principles.heading||n.principles.subheading)&&c.jsxs("div",{className:"mb-10",children:[n.principles.heading&&c.jsx("h2",{className:"text-3xl md:text-5xl font-black uppercase tracking-tighter mb-3",children:n.principles.heading}),n.principles.subheading&&c.jsx("p",{className:"text-lg md:text-xl text-white/60 max-w-3xl leading-relaxed",children:n.principles.subheading})]}),c.jsx("div",{className:"space-y-5 mb-24",children:n.principles.items.map((s,i)=>{const a=i%2===1;return c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{delay:Math.min(i*.05,.3)},className:"group relative p-6 md:p-8 grid grid-cols-[auto_1fr] gap-6 md:gap-8 transition-colors duration-300",style:{backgroundColor:a?"color-mix(in srgb, var(--feature-color) 22%, transparent)":void 0,border:a?"1px solid color-mix(in srgb, var(--feature-color) 30%, transparent)":"1px solid rgba(255,255,255,0.32)"},children:[c.jsx("span",{"aria-hidden":!0,className:`absolute left-0 top-0 bottom-0 w-[3px] scale-y-0 group-hover:scale-y-100 origin-top transition-transform duration-300 ${a?"bg-white/60":"bg-[var(--feature-color)]"}`}),c.jsx("div",{className:"font-black text-3xl md:text-4xl tabular-nums leading-none pt-1",style:{color:a?"white":"var(--feature-color)"},children:s.num}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-xl md:text-2xl font-black uppercase tracking-tight mb-3 leading-tight",children:s.title}),c.jsx("p",{className:`text-base md:text-lg leading-relaxed ${a?"text-white/80":"text-white/70"}`,children:s.desc}),s.example&&c.jsx("p",{className:"mt-4 text-sm md:text-base text-white/50 italic leading-relaxed border-l-2 border-[var(--feature-color)]/40 pl-4",children:s.example})]})]},s.num+i)})}),c.jsxs("div",{className:"border-t border-border pt-12",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-white/50 mb-3",children:n.metrics.eyebrow}),n.metrics.heading&&c.jsx("h2",{className:"text-3xl md:text-5xl font-black uppercase tracking-tighter mb-3",children:n.metrics.heading}),n.metrics.subheading&&c.jsx("p",{className:"text-lg md:text-xl text-white/60 max-w-3xl leading-relaxed mb-6",children:n.metrics.subheading}),c.jsx("div",{className:"mt-8 grid md:grid-cols-2 lg:grid-cols-4 gap-px bg-border",children:n.metrics.items.map((s,i)=>c.jsxs(Ue.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.08},className:"bg-background p-8 md:p-10",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-white/60 mb-4",children:s.label}),c.jsx("p",{className:"text-5xl md:text-6xl font-black text-[var(--feature-color)] tracking-tighter mb-2 leading-none",children:s.value}),s.sub&&c.jsx("p",{className:"text-sm text-white/50",children:s.sub})]},i))})]})]}),c.jsx(cae,{section:r})]})}function cae({section:t}){return c.jsx("div",{className:"bg-[#0a1a14] py-24 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-6xl",children:[c.jsx("p",{className:"text-[var(--feature-color)] text-xs font-bold uppercase tracking-[0.3em] mb-8",children:"Women in Climate"}),c.jsx(Ue.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl xl:text-6xl font-black uppercase tracking-tighter leading-none max-w-4xl mb-16",children:t.heading}),t.stats&&t.stats.length>0&&c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 mb-16",children:t.stats.map((e,n)=>c.jsxs(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:n*.08},children:[c.jsx("div",{className:"text-5xl md:text-7xl font-black text-[var(--feature-color)] leading-none mb-3",children:e.value}),c.jsx("div",{className:"text-white/60 text-sm uppercase tracking-widest leading-snug",children:e.label})]},n))}),t.paragraphs.length>0&&c.jsx("div",{className:"max-w-3xl space-y-5 mb-16",children:t.paragraphs.map((e,n)=>c.jsx(Ue.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:n*.05},className:"text-white/70 text-lg leading-relaxed",children:e},n))}),t.partners.length>0&&c.jsx("div",{className:"flex flex-wrap items-center gap-10",children:t.partners.map((e,n)=>{const r=c.jsx("img",{src:e.logoUrl,alt:e.name,className:"h-8 object-contain brightness-0 invert opacity-70 hover:opacity-100 transition-opacity"});return e.websiteUrl?c.jsx("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",children:r},n):c.jsx("span",{children:r},n)})})]})})}const uae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Xv=48;function dae(t){const e=new Date(t);return`${uae[e.getMonth()]} ${e.getFullYear()}`}const hae=["News","Insights"];function fae(){ns({title:"Stories",description:"News, insights, and perspectives from 100x100 — Southeast Asia's climate company builder and fund."});const{data:t,isLoading:e,isError:n}=XL(),{data:r}=MX(),[s,i]=N.useState(""),[a,l]=N.useState("All"),[d,h]=N.useState(1);N.useEffect(()=>{h(1)},[s,a]);const p=N.useMemo(()=>{const S=(Array.isArray(t)?t:[]).slice().sort((j,E)=>Date.parse(E.publishedAt)-Date.parse(j.publishedAt)),C=s.trim().toLowerCase();return S.filter(j=>{const E=a==="All"||j.category===a,A=!C||j.title.toLowerCase().includes(C)||j.category.toLowerCase().includes(C);return E&&A})},[t,s,a]),m=Array.isArray(t)?t.length:0,g=Math.max(1,Math.ceil(p.length/Xv)),x=p.slice((d-1)*Xv,d*Xv);return e?c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32 flex items-center justify-center",children:c.jsx(Be,{className:"text-[var(--feature-color)] animate-spin",size:32})}):n?c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsxs("h1",{className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-12 break-words",children:["Stories, news",c.jsx("br",{}),"& insights"]}),c.jsx("p",{className:"text-white/70 text-lg",children:"We couldn't load stories right now. Please try again."})]})}):c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsxs("h1",{className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-6 break-words",children:["Stories, news",c.jsx("br",{}),"& insights"]}),r?.subtitle&&c.jsx("p",{className:"text-white/60 text-xl md:text-2xl max-w-2xl mb-10 leading-snug",children:r.subtitle}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-12",children:[c.jsxs("button",{type:"button",onClick:()=>l("All"),className:`px-4 py-2 text-xs font-bold uppercase tracking-[0.2em] transition-colors ${a==="All"?"bg-[var(--feature-color)] text-[#003320]":"border border-border text-white/70 hover:text-white hover:border-white/40"}`,children:["All · ",m]}
31),hae.map(v=>{const S=(Array.isArray(t)?t:[]).filter(j=>j.category===v).length,C=a===v;return c.jsxs("button",{type:"button",onClick:()=>l(C?"All":v),className:`px-4 py-2 text-xs font-bold uppercase tracking-[0.2em] transition-colors ${C?"bg-[var(--feature-color)] text-[#003320]":"border border-border text-white/70 hover:text-white hover:border-white/40"}`,children:[v," · ",S]},v)}),c.jsx("div",{className:"flex-1 flex justify-end",children:c.jsxs("div",{className:"relative w-full max-w-xs",children:[c.jsx(Uf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-white/40 pointer-events-none"}),c.jsx("input",{type:"search",value:s,onChange:v=>i(v.target.value),placeholder:"Search stories…",className:"w-full bg-transparent border border-border pl-9 pr-8 py-2 text-xs font-bold uppercase tracking-[0.15em] placeholder:text-white/30 text-white focus:outline-none focus:border-white/40 transition-colors"}),s&&c.jsx("button",{type:"button",onClick:()=>i(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/40 hover:text-white transition-colors","aria-label":"Clear search",children:c.jsx(Zs,{size:12})})]})})]}),p.length===0&&c.jsxs("div",{className:"border border-border py-24 text-center",children:[c.jsx("p",{className:"text-white/60 uppercase tracking-[0.2em] text-sm font-bold mb-4",children:"No stories match your search"}),c.jsx("button",{type:"button",onClick:()=>{i(""),l("All")},className:"text-xs font-bold uppercase tracking-[0.2em] text-[var(--feature-color)] hover:text-white transition-colors",children:"Clear filters"})]}),x.length>0&&c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-x-10 gap-y-16",children:x.map((v,S)=>c.jsx(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:Math.min(S*.04,.4)},children:c.jsxs(Qe,{href:`/stories/${v.slug}`,className:"group block",children:[c.jsxs("div",{className:"relative aspect-[4/3] bg-card overflow-hidden mb-4",children:[v.coverImageUrl&&c.jsx("img",{src:v.coverImageUrl,alt:v.title,loading:"lazy",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-700 ease-out group-hover:scale-110",onError:C=>{C.currentTarget.style.display="none"}}),c.jsx("span",{className:"absolute top-4 right-4 inline-flex items-center border-b border-white pb-0.5 text-xs font-bold uppercase tracking-[0.2em] text-white px-2 pt-1 bg-black/50 backdrop-blur-sm",children:v.category})]}),c.jsx("div",{className:"flex items-center justify-end mb-3",children:c.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-white/60",children:dae(v.publishedAt)})}),c.jsx("h3",{className:"text-[18px] font-black capitalize tracking-tight leading-tight group-hover:text-[var(--feature-color)] transition-colors",children:v.title})]})},v.slug))}),g>1&&c.jsxs("div",{className:"flex items-center justify-between mt-20 border-t border-border pt-10",children:[c.jsxs("button",{type:"button",onClick:()=>h(v=>Math.max(1,v-1)),disabled:d===1,className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white transition-colors disabled:opacity-25 disabled:pointer-events-none",children:[c.jsx(OP,{size:16}),"Previous"]}),c.jsxs("span",{className:"text-xs font-bold uppercase tracking-[0.2em] text-white/40",children:["Page ",d," of ",g]}),c.jsxs("button",{type:"button",onClick:()=>h(v=>Math.min(g,v+1)),disabled:d===g,className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white transition-colors disabled:opacity-25 disabled:pointer-events-none",children:["Next",c.jsx(ik,{size:16})]})]})]})})}const pae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z4(t){const e=new Date(t);return`${e.getDate()} ${pae[e.getMonth()]} ${e.getFullYear()}`}function mae(t){const n=new DOMParser().parseFromString(t,"text/html"),r=Array.from(n.querySelectorAll("a"));let s=null;for(const i of r){const a=(i.textContent??"").trim().toLowerCase(),l=(i.getAttribute("href")??"").toLowerCase();if(a==="download"||l.endsWith(".pdf")){s=i.getAttribute("href");const d=i.parentElement;i.remove(),d&&d.tagName==="P"&&!(d.textContent??"").trim()&&d.remove();break}}return{downloadUrl:s,cleanHtml:n.body.innerHTML}}function gae({story:t}){const{downloadUrl:e,cleanHtml:n}=mae(t.bodyHtml),r=e??t.sourceUrl??null;return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-20 pb-20",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-4xl",children:[c.jsxs(Qe,{href:"/stories",className:"inline-flex items-center gap-2 text-white/60 hover:text-[var(--feature-color)] transition-colors mb-6 text-xs font-bold uppercase tracking-[0.2em]",children:[c.jsx(ws,{className:"w-3.5 h-3.5"}),"Stories"]}),c.jsx(Ue.h1,{initial:{opacity:0,y:16}
31,animate:{opacity:1,y:0},className:"text-2xl md:text-3xl lg:text-4xl font-black capitalize tracking-tighter leading-[1.05] max-w-4xl mb-3",children:t.title}),c.jsxs("div",{className:"flex items-center gap-6 mb-8 text-xs font-bold uppercase tracking-[0.2em] text-white/50",children:[c.jsx("span",{className:"text-[var(--feature-color)]",children:t.category}),c.jsx("span",{children:Z4(t.publishedAt)})]}),c.jsxs("div",{className:"grid lg:grid-cols-[2fr_3fr] gap-8 xl:gap-14 items-start",children:[c.jsxs(Ue.div,{initial:{opacity:0,x:-16},animate:{opacity:1,x:0},transition:{delay:.1},className:"lg:sticky lg:top-20",children:[t.coverImageUrl?c.jsx("img",{src:t.coverImageUrl,alt:t.title,className:"w-full object-cover shadow-[0_8px_40px_rgba(0,0,0,0.5)]",style:{aspectRatio:"1 / 1.414"}}):c.jsx("div",{className:"w-full bg-card border border-border flex items-center justify-center",style:{aspectRatio:"1 / 1.414"},children:c.jsx("span",{className:"text-white/20 text-xs font-bold uppercase tracking-widest",children:"No cover"})}),r&&c.jsx("div",{className:"mt-5",children:c.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-3 border-b border-white/40 pb-2 text-sm font-bold uppercase tracking-[0.25em] text-white hover:text-[var(--feature-color)] hover:border-[var(--feature-color)] transition-colors",children:[c.jsx(RP,{size:15,className:"transition-transform group-hover:translate-y-0.5"}),"Download",c.jsx(sf,{size:15,className:"transition-transform group-hover:translate-x-1"})]})})]}),c.jsxs(Ue.article,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.15},children:[c.jsx("div",{className:`
32                prose prose-invert prose-base max-w-none
33                prose-headings:font-black prose-headings:capitalize prose-headings:tracking-tight
34                prose-h2:text-xl prose-h2:mt-8 prose-h2:mb-3
35                prose-h3:text-lg prose-h3:mt-6 prose-h3:mb-2
36                prose-p:text-white/80 prose-p:leading-relaxed prose-p:text-justify
37                prose-strong:text-white
38                prose-a:text-[var(--feature-color)] prose-a:no-underline hover:prose-a:underline
39                prose-li:text-white/80
40                prose-img:rounded-none prose-img:my-6 prose-img:w-full
41                prose-blockquote:border-l-[var(--feature-color)] prose-blockquote:text-white/80
42                prose-hr:border-border
43              `,dangerouslySetInnerHTML:{__html:n}}),c.jsx("div",{className:"mt-10 pt-8 border-t border-border",children:c.jsxs(Qe,{href:"/stories",className:"inline-flex items-center gap-2 text-[var(--feature-color)] font-bold uppercase tracking-widest hover:text-white transition-colors text-sm",children:[c.jsx(ws,{className:"w-4 h-4"}),"Back to Stories"]})})]})]})]})})}function yae(){const[,t]=h6("/stories/:slug"),e=t?.slug??"",{data:n,isLoading:r,isError:s}=$X(e),{data:i}=XL();if(ns({title:n?n.title:"Story",description:n?.excerpt??void 0}),N.useEffect(()=>{if(!n)return;const l=document.getElementById("story-ld-json");l&&l.remove();const d=document.createElement("script");return d.id="story-ld-json",d.type="application/ld+json",d.text=JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:n.title,...n.excerpt?{description:n.excerpt}:{},...n.coverImageUrl?{image:n.coverImageUrl}:{},datePublished:n.publishedAt,url:`https://www.100x100.com/stories/${n.slug}`,publisher:{"@type":"Organization",name:"100x100",url:"https://www.100x100.com",logo:"https://www.100x100.com/favicon.png"}}),document.head.appendChild(d),()=>{document.getElementById("story-ld-json")?.remove()}},[n]),r)return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32 flex items-center justify-center",children:c.jsx(Be,{className:"text-[var(--feature-color)] animate-spin",size:32})});if(s||!n)return c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-4xl text-center",children:[c.jsx("h1",{className:"text-5xl md:text-6xl font-black uppercase tracking-tighter mb-6",children:"Story not found"}),c.jsx("p",{className:"text-white/70 mb-10",children:"The story you're looking for doesn't exist or may have been moved."}),c.jsxs(Qe,{href:"/stories",className:"inline-flex items-center gap-2 text-[var(--feature-color)] font-bold uppercase tracking-widest hover:text-white transition-colors",children:[c.jsx(ws,{className:"w-4 h-4"}),"Back to Journal"]})]})});const a=(Array.isArray(i)?i:[]).filter(l=>l.slug!==n.slug).slice(0,3);return n.category==="Insights"?c.jsxs(c.Fragment,{children:[c.jsx(gae,{story:n}),c.jsx(nO,{more:a})]}):c.jsxs("div",{className:"bg-background min-h-screen text-foreground pt-20 pb-20",children:[c.jsxs("div",{className:"container mx-auto px-6 max-w-3xl",children:[c.jsxs(Qe,{href:"/stories",className:"inline-flex items-center gap-2 text-white/60 hover:text-[var(--feature-color)] transition-colors mb-6 text-xs font-bold uppercase tracking-[0.2em]",children:[c.jsx(ws,{className:"w-3.5 h-3.5"}),"Stories"]}),c.jsxs("div",{className:"flex items-center gap-6 mb-4 text-xs font-bold uppercase tracking-[0.2em]",children:[c.jsx("span",{className:"text-[var(--feature-color)]",children:n.category}),c.jsx("span",{className:"text-white/50",children:Z4(n.publishedAt)})]}),c.jsx(Ue.h1,{initial:{opacity:0,y:16}
43,animate:{opacity:1,y:0},className:"text-2xl md:text-4xl font-black capitalize tracking-tighter leading-[1.05] mb-6",children:n.title}),n.coverImageUrl&&c.jsx(Ue.img,{src:n.coverImageUrl,alt:n.title,className:"w-full object-cover mb-8",initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.1}}),c.jsxs("article",{children:[c.jsx("div",{className:`
44              prose prose-invert prose-lg max-w-none
45              prose-headings:font-black prose-headings:capitalize prose-headings:tracking-tight
46              prose-h2:text-3xl prose-h2:mt-12 prose-h2:mb-4
47              prose-h3:text-2xl prose-h3:mt-10 prose-h3:mb-3
48              prose-p:text-white/80 prose-p:leading-relaxed
49              prose-strong:text-white
50              prose-a:text-[var(--feature-color)] prose-a:no-underline hover:prose-a:underline
51              prose-li:text-white/80
52              prose-img:rounded-none prose-img:my-8 prose-img:w-full
53              prose-blockquote:border-l-[var(--feature-color)] prose-blockquote:text-white/80
54              prose-hr:border-border
55            `,dangerouslySetInnerHTML:{__html:n.bodyHtml}}),c.jsxs("div",{className:"mt-16 pt-10 border-t border-border flex flex-col md:flex-row gap-4 md:items-center md:justify-between",children:[c.jsxs(Qe,{href:"/stories",className:"inline-flex items-center gap-2 text-[var(--feature-color)] font-bold uppercase tracking-widest hover:text-white transition-colors",children:[c.jsx(ws,{className:"w-4 h-4"}),"Back to Stories"]}),n.sourceUrl&&c.jsxs("a",{href:n.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-white/60 hover:text-[var(--feature-color)] transition-colors text-sm uppercase tracking-widest font-bold",children:["View original",c.jsx(da,{className:"w-4 h-4"})]})]})]})]}),c.jsx("div",{className:"mt-24",children:c.jsx(nO,{more:a})})]})}function nO({more:t}){return t.length===0?null:c.jsx("section",{className:"bg-card/40 border-t border-border py-20",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsx("h2",{className:"text-3xl md:text-5xl font-black capitalize tracking-tighter mb-12",children:"More Stories"}),c.jsx("div",{className:"grid md:grid-cols-3 gap-10",children:t.map(e=>c.jsxs(Qe,{href:`/stories/${e.slug}`,className:"group block",children:[c.jsx("div",{className:"aspect-[4/3] bg-card overflow-hidden mb-5",children:e.coverImageUrl&&c.jsx("img",{src:e.coverImageUrl,alt:e.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),c.jsxs("div",{className:"flex justify-between items-center text-xs font-bold uppercase tracking-widest mb-3",children:[c.jsx("span",{className:"text-[var(--feature-color)]",children:e.category}),c.jsx("span",{className:"text-white/60",children:(()=>{const n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=new Date(e.publishedAt);return`${r.getDate()} ${n[r.getMonth()]} ${r.getFullYear()}`})()})]}),c.jsx("h3",{className:"text-xl font-black capitalize tracking-tight leading-tight group-hover:text-[var(--feature-color)] transition-colors",children:e.title})]},e.slug))})]})})}var Kf=t=>t.type==="checkbox",kl=t=>t instanceof Date,_r=t=>t==null;const eI=t=>typeof t=="object";var wn=t=>!_r(t)&&!Array.isArray(t)&&eI(t)&&!kl(t),xae=t=>wn(t)&&t.target?Kf(t.target)?t.target.checked:t.target.value:t,bae=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,vae=(t,e)=>t.has(bae(e)),wae=t=>{const e=t.constructor&&t.constructor.prototype;return wn(e)&&e.hasOwnProperty("isPrototypeOf")},iC=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tn(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(iC&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(wn(t)&&wae(t)))return t;const r=n?[]:Object.create(Object.getPrototypeOf(t));for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Tn(t[s]));return r}var Nx=t=>/^\w*$/.test(t),Gt=t=>t===void 0,aC=t=>Array.isArray(t)?t.filter(Boolean):[],oC=t=>aC(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(t,e,n)=>{if(!e||!wn(t))return n;const r=(Nx(e)?[e]:oC(e)).reduce((s,i)=>_r(s)?s:s[i],t);return Gt(r)||r===t?Gt(t[e])?n:t[e]:r},mi=t=>typeof t=="boolean",zs=t=>typeof t=="function",Dt=(t,e,n)=>{let r=-1;const s=Nx(e)?[e]:oC(e),i=s.length,a=i-1;for(;++r<i;){const l=s[r];let d=n;if(r!==a){const h=t[l];d=wn(h)||Array.isArray(h)?h:isNaN(+s[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;t[l]=d,t=t[l]}};const rO={BLUR:"blur",FOCUS_OUT:"focusout"},qs={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Yi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Sae=z.createContext(null);Sae.displayName="HookFormControlContext";var kae=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const a=i;return e._proxyFormState[a]!==qs.all&&(e._proxyFormState[a]=!r||qs.all),t[a]}});return s};const Cae=typeof window<"u"?z.useLayoutEffect:z.useEffect;var Jr=t=>typeof t=="string",Nae=(t,e,n,r,s)=>Jr(t)?(r&&e.watch.add(t),Me(n,t,s)):Array.isArray(t)?t.map(i=>
vendor: 6,980 bytes, line 55
55(r&&e.watch.add(i),Me(n,i))):(r&&(e.watchAll=!0),n),q1=t=>_r(t)||!eI(t);function fo(t,e,n=new WeakSet){if(q1(t)||q1(e))return Object.is(t,e);if(kl(t)&&kl(e))return Object.is(t.getTime(),e.getTime());const r=Object.keys(t),s=Object.keys(e);if(r.length!==s.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const i of r){const a=t[i];if(!s.includes(i))return!1;if(i!=="ref"){const l=e[i];if(kl(a)&&kl(l)||wn(a)&&wn(l)||Array.isArray(a)&&Array.isArray(l)?!fo(a,l,n):!Object.is(a,l))return!1}}return!0}const jae=z.createContext(null);jae.displayName="HookFormContext";var tI=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},Bh=t=>Array.isArray(t)?t:[t],sO=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}};function nI(t,e){const n={};for(const r in t)if(t.hasOwnProperty(r)){const s=t[r],i=e[r];if(s&&wn(s)&&i){const a=nI(s,i);wn(a)&&(n[r]=a)}else t[r]&&(n[r]=i)}return n}var yr=t=>wn(t)&&!Object.keys(t).length,lC=t=>t.type==="file",Vg=t=>{if(!iC)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},rI=t=>t.type==="select-multiple",cC=t=>t.type==="radio",Eae=t=>cC(t)||Kf(t),Jv=t=>Vg(t)&&t.isConnected;function Tae(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=Gt(t)?r++:t[e[r++]];return t}function Aae(t){for(const e in t)if(t.hasOwnProperty(e)&&!Gt(t[e]))return!1;return!0}function mn(t,e){const n=Array.isArray(e)?e:Nx(e)?[e]:oC(e),r=n.length===1?t:Tae(t,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(wn(r)&&yr(r)||Array.isArray(r)&&Aae(r))&&mn(t,n.slice(0,-1)),t}var Mae=t=>{for(const e in t)if(zs(t[e]))return!0;return!1};function sI(t){return Array.isArray(t)||wn(t)&&!Mae(t)}function V1(t,e={}){for(const n in t){const r=t[n];sI(r)?(e[n]=Array.isArray(r)?[]:{},V1(r,e[n])):Gt(r)||(e[n]=!0)}return e}function du(t,e,n){n||(n=V1(e));for(const r in t){const s=t[r];if(sI(s))Gt(e)||q1(n[r])?n[r]=V1(s,Array.isArray(s)?[]:{}):du(s,_r(e)?{}:e[r],n[r]);else{const i=e[r];n[r]=!fo(s,i)}}return n}const iO={value:!1,isValid:!1},aO={value:!0,isValid:!0};var iI=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Gt(t[0].attributes.value)?Gt(t[0].value)||t[0].value===""?aO:{value:t[0].value,isValid:!0}:aO:iO}return iO},aI=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Gt(t)?t:e?t===""?NaN:t&&+t:n&&Jr(t)?new Date(t):r?r(t):t;const oO={isValid:!1,value:null};var oI=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,oO):oO;function lO(t){const e=t.ref;return lC(e)?e.files:cC(e)?oI(t.refs).value:rI(e)?[...e.selectedOptions].map(({value:n})=>n):Kf(e)?iI(t.refs).value:aI(Gt(e.value)?t.ref.value:e.value,t)}var Oae=(t,e,n,r)=>{const s={};for(const i of t){const a=Me(e,i);a&&Dt(s,i,a._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},$g=t=>t instanceof RegExp,uh=t=>Gt(t)?t:$g(t)?t.source:wn(t)?$g(t.value)?t.value.source:t.value:t,cO=t=>({isOnSubmit:!t||t===qs.onSubmit,isOnBlur:t===qs.onBlur,isOnChange:t===qs.onChange,isOnAll:t===qs.all,isOnTouch:t===qs.onTouched});const uO="AsyncFunction";var Rae=t=>!!t&&!!t.validate&&!!(zs(t.validate)&&t.validate.constructor.name===uO||wn(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===uO)),Dae=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),dO=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const Fh=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const i=Me(t,s);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&e(a.refs[0],s)&&!r)return!0;if(a.ref&&e(a.ref,a.name)&&!r)return!0;if(Fh(l,e))break}else if(wn(l)&&Fh(l,e))break}}};function hO(t,e,n){const r=Me(t,n);if(r||Nx(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),a=Me(e,i),l=Me(t,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};if(l&&l.root&&l.root.type)return{name:`${i}.root`,error:l.root};s.pop()}return{name:n}}var _ae=(t,e,n,r)=>{n(t);const{name:s,...i}=t;return yr(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(a=>e[a]===(!r||qs.all))},Pae=(t,e,n)=>!t||!e||t===e||Bh(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),Lae=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,Iae=(t,e)=>!aC(Me(t,e)).length&&mn(t,e),Uae=(t,e,n)=>{const r=Bh(Me(t,n));return Dt(r,"root",e[n]),Dt(t,n,r),t};function fO(t,e,n="validate"){if(Jr(t)||Array.isArray(t)&&t.every(Jr)||mi(t)&&!t)return{type:n,message:Jr(t)?t:"",ref:e}}var Kc=t=>wn(t)&&!$g(t)?t:{value:t,message:""},pO=async(t,e,n,r,s,i)=>{const{ref:a,refs:l,required:d,maxLength:h,minLength:p,min:m,max:g,pattern:x,validate:v,name:S,valueAsNumber:C,mount:j}=t._f,E=Me(n,S);if(!j||e.has(S))return{};const A=l?l[0]:a,D=ee=>{s&&A.reportValidity&&(A.setCustomValidity(mi(ee)?"":ee||""),A.reportValidity())},M={},I=cC(a),_=Kf(a),L=I||_,V=(C||lC(a))&&Gt(a.value)&&Gt(E)||Vg(a)&&a.value===""||E===""||Array.isArray(E)&&!E.length,B=tI.bind(null,S,r,M),K=(ee,ie,se,he=Yi.maxLength,$=Yi.minLength)=>{const Q=ee?ie:se;M[S]={type:ee?he:$,message:Q,ref:a,...B(ee?he:$,Q)}};if(i?!Array.isArray(E)||!E.length:d&&(!L&&(V||_r(E))||mi(E)&&!E||_&&!iI(l).isValid||I&&!oI(l).isValid)){const{value:ee,message:ie}=Jr(d)?{value:!!d,message:d}:Kc(d);if(ee&&(M[S]={type:Yi.required,message:ie,ref:A,...B(Yi.required,ie)},!r))return D(ie),M}if(!V&&(!_r(m)||!_r(g))){let ee,ie;const se=Kc(g),he=Kc(m);if(!_r(E)&&!isNaN(E)){const $=a.valueAsNumber||E&&+E;_r(se.value)||(ee=$>se.value),_r(he.value)||(ie=$<he.value)}else{const $=a.valueAsDate||new Date(E),Q=P=>new Date(new Date().toDateString()+" "+P),re=a.type=="time",le=a.type=="week";Jr(se.value)&&E&&(ee=re?Q(E)>Q(se.value):le?E>se.value:$>new Date(se.value)),Jr(he.value)&&E&&(ie=re?Q(E)<Q(he.value):le?E<he.value:$<new Date(he.value))}if((ee||ie)&&(K(!!ee,se.message,he.message,Yi.max,Yi.min),!r))return D(M[S].message),M}if((h||p)&&!V&&(Jr(E)||i&&Array.isArray(E))){const ee=Kc(h),ie=Kc(p),se=!_r(ee.value)&&E.length>+ee.value,he=!_r(ie.value)&&E.length<+ie.value;if((se||he)&&(K(se,ee.message,ie.message),!r))return D(M[S].message),M}if(x&&!V&&Jr(E)){const{value:ee,message:ie}=Kc(x);if($g(ee)&&!E.match(ee)&&(M[S]={type:Yi.pattern,message:ie,ref:a,...B(Yi.pattern,ie)},!r))return D(ie),M}if(v){if(zs(v)){const ee=await v(E,n),ie=fO(ee,A);if(ie&&(M[S]={...ie,...B(Yi.validate,ie.message)},!r))return D(ie.message),M}else if(wn(v)){let ee={};for(const ie in v){if(!yr(ee)&&!r)break;const se=fO(await v[ie](E,n),A,ie);se&&(ee={...se,...B(ie,se.message)},D(se.message),r&&(M[S]=ee))}if(!yr(ee)&&(M[S]={ref:A,...ee},!r))return M}}return D(!0),M}
vendor: 4,316 bytes, line 55
55;const Bae={mode:qs.onSubmit,reValidateMode:qs.onChange,shouldFocusError:!0};function Fae(t={}){let e={...Bae,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:zs(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},s=wn(e.defaultValues)||wn(e.values)?Tn(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:Tn(s),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,h=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...p};let g={...m};const x={array:sO(),state:sO()},v=e.criteriaMode===qs.all,S=F=>W=>{clearTimeout(h),h=setTimeout(F,W)},C=async F=>{if(!a.keepIsValid&&!e.disabled&&(m.isValid||g.isValid||F)){let W;e.resolver?(W=yr((await L()).errors),j()):W=await B(r,!0),W!==n.isValid&&x.state.next({isValid:W})}},j=(F,W)=>{!e.disabled&&(m.isValidating||m.validatingFields||g.isValidating||g.validatingFields)&&((F||Array.from(l.mount)).forEach(ne=>{ne&&(W?Dt(n.validatingFields,ne,W):mn(n.validatingFields,ne))}),x.state.next({validatingFields:n.validatingFields,isValidating:!yr(n.validatingFields)}))},E=(F,W=[],ne,we,ye=!0,pe=!0)=>{if(we&&ne&&!e.disabled){if(a.action=!0,pe&&Array.isArray(Me(r,F))){const Se=ne(Me(r,F),we.argA,we.argB);ye&&Dt(r,F,Se)}if(pe&&Array.isArray(Me(n.errors,F))){const Se=ne(Me(n.errors,F),we.argA,we.argB);ye&&Dt(n.errors,F,Se),Iae(n.errors,F)}if((m.touchedFields||g.touchedFields)&&pe&&Array.isArray(Me(n.touchedFields,F))){const Se=ne(Me(n.touchedFields,F),we.argA,we.argB);ye&&Dt(n.touchedFields,F,Se)}(m.dirtyFields||g.dirtyFields)&&(n.dirtyFields=du(s,i)),x.state.next({name:F,isDirty:ee(F,W),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Dt(i,F,W)},A=(F,W)=>{Dt(n.errors,F,W),x.state.next({errors:n.errors})},D=F=>{n.errors=F,x.state.next({errors:n.errors,isValid:!1})},M=(F,W,ne,we)=>{const ye=Me(r,F);if(ye){const pe=Me(i,F,Gt(ne)?Me(s,F):ne);Gt(pe)||we&&we.defaultChecked||W?Dt(i,F,W?pe:lO(ye._f)):he(F,pe),a.mount&&!a.action&&C()}},I=(F,W,ne,we,ye)=>{let pe=!1,Se=!1;const Ge={name:F};if(!e.disabled){if(!ne||we){(m.isDirty||g.isDirty)&&(Se=n.isDirty,n.isDirty=Ge.isDirty=ee(),pe=Se!==Ge.isDirty);const $e=fo(Me(s,F),W);Se=!!Me(n.dirtyFields,F),$e?mn(n.dirtyFields,F):Dt(n.dirtyFields,F,!0),Ge.dirtyFields=n.dirtyFields,pe=pe||(m.dirtyFields||g.dirtyFields)&&Se!==!$e}if(ne){const $e=Me(n.touchedFields,F);$e||(Dt(n.touchedFields,F,ne),Ge.touchedFields=n.touchedFields,pe=pe||(m.touchedFields||g.touchedFields)&&$e!==ne)}pe&&ye&&x.state.next(Ge)}return pe?Ge:{}},_=(F,W,ne,we)=>{const ye=Me(n.errors,F),pe=(m.isValid||g.isValid)&&mi(W)&&n.isValid!==W;if(e.delayError&&ne?(d=S(()=>A(F,ne)),d(e.delayError)):(clearTimeout(h),d=null,ne?Dt(n.errors,F,ne):mn(n.errors,F)),(ne?!fo(ye,ne):ye)||!yr(we)||pe){const Se={...we,...pe&&mi(W)?{isValid:W}:{},errors:n.errors,name:F};n={...n,...Se},x.state.next(Se)}},L=async F=>(j(F,!0),await e.resolver(i,e.context,Oae(F||l.mount,r,e.criteriaMode,e.shouldUseNativeValidation))),V=async F=>{const{errors:W}=await L(F);if(j(F),F)for(const ne of F){const we=Me(W,ne);we?Dt(n.errors,ne,we):mn(n.errors,ne)}else n.errors=W;return W},B=async(F,W,ne={valid:!0})=>{for(const we in F){const ye=F[we];if(ye){const{_f:pe,...Se}=ye;if(pe){const Ge=l.array.has(pe.name),$e=ye._f&&Rae(ye._f);$e&&m.validatingFields&&j([pe.name],!0);const hn=await pO(ye,l.disabled,i,v,e.shouldUseNativeValidation&&!W,Ge);if($e&&m.validatingFields&&j([pe.name]),hn[pe.name]&&(ne.valid=!1,W||t.shouldUseNativeValidation))break;!W&&(Me(hn,pe.name)?Ge?Uae(n.errors,hn,pe.name):Dt(n.errors,pe.name,hn[pe.name]):mn(n.errors,pe.name))}!yr(Se)&&await B(Se,W,ne)}}return ne.valid},K=()=>{for(const F of l.unMount){const W=Me(r,F);W&&(W._f.refs?W._f.refs.every(ne=>!Jv(ne)):!Jv(W._f.ref))&&Xe(F)}l.unMount=new Set},ee=(F,W)=>!e.disabled&&(F&&W&&Dt(i,F,W),!fo(te(),s)),ie=(F,W,ne)=>Nae(F,l,{...a.mount?i:Gt(W)?s:Jr(F)?{[F]:W}:W},ne,W),se=F=>aC(Me(a.mount?i:s,F,e.shouldUnregister?Me(s,F,[]):[])),he=(F,W,ne={})=>{const we=Me(r,F);let ye=W;if(we){const pe=we._f;pe&&(!pe.disabled&&Dt(i,F,aI(W,pe)),ye=Vg(pe.ref)&&_r(W)?"":W,rI(pe.ref)?[...pe.ref.options].forEac
vendor: 13,203 bytes, line 55
55h(Se=>Se.selected=ye.includes(Se.value)):pe.refs?Kf(pe.ref)?pe.refs.forEach(Se=>{(!Se.defaultChecked||!Se.disabled)&&(Array.isArray(ye)?Se.checked=!!ye.find(Ge=>Ge===Se.value):Se.checked=ye===Se.value||!!ye)}):pe.refs.forEach(Se=>Se.checked=Se.value===ye):lC(pe.ref)?pe.ref.value="":(pe.ref.value=ye,pe.ref.type||x.state.next({name:F,values:Tn(i)})))}(ne.shouldDirty||ne.shouldTouch)&&I(F,ye,ne.shouldTouch,ne.shouldDirty,!0),ne.shouldValidate&&P(F)},$=(F,W,ne)=>{for(const we in W){if(!W.hasOwnProperty(we))return;const ye=W[we],pe=F+"."+we,Se=Me(r,pe);(l.array.has(F)||wn(ye)||Se&&!Se._f)&&!kl(ye)?$(pe,ye,ne):he(pe,ye,ne)}},Q=(F,W,ne={})=>{const we=Me(r,F),ye=l.array.has(F),pe=Tn(W);Dt(i,F,pe),ye?(x.array.next({name:F,values:Tn(i)}),(m.isDirty||m.dirtyFields||g.isDirty||g.dirtyFields)&&ne.shouldDirty&&x.state.next({name:F,dirtyFields:du(s,i),isDirty:ee(F,pe)})):we&&!we._f&&!_r(pe)?$(F,pe,ne):he(F,pe,ne),dO(F,l)?x.state.next({...n,name:F,values:Tn(i)}):x.state.next({name:a.mount?F:void 0,values:Tn(i)})},re=async F=>{a.mount=!0;const W=F.target;let ne=W.name,we=!0;const ye=Me(r,ne),pe=$e=>{we=Number.isNaN($e)||kl($e)&&isNaN($e.getTime())||fo($e,Me(i,ne,$e))},Se=cO(e.mode),Ge=cO(e.reValidateMode);if(ye){let $e,hn;const _n=W.type?lO(ye._f):xae(F),zr=F.type===rO.BLUR||F.type===rO.FOCUS_OUT,ba=!Dae(ye._f)&&!e.resolver&&!Me(n.errors,ne)&&!ye._f.deps||Lae(zr,Me(n.touchedFields,ne),n.isSubmitted,Ge,Se),ni=dO(ne,l,zr);Dt(i,ne,_n),zr?(!W||!W.readOnly)&&(ye._f.onBlur&&ye._f.onBlur(F),d&&d(0)):ye._f.onChange&&ye._f.onChange(F);const hr=I(ne,_n,zr),Mi=!yr(hr)||ni;if(!zr&&x.state.next({name:ne,type:F.type,values:Tn(i)}),ba)return(m.isValid||g.isValid)&&(e.mode==="onBlur"?zr&&C():zr||C()),Mi&&x.state.next({name:ne,...ni?{}:hr});if(!zr&&ni&&x.state.next({...n}),e.resolver){const{errors:ri}=await L([ne]);if(j([ne]),pe(_n),we){const rc=hO(n.errors,r,ne),Fo=hO(ri,r,rc.name||ne);$e=Fo.error,ne=Fo.name,hn=yr(ri)}}else j([ne],!0),$e=(await pO(ye,l.disabled,i,v,e.shouldUseNativeValidation))[ne],j([ne]),pe(_n),we&&($e?hn=!1:(m.isValid||g.isValid)&&(hn=await B(r,!0)));we&&(ye._f.deps&&(!Array.isArray(ye._f.deps)||ye._f.deps.length>0)&&P(ye._f.deps),_(ne,hn,$e,hr))}},le=(F,W)=>{if(Me(n.errors,W)&&F.focus)return F.focus(),1},P=async(F,W={})=>{let ne,we;const ye=Bh(F);if(e.resolver){const pe=await V(Gt(F)?F:ye);ne=yr(pe),we=F?!ye.some(Se=>Me(pe,Se)):ne}else F?(we=(await Promise.all(ye.map(async pe=>{const Se=Me(r,pe);return await B(Se&&Se._f?{[pe]:Se}:Se)}))).every(Boolean),!(!we&&!n.isValid)&&C()):we=ne=await B(r);return x.state.next({...!Jr(F)||(m.isValid||g.isValid)&&ne!==n.isValid?{}:{name:F},...e.resolver||!F?{isValid:ne}:{},errors:n.errors}),W.shouldFocus&&!we&&Fh(r,le,F?ye:l.mount),we},te=(F,W)=>{let ne={...a.mount?i:s};return W&&(ne=nI(W.dirtyFields?n.dirtyFields:n.touchedFields,ne)),Gt(F)?ne:Jr(F)?Me(ne,F):F.map(we=>Me(ne,we))},ue=(F,W)=>({invalid:!!Me((W||n).errors,F),isDirty:!!Me((W||n).dirtyFields,F),error:Me((W||n).errors,F),isValidating:!!Me(n.validatingFields,F),isTouched:!!Me((W||n).touchedFields,F)}),fe=F=>{const W=F?Bh(F):void 0;W?.forEach(ne=>mn(n.errors,ne)),W?W.forEach(ne=>{x.state.next({name:ne,errors:n.errors})}):x.state.next({errors:{}})},ke=(F,W,ne)=>{const we=(Me(r,F,{_f:{}})._f||{}).ref,ye=Me(n.errors,F)||{},{ref:pe,message:Se,type:Ge,...$e}=ye;Dt(n.errors,F,{...$e,...W,ref:we}),x.state.next({name:F,errors:n.errors,isValid:!1}),ne&&ne.shouldFocus&&we&&we.focus&&we.focus()},Pe=(F,W)=>zs(F)?x.state.subscribe({next:ne=>"values"in ne&&F(ie(void 0,W),ne)}):ie(F,W,!0),be=F=>x.state.subscribe({next:W=>{Pae(F.name,W.name,F.exact)&&_ae(W,F.formState||m,nc,F.reRenderRoot)&&F.callback({values:{...i},...n,...W,defaultValues:s})}}).unsubscribe,vt=F=>(a.mount=!0,g={...g,...F.formState},be({...F,formState:{...p,...F.formState}})),Xe=(F,W={})=>{for(const ne of F?Bh(F):l.mount)l.mount.delete(ne),l.array.delete(ne),W.keepValue||(mn(r,ne),mn(i,ne)),!W.keepError&&mn(n.errors,ne),!W.keepDirty&&mn(n.dirtyFields,ne),!W.keepTouched&&mn(n.touchedFields,ne),!W.keepIsValidating&&mn(n.validatingFields,ne),!e.shouldUnregister&&!W.keepDefaultValue&&mn(s,ne);x.state.next({values:Tn(i)}),x.state.next({...n,...W.keepDirty?{isDirty:ee()}:{}}),!W.keepIsValid&&C()},Je=({disabled:F,name:W})=>{if(mi(F)&&a.mount||F||l.disabled.has(W)){const ye=l.disabled.has(W)!==!!F;F?l.disabled.add(W):l.disabled.delete(W),ye&&a.mount&&!a.action&&C()}},Ze=(F,W={})=>{let ne=Me(r,F);const we=mi(W.disabled)||mi(e.disabled);return Dt(r,F,{...ne||{},_f:{...ne&&ne._f?ne._f:{ref:{name:F}},name:F,mount:!0,...W}}),l.mount.add(F),ne?Je({disabled:mi(W.disabled)?W.disabled:e.disabled,name:F}):M(F,!0,W.value),{...we?{disabled:W.disabled||e.disabled}:{},...e.progressive?{required:!!W.required,min:uh(W.min),max:uh(W.max),minLength:uh(W.minLength),maxLength:uh(W.maxLength),pattern:uh(W.pattern)}:{},name:F,onChange:re,onBlur:re,ref:ye=>{if(ye){Ze(F,W),ne=Me(r,F);const pe=Gt(ye.value)&&ye.querySelectorAll&&ye.querySelectorAll("input,select,textarea")[0]||ye,Se=Eae(pe),Ge=ne._f.refs||[];if(Se?Ge.find($e=>$e===pe):pe===ne._f.ref)return;Dt(r,F,{_f:{...ne._f,...Se?{refs:[...Ge.filter(Jv),pe,...Array.isArray(Me(s,F))?[{}]:[]],ref:{type:pe.type,name:F}}:{ref:pe}}}),M(F,!1,void 0,pe)}else ne=Me(r,F,{}),ne._f&&(ne._f.mount=!1),(e.shouldUnregister||W.shouldUnregister)&&!(vae(l.array,F)&&a.action)&&l.unMount.add(F)}}},an=()=>e.shouldFocusError&&Fh(r,le,l.mount),Kt=F=>{mi(F)&&(x.state.next({disabled:F}),Fh(r,(W,ne)=>{const we=Me(r,ne);we&&(W.disabled=we._f.disabled||F,Array.isArray(we._f.refs)&&we._f.refs.forEach(ye=>{ye.disabled=we._f.disabled||F}))},0,!1))},Jt=(F,W)=>async ne=>{let we;ne&&(ne.preventDefault&&ne.preventDefault(),ne.persist&&ne.persist());let ye=Tn(i);if(x.state.next({isSubmitting:!0}),e.resolver){const{errors:pe,values:Se}=await L();j(),n.errors=pe,ye=Tn(Se)}else await B(r);if(l.disabled.size)for(const pe of l.disabled)mn(ye,pe);if(mn(n.errors,"root"),yr(n.errors)){x.state.next({errors:{}});try{await F(ye,ne)}catch(pe){we=pe}}else W&&await W({...n.errors},ne),an(),setTimeout(an);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:yr(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},dn=(F,W={})=>{Me(r,F)&&(Gt(W.defaultValue)?Q(F,Tn(Me(s,F))):(Q(F,W.defaultValue),Dt(s,F,Tn(W.defaultValue))),W.keepTouched||mn(n.touchedFields,F),W.keepDirty||(mn(n.dirtyFields,F),n.isDirty=W.defaultValue?ee(F,Tn(Me(s,F))):ee()),W.keepError||(mn(n.errors,F),m.isValid&&C()),x.state.next({...n}))},Es=(F,W={})=>{const ne=F?Tn(F):s,we=Tn(ne),ye=yr(F),pe=ye?s:we;if(W.keepDefaultValues||(s=ne),!W.keepValues){if(W.keepDirtyValues){const Se=new Set([...l.mount,...Object.keys(du(s,i))]);for(const Ge of Array.from(Se)){const $e=Me(n.dirtyFields,Ge),hn=Me(i,Ge),_n=Me(pe,Ge);$e&&!Gt(hn)?Dt(pe,Ge,hn):!$e&&!Gt(_n)&&Q(Ge,_n)}}else{if(iC&&Gt(F))for(const Se of l.mount){const Ge=Me(r,Se);if(Ge&&Ge._f){const $e=Array.isArray(Ge._f.refs)?Ge._f.refs[0]:Ge._f.ref;if(Vg($e)){const hn=$e.closest("form");if(hn){hn.reset();break}}}}if(W.keepFieldsRef)for(const Se of l.mount)Q(Se,Me(pe,Se));else r={}}i=e.shouldUnregister?W.keepDefaultValues?Tn(s):{}:Tn(pe),x.array.next({values:{...pe}}),x.state.next({values:{...pe}})}l={mount:W.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!m.isValid||!!W.keepIsValid||!!W.keepDirtyValues||!e.shouldUnregister&&!yr(pe),a.watch=!!e.shouldUnregister,a.keepIsValid=!!W.keepIsValid,a.action=!1,W.keepErrors||(n.errors={}),x.state.next({submitCount:W.keepSubmitCount?n.submitCount:0,isDirty:ye?!1:W.keepDirty?n.isDirty:!!(W.keepDefaultValues&&!fo(F,s)),isSubmitted:W.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ye?{}:W.keepDirtyValues?W.keepDefaultValues&&i?du(s,i):n.dirtyFields:W.keepDefaultValues&&F?du(s,F):W.keepDirty?n.dirtyFields:{},touchedFields:W.keepTouched?n.touchedFields:{},errors:W.keepErrors?n.errors:{},isSubmitSuccessful:W.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},Ts=(F,W)=>Es(zs(F)?F(i):F,{...e.resetOptions,...W}),dr=(F,W={})=>{const ne=Me(r,F),we=ne&&ne._f;if(we){const ye=we.refs?we.refs[0]:we.ref;ye.focus&&setTimeout(()=>{ye.focus(),W.shouldSelect&&zs(ye.select)&&ye.select()})}},nc=F=>{n={...n,...F}},Tr={control:{register:Ze,unregister:Xe,getFieldState:ue,handleSubmit:Jt,setError:ke,_subscribe:be,_runSchema:L,_updateIsValidating:j,_focusError:an,_getWatch:ie,_getDirty:ee,_setValid:C,_setFieldArray:E,_setDisabledField:Je,_setErrors:D,_getFieldArray:se,_reset:Es,_resetDefaultValues:()=>zs(e.defaultValues)&&e.defaultValues().then(F=>{Ts(F,e.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:K,_disableForm:Kt,_subjects:x,_proxyFormState:m,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(F){a=F},get _defaultValues(){return s},get _names(){return l},set _names(F){l=F},get _formState(){return n},get _options(){return e},set _options(F){e={...e,...F}}},subscribe:vt,trigger:P,register:Ze,handleSubmit:Jt,watch:Pe,setValue:Q,getValues:te,reset:Ts,resetField:dn,clearErrors:fe,unregister:Xe,setError:ke,setFocus:dr,getFieldState:ue};return{...Tr,formControl:Tr}}function uC(t={}){const e=z.useRef(void 0),n=z.useRef(void 0),[r,s]=z.useState({isDirty:!1,isValidating:!1,isLoading:zs(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:zs(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!zs(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:a,...l}=Fae(t);e.current={...l,formState:r}}const i=e.current.control;return i._options=t,Cae(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),i._formState.isReady=!0,a},[i]),z.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),z.useEffect(()=>{t.mode&&(i._options.mode=t.mode),t.reValidateMode&&(i._options.reValidateMode=t.reValidateMode)},[i,t.mode,t.reValidateMode]),z.useEffect(()=>{t.errors&&(i._setErrors(t.errors),i._focusError())},[i,t.errors]),z.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,t.shouldUnregister]),z.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),z.useEffect(()=>{var a;t.values&&!fo(t.values,n.current)?(i._reset(t.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((a=i._options.resetOptions)===null||a===void 0)&&a.keepIsValid||i._setValid(),n.current=t.values,s(l=>({...l}))):i._resetDefaultValues()},[i,t.values]),z.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=z.useMemo(()=>kae(r,i),[i,r]),e.current}const zae={heading:"Report a concern.",subheading:"We take responsible conduct seriously.",paragraphs:["100x100 is committed to ethical business practices and will endeavour to handle any grievances related to our firm, our team, or our portfolio companies in a fair and timely manner.","Our grievance redressal channel is available for anyone wishing to raise concerns linked to suspected misconduct, fraud, or practices that could cause environmental, social, or ethical harm.","We review every submission thoroughly and treat all information with discretion.","All concerns received through this channel undergo a preliminary assessment. 100x100 reserves the right to dismiss any grievance deemed frivolous or irrelevant."],contactEmail:"[email protected]",contactAddress:["100x100","2b Jiak Chuan Road","Singapore 089260","Attention: Compliance Officer"],privacyNotice:"Information shared through this channel will be handled confidentially and used solely to review and address the concern.",formFields:[{id:"first_name",label:"First name",type:"text",required:!0,placeholder:"Enter your first name",options:[]},{id:"last_name",label:"Last name",type:"text",required:!0,placeholder:"Enter your last name",options:[]},{id:"contact_email",label:"Contact Email",type:"email",required:!0,placeholder:"[email protected]",options:[]},{id:"phone_number",label:"Phone number",type:"tel",required:!1,placeholder:"Include your country code",options:[]},{id:"topic",label:"Topic",type:"text",required:!0,placeholder:"What is your complaint or feedback about?",options:[]},{id:"details",label:"Details of your complaint or feedback",type:"textarea",required:!0,placeholder:"Please provide enough detail for us to review your concern.",options:[]}]};function qae(){const{data:t}=EZ({query:{retry:!1}}),e=t??zae;return ns({title:"Grievance Redressal",description:"100x100 grievance redressal mechanism — raise concerns or complaints related to our portfolio companies or operations in Southeast Asia."}),c.jsx("div",{className:"bg-background min-h-screen text-foreground pt-32 pb-32",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[c.jsx(Ue.p,{initial:{opacity:0,y:10}
55,animate:{opacity:1,y:0},className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-6",children:"Grievance Redressal"}),c.jsx(Ue.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.05},className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black tracking-tighter leading-[0.85] uppercase mb-8 break-words",children:e.heading}),c.jsx(Ue.h2,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-2xl md:text-3xl font-bold uppercase tracking-tight text-white/80 mb-20 max-w-3xl",children:e.subheading}),c.jsxs("div",{className:"grid md:grid-cols-5 gap-12 md:gap-16 mb-24",children:[c.jsx(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"md:col-span-3 space-y-6 text-base md:text-lg leading-relaxed text-white/80",children:e.paragraphs.map((n,r)=>c.jsx("p",{className:"text-white/80",children:n},r))}),c.jsx(Ue.aside,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"md:col-span-2",children:c.jsxs("div",{className:"bg-card border border-border p-8 md:p-10",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-6",children:"Redressal Channel"}),c.jsxs("div",{className:"space-y-7",children:[c.jsxs("div",{className:"flex gap-4",children:[c.jsx(ok,{size:18,className:"text-[var(--feature-color)] mt-1 shrink-0"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.3em] text-white/50 mb-1.5",children:"Email"}),c.jsx("a",{href:`mailto:${e.contactEmail}`,className:"text-base md:text-lg font-bold text-white hover:text-[var(--feature-color)] transition-colors break-words","data-testid":"link-grievance-email",children:e.contactEmail})]})]}),c.jsxs("div",{className:"flex gap-4",children:[c.jsx(lk,{size:18,className:"text-[var(--feature-color)] mt-1 shrink-0"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.3em] text-white/50 mb-1.5",children:"Mail"}),c.jsx("p",{className:"text-sm md:text-base text-white/80 leading-relaxed",children:e.contactAddress.map((n,r)=>c.jsx("span",{className:r>=3?"block mt-2 text-white/60":"block",children:n},r))})]})]})]})]})})]}),e.formFields&&e.formFields.length>0&&c.jsx(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mb-24",children:c.jsx(Vae,{fields:e.formFields})}),c.jsx(Ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"pt-12 border-t border-border max-w-3xl",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx(af,{size:20,className:"text-[var(--feature-color)] mt-1 shrink-0"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-3",children:"Privacy Notice"}),c.jsx("p",{className:"text-base md:text-lg text-white/70 leading-relaxed",children:e.privacyNotice})]})]})})]})})}function Vae({fields:t}){const{register:e,handleSubmit:n,formState:{errors:r},reset:s}=uC(),[i,a]=N.useState(!1),l=OZ(),d=h=>{l.mutate({data:{responses:h}},{onSuccess:()=>{a(!0),s()}})};return i?c.jsxs("div",{className:"bg-card border border-border p-8 md:p-12 text-center max-w-2xl",children:[c.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-[var(--feature-color)]/10 text-[var(--feature-color)] mb-6",children:c.jsx(If,{size:32})}),c.jsx("h3",{className:"text-2xl font-bold uppercase tracking-tight text-white mb-4",children:"Submission Received"}),c.jsx("p",{className:"text-white/70 leading-relaxed max-w-md mx-auto",children:"Thank you for bringing this to our attention. Your concern has been submitted securely and will be reviewed with discretion."}),c.jsx("button",{type:"button",onClick:()=>a(!1),className:"mt-8 px-6 py-3 border border-border text-xs font-bold uppercase tracking-[0.2em] text-white hover:bg-white/5 transition-colors",children:"Submit another"})]}):c.jsxs("div",{className:"max-w-2xl relative",children:[c.jsx("div",{className:"absolute -left-6 top-0 bottom-0 w-[1px] bg-border hidden md:block"}),c.jsxs("div",{className:"mb-10",children:[c.jsx("h3",{className:"text-xl md:text-2xl font-bold uppercase tracking-tight text-white mb-3",children:"Submit a Concern"}),c.jsx("p",{className:"text-white/70",children:"Use the secure form below to provide details. All submissions are treated strictly confidentially."})]}),c.jsxs("form",{onSubmit:n(d),className:"space-y-8",children:[t.map(h=>{const p=!!r[h.id];return c.jsxs("div",{className:"relative group",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("label",{htmlFor:h.id,className:"block text-xs font-bold uppercase tracking-[0.2em] text-white/50",children:[h.label," ",h.required&&c.jsx("span",{className:"text-[var(--feature-color)]",children:"*"})]}),p&&c.jsxs("div",{className:"text-red-500 flex items-center gap-1.5",children:[c.jsx(kt,{size:14}),c.jsx("span",{className:"text-xs",children:"Required"})]})]}),h.type==="textarea"?c.jsx("textarea",{id:h.id,placeholder:h.placeholder,rows:5,...e(h.id,{required:h.required}),className:`w-full bg-transparent border-b ${p?"border-red-500":"border-border"} focus:border-[var(--feature-color)] px-0 py-3 text-white placeholder:text-white/20 focu
55s:outline-none transition-colors resize-y`}):h.type==="select"?c.jsxs("select",{id:h.id,...e(h.id,{required:h.required}),className:`w-full bg-transparent border-b ${p?"border-red-500":"border-border"} focus:border-[var(--feature-color)] px-0 py-3 text-white focus:outline-none transition-colors appearance-none`,children:[c.jsx("option",{value:"",className:"bg-neutral-900 text-white/50",children:"Select an option..."}),h.options?.map(m=>c.jsx("option",{value:m,className:"bg-neutral-900 text-white",children:m},m))]}):c.jsx("input",{id:h.id,type:h.type,placeholder:h.placeholder,...e(h.id,{required:h.required}),className:`w-full bg-transparent border-b ${p?"border-red-500":"border-border"} focus:border-[var(--feature-color)] px-0 py-3 text-white placeholder:text-white/20 focus:outline-none transition-colors`})]},h.id)}),c.jsxs("div",{className:"pt-4 flex items-center gap-6",children:[c.jsx("button",{type:"submit",disabled:l.isPending,className:"inline-flex items-center justify-center gap-2 px-8 py-4 bg-white text-black text-sm font-bold uppercase tracking-[0.2em] hover:bg-[var(--feature-color)] hover:text-white disabled:opacity-50 disabled:cursor-not-allowed transition-colors group",children:l.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):"Submit Concern"}),l.error&&c.jsxs("span",{className:"text-sm text-red-500 flex items-center gap-1.5",children:[c.jsx(kt,{size:16}),"Failed to submit. Please try again."]})]})]})]})}const $ae=[{category:"Overview",links:[{label:"Home",href:"/"},{label:"Our Thesis",href:"/thesis"}]},{category:"For Founders",links:[{label:"For Founders",href:"/founders"},{label:"Apply",href:"/apply"}]},{category:"For Investors",links:[{label:"For Investors",href:"/investors"},{label:"Portfolio",href:"/companies"}]},{category:"Company",links:[{label:"Team",href:"/team"},{label:"Stories",href:"/stories"},{label:"Careers",href:"/careers"}]},{category:"Legal",links:[{label:"Grievance Redressal",href:"/grievance-redressal"}]}];function Hae(){return ns({title:"Sitemap",description:"A complete directory of all pages on the 100x100 website."}),c.jsxs("div",{className:"bg-background min-h-screen text-foreground",children:[c.jsx(K4,{}),c.jsx("main",{className:"container mx-auto px-6 max-w-5xl pt-40 pb-32",children:c.jsxs(Ue.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.5},children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-5",children:"Navigation"}),c.jsx("h1",{className:"text-[clamp(3rem,10vw,8rem)] font-black tracking-tighter leading-[0.85] uppercase mb-20",children:"Sitemap"}),c.jsx("div",{className:"space-y-0 divide-y divide-border",children:$ae.map((t,e)=>c.jsxs(Ue.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,delay:.1+e*.08},className:"grid md:grid-cols-4 gap-6 py-10",children:[c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx("div",{className:"w-0.5 self-stretch bg-[var(--feature-color)] shrink-0 rounded-full"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.25em] text-white/50 pt-0.5",children:t.category})]}),c.jsx("div",{className:"md:col-span-3 grid grid-cols-2 sm:grid-cols-3 gap-x-8 gap-y-4",children:t.links.map(n=>c.jsx(Qe,{href:n.href,className:"text-sm font-semibold uppercase tracking-widest text-white/70 hover:text-[var(--feature-color)] transition-colors duration-200",children:n.label},n.href))})]},t.category))}),c.jsx("div",{className:"mt-20 pt-10 border-t border-border",children:c.jsxs("p",{className:"text-xs font-bold uppercase tracking-[0.25em] text-white/30",children:["© ",new Date().getFullYear()," 100x100 Pte Ltd — Singapore · Indonesia · Philippines · Australia · New Zealand"]})})]})}),c.jsx(W4,{})]})}function Kae(t){const n=t.replace(/[^\p{L}\p{N}\s]/gu," ").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0].slice(0,2).toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}function Wae(t){const e=/^#?([0-9a-f]{6})$/i.exec(t);if(!e)return"#003320";const n=parseInt(e[1],16),r=n>>16&255,s=n>>8&255,i=n&255;return(.299*r+.587*s+.114*i)/255>.6?"#003320":"#F5F5F4"}function lI({name:t,brandColor:e,logoUrl:n,size:r=56,className:s=""}){const i=N.useMemo(()=>Kae(t),[t]),a=e||"#1A1A18",l=Wae(a);return n?c.jsx("img",{src:n,alt:`${t} logo`,width:r,height:r,className:`object-cover ${s}`,style:{width:r,height:r}}):c.jsx("div",{className:`shrink-0 flex items-center justify-center font-black tracking-tight ${s}`,style:{width:r,height:r,backgroundColor:a,color:l,fontSize:r*.36,lineHeight:1},"aria-label":`${t} logo`,children:i})}const cI=[{key:"companySlug",label:"Company"},{key:"department",label:"Function"},{key:"location",label:"Location"},{key:"employmentType",label:"Type"},{key:"workMode",label:"Mode"},{key:"level",label:"Level"}];function Gae(){if(typeof window>"u")return{};const t=new URLSearchParams(window.location.search),e={};for(const n of cI){const r=t.get(n.key);r&&(e[n.key]=r)}return e}function Yae(){ns({title:"Careers",description:"Join the 100x100 team or one of our portfolio companies. Browse open roles across climate tech in Southeast Asia."});const[t,e]=N.useState(""),[n,r]=N.useState(()=>Gae()),s=N.useMemo(()=>({...t?{q:t}:{},...n}),[t,n]),{data:i,isLoading:a,isError:l}
55=jG(s),d=i?.jobs??[],h=i?.facets,p=Object.values(n).filter(Boolean).length+(t?1:0),m=v=>h?v==="companySlug"?h.companies.map(C=>({value:C.slug,label:C.name,count:C.count})):{department:h.departments,location:h.locations,employmentType:h.employmentTypes,workMode:h.workModes,level:h.levels}[v].map(C=>({value:C.value,label:C.value,count:C.count})):[],g=(v,S)=>{r(C=>{const j={...C};return S?j[v]=S:delete j[v],j})},x=()=>{e(""),r({})};return c.jsxs("div",{className:"bg-background min-h-screen","data-testid":"page-careers",children:[c.jsx("div",{className:"pt-32 pb-20",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color)] mb-6",children:"Careers"}),c.jsxs("h1",{className:"text-[clamp(2.25rem,7.5vw,6.5rem)] font-black uppercase tracking-tighter leading-[0.85] mb-8 break-words",children:["Build the",c.jsx("br",{}),"climate companies",c.jsx("br",{}),"of the next decade."]}),c.jsx("p",{className:"text-lg md:text-xl text-white/70 max-w-3xl font-medium leading-relaxed",children:"Join 100x100 or any of our portfolio companies. We hire operators, scientists, engineers and builders willing to be in the room from Day Zero."})]})}),c.jsx("div",{className:"bg-white text-neutral-900 pt-16 pb-24",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[c.jsx("div",{className:"bg-neutral-50 border border-neutral-200 p-6 md:p-8 mb-12",children:c.jsxs("div",{className:"flex flex-col gap-6",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Uf,{size:18,className:"absolute left-4 top-1/2 -translate-y-1/2 text-neutral-400 pointer-events-none"}),c.jsx("input",{type:"search",value:t,onChange:v=>e(v.target.value),placeholder:"Search by role, company or keyword…","data-testid":"careers-search",className:"w-full bg-white border border-neutral-300 pl-11 pr-4 py-4 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)] transition-colors"})]}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:cI.map(v=>{const S=m(v.key),C=n[v.key]??"";return c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("label",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-neutral-500",children:v.label}),c.jsxs("select",{value:C,onChange:j=>g(v.key,j.target.value),"data-testid":`filter-${v.key}`,className:"bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 focus:outline-none focus:border-[var(--feature-color-hover)] transition-colors appearance-none cursor-pointer",children:[c.jsx("option",{value:"",children:"All"}),S.map(j=>c.jsxs("option",{value:j.value,children:[j.label," (",j.count,")"]},j.value))]})]},v.key)})}),p>0&&c.jsxs("button",{onClick:x,"data-testid":"clear-filters",className:"self-start inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-neutral-600 hover:text-[var(--feature-color-hover)] transition-colors",children:[c.jsx(Zs,{size:14})," Clear filters (",p,")"]})]})}),c.jsxs("div",{className:"flex items-baseline justify-between mb-6 pb-3 border-b border-neutral-200",children:[c.jsx("p",{className:"text-sm font-bold uppercase tracking-[0.25em] text-neutral-600",children:a?"Loading…":`${d.length} open ${d.length===1?"role":"roles"}`}),c.jsx("p",{className:"text-xs uppercase tracking-widest text-neutral-500 hidden md:block",children:"Sorted: most recent"})]}),l&&c.jsx("div",{className:"bg-red-50 border border-red-200 p-6 text-red-700",children:"Could not load jobs. Please refresh and try again."}),!a&&d.length===0&&!l&&c.jsxs("div",{className:"bg-neutral-50 border border-neutral-200 p-12 text-center",children:[c.jsx("p",{className:"text-xl font-bold uppercase tracking-wide mb-2 text-neutral-900",children:"No matching roles"}),c.jsx("p",{className:"text-neutral-600",children:"Try adjusting your search or clearing filters."})]}),c.jsx("div",{className:"space-y-3",children:d.map((v,S)=>c.jsx(Ue.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:Math.min(S*.03,.3)},children:c.jsx(Qe,{href:`/careers/${v.slug}`,"data-testid":`job-row-${v.slug}`,className:"group block bg-white border border-neutral-200 hover:border-[var(--feature-color-hover)] transition-colors",children:c.jsxs("div",{className:"p-5 md:p-6 flex flex-col md:flex-row md:items-center gap-5 md:gap-6",children:[c.jsx(lI,{name:v.company.name,brandColor:v.company.brandColor,logoUrl:v.company.logoUrl,
vendor: 4,884 bytes, line 55
55size:64}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[c.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-[var(--feature-color-hover)]",children:v.company.name}),v.company.kind==="firm"&&c.jsx("span",{className:"text-[9px] font-bold uppercase tracking-widest bg-[var(--feature-color-hover)] text-white px-1.5 py-0.5",children:"Firm"})]}),c.jsx("h3",{className:"text-xl md:text-2xl font-black uppercase tracking-tight mb-2 leading-tight text-neutral-900 group-hover:text-[var(--feature-color-hover)] transition-colors",children:v.title}),c.jsx("p",{className:"text-neutral-600 text-sm md:text-base leading-snug line-clamp-2",children:v.summary})]}),c.jsxs("div",{className:"flex flex-wrap md:flex-col md:items-end gap-x-4 gap-y-1.5 md:gap-1 text-xs md:text-[11px] font-bold uppercase tracking-widest text-neutral-600 md:min-w-[180px]",children:[c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(Zu,{size:12,className:"text-[var(--feature-color-hover)]"}),v.department]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(lk,{size:12,className:"text-[var(--feature-color-hover)]"}),v.location," · ",v.workMode]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(ak,{size:12,className:"text-[var(--feature-color-hover)]"}),v.employmentType," · ",v.level]})]}),c.jsx(AP,{size:20,className:"text-neutral-400 group-hover:text-[var(--feature-color-hover)] transition-colors hidden md:block"})]})})},v.slug))})]})})]})}const mO=(t,e,n)=>{if(t&&"reportValidity"in t){const r=Me(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},uI=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?mO(r.ref,n,t):r.refs&&r.refs.forEach(s=>mO(s,n,t))}},Qae=(t,e)=>{e.shouldUseNativeValidation&&uI(t,e);const n={};for(const r in t){const s=Me(e.fields,r),i=Object.assign(t[r]||{},{ref:s&&s.ref});if(Xae(e.names||Object.keys(t),r)){const a=Object.assign({},Me(n,r));Dt(a,"root",i),Dt(n,r,a)}else Dt(n,r,i)}return n},Xae=(t,e)=>t.some(n=>n.startsWith(e+"."));var Jae=function(t,e){for(var n={};t.length;){var r=t[0],s=r.code,i=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[a]={message:l.message,type:l.code}}else n[a]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(m){return t.push(m)})}),e){var d=n[a].types,h=d&&d[r.code];n[a]=tI(a,e,n,s,h?[].concat(h,r.message):r.message)}t.shift()}return n},dI=function(t,e,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve((function(a,l){try{var d=Promise.resolve(t[n.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(h){return i.shouldUseNativeValidation&&uI({},i),{errors:{},values:n.raw?r:h}})}catch(h){return l(h)}return d&&d.then?d.then(void 0,l):d})(0,function(a){if((function(l){return Array.isArray(l?.errors)})(a))return{values:{},errors:Qae(Jae(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}},xt;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),a={};for(const l of i)a[l]=s[l];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(const a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(xt||(xt={}));var gO;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(gO||(gO={}));const Re=xt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ao=t=>{switch(typeof t){case"undefined":return Re.undefined;case"string":return Re.string;case"number":return Number.isNaN(t)?Re.nan:Re.number;case"boolean":return Re.boolean;case"function":return Re.function;case"bigint":return Re.bigint;case"symbol":return Re.symbol;case"object":return Array.isArray(t)?Re.array:t===null?Re.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Re.promise:typeof Map<"u"&&t instanceof Map?Re.map:typeof Set<"u"&&t instanceof Set?Re.set:typeof Date<"u"&&t instanceof Date?Re.date:Re.object;default:return Re.unknown}}
vendor: 15,482 bytes, line 55
55,ge=xt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ga extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let l=r,d=0;for(;d<a.path.length;){const h=a.path[d];d===a.path.length-1?(l[h]=l[h]||{_errors:[]},l[h]._errors.push(n(a))):l[h]=l[h]||{_errors:[]},l=l[h],d++}}};return s(this),r}static assert(e){if(!(e instanceof ga))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,xt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ga.create=t=>new ga(t);const $1=(t,e)=>{let n;switch(t.code){case ge.invalid_type:t.received===Re.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,xt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${xt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${xt.joinValues(t.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${xt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:xt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ge.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ge.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=e.defaultError,xt.assertNever(t)}return{message:n}};let Zae=$1;function eoe(){return Zae}const toe=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const d=r.filter(h=>!!h).slice().reverse();for(const h of d)l=h(a,{data:e,defaultError:l}).message;return{...s,path:i,message:l}};function Ce(t,e){const n=eoe(),r=toe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===$1?void 0:$1].filter(s=>!!s)});t.common.issues.push(r)}class Nr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Ye;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,a=await s.value;r.push({key:i,value:a})}return Nr.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return Ye;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:e.value,value:r}}}const Ye=Object.freeze({status:"aborted"}),kh=t=>({status:"dirty",value:t}),js=t=>({status:"valid",value:t}),yO=t=>t.status==="aborted",xO=t=>t.status==="dirty",Iu=t=>t.status==="valid",Hg=t=>typeof Promise<"u"&&t instanceof Promise;var _e;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(_e||(_e={}));class Ci{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const bO=(t,e)=>{if(Iu(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ga(t.common.issues);return this._error=n,this._error}}};function st(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,l)=>{const{message:d}=t;return a.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:d??r??l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:d??n??l.defaultError}},description:s}}class mt{get description(){return this._def.description}_getType(e){return ao(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:ao(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nr,ctx:{common:e.parent.common,data:e.data,parsedType:ao(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Hg(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ao(e)},s=this._parseSync({data:e,path:r.path,parent:r});return bO(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ao(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Iu(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Iu(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ao(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Hg(s)?s:Promise.resolve(s));return bO(r,i)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const a=e(s),l=()=>i.addIssue({code:ge.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Fl({schema:this,typeName:We.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return wo.create(this,this._def)}nullable(){return Fu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Si.create(this)}promise(){return Qg.create(this,this._def)}or(e){return Wg.create([this,e],this._def)}and(e){return Gg.create(this,e,this._def)}transform(e){return new Fl({...st(this._def),schema:this,typeName:We.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new K1({...st(this._def),innerType:this,defaultValue:n,typeName:We.ZodDefault})}brand(){return new Coe({typeName:We.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new W1({...st(this._def),innerType:this,catchValue:n,typeName:We.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return dC.create(this,e)}readonly(){return G1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const noe=/^c[^\s-]{8,}$/i,roe=/^[0-9a-z]+$/,soe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ioe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,aoe=/^[a-z0-9_-]{21}$/i,ooe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,loe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,coe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,uoe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zv;const doe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hoe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,foe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,poe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,moe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,goe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hI="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",yoe=new RegExp(`^${hI}$`);function fI(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function xoe(t){return new RegExp(`^${fI(t)}$`)}function boe(t){let e=`${hI}T${fI(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function voe(t,e){return!!((e==="v4"||!e)&&doe.test(t)||(e==="v6"||!e)&&foe.test(t))}function woe(t,e){if(!ooe.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Soe(t,e){return!!((e==="v4"||!e)&&hoe.test(t)||(e==="v6"||!e)&&poe.test(t))}class bi extends mt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Re.string){const i=this._getOrReturnCtx(e);
vendor: 4,163 bytes, line 55
55return Ce(i,{code:ge.invalid_type,expected:Re.string,received:i.parsedType}),Ye}const r=new Nr;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=e.data.length>i.value,l=e.data.length<i.value;(a||l)&&(s=this._getOrReturnCtx(e,s),a?Ce(s,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&Ce(s,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")coe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Zv||(Zv=new RegExp(uoe,"u")),Zv.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ioe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")aoe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")noe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")roe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")soe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),Ce(s,{validation:"url",code:ge.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"regex",code:ge.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?boe(i).test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?yoe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?xoe(i).test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?loe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?voe(e.data,i.version)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?woe(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Soe(e.data,i.version)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?moe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?goe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ce(s,{validation:"base64url",code:ge.invali
vendor: 18,439 bytes, line 55
55d_string,message:i.message}),r.dirty()):xt.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:ge.invalid_string,..._e.errToObj(r)})}_addCheck(e){return new bi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._e.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._e.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._e.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._e.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._e.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._e.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._e.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._e.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._e.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._e.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._e.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._e.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._e.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,..._e.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,..._e.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",..._e.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,..._e.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,..._e.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,..._e.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,..._e.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,..._e.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,..._e.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,..._e.errToObj(n)})}nonempty(e){return this.min(1,_e.errToObj(e))}trim(){return new bi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new bi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new bi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}bi.create=t=>new bi({checks:[],typeName:We.ZodString,coerce:t?.coerce??!1,...st(t)});function koe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}class Il extends mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Re.number){const i=this._getOrReturnCtx(e);return Ce(i,{code:ge.invalid_type,expected:Re.number,received:i.parsedType}),Ye}let r;const s=new Nr;for(const i of this._def.checks)i.kind==="int"?xt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?koe(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.not_finite,message:i.message}),s.dirty()):xt.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,_e.toString(n))}gt(e,n){return this.setLimit("min",e,!1,_e.toString(n))}lte(e,n){return this.setLimit("max",e,!0,_e.toString(n))}lt(e,n){return this.setLimit("max",e,!1,_e.toString(n))}setLimit(e,n,r,s){return new Il({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:_e.toString(s)}]})}_addCheck(e){return new Il({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_e.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:_e.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&xt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Il.create=t=>new Il({checks:[],typeName:We.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Ul extends mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Re.bigint)return this._getInvalidInput(e);let r;const s=new Nr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Ce(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):xt.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Ce(n,{code:ge.invalid_type,expected:Re.bigint,received:n.parsedType}),Ye}gte(e,n){return this.setLimit("min",e,!0,_e.toString(n))}gt(e,n){return this.setLimit("min",e,!1,_e.toString(n))}lte(e,n){return this.setLimit("max",e,!0,_e.toString(n))}lt(e,n){return this.setLimit("max",e,!1,_e.toString(n))}setLimit(e,n,r,s){return new Ul({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:_e.toString(s)}]})}_addCheck(e){return new Ul({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ul.create=t=>new Ul({checks:[],typeName:We.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class Kg extends mt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Re.boolean){const r=this._getOrReturnCtx(e);return Ce(r,{code:ge.invalid_type,expected:Re.boolean,received:r.parsedType}),Ye}return js(e.data)}}Kg.create=t=>new Kg({typeName:We.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Uu extends mt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Re.date){const i=this._getOrReturnCtx(e);return Ce(i,{code:ge.invalid_type,expected:Re.date,received:i.parsedType}),Ye}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return Ce(i,{code:ge.invalid_date}),Ye}const r=new Nr;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),Ce(s,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):xt.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Uu({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:_e.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:_e.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Uu.create=t=>new Uu({checks:[],coerce:t?.coerce||!1,typeName:We.ZodDate,...st(t)});class vO extends mt{_parse(e){if(this._getType(e)!==Re.symbol){const r=this._getOrReturnCtx(e);return Ce(r,{code:ge.invalid_type,expected:Re.symbol,received:r.parsedType}),Ye}return js(e.data)}}vO.create=t=>new vO({typeName:We.ZodSymbol,...st(t)});class wO extends mt{_parse(e){if(this._getType(e)!==Re.undefined){const r=this._getOrReturnCtx(e);return Ce(r,{code:ge.invalid_type,expected:Re.undefined,received:r.parsedType}),Ye}return js(e.data)}}wO.create=t=>new wO({typeName:We.ZodUndefined,...st(t)});class SO extends mt{_parse(e){if(this._getType(e)!==Re.null){const r=this._getOrReturnCtx(e);return Ce(r,{code:ge.invalid_type,expected:Re.null,received:r.parsedType}),Ye}return js(e.data)}}SO.create=t=>new SO({typeName:We.ZodNull,...st(t)});class kO extends mt{constructor(){super(...arguments),this._any=!0}_parse(e){return js(e.data)}}kO.create=t=>new kO({typeName:We.ZodAny,...st(t)});class CO extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return js(e.data)}}CO.create=t=>new CO({typeName:We.ZodUnknown,...st(t)});class Ao extends mt{_parse(e){const n=this._getOrReturnCtx(e);return Ce(n,{code:ge.invalid_type,expected:Re.never,received:n.parsedType}),Ye}}Ao.create=t=>new Ao({typeName:We.ZodNever,...st(t)});class NO extends mt{_parse(e){if(this._getType(e)!==Re.undefined){const r=this._getOrReturnCtx(e);return Ce(r,{code:ge.invalid_type,expected:Re.void,received:r.parsedType}),Ye}return js(e.data)}}NO.create=t=>new NO({typeName:We.ZodVoid,...st(t)});class Si extends mt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Re.array)return Ce(n,{code:ge.invalid_type,expected:Re.array,received:n.parsedType}),Ye;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(a||l)&&(Ce(n,{code:a?ge.too_big:ge.too_small,minimum:l?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Ce(n,{code:ge.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Ce(n,{code:ge.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,l)=>s.type._parseAsync(new Ci(n,a,n.path,l)))).then(a=>Nr.mergeArray(r,a));const i=[...n.data].map((a,l)=>s.type._parseSync(new Ci(n,a,n.path,l)));return Nr.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new Si({...this._def,minLength:{value:e,message:_e.toString(n)}})}max(e,n){return new Si({...this._def,maxLength:{value:e,message:_e.toString(n)}})}length(e,n){return new Si({...this._def,exactLength:{value:e,message:_e.toString(n)}})}nonempty(e){return this.min(1,e)}}Si.create=(t,e)=>new Si({type:t,minLength:null,maxLength:null,exactLength:null,typeName:We.ZodArray,...st(e)});function hu(t){if(t instanceof xn){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=wo.create(hu(r))}return new xn({...t._def,shape:()=>e})}else return t instanceof Si?new Si({...t._def,type:hu(t.element)}):t instanceof wo?wo.create(hu(t.unwrap())):t instanceof Fu?Fu.create(hu(t.unwrap())):t instanceof Bl?Bl.create(t.items.map(e=>hu(e))):t}class xn extends mt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=xt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Re.object){const h=this._getOrReturnCtx(e);return Ce(h,{code:ge.invalid_type,expected:Re.object,received:h.parsedType}),Ye}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ao&&this._def.unknownKeys==="strip"))for(const h in s.data)a.includes(h)||l.push(h);const d=[];for(const h of a){const p=i[h],m=s.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new Ci(s,m,s.path,h)),alwaysSet:h in s.data})}if(this._def.catchall instanceof Ao){const h=this._def.unknownKeys;if(h==="passthrough")for(const p of l)d.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(h==="strict")l.length>0&&(Ce(s,{code:ge.unrecognized_keys,keys:l}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const p of l){const m=s.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new Ci(s,m,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const h=[];for(const p of d){const m=await p.key,g=await p.value;h.push({key:m,value:g,alwaysSet:p.alwaysSet})}return h}).then(h=>Nr.mergeObjectSync(r,h)):Nr.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(e){return _e.errToObj,new xn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:_e.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new xn({...this._def,unknownKeys:"strip"})}passthrough(){return new xn({...this._def,unknownKeys:"passthrough"})}extend(e){return new xn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new xn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:We.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new xn({...this._def,catchall:e})}pick(e){const n={};for(const r of xt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new xn({...this._def,shape:()=>n})}omit(e){const n={};for(const r of xt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new xn({...this._def,shape:()=>n})}deepPartial(){return hu(this)}partial(e){const n={};for(const r of xt.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new xn({...this._def,shape:()=>n})}required(e){const n={};for(const r of xt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof wo;)i=i._def.innerType;n[r]=i}return new xn({...this._def,shape:()=>n})}keyof(){return pI(xt.objectKeys(this.shape))}}xn.create=(t,e)=>new xn({shape:()=>t,unknownKeys:"strip",catchall:Ao.create(),typeName:We.ZodObject,...st(e)});xn.strictCreate=(t,e)=>new xn({shape:()=>t,unknownKeys:"strict",catchall:Ao.create(),typeName:We.ZodObject,...st(e)});xn.lazycreate=(t,e)=>new xn({shape:t,unknownKeys:"strip",catchall:Ao.create(),typeName:We.ZodObject,...st(e)});class Wg extends mt{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const a=i.map(l=>new ga(l.ctx.common.issues));
vendor: 5,629 bytes, line 55
55return Ce(n,{code:ge.invalid_union,unionErrors:a}),Ye}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const d of r){const h={...n,common:{...n.common,issues:[]},parent:null},p=d._parseSync({data:n.data,path:n.path,parent:h});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:h}),h.common.issues.length&&a.push(h.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const l=a.map(d=>new ga(d));return Ce(n,{code:ge.invalid_union,unionErrors:l}),Ye}}get options(){return this._def.options}}Wg.create=(t,e)=>new Wg({options:t,typeName:We.ZodUnion,...st(e)});function H1(t,e){const n=ao(t),r=ao(e);if(t===e)return{valid:!0,data:t};if(n===Re.object&&r===Re.object){const s=xt.objectKeys(e),i=xt.objectKeys(t).filter(l=>s.indexOf(l)!==-1),a={...t,...e};for(const l of i){const d=H1(t[l],e[l]);if(!d.valid)return{valid:!1};a[l]=d.data}return{valid:!0,data:a}}else if(n===Re.array&&r===Re.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const a=t[i],l=e[i],d=H1(a,l);if(!d.valid)return{valid:!1};s.push(d.data)}return{valid:!0,data:s}}else return n===Re.date&&r===Re.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Gg extends mt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,a)=>{if(yO(i)||yO(a))return Ye;const l=H1(i.value,a.value);return l.valid?((xO(i)||xO(a))&&n.dirty(),{status:n.value,value:l.data}):(Ce(r,{code:ge.invalid_intersection_types}),Ye)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Gg.create=(t,e,n)=>new Gg({left:t,right:e,typeName:We.ZodIntersection,...st(n)});class Bl extends mt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Re.array)return Ce(r,{code:ge.invalid_type,expected:Re.array,received:r.parsedType}),Ye;if(r.data.length<this._def.items.length)return Ce(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ye;!this._def.rest&&r.data.length>this._def.items.length&&(Ce(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,l)=>{const d=this._def.items[l]||this._def.rest;return d?d._parse(new Ci(r,a,r.path,l)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Nr.mergeArray(n,a)):Nr.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Bl({...this._def,rest:e})}}Bl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bl({items:t,typeName:We.ZodTuple,rest:null,...st(e)})};class Yg extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Re.object)return Ce(r,{code:ge.invalid_type,expected:Re.object,received:r.parsedType}),Ye;const s=[],i=this._def.keyType,a=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new Ci(r,l,r.path,l)),value:a._parse(new Ci(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?Nr.mergeObjectAsync(n,s):Nr.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof mt?new Yg({keyType:e,valueType:n,typeName:We.ZodRecord,...st(r)}):new Yg({keyType:bi.create(),valueType:e,typeName:We.ZodRecord,...st(n)})}}class jO extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Re.map)return Ce(r,{code:ge.invalid_type,expected:Re.map,received:r.parsedType}),Ye;const s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([l,d],h)=>({key:s._parse(new Ci(r,l,r.path,[h,"key"])),value:i._parse(new Ci(r,d,r.path,[h,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const d of a){const h=await d.key,p=await d.value;if(h.status==="aborted"||p.status==="aborted")return Ye;(h.status==="dirty"||p.status==="dirty")&&n.dirty(),l.set(h.value,p.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const d of a){const h=d.key,p=d.value;if(h.status==="aborted"||p.status==="aborted")return Ye;(h.status==="dirty"||p.status==="dirty")&&n.dirty(),l.set(h.value,p.value)}return{status:n.value,value:l}}}}jO.create=(t,e,n)=>new jO({valueType:e,keyType:t,typeName:We.ZodMap,...st(n)});class ff extends mt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Re.set)return Ce(r,{code:ge.invalid_type,expected:Re.set,received:r.parsedType}),Ye;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(Ce(r,{code:ge.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(Ce(r,{code:ge.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function a(d){const h=new Set;for(const p of d){if(p.status==="aborted")return Ye;p.status==="dirty"&&n.dirty(),h.add(p.value)}return{status:n.value,value:h}}const l=[...r.data.values()].map((d,h)=>i._parse(new Ci(r,d,r.path,h)));return r.common.async?Promise.all(l).then(d=>
vendor: 6,142 bytes, line 55
55a(d)):a(l)}min(e,n){return new ff({...this._def,minSize:{value:e,message:_e.toString(n)}})}max(e,n){return new ff({...this._def,maxSize:{value:e,message:_e.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}ff.create=(t,e)=>new ff({valueType:t,minSize:null,maxSize:null,typeName:We.ZodSet,...st(e)});class EO extends mt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}EO.create=(t,e)=>new EO({getter:t,typeName:We.ZodLazy,...st(e)});class TO extends mt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Ce(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ye}return{status:"valid",value:e.data}}get value(){return this._def.value}}TO.create=(t,e)=>new TO({value:t,typeName:We.ZodLiteral,...st(e)});function pI(t,e){return new Bu({values:t,typeName:We.ZodEnum,...st(e)})}class Bu extends mt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Ce(n,{expected:xt.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ye}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Ce(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ye}return js(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Bu.create(e,{...this._def,...n})}exclude(e,n=this._def){return Bu.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Bu.create=pI;class AO extends mt{_parse(e){const n=xt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Re.string&&r.parsedType!==Re.number){const s=xt.objectValues(n);return Ce(r,{expected:xt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ye}if(this._cache||(this._cache=new Set(xt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=xt.objectValues(n);return Ce(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ye}return js(e.data)}get enum(){return this._def.values}}AO.create=(t,e)=>new AO({values:t,typeName:We.ZodNativeEnum,...st(e)});class Qg extends mt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Re.promise&&n.common.async===!1)return Ce(n,{code:ge.invalid_type,expected:Re.promise,received:n.parsedType}),Ye;const r=n.parsedType===Re.promise?n.data:Promise.resolve(n.data);return js(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qg.create=(t,e)=>new Qg({type:t,typeName:We.ZodPromise,...st(e)});class Fl extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===We.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{Ce(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async l=>{if(n.value==="aborted")return Ye;const d=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return d.status==="aborted"?Ye:d.status==="dirty"||n.value==="dirty"?kh(d.value):d});{if(n.value==="aborted")return Ye;const l=this._def.schema._parseSync({data:a,path:r.path,parent:r});return l.status==="aborted"?Ye:l.status==="dirty"||n.value==="dirty"?kh(l.value):l}}if(s.type==="refinement"){const a=l=>{const d=s.refinement(l,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Ye:(l.status==="dirty"&&n.dirty(),a(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Ye:(l.status==="dirty"&&n.dirty(),a(l.value).then(()=>({status:n.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Iu(a))return Ye;const l=s.transform(a.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Iu(a)?Promise.resolve(s.transform(a.value,i)).then(l=>({status:n.value,value:l})):Ye);xt.assertNever(s)}}Fl.create=(t,e,n)=>new Fl({schema:t,typeName:We.ZodEffects,effect:e,...st(n)});Fl.createWithPreprocess=(t,e,n)=>new Fl({schema:e,effect:{type:"preprocess",transform:t},typeName:We.ZodEffects,...st(n)});class wo extends mt{_parse(e){return this._getType(e)===Re.undefined?js(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}wo.create=(t,e)=>new wo({innerType:t,typeName:We.ZodOptional,...st(e)});class Fu extends mt{_parse(e){return this._getType(e)===Re.null?js(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fu.create=(t,e)=>new Fu({innerType:t,typeName:We.ZodNullable,...st(e)});class K1 extends mt{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}K1.create=(t,e)=>new K1({innerType:t,typeName:We.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class W1 extends mt{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Hg(s)?s.then(i=>
55({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ga(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ga(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}W1.create=(t,e)=>new W1({innerType:t,typeName:We.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class MO extends mt{_parse(e){if(this._getType(e)!==Re.nan){const r=this._getOrReturnCtx(e);return Ce(r,{code:ge.invalid_type,expected:Re.nan,received:r.parsedType}),Ye}return{status:"valid",value:e.data}}}MO.create=t=>new MO({typeName:We.ZodNaN,...st(t)});class Coe extends mt{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class dC extends mt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ye:i.status==="dirty"?(n.dirty(),kh(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ye:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new dC({in:e,out:n,typeName:We.ZodPipeline})}}class G1 extends mt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Iu(s)&&(s.value=Object.freeze(s.value)),s);return Hg(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}G1.create=(t,e)=>new G1({innerType:t,typeName:We.ZodReadonly,...st(e)});var We;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(We||(We={}));const b=bi.create,ze=Il.create;Ul.create;const ht=Kg.create;Uu.create;Ao.create;const J=Si.create,O=xn.create;Wg.create;Gg.create;Bl.create;const Wf=Yg.create,je=Bu.create;Qg.create;wo.create;Fu.create;const mI=Fl.createWithPreprocess,xe={string:(t=>bi.create({...t,coerce:!0})),number:(t=>Il.create({...t,coerce:!0})),boolean:(t=>Kg.create({...t,coerce:!0})),bigint:(t=>Ul.create({...t,coerce:!0})),date:(t=>Uu.create({...t,coerce:!0}))};O({hero:O({line1:b(),line2:b(),highlight:b(),subTagline:b()}),statement:O({line1:b(),line2:b(),line3:b(),kicker:b()}),process:O({headline1:b(),headline2:b(),intro:b(),ctaLabel:b(),ctaHref:b(),pillars:J(O({title:b(),desc:b()}))}),sectorsSection:O({heading:b(),subheading:b(),items:J(O({name:b(),challenge:b(),action:b(),image:b().nullish().describe(`Optional URL for the sector card background image. If null/missing, the public site falls back to a position-based default.
56`)}))}),stats:O({items:J(O({value:b(),label:b(),accent:ht()}))}),pathways:O({items:J(O({label:b(),href:b(),accent:ht()}))})});O({hero:O({line1:b(),line2:b(),highlight:b(),subTagline:b()}),statement:O({line1:b(),line2:b(),line3:b(),kicker:b()}),process:O({headline1:b(),headline2:b(),intro:b(),ctaLabel:b(),ctaHref:b(),pillars:J(O({title:b(),desc:b()}))}),sectorsSection:O({heading:b(),subheading:b(),items:J(O({name:b(),challenge:b(),action:b(),image:b().nullish().describe(`Optional URL for the sector card background image. If null/missing, the public site falls back to a position-based default.
57`)}))}),stats:O({items:J(O({value:b(),label:b(),accent:ht()}))}),pathways:O({items:J(O({label:b(),href:b(),accent:ht()}))})});O({hero:O({line1:b(),line2:b(),highlight:b(),subTagline:b()}),statement:O({line1:b(),line2:b(),line3:b(),kicker:b()}),process:O({headline1:b(),headline2:b(),intro:b(),ctaLabel:b(),ctaHref:b(),pillars:J(O({title:b(),desc:b()}))}),sectorsSection:O({heading:b(),subheading:b(),items:J(O({name:b(),challenge:b(),action:b(),image:b().nullish().describe(`Optional URL for the sector card background image. If null/missing, the public site falls back to a position-based default.
58`)}))}),stats:O({items:J(O({value:b(),label:b(),accent:ht()}))}),pathways:O({items:J(O({label:b(),href:b(),accent:ht()}))})});O({hero:O({line1:b(),line2:b(),highlight:b(),subTagline:b()}),statement:O({line1:b(),line2:b(),line3:b(),kicker:b()}),process:O({headline1:b(),headline2:b(),intro:b(),ctaLabel:b(),ctaHref:b(),pillars:J(O({title:b(),desc:b()}))}),sectorsSection:O({heading:b(),subheading:b(),items:J(O({name:b(),challenge:b(),action:b(),image:b().nullish().describe(`Optional URL for the sector card background image. If null/missing, the public site falls back to a position-based default.
59`)}))}),stats:O({items:J(O({value:b(),label:b(),accent:ht()}))}),pathways:O({items:J(O({label:b(),href:b(),accent:ht()}))})});O({status:b()});const Noe=O({slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),jobCount:ze()});J(Noe);O({q:xe.string().optional().describe("Free-text search across title, summary, company name"),companySlug:xe.string().optional(),department:xe.string().optional(),location:xe.string().optional(),employmentType:xe.string().optional(),workMode:xe.string().optional(),level:xe.string().optional()});O({jobs:J(O({slug:b(),title:b(),department:b(),location:b(),employmentType:b(),workMode:b(),level:b(),summary:b(),postedAt:xe.date(),company:O
59({slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),jobCount:ze()})})),facets:O({companies:J(O({slug:b(),name:b(),count:ze()})),departments:J(O({value:b(),count:ze()})),locations:J(O({value:b(),count:ze()})),employmentTypes:J(O({value:b(),count:ze()})),workModes:J(O({value:b(),count:ze()})),levels:J(O({value:b(),count:ze()}))})});O({slug:xe.string()});O({slug:b(),title:b(),department:b(),location:b(),employmentType:b(),workMode:b(),level:b(),summary:b(),postedAt:xe.date(),company:O({slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),jobCount:ze()})}).and(O({description:b(),requirements:b()}));const joe=2,Eoe=200,Toe=200,Aoe=40,Moe=500,Ooe=new RegExp("^https?://.+"),Roe=500,Doe=new RegExp("^https?://.+"),_oe=200,Poe=5e3,Loe=5e3,Ioe=O({fullName:b().min(joe).max(Eoe),email:b().email().max(Toe),phone:b().max(Aoe).nullish(),linkedinUrl:b().max(Moe).regex(Ooe).nullish(),websiteUrl:b().max(Roe).regex(Doe).nullish(),location:b().max(_oe).nullish(),background:b().max(Poe).nullish(),motivation:b().max(Loe).nullish()});O({sections:J(O({id:b().uuid(),title:b(),members:J(O({id:b().uuid(),name:b(),position:b(),location:b().nullish(),photoUrl:b().nullish(),bio:b().nullish(),linkedinUrl:b().nullish()}))})),unassigned:J(O({id:b().uuid(),name:b(),position:b(),location:b().nullish(),photoUrl:b().nullish(),bio:b().nullish(),linkedinUrl:b().nullish()}))});O({geoLine:b().describe('Geographic presence line shown on the Team page hero, e.g. "Across Singapore · Indonesia · …"')});const Uoe=O({slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),openJobCount:ze(),fundedAt:xe.date().nullish()});J(Uoe);O({slug:xe.string()});O({slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),openJobCount:ze(),fundedAt:xe.date().nullish()}).and(O({openJobs:J(O({slug:b(),title:b(),location:b(),employmentType:b(),workMode:b()}))}));O({id:b().uuid(),email:b(),fullName:b().nullish(),role:je(["admin","marketing","jobs_manager","portfolio_editor"]),companyId:b().uuid().nullish(),canPublish:ht(),isActive:ht()});const Boe="all";O({q:xe.string().optional(),companyId:xe.string().uuid().optional(),published:je(["all","true","false"]).default(Boe)});const Foe=O({id:b().uuid(),slug:b(),companyId:b().uuid(),title:b(),department:b(),location:b(),employmentType:b(),workMode:b(),level:b(),summary:b(),description:b(),requirements:b(),applicationFormKey:b().nullish(),isPublished:ht(),postedAt:xe.date(),company:O({id:b().uuid(),slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),displayOrder:ze().optional(),fundedAt:xe.date().nullish()}),applicationCount:ze().optional()});J(Foe);const zoe=120,qoe=200,Voe=80,$oe=120,Hoe=1e3,Koe=80,Woe=!0;O({slug:b().min(1).max(zoe),companyId:b().uuid(),title:b().min(1).max(qoe),department:b().min(1).max(Voe),location:b().min(1).max($oe),employmentType:je(["Full-time","Part-time","Contract","Internship"]),workMode:je(["Onsite","Hybrid","Remote"]),level:je(["Junior","Mid","Senior","Lead"]),summary:b().min(1).max(Hoe),description:b().min(1),requirements:b().min(1),applicationFormKey:b().max(Koe).nullish(),isPublished:ht().default(Woe)});O({id:xe.string().uuid()});O({id:b().uuid(),slug:b(),companyId:b().uuid(),title:b(),department:b(),location:b(),employmentType:b(),workMode:b(),level:b(),summary:b(),description:b(),requirements:b(
59),applicationFormKey:b().nullish(),isPublished:ht(),postedAt:xe.date(),company:O({id:b().uuid(),slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),displayOrder:ze().optional(),fundedAt:xe.date().nullish()}),applicationCount:ze().optional()});O({id:xe.string().uuid()});const Goe=120,Yoe=200,Qoe=80,Xoe=120,Joe=1e3,Zoe=80,ele=!0;O({slug:b().min(1).max(Goe),companyId:b().uuid(),title:b().min(1).max(Yoe),department:b().min(1).max(Qoe),location:b().min(1).max(Xoe),employmentType:je(["Full-time","Part-time","Contract","Internship"]),workMode:je(["Onsite","Hybrid","Remote"]),level:je(["Junior","Mid","Senior","Lead"]),summary:b().min(1).max(Joe),description:b().min(1),requirements:b().min(1),applicationFormKey:b().max(Zoe).nullish(),isPublished:ht().default(ele)});O({id:b().uuid(),slug:b(),companyId:b().uuid(),title:b(),department:b(),location:b(),employmentType:b(),workMode:b(),level:b(),summary:b(),description:b(),requirements:b(),applicationFormKey:b().nullish(),isPublished:ht(),postedAt:xe.date(),company:O({id:b().uuid(),slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),displayOrder:ze().optional(),fundedAt:xe.date().nullish()}),applicationCount:ze().optional()});O({id:xe.string().uuid()});const tle=O({id:b().uuid(),slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),displayOrder:ze().optional(),fundedAt:xe.date().nullish()});J(tle);const nle=80,rle=new RegExp("^[a-z0-9-]+$"),sle=9,ile=2048,ale=new RegExp("^(https?://|/).+"),ole=2048,lle=new RegExp("^https?://.+"),cle=1e3,ule=200,dle=2048,hle=new RegExp("^(https?://|/).+"),fle=80,ple=80,mle=80,gle=40,yle=40,xle=0;O({slug:b().min(1).max(nle).regex(rle),name:b().min(1),kind:je(["firm","portfolio"]),brandColor:b().max(sle).nullish().describe("Hex color like #50FF96"),logoUrl:b().max(ile).regex(ale).nullish(),websiteUrl:b().max(ole).regex(lle).nullish(),shortDescription:b().max(cle).nullish(),tagline:b().max(ule).nullish(),imageUrl:b().max(dle).regex(hle).nullish(),country:b().max(fle).nullish(),sector:b().max(ple).nullish(),region:b().max(mle).nullish(),fund:b().max(gle).nullish(),stage:b().max(yle).nullish(),status:je(["Active","Exited","Terminated"]).optional(),displayOrder:ze().min(xle).optional(),fundedAt:xe.date().nullish()});O({id:xe.string().uuid()});O({id:b().uuid(),slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),displayOrder:ze().optional(),fundedAt:xe.date().nullish()}).and(O({jobCount:ze(),publishedJobCount:ze(),applicationCount:ze(),createdAt:xe.date().optional()}));O({id:xe.string().uuid()});const ble=80,vle=new RegExp("^[a-z0-9-]+$"),wle=9,Sle=2048,kle=new RegExp("^(https?://|/).+"),Cle=2048,Nle=new RegExp("^https?://.+"),jle=1e3,Ele=200,Tle=2048,Ale=new RegExp("^(https?://|/).+"),Mle=80,Ole=80,Rle=80,Dle=40,_le=40,Ple=0;O({slug:b().min(1).max(ble).regex(vle),name:b().min(1),kind:je(["firm","portfolio"]),brandColor:b().max(wle).nullish().describe("Hex color like #50FF96"),logoUrl:b().max(Sle).regex(kle).nullish(),websiteUrl:b().max(Cle).regex(Nle).nullish(),shortDescription:b().max(jle).nullish(),tagline:b().max(Ele).nullish(),imageUrl:b().max(Tle).regex(Ale).nullish(),country:b().max(Mle).nullish(),sector:b().max(Ole).nullish(),region:b().max(Rle).nullish(),fund:b().max(Dle).nullish(),stage:b().max(_le).nullish(),status:je(["Active","Exited","Terminated"]).optional(),displayOrder:ze().min(Ple).optional(),fundedAt:xe.date().nullish()});O({id:b().uuid(),slug:b(),name:b(),kind:je(["firm","portfolio"]),brandColor:b().nullish(),logoUrl:b().nullish(),websiteUrl:b().nullish(),shortDescription:b().nullish(),tagline:b().nullish(),imageUrl:b().nullish(),country:b().nullish(),sector:b().nullish(),region:b().nullish(),fund:b().nullish(),stage:b().nullish(),status:je(["Active","Exited","Terminated"]),displayOrder:ze().optional(),fundedAt:xe.date().nullish()}).and(O({jobCount:ze(),publishedJobCount:ze(),applicationCount:ze(),createdAt:xe.date().optional()}));O({id:xe.string().uuid()});O({sections:J(O({id:b().uuid(),title:b(),sortOrder:ze()})),members:J(O({id:b().uuid(),name:b(),position:b(),location:b().nullish(),photoUrl:b().nullish(),bio:b().nullish(),linkedinUrl:b().nullish(),sectionId:b().uuid().nullish(),sortOrder:ze()}))});const Lle=120,Ile=0;O({title:b().min(1).max(Lle),sortOrder:ze().min(Ile).optional()});O({id:xe.string().uuid()});const Ule=120,Ble=0;O({title:b().min(1).max(Ule),sortOrder:ze().min(Ble).optional()});O({id:b().uuid(),title:b(),sortOrder:ze()});O({id:xe.string().uuid()});const Fle=200,zle=200,qle=200,Vle=2048,$le=new RegExp("^(https?://|/).+"),Hle=4e3,Kle=2048,Wle=new RegExp("^https?://.+"),Gle=0;O({name:b().min(1).max(Fle),position:b().max(zle).optional(),location:b().max(qle).nullish(),photoUrl:b().max(Vle).regex($le).nullish(),bio:b().max(Hle).nullish(),linkedinUrl:b().max(Kle).regex(Wle).nullish(),sectionId:b().uuid().nullish(),sortOrder:ze().min(Gle).optional()});O({id:xe.string().uuid()});const Yle=200,Qle=200,Xle=200,Jle=2048,Zle=new RegExp("^(https?://|/).+"),ece=4e3,tce=2048,nce=new RegExp("^https?://.+"),rce=0;O({name:b().min(1).max(Yle),position:b().max(Qle).optional(),location:b().max(Xle).nullish(),photoUrl:b().max(Jle).regex(Zle).nullish(),bio:b().max(ece).nullish(),linkedinUrl:b().max(tce).regex(nce).nullish(),sectionId:b().uuid().nullish(),sortOrder:ze().min(rce).optional()});O({id:b().uuid(),name:b(),position:b(),location:b().nullish(),photoUrl:b().nullish(),bio:b().nullish(),linkedinUrl:b().nullish(),sectionId:b().uuid().nullish(),sortOrder:ze()});O({id:xe.string().uuid()});const sce=0,ice=0;O({sections:J(O({id:b().uuid(),sortOrder:ze().min(sce)})),members:J(O({id:b().uuid(),sectionId:b().uuid().nullish(),sortOrder:ze().min(ice)}))});O({sections:J(O({id:b().uuid(),title:b(),sortOrder:ze()})),members:J(O({id:b().uuid(),name:b(),position:b(),location:b().nullish(),photoUrl:b().nullish(),bio:b().nullish(),linkedinUrl:b().nullish(),sectionId:b().uuid().nullish(),sortOrder:ze()}))});O({geoLine:b().describe('Geographic presence line shown on the Team page hero, e.g. "Across Singapore · Indonesia · …"')});O({geoLine:b().describe('Geographic presence line shown on the Team page hero, e.g. "Across Singapore · Indonesia · …"')});O({geoLine:b().describe('Geographic presence line shown on the Team page hero, e.g. "Across Singapore · Indonesia · …"')});const ace=O({id:b().uuid(),fullName:b(),email:b(),phone:b().nullish(),linkedinUrl:b().nullish(),websiteUrl:b().nullish(),location:b().nullish(),background:b().nullish(),motivation:b().nullish(),status:b(),createdAt:xe.date()});J(ace);
59O({fromEmail:b().describe("Sender address, e.g. '100x100 <[email protected]>'"),toEmail:b().describe("Primary recipient"),ccEmail:b().nullish().describe("Optional CC recipient"),subjectTemplate:b().describe("Subject with {{variable}} placeholders"),bodyTemplate:b().describe("HTML body with {{variable}} placeholders"),resendApiKey:b().nullish().describe("Resend API key for sending notification emails")});O({fromEmail:b().describe("Sender address, e.g. '100x100 <[email protected]>'"),toEmail:b().describe("Primary recipient"),ccEmail:b().nullish().describe("Optional CC recipient"),subjectTemplate:b().describe("Subject with {{variable}} placeholders"),bodyTemplate:b().describe("HTML body with {{variable}} placeholders"),resendApiKey:b().nullish().describe("Resend API key for sending notification emails")});O({fromEmail:b().describe("Sender address, e.g. '100x100 <[email protected]>'"),toEmail:b().describe("Primary recipient"),ccEmail:b().nullish().describe("Optional CC recipient"),subjectTemplate:b().describe("Subject with {{variable}} placeholders"),bodyTemplate:b().describe("HTML body with {{variable}} placeholders"),resendApiKey:b().nullish().describe("Resend API key for sending notification emails")});const oce=60,lce=new RegExp("^#[0-9a-fA-F]{6}$");O({items:J(O({id:b().uuid(),name:b().min(1).max(oce),hex:b().regex(lce).describe('7-character hex colour like "#50FF96".'),isActive:ht(),createdAt:xe.date(),updatedAt:xe.date()}))});const cce=60,uce=new RegExp("^#[0-9a-fA-F]{6}$");O({name:b().min(1).max(cce),hex:b().regex(uce)});O({id:xe.string().uuid()});const dce=60,hce=new RegExp("^#[0-9a-fA-F]{6}$");O({name:b().min(1).max(dce),hex:b().regex(hce)});const fce=60,pce=new RegExp("^#[0-9a-fA-F]{6}$");O({id:b().uuid(),name:b().min(1).max(fce),hex:b().regex(pce).describe('7-character hex colour like "#50FF96".'),isActive:ht(),createdAt:xe.date(),updatedAt:xe.date()});O({id:xe.string().uuid()});O({id:xe.string().uuid()});const mce=60,gce=new RegExp("^#[0-9a-fA-F]{6}$");O({items:J(O({id:b().uuid(),name:b().min(1).max(mce),hex:b().regex(gce).describe('7-character hex colour like "#50FF96".'),isActive:ht(),createdAt:xe.date(),updatedAt:xe.date()}))});const yce=100,xce=500;O({limit:xe.number().min(1).max(xce).default(yce)});O({items:J(O({id:ze(),createdAt:xe.date(),userEmail:b(),userId:b().nullish(),action:b(),entity:b(),summary:b()}))});const bce=O({id:b().uuid(),slug:b(),title:b(),category:je(["News","Insights"]),excerpt:b().nullish(),coverImageUrl:b().nullish(),sourceUrl:b().nullish(),bodyHtml:b(),isPublished:ht(),publishedAt:xe.date(),createdAt:xe.date(),updatedAt:xe.date()});J(bce);const vce=240,wce=new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$"),Sce=300,kce=1e3,Cce=2048,Nce=new RegExp("^(https?://|/).+"),jce=2048,Ece=new RegExp("^(https?://|/).+");O({slug:b().min(1).max(vce).regex(wce),title:b().min(1).max(Sce),category:je(["News","Insights"]),excerpt:b().max(kce).nullish(),coverImageUrl:b().max(Cce).regex(Nce).nullish(),sourceUrl:b().max(jce).regex(Ece).nullish(),bodyHtml:b().optional(),isPublished:ht().optional(),publishedAt:xe.date().optional()});O({id:xe.string().uuid()});O({id:b().uuid(),slug:b(),title:b(),category:je(["News","Insights"]),excerpt:b().nullish(),coverImageUrl:b().nullish(),sourceUrl:b().nullish(),bodyHtml:b(),isPublished:ht(),publishedAt:xe.date(),createdAt:xe.date(),updatedAt:xe.date()});O({id:xe.string().uuid()});const Tce=240,Ace=new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$"),Mce=300,Oce=1e3,Rce=2048,Dce=new RegExp("^(https?://|/).+"),_ce=2048,Pce=new RegExp("^(https?://|/).+");O({slug:b().min(1).max(Tce).regex(Ace),title:b().min(1).max(Mce),category:je(["News","Insights"]),excerpt:b().max(Oce).nullish(),coverImageUrl:b().max(Rce).regex(Dce).nullish(),sourceUrl:b().max(_ce).regex(Pce).nullish(),bodyHtml:b().optional(),isPublished:ht().optional(),publishedAt:xe.date().optional()});O({id:b().uuid(),slug:b(),title:b(),category:je(["News","Insights"]),excerpt:b().nullish(),coverImageUrl:b().nullish(),sourceUrl:b().nullish(),bodyHtml:b(),isPublished:ht(),publishedAt:xe.date(),createdAt:xe.date(),updatedAt:xe.date()});O({id:xe.string().uuid()});O({slug:xe.string()});const Lce=2,Ice=200,Uce=200,Bce=40,Fce=500,zce=new RegExp("^https?://.+"),qce=500,Vce=new RegExp("^https?://.+"),$ce=5e3,Hce=O({fullName:b().min(Lce).max(Ice),email:b().email().max(Uce),phone:b().max(Bce).nullish(),linkedinUrl:b().max(Fce).regex(zce).nullish(),resumeUrl:b().max(qce).regex(Vce).nullish(),coverLetter:b().max($ce).nullish(),customFields:Wf(b(),b()).nullish()}),Kce=255,Wce=10485760,Gce=127;O({name:b().min(1).max(Kce).describe("Original file name."),size:ze(
59).min(1).max(Wce).describe("File size in bytes (max 10 MiB)."),contentType:b().min(1).max(Gce).describe("MIME type of the file (e.g. `image/jpeg`).")});const Yce=255,Qce=10485760,Xce=127;O({uploadURL:b().url().describe("Presigned GCS URL for PUT upload."),objectPath:b().describe("Normalized object path (e.g. `/objects/uploads/uuid`). Store this in your database."),metadata:O({name:b().min(1).max(Yce).describe("Original file name."),size:ze().min(1).max(Qce).describe("File size in bytes (max 10 MiB)."),contentType:b().min(1).max(Xce).describe("MIME type of the file (e.g. `image/jpeg`).")}).optional()});O({subtitle:b()});O({hero:O({line1:b(),line2:b(),highlight:b()}),heroImage:b().nullish(),whatYouGet:O({heading:b(),intro:b(),items:J(O({num:b(),title:b(),desc:b()}))}),howItWorks:O({heading:b(),intro:b()}),stages:O({items:J(O({label:b(),window:b(),body:b()}))}),signals:O({eyebrow:b(),heading:b(),items:J(O({num:b(),title:b(),desc:b()})),footnote:b()}),testimonials:O({eyebrow:b(),items:J(O({name:b(),role:b(),photo:b(),linkedin:b(),quote:b(),side:je(["left","right"])}))}),whoWeLookFor:O({heading:b(),introBold:b(),introTagline:b(),introBody:b(),subheading:b(),items:J(O({title:b(),body:b()}))}).optional(),womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});const Jce=O({slug:b(),title:b(),category:je(["News","Insights"]),excerpt:b().nullish(),coverImageUrl:b().nullish(),publishedAt:xe.date()});J(Jce);const Zce=240;O({slug:xe.string().min(1).max(Zce)});O({slug:b(),title:b(),category:je(["News","Insights"]),excerpt:b().nullish(),coverImageUrl:b().nullish(),sourceUrl:b().nullish(),bodyHtml:b(),publishedAt:xe.date()});O({subtitle:b()});O({subtitle:b()});O({subtitle:b()});O({hero:O({line1:b(),line2:b(),highlight:b()}),heroImage:b().nullish(),whatYouGet:O({heading:b(),intro:b(),items:J(O({num:b(),title:b(),desc:b()}))}),howItWorks:O({heading:b(),intro:b()}),stages:O({items:J(O({label:b(),window:b(),body:b()}))}),signals:O({eyebrow:b(),heading:b(),items:J(O({num:b(),title:b(),desc:b()})),footnote:b()}),testimonials:O({eyebrow:b(),items:J(O({name:b(),role:b(),photo:b(),linkedin:b(),quote:b(),side:je(["left","right"])}))}),whoWeLookFor:O({heading:b(),introBold:b(),introTagline:b(),introBody:b(),subheading:b(),items:J(O({title:b(),body:b()}))}).optional(),womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});O({hero:O({line1:b(),line2:b(),highlight:b()}),heroImage:b().nullish(),whatYouGet:O({heading:b(),intro:b(),items:J(O({num:b(),title:b(),desc:b()}))}),howItWorks:O({heading:b(),intro:b()}),stages:O({items:J(O({label:b(),window:b(),body:b()}))}),signals:O({eyebrow:b(),heading:b(),items:J(O({num:b(),title:b(),desc:b()})),footnote:b()}),testimonials:O({eyebrow:b(),items:J(O({name:b(),role:b(),photo:b(),linkedin:b(),quote:b(),side:je(["left","right"])}))}),whoWeLookFor:O({heading:b(),introBold:b(),introTagline:b(),introBody:b(),subheading:b(),items:J(O({title:b(),body:b()}))}).optional(),womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});O({hero:O({line1:b(),line2:b(),highlight:b()}),heroImage:b().nullish(),whatYouGet:O({heading:b(),intro:b(),items:J(O({num:b(),title:b(),desc:b()}))}),howItWorks:O({heading:b(),intro:b()}),stages:O({items:J(O({label:b(),window:b(),body:b()}))}),signals:O({eyebrow:b(),heading:b(),items:J(O({num:b(),title:b(),desc:b()})),footnote:b()}),testimonials:O({eyebrow:b(),items:J(O({name:b(),role:b(),photo:b(),linkedin:b(),quote:b(),side:je(["left","right"])}))}),whoWeLookFor:O({heading:b(),introBold:b(),introTagline:b(),introBody:b(),subheading:b(),items:J(O({title:b(),body:b()}))}).optional(),womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}
59))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});O({eyebrow:b(),heading:b(),description:b(),successTitle:b(),successMessage:b()});O({eyebrow:b(),heading:b(),description:b(),successTitle:b(),successMessage:b()});O({eyebrow:b(),heading:b(),description:b(),successTitle:b(),successMessage:b()});O({eyebrow:b(),heading:b(),description:b(),successTitle:b(),successMessage:b()});O({items:J(O({id:b().uuid(),clerkUserId:b().nullish(),email:b(),fullName:b().nullish(),role:je(["admin","marketing","jobs_manager","portfolio_editor"]),companyId:b().uuid().nullish(),canPublish:ht(),isActive:ht(),createdAt:xe.date(),lastSeenAt:xe.date().nullish()}))});const eue=!0;O({email:b().email(),fullName:b().nullish(),role:je(["admin","marketing","jobs_manager","portfolio_editor"]),companyId:b().uuid().nullish(),canPublish:ht().default(eue)});O({id:xe.string().uuid()});O({fullName:b().nullish(),role:je(["admin","marketing","jobs_manager","portfolio_editor"]).optional(),companyId:b().uuid().nullish(),canPublish:ht().optional(),isActive:ht().optional()});O({id:b().uuid(),clerkUserId:b().nullish(),email:b(),fullName:b().nullish(),role:je(["admin","marketing","jobs_manager","portfolio_editor"]),companyId:b().uuid().nullish(),canPublish:ht(),isActive:ht(),createdAt:xe.date(),lastSeenAt:xe.date().nullish()});O({id:xe.string().uuid()});const tue=500,nue=255,rue=64;O({eventType:je(["pageview","apply_click"]),path:b().max(tue),referrerHost:b().max(nue).nullish(),device:je(["mobile","tablet","desktop"]),sessionId:b().max(rue)});O({terminatedWithPublishedJobs:J(O({companyId:b().uuid(),slug:b(),name:b(),publishedJobCount:ze(),jobs:J(O({id:b().uuid(),slug:b(),title:b()}))}))});const sue=7,iue=90;O({days:xe.number().min(1).max(iue).default(sue)});O({days:ze(),totals:O({pageviews:ze(),uniqueSessions:ze(),conversions:ze(),conversionRate:ze()}),dailyTrend:J(O({date:b(),views:ze()})),topPages:J(O({key:b(),views:ze()})),topReferrers:J(O({key:b(),views:ze()})),deviceBreakdown:J(O({key:b(),views:ze()}))});O({hero:O({line1:b(),highlight:b()}),heroImage:b().nullish().describe(`Optional URL for the cinematic hero background image. If null/missing, the public site falls back to the shipped default.
60`),why:O({heading:b(),intro:b(),reasons:J(O({num:b(),title:b(),desc:b()}))}),stats:O({items:J(O({stat:b(),label:b()}))}),lpQuote:O({quote:b(),attribution:b(),attributionSub:b()}),partners:O({heading:b(),items:J(O({title:b(),desc:b()}))}),deiCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});O({hero:O({line1:b(),highlight:b()}),heroImage:b().nullish().describe(`Optional URL for the cinematic hero background image. If null/missing, the public site falls back to the shipped default.
61`),why:O({heading:b(),intro:b(),reasons:J(O({num:b(),title:b(),desc:b()}))}),stats:O({items:J(O({stat:b(),label:b()}))}),lpQuote:O({quote:b(),attribution:b(),attributionSub:b()}),partners:O({heading:b(),items:J(O({title:b(),desc:b()}))}),deiCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});O({hero:O({line1:b(),highlight:b()}),heroImage:b().nullish().describe(`Optional URL for the cinematic hero background image. If null/missing, the public site falls back to the shipped default.
62`),why:O({heading:b(),intro:b(),reasons:J(O({num:b(),title:b(),desc:b()}))}),stats:O({items:J(O({stat:b(),label:b()}))}),lpQuote:O({quote:b(),attribution:b(),attributionSub:b()}),partners:O({heading:b(),items:J(O({title:b(),desc:b()}))}),deiCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});O({hero:O({line1:b(),highlight:b()}),heroImage:b().nullish().describe(`Optional URL for the cinematic hero background image. If null/missing, the public site falls back to the shipped default.
63`),why:O({heading:b(),intro:b(),reasons:J(O({num:b(),title:b(),desc:b()}))}),stats:O({items:J(O({stat:b(),label:b()}
63))}),lpQuote:O({quote:b(),attribution:b(),attributionSub:b()}),partners:O({heading:b(),items:J(O({title:b(),desc:b()}))}),deiCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).nullish(),cta:O({heading:b(),label:b(),href:b()})});const aue="",oue="",lue="",cue="";O({womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).optional(),hero:O({line1:b(),line2:b(),highlight:b()}),intro:b(),thesis:O({eyebrow:b(),statement:b()}),principles:O({heading:b().default(aue).describe(`Optional heading shown above the principles list. Empty string hides it.
64`),subheading:b().default(oue).describe(`Optional supporting subheading. Empty string hides it.
65`),items:J(O({num:b(),title:b(),desc:b(),example:b().nullish().describe(`Optional italic example shown below the description on the public site.
66`)}))}),metrics:O({eyebrow:b(),heading:b().default(lue).describe(`Optional larger heading shown alongside the eyebrow. Empty string hides it.
67`),subheading:b().default(cue).describe(`Optional supporting subheading. Empty string hides it.
68`),items:J(O({label:b(),value:b(),sub:b()}))})});const uue="",due="",hue="",fue="";O({womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).optional(),hero:O({line1:b(),line2:b(),highlight:b()}),intro:b(),thesis:O({eyebrow:b(),statement:b()}),principles:O({heading:b().default(uue).describe(`Optional heading shown above the principles list. Empty string hides it.
69`),subheading:b().default(due).describe(`Optional supporting subheading. Empty string hides it.
70`),items:J(O({num:b(),title:b(),desc:b(),example:b().nullish().describe(`Optional italic example shown below the description on the public site.
71`)}))}),metrics:O({eyebrow:b(),heading:b().default(hue).describe(`Optional larger heading shown alongside the eyebrow. Empty string hides it.
72`),subheading:b().default(fue).describe(`Optional supporting subheading. Empty string hides it.
73`),items:J(O({label:b(),value:b(),sub:b()}))})});const pue="",mue="",gue="",yue="";O({womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).optional(),hero:O({line1:b(),line2:b(),highlight:b()}),intro:b(),thesis:O({eyebrow:b(),statement:b()}),principles:O({heading:b().default(pue).describe(`Optional heading shown above the principles list. Empty string hides it.
74`),subheading:b().default(mue).describe(`Optional supporting subheading. Empty string hides it.
75`),items:J(O({num:b(),title:b(),desc:b(),example:b().nullish().describe(`Optional italic example shown below the description on the public site.
76`)}))}),metrics:O({eyebrow:b(),heading:b().default(gue).describe(`Optional larger heading shown alongside the eyebrow. Empty string hides it.
77`),subheading:b().default(yue).describe(`Optional supporting subheading. Empty string hides it.
78`),items:J(O({label:b(),value:b(),sub:b()}))})});const xue="",bue="",vue="",wue="";O({womenCommitment:O({heading:b(),stats:J(O({value:b(),label:b()})).nullish(),paragraphs:J(b()),partners:J(O({name:b(),logoUrl:b(),websiteUrl:b()}))}).optional(),hero:O({line1:b(),line2:b(),highlight:b()}),intro:b(),thesis:O({eyebrow:b(),statement:b()}),principles:O({heading:b().default(xue).describe(`Optional heading shown above the principles list. Empty string hides it.
79`),subheading:b().default(bue).describe(`Optional supporting subheading. Empty string hides it.
80`),items:J(O({num:b(),title:b(),desc:b(),example:b().nullish().describe(`Optional italic example shown below the description on the public site.
81`)}))}),metrics:O({eyebrow:b(),heading:b().default(vue).describe(`Optional larger heading shown alongside the eyebrow. Empty string hides it.
82`),subheading:b().default(wue).describe(`Optional supporting subheading. Empty string hides it.
83`),items:J(O({label:b(),value:b(),sub:b()}))})});const Sue=new RegExp("^[a-z][a-z0-9_]{1,49}$"),kue=100,Cue=150,Nue=100,jue=30,Eue=30;O({heading:b().describe('Main page headline (e.g. "Report a concern.")'),subheading:b().describe("Secondary headline beneath the main heading."),paragraphs:J(b()).describe("Body paragraphs explaining the grievance process."),contactEmail:b().describe("Contact email address for grievance submissions."),contactAddress:J(b()).describe("Postal address lines for written submissions."),privacyNotice:b().describe("Privacy notice paragraph shown at the bottom of the page."),formFields:J(O({id:b().regex(Sue).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(kue),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(Cue),options:J(b().min(1).max(Nue)).max(jue)})).min(1).max(Eue).describe("CMS-managed fields displayed in the public complaint form.")});const Tue=1e4;O({responses:Wf(b(),b().max(Tue))});const Aue=new RegExp("^[a-z][a-z0-9_]{1,49}$"),Mue=100,Oue=150,Rue=100,Due=30,_ue=30;O({heading:b().describe('Main page headline (e.g. "Report a concern.")'),subheading:b().describe("Secondary headline beneath the main heading."),paragraphs:J(b()).describe("Body paragraphs explaining the grievance process."),contactEmail:b().describe("Contact email address for grievance submissions."),contactAddress:J(b()).describe("Postal address lines for written submissions."),privacyNotice:b().describe("Privacy notice paragraph shown at the bottom of the page."),formFields:J(O({id:b().regex(Aue).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(Mue),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(Oue),options:J(b().min(1).max(Rue)).max(Due)})).min(1).max(_ue).describe("CMS-managed fields displayed in the public complaint form.")});const Pue=new RegExp("^[a-z][a-z0-9_]{1,49}$"),Lue=100,Iue=150,Uue=100,Bue=30,Fue=30;O({heading:b().describe('Main page headline (e.g. "Report a concern.")'),subheading:b().describe("Secondary headline beneath the main heading."),paragraphs:J(b()).describe("Body paragraphs explaining the grievance process."),contactEmail:b().describe("Contact email address for grievance submissions."),contactAddress:J(b()).describe("Postal address lines for written submissions."),privacyNotice:b().describe("Privacy notice paragraph shown at the bottom of the page."),formFields:J(O({id:b().regex(Pue).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(Lue),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(Iue),options:J(b().min(1).max(Uue)).max(Bue)})).min(1).max(Fue).describe("CMS-managed fields displayed in the public complaint form.")});const zue=new RegExp("^[a-z][a-z0-9_]{1,49}$"),que=100,Vue=150,$ue=100,Hue=30,Kue=30;O({heading:b().describe('Main page headline (e.g. "Report a concern.")'),subheading:b().describe("Secondary headline beneath the main heading."),paragraphs:J(b()).describe("Body paragraphs explaining the grievance process."),contactEmail:b().describe("Contact email address for grievance submissions."),contactAddress:J(b()).describe("Postal address lines for written submissions."),privacyNotice:b().describe("Privacy notice paragraph shown at the bottom of the page."),formFields:J(O({id:b().regex(zue).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(que),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(Vue),options:J(b().min(1).max($ue)).max(Hue)})).min(1).max(Kue).describe("CMS-managed fields displayed in the public complaint form.")});const Wue=new RegExp("^[a-z][a-z0-9_]{1,49}$"),Gue=100,Yue=150,Que=100,Xue=30,Jue=O({id:b().uuid(),responses:Wf(b(),b()),fieldSnapshot:J(O({id:b().regex(Wue).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(Gue),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(Yue),options:J(b().min(1).max(Que)).max(Xue)})),status:je(["new","reviewed","resolved"]),submittedAt:xe.date(),updatedAt:xe.date()});J(Jue);O({id:xe.string().uuid()});const Zue=new RegExp("^[a-z][a-z0-9_]{1,49}$"),ede=100,tde=150,nde=100,rde=30;O({id:b().uuid(),responses:Wf(b(),b()),fieldSnapshot:J(O({id:b().regex(Zue).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(ede),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(tde),options:J(b().min(1).max(nde)).max(rde)})),status:je(["new","reviewed","resolved"]),submittedAt:xe.date(),updatedAt:xe.date()});O({id:xe.string().uuid()});O({status:je(["new","reviewed","resolved"])});const sde=new RegExp("^[a-z][a-z0-9_]{1,49}$"),ide=100,ade=150,ode=100,lde=30;O({id:b().uuid(),responses:Wf(b(),b()),fieldSnapshot:J(O({id:b().regex(sde).describe("Stable field identifier used to store submitted answers."),label:b().min(1).max(ide),type:je(["text","email","tel","textarea","select"]),required:ht(),placeholder:b().max(ade),options:J(b().min(1).max(ode)).max(lde)})),status:je(["new","reviewed","resolved"]),submittedAt:xe.date(),updatedAt:xe.date()});const cde=new RegExp("^#[0-9a-fA-F]{6}$");O({navbarLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),footerLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),featureColor:b().regex(cde).nullish().describe('Active brand/feature colour hex (e.g. "#50FF96"), or null if none activated.'),faviconUrl:b().nullish().describe("URL of the uploaded favicon image, or null to use the default.")});const ude=new RegExp("^#[0-9a-fA-F]{6}$");O({navbarLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),footerLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),featureColor:b().regex(ude).nullish().describe('Active brand/feature colour hex (e.g. "#50FF96"), or null if none activated.'),faviconUrl:b().nullish().describe("URL of the uploaded favicon image, or null to use the default.")});const dde=new RegExp("^#[0-9a-fA-F]{6}$");O({navbarLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),footerLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),featureColor:b().regex(dde).nullish().describe('Active brand/feature colour hex (e.g. "#50FF96"), or null if none activated.'),faviconUrl:b().nullish().describe("URL of the uploaded favicon image, or null to use the default.")});const hde=new RegExp("^#[0-9a-fA-F]{6}$");O({navbarLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),footerLogoKey:je(["white","mint-bright","mint-bright-x","mint-duo-dark"]).describe("Stable identifier of one of the bundled logo files served from\n`artifacts/site/public/logos/<key>.png`.\n"),featureColor:b().regex(hde).nullish().describe('Active brand/feature colour hex (e.g. "#50FF96"), or null if none activated.'),faviconUrl:b().nullish().describe("URL of the uploaded favicon image, or null to use the default.")});var ew="focusScope.autoFocusOnMount",tw="focusScope.autoFocusOnUnmount",OO={bubbles:!1,cancelable:!0},fde="FocusScope",gI=N.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[l,d]=N.useState(null),h=ki(s),p=ki(i),m=N.useRef(null),g=Cr(e,S=>d(S)),x=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let S=function(A){if(x.paused||!l)return;const D=A.target;l.contains(D)?m.current=D:no(m.current,{select:!0})},C=function(A){if(x.paused||!l)return;const D=A.relatedTarget;D!==null&&(l.contains(D)||no(m.current,{select:!0}))},j=function(A){if(document.activeElement===document.body)for(const M of A)M.removedNodes.length>0&&no(l)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const E=new MutationObserver(j);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),E.disconnect()}}},[r,l,x.paused]),N.useEffect(()=>{if(l){DO.add(x);const S=document.activeElement;if(!l.contains(S)){const j=new CustomEvent(ew,OO);l.addEventListener(ew,h),l.dispatchEvent(j),j.defaultPrevented||(pde(bde(yI(l)),{select:!0}),document.activeElement===S&&no(l))}return()=>{l.removeEventListener(ew,h),setTimeout(()=>{const j=new CustomEvent(tw,OO);l.addEventListener(tw,p),l.dispatchEvent(j),j.defaultPrevented||no(S??document.body,{select:!0}),l.removeEventListener(tw,p),DO.remove(x)},0)}}},[l,h,p,x]);const v=N.useCallback(S=>{if(!n&&!r||x.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,j=document.activeElement;if(C&&j){const E=S.currentTarget,[A,D]=mde(E);A&&D?!S.shiftKey&&j===D?(S.preventDefault(),n&&no(A,{select:!0})):S.shiftKey&&j===A&&(S.preventDefault(),n&&no(D,{select:!0})):j===E&&S.preventDefault()}},[n,r,x.paused]);return c.jsx(Cn.div,{tabIndex:-1,...a,ref:g,onKeyDown:v})});gI.displayName=fde;function pde(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(no(r,{select:e}),document.activeElement!==n)return}function mde(t){const e=yI(t),n=RO(e,t),r=RO(e.reverse(),t);return[n,r]}function yI(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function RO(t,e){for(const n of t)if(!gde(n,{upTo:e}))return n}function gde(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function yde(t){return t instanceof HTMLInputElement&&"select"in t}function no(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&yde(t)&&e&&t.select()}}var DO=xde();function xde(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=_O(t,e),t.unshift(e)},remove(e){t=_O(t,e),t[0]?.resume()}}}function _O(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function bde(t){return t.filter(e=>e.tagName!=="A")}var nw=0;function vde(){N.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??PO()),document.body.insertAdjacentElement("beforeend",t[1]??PO()),nw++,()=>{nw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
vendor: 5,874 bytes, lines 83-98
83=>e.remove()),nw--}},[])}function PO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var yi=function(){return yi=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},yi.apply(this,arguments)};function xI(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function wde(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var hg="right-scroll-bar-position",fg="width-before-scroll-bar",Sde="with-scroll-bars-hidden",kde="--removed-body-scroll-bar-size";function rw(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Cde(t,e){var n=N.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var Nde=typeof window<"u"?N.useLayoutEffect:N.useEffect,LO=new WeakMap;function jde(t,e){var n=Cde(null,function(r){return t.forEach(function(s){return rw(s,r)})});return Nde(function(){var r=LO.get(n);if(r){var s=new Set(r),i=new Set(t),a=n.current;s.forEach(function(l){i.has(l)||rw(l,null)}),i.forEach(function(l){s.has(l)||rw(l,a)})}LO.set(n,t)},[t]),n}function Ede(t){return t}function Tde(t,e){e===void 0&&(e=Ede);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var a=e(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var d=function(){var p=a;a=[],p.forEach(i)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(p){a.push(p),h()},filter:function(p){return a=a.filter(p),n}}}};return s}function Ade(t){t===void 0&&(t={});var e=Tde(null);return e.options=yi({async:!0,ssr:!1},t),e}var bI=function(t){var e=t.sideCar,n=xI(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return N.createElement(r,yi({},n))};bI.isSideCarExport=!0;function Mde(t,e){return t.useMedium(e),bI}var vI=Ade(),sw=function(){},jx=N.forwardRef(function(t,e){var n=N.useRef(null),r=N.useState({onScrollCapture:sw,onWheelCapture:sw,onTouchMoveCapture:sw}),s=r[0],i=r[1],a=t.forwardProps,l=t.children,d=t.className,h=t.removeScrollBar,p=t.enabled,m=t.shards,g=t.sideCar,x=t.noRelative,v=t.noIsolation,S=t.inert,C=t.allowPinchZoom,j=t.as,E=j===void 0?"div":j,A=t.gapMode,D=xI(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=g,I=jde([n,e]),_=yi(yi({},D),s);return N.createElement(N.Fragment,null,p&&N.createElement(M,{sideCar:vI,removeScrollBar:h,shards:m,noRelative:x,noIsolation:v,inert:S,setCallbacks:i,allowPinchZoom:!!C,lockRef:n,gapMode:A}),a?N.cloneElement(N.Children.only(l),yi(yi({},_),{ref:I})):N.createElement(E,yi({},_,{className:d,ref:I}),l))});jx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jx.classNames={fullWidth:fg,zeroRight:hg};var Ode=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rde(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Ode();return e&&t.setAttribute("nonce",e),t}function Dde(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function _de(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Pde=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Rde())&&(Dde(e,n),_de(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Lde=function(){var t=Pde();return function(e,n){N.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},wI=function(){var t=Lde(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},Ide={left:0,top:0,right:0,gap:0},iw=function(t){return parseInt(t||"",10)||0},Ude=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[iw(n),iw(r),iw(s)]},Bde=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Ide;var e=Ude(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Fde=wI(),Tu="data-scroll-locked",zde=function(t,e,n,r){var s=t.left,i=t.top,a=t.right,l=t.gap;return n===void 0&&(n="margin"),`
84  .`.concat(Sde,` {
85   overflow: hidden `).concat(r,`;
86   padding-right: `).concat(l,"px ").concat(r,`;
87  }
88  body[`).concat(Tu,`] {
89    overflow: hidden `).concat(r,`;
90    overscroll-behavior: contain;
91    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
92    padding-left: `.concat(s,`px;
93    padding-top: `).concat(i,`px;
94    padding-right: `).concat(a,`px;
95    margin-left:0;
96    margin-top:0;
97    margin-right: `).concat(l,"px ").concat(r,`;
98    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
98")].filter(Boolean).join(""),`
99  }
100  
101  .`).concat(hg,` {
102    right: `).concat(l,"px ").concat(r,`;
103  }
104  
105  .`).concat(fg,` {
106    margin-right: `).concat(l,"px ").concat(r,`;
107  }
108  
109  .`).concat(hg," .").concat(hg,` {
110    right: 0 `).concat(r,`;
111  }
112  
113  .`).concat(fg," .").concat(fg,` {
114    margin-right: 0 `).concat(r,`;
115  }
116  
117  body[`).concat(Tu,`] {
118    `).concat(kde,": ").concat(l,`px;
119  }
120`)},IO=function(){var t=parseInt(document.body.getAttribute(Tu)||"0",10);return isFinite(t)?t:0},qde=function(){N.useEffect(function(){return document.body.setAttribute(Tu,(IO()+1).toString()),function(){var t=IO()-1;t<=0?document.body.removeAttribute(Tu):document.body.setAttribute(Tu,t.toString())}},[])},Vde=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;qde();var i=N.useMemo(function(){return Bde(s)},[s]);return N.createElement(Fde,{styles:zde(i,!e,s,n?"":"!important")})},Y1=!1;if(typeof window<"u")try{var Am=Object.defineProperty({},"passive",{get:function(){return Y1=!0,!0}});window.addEventListener("test",Am,Am),window.removeEventListener("test",Am,Am)}catch{Y1=!1}var Wc=Y1?{passive:!1}:!1,$de=function(t){return t.tagName==="TEXTAREA"},SI=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!$de(t)&&n[e]==="visible")},Hde=function(t){return SI(t,"overflowY")},Kde=function(t){return SI(t,"overflowX")},UO=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=kI(t,r);if(s){var i=CI(t,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Wde=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Gde=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},kI=function(t,e){return t==="v"?Hde(e):Kde(e)},CI=function(t,e){return t==="v"?Wde(e):Gde(e)},Yde=function(t,e){return t==="h"&&e==="rtl"?-1:1},Qde=function(t,e,n,r,s){var i=Yde(t,window.getComputedStyle(e).direction),a=i*r,l=n.target,d=e.contains(l),h=!1,p=a>0,m=0,g=0;do{if(!l)break;var x=CI(t,l),v=x[0],S=x[1],C=x[2],j=S-C-i*v;(v||j)&&kI(t,l)&&(m+=j,g+=v);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&l!==document.body||d&&(e.contains(l)||e===l));return(p&&Math.abs(m)<1||!p&&Math.abs(g)<1)&&(h=!0),h}
vendor: 5,064 bytes, lines 120-123
120,Mm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},BO=function(t){return[t.deltaX,t.deltaY]},FO=function(t){return t&&"current"in t?t.current:t},Xde=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Jde=function(t){return`
121  .block-interactivity-`.concat(t,` {pointer-events: none;}
122  .allow-interactivity-`).concat(t,` {pointer-events: all;}
123`)},Zde=0,Gc=[];function ehe(t){var e=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),s=N.useState(Zde++)[0],i=N.useState(wI)[0],a=N.useRef(t);N.useEffect(function(){a.current=t},[t]),N.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var S=wde([t.lockRef.current],(t.shards||[]).map(FO),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var l=N.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!a.current.allowPinchZoom;var j=Mm(S),E=n.current,A="deltaX"in S?S.deltaX:E[0]-j[0],D="deltaY"in S?S.deltaY:E[1]-j[1],M,I=S.target,_=Math.abs(A)>Math.abs(D)?"h":"v";if("touches"in S&&_==="h"&&I.type==="range")return!1;var L=window.getSelection(),V=L&&L.anchorNode,B=V?V===I||V.contains(I):!1;if(B)return!1;var K=UO(_,I);if(!K)return!0;if(K?M=_:(M=_==="v"?"h":"v",K=UO(_,I)),!K)return!1;if(!r.current&&"changedTouches"in S&&(A||D)&&(r.current=M),!M)return!0;var ee=r.current||M;return Qde(ee,C,S,ee==="h"?A:D)},[]),d=N.useCallback(function(S){var C=S;if(!(!Gc.length||Gc[Gc.length-1]!==i)){var j="deltaY"in C?BO(C):Mm(C),E=e.current.filter(function(M){return M.name===C.type&&(M.target===C.target||C.target===M.shadowParent)&&Xde(M.delta,j)})[0];if(E&&E.should){C.cancelable&&C.preventDefault();return}if(!E){var A=(a.current.shards||[]).map(FO).filter(Boolean).filter(function(M){return M.contains(C.target)}),D=A.length>0?l(C,A[0]):!a.current.noIsolation;D&&C.cancelable&&C.preventDefault()}}},[]),h=N.useCallback(function(S,C,j,E){var A={name:S,delta:C,target:j,should:E,shadowParent:the(j)};e.current.push(A),setTimeout(function(){e.current=e.current.filter(function(D){return D!==A})},1)},[]),p=N.useCallback(function(S){n.current=Mm(S),r.current=void 0},[]),m=N.useCallback(function(S){h(S.type,BO(S),S.target,l(S,t.lockRef.current))},[]),g=N.useCallback(function(S){h(S.type,Mm(S),S.target,l(S,t.lockRef.current))},[]);N.useEffect(function(){return Gc.push(i),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Wc),document.addEventListener("touchmove",d,Wc),document.addEventListener("touchstart",p,Wc),function(){Gc=Gc.filter(function(S){return S!==i}),document.removeEventListener("wheel",d,Wc),document.removeEventListener("touchmove",d,Wc),document.removeEventListener("touchstart",p,Wc)}},[]);var x=t.removeScrollBar,v=t.inert;return N.createElement(N.Fragment,null,v?N.createElement(i,{styles:Jde(s)}):null,x?N.createElement(Vde,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function the(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const nhe=Mde(vI,ehe);var NI=N.forwardRef(function(t,e){return N.createElement(jx,yi({},t,{ref:e,sideCar:nhe}))});NI.classNames=jx.classNames;var rhe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Yc=new WeakMap,Om=new WeakMap,Rm={},aw=0,jI=function(t){return t&&(t.host||jI(t.parentNode))},she=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=jI(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},ihe=function(t,e,n,r){var s=she(e,Array.isArray(t)?t:[t]);Rm[n]||(Rm[n]=new WeakMap);var i=Rm[n],a=[],l=new Set,d=new Set(s),h=function(m){!m||l.has(m)||(l.add(m),h(m.parentNode))};s.forEach(h);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(l.has(g))p(g);else try{var x=g.getAttribute(r),v=x!==null&&x!=="false",S=(Yc.get(g)||0)+1,C=(i.get(g)||0)+1;Yc.set(g,S),i.set(g,C),a.push(g),S===1&&v&&Om.set(g,!0),C===1&&g.setAttribute(n,"true"),v||g.setAttribute(r,"true")}catch(j){console.error("aria-hidden: cannot operate on ",g,j)}})};return p(e),l.clear(),aw++,function(){a.forEach(function(m){var g=Yc.get(m)-1,x=i.get(m)-1;Yc.set(m,g),i.set(m,x),g||(Om.has(m)||m.removeAttribute(r),Om.delete(m)),x||m.removeAttribute(n)}),aw--,aw||(Yc=new WeakMap,Yc=new WeakMap,Om=new WeakMap,Rm={})}},ahe=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=rhe(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),ihe(r,s,n,"aria-hidden")):function(){return null}},Ex="Dialog",[EI]=_f(Ex),[ohe,ei]=EI(Ex),TI=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:
vendor: 4,490 bytes, lines 123-127
123a=!0}=t,l=N.useRef(null),d=N.useRef(null),[h,p]=aP({prop:r,defaultProp:s??!1,onChange:i,caller:Ex});return c.jsx(ohe,{scope:e,triggerRef:l,contentRef:d,contentId:jv(),titleId:jv(),descriptionId:jv(),open:h,onOpenChange:p,onOpenToggle:N.useCallback(()=>p(m=>!m),[p]),modal:a,children:n})};TI.displayName=Ex;var AI="DialogTrigger",lhe=N.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ei(AI,n),i=Cr(e,s.triggerRef);return c.jsx(Cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":pC(s.open),...r,ref:i,onClick:Ht(t.onClick,s.onOpenToggle)})});lhe.displayName=AI;var hC="DialogPortal",[che,MI]=EI(hC,{forceMount:void 0}),OI=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=ei(hC,e);return c.jsx(che,{scope:e,forceMount:n,children:N.Children.map(r,a=>c.jsx(Yl,{present:n||i.open,children:c.jsx(cx,{asChild:!0,container:s,children:a})}))})};OI.displayName=hC;var Xg="DialogOverlay",RI=N.forwardRef((t,e)=>{const n=MI(Xg,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=ei(Xg,t.__scopeDialog);return i.modal?c.jsx(Yl,{present:r||i.open,children:c.jsx(dhe,{...s,ref:e})}):null});RI.displayName=Xg;var uhe=Cg("DialogOverlay.RemoveScroll"),dhe=N.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ei(Xg,n);return c.jsx(NI,{as:uhe,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Cn.div,{"data-state":pC(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),zl="DialogContent",DI=N.forwardRef((t,e)=>{const n=MI(zl,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=ei(zl,t.__scopeDialog);return c.jsx(Yl,{present:r||i.open,children:i.modal?c.jsx(hhe,{...s,ref:e}):c.jsx(fhe,{...s,ref:e})})});DI.displayName=zl;var hhe=N.forwardRef((t,e)=>{const n=ei(zl,t.__scopeDialog),r=N.useRef(null),s=Cr(e,n.contentRef,r);return N.useEffect(()=>{const i=r.current;if(i)return ahe(i)},[]),c.jsx(_I,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ht(t.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ht(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:Ht(t.onFocusOutside,i=>i.preventDefault())})}),fhe=N.forwardRef((t,e)=>{const n=ei(zl,t.__scopeDialog),r=N.useRef(!1),s=N.useRef(!1);return c.jsx(_I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),_I=N.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,l=ei(zl,n),d=N.useRef(null),h=Cr(e,d);return vde(),c.jsxs(c.Fragment,{children:[c.jsx(gI,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(lx,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pC(l.open),...a,ref:h,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(phe,{titleId:l.titleId}),c.jsx(ghe,{contentRef:d,descriptionId:l.descriptionId})]})]})}),fC="DialogTitle",PI=N.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ei(fC,n);return c.jsx(Cn.h2,{id:s.titleId,...r,ref:e})});PI.displayName=fC;var LI="DialogDescription",II=N.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ei(LI,n);return c.jsx(Cn.p,{id:s.descriptionId,...r,ref:e})});II.displayName=LI;var UI="DialogClose",BI=N.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ei(UI,n);return c.jsx(Cn.button,{type:"button",...r,ref:e,onClick:Ht(t.onClick,()=>s.onOpenChange(!1))})});BI.displayName=UI;function pC(t){return t?"open":"closed"}var FI="DialogTitleWarning",[Fke,zI]=D9(FI,{contentName:zl,titleName:fC,docsSlug:"dialog"}),phe=({titleId:t})=>{const e=zI(FI),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
124
125If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
126
127For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return N.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null}
127,mhe="DialogDescriptionWarning",ghe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zI(mhe).contentName}}.`;return N.useEffect(()=>{const s=t.current?.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},yhe=TI,xhe=OI,qI=RI,VI=DI,$I=PI,HI=II,bhe=BI;const vhe=yhe,whe=xhe,KI=N.forwardRef(({className:t,...e},n)=>c.jsx(qI,{ref:n,className:er("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));KI.displayName=qI.displayName;const WI=N.forwardRef(({className:t,children:e,...n},r)=>c.jsxs(whe,{children:[c.jsx(KI,{}),c.jsxs(VI,{ref:r,className:er("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[e,c.jsxs(bhe,{className:"absolute right-4 top-4 roun
127ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(Zs,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));WI.displayName=VI.displayName;const GI=({className:t,...e})=>c.jsx("div",{className:er("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});GI.displayName="DialogHeader";const YI=({className:t,...e})=>c.jsx("div",{className:er("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});YI.displayName="DialogFooter";const QI=N.forwardRef(({className:t,...e},n)=>c.jsx($I,{ref:n,className:er("text-lg font-semibold leading-none tracking-tight",t),...e}));QI.displayName=$I.displayName;const XI=N.forwardRef(({className:t,...e},n)=>c.jsx(HI,{ref:n,className:er("text-sm text-muted-foreground",t),...e}));XI.displayName=HI.displayName;var She=Symbol.for("react.lazy"),Jg=Mf[" use ".trim().toString()];function khe(t){return typeof t=="object"&&t!==null&&"then"in t}function JI(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===She&&"_payload"in t&&khe(t._payload)}function ZI(t){const e=Nhe(t),n=N.forwardRef((r,s)=>{let{children:i,...a}=r;JI(i)&&typeof Jg=="function"&&(i=Jg(i._payload));const l=N.Children.toArray(i),d=l.find(Ehe);if(d){const h=d.props.children,p=l.map(m=>m===d?N.Children.count(h)>1?N.Children.only(null):N.isValidElement(h)?h.props.children:null:m);return c.jsx(e,{...a,ref:s,children:N.isValidElement(h)?N.cloneElement(h,void 0,p):null})}return c.jsx(e,{...a,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var Che=ZI("Slot");function Nhe(t){const e=N.forwardRef((n,r)=>{let{children:s,...i}=n;if(JI(s)&&typeof Jg=="function"&&(s=Jg(s._payload)),N.isValidElement(s)){const a=Ahe(s),l=The(i,s.props);return s.type!==N.Fragment&&(l.ref=r?ek(r,a):a),N.cloneElement(s,l)}return N.Children.count(s)>1?N.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var jhe=Symbol("radix.slottable");function Ehe(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jhe}function The(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...l)=>{const d=i(...l);return s(...l),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function Ahe(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const Mhe=sk("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground shadow-sm border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),gi=N.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const a=r?Che:"button";return c.jsx(a,{className:er(Mhe({variant:e,size:n,className:t})),ref:i,...s})});gi.displayName="Button";function Ohe(){if(typeof navigator>"u")return"desktop";const t=navigator.userAgent||"";return/iPad|Tablet|PlayBook|(Android(?!.*Mobile))/i.test(t)?"tablet":/Mobi|Android|iPhone|iPod|IEMobile|BlackBerry/i.test(t)?"mobile":"desktop"}function Rhe(){if(typeof window>"u")return"ssr";try{const t="100x100.sid";let e=window.sessionStorage.getItem(t);return e||(e=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2)+Date.now().toString(36),window.sessionStorage.setItem(t,e)),e}catch{return"no-storage"}}function Q1(t){if(typeof window>"u")return;const n=`${"/".replace(/\/$/,"")}/api/analytics/event`,r=JSON.stringify({eventType:t.eventType,path:t.path,referrerHost:t.referrerHost??null,device:Ohe(),sessionId:Rhe()});try{if(typeof navigator<"u"&&"sendBeacon"in navigator){const s=new Blob([r],{type:"application/json"});if(navigator.sendBeacon(n,s))return}fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r,keepalive:!0,credentials:"same-origin"}).catch(()=>{})}catch{}}function Dhe(){if(typeof document>"u")return null;const t=document.referrer;if(!t)return null;try{const e=new URL(t);return e.hostname===window.location.hostname?null:e.hostname||null}catch{return null}}function _he(){const[t]=Ti(),e=N.useRef(null),n=N.useRef(Dhe());N.useEffect(()=>{typeof window>"u"||t.startsWith("/admin")||t.startsWith("/sign-in")||t.startsWith("/sign-up")||e.current!==t&&(e.current=t,Q1({eventType:"pageview",path:t,referrerHost:n.current}),n.current=null)},[t])}const Dm=t=>mI(e=>e===""?null:e,t),Phe=Hce.extend({phone:Dm(b().max(40).nullish()),linkedinUrl:Dm(b().max(500).regex(/^https?:\/\/.+/).nullish()),resumeUrl:Dm(b().max(500).regex(/^https?:\/\/.+/).nullish()),coverLetter:Dm(b().max(5e3).nullish())});function Lhe(t){return t.split(/\n\s*\n/).map(e=>
127e.trim()).filter(Boolean)}function Ihe(t){return t.split(/\n+/).map(e=>e.replace(/^[-•·*]\s*/,"").trim()).filter(Boolean)}function Uhe(){const e=Xy().slug,[,n]=Ti(),[r,s]=N.useState(!1),[i,a]=N.useState(null),{toast:l}=ZS(),{data:d,isLoading:h,isError:p}=OG(e??"");ns({title:d?`${d.title} at ${d.company.name}`:"Careers",description:d?`${d.title} at ${d.company.name} — ${d.summary}`:"Browse open roles at 100x100 and our portfolio companies across climate tech in Southeast Asia."});const m=NX(),g=uC({resolver:dI(Phe),defaultValues:{fullName:"",email:"",phone:"",linkedinUrl:"",resumeUrl:"",coverLetter:""}}),x=g.handleSubmit(async j=>{if(e)try{const E={...j,phone:j.phone||null,linkedinUrl:j.linkedinUrl||null,resumeUrl:j.resumeUrl||null,coverLetter:j.coverLetter||null},A=await m.mutateAsync({slug:e,data:E});a(A.id),g.reset()}catch(E){l({title:"Could not submit your application",description:E instanceof Error?E.message:"Please try again or contact us directly.",variant:"destructive"})}}),v=()=>{s(!1),setTimeout(()=>a(null),300)};if(h)return c.jsx("div",{className:"bg-white min-h-screen pt-32 pb-24 flex items-center justify-center",children:c.jsx(Be,{className:"text-[var(--feature-color-hover)] animate-spin",size:32})});if(p||!d)return c.jsx("div",{className:"bg-white min-h-screen pt-32 pb-24 text-neutral-900",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-3xl text-center",children:[c.jsx("h1",{className:"text-4xl font-black uppercase mb-4",children:"Role not found"}),c.jsx("p",{className:"text-neutral-600 mb-8",children:"This role may have been filled or moved. See all open roles instead."}),c.jsx(gi,{onClick:()=>n("/careers"),className:"bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320]",children:"Back to careers"})]})});const S=Lhe(d.description),C=Ihe(d.requirements);return c.jsxs("div",{className:"bg-white min-h-screen pt-32 pb-24 text-neutral-900","data-testid":"page-career-detail",children:[c.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[c.jsxs(Qe,{href:"/careers",className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-neutral-600 hover:text-[var(--feature-color-hover)] transition-colors mb-10",children:[c.jsx(ws,{size:14})," All open roles"]}),c.jsxs(Ue.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"grid md:grid-cols-[1fr_auto] gap-8 items-start mb-12 pb-12 border-b border-neutral-200",children:[c.jsxs("div",{className:"flex flex-col md:flex-row gap-6 items-start",children:[c.jsx(lI,{name:d.company.name,brandColor:d.company.brandColor,logoUrl:d.company.logoUrl,size:88}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.25em] text-[var(--feature-color-hover)]",children:d.company.name}),d.company.kind==="firm"&&c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest bg-[var(--feature-color-hover)] text-white px-2 py-0.5",children:"Firm"}),d.company.websiteUrl&&c.jsxs("a",{href:d.company.websiteUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs text-neutral-500 hover:text-neutral-900",children:["Website ",c.jsx(da,{size:11})]})]}),c.jsx("h1",{className:"text-3xl md:text-5xl font-black uppercase tracking-tighter leading-[1.05] mb-4 text-neutral-900",children:d.title}),c.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-2 text-xs font-bold uppercase tracking-widest text-neutral-600",children:[c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(Zu,{size:12,className:"text-[var(--feature-color-hover)]"}),d.department]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(lk,{size:12,className:"text-[var(--feature-color-hover)]"}),d.location," · ",d.workMode]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(ak,{size:12,className:"text-[var(--feature-color-hover)]"}),d.employmentType," · ",d.level]})]})]})]}),c.jsx(gi,{"data-testid":"apply-cta",onClick:()=>{Q1({eventType:"apply_click",path:`/careers/${e}`}),s(!0)},className:"bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320] text-base font-black uppercase tracking-widest px-8 py-7 h-auto",children:"Apply to build"})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-12",children:[c.jsxs("div",{className:"md:col-span-2 space-y-10",children:[c.jsxs("section",{children:[c.jsx("h2",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color-hover)] mb-4",children:"The role"}),c.jsx("div",{className:"space-y-4 text-base md:text-lg text-neutral-700 leading-relaxed",children:S.map((j,E)=>c.jsx("p",{children:j},E))})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color-hover)] mb-4",children:"What you'll bring"}),C.length>1?c.jsx("ul",{className:"space-y-3",children:C.map((j,E)=>c.jsxs("li",{className:"flex gap-3 text-neutral-700",children:[c.jsx("span",{className:"text-[var(--feature-color-hover)] mt-1.5",children:"▸"}),c.jsx("span",{children:j})]},E))}):c.jsx("p",{className:"text-neutral-700",children:d.requirements})]})]}),c.jsx("aside",{className:"md:col-span-1",children:c.jsxs("div",{className:"bg-neutral-50 border border-neutral-200 p-6 space-y-5 sticky top-28",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-neutral-500 mb-2",children:"Hiring company"}),c.jsx("p",{className:"text-lg font-black uppercase tracking-tight text-neutral-900",children:d.company.name}),d.company.shortDescription&&c.jsx("p",{className:"text-sm text-neutral-600 mt-2 leading-relaxed",children:d.company.shortDescription})]}),c.jsxs("div",{className:"border-t border-neutral-200 pt-5",children:[c.jsx(gi,{onClick:()=>{Q1({eventType:"apply_click",path:`/careers/${e}`}),s(!0)},className:"w-full bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320] font-black uppercase tracking-widest py-6 h-auto",children:"Apply to build"}),c.jsx("p",{className:"text-[10px] uppercase tracking-widest text-neutral-500 mt-3 text-center",children:"Takes about 2 minutes"})]})]})})]})]}),c.jsx(vhe,{open:r,onOpenChange:j=>j?s(!0):v(),children:c.jsx(WI,{className:"max-w-xl bg-white border border-neutral-200 text-neutral-900",children:i?c.jsxs("div",{className:"py-6 text-center",children:[c.jsx(If,{size:48,className:"text-[var(--feature-color-hover)] mx-auto mb-4"}),c.jsx("h3",{className:"text-2xl font-black uppercase tracking-tight mb-2 text-neutral-900",children:"Application received"}),c.jsxs("p",{className:"text-neutral-600 mb-6",children:["Thanks for applying to ",c.jsx("span",{className:"text-neutral-900 font-bold",children:d.title})," at"," ",c.jsx("span",{className:"text-neutral-900 font-bold",children:d.company.name}),". We'll be in touch if there's a fit."]}),c.jsxs("p",{className:"text-[10px] uppercase tracking-widest text-neutral-500 mb-6","data-testid":"receipt-id",children:["Reference: ",i.slice(0,8)]}),c.jsx(gi,{onClick:v,className:"bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320]",children:"Done"})]}):c.jsxs(c.Fragment,{children:[c.jsxs(GI,{children:[c.jsxs(QI,{className:"text-2xl font-black uppercase tracking-tight text-neutral-900",children:["Apply to build — ",d.title]}),c.jsx(XI,{className:"text-neutral-600",children:"A few quick details and we'll be in touch — usually within a few business days."})]}
127),c.jsxs("form",{onSubmit:x,className:"space-y-4 mt-2",children:[c.jsx(Qc,{label:"Full name *",testid:"apply-fullname",error:g.formState.errors.fullName?.message,children:c.jsx("input",{...g.register("fullName"),className:"w-full bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"Jane Doe"})}),c.jsx(Qc,{label:"Email *",testid:"apply-email",error:g.formState.errors.email?.message,children:c.jsx("input",{...g.register("email"),type:"email",className:"w-full bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"[email protected]"})}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(Qc,{label:"Phone",testid:"apply-phone",error:g.formState.errors.phone?.message,children:c.jsx("input",{...g.register("phone"),className:"w-full bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"+65 …"})}),c.jsx(Qc,{label:"LinkedIn",testid:"apply-linkedin",error:g.formState.errors.linkedinUrl?.message,children:c.jsx("input",{...g.register("linkedinUrl"),className:"w-full bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"linkedin.com/in/…"})})]}),c.jsx(Qc,{label:"Resume URL",testid:"apply-resume",error:g.formState.errors.resumeUrl?.message,hint:"Link to a PDF or Google Drive file.",children:c.jsx("input",{...g.register("resumeUrl"),className:"w-full bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"https://…"})}),c.jsx(Qc,{label:"Why this role?",testid:"apply-cover",error:g.formState.errors.coverLetter?.message,children:c.jsx("textarea",{...g.register("coverLetter"),rows:5,className:"w-full bg-white border border-neutral-300 px-3 py-2.5 text-sm text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)] resize-y",placeholder:"A few lines about why you're excited about this."})}),c.jsxs(YI,{className:"gap-2 pt-2",children:[c.jsx(gi,{type:"button",variant:"ghost",onClick:v,className:"text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100",children:"Cancel"}),c.jsx(gi,{type:"submit","data-testid":"apply-submit",disabled:m.isPending,className:"bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320] font-black uppercase tracking-widest",children:m.isPending?c.jsxs(c.Fragment,{children:[c.jsx(Be,{size:16,className:"animate-spin mr-2"})," Submitting…"]}):"Submit application"})]})]})]})})})]})}function Qc({label:t,hint:e,testid:n,error:r,children:s}){return c.jsxs("label",{className:"block","data-testid":n,children:[c.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-neutral-600 mb-1.5 block",children:t}),s,e&&!r&&c.jsx("span",{className:"text-[11px] text-neutral-500 mt-1 block",children:e}),r&&c.jsx("span",{className:"text-[11px] text-destructive mt-1 block",children:r})]})}const Bhe={eyebrow:"Apply to build with 100x100",heading:"Tell us about you.",description:"We co-found climate companies in Southeast and South Asia. If you’re a repeat founder or experienced operator ready to lead one, share a few details and we’ll be in touch. We would like to see more women founding new companies, don’t hesitate to contact us!",successTitle:"Application received",successMessage:"Thanks for applying to build with 100x100. We read every submission and will reach out if there's a fit."},dh=t=>mI(e=>e===""?null:e,t),Fhe=Ioe.extend({phone:dh(b().max(40).nullish()),linkedinUrl:dh(b().max(500).regex(/^https?:\/\/.+/).nullish()),location:dh(b().max(200).nullish()),background:dh(b().max(5e3).nullish()),motivation:dh(b().max(5e3).nullish())});
127function zhe(){ns({title:"Apply",description:"Apply to 100x100's founder program. We back mission-driven founders building climate companies across Singapore, Indonesia, the Philippines, Australia, and New Zealand."});const[t,e]=N.useState(null),{toast:n}=ZS(),r=PG(),{data:s}=fJ({query:{retry:!1,staleTime:6e4}}),i={...Bhe,...s},a=uC({resolver:dI(Fhe),defaultValues:{fullName:"",email:"",phone:"",linkedinUrl:"",location:"",background:"",motivation:""}}),l=a.handleSubmit(async d=>{try{const h={...d,phone:d.phone||null,linkedinUrl:d.linkedinUrl||null,location:d.location||null,background:d.background||null,motivation:d.motivation||null},p=await r.mutateAsync({data:h});e(p.id),a.reset(),window.scrollTo({top:0,behavior:"smooth"})}catch(h){n({title:"Could not submit your application",description:h instanceof Error?h.message:"Please try again or contact us directly.",variant:"destructive"})}});return c.jsx("div",{className:"bg-white min-h-screen pt-32 pb-24 text-neutral-900","data-testid":"page-founders-apply",children:c.jsxs("div",{className:"container mx-auto px-6 max-w-3xl",children:[c.jsxs(Qe,{href:"/founders",className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-neutral-600 hover:text-[var(--feature-color-hover)] transition-colors mb-10",children:[c.jsx(ws,{size:14})," Back to founders"]}),t?c.jsxs(Ue.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"bg-neutral-50 border border-neutral-200 p-10 text-center","data-testid":"founder-apply-success",children:[c.jsx(If,{size:56,className:"text-[var(--feature-color-hover)] mx-auto mb-6"}),c.jsx("h1",{className:"text-3xl md:text-4xl font-black uppercase tracking-tight mb-3 text-neutral-900",children:i.successTitle}),c.jsx("p",{className:"text-neutral-600 mb-6 max-w-xl mx-auto",children:i.successMessage}),c.jsxs("p",{className:"text-[10px] uppercase tracking-widest text-neutral-500 mb-8","data-testid":"receipt-id",children:["Reference: ",t.slice(0,8)]}),c.jsx(Qe,{href:"/",className:"inline-block bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320] px-8 py-4 text-sm font-black uppercase tracking-widest transition-colors",children:"Back to home"})]}):c.jsxs(c.Fragment,{children:[c.jsxs(Ue.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"mb-12",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[var(--feature-color-hover)] mb-4",children:i.eyebrow}),c.jsx("h1",{className:"text-4xl md:text-6xl font-black uppercase tracking-tighter leading-[1.05] text-neutral-900 mb-6",children:i.heading}),c.jsx("p",{className:"text-base md:text-lg text-neutral-600 leading-relaxed max-w-2xl",children:i.description}),c.jsxs("p",{className:"text-base md:text-lg text-neutral-600 leading-relaxed max-w-2xl mt-5",children:[c.jsx("span",{className:"font-semibold text-neutral-800",children:"One note that matters to us:"})," Women are disproportionately impacted by climate change, but remain significantly under-represented among climate founders and funders. We believe this is not only an equity issue, but an innovation issue. If we are serious about tackling climate change, we need more women building, funding, and leading climate solutions. As a climate venture builder, we are committed to creating pathways for more women founders to start and scale high-impact climate ventures, because who gets to build ultimately shapes what gets built."]})]}),c.jsxs(Ue.form,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.05},onSubmit:l,className:"space-y-6",children:[c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(dl,{label:"Full name *",testid:"apply-fullname",error:a.formState.errors.fullName?.message,children:c.jsx("input",{...a.register("fullName"),className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"Jane Doe"})}),c.jsx(dl,{label:"Email *",testid:"apply-email",error:a.formState.errors.email?.message,children:c.jsx("input",{...a.register("email"),type:"email",className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"[email protected]"})})]}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(dl,{label:"Phone",testid:"apply-phone",error:a.formState.errors.phone?.message,children:c.jsx("input",{...a.register("phone"),className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"+65 …"})}),c.jsx(dl,{label:"Location",testid:"apply-location",error:a.formState.errors.location?.message,children:c.jsx("input",{...a.register("location"),className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"City, Country"})})]}),c.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:c.jsx(dl,{label:"LinkedIn",testid:"apply-linkedin",error:a.formState.errors.linkedinUrl?.message,children:c.jsx("input",{...a.register("linkedinUrl"),className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)]",placeholder:"linkedin.com/in/…"})})}),c.jsx(dl,{label:"Your background",testid:"apply-background",error:a.formState.errors.background?.message,hint:"A few lines on what you've built and where you've operated.",children:c.jsx("textarea",{...a.register("background"),rows:5,className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)] resize-y",placeholder:"Operating roles, industries, geographies, ventures founded…"})}),c.jsx(dl,{label:"Why 100x100?",testid:"apply-motivation",error:a.formState.errors.motivation?.message,hint:"What climate problem pulls you, and why now?",children:c.jsx("textarea",{...a.register("motivation"),rows:5,className:"w-full bg-white border border-neutral-300 px-4 py-3 text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none focus:border-[var(--feature-color-hover)] resize-y",placeholder:"Tell us what you'd want to build with us."})}),c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pt-4 border-t border-neutral-200",children:[c.jsx("p",{className:"text-xs uppercase tracking-widest text-neutral-500",children:"Takes about 3 minutes"}),c.jsx(gi,{type:"submit","data-testid":"apply-submit",disabled:r.isPending,className:"bg-[var(--feature-color)] text-[#003320] hover:bg-[var(--feature-color-hover)] hover:text-[#003320] font-black uppercase tracking-widest px-5 py-2.5 h-auto text-sm",children:r.isPending?c.jsxs(c.Fragment,{children:[c.jsx(Be,{size:14,className:"animate-spin mr-1.5"})," Submitting…"]}):"Submit"})]})]})]})]})})}function dl({label:t,hint:e,testid:n,error:r,children:s}){return c.jsxs("label",{className:"block","data-testid":n,children:[c.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-neutral-600 mb-1.5 block",children:t}),s,e&&!r&&c.jsx("span",{className:"text-[11px] text-neutral-500 mt-1 block",children:e}),r&&c.jsx("span",{className:"text-[11px] text-destructive mt-1 block",children:r})]})}const qhe="/assets/logo-mint-bright_1777480387075-knyzAZJk.png",Vhe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABkCAMAAAABisbMAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAH4UExURQAAAE7/mFH/lVD/lk//lWb/mVP/mFL/ll
127X/lVD/llD/llD/l07/llD/llD/llH/lwAAAFD/llD/llH/lUz/mVD/llD/l03/mVD/l1D/lk//mFX/qlD/lVD/lgCAgE//lVD/llD/llD/j1D/llD/lk3/mVD/llH/llH/llD/llL/llL/klD/llH/llH/mFD/llD/l1D/lk//llD/llD/llD/lVH/lkn/klH/llD/lk7/nUD/gFD/l0//lVD/lk//lUv/lgBVVU//l0//llD/lk7/llX/nFD/lU//lVD/llH/llD/llD/llL/lAD/AFH/lVX/jlD/lk//lVD/l1D/l0//llH/l1H/l1H/lFH/lVD/lk7/lFH/lVD/lk//lU//l1D/lVD/llD/lkn/klH/lk//llD/lVD/l1D/lVD/l1D/lk3/k2D/n1D/lVD/llH/l1H/llD/l1D/llD/llX/lVD/lVX/klD/llD/llH/lk//lVD/llD/l1D/llD/llD/llL/lU//l1H/lk7/k1D/llD/lk//lFH/lVD/llH/l1D/lk7/l1D/llH/llD/lk//lk7/lUz/l1D/lk//l1D/lkb/i1D/l1H/lFD/l1D/llD/l1D/llD/llP/mU//llD/lk//llH/mE//llD/lU//lU//mFD/lv///8WZyE8AAACmdFJOUwA0UlA6BSVLGN/+XSfh+lgB8uxIHsqJCmnrKga6zAKR+7kQec8UuKFV4jgc/X455SDOevTptZ4Hm+4NBJDXr6QRA2f32i4Sy3HzP+pJHwE8CcmHvKanWywTmPw+KdheUTCPqA51ikawY+PVIQidwhZyQN2/DIAV0PmITe9TxXz2NZrkGrvWN2XejvUxltHcd0EbtkfwC58mbK1W8fgolMBkRbToHUqnlEY4AAAAAWJLR0SnwLcrAwAAAAd0SU1FB+oEHRA6M6qnp9kAAALOSURBVFjD7Vb7W0xRFD3NQzWjXJlMI8aMR6TJoFEpj4aMHh6jJoWiJBVJIUIIeRelvN/k/p3mrFOa7uvc+6PvO+uXe85ee+3v3L332d8hREBAQEBAQECBNJs9CYeT67iE+tnTVfaMTDkJl5unX5pF/bKXqQgpfTllclYY6z251Ete6dXg8kD5Vhnp81fDaY1fk10boGRwnUGA9XDZoMNuLEAaNunrN+M3C7fo8UUhHLBY0qalrTIv0WlhJNKuzW7bjgLsMEqSu4T6RLS7YaeLkqVlRgFIOU65q0LNVO4GtSfDUE8q9sJtX5WSiO4/QInqg4SD2CHqF6pRJRj62jqenpC6epzh8GLrkTAr0FF+AGKHa/2xVFsGWkQujZvQE1ID5+OxFFMDCtBoSk5IVQIRmhZKcQKG6maTAUiLD4KT83vbKexPm9UngZ4vmbv0rW10FzhjQU/O5uDWtNN1vBH6jjIrAfzFOHSAth30cht/2C3GOciCndHz2XSR6bWoJ52YPdldF/AzWSY6UAFvNztCDz69pis4D6kBwouX+i6jhv1XLAYYgF4elEjsKlbXrCVxEDcqhEa4Xov1kN+C/sZNqhm+xXa3I3R3Z8RCANbKd+dKF72H7f1Rs/L4AwgePvpnGYPhcZHJAHn46cInC5ZoEGloMqcfRd2Gn6bamp/hDM/N6FuRAFf5YqvtBSL0VHL13jEMn0Sfws5mSuQlT+8fh+OER0k4xxH4FedSV75m13hSTU31g3pj3NPTM/DSvHtVmOyhLqM0sL4fHtJmHSz6tKSrn5qAR3eLNp3P5v3MtJ4+zsa5762eg/SOdeR7Hf4Dhlev0SOpAKX4qH0xP32m5Be30bX9Wo0zaL6C2qGXvxFDTLJBM6BOZOw7OjhBOPiBN0z4p9Ie/YXIuR5eAGcHHH8rKzU7Ql/AtlmenpC+P3gsO/ieAgICAgIC/y/+AjpJWet2U3ECAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTA0LTI5VDE2OjMzOjA3KzAwOjAwFNpyrgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wNC0yOVQxNjozMzowNyswMDowMGWHyhIAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDQtMjlUMTY6NTg6NTErMDA6MDAJ9+EnAAAAAElFTkSuQmCC",$he=[{label:"Settings",to:"/admin/settings",icon:c.jsx(sK,{className:"w-4 h-4"})},{label:"Dashboard",to:"/admin",icon:c.jsx(v8,{className:"w-4 h-4"})},{label:"Homepage",to:"/admin/homepage",icon:c.jsx(p8,{className:"w-4 h-4"})},{label:"For Founders",to:"/admin/founders",icon:c.jsx(eK,{className:"w-4 h-4"})},{label:"Apply",to:"/admin/apply",icon:c.jsx(XH,{className:"w-4 h-4"})},{label:"Applications",to:"/admin/founder-applications",icon:c.jsx(Du,{className:"w-4 h-4"})},{label:"For Investors",to:"/admin/investors",icon:c.jsx(ck,{className:"w-4 h-4"})},{label:"Portfolio",to:"/admin/companies",icon:c.jsx(Zu,{className:"w-4 h-4"})},{label:"Thesis",to:"/admin/thesis",icon:c.jsx(Ng,{className:"w-4 h-4"})},{label:"Team",to:"/admin/team",icon:c.jsx(uk,{className:"w-4 h-4"})},{label:"Stories",to:"/admin/stories",icon:c.jsx(MP,{className:"w-4 h-4"})},{label:"Careers",to:"/admin/jobs",icon:c.jsx(Ru,{className:"w-4 h-4"})},{label:"Grievance Page",to:"/admin/grievance",icon:c.jsx(af,{className:"w-4 h-4"})},{label:"Grievance Inbox",to:"/admin/grievance-submissions",icon:c.jsx(Du,{className:"w-4 h-4"})},{label:"Sitemap",to:"/admin/sitemap",icon:c.jsx(UP,{className:"w-4 h-4"})},{label:"Audit log",to:"/admin/audit-log",icon:c.jsx(PP,{className:"w-4 h-4"})}],e5="admin:sidebar-collapsed";function Hhe(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(e5)==="1"}catch{return!1}}function Khe({children:t}){const[e]=Ti(),r=Gl().base,{user:s}=_V(),{signOut:i}=E_(),{data:a,isLoading:l,error:d}=nd({query:{retry:!1}}),[h,p]=N.useState(Hhe);return N.useEffect(()=>{try{window.localStorage.setItem(e5,h?"1":"0")}catch{}},[h]),l?c.jsx("div",{className:"min-h-screen bg-neutral-50 flex items-center justify-center",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):d||!a?c.jsx(s1,{when:"signed-in",children:c.jsx("div",{className:"min-h-screen bg-neutral-50 flex items-center justify-center px-6",children:c.jsxs("div",{className:"max-w-md text-center",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-4",children:"Admin"}),c.jsx("h1",{className:"text-3xl font-black uppercase tracking-tight text-neutral-900 mb
127-4",children:"No admin access"}),c.jsxs("p",{className:"text-neutral-600 mb-8 leading-relaxed",children:["You're signed in as ",c.jsx("strong",{children:s?.primaryEmailAddress?.emailAddress}),", but this account doesn't have CMS access. Ask an administrator to grant you access, then refresh this page."]}),c.jsxs("button",{onClick:()=>i({redirectUrl:r||"/"}),className:"inline-flex items-center gap-2 px-5 py-3 bg-neutral-900 text-white text-sm font-bold uppercase tracking-wider rounded hover:bg-neutral-800 transition","data-testid":"button-signout",children:[c.jsx(s2,{className:"w-4 h-4"})," Sign out"]})]})})}):c.jsxs("div",{className:"min-h-screen bg-neutral-50 text-neutral-900 flex",children:[c.jsxs("aside",{className:`${h?"w-16":"w-64"} bg-neutral-900 text-white flex flex-col transition-[width] duration-200 ease-out`,"data-testid":"admin-sidebar",children:[c.jsxs("div",{className:`relative border-b border-white/10 ${h?"px-2 py-4":"px-6 py-6"}`,children:[c.jsx(Qe,{href:"/",className:`block ${h?"flex justify-center":""}`,children:h?c.jsx("img",{src:Vhe,alt:"100x100",className:"h-6 w-auto mx-auto",style:{filter:"hue-rotate(var(--logo-hue-rotate, 35deg))"}}):c.jsx("img",{src:qhe,alt:"100x100",className:"h-8 w-auto",style:{filter:"hue-rotate(var(--logo-hue-rotate, 35deg))"}})}),c.jsx("button",{type:"button",onClick:()=>p(m=>!m),className:"absolute -right-3 top-6 w-6 h-6 rounded-full bg-neutral-900 border border-white/20 hover:border-[#0BB9B7] hover:text-[#0BB9B7] text-white/70 flex items-center justify-center shadow","aria-label":h?"Expand sidebar":"Collapse sidebar",title:h?"Expand sidebar":"Collapse sidebar","data-testid":"button-toggle-sidebar",children:h?c.jsx(ik,{className:"w-3.5 h-3.5"}):c.jsx(OP,{className:"w-3.5 h-3.5"})})]}),c.jsx("nav",{className:"flex-1 py-4",children:$he.filter(m=>m.to!=="/admin/settings"||a.role==="admin").map(m=>{const g=m.to==="/admin"?e==="/admin":m.to==="/admin/grievance"?e==="/admin/grievance":e.startsWith(m.to);return c.jsxs(Qe,{href:m.to,className:`flex items-center ${h?"justify-center px-0":"gap-3 px-6"} py-3 text-sm font-semibold transition ${g?"bg-[#0BB9B7] text-neutral-900":"text-white/70 hover:text-white hover:bg-white/5"}`,"data-testid":`nav-${m.label.toLowerCase()}`,title:h?m.label:void 0,children:[m.icon,!h&&c.jsx("span",{children:m.label})]},m.to)})}),c.jsxs("div",{className:`border-t border-white/10 text-xs ${h?"px-2 py-4":"px-6 py-4"}`,children:[!h&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"font-semibold text-white/90 truncate",children:a.fullName||a.email}),c.jsx("div",{className:"text-white/50 mt-1 capitalize",children:a.role.replace("_"," ")})]}),c.jsxs("button",{onClick:()=>i({redirectUrl:r||"/"}),className:`${h?"mt-0":"mt-3"} w-full inline-flex items-center justify-center gap-2 ${h?"px-0 py-2":"px-3 py-2"} bg-white/5 hover:bg-white/10 text-white/80 text-xs font-semibold rounded transition`,"data-testid":"button-signout",title:h?"Sign out":void 0,children:[c.jsx(s2,{className:"w-3 h-3"}),!h&&c.jsx("span",{children:"Sign out"})]})]})]}),c.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}const Whe=7;function Ghe(){const{data:t}=nd({query:{retry:!1}}),{data:e}=$L({}),{data:n}=zf(),{data:r,isLoading:s}=GJ({days:Whe},{query:{retry:!1}}),i=t?.role==="admin"||t?.role==="marketing",a=t?.role==="admin",{data:l}=QL({limit:8},{query:{enabled:!!a,retry:!1}}),{data:d}=VJ({query:{retry:!1}}),h=d?.terminatedWithPublishedJobs??[],p=e?.length??0,m=e?.filter(C=>C.isPublished).length??0,g=p-m,x=n?.length??0,v=r?.totals,S=v&&v.conversionRate?`${(v.conversionRate*100).toFixed(1)}%`:"0.0%";return c.jsxs("div",{className:"p-10 max-w-6xl",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-3",children:"Welcome back"}),c.jsx("h1",{className:"text-4xl font-black uppercase tracking-tighter mb-2",children:t?.fullName?.split(" ")[0]||t?.email?.split("@")[0]||"there"}),c.jsx("p",{className:"text-neutral-600 mb-10",children:i?"Last 7 days of public site activity, plus quick links to your CMS.":"Manage your jobs, portfolio companies and applications."}),h.length>0?c.jsx("section",{className:"mb-10 border border-amber-300 bg-amber-50 rounded p-5","data-testid":"dashboard-integrity-warnings",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(FP,{className:"w-5 h-5 text-amber-600 mt-0.5 shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h2",{className:"text-sm font-bold uppercase tracking-wider text-amber-900 mb
127-1",children:"Terminated companies with published jobs"}),c.jsx("p",{className:"text-sm text-amber-900/80 mb-3",children:"The public site hides these jobs automatically, but the rows still exist in the database. Unpublish them or change the company's status if this isn't intended."}),c.jsx("ul",{className:"space-y-2",children:h.map(C=>c.jsxs("li",{className:"bg-white border border-amber-200 rounded p-3","data-testid":`integrity-warning-${C.slug}`,children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-2",children:[c.jsx(Qe,{href:`/admin/companies/${C.companyId}`,className:"font-semibold text-amber-900 hover:text-[#003320] truncate",children:C.name}),c.jsxs("span",{className:"text-xs text-amber-800 shrink-0",children:[C.publishedJobCount," published job",C.publishedJobCount===1?"":"s"]})]}),c.jsx("div",{className:"flex flex-wrap gap-1.5",children:C.jobs.map(j=>c.jsx(Qe,{href:`/admin/jobs/${j.id}`,className:"inline-flex items-center text-xs px-2 py-1 rounded bg-amber-100 hover:bg-amber-200 text-amber-900","data-testid":`integrity-job-${j.slug}`,children:j.title},j.id))})]},C.companyId))})]})]})}):null,i?c.jsxs("section",{className:"mb-12","data-testid":"dashboard-analytics",children:[c.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[c.jsx(Ya,{label:"Pageviews",value:v?.pageviews??0,icon:c.jsx(DP,{className:"w-5 h-5"}),accent:"bg-[#0BB9B7]",loading:s}),c.jsx(Ya,{label:"Unique visitors",value:v?.uniqueSessions??0,icon:c.jsx(uk,{className:"w-5 h-5"}),accent:"bg-neutral-900 text-white",loading:s}),c.jsx(Ya,{label:"Apply clicks",value:v?.conversions??0,icon:c.jsx($8,{className:"w-5 h-5"}),accent:"bg-white border border-neutral-200",loading:s}),c.jsx(Ya,{label:"Conversion rate",value:S,icon:c.jsx(ck,{className:"w-5 h-5"}),accent:"bg-white border border-neutral-200",loading:s})]}),c.jsxs("div",{className:"bg-white border border-neutral-200 rounded p-5 mb-6",children:[c.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[c.jsx("h2",{className:"text-sm font-bold uppercase tracking-wider",children:"Pageviews · last 7 days"}),c.jsxs("span",{className:"text-xs text-neutral-500",children:[r?.dailyTrend?.[0]?.date," →"," ",r?.dailyTrend?.[r.dailyTrend.length-1]?.date]})]}),c.jsx(Yhe,{data:(r?.dailyTrend??[]).map(C=>({label:C.date,value:C.views})),loading:s})]}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-6",children:[c.jsx(lw,{title:"Top pages",icon:c.jsx(Ng,{className:"w-4 h-4"}),rows:(r?.topPages??[]).map(C=>({key:C.key,value:C.views})),emptyText:"No page views in the last 7 days yet.",loading:s}),c.jsx(lw,{title:"Top referrers",icon:c.jsx(da,{className:"w-4 h-4"}),rows:(r?.topReferrers??[]).map(C=>({key:C.key,value:C.views})),emptyText:"No referrer data yet.",loading:s})]}),c.jsx(lw,{title:"Devices",icon:c.jsx(cK,{className:"w-4 h-4"}),rows:(r?.deviceBreakdown??[]).map(C=>({key:C.key,value:C.views})),emptyText:"No device data yet.",loading:s})]}):null,c.jsxs("section",{className:"mb-10",children:[c.jsx("h2",{className:"text-sm font-bold uppercase tracking-wider mb-3",children:"CMS at a glance"}),c.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[c.jsx(Ya,{label:"Live jobs",value:m,icon:c.jsx(Ru,{className:"w-5 h-5"}),accent:"bg-white border border-neutral-200"}),c.jsx(Ya,{label:"Drafts",value:g,icon:c.jsx(Ng,{className:"w-5 h-5"}),accent:"bg-white border border-neutral-200"}),c.jsx(Ya,{label:"Companies",value:x,icon:c.jsx(Zu,{className:"w-5 h-5"}),accent:"bg-white border border-neutral-200"}),c.jsx(Ya,{label:"Total jobs",value:p,icon:c.jsx(Ru,{className:"w-5 h-5"}),accent:"bg-white border border-neutral-200"})]})]}),c.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4 mb-10",children:[c.jsx(ow,{to:"/admin/jobs",title:"Manage jobs",desc:"Create, edit and publish openings across the firm and portfolio."}),c.jsx(ow,{to:"/admin/companies",title:"View companies",desc:"Browse the firm and portfolio companies receiving applications."}),c.jsx(ow,{to:"/admin/founder-applications",title:"Manage Founder Applications",desc:"Review all applications submitted via the Apply page and manage email notifications."})]}),a?c.jsxs("section",{"data-testid":"dashboard-recent-edits",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("h2",{className:"text-sm font-bold uppercase tracking-wider flex items-center gap-2",children:[c.jsx(PP,{className:"w-4 h-4"})," Recent edits"]}),c.jsxs(Qe,{href:"/admin/audit-log",className:"text-xs font-semibold text-[#099492] hover:text-[#003320] inline-flex items-center gap-1",children:["View full log ",c.jsx(sf,{className:"w-3 h-3"})]})]}),c.jsx("div",{className:"bg-white border border-neutral-200 rounded divide-y divide-neutral-100",children:l?.items?.length?l.items.map(C=>c.jsxs("div",{className:"px-4 py-3 text-sm flex items-start gap-3","data-testid":`recent-edit-${C.id}`,children:[c.jsx("div",{className:"text-xs text-neutral-500 font-mono w-32 shrink-0",children:new Date(C.createdAt).toLocaleStr
127ing(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"font-semibold text-neutral-900",children:C.action}),c.jsx("div",{className:"text-neutral-600 truncate",children:C.summary})]}),c.jsx("div",{className:"text-xs text-neutral-500 truncate max-w-[180px]",children:C.userEmail})]},C.id)):c.jsx("div",{className:"px-4 py-6 text-sm text-neutral-500 text-center",children:"No edits recorded yet."})})]}):null]})}function Ya({label:t,value:e,icon:n,accent:r,loading:s}){return c.jsxs("div",{className:`p-5 rounded ${r}`,"data-testid":`kpi-${t.toLowerCase().replace(/\s+/g,"-")}`,children:[c.jsxs("div",{className:"flex items-center justify-between mb-3 opacity-80",children:[n,s?c.jsx(Be,{className:"w-4 h-4 animate-spin opacity-60"}):null]}),c.jsx("div",{className:"text-3xl font-black tracking-tight",children:e}),c.jsx("div",{className:"text-xs uppercase tracking-wider mt-1 opacity-70",children:t})]})}function ow({to:t,title:e,desc:n}){return c.jsx(Qe,{href:t,className:"block p-6 bg-white border border-neutral-200 rounded hover:border-neutral-900 transition group",children:c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("div",{className:"font-bold uppercase tracking-tight text-lg mb-1",children:e}),c.jsx("div",{className:"text-sm text-neutral-600",children:n})]}),c.jsx(sf,{className:"w-5 h-5 text-neutral-400 group-hover:text-neutral-900 group-hover:translate-x-1 transition"})]})})}function Yhe({data:t,loading:e}){if(e)return c.jsx("div",{className:"h-[120px] flex items-center justify-center text-neutral-400",children:c.jsx(Be,{className:"w-5 h-5 animate-spin"})});if(!t.length)return c.jsx("div",{className:"h-[120px] flex items-center justify-center text-sm text-neutral-500",children:"No data yet"});const i=Math.max(1,...t.map(p=>p.value)),a=752/Math.max(1,t.length-1),l=t.map((p,m)=>{const g=24+m*a,x=96-p.value/i*72;return`${g},${x}`}),d="M 24,96 "+l.map(p=>`L ${p}`).join(" ")+` L ${24+(t.length-1)*a},96 Z`,h="M "+l.join(" L ");return c.jsxs("svg",{viewBox:"0 0 800 120",className:"w-full h-[120px]","data-testid":"dashboard-sparkline",preserveAspectRatio:"none",children:[c.jsx("path",{d,fill:"#0BB9B7",opacity:.18}),c.jsx("path",{d:h,fill:"none",stroke:"#003320",strokeWidth:2}),t.map((p,m)=>{const g=24+m*a,x=96-p.value/i*72;return c.jsx("circle",{cx:g,cy:x,r:3,fill:"#003320"},p.label)})]})}function lw({title:t,icon:e,rows:n,emptyText:r,loading:s}){const i=n.reduce((a,l)=>a+l.value,0);return c.jsxs("div",{className:"bg-white border border-neutral-200 rounded p-5",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider mb-3 flex items-center gap-2 text-neutral-700",children:[e,t]}),s?c.jsx("div",{className:"h-20 flex items-center justify-center text-neutral-400",children:c.jsx(Be,{className:"w-4 h-4 animate-spin"})}):n.length===0?c.jsx("div",{className:"text-sm text-neutral-500",children:r}):c.jsx("ul",{className:"space-y-2",children:n.map(a=>{const l=i>0?Math.round(a.value/i*100):0;return c.jsxs("li",{className:"text-sm",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[c.jsx("span",{className:"truncate font-medium text-neutral-900",children:a.key||"(unknown)"}),c.jsxs("span",{className:"text-xs text-neutral-500 shrink-0",children:[a.value.toLocaleString()," · ",l,"%"]})]}),c.jsx("div",{className:"h-1.5 bg-neutral-100 rounded mt-1 overflow-hidden",children:c.jsx("div",{className:"h-full bg-[#0BB9B7]",style:{width:`${l}%`}})})]},a.key)})})]})}function zO({title:t,message:e,confirmLabel:n,isPending:r,onConfirm:s,onCancel:i}){return c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[c.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:i}),c.jsxs("div",{className:"relative bg-white rounded-lg shadow-xl p-6 max-w-sm w-full mx-4 z-10",children:[c.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[c.jsx(FP,{className:"w-5 h-5 text-red-500 mt-0.5 shrink-0"}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-neutral-900",children:t}),c.jsx("p",{className:"text-sm text-neutral-600 mt-1",children:e})]})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:i,disabled:r,className:"px-4 py-2 text-sm font-medium text-neutral-700 bg-neutral-100 rounded hover:bg-neutral-200 disabled:opacity-50 transition",children:"Cancel"}),c.jsxs("button",{type:"button",onClick:s,disabled:r,className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-bold text-white bg-red-600 rounded hover:bg-red-700 disabled:opacity-50 transition",children:[r&&c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}),n]})]})]})]})}function Qhe(){const[t,e]=N.useState(""),[n,r]=N.useState(""),[s,i]=N.useState("all"),[a,l]=N.useState(new Set),[d,h]=N.useState(null),[p,m]=N.useState(!1),g=kn(),x=HL(),v=N.useMemo(()=>({...t?{q:t}:{},...n?{companyId:n}:{},published:s}),[t,n,s]),{data:S,isLoading:C}=$L(v),{data:j}=zf(),E=N.useMemo(()=>S?.map(K=>K.id)??[],[S]),A=E.length>0&&E.every(K=>a.has(K)),D=a.size>0;function M(K){l(ee=>{const ie=new Set(ee);return ie.has(K)?ie.delete(K):ie.add(K),ie})}function I(){l(A?new Set:new Set(E))}function _(){g.invalidateQueries({queryKey:Dh()})}function L(K){x.mutate({id:K},{onSuccess:()=>{h(null),l(ee=>{const ie=new Set(ee);return ie.delete(K),ie}),_()}})}async function V(){const K=[...a];for(const ee of K)await new Promise((ie,se)=>{x.mutate({id:ee},{onSuccess:()=>ie(),onError:se})});l(new Set),m(!1),_()}const B=d?S?.find(K=>K.id===d):null;return c.jsxs("div",{className:"p-10 max-w-6xl",children:[B&&c.jsx(zO,{title:"Delete job posting?",message:`"${B.title}" will be permanently deleted. This cannot be undone.`,confirmLabel:"Delete",isPending:x.isPending,onConfirm:()=>L(B.id),onCancel:()=>h(null)}),p&&c.jsx(zO,{title:`Delete ${a.size} job posting${a.size===1?"":"s"}
127?`,message:"These postings will be permanently deleted. This cannot be undone.",confirmLabel:`Delete ${a.size}`,isPending:x.isPending,onConfirm:V,onCancel:()=>m(!1)}),c.jsxs("div",{className:"flex items-start justify-between mb-8 gap-4",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-3",children:"Jobs"}),c.jsx("h1",{className:"text-4xl font-black uppercase tracking-tighter",children:"Job postings"})]}),c.jsxs(Qe,{href:"/admin/jobs/new",className:"inline-flex items-center gap-2 px-5 py-3 bg-[#0BB9B7] text-neutral-900 text-sm font-bold uppercase tracking-wider rounded hover:bg-[#099492] transition","data-testid":"button-new-job",children:[c.jsx(zn,{className:"w-4 h-4"})," New job"]})]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mb-4 items-center",children:[c.jsxs("div",{className:"relative flex-1 min-w-[240px]",children:[c.jsx(Uf,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-neutral-400"}),c.jsx("input",{value:t,onChange:K=>e(K.target.value),placeholder:"Search jobs…",className:"w-full pl-10 pr-4 py-2.5 bg-white border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-900","data-testid":"input-search"})]}),c.jsxs("select",{value:n,onChange:K=>r(K.target.value),className:"px-3 py-2.5 bg-white border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-900","data-testid":"select-company",children:[c.jsx("option",{value:"",children:"All companies"}),j?.map(K=>c.jsx("option",{value:K.id,children:K.name},K.id))]}),c.jsxs("select",{value:s,onChange:K=>i(K.target.value),className:"px-3 py-2.5 bg-white border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-900","data-testid":"select-published",children:[c.jsx("option",{value:"all",children:"All statuses"}),c.jsx("option",{value:"true",children:"Published"}),c.jsx("option",{value:"false",children:"Drafts"})]})]}),D&&c.jsxs("div",{className:"flex items-center gap-3 mb-3 px-4 py-2.5 bg-neutral-900 text-white rounded text-sm",children:[c.jsxs("span",{className:"font-semibold",children:[a.size," selected"]}),c.jsx("div",{className:"flex-1"}),c.jsxs("button",{type:"button",onClick:()=>m(!0),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-red-600 hover:bg-red-700 text-white rounded text-xs font-bold uppercase tracking-wider transition","data-testid":"button-bulk-delete",children:[c.jsx(qn,{className:"w-3.5 h-3.5"})," Delete selected"]}),c.jsx("button",{type:"button",onClick:()=>l(new Set),className:"text-xs text-neutral-400 hover:text-white transition",children:"Clear"})]}),c.jsx("div",{className:"bg-white border border-neutral-200 rounded overflow-hidden",children:C?c.jsx("div",{className:"p-12 text-center text-neutral-400 text-sm",children:"Loading…"}):S?.length?c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{className:"bg-neutral-50 text-xs uppercase tracking-wider text-neutral-500",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 w-10",children:c.jsx("input",{type:"checkbox",checked:A,onChange:I,className:"rounded border-neutral-300 accent-[#0BB9B7] cursor-pointer","aria-label":"Select all","data-testid":"checkbox-select-all"})}),c.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Title"}),c.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Company"}),c.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Location"}),c.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Status"}),c.jsx("th",{className:"text-right px-4 py-3 font-semibold",children:"Apps"}),c.jsx("th",{className:"px-4 py-3 w-10"})]})}),c.jsx("tbody",{children:S.map(K=>c.jsxs("tr",{className:`border-t border-neutral-100 hover:bg-neutral-50 transition ${a.has(K.id)?"bg-teal-50":""}`,"data-testid":`row-job-${K.slug}`,children:[c.jsx("td",{className:"px-4 py-3",children:c.jsx("input",{type:"checkbox",checked:a.has(K.id),onChange:()=>M(K.id),className:"rounded border-neutral-300 accent-[#0BB9B7] cursor-pointer","aria-label":`Select ${K.title}`,"data-testid":`checkbox-job-${K.id}`})}),c.jsxs("td",{className:"px-4 py-3",children:[c.jsx(Qe,{href:`/admin/jobs/${K.id}`,className:"font-semibold text-neutral-900 hover:text-[#099492] transition",children:K.title}),c.jsxs("div",{className:"text-xs text-neutral-500 mt-0.5",children:[K.department," · ",K.level," · ",K.workMode]})]}),c.jsx("td",{className:"px-4 py-3 text-neutral-700",children:K.company.name}),c.jsx("td",{className:"px-4 py-3 text-neutral-700",children:K.location}),c.jsx("td",{className:"px-4 py-3",children:K.isPublished?c.jsx("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 bg-[#0BB9B7] text-neutral-900 text-xs font-bold uppercase tracking-wider rounded",children:"Live"}):c.jsx("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 bg-neutral-100 text-neutral-600 text-xs font-bold uppercase tracking-wider rounded",children:"Draft"})}),c.jsx("td",{className:"px-4 py-3 text-right text-neutral-700 font-medium tabular-nums",children:K.applicationCount??0}),c.jsx("td",{className:"px-4 py-3 text-right",children:c.jsx("button",{type:"button",onClick:()=>h(K.id),className:"p-1.5 text-neutral-400 hover:text-red-600 hover:bg-red-50 rounded transition","aria-label":`Delete ${K.title}`,"data-testid":`button-delete-job-${K.id}
127`,children:c.jsx(qn,{className:"w-4 h-4"})})})]},K.id))})]}):c.jsxs("div",{className:"p-12 text-center",children:[c.jsx(Ru,{className:"w-8 h-8 mx-auto text-neutral-300 mb-3"}),c.jsx("div",{className:"text-neutral-500 text-sm",children:"No jobs found"})]})})]})}const Xhe=["Full-time","Part-time","Contract","Internship"],Jhe=["Onsite","Hybrid","Remote"],Zhe=["Junior","Mid","Senior","Lead"],efe={slug:"",companyId:"",title:"",department:"Engineering",location:"",employmentType:"Full-time",workMode:"Hybrid",level:"Mid",summary:"",description:"",requirements:"",isPublished:!1};function cw(t){return t.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,120)}function qO(){const t=Xy(),e=!t.id||t.id==="new",[,n]=Ti(),r=kn(),{data:s}=nd({query:{retry:!1}}),{data:i}=zf(),{data:a,isLoading:l,error:d}=dY(e?"":t.id,{query:{enabled:!e,retry:!1}}),h=aY(),p=mY(),m=HL(),[g,x]=N.useState(efe),[v,S]=N.useState(null),[C,j]=N.useState(!1);N.useEffect(()=>{if(a&&!e)x({slug:a.slug,companyId:a.companyId,title:a.title,department:a.department,location:a.location,employmentType:a.employmentType,workMode:a.workMode,level:a.level,summary:a.summary,description:a.description,requirements:a.requirements,isPublished:a.isPublished});else if(e&&i&&i.length&&!g.companyId){const _=s?.companyId&&i.find(L=>L.id===s.companyId)?s.companyId:i[0].id;x(L=>({...L,companyId:_}))}},[a,e,i,s]);const E=(_,L)=>{x(V=>{const B={...V,[_]:L};return _==="title"&&e&&(!V.slug||V.slug===cw(V.title))&&(B.slug=cw(L)),B})},A=async _=>{S(null);const L={...g,isPublished:_};try{if(e){const V=await h.mutateAsync({data:L});await r.invalidateQueries({queryKey:Dh()}),n(`/admin/jobs/${V.id}`)}else await p.mutateAsync({id:t.id,data:L}),await r.invalidateQueries({queryKey:Dh()})}catch(V){const B=V instanceof Error?V.message:"Could not save. Please try again.";S(B)}},D=async()=>{if(!e)try{await m.mutateAsync({id:t.id}),await r.invalidateQueries({queryKey:Dh()}),await r.invalidateQueries({queryKey:VL()}),n("/admin/jobs")}catch(_){const L=_ instanceof Error?_.message:"Could not delete.";S(L)}};if(!e&&l)return c.jsx("div",{className:"p-10 text-neutral-400 text-sm",children:"Loading…"});if(!e&&d){const _=d.status,L=_===404?"This job no longer exists.":_===403?"You don't have access to this job.":"We couldn't load this job. Check your connection and try again.";return c.jsxs("div",{className:"p-10 max-w-3xl",children:[c.jsxs("button",{onClick:()=>n("/admin/jobs"),className:"inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 mb-6 transition",children:[c.jsx(ws,{className:"w-4 h-4"})," Back to jobs"]}),c.jsxs("div",{className:"p-6 bg-red-50 border border-red-200 rounded text-sm text-red-700 flex items-start gap-3",children:[c.jsx(kt,{className:"w-5 h-5 mt-0.5 flex-shrink-0"}),c.jsxs("div",{children:[c.jsx("div",{className:"font-bold mb-1",children:"Couldn't load this job"}),c.jsx("div",{children:L})]})]})]})}const M=s?.role==="portfolio_editor",I=M;return c.jsxs("div",{className:"p-10 max-w-3xl",children:[c.jsxs("button",{onClick:()=>n("/admin/jobs"),className:"inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 mb-6 transition",children:[c.jsx(ws,{className:"w-4 h-4"})," Back to jobs"]}),c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-3",children:e?"Create job":"Edit job"}),c.jsx("h1",{className:"text-3xl font-black uppercase tracking-tighter mb-8",children:e?"New job posting":g.title||"Untitled job"}),v&&c.jsxs("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded text-sm text-red-700 flex items-start gap-2",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:v})]}),M&&c.jsx("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded text-sm text-amber-800",children:"Posts and edits from your account require approval from 100×100 before going live."}),c.jsxs("div",{className:"space-y-6 bg-white border border-neutral-200 rounded p-6",children:[c.jsx(Ls,{label:"Title",children:c.jsx("input",{value:g.title,onChange:_=>E("title",_.target.value),className:Ps,"data-testid":"input-title"})}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(Ls,{label:"Slug",hint:"URL-friendly id (lowercase, dashes)",children:c.jsx("input",{value:g.slug,onChange:_=>E("slug",cw(_.target.value)),className:Ps,"data-testid":"input-slug"})}),c.jsx(Ls,{label:"Company",children:c.jsx("select",{value:g.companyId,onChange:_=>E("companyId",_.target.value),disabled:I,className:`${Ps} disabled:opacity-60`,"data-testid":"select-company",children:i?.map(_=>c.jsx("option",{value:_.id,children:_.name},_.id))})})]}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(Ls,{label:"Department / Function",children:c.jsx("input",{value:g.department,onChange:_=>E("department",_.target.value),className:Ps,"data-testid":"input-department"})}),c.jsx(Ls,{label:"Location",children:c.jsx("input",{value:g.location,onChange:_=>E("location",_.target.value),placeholder:"e.g. Paris · Remote",className:Ps,"data-testid":"input-location"})})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[c.jsx(Ls,{label:"Type",children:c.jsx("select",{value:g.employmentType,onCh
127ange:_=>E("employmentType",_.target.value),className:Ps,children:Xhe.map(_=>c.jsx("option",{value:_,children:_},_))})}),c.jsx(Ls,{label:"Mode",children:c.jsx("select",{value:g.workMode,onChange:_=>E("workMode",_.target.value),className:Ps,children:Jhe.map(_=>c.jsx("option",{value:_,children:_},_))})}),c.jsx(Ls,{label:"Level",children:c.jsx("select",{value:g.level,onChange:_=>E("level",_.target.value),className:Ps,children:Zhe.map(_=>c.jsx("option",{value:_,children:_},_))})})]}),c.jsx(Ls,{label:"Summary",hint:"One-line teaser shown on job cards",children:c.jsx("textarea",{rows:2,value:g.summary,onChange:_=>E("summary",_.target.value),className:Ps,"data-testid":"input-summary"})}),c.jsx(Ls,{label:"Description",hint:"Full role description (Markdown supported)",children:c.jsx("textarea",{rows:8,value:g.description,onChange:_=>E("description",_.target.value),className:Ps,"data-testid":"input-description"})}),c.jsx(Ls,{label:"Requirements",hint:"What the candidate needs (Markdown supported)",children:c.jsx("textarea",{rows:6,value:g.requirements,onChange:_=>E("requirements",_.target.value),className:Ps,"data-testid":"input-requirements"})})]}),c.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-between gap-4",children:[c.jsx("div",{children:!e&&(C?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm text-red-700",children:"Delete forever?"}),c.jsx("button",{onClick:D,disabled:m.isPending,className:"px-3 py-1.5 bg-red-600 text-white text-xs font-bold uppercase tracking-wider rounded hover:bg-red-700 transition disabled:opacity-50","data-testid":"button-confirm-delete",children:"Yes, delete"}),c.jsx("button",{onClick:()=>j(!1),className:"px-3 py-1.5 bg-neutral-200 text-neutral-700 text-xs font-bold uppercase tracking-wider rounded hover:bg-neutral-300 transition",children:"Cancel"})]}):c.jsxs("button",{onClick:()=>j(!0),className:"inline-flex items-center gap-2 px-4 py-2 text-sm text-red-600 hover:bg-red-50 rounded transition","data-testid":"button-delete",children:[c.jsx(qn,{className:"w-4 h-4"})," Delete"]}))}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("button",{onClick:()=>A(!1),disabled:h.isPending||p.isPending,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-white border border-neutral-300 text-neutral-900 text-sm font-bold uppercase tracking-wider rounded hover:bg-neutral-50 transition disabled:opacity-50","data-testid":"button-save-draft",children:[c.jsx(Xl,{className:"w-4 h-4"})," Save draft"]}),!M&&s?.canPublish&&c.jsx("button",{onClick:()=>A(!0),disabled:h.isPending||p.isPending,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-[#0BB9B7] text-neutral-900 text-sm font-bold uppercase tracking-wider rounded hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-publish",children:g.isPublished?"Update live job":"Publish"})]})]})]})}const Ps="w-full px-3 py-2 bg-white border border-neutral-300 rounded text-sm focus:outline-none focus:border-neutral-900 focus:ring-1 focus:ring-neutral-900";function Ls({label:t,hint:e,children:n}){return c.jsxs("label",{className:"block",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-neutral-700 mb-1.5",children:t}),n,e&&c.jsx("div",{className:"text-xs text-neutral-500 mt-1",children:e})]})}function tfe(){const{data:t,isLoading:e,error:n}=zf(),{data:r}=nd({query:{retry:!1}}),s=r?.role==="admin";return c.jsxs("div",{className:"p-10 max-w-6xl",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-10",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-3",children:"Companies"}),c.jsx("h1",{className:"text-4xl font-black uppercase tracking-tighter mb-2",children:"Portfolio companies"}),c.jsx("p",{className:"text-neutral-600",children:"The firm and the portfolio companies that post jobs and receive applications."})]}),s&&c.jsxs(Qe,{href:"/admin/companies/new",className:"inline-flex items-center gap-2 bg-[#003320] text-[#0BB9B7] px-4 py-2.5 rounded font-bold text-sm uppercase tracking-wider hover:bg-[#099492] hover:text-white transition whitespace-nowrap","data-testid":"link-new-company",children:[c.jsx(zn,{className:"w-4 h-4"})," New company"]})]}),e?c.jsx("div",{className:"text-neutral-400 text-sm",children:"Loading…"}):n?c.jsx("div",{className:"p-6 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:"Couldn't load companies. Try refreshing."}):t?.length?c.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(i=>c.jsxs(Qe,{href:`/admin/companies/${i.id}`,className:"group bg-white border border-neutral-200 rounded p-5 hover:border-[#099492] hover:shadow-md transition cursor-pointer block","data-testid":`card-company-${i.slug}`,children:[c.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[i.logoUrl?c.jsx("div",{className:"w-10 h-10 rounded bg-neutral-900 p-1.5 flex items-center justify-center",children:c.jsx("img",{src:i.logoUrl,alt:i.name,className:"max-w-full max-h-full object-contain",style:{filter:"brightness(0) invert(1)"},loading:"lazy"})}):c.jsx("div",{className:"w-10 h-10 rounded flex items-center justify-center text-white font-black text-sm",style:{backgroundColor:i.brandColor||"#003320"},children:i.name.slice(0,2).toUpperCase()}),c.jsx("span",{className:`text-[10px] uppercase tracking-wider font-bold px-2 py-0.5 rounded ${i.kind==="firm"?"bg-[#0BB9B7] text-neutral-900":"bg-neutral-100 text-neutral-600"}`,children:i.kind})]}),c.jsx("div",{className:"font-bold text-neutral-900 group-hover:text-[#099492] transition",children:i.name}),i.shortDescription&&c.jsx("div",{className:"text-sm text-neutral-600 mt-1 line-clamp-2",children:i.shortDescription}),i.websiteUrl&&c.jsxs("div",{className:"flex items-center gap-1 text-xs text-neutral-500 mt-3",children:[c.jsx(da,{className:"w-3 h-3"}),c.jsx("span",{className:"truncate",children:i.websiteUrl.replace(/^https?:\/\//,"")})]})]},i.id))}):c.jsxs("div",{className:"p-12 text-center bg-white border border-neutral-200 rounded",children:[c.jsx(Zu,{className:"w-8 h-8 mx-auto text-neutral-300 mb-3"}),c.jsx("div",{className:"text-neutral-500 text-sm",children:"No companies yet"}),s&&c.jsxs(Qe,{href:"/admin/companies/new",className:"inline-flex items-center gap-2 mt-4 text-sm font-bold text-[#099492] hover:underline",children:[c.jsx(zn,{className:"w-4 h-4"})," Add the first one"]})]})]})}var nfe=Object.defineProperty,rfe=(t,e,n)=>e in t?nfe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$t=(t,e,n)=>rfe(t,typeof e!="symbol"?e+"":e,n);const Zg={x:0,y:0,width:0,height:0,unit:"px"},Xc=(t,e,n)=>Math.min(Math.max(t,e),n),sfe=(...t)=>t.filter(e=>e&&typeof e=="string").join(" "),VO=(t,e)=>t===e||t.width===e.width&&t.height===e.height&&t.x===e.x&&t.y===e.y&&t.unit===e.unit;function ife(t,e,n,r){const s=di(t,n,r);return t.width&&(s.height=s.width/e),t.height&&(s.width=s.height*e),s.y+s.height>r&&(s.height=r-s.y,s.width=s.height*e),s.x+s.width>n&&(s.width=n-s.x,s.height=s.width/e),t.unit==="%"?oo(s,n,r):s}function afe(t,e,n){const r=di(t,e,n);return r.x=(e-r.width)/2,r.y=(n-r.height)/2,t.unit==="%"?oo(r,e,n):r}function oo(t,e,n){return t.unit==="%"?{...Zg,...t,unit:"%"}:{unit:"%",x:t.x?t.x/e*100:0,y:t.y?t.y/n*100:0,width:t.width?t.width/e*100:0,height:t.height?t.height/n*100:0}}function di(t,e,n){return t.unit?t.unit==="px"?{...Zg,...t,unit:"px"}:{unit:"px",x:t.x?t.x*e/100:0,y:t.y?t.y*n/100:0,width:t.width?t.width*e/100:0,height:t.height?t.height*n/100:0}:{...Zg,...t,unit:"px"}}function $O(t,e,n,r,s,i=0,a=0,l=r,d=s){const h={...t};let p=Math.min(i,r),m=Math.min(a,s),g=Math.min(l,r),x=Math.min(d,s);e&&(e>1?(p=a?a*e:p,m=p/e,g=l*e):(m=i?i/e:m,p=m*e,x=d/e)),h.y<0&&(h.height=Math.max(h.height+h.y,m),h.y=0),h.x<0&&(h.width=Math.max(h.width+h.x,p),h.x=0);const v=r-(h.x+h.width);v<0&&(h.x=Math.min(h.x,r-p),h.width+=v);const S=s-(h.y+h.height);if(S<0&&(h.y=Math.min(h.y,s-m),h.height+=S),h.width<p&&((n==="sw"||n=="nw")&&(h.x-=p-h.width),h.width=p),h.height<m&&((n==="nw"||n=="ne")&&(h.y-=m-h.height),h.height=m),h.width>g&&((n==="sw"||n=="nw")&&(h.x-=g-h.width),h.width=g),h.height>x&&((n==="nw"||n=="ne")&&(h.y-=x-h.height),h.height=x),e){const C=h.width/h.height;if(C<e){const j=Math.max(h.width/e,m);(n==="nw"||n=="ne")&&(h.y-=j-h.height),h.height=j}else if(C>e){const j=Math.max(h.height*e,p);(n==="sw"||n=="nw")&&(h.x-=j-h.width),h.width=j}}return h}function ofe(t,e,n,r){const s={...t};return e==="ArrowLeft"?r==="nw"?(s.x-=n,s.y-=n,s.width+=n,s.height+=n):r==="w"?(s.x-=n,s.width+=n):r==="sw"?(s.x-=n,s.width+=n,s.height+=n):r==="ne"?(s.y+=n,s.width-=n,s.height-=n):r==="e"?s.width-=n:r==="se"&&(s.width-=n,s.height-=n):e==="ArrowRight"&&(r==="nw"?(s.x+=n,s.y+=n,s.width-=n,s.height-=n):r==="w"?(s.x+=n,s.width-=n):r==="sw"?(s.x+=n,s.width-=n,s.height-=n):r==="ne"?(s.y-=n,s.width+=n,s.height+=n):r==="e"?s.width+=n:r==="se"&&(s.width+=n,s.height+=n)),e==="ArrowUp"?r==="nw"?(s.x-=n,s.y-=n,s.width+=n,s.height+=n):r==="n"?(s.y-=n,s.height+=n):r==="ne"?(s.y-=n,s.width+=n,s.height+=n):r==="sw"?(s.x+=n,s.width-=n,s.height-=n):r==="s"?s.height-=n:r==="se"&&(s.width-=n,s.height-=n):e==="ArrowDown"&&(r==="nw"?(s.x+=n,s.y+=n,s.width-=n,s.height-=n):r==="n"?(s.y+=n,s.height-=n):r==="ne"?(s.y+=n,s.width-=n,s.height-=n):r==="sw"?(s.x-=n,s.width+=n,s.height+=n):r==="s"?s.height+=n:r==="se"&&(s.width+=n,s.height+=n)),s}const Jc={capture:!0,passive:!1};let lfe=0;const ro=class Bs extends N.PureComponent{constructor(){super(...arguments),$t(this,"docMoveBound",!1),$t(this,"mouseDownOnCrop",!1),$t(this,"dragStarted",!1),$t(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),$t(this,"componentRef",N.createRef()),$t(this,"mediaRef",N.createRef()),$t(this,"resizeObserver"),$t(this,"initChangeCalled",!1),$t(this,"instanceId",`rc-${lfe++}`),$t(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),$t(this,"onCropPointerDown",e=>{const{crop:n,disabled:r}=this.props,s=this.getBox();if(!n)return;const i=di(n,s.width,s.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const a=e.target.dataset.ord,l=!!a;let d=e.clientX,h=e.clientY,p=i.x,m=i.y;if(a){const g=e.clientX-s.x,x=e.clientY-s.y;let v=0,S=0;a==="ne"||a=="e"?(v=g-(i.x+i.width),S=x-i.y,p=i.x,m=i.y+i.height):a==="se"||a==="s"?(v=g-(i.x+i.width),S=x-(i.y+i.height),p=i.x,m=i.y):a==="sw"||a=="w"?(v=g-i.x,S=x-(i.y+i.height),p=i.x+i.width,m=i.y):(a==="nw"||a=="n")&&(v=g-i.x,S=x-i.y,p=i.x+i.width,m=i.y+i.height),d=p+s.x+v,h=m+s.y+S}this.evData={startClientX:d,startClientY:h,startCropX:p,startCropY:m,clientX:e.clientX,clientY:e.clientY,isResize:l,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),$t(this,"onComponentPointerDown",e=>{const{crop:n,disabled:r,locked:s,keepSelection:i,onChange:a}=this.props,l=this.getBox();if(r||s||i&&n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const d=e.clientX-l.x,h=e.clientY-l.y,p={unit:"px",x:d,y:h,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:d,startCropY:h,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(di(p,l.width,l.height),oo(p,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),$t(this,"onDocPointerMove",e=>{const{crop:n,disabled:r,onChange:s,onDragStart:i}=this.props,a=this.getBox();if(r||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,i&&i(e));const{evData:l}=this;l.clientX=e.clientX,l.clientY=e.clientY;let d;l.isResize?d=this.resizeCrop():d=this.dragCrop(),VO(n,d)||s(di(d,a.width,a.height),oo(d,a.width,a.height))}),$t(this,"onComponentKeyDown",e=>{const{crop:n,disabled:r,onChange:s,onComplete:i}=this.props;if(r)return;const a=e.key;let l=!1;if(!n)return;const d=this.getBox(),h=this.makePixelCrop(d),p=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?Bs.nudgeStepLarge:e.shiftKey?Bs.nudgeStepMedium:Bs.nudgeStep;if(a==="ArrowLeft"?(h.x-=p,l=!0):a==="ArrowRight"?(h.x+=p,l=!0):a==="ArrowUp"?(h.y-=p,l=!0):a==="ArrowDown"&&(h.y+=p,l=!0),l){e.cancelable&&e.preventDefault(),h.x=Xc(h.x,0,d.width-h.width),h.y=Xc(h.y,0,d.height-h.height);const m=di(h,d.width,d.height),g=oo(h,d.width,d.height);s(m,g),i&&i(m,g)}}),$t(this,"onHandlerKeyDown",(e,n)=>{const{aspect:r=0,crop:s,disabled:i,minWidth:a=0,minHeight:l=0,maxWidth:d,maxHeight:h,onChange:p,onComplete:m}=this.props,g=this.getBox();if(i||!s)return;if(e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="ArrowLeft"||e.key==="ArrowRight")e.stopPropagation(),e.preventDefault();else return;const x=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?Bs.nudgeStepLarge:e.shiftKey?Bs.nudgeStepMedium:Bs.nudgeStep,v=di(s,g.width,g.height),S=ofe(v,e.key,x,n),C=$O(S,r,n,g.width,g.height,a,l,d,h);if(!VO(s,C)){const j=oo(C,g.width,g.height);p(C,j),m&&m(C,j)}}),$t(this,"onDocPointerDone",e=>{const{crop:n,disabled:r,onComplete:s,onDragEnd:i}=this.props,a=this.getBox();this.unbindDocMove(),!(r||!n)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),s&&s(di(n,a.width,a.height),oo(n,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),$t(this,"onDragFocus",()=>{var e;(e=this.componentRef.current)==null||e.scrollTo(0,0)})}get document(){return document}getBox(){const e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};const{x:n,y:r,width:s,height:i}=e.getBoundingClientRect();return{x:n,y:r,width:s,height:i}}componentDidUpdate(e){const{crop:n,onComplete:r}=this.props;if(r&&!e.crop&&n){const{width:s,height:i}=this.getBox();s&&i&&r(di(n,s,i),oo(n,s,i))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,Jc),this.document.addEventListener("pointerup",this.onDocPointerDone,Jc),this.document.addEventListener("pointercancel",this.onDocPointerDone,Jc),this.docMoveBound=!0)}
127unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,Jc),this.document.removeEventListener("pointerup",this.onDocPointerDone,Jc),this.document.removeEventListener("pointercancel",this.onDocPointerDone,Jc),this.docMoveBound=!1)}getCropStyle(){const{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){const{evData:e}=this,n=this.getBox(),r=this.makePixelCrop(n),s=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return r.x=Xc(e.startCropX+s,0,n.width-r.width),r.y=Xc(e.startCropY+i,0,n.height-r.height),r}getPointRegion(e,n,r,s){const{evData:i}=this,a=i.clientX-e.x,l=i.clientY-e.y;let d;s&&n?d=n==="nw"||n==="n"||n==="ne":d=l<i.startCropY;let h;return r&&n?h=n==="nw"||n==="w"||n==="sw":h=a<i.startCropX,h?d?"nw":"sw":d?"ne":"se"}resolveMinDimensions(e,n,r=0,s=0){const i=Math.min(r,e.width),a=Math.min(s,e.height);return!n||!i&&!a?[i,a]:n>1?i?[i,i/n]:[a*n,a]:a?[a*n,a]:[i,i/n]}resizeCrop(){const{evData:e}=this,{aspect:n=0,maxWidth:r,maxHeight:s}=this.props,i=this.getBox(),[a,l]=this.resolveMinDimensions(i,n,this.props.minWidth,this.props.minHeight);let d=this.makePixelCrop(i);const h=this.getPointRegion(i,e.ord,a,l),p=e.ord||h;let m=e.clientX-e.startClientX,g=e.clientY-e.startClientY;(a&&p==="nw"||p==="w"||p==="sw")&&(m=Math.min(m,-a)),(l&&p==="nw"||p==="n"||p==="ne")&&(g=Math.min(g,-l));const x={unit:"px",x:0,y:0,width:0,height:0};h==="ne"?(x.x=e.startCropX,x.width=m,n?(x.height=x.width/n,x.y=e.startCropY-x.height):(x.height=Math.abs(g),x.y=e.startCropY-x.height)):h==="se"?(x.x=e.startCropX,x.y=e.startCropY,x.width=m,n?x.height=x.width/n:x.height=g):h==="sw"?(x.x=e.startCropX+m,x.y=e.startCropY,x.width=Math.abs(m),n?x.height=x.width/n:x.height=g):h==="nw"&&(x.x=e.startCropX+m,x.width=Math.abs(m),n?(x.height=x.width/n,x.y=e.startCropY-x.height):(x.height=Math.abs(g),x.y=e.startCropY+g));const v=$O(x,n,h,i.width,i.height,a,l,r,s);return n||Bs.xyOrds.indexOf(p)>-1?d=v:Bs.xOrds.indexOf(p)>-1?(d.x=v.x,d.width=v.width):Bs.yOrds.indexOf(p)>-1&&(d.y=v.y,d.height=v.height),d.x=Xc(d.x,0,i.width-d.width),d.y=Xc(d.y,0,i.height-d.height),d}renderCropSelection(){const{ariaLabels:e=Bs.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:s,ruleOfThirds:i,crop:a}=this.props,l=this.getCropStyle();if(a)return z.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":e.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!r&&z.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},z.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),z.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),z.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),z.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":e.nwDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"nw"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":e.nDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"n"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":e.neDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"ne"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":e.eDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"e"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":e.seDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"se"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":e.sDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"s"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":e.swDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"sw"),role:"button"}),z.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":e.wDragHandle,onKeyDown:d=>this.onHandlerKeyDown(d,"w"),role:"button"})),s&&z.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:d=>d.stopPropagation()},s(this.state)),i&&z.createElement(z.Fragment,null,z.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),z.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){const n={...Zg,...this.props.crop||{}};return di(n,e.width,e.height)}render(){const{aspect:e,children:n,circularCrop:r,className:s,crop:i,disabled:a,locked:l,style:d,ruleOfThirds:h}=this.props,{cropIsActive:p,newCropIsBeingDrawn:m}=this.state,g=i?this.renderCropSelection():null,x=sfe("ReactCrop",s,p&&"ReactCrop--active",a&&"ReactCrop--disabled",l&&"ReactCrop--locked",m&&"ReactCrop--new-crop",i&&e&&"ReactCrop--fixed-aspect",i&&r&&"ReactCrop--circular-crop",i&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&i&&!i.width&&!i.height&&"ReactCrop--invisible-crop",r&&"ReactCrop--no-animate");return z.createElement("div",{ref:this.componentRef,className:x,style:d},z.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),i?z.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},z.createElement("defs",null,z.createElement("mask",{id:`hole-${this.instanceId}`},z.createElement("rect",{width:"100%",height:"100%",fill:"white"}),r?z.createElement("ellipse",{cx:`${i.x+i.width/2}${i.unit}`,cy:`${i.y+i.height/2}${i.unit}`,rx:`${i.width/2}${i.unit}`,ry:`${i.height/2}${i.unit}`,fill:"black"}):z.createElement("rect",{x:`${i.x}${i.unit}`,y:`${i.y}${i.unit}`,width:`${i.width}${i.unit}`,height:`${i.height}${i.unit}`,fill:"black"}))),z.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,g)}};$t(ro,"xOrds",["e","w"]),$t(ro,"yOrds",["n","s"]),$t(ro,"xyOrds",["nw","ne","se","sw"]),$t(ro,"nudgeStep",1),$t(ro,"nudgeStepMedium",10),$t(ro,"nudgeStepLarge",100),$t(ro,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let cfe=ro;const HO="image/png,image/jpeg,image/webp,image/svg+xml",ufe=10*1024*1024;function dfe(t,e,n){return afe(ife({unit:"%",width:90},n,t,e),t,e)}function hfe(){return{unit:"%",x:0,y:0,width:100,height:100}}
127async function ffe(t,e,n,r,s,i){const a=t.naturalWidth/t.width,l=t.naturalHeight/t.height,d=e.x*a,h=e.y*l,p=e.width*a,m=e.height*l,g=document.createElement("canvas"),x=Math.round(p),v=Math.round(m);if(s){const E=p/m;if(E>=1){const A=Math.min(x,n);g.width=A,g.height=Math.max(1,Math.round(A/E))}else{const A=Math.min(v,n);g.height=A,g.width=Math.max(1,Math.round(A*E))}}else{const E=Math.min(x,n);g.width=E,g.height=Math.round(E/r)}const S=g.getContext("2d");if(!S)throw new Error("Could not create canvas context");S.imageSmoothingQuality="high",S.drawImage(t,d,h,p,m,0,0,g.width,g.height);const C=i==="png"?"image/png":"image/jpeg",j=i==="jpeg"?.9:void 0;return new Promise((E,A)=>{g.toBlob(D=>D?E(D):A(new Error("Canvas is empty")),C,j)})}async function pfe(t,e,n){const r={"Content-Type":t.type||"image/jpeg"};n&&(r.Authorization=`Bearer ${n}`);const s=await fetch("/api/storage/uploads",{method:"POST",headers:r,credentials:"include",body:t});if(!s.ok){const a=await s.text().catch(()=>"");throw new Error(`Upload failed: ${s.status} ${a}`)}const{objectPath:i}=await s.json();return`/api/storage${i}`}function Ss({value:t,onChange:e,aspect:n,outputWidth:r,label:s,hint:i,testId:a,shape:l="rect",freeCrop:d=!1,outputFormat:h="jpeg",previewFilter:p,compact:m=!1}){const{getToken:g}=ax(),[x,v]=N.useState(!1),[S,C]=N.useState(!1),[j,E]=N.useState(null),[A,D]=N.useState(null),[M,I]=N.useState(void 0),[_,L]=N.useState(null),V=N.useRef(null),B=N.useRef(null);N.useEffect(()=>()=>{A&&URL.revokeObjectURL(A)},[A]);const K=()=>V.current?.click(),ee=N.useCallback(le=>{if(E(null),!le.type.startsWith("image/")){E("Please choose an image file (PNG, JPG, or WebP).");return}if(le.size>ufe){E("Image is too large (max 10 MB).");return}const P=URL.createObjectURL(le);D(te=>(te&&URL.revokeObjectURL(te),P)),I(void 0),L(null)},[]),ie=le=>{le.preventDefault(),v(!1);const P=le.dataTransfer.files?.[0];P&&ee(P)},se=le=>{const{width:P,height:te}=le.currentTarget;if(d){const ue=hfe();I(ue),L({unit:"px",x:0,y:0,width:P,height:te})}else{const ue=dfe(P,te,n);I(ue),L({unit:"px",x:Math.round(ue.x/100*P),y:Math.round(ue.y/100*te),width:Math.round(ue.width/100*P),height:Math.round(ue.height/100*te)})}},he=()=>{A&&URL.revokeObjectURL(A),D(null),I(void 0),L(null),E(null),V.current&&(V.current.value="")}
127,$=async()=>{if(!B.current||!_){E("Please drag to select the area to keep.");return}if(_.width<1||_.height<1){E("Selection is too small. Please select a larger area.");return}C(!0),E(null);try{const le=await ffe(B.current,_,r,n,d,h),P=h==="png"?"png":"jpg";let te=null;try{te=await g()}catch(fe){console.error("[ImageUploader] getToken() threw:",fe)}te?console.log("[ImageUploader] token obtained, length:",te.length):console.warn("[ImageUploader] getToken() returned null — upload will proceed without Bearer auth");const ue=await pfe(le,`upload-${Date.now()}.${P}`,te);e(ue),he()}catch(le){E(le instanceof Error?le.message:"Upload failed")}finally{C(!1)}},Q=()=>{e("")},re=()=>l==="square"?c.jsx("div",{className:"w-24 h-24 rounded bg-neutral-900 p-3 flex items-center justify-center border border-neutral-200",children:c.jsx("img",{src:t,alt:"Current",className:"max-w-full max-h-full object-contain",style:p?{filter:p}:void 0})}):c.jsx("img",{src:t,alt:"Current",className:"w-full max-w-sm rounded object-cover bg-neutral-100 border border-neutral-200",style:{aspectRatio:String(n),...p?{filter:p}:{}}});return c.jsxs("div",{"data-testid":a,children:[s&&c.jsx("label",{className:"block text-xs uppercase tracking-wider text-neutral-500 mb-2",children:s}),t&&!A&&!m&&c.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[re(),c.jsx("button",{type:"button",onClick:Q,className:"text-xs text-neutral-600 hover:text-neutral-900 underline","data-testid":a?`${a}-clear`:void 0,children:"Remove"})]}),!A&&(m?c.jsxs("div",{onClick:K,onDragOver:le=>{le.preventDefault(),v(!0)},onDragLeave:()=>v(!1),onDrop:ie,className:`cursor-pointer rounded border-2 border-dashed px-3 py-2 flex items-center justify-between gap-3 transition ${x?"border-[#0BB9B7] bg-[#0BB9B7]/10":"border-neutral-300 bg-neutral-50 hover:border-neutral-400 hover:bg-neutral-100"}`,"data-testid":a?`${a}-dropzone`:void 0,children:[c.jsx("p",{className:"text-xs text-neutral-600 truncate",children:t?"Drop a new image here to replace":"Drop an image here · PNG, JPG, WebP up to 10 MB"}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c.jsx("button",{type:"button",onClick:le=>{le.stopPropagation(),K()},className:"inline-flex items-center px-2.5 py-1 text-xs rounded bg-neutral-900 text-white hover:bg-neutral-800 transition",children:t?"Change":"Browse"}),t&&c.jsx("button",{type:"button",onClick:le=>{le.stopPropagation(),Q()},className:"text-xs text-neutral-600 hover:text-neutral-900 underline","data-testid":a?`${a}-clear`:void 0,children:"Remove"})]}),c.jsx("input",{ref:V,type:"file",accept:HO,className:"hidden",onChange:le=>{const P=le.target.files?.[0];P&&ee(P)}})]}):c.jsxs("div",{onClick:K,onDragOver:le=>{le.preventDefault(),v(!0)},onDragLeave:()=>v(!1),onDrop:ie,className:`cursor-pointer rounded border-2 border-dashed p-6 text-center transition ${x?"border-[#0BB9B7] bg-[#0BB9B7]/10":"border-neutral-300 bg-neutral-50 hover:border-neutral-400 hover:bg-neutral-100"}`,"data-testid":a?`${a}-dropzone`:void 0,children:[c.jsx("p",{className:"text-sm text-neutral-700 mb-2",children:"Drag & drop an image here"}),c.jsx("p",{className:"text-xs text-neutral-500 mb-3",children:"PNG, JPG, or WebP • up to 10 MB"}),c.jsx("button",{type:"button",onClick:le=>{le.stopPropagation(),K()},className:"inline-flex items-center px-3 py-1.5 text-sm rounded bg-neutral-900 text-white hover:bg-neutral-800 transition",children:"Browse files"}),c.jsx("input",{ref:V,type:"file",accept:HO,className:"hidden",onChange:le=>{const P=le.target.files?.[0];P&&ee(P)}})]})),A&&c.jsxs("div",{className:"mt-3 rounded border border-neutral-200 bg-white p-3",children:[c.jsx("p",{className:"text-xs text-neutral-600 mb-2",children:d?"Drag the corners to keep more or less of the logo. The whole selected area will fit inside the square tile.":`Drag the corners to reframe. The crop matches how the image will be displayed on the site (${l==="square"?"square":`${n.toFixed(2)}:1`}).`}),c.jsx("div",{className:"flex justify-center bg-neutral-100 rounded p-2",children:c.jsx(cfe,{crop:M,onChange:le=>I(le),onComplete:le=>L(le),aspect:d?void 0:n,keepSelection:!0,circularCrop:!1,className:"max-h-[400px]",children:c.jsx("img",{ref:B,src:A,alt:"To crop",onLoad:se,className:"max-h-[400px] object-contain"})})}),c.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:$,disabled:S,className:"px-4 py-1.5 text-sm rounded bg-[#003320] text-white hover:bg-[#099492] disabled:opacity-60 transition","data-testid":a?`${a}-confirm`:void 0,children:S?"Uploading…":"Use this crop"}),c.jsx("button",{type:"button",onClick:he,disabled:S,className:"px-3 py-1.5 text-sm rounded border border-neutral-300 hover:bg-neutral-50 transition",children:"Cancel"})]})]}),j&&c.jsx("p",{className:"mt-2 text-sm text-red-600",role:"alert",children:j}),i&&!j&&c.jsx("p",{className:"mt-2 text-xs text-neutral-500",children:i})]})}const mfe={slug:"",name:"",kind:"portfolio",brandColor:"#0BB9B7",logoUrl:"",websiteUrl:"",shortDe
127scription:"",tagline:"",imageUrl:"",country:"",sector:"",region:"",fund:"",stage:"",status:"Active",fundedAt:""},gfe=["Energy","Transport","Food & Agriculture","Industry","Buildings","Land Use"],yfe=["Southeast Asia","India","Australia"],xfe=["Fund I","Fund II"],bfe=["Pre-seed","Seed","Series A","Series B"],vfe=["Active","Exited","Terminated"],KO=/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;function WO(t){return/^https?:\/\//i.test(t)||t.startsWith("/")}function uw(t){return t.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80)}function GO(){const t=Xy(),e=!t.id||t.id==="new",[,n]=Ti(),r=kn(),{data:s}=nd({query:{retry:!1}}),{data:i,isLoading:a,error:l}=AY(e?"":t.id,{query:{enabled:!e,retry:!1}}),d=NY(),h=DY(),p=IY(),[m,g]=N.useState(mfe),[x,v]=N.useState(null),[S,C]=N.useState(!1);N.useEffect(()=>{i&&!e&&g({slug:i.slug,name:i.name,kind:i.kind,brandColor:i.brandColor??"",logoUrl:i.logoUrl??"",websiteUrl:i.websiteUrl??"",shortDescription:i.shortDescription??"",tagline:i.tagline??"",imageUrl:i.imageUrl??"",country:i.country??"",sector:i.sector??"",region:i.region??"",fund:i.fund??"",stage:i.stage??"",status:i.status??"Active",fundedAt:i.fundedAt?new Date(i.fundedAt).toISOString().slice(0,10):""})},[i,e]);const j=(B,K)=>{g(ee=>{const ie={...ee,[B]:K};return B==="name"&&e&&(!ee.slug||ee.slug===uw(ee.name))&&(ie.slug=uw(K)),ie})},E=s?.role,A=E==="admin",D=E==="portfolio_editor",M=A,I=async()=>{if(v(null),m.brandColor&&!KO.test(m.brandColor)){v("Brand color must be a hex code like #0BB9B7.");return}if(m.websiteUrl&&!/^https?:\/\//i.test(m.websiteUrl)){v("Website URL must start with http:// or https://.");return}if(m.logoUrl&&!WO(m.logoUrl)){v("Logo URL must start with http://, https://, or / (for site assets).");return}if(m.imageUrl&&!WO(m.imageUrl)){v("Cover image URL must start with http://, https://, or / (for site assets).");return}const B={slug:m.slug,name:m.name,kind:m.kind,brandColor:m.brandColor||null,logoUrl:m.logoUrl||null,websiteUrl:m.websiteUrl||null,shortDescription:m.shortDescription||null,tagline:m.tagline||null,imageUrl:m.imageUrl||null,country:m.country||null,sector:m.sector||null,region:m.region||null,fund:m.fund||null,stage:m.stage||null,status:m.status,fundedAt:m.fundedAt?`${m.fundedAt}T00:00:00.000Z`:null};try{if(e){const K=await d.mutateAsync({data:B});await r.invalidateQueries({queryKey:sg()}),n(`/admin/companies/${K.id}`)}else await h.mutateAsync({id:t.id,data:B}),await r.invalidateQueries({queryKey:sg()}),await r.invalidateQueries({queryKey:KL(t.id)})}catch(K){const ee=K instanceof Error?K.message:"Could not save. Please try again.";v(ee)}},_=async()=>{if(!e){v(null);try{await p.mutateAsync({id:t.id}),await r.invalidateQueries({queryKey:sg()}),n("/admin/companies")}catch(B){const K=B instanceof Error?B.message:"Could not delete.";v(K),C(!1)}}};if(!e&&a)return c.jsx("div",{className:"p-10 text-neutral-400 text-sm",children:"Loading…"});if(!e&&l){const B=l.status,K=B===404?"This company no longer exists.":B===403?"You don't have access to this company.":"We couldn't load this company. Check your connection and try again.";return c.jsxs("div",{className:"p-10 max-w-3xl",children:[c.jsxs("button",{onClick:()=>n("/admin/companies"),className:"inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 mb-6 transition",children:[c.jsx(ws,{className:"w-4 h-4"})," Back to companies"]}),c.jsxs("div",{className:"p-6 bg-red-50 border border-red-200 rounded text-sm text-red-700 flex items-start gap-3",children:[c.jsx(kt,{className:"w-5 h-5 mt-0.5 flex-shrink-0"}),c.jsxs("div",{children:[c.jsx("div",{className:"font-bold mb-1",children:"Couldn't load this company"}),c.jsx("div",{children:K})]})]})]})}if(e&&!A)return c.jsxs("div",{className:"p-10 max-w-3xl",children:[c.jsxs("button",{onClick:()=>n("/admin/companies"),className:"inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 mb-6 transition",children:[c.jsx(ws,{className:"w-4 h-4"})," Back to companies"]}),c.jsx("div",{className:"p-6 bg-amber-50 border border-amber-200 rounded text-sm text-amber-800",children:"Only admins can create new companies."})]});const L=d.status==="pending"||h.status==="pending",V=p.status==="pending";return c.jsxs("div",{className:"p-10 max-w-3xl",children:[c.jsxs("button",{onClick:()=>n("/admin/companies"),className:"inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 mb
127-6 transition","data-testid":"link-back-to-companies",children:[c.jsx(ws,{className:"w-4 h-4"})," Back to companies"]}),c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-3",children:e?"Create company":"Edit company"}),c.jsxs("h1",{className:"text-3xl font-black uppercase tracking-tighter mb-8 flex items-center gap-4",children:[m.logoUrl?c.jsx("div",{className:"w-12 h-12 rounded bg-neutral-900 p-2 flex items-center justify-center shrink-0",children:c.jsx("img",{src:m.logoUrl,alt:"",className:"max-w-full max-h-full object-contain",style:{filter:"brightness(0) invert(1)"}})}):c.jsx("div",{className:"w-12 h-12 rounded flex items-center justify-center text-white font-black text-base",style:{backgroundColor:m.brandColor||"#003320"},children:(m.name||"??").slice(0,2).toUpperCase()}),c.jsx("span",{className:"truncate",children:e?"New company":m.name||"Untitled company"})]}),!e&&i&&c.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-8",children:[c.jsx(dw,{icon:c.jsx(Ru,{className:"w-4 h-4"}),label:"Live jobs",value:i.publishedJobCount}),c.jsx(dw,{icon:c.jsx(Zu,{className:"w-4 h-4"}),label:"Total jobs",value:i.jobCount}),c.jsx(dw,{icon:c.jsx(Du,{className:"w-4 h-4"}),label:"Applications",value:i.applicationCount})]}),!e&&D&&c.jsx("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded text-sm text-amber-800",children:"You can edit your company's branding and description. Only admins can change the URL slug, type, or delete the company."}),x&&c.jsxs("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded text-sm text-red-700 flex items-start gap-2","data-testid":"text-form-error",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:x})]}),c.jsxs("div",{className:"space-y-6 bg-white border border-neutral-200 rounded p-6",children:[c.jsx(Dr,{label:"Company name",required:!0,children:c.jsx("input",{type:"text",value:m.name,onChange:B=>j("name",B.target.value),className:"input",placeholder:"Acme Climate Inc.","data-testid":"input-company-name"})}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsx(Dr,{label:"URL slug",required:!0,hint:M?"Used in /careers/ links. Lowercase, dashes only.":"Locked — only admins can change.",children:c.jsx("input",{type:"text",value:m.slug,onChange:B=>j("slug",uw(B.target.value)),className:"input",placeholder:"acme-climate",disabled:!M,"data-testid":"input-company-slug"})}),c.jsx(Dr,{label:"Type",hint:M?void 0:"Locked — only admins can change.",children:c.jsxs("select",{value:m.kind,onChange:B=>j("kind",B.target.value),className:"input",disabled:!M,"data-testid":"select-company-kind",children:[c.jsx("option",{value:"portfolio",children:"Portfolio company"}),c.jsx("option",{value:"firm",children:"Firm (100x100)"})]})})]}),c.jsx(Dr,{label:"Tagline",hint:"Short headline shown on the public portfolio card.",children:c.jsx("input",{type:"text",value:m.tagline,onChange:B=>j("tagline",B.target.value),className:"input",placeholder:"Decarbonising smallholder farmers","data-testid":"input-company-tagline"})}),c.jsx(Dr,{label:"Short description",hint:"Shown on the public portfolio + careers grid.",children:c.jsx("textarea",{value:m.shortDescription,onChange:B=>j("shortDescription",B.target.value),className:"input min-h-[80px]",placeholder:"One sentence on what this company does.","data-testid":"input-company-description"})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsx(Dr,{label:"Sector",children:c.jsxs("select",{value:m.sector,onChange:B=>j("sector",B.target.value),className:"input","data-testid":"select-company-sector",children:[c.jsx("option",{value:"",children:"— Select —"}),gfe.map(B=>c.jsx("option",{value:B,children:B},B))]})}),c.jsx(Dr,{label:"Region",children:c.jsxs("select",{value:m.region,onChange:B=>j("region",B.target.value),className:"input","data-testid":"select-company-region",children:[c.jsx("option",{value:"",children:"— Select —"}),yfe.map(B=>c.jsx("option",{value:B,children:B},B))]})}),c.jsx(Dr,{label:"Country",children:c.jsx("input",{type:"text",value:m.country,onChange:B=>
127j("country",B.target.value),className:"input",placeholder:"Vietnam","data-testid":"input-company-country"})})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsx(Dr,{label:"Fund",children:c.jsxs("select",{value:m.fund,onChange:B=>j("fund",B.target.value),className:"input","data-testid":"select-company-fund",children:[c.jsx("option",{value:"",children:"— Select —"}),xfe.map(B=>c.jsx("option",{value:B,children:B},B))]})}),c.jsx(Dr,{label:"Stage",children:c.jsxs("select",{value:m.stage,onChange:B=>j("stage",B.target.value),className:"input","data-testid":"select-company-stage",children:[c.jsx("option",{value:"",children:"— Select —"}),bfe.map(B=>c.jsx("option",{value:B,children:B},B))]})}),c.jsx(Dr,{label:"Status",hint:"Terminated companies render grayscaled on the public site.",children:c.jsx("select",{value:m.status,onChange:B=>j("status",B.target.value),className:"input","data-testid":"select-company-status",children:vfe.map(B=>c.jsx("option",{value:B,children:B},B))})})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:c.jsx(Dr,{label:"Funding date",hint:"Date 100x100 first invested. Used for the Funding Date sort on the public portfolio page.",children:c.jsx("input",{type:"date",value:m.fundedAt,onChange:B=>j("fundedAt",B.target.value),className:"input","data-testid":"input-company-funded-at"})})}),c.jsx(Ss,{label:"Cover image",hint:"Shown on hover on the public portfolio card. Drop or browse a photo and reframe it to match how it'll display.",value:m.imageUrl,onChange:B=>j("imageUrl",B),aspect:3/2,outputWidth:1200,shape:"rect",testId:"upload-company-image"}),c.jsx(Dr,{label:"Website URL",hint:"Including https://",children:c.jsx("input",{type:"url",value:m.websiteUrl,onChange:B=>j("websiteUrl",B.target.value),className:"input block w-full",placeholder:"https://acme.example.com","data-testid":"input-company-website"})}),c.jsx(Ss,{label:"Logo",hint:"Drop a logo (PNG with transparent background works best). The whole image will fit inside the square tile and is shown in white over a dark backdrop. Leave empty to use the brand-color monogram instead.",value:m.logoUrl,onChange:B=>j("logoUrl",B),aspect:1,outputWidth:512,shape:"square",freeCrop:!0,outputFormat:"png",previewFilter:"brightness(0) invert(1)",testId:"upload-company-logo"}),c.jsx(Dr,{label:"Brand color",hint:"Hex like #0BB9B7. Falls back to deep green.",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"color",value:m.brandColor&&KO.test(m.brandColor)?m.brandColor.slice(0,7):"#0BB9B7",onChange:B=>j("brandColor",B.target.value),className:"h-10 w-16 rounded border border-neutral-200 cursor-pointer","data-testid":"input-company-color-picker"}),c.jsx("input",{type:"text",value:m.brandColor,onChange:B=>j("brandColor",B.target.value),className:"input flex-1 font-mono text-sm",placeholder:"#0BB9B7","data-testid":"input-company-color-hex"})]})})]}),c.jsxs("div",{className:"flex items-center justify-between mt-8 gap-3 flex-wrap",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("button",{onClick:I,disabled:L||!m.name||!m.slug,className:"inline-flex items-center gap-2 bg-[#003320] text-[#0BB9B7] px-6 py-3 rounded font-bold text-sm uppercase tracking-wider hover:bg-[#099492] hover:text-white transition disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"button-save-company",children:[c.jsx(Xl,{className:"w-4 h-4"}),L?"Saving…":e?"Create company":"Save changes"]}),!e&&i&&c.jsxs(Qe,{href:`/companies/${i.slug}`,className:"inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 transition","data-testid":"link-view-public",children:[c.jsx(da,{className:"w-4 h-4"})," View on site"]})]}),!e&&A&&c.jsx("div",{className:"flex items-center gap-3",children:S?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-sm text-red-700",children:"Are you sure?"}),c.jsxs("button",{onClick:_,disabled:V,className:"inline-flex items-center gap-2 bg-red-600 text-white px-4 py-2 rounded font-bold text-sm uppercase tracking-wider hover:bg-red-700 transition disabled:opacity-50","data-testid":"button-confirm-delete",children:[c.jsx(qn,{
127className:"w-4 h-4"}),V?"Deleting…":"Yes, delete"]}),c.jsx("button",{onClick:()=>C(!1),className:"text-sm text-neutral-500 hover:text-neutral-900",children:"Cancel"})]}):c.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 text-red-600 hover:text-red-700 px-3 py-2 rounded font-bold text-sm uppercase tracking-wider transition","data-testid":"button-delete-company",children:[c.jsx(qn,{className:"w-4 h-4"})," Delete"]})})]})]})}function Dr({label:t,hint:e,required:n,children:r}){return c.jsxs("div",{children:[c.jsxs("label",{className:"block text-xs font-bold uppercase tracking-wider text-neutral-700 mb-1.5",children:[t,n&&c.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),r,e&&c.jsx("div",{className:"text-xs text-neutral-500 mt-1.5",children:e})]})}function dw({icon:t,label:e,value:n}){return c.jsxs("div",{className:"bg-white border border-neutral-200 rounded p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wider text-neutral-500 mb-1",children:[t,e]}),c.jsx("div",{className:"text-2xl font-black tracking-tighter text-neutral-900",children:n})]})}function wfe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return N.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const Tx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ad(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function mC(t){return"nodeType"in t}function Br(t){var e,n;return t?ad(t)?t:mC(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function gC(t){const{Document:e}=Br(t);return t instanceof e}function Gf(t){return ad(t)?!1:t instanceof Br(t).HTMLElement}function t5(t){return t instanceof Br(t).SVGElement}function od(t){return t?ad(t)?t.document:mC(t)?gC(t)?t:Gf(t)||t5(t)?t.ownerDocument:document:document:document}const Ni=Tx?N.useLayoutEffect:N.useEffect;function yC(t){const e=N.useRef(t);return Ni(()=>{e.current=t}),N.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Sfe(){const t=N.useRef(null),e=N.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=N.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function pf(t,e){e===void 0&&(e=[t]);const n=N.useRef(t);return Ni(()=>{n.current!==t&&(n.current=t)},e),n}function Yf(t,e){const n=N.useRef();return N.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function ey(t){const e=yC(t),n=N.useRef(null),r=N.useCallback(s=>{s!==n.current&&e?.(s,n.current),n.current=s},[]);return[n,r]}function X1(t){const e=N.useRef();return N.useEffect(()=>{e.current=t},[t]),e.current}let hw={};function Qf(t,e){return N.useMemo(()=>{if(e)return e;const n=hw[t]==null?0:hw[t]+1;return hw[t]=n,t+"-"+n},[t,e])}function n5(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((i,a)=>{const l=Object.entries(a);for(const[d,h]of l){const p=i[d];p!=null&&(i[d]=p+t*h)}return i},{...e})}}const Au=n5(1),mf=n5(-1);function kfe(t){return"clientX"in t&&"clientY"in t}function xC(t){if(!t)return!1;const{KeyboardEvent:e}=Br(t.target);return e&&t instanceof e}function Cfe(t){if(!t)return!1;const{TouchEvent:e}=Br(t.target);return e&&t instanceof e}function J1(t){if(Cfe(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return kfe(t)?{x:t.clientX,y:t.clientY}:null}const zu=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[zu.Translate.toString(t),zu.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),YO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Nfe(t){return t.matches(YO)?t:t.querySelector(YO)}const jfe={display:"none"};function Efe(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:jfe},n)}function Tfe(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function Afe(){const[t,e]=N.useState("");return{announce:N.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const r5=N.createContext(null);function Mfe(t){const e=N.useContext(r5);N.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Ofe(){const[t]=N.useState(()=>new Set),e=N.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[N.useCallback(r=>{let{type:s,event:i}=r;t.forEach(a=>{var l;return(l=a[s])==null?void 0:l.call(a,i)})},[t]),e]}const Rfe={draggable:`
128    To pick up a draggable item, press the space bar.
129    While dragging, use the arrow keys to move the item.
130    Press space again to drop the item in its new position, or press escape to cancel.
131  `},Dfe={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function _fe(t){let{announcements:e=Dfe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=Rfe}=t;const{announce:i,announcement:a}
131=Afe(),l=Qf("DndLiveRegion"),[d,h]=N.useState(!1);if(N.useEffect(()=>{h(!0)},[]),Mfe(N.useMemo(()=>({onDragStart(m){let{active:g}=m;i(e.onDragStart({active:g}))},onDragMove(m){let{active:g,over:x}=m;e.onDragMove&&i(e.onDragMove({active:g,over:x}))},onDragOver(m){let{active:g,over:x}=m;i(e.onDragOver({active:g,over:x}))},onDragEnd(m){let{active:g,over:x}=m;i(e.onDragEnd({active:g,over:x}))},onDragCancel(m){let{active:g,over:x}=m;i(e.onDragCancel({active:g,over:x}))}}),[i,e])),!d)return null;const p=z.createElement(z.Fragment,null,z.createElement(Efe,{id:r,value:s.draggable}),z.createElement(Tfe,{id:l,announcement:a}));return n?$s.createPortal(p,n):p}var Mn;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Mn||(Mn={}));function ty(){}function QO(t,e){return N.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Pfe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const Js=Object.freeze({x:0,y:0});function s5(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function i5(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function Lfe(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function XO(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function a5(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function JO(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const Ife=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=JO(e,e.left,e.top),i=[];for(const a of r){const{id:l}=a,d=n.get(l);if(d){const h=s5(JO(d),s);i.push({id:l,data:{droppableContainer:a,value:h}})}}return i.sort(i5)},Ufe=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=XO(e),i=[];for(const a of r){const{id:l}=a,d=n.get(l);if(d){const h=XO(d),p=s.reduce((g,x,v)=>g+s5(h[v],x),0),m=Number((p/4).toFixed(4));i.push({id:l,data:{droppableContainer:a,value:m}})}}return i.sort(i5)};function Bfe(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),a=s-r,l=i-n;if(r<s&&n<i){const d=e.width*e.height,h=t.width*t.height,p=a*l,m=p/(d+h-p);return Number(m.toFixed(4))}return 0}const Ffe=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const d=Bfe(l,e);d>0&&s.push({id:a,data:{droppableContainer:i,value:d}})}}return s.sort(Lfe)};function zfe(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function o5(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Js}function qfe(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];return s.reduce((a,l)=>({...a,top:a.top+t*l.y,bottom:a.bottom+t*l.y,left:a.left+t*l.x,right:a.right+t*l.x}),{...n})}}const Vfe=qfe(1);function $fe(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Hfe(t,e,n){const r=$fe(e);if(!r)return t;const{scaleX:s,scaleY:i,x:a,y:l}=r,d=t.left-a-(1-s)*parseFloat(n),h=t.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),p=s?t.width/s:t.width,m=i?t.height/i:t.height;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d}}const Kfe={ignoreTransform:!1};function ld(t,e){e===void 0&&(e=Kfe);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:p}=Br(t).getComputedStyle(t);h&&(n=Hfe(n,h,p))}const{top:r,left:s,width:i,height:a,bottom:l,right:d}=n;return{top:r,left:s,width:i,height:a,bottom:l,right:d}}function ZO(t){return ld(t,{ignoreTransform:!0})}
131function Wfe(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function Gfe(t,e){return e===void 0&&(e=Br(t).getComputedStyle(t)),e.position==="fixed"}function Yfe(t,e){e===void 0&&(e=Br(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const i=e[s];return typeof i=="string"?n.test(i):!1})}function Ax(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(gC(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!Gf(s)||t5(s)||n.includes(s))return n;const i=Br(t).getComputedStyle(s);return s!==t&&Yfe(s,i)&&n.push(s),Gfe(s,i)?n:r(s.parentNode)}return t?r(t):n}function l5(t){const[e]=Ax(t,1);return e??null}function fw(t){return!Tx||!t?null:ad(t)?t:mC(t)?gC(t)||t===od(t).scrollingElement?window:Gf(t)?t:null:null}function c5(t){return ad(t)?t.scrollX:t.scrollLeft}function u5(t){return ad(t)?t.scrollY:t.scrollTop}function Z1(t){return{x:c5(t),y:u5(t)}}var Fn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Fn||(Fn={}));function d5(t){return!Tx||!t?!1:t===document.scrollingElement}function h5(t){const e={x:0,y:0},n=d5(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,i=t.scrollLeft<=e.x,a=t.scrollTop>=r.y,l=t.scrollLeft>=r.x;return{isTop:s,isLeft:i,isBottom:a,isRight:l,maxScroll:r,minScroll:e}}const Qfe={x:.2,y:.2};function Xfe(t,e,n,r,s){let{top:i,left:a,right:l,bottom:d}=n;r===void 0&&(r=10),s===void 0&&(s=Qfe);const{isTop:h,isBottom:p,isLeft:m,isRight:g}=h5(t),x={x:0,y:0},v={x:0,y:0},S={height:e.height*s.y,width:e.width*s.x};return!h&&i<=e.top+S.height?(x.y=Fn.Backward,v.y=r*Math.abs((e.top+S.height-i)/S.height)):!p&&d>=e.bottom-S.height&&(x.y=Fn.Forward,v.y=r*Math.abs((e.bottom-S.height-d)/S.height)),!g&&l>=e.right-S.width?(x.x=Fn.Forward,v.x=r*Math.abs((e.right-S.width-l)/S.width)):!m&&a<=e.left+S.width&&(x.x=Fn.Backward,v.x=r*Math.abs((e.left+S.width-a)/S.width)),{direction:x,speed:v}}function Jfe(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function f5(t){return t.reduce((e,n)=>Au(e,Z1(n)),Js)}function Zfe(t){return t.reduce((e,n)=>e+c5(n),0)}function epe(t){return t.reduce((e,n)=>e+u5(n),0)}function tpe(t,e){if(e===void 0&&(e=ld),!t)return;const{top:n,left:r,bottom:s,right:i}=e(t);l5(t)&&(s<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const npe=[["x",["left","right"],Zfe],["y",["top","bottom"],epe]];class bC{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Ax(n),s=f5(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,l]of npe)for(const d of a)Object.defineProperty(this,d,{get:()=>{const h=l(r),p=s[i]-h;return this.rect[d]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class zh{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function rpe(t){const{EventTarget:e}=Br(t);return t instanceof e?t:od(t)}function pw(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var ys;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(ys||(ys={}));function eR(t){t.preventDefault()}function spe(t){t.stopPropagation()}var pt;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(pt||(pt={}));const p5={start:[pt.Space,pt.Enter],cancel:[pt.Esc],end:[pt.Space,pt.Enter,pt.Tab]},ipe=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case pt.Right:return{...n,x:n.x+25};case pt.Left:return{...n,x:n.x-25};case pt.Down:return{...n,y:n.y+25};case pt.Up:return{...n,y:n.y-25}}};class vC{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new zh(od(n)),this.windowListeners=new zh(Br(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ys.Resize,this.handleCancel),this.windowListeners.add(ys.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ys.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&tpe(r),n(Js)}handleKeyDown(e){if(xC(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:i=p5,coordinateGetter:a=ipe,scrollBehavior:l="smooth"}=s,{code:d}=e;if(i.end.includes(d)){this.handleEnd(e);return}if(i.cancel.includes(d)){this.handleCancel(e);return}const{collisionRect:h}=r.current,p=h?{x:h.left,y:h.top}:Js;this.referenceCoordinates||(this.referenceCoordinates=p);const m=a(e,{active:n,context:r.current,currentCoordinates:p});if(m){const g=mf(m,p),x={x:0,y:0},{scrollableAncestors:v}=r.current;for(const S of v){const C=e.code,{isTop:j,isRight:E,isLeft:A,isBottom:D,maxScroll:M,minScroll:I}=h5(S),_=Jfe(S),L={x:Math.min(C===pt.Right?_.right-_.width/2:_.right,Math.max(C===pt.Right?_.left:_.left+_.width/2,m.x)),y:Math.min(C===pt.Down?_.bottom-_.height/2:_.bottom,Math.max(C===pt.Down?_.top:_.top+_.height/2,m.y))},V=C===pt.Right&&!E||C===pt.Left&&!A,B=C===pt.Down&&!D||C===pt.Up&&!j;if(V&&L.x!==m.x){const K=S.scrollLeft+g.x,ee=C===pt.Right&&K<=M.x||C===pt.Left&&K>=I.x;if(ee&&!g.y){S.scrollTo({left:K,behavior:l});return}ee?x.x=S.scrollLeft-K:x.x=C===pt.Right?S.scrollLeft-M.x:S.scrollLeft-I.x,x.x&&S.scrollBy({left:-x.x,behavior:l});break}else if(B&&L.y!==m.y){const K=S.scrollTop+g.y,ee=C===pt.Down&&K<=M.y||C===pt.Up&&K>=I.y;if(ee&&!g.x){S.scrollTo({top:K,behavior:l});return}ee?x.y=S.scrollTop-K:x.y=C===pt.Down?S.scrollTop-M.y:S.scrollTop-I.y,x.y&&S.scrollBy({top:-x.y,behavior:l});break}}this.handleMove(e,Au(mf(m,this.referenceCoordinates),x))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}vC.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=p5,onActivation:s}=e,{active:i}=n;const{code:a}=t.nativeEvent;if(r.start.includes(a)){const l=i.activatorNode.current;return l&&t.target!==l?!1:(t.preventDefault(),s?.({event:t.nativeEvent}),!0)}return!1}}];function tR(t){return!!(t&&"distance"in t)}function nR(t){return!!(t&&"delay"in t)}class wC{constructor(e,n,r){var s;r===void 0&&(r=rpe(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:a}=i;this.props=e,this.events=n,this.document=od(a),this.documentListeners=new zh(this.document),this.listeners=new zh(r),this.windowListeners=new zh(Br(a)),this.initialCoordinates=(s=J1(i))!=null?s:Js,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ys.Resize,this.handleCancel),this.windowListeners.add(ys.DragStart,eR),this.windowListeners.add(ys.VisibilityChange,this.handleCancel),this.windowListeners.add(ys.ContextMenu,eR),this.documentListeners.add(ys.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(nR(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(tR(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(ys.Click,spe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ys.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:i}=this,{onMove:a,options:{activationConstraint:l}}=i;if(!s)return;const d=(n=J1(e))!=null?n:Js,h=mf(s,d);
131if(!r&&l){if(tR(l)){if(l.tolerance!=null&&pw(h,l.tolerance))return this.handleCancel();if(pw(h,l.distance))return this.handleStart()}if(nR(l)&&pw(h,l.tolerance))return this.handleCancel();this.handlePending(l,h);return}e.cancelable&&e.preventDefault(),a(d)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===pt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const ape={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class SC extends wC{constructor(e){const{event:n}=e,r=od(n.target);super(e,ape,r)}}SC.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const ope={move:{name:"mousemove"},end:{name:"mouseup"}};var eS;(function(t){t[t.RightClick=2]="RightClick"})(eS||(eS={}));class lpe extends wC{constructor(e){super(e,ope,od(e.event.target))}}lpe.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===eS.RightClick?!1:(r?.({event:n}),!0)}}];const mw={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class cpe extends wC{constructor(e){super(e,mw)}static setup(){return window.addEventListener(mw.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(mw.move.name,e)};function e(){}}}cpe.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r?.({event:n}),!0)}}];var qh;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(qh||(qh={}));var ny;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(ny||(ny={}));function upe(t){let{acceleration:e,activator:n=qh.Pointer,canScroll:r,draggingRect:s,enabled:i,interval:a=5,order:l=ny.TreeOrder,pointerCoordinates:d,scrollableAncestors:h,scrollableAncestorRects:p,delta:m,threshold:g}=t;const x=hpe({delta:m,disabled:!i}),[v,S]=Sfe(),C=N.useRef({x:0,y:0}),j=N.useRef({x:0,y:0}),E=N.useMemo(()=>{switch(n){case qh.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case qh.DraggableRect:return s}},[n,s,d]),A=N.useRef(null),D=N.useCallback(()=>{const I=A.current;if(!I)return;const _=C.current.x*j.current.x,L=C.current.y*j.current.y;I.scrollBy(_,L)},[]),M=N.useMemo(()=>l===ny.TreeOrder?[...h].reverse():h,[l,h]);N.useEffect(()=>{if(!i||!h.length||!E){S();return}for(const I of M){if(r?.(I)===!1)continue;const _=h.indexOf(I),L=p[_];if(!L)continue;const{direction:V,speed:B}=Xfe(I,L,E,e,g);for(const K of["x","y"])x[K][V[K]]||(B[K]=0,V[K]=0);if(B.x>0||B.y>0){S(),A.current=I,v(D,a),C.current=B,j.current=V;return}}C.current={x:0,y:0},j.current={x:0,y:0},S()},[e,D,r,S,i,a,JSON.stringify(E),JSON.stringify(x),v,h,M,p,JSON.stringify(g)])}const dpe={x:{[Fn.Backward]:!1,[Fn.Forward]:!1},y:{[Fn.Backward]:!1,[Fn.Forward]:!1}};function hpe(t){let{delta:e,disabled:n}=t;const r=X1(e);return Yf(s=>{if(n||!r||!s)return dpe;const i={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[Fn.Backward]:s.x[Fn.Backward]||i.x===-1,[Fn.Forward]:s.x[Fn.Forward]||i.x===1},y:{[Fn.Backward]:s.y[Fn.Backward]||i.y===-1,[Fn.Forward]:s.y[Fn.Forward]||i.y===1}}},[n,e,r])}function fpe(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return Yf(s=>{var i;return e==null?null:(i=r??s)!=null?i:null},[r,e])}function ppe(t,e){return N.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,i=s.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,r)}));return[...n,...i]},[]),[t,e])}var gf;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(gf||(gf={}));var tS;(function(t){t.Optimized="optimized"})(tS||(tS={}));const rR=new Map;function mpe(t,e){let{dragging:n,dependencies:r,config:s}=e;const[i,a]=N.useState(null),{frequency:l,measure:d,strategy:h}=s,p=N.useRef(t),m=C(),g=pf(m),x=N.useCallback(function(j){j===void 0&&(j=[]),!g.current&&a(E=>E===null?j:E.concat(j.filter(A=>!E.includes(A))))},[g]),v=N.useRef(null),S=Yf(j=>{if(m&&!n)return rR;if(!j||j===rR||p.current!==t||i!=null){const E=new Map;for(let A of t){if(!A)continue;if(i&&i.length>0&&!i.includes(A.id)&&A.rect.current){E.set(A.id,A.rect.current);continue}const D=A.node.current,M=D?new bC(d(D),D):null;A.rect.current=M,M&&E.set(A.id,M)}return E}return j},[t,i,n,m,d]);return N.useEffect(()=>{p.current=t},[t]),N.useEffect(()=>{m||x()},[n,m]),N.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),N.useEffect(()=>{m||typeof l!="number"||v.current!==null||(v.current=setTimeout(()=>{x(),v.current=null},l))},[l,m,x,...r]),{droppableRects:S,measureDroppableContainers:x,measuringScheduled:i!=null};function C(){switch(h){case gf.Always:return!1;case gf.BeforeDragging:return n;default:return!n}}}function m5(t,e){return Yf(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function gpe(t,e){return m5(t,e)}function ype(t){let{callback:e,disabled:n}=t;const r=yC(e),s=N.useMemo(()=>
131{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return N.useEffect(()=>()=>s?.disconnect(),[s]),s}function Mx(t){let{callback:e,disabled:n}=t;const r=yC(e),s=N.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return N.useEffect(()=>()=>s?.disconnect(),[s]),s}function xpe(t){return new bC(ld(t),t)}function sR(t,e,n){e===void 0&&(e=xpe);const[r,s]=N.useState(null);function i(){s(d=>{if(!t)return null;if(t.isConnected===!1){var h;return(h=d??n)!=null?h:null}const p=e(t);return JSON.stringify(d)===JSON.stringify(p)?d:p})}const a=ype({callback(d){if(t)for(const h of d){const{type:p,target:m}=h;if(p==="childList"&&m instanceof HTMLElement&&m.contains(t)){i();break}}}}),l=Mx({callback:i});return Ni(()=>{i(),t?(l?.observe(t),a?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),a?.disconnect())},[t]),r}function bpe(t){const e=m5(t);return o5(t,e)}const iR=[];function vpe(t){const e=N.useRef(t),n=Yf(r=>t?r&&r!==iR&&t&&e.current&&t.parentNode===e.current.parentNode?r:Ax(t):iR,[t]);return N.useEffect(()=>{e.current=t},[t]),n}function wpe(t){const[e,n]=N.useState(null),r=N.useRef(t),s=N.useCallback(i=>{const a=fw(i.target);a&&n(l=>l?(l.set(a,Z1(a)),new Map(l)):null)},[]);return N.useEffect(()=>{const i=r.current;if(t!==i){a(i);const l=t.map(d=>{const h=fw(d);return h?(h.addEventListener("scroll",s,{passive:!0}),[h,Z1(h)]):null}).filter(d=>d!=null);n(l.length?new Map(l):null),r.current=t}return()=>{a(t),a(i)};function a(l){l.forEach(d=>{const h=fw(d);h?.removeEventListener("scroll",s)})}},[s,t]),N.useMemo(()=>t.length?e?Array.from(e.values()).reduce((i,a)=>Au(i,a),Js):f5(t):Js,[t,e])}function aR(t,e){e===void 0&&(e=[]);const n=N.useRef(null);return N.useEffect(()=>{n.current=null},e),N.useEffect(()=>{const r=t!==Js;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?mf(t,n.current):Js}function Spe(t){N.useEffect(()=>{if(!Tx)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function kpe(t,e){return N.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:i}=r;return n[s]=a=>{i(a,e)},n},{}),[t,e])}function g5(t){return N.useMemo(()=>t?Wfe(t):null,[t])}const oR=[];function Cpe(t,e){e===void 0&&(e=ld);const[n]=t,r=g5(n?Br(n):null),[s,i]=N.useState(oR);function a(){i(()=>t.length?t.map(d=>d5(d)?r:new bC(e(d),d)):oR)}const l=Mx({callback:a});return Ni(()=>{l?.disconnect(),a(),t.forEach(d=>l?.observe(d))},[t]),s}function Npe(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Gf(e)?e:t}function jpe(t){let{measure:e}=t;const[n,r]=N.useState(null),s=N.useCallback(h=>{for(const{target:p}of h)if(Gf(p)){r(m=>{const g=e(p);return m?{...m,width:g.width,height:g.height}:g});break}},[e]),i=Mx({callback:s}),a=N.useCallback(h=>{const p=Npe(h);i?.disconnect(),p&&i?.observe(p),r(p?e(p):null)},[e,i]),[l,d]=ey(a);return N.useMemo(()=>({nodeRef:l,rect:n,setRef:d}),[n,l,d])}const Epe=[{sensor:SC,options:{}},{sensor:vC,options:{}}],Tpe={current:{}},pg={draggable:{measure:ZO},droppable:{measure:ZO,strategy:gf.WhileDragging,frequency:tS.Optimized},dragOverlay:{measure:ld}};class Vh extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const Ape={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Vh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ty},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:pg,measureDroppableContainers:ty,windowRect:null,measuringScheduled:!1},Mpe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ty,draggableNodes:new Map,over:null,measureDroppableContainers:ty},Ox=N.createContext(Mpe),y5=N.createContext(Ape);function Ope(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Vh}}}function Rpe(t,e){switch(e.type){case Mn.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Mn.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case Mn.DragEnd:case Mn.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Mn.RegisterDroppable:{const{element:n}=e,{id:r}
131=n,s=new Vh(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case Mn.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,i=t.droppable.containers.get(n);if(!i||r!==i.key)return t;const a=new Vh(t.droppable.containers);return a.set(n,{...i,disabled:s}),{...t,droppable:{...t.droppable,containers:a}}}case Mn.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const i=new Vh(t.droppable.containers);return i.delete(n),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function Dpe(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=N.useContext(Ox),i=X1(r),a=X1(n?.id);return N.useEffect(()=>{if(!e&&!r&&i&&a!=null){if(!xC(i)||document.activeElement===i.target)return;const l=s.get(a);if(!l)return;const{activatorNode:d,node:h}=l;if(!d.current&&!h.current)return;requestAnimationFrame(()=>{for(const p of[d.current,h.current]){if(!p)continue;const m=Nfe(p);if(m){m.focus();break}}})}},[r,e,s,a,i]),null}function _pe(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,i)=>i({transform:s,...r}),n):n}function Ppe(t){return N.useMemo(()=>({draggable:{...pg.draggable,...t?.draggable},droppable:{...pg.droppable,...t?.droppable},dragOverlay:{...pg.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function Lpe(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const i=N.useRef(!1),{x:a,y:l}=typeof s=="boolean"?{x:s,y:s}:s;Ni(()=>{if(!a&&!l||!e){i.current=!1;return}if(i.current||!r)return;const h=e?.node.current;if(!h||h.isConnected===!1)return;const p=n(h),m=o5(p,r);if(a||(m.x=0),l||(m.y=0),i.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const g=l5(h);g&&g.scrollBy({top:m.y,left:m.x})}},[e,a,l,r,n])}const x5=N.createContext({...Js,scaleX:1,scaleY:1});var lo;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(lo||(lo={}));const Ipe=N.memo(function(e){var n,r,s,i;let{id:a,accessibility:l,autoScroll:d=!0,children:h,sensors:p=Epe,collisionDetection:m=Ffe,measuring:g,modifiers:x,...v}=e;const S=N.useReducer(Rpe,void 0,Ope),[C,j]=S,[E,A]=Ofe(),[D,M]=N.useState(lo.Uninitialized),I=D===lo.Initialized,{draggable:{active:_,nodes:L,translate:V},droppable:{containers:B}}=C,K=_!=null?L.get(_):null,ee=N.useRef({initial:null,translated:null}),ie=N.useMemo(()=>{var Zt;return _!=null?{id:_,data:(Zt=K?.data)!=null?Zt:Tpe,rect:ee}:null},[_,K]),se=N.useRef(null),[he,$]=N.useState(null),[Q,re]=N.useState(null),le=pf(v,Object.values(v)),P=Qf("DndDescribedBy",a),te=N.useMemo(()=>B.getEnabled(),[B]),ue=Ppe(g),{droppableRects:fe,measureDroppableContainers:ke,measuringScheduled:Pe}=mpe(te,{dragging:I,dependencies:[V.x,V.y],config:ue.droppable}),be=fpe(L,_),vt=N.useMemo(()=>Q?J1(Q):null,[Q]),Xe=ud(),Je=gpe(be,ue.draggable.measure);Lpe({activeNode:_!=null?L.get(_):null,config:Xe.layoutShiftCompensation,initialRect:Je,measure:ue.draggable.measure});const Ze=sR(be,ue.draggable.measure,Je),an=sR(be?be.parentElement:null),Kt=N.useRef({activatorEvent:null,active:null,activeNode:be,collisionRect:null,collisions:null,droppableRects:fe,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:B,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Jt=B.getNodeFor((n=Kt.current.over)==null?void 0:n.id),dn=jpe({measure:ue.dragOverlay.measure}),Es=(r=dn.nodeRef.current)!=null?r:be,Ts=I?(s=dn.rect)!=null?s:Ze:null,dr=!!(dn.nodeRef.current&&dn.rect),nc=bpe(dr?null:Ze),Bo=g5(Es?Br(Es):null),Tr=vpe(I?Jt??be:null),F=Cpe(Tr),W=_pe(x,{transform:{x:V.x-nc.x,y:V.y-nc.y,scaleX:1,scaleY:1},activatorEvent:Q,active:ie,activeNodeRect:Ze,containerNodeRect:an,draggingNodeRect:Ts,over:Kt.current.over,overlayNodeRect:dn.rect,scrollableAncestors:Tr,scrollableAncestorRects:F,windowRect:Bo}),ne=vt?Au(vt,V):null,we=wpe(Tr),ye=aR(we),pe=aR(we,[Ze]),Se=Au(W,ye),Ge=Ts?Vfe(Ts,W):null,$e=ie&&Ge?m({active:ie,collisionRect:Ge,droppableRects:fe,droppableContainers:te,pointerCoordinates:ne}):null,hn=a5($e,"id"),[_n,zr]=N.useState(null),ba=dr?W:Au(W,pe),ni=zfe(ba,(i=_n?.rect)!=null?i:null,Ze),hr=N.useRef(null),Mi=N.useCallback((Zt,fr)=>{let{sensor:tr,options:As}=fr;if(se.current==null)return;const nr=L.get(se.current);if(!nr)return;const Hn=Zt.nativeEvent,qr=new tr({active:se.current,activeNode:nr,event:Hn,options:As,context:Kt,onAbort(Pt){if(!L.get(Pt))return;const{onDragAbort:Ut}=le.current,rr={id:Pt};Ut?.(rr),E({type:"onDragAbort",event:rr})},onPending(Pt,It,Ut,rr){if(!L.get(Pt))return;const{onDragPending:zo}=le.current,si={id:Pt,constraint:It,initialCoordinates:Ut,offset:rr};zo?.(si),E({type:"onDragPending",event:si})},onStart(Pt){const It=se.current;if(It==null)return;const Ut=L.get(It);if(!Ut)return;const{onDragStart:rr}=le.current,Oi={activatorEvent:Hn,active:{id:It,data:Ut.data,rect:ee}};$s.unstable_batchedUpdates(()=>{rr?.(Oi),M(lo.Initializing),j({type:Mn.DragStart,initialCoordinates:Pt,active:It}),E({type:"onDragStart",event:Oi}),$(hr.current),re(Hn)})},onMove(Pt){j({type:Mn.DragMove,coordinates:Pt})},onEnd:va(Mn.DragEnd),onCancel:va(Mn.DragCancel)});hr.current=qr;function va(Pt){return async function(){const{active:Ut,collisions:rr,over:Oi,scrollAdjustedTranslate:zo}=Kt.current;let si=null;if(Ut&&zo){const{cancelDrop:wa}=le.current;si={activatorEvent:Hn,active:Ut,collisions:rr,delta:zo,over:Oi},Pt===Mn.DragEnd&&typeof wa=="function"&&await Promise.resolve(wa(si))&&(Pt=Mn.DragCancel)}se.current=null,$s.unstable_batchedUpdates(()=>{j({type:Pt}),M(lo.Uninitialized),zr(null),$(null),re(null),hr.current=null;const wa=Pt===Mn.DragEnd?"onDragEnd":"onDragCancel";if(si){const Ri=le.current[wa];Ri?.(si),E({type:wa,event:si})}})}}},[L]),ri=N.useCallback((Zt,fr)=>(tr,As)=>{const nr=tr.nativeEvent,Hn=L.get(As);if(se.current!==null||!Hn||nr.dndKit||nr.defaultPrevented)return;const qr={active:Hn};Zt(tr,fr.options,qr)===!0&&(nr.dndKit={capturedBy:fr.sensor},se.current=As,Mi(tr,fr))},[L,Mi]),rc=ppe(p,ri);Spe(p),Ni(()=>{Ze&&D===lo.Initializing&&M(lo.Initialized)},[Ze,D]),N.useEffect(()=>{const{onDragMove:Zt}=le.current,{active:fr,activatorEvent:tr,collisions:As,over:nr}=Kt.current;if(!fr||!tr)return;const Hn={active:fr,activatorEvent:tr,collisions:As,delta:{x:Se.x,y:Se.y},over:nr};$s.unstable_batchedUpdates(()=>{Zt?.(Hn),E({type:"onDragMove",event:Hn})})},[Se.x,Se.y]),N.useEffect(()=>{const{active:Zt,activatorEvent:fr,collisions:tr,droppableContainers:As,scrollAdjustedTranslate:nr}=Kt.current;if(!Zt||se.current==null||!fr||!nr)return;const{onDragOver:Hn}=le.current,qr=As.get(hn),va=qr&&qr.rect.current?{id:qr.id,rect:qr.rect.current,data:qr.data,disabled:qr.disabled}:null,Pt={active:Zt,activatorEvent:fr,collisions:tr,delta:{x:nr.x,y:nr.y},over:va};$s.unstable_batchedUpdates(()=>{zr(va),Hn?.(Pt),E({type:"onDragOver",event:Pt})})},[hn]),Ni(()=>{Kt.current={activatorEvent:Q,active:ie,activeNode:be,collisionRect:Ge,collisions:$e,droppableRects:fe,draggableNodes:L,draggingNode:Es,draggingNodeRect:Ts,droppableContainers:B,over:_n,scrollableAncestors:Tr,scrollAdjustedTranslate:Se},ee.current={initial:Ts,translated:Ge}},[ie,be,$e,Ge,L,Es,Ts,fe,B,_n,Tr,Se]),upe({...Xe,delta:V,draggingRect:Ge,pointerCoordinates:ne,scrollableAncestors:Tr,scrollableAncestorRects:F});const Fo=N.useMemo(()=>({active:ie,activeNode:be,activeNodeRect:Ze,activatorEvent:Q,collisions:$e,containerNodeRect:an,dragOverlay:dn,draggableNodes:L,droppableContainers:B,droppableRects:fe,over:_n,measureDroppableContainers:ke,scrollableAncestors:Tr,scrollableAncestorRects:F,measuringConfiguration:ue,measuringScheduled:Pe,windowRect:Bo}),[ie,be,Ze,Q,$e,an,dn,L,B,fe,_n,ke,Tr,F,ue,Pe,Bo]),tp=N.useMemo(()=>({activatorEvent:Q,activators:rc,active:ie,activeNodeRect:Ze,ariaDescribedById:{draggable:P},dispatch:j,draggableNodes:L,over:_n,measureDroppableContainers:ke}),[Q,rc,ie,Ze,j,P,L,_n,ke]);return z.createElement(r5.Provider,{value:A},z.createElement(Ox.Provider,{value:tp},z.createElement(y5.Provider,{value:Fo},z.createElement(x5.Provider,{value:ni},h)),z.createElement(Dpe,{disabled:l?.restoreFocus===!1})),z.createElement(_fe,{...l,hiddenTextDescribedById:P}));function ud(){const Zt=he?.autoScrollEnabled===!1,fr=typeof d=="object"?d.enabled===!1:d===!1,tr=I&&!Zt&&!fr;return typeof d=="object"?{...d,enabled:tr}:{enabled:tr}}}),Upe=N.createContext(null),lR="button",Bpe="Draggable";function Fpe(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const i=Qf(Bpe),{activators:a,activatorEvent:l,active:d,activeNodeRect:h,ariaDescribedById:p,draggableNodes:m,over:g}=N.useContext(Ox),{role:x=lR,roleDescription:v="draggable",tabIndex:S=0}=s??{},C=d?.id===e,j=N.useContext(C?x5:Upe),[E,A]=ey(),[D,M]=ey(),I=kpe(a,e),_=pf(n);Ni(()=>(m.set(e,{id:e,key:i,node:E,activatorNode:D,data:_}),()=>{const V=m.get(e);V&&V.key===i&&m.delete(e)}),[m,e]);const L=N.useMemo(()=>({role:x,tabIndex:S,"aria-disabled":r,"aria-pressed":C&&x===lR?!0:void 0,"aria-roledescription":v,"aria-describedby":p.draggable}),[r,x,S,C,v,p.draggable]);return{active:d,activatorEvent:l,activeNodeRect:h,attributes:L,isDragging:C,listeners:r?void 0:I,node:E,over:g,setNodeRef:A,setActivatorNodeRef:M,transform:j}}function zpe(){return N.useContext(y5)}const qpe="Droppable",Vpe={timeout:25};function $pe(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const i=Qf(qpe),{active:a,dispatch:l,over:d,measureDroppableContainers:h}=N.useContext(Ox),p=N.useRef({disabled:n}),m=N.useRef(!1),g=N.useRef(null),x=N.useRef(null),{disabled:v,updateMeasurementsFor:S,timeout:C}={...Vpe,...s},j=pf(S??r),E=N.useCallback(()=>
131{if(!m.current){m.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{h(Array.isArray(j.current)?j.current:[j.current]),x.current=null},C)},[C]),A=Mx({callback:E,disabled:v||!a}),D=N.useCallback((L,V)=>{A&&(V&&(A.unobserve(V),m.current=!1),L&&A.observe(L))},[A]),[M,I]=ey(D),_=pf(e);return N.useEffect(()=>{!A||!M.current||(A.disconnect(),m.current=!1,A.observe(M.current))},[M,A]),N.useEffect(()=>(l({type:Mn.RegisterDroppable,element:{id:r,key:i,disabled:n,node:M,rect:g,data:_}}),()=>l({type:Mn.UnregisterDroppable,key:i,id:r})),[r]),N.useEffect(()=>{n!==p.current.disabled&&(l({type:Mn.SetDroppableDisabled,id:r,key:i,disabled:n}),p.current.disabled=n)},[r,i,n,l]),{active:a,rect:g,isOver:d?.id===r,node:M,over:d,setNodeRef:I}}function kC(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function Hpe(t,e){return t.reduce((n,r,s)=>{const i=e.get(r);return i&&(n[s]=i),n},Array(t.length))}function _m(t){return t!==null&&t>=0}function Kpe(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Wpe(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const b5=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const i=kC(e,r,n),a=e[s],l=i[s];return!l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},Pm={scaleX:1,scaleY:1},Gpe=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:i,overIndex:a}=t;const l=(e=i[n])!=null?e:r;if(!l)return null;if(s===n){const h=i[a];return h?{x:0,y:n<a?h.top+h.height-(l.top+l.height):h.top-l.top,...Pm}:null}const d=Ype(i,s,n);return s>n&&s<=a?{x:0,y:-l.height-d,...Pm}:s<n&&s>=a?{x:0,y:l.height+d,...Pm}:{x:0,y:0,...Pm}};function Ype(t,e,n){const r=t[e],s=t[e-1],i=t[e+1];return r?n<e?s?r.top-(s.top+s.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const v5="Sortable",w5=z.createContext({activeIndex:-1,containerId:v5,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:b5,disabled:{draggable:!1,droppable:!1}});function Qpe(t){let{children:e,id:n,items:r,strategy:s=b5,disabled:i=!1}=t;const{active:a,dragOverlay:l,droppableRects:d,over:h,measureDroppableContainers:p}=zpe(),m=Qf(v5,n),g=l.rect!==null,x=N.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),v=a!=null,S=a?x.indexOf(a.id):-1,C=h?x.indexOf(h.id):-1,j=N.useRef(x),E=!Kpe(x,j.current),A=C!==-1&&S===-1||E,D=Wpe(i);Ni(()=>{E&&v&&p(x)},[E,x,v,p]),N.useEffect(()=>{j.current=x},[x]);const M=N.useMemo(()=>({activeIndex:S,containerId:m,disabled:D,disableTransforms:A,items:x,overIndex:C,useDragOverlay:g,sortedRects:Hpe(x,d),strategy:s}),[S,m,D.draggable,D.droppable,A,x,C,d,g,s]);return z.createElement(w5.Provider,{value:M},e)}const Xpe=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return kC(n,r,s).indexOf(e)},Jpe=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:i,newIndex:a,previousItems:l,previousContainerId:d,transition:h}=t;return!h||!r||l!==i&&s===a?!1:n?!0:a!==s&&e===d},Zpe={duration:200,easing:"ease"},S5="transform",eme=zu.Transition.toString({property:S5,duration:0,easing:"linear"}),tme={roleDescription:"sortable"};function nme(t){let{disabled:e,index:n,node:r,rect:s}=t;const[i,a]=N.useState(null),l=N.useRef(n);return Ni(()=>{if(!e&&n!==l.current&&r.current){const d=s.current;if(d){const h=ld(r.current,{ignoreTransform:!0}),p={x:d.left-h.left,y:d.top-h.top,scaleX:d.width/h.width,scaleY:d.height/h.height};(p.x||p.y)&&a(p)}}n!==l.current&&(l.current=n)},[e,n,r,s]),N.useEffect(()=>{i&&a(null)},[i]),i}function k5(t){let{animateLayoutChanges:e=Jpe,attributes:n,disabled:r,data:s,getNewIndex:i=Xpe,id:a,strategy:l,resizeObserverConfig:d,transition:h=Zpe}=t;const{items:p,containerId:m,activeIndex:g,disabled:x,disableTransforms:v,sortedRects:S,overIndex:C,useDragOverlay:j,strategy:E}=N.useContext(w5),A=rme(r,x),D=p.indexOf(a),M=N.useMemo(()=>({sortable:{containerId:m,index:D,items:p},...s}),[m,s,D,p]),I=N.useMemo(()=>p.slice(p.indexOf(a)),[p,a]),{rect:_,node:L,isOver:V,setNodeRef:B}=$pe({id:a,data:M,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...d}}),{active:K,activatorEvent:ee,activeNodeRect:ie,attributes:se,setN
131odeRef:he,listeners:$,isDragging:Q,over:re,setActivatorNodeRef:le,transform:P}=Fpe({id:a,data:M,attributes:{...tme,...n},disabled:A.draggable}),te=wfe(B,he),ue=!!K,fe=ue&&!v&&_m(g)&&_m(C),ke=!j&&Q,Pe=ke&&fe?P:null,vt=fe?Pe??(l??E)({rects:S,activeNodeRect:ie,activeIndex:g,overIndex:C,index:D}):null,Xe=_m(g)&&_m(C)?i({id:a,items:p,activeIndex:g,overIndex:C}):D,Je=K?.id,Ze=N.useRef({activeId:Je,items:p,newIndex:Xe,containerId:m}),an=p!==Ze.current.items,Kt=e({active:K,containerId:m,isDragging:Q,isSorting:ue,id:a,index:D,items:p,newIndex:Ze.current.newIndex,previousItems:Ze.current.items,previousContainerId:Ze.current.containerId,transition:h,wasDragging:Ze.current.activeId!=null}),Jt=nme({disabled:!Kt,index:D,node:L,rect:_});return N.useEffect(()=>{ue&&Ze.current.newIndex!==Xe&&(Ze.current.newIndex=Xe),m!==Ze.current.containerId&&(Ze.current.containerId=m),p!==Ze.current.items&&(Ze.current.items=p)},[ue,Xe,m,p]),N.useEffect(()=>{if(Je===Ze.current.activeId)return;if(Je!=null&&Ze.current.activeId==null){Ze.current.activeId=Je;return}const Es=setTimeout(()=>{Ze.current.activeId=Je},50);return()=>clearTimeout(Es)},[Je]),{active:K,activeIndex:g,attributes:se,data:M,rect:_,index:D,newIndex:Xe,items:p,isOver:V,isSorting:ue,isDragging:Q,listeners:$,node:L,overIndex:C,over:re,setNodeRef:te,setActivatorNodeRef:le,setDroppableNodeRef:B,setDraggableNodeRef:he,transform:Jt??vt,transition:dn()};function dn(){if(Jt||an&&Ze.current.newIndex===D)return eme;if(!(ke&&!xC(ee)||!h)&&(ue||Kt))return zu.Transition.toString({...h,property:S5})}}function rme(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function ry(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const sme=[pt.Down,pt.Right,pt.Up,pt.Left],ime=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:i,over:a,scrollableAncestors:l}}=e;if(sme.includes(t.code)){if(t.preventDefault(),!n||!r)return;const d=[];i.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const g=s.get(m.id);if(g)switch(t.code){case pt.Down:r.top<g.top&&d.push(m);break;case pt.Up:r.top>g.top&&d.push(m);break;case pt.Left:r.left>g.left&&d.push(m);break;case pt.Right:r.left<g.left&&d.push(m);break}});const h=Ufe({collisionRect:r,droppableRects:s,droppableContainers:d});let p=a5(h,"id");if(p===a?.id&&h.length>1&&(p=h[1].id),p!=null){const m=i.get(n.id),g=i.get(p),x=g?s.get(g.id):null,v=g?.node.current;if(v&&x&&m&&g){const C=Ax(v).some((I,_)=>l[_]!==I),j=C5(m,g),E=ame(m,g),A=C||!j?{x:0,y:0}:{x:E?r.width-x.width:0,y:E?r.height-x.height:0},D={x:x.left,y:x.top};return A.x&&A.y?D:mf(D,A)}}}};function C5(t,e){return!ry(t)||!ry(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function ame(t,e){return!ry(t)||!ry(e)||!C5(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const qu="__unassigned__";function ome(t){const e=[],n=[...t.sections].sort((s,i)=>s.sortOrder-i.sortOrder),r=new Map;for(const s of t.members){const i=s.sectionId??null,a=r.get(i)??[];a.push(s),r.set(i,a)}for(const s of r.values())s.sort((i,a)=>i.sortOrder-a.sortOrder);
131e.push({kind:"section",id:qu,section:{id:qu,title:"Unassigned",sortOrder:-1}});for(const s of r.get(null)??[])e.push({kind:"member",id:s.id,member:s});for(const s of n){e.push({kind:"section",id:s.id,section:s});for(const i of r.get(s.id)??[])e.push({kind:"member",id:i.id,member:i})}return e}function lme(t){let e=null;const n=[],r=[];let s=0,i=0;for(const a of t)a.kind==="section"?(a.id===qu?e=null:(e=a.id,n.push({id:a.id,sortOrder:s++})),i=0):r.push({id:a.id,sectionId:e,sortOrder:i++});return{sections:n,members:r}}function cme(){const t=kn(),{data:e,isLoading:n,error:r}=zY(),[s,i]=N.useState([]),[a,l]=N.useState(null),d=N.useRef(!1);N.useEffect(()=>{e&&!d.current&&i(ome(e))},[e]);const h=Pfe(QO(SC,{activationConstraint:{distance:5}}),QO(vC,{coordinateGetter:ime})),p=mQ({mutation:{onSuccess:v=>{t.setQueryData(pa(),v),d.current=!1},onError:()=>{d.current=!1,t.invalidateQueries({queryKey:pa()})}}}),m=v=>{const{active:S,over:C}=v;if(!C||S.id===C.id)return;const j=s.findIndex(I=>I.id===S.id),E=s.findIndex(I=>I.id===C.id);if(j<0||E<0)return;let A=kC(s,j,E);const D=A.findIndex(I=>I.id===qu);D>0&&(A=[A[D],...A.filter((I,_)=>_!==D)]),i(A),d.current=!0;const M=lme(A);p.mutate({data:M})};if(n)return c.jsx("div",{className:"p-12 flex items-center justify-center",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})});if(r||!e)return c.jsx("div",{className:"p-12",children:c.jsxs("div",{className:"flex items-center gap-2 text-red-600 text-sm",children:[c.jsx(kt,{className:"w-4 h-4"})," Could not load team."]})});const g=a?e.members.find(v=>v.id===a)??null:null,x=e.sections;return c.jsxs("div",{className:"px-8 py-10 max-w-[1400px] mx-auto",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-3",children:"CMS"}),c.jsx("h1",{className:"text-3xl font-black uppercase tracking-tighter mb-8",children:"Team"}),c.jsx(ume,{}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_440px] gap-8",children:[c.jsx(dme,{items:s,sensors:h,onDragEnd:m,selectedMemberId:a,onSelectMember:l,sections:x,isReordering:p.status==="pending"}),c.jsx("div",{className:"lg:sticky lg:top-6 self-start",children:g?c.jsx(mme,{member:g,sections:x,onClose:()=>l(null)},g.id):c.jsx(pme,{})})]})]})}function ume(){const t=kn(),{data:e,isLoading:n}=bQ(),[r,s]=N.useState(""),[i,a]=N.useState(!1);N.useEffect(()=>{e&&!i&&(s(e.geoLine??""),a(!0))},[e,i]);const l=i&&r!==(e?.geoLine??""),d=kQ({mutation:{onSuccess:h=>{t.setQueryData(WL(),h)}}});return c.jsxs("div",{className:"mb-8 border border-neutral-800 rounded-lg p-5",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.25em] text-neutral-400 mb-4",children:"Page copy"}),c.jsx("label",{className:"block text-xs font-semibold uppercase tracking-wider text-neutral-300 mb-1.5",children:"Geographic presence line"}),n?c.jsxs("div",{className:"flex items-center gap-2 text-neutral-400 text-sm py-2",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading…"]}):c.jsx("input",{type:"text",value:r,onChange:h=>s(h.target.value),placeholder:"Across Singapore · Indonesia · …",className:"w-full bg-neutral-900 border border-neutral-700 rounded px-3 py-2 text-sm text-white placeholder:text-neutral-600 focus:outline-none focus:border-[#099492] transition-colors"}),c.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[c.jsx("button",{onClick:()=>d.mutate({data:{geoLine:r}}),disabled:!l||d.status==="pending",className:"px-4 py-2 text-xs font-bold uppercase tracking-wider rounded bg-[#099492] text-white hover:bg-[#0BB9B7] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:d.status==="pending"?"Saving…":"Save"}),d.status==="success"&&!l&&c.jsx("span",{className:"text-xs text-emerald-400",children:"Saved"}),d.status==="error"&&c.jsxs("span",{className:"text-xs text-red-400 flex items-center gap-1",children:[c.jsx(kt,{className:"w-3 h-3"})," Save failed"]})]})]})}function dme({items:t,sensors:e,onDragEnd:n,selectedMemberId:r,onSelectMember:s,sections:i,isReordering:a}){const l=kn(),d=HY({mutation:{onSuccess:()=>l.invalidateQueries({queryKey:pa()})}}),h=rQ({mutation:{onSuccess:()=>l.invalidateQueries({queryKey:pa()})}}),p=N.useMemo(()=>t.map(x=>x.id),[t]),m=()=>{const x=window.prompt("Section title")?.trim();if(!x)return;const v=i.length;d.mutate({data:{title:x,sortOrder:v}}
131)},g=x=>{const v=window.prompt("Person's name")?.trim();v&&h.mutate({data:{name:v,position:"",sectionId:x,sortOrder:9999}})};return c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[c.jsxs("button",{onClick:m,className:"inline-flex items-center gap-2 text-sm font-bold uppercase tracking-wider px-4 py-2 rounded bg-neutral-900 text-white hover:bg-neutral-800 transition","data-testid":"button-add-section",disabled:d.status==="pending",children:[c.jsx(zn,{className:"w-4 h-4"})," Section"]}),c.jsxs("button",{onClick:()=>g(null),className:"inline-flex items-center gap-2 text-sm font-bold uppercase tracking-wider px-4 py-2 rounded bg-[#003320] text-white hover:bg-[#002418] transition","data-testid":"button-add-member",disabled:h.status==="pending",children:[c.jsx(zn,{className:"w-4 h-4"})," Person"]}),a&&c.jsxs("span",{className:"text-xs text-neutral-500 inline-flex items-center gap-2",children:[c.jsx(Be,{className:"w-3 h-3 animate-spin"})," Saving order…"]})]}),c.jsx(Ipe,{sensors:e,collisionDetection:Ife,onDragEnd:n,children:c.jsx(Qpe,{items:p,strategy:Gpe,children:c.jsx("div",{className:"space-y-2",children:t.map(x=>x.kind==="section"?c.jsx(hme,{section:x.section,isUnassigned:x.id===qu,onAddMember:()=>g(x.id===qu?null:x.id)},x.id):c.jsx(fme,{member:x.member,isSelected:r===x.id,onSelect:()=>s(x.id)},x.id))})})})]})}function hme({section:t,isUnassigned:e,onAddMember:n}){const r=k5({id:t.id,disabled:e}),{attributes:s,listeners:i,setNodeRef:a,transform:l,transition:d,isDragging:h}=r,p=kn(),[m,g]=N.useState(!1),[x,v]=N.useState(t.title);N.useEffect(()=>v(t.title),[t.title]);const S=YY({mutation:{onSuccess:()=>p.invalidateQueries({queryKey:pa()})}}),C=ZY({mutation:{onSuccess:()=>p.invalidateQueries({queryKey:pa()})}}),j={transform:zu.Transform.toString(l),transition:d,opacity:h?.6:1},E=()=>{g(!1);const A=x.trim();if(!A||A===t.title){v(t.title);return}S.mutate({id:t.id,data:{title:A}})};return c.jsxs("div",{ref:a,style:j,className:`flex items-center gap-3 px-3 py-3 rounded ${e?"bg-neutral-100 border border-dashed border-neutral-300":"bg-white border border-neutral-300"}`,"data-testid":`section-row-${t.id}`,children:[e?c.jsx("span",{className:"w-4"}):c.jsx("button",{...s,...i,className:"text-neutral-400 hover:text-neutral-700 cursor-grab active:cursor-grabbing","aria-label":"Drag section",children:c.jsx(_P,{className:"w-4 h-4"})}),m&&!e?c.jsx("input",{autoFocus:!0,value:x,onChange:A=>v(A.target.value),onBlur:E,onKeyDown:A=>{A.key==="Enter"&&E(),A.key==="Escape"&&(v(t.title),g(!1))},className:"flex-1 text-sm font-black uppercase tracking-wider border-b border-neutral-400 outline-none"}):c.jsx("button",{onClick:()=>!e&&g(!0),className:"flex-1 text-left text-sm font-black uppercase tracking-wider",disabled:e,children:t.title}),c.jsxs("button",{onClick:n,className:"inline-flex items-center gap-1 text-xs font-bold uppercase tracking-wider text-neutral-600 hover:text-neutral-900","data-testid":`button-add-to-${t.id}`,title:"Add person to this section",children:[c.jsx(zn,{className:"w-3 h-3"})," Person"]}),!e&&c.jsx("button",{onClick:()=>{window.confirm(`Delete section "${t.title}"? People in it will become unassigned.`)&&C.mutate({id:t.id})},className:"text-neutral-400 hover:text-red-600","aria-label":"Delete section","data-testid":`button-delete-section-${t.id}`,children:c.jsx(qn,{className:"w-4 h-4"})})]})}function fme({member:t,isSelected:e,onSelect:n}){const r=k5({id:t.id}),{attributes:s,listeners:i,setNodeRef:a,transform:l,transition:d,isDragging:h}=r,p={transform:zu.Transform.toString(l),transition:d,opacity:h?.6:1};return c.jsxs("div",{ref:a,style:p,className:`flex items-center gap-3 ml-6 px-3 py-2.5 rounded border bg-white transition ${e?"border-[#099492] shadow-[0_0_0_3px_rgba(11,185,183,0.15)]":"border-neutral-200 hover:border-neutral-400"}`,"data-testid":`member-row-${t.id}`,children:[c.jsx("button",{...s,...i,className:"text-neutral-400 hover:text-neutral-700 cursor-grab active:cursor-grabbing","aria-label":"Drag person",children:c.jsx(_P,{className:"w-4 h-4"})}),c.jsxs("button",{onClick:n,className:"flex items-center gap-3 flex-1 text-left",children:[t.photoUrl?c.jsx("img",{src:t.photoUrl,alt:"",className:"w-9 h-9 rounded-full object-cover bg-neutral-200"}):c.jsx("div",{className:"w-9 h-9 rounded-full bg-neutral-200 flex items-center justify-center text-[10px] font-bold text-neutral-500 uppercase",children:N5(t.name)}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-sm font-bold text-neutral-900 truncate",children:t.name}),c.jsx("div",{className:"text-xs text-neutral-500 truncate",children:[t.position,t.location].filter(
131Boolean).join(" · ")||"—"})]})]})]})}function N5(t){return t.split(/\s+/).map(e=>e[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function pme(){return c.jsx("div",{className:"border-2 border-dashed border-neutral-300 rounded p-10 text-center text-sm text-neutral-500 bg-white",children:"Click a person on the left to edit their details."})}function mme({member:t,sections:e,onClose:n}){const r=kn(),[s,i]=N.useState({name:t.name,position:t.position??"",location:t.location??"",linkedinUrl:t.linkedinUrl??"",bio:t.bio??"",photoUrl:t.photoUrl??"",sectionId:t.sectionId??""}),a=N.useRef(s),[l,d]=N.useState(null),h=oQ({mutation:{onSuccess:()=>{r.invalidateQueries({queryKey:pa()}),a.current=s},onError:v=>{d(v.response?.data?.error??"Failed to save.")}}}),p=dQ({mutation:{onSuccess:()=>{r.invalidateQueries({queryKey:pa()}),n()}}}),m=JSON.stringify(s)!==JSON.stringify(a.current),g=()=>{d(null),h.mutate({id:t.id,data:{name:s.name.trim(),position:s.position.trim(),location:s.location.trim()||null,linkedinUrl:s.linkedinUrl.trim()||null,bio:s.bio.trim()||null,photoUrl:s.photoUrl.trim()||null,sectionId:s.sectionId||null}})},x=v=>{const S={...s,photoUrl:v};i(S),h.mutate({id:t.id,data:{name:t.name,photoUrl:v||null}},{onSuccess:()=>{a.current={...a.current,photoUrl:v}}})};return c.jsxs("div",{className:"bg-white border border-neutral-200 rounded p-6",children:[c.jsxs("div",{className:"flex items-start justify-between mb-5",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:"Edit person"}),c.jsx("h2",{className:"text-xl font-black uppercase tracking-tight",children:t.name})]}),c.jsx("button",{onClick:n,className:"text-neutral-400 hover:text-neutral-700","aria-label":"Close",children:c.jsx(Zs,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs uppercase tracking-wider text-neutral-500 mb-2",children:"Photo"}),c.jsx("div",{className:"group mx-auto w-full max-w-[260px] mb-3 overflow-hidden rounded",children:s.photoUrl?c.jsx("img",{src:s.photoUrl,alt:s.name||"Team photo",className:"w-full aspect-[3/4] object-cover bg-neutral-100 border border-neutral-200 grayscale group-hover:grayscale-0 group-hover:scale-105 transition-all duration-700 ease-out cursor-pointer","data-testid":"img-team-photo-preview"}):c.jsx("div",{className:"w-full aspect-[3/4] flex items-center justify-center bg-[#003320] text-[#0BB9B7] text-4xl font-black tracking-tighter uppercase rounded",children:N5(s.name||t.name)})}),c.jsx(Ss,{value:s.photoUrl,onChange:x,aspect:1,outputWidth:1600,shape:"square",compact:!0,testId:"upload-team-photo"})]}),c.jsx(Zc,{label:"Full name",children:c.jsx("input",{className:"input",value:s.name,onChange:v=>i({...s,name:v.target.value}),"data-testid":"input-team-name"})}),c.jsx(Zc,{label:"Position / title",children:c.jsx("input",{className:"input",value:s.position,onChange:v=>i({...s,position:v.target.value}),placeholder:"Partner, Analyst, etc.","data-testid":"input-team-position"})}),c.jsx(Zc,{label:"Location",children:c.jsx("input",{className:"input",value:s.location,onChange:v=>i({...s,location:v.target.value}),placeholder:"Singapore, Jakarta, etc.","data-testid":"input-team-location"})}),c.jsx(Zc,{label:"LinkedIn URL",children:c.jsx("input",{className:"input",value:s.linkedinUrl,onChange:v=>i({...s,linkedinUrl:v.target.value}),placeholder:"https://linkedin.com/in/…","data-testid":"input-team-linkedin"})}),c.jsx(Zc,{label:"Section",children:c.jsxs("select",{className:"input",value:s.sectionId,onChange:v=>i({...s,sectionId:v.target.value}),"data-testid":"select-team-section",children:[c.jsx("option",{value:"",children:"— Unassigned —"}),e.map(v=>c.jsx("option",{value:v.id,children:v.title},v.id))]})}),c.jsx(Zc,{label:"Short bio",children:c.jsx("textarea",{className:"input min-h-[240px]",value:s.bio,onChange:v=>i({...s,bio:v.target.value}),"data-testid":"input-team-bio"})}),l&&c.jsxs("div",{className:"text-sm text-red-600 flex items-center gap-2",children:[c.jsx(kt,{className:"w-4 h-4"})," ",l]}),c.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-neutral-200",children:[c.jsxs("button",{onClick:()=>{window.confirm(`Delete ${t.name}?`)&&p.mutate({id:t.id})},className:"text-xs font-bold uppercase tracking-wider text-red-600 hover:text-red-800 inline-flex items-center gap-1","data-testid":"button-delete-member",disabled:p.status==="pending",children:[c.jsx(qn,{
vendor: 10,718 bytes, line 131
131className:"w-3 h-3"})," Delete"]}),c.jsxs("button",{onClick:g,disabled:!m||h.status==="pending",className:"inline-flex items-center gap-2 px-5 py-2 rounded bg-[#0BB9B7] text-[#003320] text-sm font-black uppercase tracking-wider hover:bg-[#099492] hover:text-white transition disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"button-save-member",children:[h.status==="pending"&&c.jsx(Be,{className:"w-3 h-3 animate-spin"}),"Save changes"]})]})]})]})}function Zc({label:t,children:e}){return c.jsxs("label",{className:"block",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-neutral-600 mb-1.5",children:t}),e]})}function Yn(t){this.content=t}Yn.prototype={constructor:Yn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,s=r.find(t),i=r.content.slice();return s==-1?i.push(n||t,e):(i[s+1]=e,n&&(i[s]=n)),new Yn(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Yn(n)},addToStart:function(t,e){return new Yn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Yn(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),i=r.find(t);return s.splice(i==-1?s.length:i,0,e,n),new Yn(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Yn.from(t),t.size?new Yn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Yn.from(t),t.size?new Yn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Yn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Yn.from=function(t){if(t instanceof Yn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Yn(e)};function j5(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),i=e.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){for(let a=0;s.text[a]==i.text[a];a++)n++;return n}if(s.content.size||i.content.size){let a=j5(s.content,i.content,n+1);if(a!=null)return a}n+=s.nodeSize}}function E5(t,e,n,r){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let a=t.child(--s),l=e.child(--i),d=a.nodeSize;if(a==l){n-=d,r-=d;continue}if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let h=0,p=Math.min(a.text.length,l.text.length);for(;h<p&&a.text[a.text.length-h-1]==l.text[l.text.length-h-1];)h++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let h=E5(a.content,l.content,n-1,r-1);if(h)return h}n-=d,r-=d}}class de{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,s=0,i){for(let a=0,l=0;l<n;a++){let d=this.content[a],h=l+d.nodeSize;if(h>e&&r(d,s+l,i||null,a)!==!1&&d.content.size){let p=l+1;d.nodesBetween(Math.max(0,e-p),Math.min(d.content.size,n-p),r,s+p)}l=h}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let i="",a=!0;return this.nodesBetween(e,n,(l,d)=>{let h=l.isText?l.text.slice(Math.max(e,d)-d,n-d):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&h||l.isTextblock)&&r&&(a?a=!1:i+=r),i+=h},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new de(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let i=0,a=0;a<n;i++){let l=this.content[i],d=a+l.nodeSize;d>e&&((a<e||d>n)&&(l.isText?l=l.cut(Math.max(0,e-a),Math.min(l.text.length,n-a)):l=l.cut(Math.max(0,e-a-1),Math.min(l.content.size,n-a-1))),r.push(l),s+=l.nodeSize),a=d}return new de(r,s)}cutByIndex(e,n){return e==n?de.empty:e==0&&n==this.content.length?this:new de(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new de(s,i)}addToStart(e){return new de([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new de(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return j5(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return E5(this,e,n,r)}findIndex(e){if(e==0)return Lm(0,e);if(e==this.size)return Lm(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=e)return i==e?Lm(n+1,i):Lm(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return de.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new de(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return de.empty;let n,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(n||(n=e.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new de(n||e,r)}static from(e){if(!e)return de.empty;if(e instanceof de)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new de([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}de.empty=new de([],0);const gw={index:0,offset:0};function Lm(t,e){return gw.index=t,gw.offset=e,gw}function sy(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!sy(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!sy(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let _t=class nS{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&sy(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return nS.none;if(e instanceof nS)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};_t.none=[];class iy extends Error{}class Ne{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=A5(this.content,e+this.openStart,n);return r&&new Ne(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ne(T5(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Ne.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ne(de.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new Ne(e,r,s)}}Ne.empty=new Ne(de.empty,0,0);function T5(t,e,n){let{index:r,offset:s}=t.findIndex(e),i=t.maybeChild(r),{index:a,offset:l}=t.findIndex(n);if(s==e||i.isText){if(l!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(T5(i.content,e-s-1,n-s-1)))}function A5(t,e,n,r){let{index:s,offset:i}=t.findIndex(e),a=t.maybeChild(s);if(i==e||a.isText)return r&&!r.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=A5(a.content,e-i-1,n,a);return l&&t.replaceChild(s,a.copy(l))}function gme(t,e,n){if(n.openStart>t.depth)throw new iy("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new iy("Inconsistent open depths");return M5(t,e,n,0)}function M5(t,e,n,r){let s=t.index(r),i=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let a=M5(t,e,n,r+1);return i.copy(i.content.replaceChild(s,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,l=a.content;return Ml(a,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:a,end:l}=yme(n,t);return Ml(i,R5(t,a,l,e,r))}else return Ml(i,ay(t,e,r))}function O5(t,e){if(!e.type.compatibleContent(t.type))throw new iy("Cannot join "+e.type.name+" onto "+t.type.name)}
vendor: 12,018 bytes, line 131
131function rS(t,e,n){let r=t.node(n);return O5(r,e.node(n)),r}function Al(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function $h(t,e,n,r){let s=(e||t).node(n),i=0,a=e?e.index(n):s.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Al(t.nodeAfter,r),i++));for(let l=i;l<a;l++)Al(s.child(l),r);e&&e.depth==n&&e.textOffset&&Al(e.nodeBefore,r)}function Ml(t,e){return t.type.checkContent(e),t.copy(e)}function R5(t,e,n,r,s){let i=t.depth>s&&rS(t,e,s+1),a=r.depth>s&&rS(n,r,s+1),l=[];return $h(null,t,s,l),i&&a&&e.index(s)==n.index(s)?(O5(i,a),Al(Ml(i,R5(t,e,n,r,s+1)),l)):(i&&Al(Ml(i,ay(t,e,s+1)),l),$h(e,n,s,l),a&&Al(Ml(a,ay(n,r,s+1)),l)),$h(r,null,s,l),new de(l)}function ay(t,e,n){let r=[];if($h(null,t,n,r),t.depth>n){let s=rS(t,e,n+1);Al(Ml(s,ay(t,e,n+1)),r)}return $h(e,null,n,r),new de(r)}function yme(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)s=e.node(i).copy(de.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class yf{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(n);return r?e.child(n).cut(r):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return _t.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!s||!i[a].isInSet(s.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new oy(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],s=0,i=n;for(let a=e;;){let{index:l,offset:d}=a.content.findIndex(i),h=i-d;if(r.push(a,l,s+d),!h||(a=a.child(l),a.isText))break;i=h-1,s+=d+1}return new yf(n,r,i)}static resolveCached(e,n){let r=cR.get(e);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else cR.set(e,r=new xme);let s=r.elts[r.i]=yf.resolve(e,n);return r.i=(r.i+1)%bme,s}}class xme{constructor(){this.elts=[],this.i=0}}const bme=12,cR=new WeakMap;class oy{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const vme=Object.create(null);let So=class sS{constructor(e,n,r,s=_t.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||de.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,s=0){this.content.nodesBetween(e,n,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,s){return this.content.textBetween(e,n,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&sy(this.attrs,n||e.defaultAttrs||vme)&&_t.sameSet(this.marks,r||_t.none)}copy(e=null){return e==this.content?this:new sS(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new sS(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Ne.empty;let s=this.resolve(e),i=this.resolve(n),a=r?0:s.sharedDepth(n),l=s.start(a),h=s.node(a).content.cut(s.pos-l,i.pos-l);return new Ne(h,s.depth-a,i.depth-a)}replace(e,n,r){return gme(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return yf.resolveCached(this,e)}resolveNoCache(e){return yf.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),D5(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=de.empty,s=0,i=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,s,i),l=a&&a.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let d=s;d<i;d++)if(!this.type.allowsMarks(r.child(d).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_t.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_t.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let s=de.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};So.prototype.text=void 0;class ly extends So{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):D5(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ly(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ly(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function D5(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ql{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new wme(e,n);if(r.next==null)return ql.empty;let s=_5(r);r.next&&r.err("Unexpected trailing text");let i=Tme(Eme(s));return Ame(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let s=this;for(let i=n;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let s=[this];function i(a,l){let d=a.matchFragment(e,r);if(d&&(!n||d.validEnd))return de.from(l.map(h=>h.createAndFill()));for(let h=0;h<a.next.length;h++){let{type:p,next:m}=a.next[h];if(!(p.isText||p.hasRequiredAttrs())&&s.indexOf(m)==-1){s.push(m);let g=i(m,l.concat(p));if(g)return g}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let a=[];for(let l=s;l.type;l=l.via)a.push(l.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:l,next:d}=i.next[a];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!s.type||d.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;
vendor: 4,281 bytes, lines 131-132
131a++)i+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return i}).join(`
132`)}}ql.empty=new ql(!0);class wme{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function _5(t){let e=[];do e.push(Sme(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Sme(t){let e=[];do e.push(kme(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function kme(t){let e=jme(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Cme(t,e);else break;return e}function uR(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Cme(t,e){let n=uR(t),r=n;return t.eat(",")&&(t.next!="}"?r=uR(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Nme(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let i in n){let a=n[i];a.isInGroup(e)&&s.push(a)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function jme(t){if(t.eat("(")){let e=_5(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Nme(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Eme(t){let e=[[]];return s(i(t,0),n()),e;function n(){return e.push([])-1}function r(a,l,d){let h={term:d,to:l};return e[a].push(h),h}function s(a,l){a.forEach(d=>d.to=l)}function i(a,l){if(a.type=="choice")return a.exprs.reduce((d,h)=>d.concat(i(h,l)),[]);if(a.type=="seq")for(let d=0;;d++){let h=i(a.exprs[d],l);if(d==a.exprs.length-1)return h;s(h,l=n())}else if(a.type=="star"){let d=n();return r(l,d),s(i(a.expr,d),d),[r(d)]}else if(a.type=="plus"){let d=n();return s(i(a.expr,l),d),s(i(a.expr,d),d),[r(d)]}else{if(a.type=="opt")return[r(l)].concat(i(a.expr,l));if(a.type=="range"){let d=l;for(let h=0;h<a.min;h++){let p=n();s(i(a.expr,d),p),d=p}if(a.max==-1)s(i(a.expr,d),d);else for(let h=a.min;h<a.max;h++){let p=n();r(d,p),s(i(a.expr,d),p),d=p}return[r(d)]}else{if(a.type=="name")return[r(l,void 0,a.value)];throw new Error("Unknown expr type")}}}}function P5(t,e){return e-t}function dR(t,e){let n=[];return r(e),n.sort(P5);function r(s){let i=t[s];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(s);for(let a=0;a<i.length;a++){let{term:l,to:d}=i[a];!l&&n.indexOf(d)==-1&&r(d)}}}function Tme(t){let e=Object.create(null);return n(dR(t,0));function n(r){let s=[];r.forEach(a=>{t[a].forEach(({term:l,to:d})=>{if(!l)return;let h;for(let p=0;p<s.length;p++)s[p][0]==l&&(h=s[p][1]);dR(t,d).forEach(p=>{h||s.push([l,h=[]]),h.indexOf(p)==-1&&h.push(p)})})});let i=e[r.join(",")]=new ql(r.indexOf(t.length-1)>-1);for(let a=0;a<s.length;a++){let l=s[a][1].sort(P5);i.next.push({type:s[a][0],next:e[l.join(",")]||n(l)})}return i}}function Ame(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],i=!s.validEnd,a=[];for(let l=0;l<s.next.length;l++){let{type:d,next:h}=s.next[l];a.push(d.name),i&&!(d.isText||d.hasRequiredAttrs())&&(i=!1),r.indexOf(h)==-1&&r.push(h)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function L5(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function I5(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let i=t[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function U5(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let i=t[s];i.validate&&i.validate(e[s])}}function B5(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Ome(t,r,e[r]);return n}
vendor: 12,421 bytes, lines 132-134
132let hR=class F5{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=B5(e,r.attrs),this.defaultAttrs=L5(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ql.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:I5(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new So(this,this.computeAttrs(e),de.from(n),_t.setFrom(r))}createChecked(e=null,n,r){return n=de.from(n),this.checkContent(n),new So(this,this.computeAttrs(e),n,_t.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=de.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let s=this.contentMatch.matchFragment(n),i=s&&s.fillBefore(de.empty,!0);return i?new So(this,e,n.append(i),_t.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){U5(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:_t.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,a)=>r[i]=new F5(i,n,a));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Mme(t,e,n){let r=n.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class Ome{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Mme(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Rx{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=B5(e,s.attrs),this.excluded=null;let i=L5(this.attrs);this.instance=i?new _t(this,i):null}create(e=null){return!e&&this.instance?this.instance:new _t(this,I5(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((i,a)=>r[i]=new Rx(i,s++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){U5(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class z5{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=Yn.from(e.nodes),n.marks=Yn.from(e.marks||{}),this.nodes=hR.compile(this.spec.nodes,this),this.marks=Rx.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],a=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[a]||(r[a]=ql.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?fR(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:fR(this,a.split(" "))}this.nodeFromJSON=s=>So.fromJSON(this,s),this.markFromJSON=s=>_t.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof hR){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,s)}text(e,n){let r=this.nodes.text;return new ly(r,r.defaultAttrs,e,_t.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function fR(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],i=t.marks[s],a=i;if(i)n.push(i);else for(let l in t.marks){let d=t.marks[l];(s=="_"||d.spec.group&&d.spec.group.split(" ").indexOf(s)>-1)&&n.push(a=d)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Rme(t){return t.tag!=null}function Dme(t){return t.style!=null}let Hh=class iS{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(Rme(s))this.tags.push(s);else if(Dme(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new mR(this,n,!1);return r.addAll(e,_t.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new mR(this,n,!0);return r.addAll(e,_t.none,n.from,n.to),Ne.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Lme(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(e);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(e,n,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let a=this.styles[i],l=a.style;if(!(l.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(a.getAttrs){let d=a.getAttrs(n);if(d===!1)continue;a.attrs=d||void 0}return a}}}static schemaRules(e){let n=[];function r(s){let i=s.priority==null?50:s.priority,a=0;for(;a<n.length;a++){let l=n[a];if((l.priority==null?50:l.priority)<i)break}n.splice(a,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(a=>{r(a=gR(a)),a.mark||a.ignore||a.clearMark||(a.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(a=>{r(a=gR(a)),a.node||a.ignore||a.mark||(a.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new iS(e,iS.schemaRules(e)))}};const q5={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},_me={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},V5={ol:!0,ul:!0},xf=1,aS=2,Kh=4;function pR(t,e,n){return e!=null?(e?xf:0)|(e==="full"?aS:0):t&&t.whitespace=="pre"?xf|aS:n&~Kh}class Im{constructor(e,n,r,s,i,a){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=a,this.content=[],this.activeMarks=_t.none,this.match=i||(a&Kh?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(de.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&xf)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let n=de.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(de.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!q5.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class mR{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,i,a=pR(null,n.preserveWhitespace,0)|(r?Kh:0);s?i=new Im(s.type,s.attrs,_t.none,!0,n.topMatch||s.type.contentMatch,a):r?i=new Im(null,null,_t.none,!0,null,a):i=new Im(e.schema.topNodeType,null,_t.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,s=this.top,i=s.options&aS?"full":this.localPreserveWS||(s.options&xf)>0,{schema:a}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
133`);else if(a.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(a.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let d=0;d<l.length;d++)d&&this.insertNode(a.linebreakReplacement.create(),n,!0),l[d]&&this.insertNode(a.text(l[d]),n,!/\S/.test(l[d]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],d=e.previousSibling;(!l||d&&d.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(a.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),l;V5.hasOwnProperty(a)&&this.parser.normalizeLists&&Pme(e);let d=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(d?d.ignore:_me.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!d||d.skip||d.closeParent){d&&d.closeParent?this.open=Math.max(0,this.open-1):d&&d.skip.nodeType&&(e=d.skip);let h,p=this.needsBlock;if(q5.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),h=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let m=d&&d.skip?n:this.readStyles(e,n);m&&this.addAll(e,m),h&&this.sync(i),this.needsBlock=p}else{let h=this.readStyles(e,n);h&&this.addElementByRule(e,d,h,d.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
134`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],a=r.getPropertyValue(i);if(a)for(let l=void 0;;){let d=this.parser.matchStyle(i,a,this,l);if(!d)break;if(d.ignore)return null;if(d.clearMark?n=n.filter(h=>!d.clearMark(h)):n=n.concat(this.parser.schema.marks[d.mark].create(d.attrs)),d.consuming===!1)l=d;else break}}return n}addElementByRule(e,n,r,s){let i,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let d=this.enter(a,n.attrs||null,r,n.preserveWhitespace);d&&(i=!0,r=d)}else{let d=this.parser.schema.marks[n.mark];r=r.concat(d.create(n.attrs))}let l=this.top;if(a&&a.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEac
vendor: 4,077 bytes, line 134
134h(d=>this.insertNode(d,r,!1));else{let d=e;typeof n.contentElement=="string"?d=e.querySelector(n.contentElement):typeof n.contentElement=="function"?d=n.contentElement(e):n.contentElement&&(d=n.contentElement),this.findAround(e,d,!0),this.addAll(d,r),this.findAround(e,d,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,s){let i=r||0;for(let a=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];a!=l;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,n);this.findAtPoint(e,i)}findPlace(e,n,r){let s,i;for(let a=this.open,l=0;a>=0;a--){let d=this.nodes[a],h=d.findWrapping(e);if(h&&(!s||s.length>h.length+l)&&(s=h,i=d,!h.length))break;if(d.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let a=0;a<s.length;a++)n=this.enterInner(s[a],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let a=_t.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):yR(l.type,e.type))&&(a=l.addToSet(a));return i.content.push(e.mark(a)),!0}return!1}enter(e,n,r,s){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,s)),i}enterInner(e,n,r,s=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let l=pR(e,i,a.options);a.options&Kh&&a.content.length==0&&(l|=Kh);let d=_t.none;return r=r.filter(h=>(a.type?a.type.allowsMarkType(h.type):yR(h.type,e))?(d=h.addToSet(d),!1):!0),this.nodes.push(new Im(e,n,d,s,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=xf)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),a=(l,d)=>{for(;l>=0;l--){let h=n[l];if(h==""){if(l==n.length-1||l==0)continue;for(;d>=i;d--)if(a(l-1,d))return!0;return!1}else{let p=d>0||d==0&&s?this.nodes[d].type:r&&d>=i?r.node(d-i).type:null;if(!p||p.name!=h&&!p.isInGroup(h))return!1;d--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Pme(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&V5.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Lme(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function gR(t){let e={};for(let n in t)e[n]=t[n];return e}
vendor: 10,191 bytes, line 134
134function yR(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let i=[],a=l=>{i.push(l);for(let d=0;d<l.edgeCount;d++){let{type:h,next:p}=l.edge(d);if(h==e||i.indexOf(p)<0&&a(p))return!0}};if(a(s.contentMatch))return!0}}class Zl{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=yw(n).createDocumentFragment());let s=r,i=[];return e.forEach(a=>{if(i.length||a.marks.length){let l=0,d=0;for(;l<i.length&&d<a.marks.length;){let h=a.marks[d];if(!this.marks[h.type.name]){d++;continue}if(!h.eq(i[l][0])||h.type.spec.spanning===!1)break;l++,d++}for(;l<i.length;)s=i.pop()[1];for(;d<a.marks.length;){let h=a.marks[d++],p=this.serializeMark(h,a.isInline,n);p&&(i.push([h,s]),s.appendChild(p.dom),s=p.contentDOM||p.dom)}}s.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:s}=mg(yw(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&mg(yw(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return mg(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Zl(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=xR(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return xR(e.marks)}}function xR(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function yw(t){return t.document||window.document}const bR=new WeakMap;function Ime(t){let e=bR.get(t);return e===void 0&&bR.set(t,e=Ume(t)),e}function Ume(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function mg(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Ime(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=s.indexOf(" ");a>0&&(n=s.slice(0,a),s=s.slice(a+1));let l,d=n?t.createElementNS(n,s):t.createElement(s),h=e[1],p=1;if(h&&typeof h=="object"&&h.nodeType==null&&!Array.isArray(h)){p=2;for(let m in h)if(h[m]!=null){let g=m.indexOf(" ");g>0?d.setAttributeNS(m.slice(0,g),m.slice(g+1),h[m]):m=="style"&&d.style?d.style.cssText=h[m]:d.setAttribute(m,h[m])}}for(let m=p;m<e.length;m++){let g=e[m];if(g===0){if(m<e.length-1||m>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:d,contentDOM:d}}else{let{dom:x,contentDOM:v}=mg(t,g,n,r);if(d.appendChild(x),v){if(l)throw new RangeError("Multiple content holes");l=v}}}return{dom:d,contentDOM:l}}const $5=65535,H5=Math.pow(2,16);function Bme(t,e){return t+e*H5}function vR(t){return t&$5}function Fme(t){return(t-(t&$5))/H5}const K5=1,W5=2,gg=4,G5=8;class oS{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&G5)>0}get deletedBefore(){return(this.delInfo&(K5|gg))>0}get deletedAfter(){return(this.delInfo&(W5|gg))>0}get deletedAcross(){return(this.delInfo&gg)>0}}class Zr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Zr.empty)return Zr.empty}recover(e){let n=0,r=vR(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+Fme(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let s=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let d=this.ranges[l]-(this.inverted?s:0);if(d>e)break;let h=this.ranges[l+i],p=this.ranges[l+a],m=d+h;if(e<=m){let g=h?e==d?-1:e==m?1:n:n,x=d+s+(g<0?0:p);if(r)return x;let v=e==(n<0?d:m)?null:Bme(l/3,e-d),S=e==d?W5:e==m?K5:gg;return(n<0?e!=d:e!=m)&&(S|=G5),new oS(x,S,v)}s+=p-h}return r?e+s:new oS(e+s,0,null)}touches(e,n){let r=0,s=vR(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let d=this.ranges[l]-(this.inverted?r:0);if(d>e)break;let h=this.ranges[l+i],p=d+h;if(e<=p&&l==s*3)return!0;r+=this.ranges[l+a]-h}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let a=this.ranges[s],l=a-(this.inverted?i:0),d=a+(this.inverted?0:i),h=this.ranges[s+n],p=this.ranges[s+r];e(l,l+h,d,d+p),i+=p-h}}invert(){return new Zr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Zr.empty:new Zr(e<0?[0,-e,0]:[0,0,e])}}Zr.empty=new Zr([]);class bf{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new bf(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new bf;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let s=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],l=a.mapResult(e,n);if(l.recover!=null){let d=this.getMirror(i);if(d!=null&&d>i&&d<this.to){i=d,e=this._maps[d].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new oS(e,s,null)}}const xw=Object.create(null);class ur{getMap(){return Zr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=xw[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in xw)throw new RangeError("Duplicate use of step JSON ID "+e);return xw[e]=n,n.prototype.jsonID=e,n}}class vn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new vn(e,null)}static fail(e){return new vn(null,e)}static fromReplace(e,n,r,s){try{return vn.ok(e.replace(n,r,s))}catch(i){if(i instanceof iy)return vn.fail(i.message);throw i}}}function CC(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(CC(i.content,e,i))),i.isInline&&(i=e(i,n,s)),r.push(i)}return de.fromArray(r)}class yo extends ur{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new Ne(CC(n.content,(a,l)=>!a.isAtom||!l.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),s),n.openStart,n.openEnd);return vn.fromReplace(e,this.from,this.to,i)}invert(){return new Ks(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new yo(n.pos,r.pos,this.mark)}merge(e){return e instanceof yo&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yo(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new yo(n.from,n.to,e.markFromJSON(n.mark))}}ur.jsonID("addMark",yo);class Ks extends ur{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Ne(CC(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return vn.fromReplace(e,this.from,this.to,r)}invert(){return new yo(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ks(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ks&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ks(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ks(n.from,n.to,e.markFromJSON(n.mark))}}ur.jsonID("removeMark",Ks);class xo extends ur{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return vn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return vn.fromReplace(e,this.pos,this.pos+1,new Ne(de.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new xo(this.pos,n.marks[s]);return new xo(this.pos,this.mark)}}return new Vl(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new xo(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new xo(n.pos,e.markFromJSON(n.mark))}}ur.jsonID("addNodeMark",xo);class Vl extends ur{constructor(e,n){super(),this.pos=e,this.mark=n}
vendor: 10,642 bytes, lines 134-135
134apply(e){let n=e.nodeAt(this.pos);if(!n)return vn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return vn.fromReplace(e,this.pos,this.pos+1,new Ne(de.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new xo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Vl(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Vl(n.pos,e.markFromJSON(n.mark))}}ur.jsonID("removeNodeMark",Vl);class bn extends ur{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&lS(e,this.from,this.to)?vn.fail("Structure replace would overwrite content"):vn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Zr([this.from,this.to-this.from,this.slice.size])}invert(e){return new bn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&bn.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new bn(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof bn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Ne.empty:new Ne(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new bn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Ne.empty:new Ne(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new bn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new bn(n.from,n.to,Ne.fromJSON(e,n.slice),!!n.structure)}}bn.MAP_BIAS=1;ur.jsonID("replace",bn);class Vn extends ur{constructor(e,n,r,s,i,a,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=a,this.structure=l}apply(e){if(this.structure&&(lS(e,this.from,this.gapFrom)||lS(e,this.gapTo,this.to)))return vn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return vn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?vn.fromReplace(e,this.from,this.to,r):vn.fail("Content does not fit in gap")}getMap(){return new Zr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Vn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new Vn(n.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Vn(n.from,n.to,n.gapFrom,n.gapTo,Ne.fromJSON(e,n.slice),n.insert,!!n.structure)}}ur.jsonID("replaceAround",Vn);function lS(t,e,n){let r=t.resolve(e),s=n-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,s--}}return!1}function zme(t,e,n,r){let s=[],i=[],a,l;t.doc.nodesBetween(e,n,(d,h,p)=>{if(!d.isInline)return;let m=d.marks;if(!r.isInSet(m)&&p.type.allowsMarkType(r.type)){let g=Math.max(h,e),x=Math.min(h+d.nodeSize,n),v=r.addToSet(m);for(let S=0;S<m.length;S++)m[S].isInSet(v)||(a&&a.to==g&&a.mark.eq(m[S])?a.to=x:s.push(a=new Ks(g,x,m[S])));l&&l.to==g?l.to=x:i.push(l=new yo(g,x,r))}}),s.forEach(d=>t.step(d)),i.forEach(d=>t.step(d))}function qme(t,e,n,r){let s=[],i=0;t.doc.nodesBetween(e,n,(a,l)=>{if(!a.isInline)return;i++;let d=null;if(r instanceof Rx){let h=a.marks,p;for(;p=r.isInSet(h);)(d||(d=[])).push(p),h=p.removeFromSet(h)}else r?r.isInSet(a.marks)&&(d=[r]):d=a.marks;if(d&&d.length){let h=Math.min(l+a.nodeSize,n);for(let p=0;p<d.length;p++){let m=d[p],g;for(let x=0;x<s.length;x++){let v=s[x];v.step==i-1&&m.eq(s[x].style)&&(g=v)}g?(g.to=h,g.step=i):s.push({style:m,from:Math.max(l,e),to:h,step:i})}}}),s.forEach(a=>t.step(new Ks(a.from,a.to,a.style)))}function NC(t,e,n,r=n.contentMatch,s=!0){let i=t.doc.nodeAt(e),a=[],l=e+1;for(let d=0;d<i.childCount;d++){let h=i.child(d),p=l+h.nodeSize,m=r.matchType(h.type);if(!m)a.push(new bn(l,p,Ne.empty));else{r=m;for(let g=0;g<h.marks.length;g++)n.allowsMarkType(h.marks[g].type)||t.step(new Ks(l,p,h.marks[g]));if(s&&h.isText&&n.whitespace!="pre"){let g,x=/\r?\n|\r/g,v;for(;g=x.exec(h.text);)v||(v=new Ne(de.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),a.push(new bn(l+g.index,l+g.index+g[0].length,v))}}l=p}if(!r.validEnd){let d=r.fillBefore(de.empty,!0);t.replace(l,l,new Ne(d,0,0))}for(let d=a.length-1;d>=0;d--)t.step(a[d])}function Vme(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function cd(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,i=0;;--r){let a=t.$from.node(r),l=t.$from.index(r)+s,d=t.$to.indexAfter(r)-i;if(r<t.depth&&a.canReplace(l,d,n))return r;if(r==0||a.type.spec.isolating||!Vme(a,l,d))break;l&&(s=1),d<a.childCount&&(i=1)}return null}function $me(t,e,n){let{$from:r,$to:s,depth:i}=e,a=r.before(i+1),l=s.after(i+1),d=a,h=l,p=de.empty,m=0;for(let v=i,S=!1;v>n;v--)S||r.index(v)>0?(S=!0,p=de.from(r.node(v).copy(p)),m++):d--;let g=de.empty,x=0;for(let v=i,S=!1;v>n;v--)S||s.after(v+1)<s.end(v)?(S=!0,g=de.from(s.node(v).copy(g)),x++):h++;t.step(new Vn(d,h,a,l,new Ne(p.append(g),m,x),p.size-m,!0))}function jC(t,e,n=null,r=t){let s=Hme(t,e),i=s&&Kme(r,e);return i?s.map(wR).concat({type:e,attrs:n}).concat(i.map(wR)):null}function wR(t){return{type:t,attrs:null}}function Hme(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let a=i.length?i[0]:e;return n.canReplaceWith(r,s,a)?i:null}function Kme(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.child(r),a=e.contentMatch.findWrapping(i.type);if(!a)return null;let d=(a.length?a[a.length-1]:e).contentMatch;for(let h=r;d&&h<s;h++)d=d.matchType(n.child(h).type);return!d||!d.validEnd?null:a}function Wme(t,e,n){let r=de.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let l=n[a].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=de.from(n[a].type.create(n[a].attrs,r))}let s=e.start,i=e.end;t.step(new Vn(s,i,s,i,new Ne(r,0,0),n.length,!0))}function Gme(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(a,l)=>{let d=typeof s=="function"?s(a):s;if(a.isTextblock&&!a.hasMarkup(r,d)&&Yme(t.doc,t.mapping.slice(i).map(l),r)){let h=null;if(r.schema.linebreakReplacement){let x=r.whitespace=="pre",v=!!r.contentMatch.matchType(r.schema.linebreakReplacement);x&&!v?h=!1:!x&&v&&(h=!0)}h===!1&&Q5(t,a,l,i),NC(t,t.mapping.slice(i).map(l,1),r,void 0,h===null);let p=t.mapping.slice(i),m=p.map(l,1),g=p.map(l+a.nodeSize,1);return t.step(new Vn(m,g,m+1,g-1,new Ne(de.from(r.create(d,null,a.marks)),0,0),1,!0)),h===!0&&Y5(t,a,l,i),!1}})}function Y5(t,e,n,r){e.forEach((s,i)=>{if(s.isText){let a,l=/\r?\n|\r/g;for(;a=l.exec(s.text);){let d=t.mapping.slice(r).map(n+1+i+a.index);t.replaceWith(d,d+1,e.type.schema.linebreakReplacement.create())}}})}function Q5(t,e,n,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+i);t.replaceWith(a,a+1,e.type.schema.text(`
135`))}})}function Yme(t,e,n){let r=t.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function Qme(t,e,n,r,s){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,s||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Vn(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ne(de.from(a),0,0),1,!0))}function la(t,e,n=1,r){let s=t.resolve(e),i=s.depth-n,a=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!a.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let h=s.depth-1,p=n-2;h>i;h--,p--){let m=s.node(h),g=s.index(h);if(m.type.spec.isolating)return!1;let x=m.content.cutByIndex(g,m.childCount),v=r&&r[p+1];v&&(x=x.replaceChild(0,v.type.create(v.attrs)));let S=r&&r[p]||m;if(!m.canReplace(g+1,m.childCount)||!S.type.validContent(x))return!1}let l=s.indexAfter(i),d=r&&r[0];return s.node(i).canReplaceWith(l,l,d?d.type:s.node(i+1).type)}function Xme(t,e,n=1,r){let s=t.doc.resolve(e),i=de.empty,a=de.empty;for(let l=s.depth,d=s.depth-n,h=n-1;l>d;l--,h--){i=de.from(s.node(l).copy(i));let p=r&&r[h];a=de.from(p?p.type.create(p.attrs,a):s.node(l).copy(a))}t.step(new bn(e,e,new Ne(i.append(a),n,n),!0))}function Lo(t,e){let n=t.resolve(e),r=n.index();return X5(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Jme(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),a=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function X5(t,e){return!!(t&&e&&!t.isLeaf&&Jme(t,e))}function Dx(t,e,n=-1){let r=t.resolve(e);for(let s=r.depth;;
vendor: 9,164 bytes, line 135
135s--){let i,a,l=r.index(s);if(s==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(s+1),l++,a=r.node(s).maybeChild(l)):(i=r.node(s).maybeChild(l-1),a=r.node(s+1)),i&&!i.isTextblock&&X5(i,a)&&r.node(s).canReplace(l,l+1))return e;if(s==0)break;e=n<0?r.before(s):r.after(s)}}function Zme(t,e,n){let r=null,{linebreakReplacement:s}=t.doc.type.schema,i=t.doc.resolve(e-n),a=i.node().type;if(s&&a.inlineContent){let p=a.whitespace=="pre",m=!!a.contentMatch.matchType(s);p&&!m?r=!1:!p&&m&&(r=!0)}let l=t.steps.length;if(r===!1){let p=t.doc.resolve(e+n);Q5(t,p.node(),p.before(),l)}a.inlineContent&&NC(t,e+n-1,a,i.node().contentMatchAt(i.index()),r==null);let d=t.mapping.slice(l),h=d.map(e-n);if(t.step(new bn(h,d.map(e+n,-1),Ne.empty,!0)),r===!0){let p=t.doc.resolve(h);Y5(t,p.node(),p.before(),t.steps.length)}return t}function ege(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,n))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,n))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function J5(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let i=0;i<n.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,d=r.index(a)+(l>0?1:0),h=r.node(a),p=!1;if(i==1)p=h.canReplace(d,d,s);else{let m=h.contentMatchAt(d).findWrapping(s.firstChild.type);p=m&&h.canReplaceWith(d,d,m[0])}if(p)return l==0?r.pos:l<0?r.before(a+1):r.after(a+1)}return null}function _x(t,e,n=e,r=Ne.empty){if(e==n&&!r.size)return null;let s=t.resolve(e),i=t.resolve(n);return Z5(s,i,r)?new bn(e,n,r):new tge(s,i,r).fit()}function Z5(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class tge{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=de.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=de.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let h=this.findFittable();h?this.placeNodes(h):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,a=r.depth,l=s.depth;for(;a&&l&&i.childCount==1;)i=i.firstChild.content,a--,l--;let d=new Ne(i,a,l);return e>-1?new Vn(r.pos,e,this.$to.pos,this.$to.end(),d,n):d.size||r.pos!=this.$to.pos?new bn(r.pos,s.pos,d):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=bw(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let a=s.firstChild;for(let l=this.depth;l>=0;l--){let{type:d,match:h}=this.frontier[l],p,m=null;if(n==1&&(a?h.matchType(a.type)||(m=h.fillBefore(de.from(a),!1)):i&&d.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:m};if(n==2&&a&&(p=h.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:p};if(i&&h.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=bw(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new Ne(e,n+1,Math.max(r,s.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=bw(e,n);if(s.childCount<=1&&n>0){let i=e.size-n<=n+s.size;this.unplaced=new Ne(Ch(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ne(Ch(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:s,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let S=0;S<i.length;S++)this.openFrontierNode(i[S]);let a=this.unplaced,l=r?r.content:a.content,d=a.openStart-e,h=0,p=[],{match:m,type:g}=this.frontier[n];if(s){for(let S=0;S<s.childCount;S++)p.push(s.child(S));m=m.matchFragment(s)}let x=l.size+e-(a.content.size-a.openEnd);for(;h<l.childCount;){let S=l.child(h),C=m.matchType(S.type);if(!C)break;h++,(h>1||d==0||S.content.size)&&(m=C,p.push(eU(S.mark(g.allowedMarks(S.marks)),h==1?d:0,h==l.childCount?x:-1)))}let v=h==l.childCount;v||(x=-1),this.placed=Nh(this.placed,n,de.from(p)),this.frontier[n].match=m,v&&x<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let S=0,C=l;S<x;S++){let j=C.lastChild;this.frontier.push({type:j.type,match:j.contentMatchAt(j.childCount)}),C=j.content}this.unplaced=v?e==0?Ne.empty:new Ne(Ch(a.content,e-1,1),e-1,x<0?a.openEnd:e-1):new Ne(Ch(a.content,e,h),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!vw(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=vw(e,n,s,r,i);if(a){for(let l=n-1;l>=0;l--){let{match:d,type:h}=this.frontier[l],p=vw(e,l,h,d,!0);if(!p||p.childCount)continue e}return{depth:n,fit:a,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Nh(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=Nh(this.placed,this.depth,de.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(de.empty,!0);n.childCount&&(this.placed=Nh(this.placed,this.frontier.length,n))}}function Ch(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Ch(t.firstChild.content,e-1,n)))}function Nh(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Nh(t.lastChild.content,e-1,n)))}function bw(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function eU(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,eU(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(de.empty,!0)))),t.copy(r)}function vw(t,e,n,r,s){let i=t.node(e),a=s?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,a);return l&&!nge(n,i.content,a)?l:null}function nge(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function rge(t){return t.spec.defining||t.spec.definingForContent}function sge(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),i=t.doc.resolve(n);if(Z5(s,i,r))return t.step(new bn(e,n,r));let a=nU(s,i);a[a.length-1]==0&&a.pop();let l=-(s.depth+1);a.unshift(l);for(let g=s.depth,x=s.pos-1;g>0;g--,x--){let v=s.node(g).type.spec;if(v.defining||v.definingAsContext||v.isolating)break;a.indexOf(g)>-1?l=g:s.before(g)==x&&a.splice(1,0,-g)}let d=a.indexOf(l),h=[],p=r.openStart;for(let g=r.content,x=0;;x++){let v=g.firstChild;if(h.push(v),x==r.openStart)break;g=v.content}for(let g=p-1;g>=0;g--){let x=h[g],v=rge(x.type);if(v&&!x.sameMarkup(s.node(Math.abs(l)-1)))p=g;else if(v||!x.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let x=(g+p+1)%(r.openStart+1),v=h[x];if(v)for(let S=0;S<a.length;S++){let C=a[(S+d)%a.length],j=!0;C<0&&(j=!1,C=-C);let E=s.node(C-1),A=s.index(C-1);if(E.canReplaceWith(A,A,v.type,v.marks))return t.replace(s.before(C),j?i.after(C):n,new Ne(tU(r.content,0,r.openStart,x),x,r.openEnd))}}let m=t.steps.length;for(let g=a.length-1;g>=0&&(t.replace(e,n,r),!(t.steps.length>m));g--){let x=a[g];x<0||(e=s.before(x),n=i.after(x))}}function tU(t,e,n,r,s){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(tU(i.content,e+1,n,r,i)))}if(e>r){let i=s.contentMatchAt(0),a=i.fillBefore(t).append(t);t=a.append(i.matchFragment(a).fillBefore(de.empty,!0))}return t}function ige(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=ege(t.doc,e,r.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new Ne(de.from(r),0,0))}function age(t,e,n){let r=t.doc.resolve(e),s=t.doc.resolve(n);if(r.parent.isTextblock&&s.parent.isTextblock&&r.start()!=s.start()&&r.parentOffset==0&&s.parentOffset==0){let a=r.sharedDepth(n),l=!1;for(let d=r.depth;d>a;d--)r.node(d).type.spec.isolating&&(l=!0);for(let d=s.depth;d>
vendor: 4,092 bytes, line 135
135a;d--)s.node(d).type.spec.isolating&&(l=!0);if(!l){for(let d=r.depth;d>0&&e==r.start(d);d--)e=r.before(d);for(let d=s.depth;d>0&&n==s.start(d);d--)n=s.before(d);r=t.doc.resolve(e),s=t.doc.resolve(n)}}let i=nU(r,s);for(let a=0;a<i.length;a++){let l=i[a],d=a==i.length-1;if(d&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),s.end(l));if(l>0&&(d||r.node(l-1).canReplace(r.index(l-1),s.indexAfter(l-1))))return t.delete(r.before(l),s.after(l))}for(let a=1;a<=r.depth&&a<=s.depth;a++)if(e-r.start(a)==r.depth-a&&n>r.end(a)&&s.end(a)-n!=s.depth-a&&r.start(a-1)==s.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),s.index(a-1)))return t.delete(r.before(a),n);t.delete(e,n)}function nU(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let s=r;s>=0;s--){let i=t.start(s);if(i<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&n.push(s)}return n}class Mu extends ur{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return vn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return vn.fromReplace(e,this.pos,this.pos+1,new Ne(de.from(s),0,n.isLeaf?0:1))}getMap(){return Zr.empty}invert(e){return new Mu(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Mu(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Mu(n.pos,n.attr,n.value)}}ur.jsonID("attr",Mu);class vf extends ur{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return vn.ok(r)}getMap(){return Zr.empty}invert(e){return new vf(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new vf(n.attr,n.value)}}ur.jsonID("docAttr",vf);let Vu=class extends Error{};Vu=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Vu.prototype=Object.create(Error.prototype);Vu.prototype.constructor=Vu;Vu.prototype.name="TransformError";class rU{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new bf}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Vu(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let s=this.mapping.maps[r];r&&(e=s.map(e,1),n=s.map(n,-1)),s.forEach((i,a,l,d)=>{e=Math.min(e,l),n=Math.max(n,d)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Ne.empty){let s=_x(this.doc,e,n,r);return s&&this.step(s),this}replaceWith(e,n,r){return this.replace(e,n,new Ne(de.from(r),0,0))}delete(e,n){return this.replace(e,n,Ne.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return sge(this,e,n,r),this}replaceRangeWith(e,n,r){return ige(this,e,n,r),this}deleteRange(e,n){return age(this,e,n),this}lift(e,n){return $me(this,e,n),this}join(e,n=1){return Zme(this,e,n),this}wrap(e,n){return Wme(this,e,n),this}setBlockType(e,n=e,r,s=null){return Gme(this,e,n,r,s),this}setNodeMarkup(e,n,r=null,s){return Qme(this,e,n,r,s),this}setNodeAttribute(e,n,r){return this.step(new Mu(e,n,r)),this}setDocAttribute(e,n){return this.step(new vf(e,n)),this}addNodeMark(e,n){return this.step(new xo(e,n)),this}
vendor: 5,114 bytes, line 135
135removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof _t)n.isInSet(r.marks)&&this.step(new Vl(e,n));else{let s=r.marks,i,a=[];for(;i=n.isInSet(s);)a.push(new Vl(e,i)),s=i.removeFromSet(s);for(let l=a.length-1;l>=0;l--)this.step(a[l])}return this}split(e,n=1,r){return Xme(this,e,n,r),this}addMark(e,n,r){return zme(this,e,n,r),this}removeMark(e,n,r){return qme(this,e,n,r),this}clearIncompatible(e,n,r){return NC(this,e,n,r),this}}const ww=Object.create(null);class rt{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new oge(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Ne.empty){let r=n.content.lastChild,s=null;for(let l=0;l<n.openEnd;l++)s=r,r=r.lastChild;let i=e.steps.length,a=this.ranges;for(let l=0;l<a.length;l++){let{$from:d,$to:h}=a[l],p=e.mapping.slice(i);e.replaceRange(p.map(d.pos),p.map(h.pos),l?Ne.empty:n),l==0&&CR(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:a,$to:l}=s[i],d=e.mapping.slice(r),h=d.map(a.pos),p=d.map(l.pos);i?e.deleteRange(h,p):(e.replaceRangeWith(h,p,n),CR(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let s=e.parent.inlineContent?new Ke(e):fu(e.node(0),e.parent,e.pos,e.index(),n,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let a=n<0?fu(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):fu(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new ts(e.node(0))}static atStart(e){return fu(e,e,0,0,1)||new ts(e)}static atEnd(e){return fu(e,e,e.content.size,e.childCount,-1)||new ts(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ww[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ww)throw new RangeError("Duplicate use of selection JSON ID "+e);return ww[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ke.between(this.$anchor,this.$head).getBookmark()}}rt.prototype.visible=!0;class oge{constructor(e,n){this.$from=e,this.$to=n}}let SR=!1;function kR(t){!SR&&!t.parent.inlineContent&&(SR=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ke extends rt{constructor(e,n=e){kR(e),kR(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return rt.near(r);let s=e.resolve(n.map(this.anchor));return new Ke(s.parent.inlineContent?s:r,r)}replace(e,n=Ne.empty){if(super.replace(e,n),n==Ne.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ke&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Px(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ke(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=rt.findFrom(n,r,!0)||rt.findFrom(n,-r,!0);if(i)n=i.$head;else return rt.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(rt.findFrom(e,-r,!0)||rt.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new Ke(e,n)}}rt.jsonID("text",Ke);class Px{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Px(e.map(this.anchor),e.map(this.head))}resolve(e){return Ke.between(e.resolve(this.anchor),e.resolve(this.head))}}class Fe extends rt{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),i=e.resolve(s);return r?rt.near(i):new Fe(i)}content(){return new Ne(de.from(this.node),0,0)}eq(e){return e instanceof Fe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new EC(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Fe(e.resolve(n.anchor))}static create(e,n){return new Fe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Fe.prototype.visible=!1;rt.jsonID("node",Fe);class EC{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Px(r,r):new EC(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Fe.isSelectable(r)?new Fe(n):rt.near(n)}}class ts extends rt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}
vendor: 4,248 bytes, line 135
135replace(e,n=Ne.empty){if(n==Ne.empty){e.delete(0,e.doc.content.size);let r=rt.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new ts(e)}map(e){return new ts(e)}eq(e){return e instanceof ts}getBookmark(){return lge}}rt.jsonID("all",ts);const lge={map(){return this},resolve(t){return new ts(t)}};function fu(t,e,n,r,s,i=!1){if(e.inlineContent)return Ke.create(t,n);for(let a=r-(s>0?0:1);s>0?a<e.childCount:a>=0;a+=s){let l=e.child(a);if(l.isAtom){if(!i&&Fe.isSelectable(l))return Fe.create(t,n-(s<0?l.nodeSize:0))}else{let d=fu(t,l,n+s,s<0?l.childCount:0,s,i);if(d)return d}n+=l.nodeSize*s}return null}function CR(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof bn||s instanceof Vn))return;let i=t.mapping.maps[r],a;i.forEach((l,d,h,p)=>{a==null&&(a=p)}),t.setSelection(rt.near(t.doc.resolve(a),n))}const NR=1,Um=2,jR=4;class cge extends rU{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|NR)&~Um,this.storedMarks=null,this}get selectionSet(){return(this.updated&NR)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Um,this}ensureMarks(e){return _t.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Um)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Um,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||_t.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(rt.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=jR,this}get scrolledIntoView(){return(this.updated&jR)>0}}function ER(t,e){return!e||!t?t:t.bind(e)}class jh{constructor(e,n,r){this.name=e,this.init=ER(n.init,r),this.apply=ER(n.apply,r)}}const uge=[new jh("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new jh("selection",{init(t,e){return t.selection||rt.atStart(e.doc)},apply(t){return t.selection}}),new jh("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new jh("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Sw{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=uge.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new jh(r.key,r.spec.state,r))})}}class Cu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}
vendor: 4,141 bytes, line 135
135apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let l=this.config.plugins[a];if(l.spec.appendTransaction){let d=s?s[a].n:0,h=s?s[a].state:this,p=d<n.length&&l.spec.appendTransaction.call(l,d?n.slice(d):n,h,r);if(p&&r.filterTransaction(p,a)){if(p.setMeta("appendedTransaction",e),!s){s=[];for(let m=0;m<this.config.plugins.length;m++)s.push(m<a?{state:r,n:n.length}:{state:this,n:0})}n.push(p),r=r.applyInner(p),i=!0}s&&(s[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Cu(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new cge(this)}static create(e){let n=new Sw(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Cu(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(e,r);return r}reconfigure(e){let n=new Sw(this.schema,e.plugins),r=n.fields,s=new Cu(n);for(let i=0;i<r.length;i++){let a=r[i].name;s[a]=this.hasOwnProperty(a)?this[a]:r[i].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],i=s.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Sw(e.schema,e.plugins),i=new Cu(s);return s.fields.forEach(a=>{if(a.name=="doc")i.doc=So.fromJSON(e.schema,n.doc);else if(a.name=="selection")i.selection=rt.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let d=r[l],h=d.spec.state;if(d.key==a.name&&h&&h.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[a.name]=h.fromJSON.call(d,e,n[l],i);return}}i[a.name]=a.init(e,i)}}),i}}function sU(t,e,n){for(let r in t){let s=t[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=sU(s,e,{})),n[r]=s}return n}class Xt{constructor(e){this.spec=e,this.props={},e.props&&sU(e.props,this,this.props),this.key=e.key?e.key.key:iU("plugin")}getState(e){return e[this.key]}}const kw=Object.create(null);function iU(t){return t in kw?t+"$"+ ++kw[t]:(kw[t]=0,t+"$")}class Dn{constructor(e="key"){this.key=iU(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const TC=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function aU(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const oU=(t,e,n)=>{let r=aU(t,n);if(!r)return!1;let s=AC(r);if(!s){let a=r.blockRange(),l=a&&cd(a);return l==null?!1:(e&&e(t.tr.lift(a,l).scrollIntoView()),!0)}let i=s.nodeBefore;if(gU(t,s,e,-1))return!0;if(r.parent.content.size==0&&($u(i,"end")||Fe.isSelectable(i)))for(let a=r.depth;;a--){let l=_x(t.doc,r.before(a),r.after(a),Ne.empty);if(l&&l.slice.size<l.to-l.from){if(e){let d=t.tr.step(l);d.setSelection($u(i,"end")?rt.findFrom(d.doc.resolve(d.mapping.map(s.pos,-1)),-1):Fe.create(d.doc,s.pos-i.nodeSize)),e(d.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},dge=(t,e,n)=>{let r=aU(t,n);if(!r)return!1;let s=AC(r);return s?lU(t,s,e):!1},hge=(t,e,n)=>{let r=uU(t,n);if(!r)return!1;let s=MC(r);return s?lU(t,s,e):!1};function lU(t,e,n){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;
vendor: 5,540 bytes, lines 135-136
135i--){if(s.type.spec.isolating)return!1;let p=s.lastChild;if(!p)return!1;s=p}let a=e.nodeAfter,l=a,d=e.pos+1;for(;!l.isTextblock;d++){if(l.type.spec.isolating)return!1;let p=l.firstChild;if(!p)return!1;l=p}let h=_x(t.doc,i,d,Ne.empty);if(!h||h.from!=i||h instanceof bn&&h.slice.size>=d-i)return!1;if(n){let p=t.tr.step(h);p.setSelection(Ke.create(p.doc,i)),n(p.scrollIntoView())}return!0}function $u(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const cU=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=AC(r)}let a=i&&i.nodeBefore;return!a||!Fe.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Fe.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function AC(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function uU(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const dU=(t,e,n)=>{let r=uU(t,n);if(!r)return!1;let s=MC(r);if(!s)return!1;let i=s.nodeAfter;if(gU(t,s,e,1))return!0;if(r.parent.content.size==0&&($u(i,"start")||Fe.isSelectable(i))){let a=_x(t.doc,r.before(),r.after(),Ne.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection($u(i,"start")?rt.findFrom(l.doc.resolve(l.mapping.map(s.pos)),1):Fe.create(l.doc,l.mapping.map(s.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},hU=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=MC(r)}let a=i&&i.nodeAfter;return!a||!Fe.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Fe.create(t.doc,i.pos)).scrollIntoView()),!0)};function MC(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const fge=(t,e)=>{let n=t.selection,r=n instanceof Fe,s;if(r){if(n.node.isTextblock||!Lo(t.doc,n.from))return!1;s=n.from}else if(s=Dx(t.doc,n.from,-1),s==null)return!1;if(e){let i=t.tr.join(s);r&&i.setSelection(Fe.create(i.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},pge=(t,e)=>{let n=t.selection,r;if(n instanceof Fe){if(n.node.isTextblock||!Lo(t.doc,n.to))return!1;r=n.to}else if(r=Dx(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},mge=(t,e)=>{let{$from:n,$to:r}=t.selection,s=n.blockRange(r),i=s&&cd(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)},fU=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
136`).scrollIntoView()),!0)};function OC(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const gge=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),i=n.indexAfter(-1),a=OC(s.contentMatchAt(i));if(!a||!s.canReplaceWith(i,i,a))return!1;if(e){let l=n.after(),d=t.tr.replaceWith(l,l,a.createAndFill());d.setSelection(rt.near(d.doc.resolve(l),1)),e(d.scrollIntoView())}return!0},pU=(t,e)=>{let n=t.selection,{$from:r,$to:s}=n;if(n instanceof ts||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=OC(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let a=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,l=t.tr.insert(a,i.createAndFill());l.setSelection(Ke.create(l.doc,a+1)),e(l.scrollIntoView())}return!0},mU=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(la(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),s=r&&cd(r);return s==null?!1:(e&&e(t.tr.lift(r,s).scrollIntoView()),!0)};function yge(t){return(e,n)=>{let{$from:r,$to:s}=e.selection;if(e.selection instanceof Fe&&e.selection.node.isBlock)return!r.parentOffset||!la(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,l,d=!1,h=!1;for(let x=r.depth;;x--)if(r.node(x).isBlock){d=r.end(x)==r.pos+(r.depth-x),h=r.start(x)==r.pos-(r.depth-x),l=OC(r.node(x-1).contentMatchAt(r.indexAfter(x-1))),i.unshift(d&&l?{type:l}:null),a=x;break}else{if(x==1)return!1;i.unshift(null)}let p=e.tr;(e.selection instanceof Ke||e.selection instanceof ts)&&p.deleteSelection();let m=p.mapping.map(r.pos),g=la(p.doc,m,i.length,i);if(g||(i[0]=l?{type:l}:null,g=la(p.doc,m,i.length,i)),!g)return!1;if(p.split(m,i.length,i),!d&&h&&r.node(a).type!=l){let x=p.mapping.map(r.before(a)),v=p.doc.resolve(x);l&&r.node(a-1).canReplaceWith(v.index(),v.index()+1,l)&&p.setNodeMarkup(p.mapping.map(r.before(a)),l)}return n&&n(p.scrollIntoView()),!0}}const xge=yge(),bge=(t,e)=>{let{$from:n,to:r}=t.selection,s,i=n.sharedDepth(r);return i==0?!1:(s=n.before(i),e&&e(t.tr.setSelection(Fe.create(t.doc,s))),!0)};function vge(t,e,n){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||Lo(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}
vendor: 5,558 bytes, line 136
136function gU(t,e,n,r){let s=e.nodeBefore,i=e.nodeAfter,a,l,d=s.type.spec.isolating||i.type.spec.isolating;if(!d&&vge(t,e,n))return!0;let h=!d&&e.parent.canReplace(e.index(),e.index()+1);if(h&&(a=(l=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&l.matchType(a[0]||i.type).validEnd){if(n){let x=e.pos+i.nodeSize,v=de.empty;for(let j=a.length-1;j>=0;j--)v=de.from(a[j].create(null,v));v=de.from(s.copy(v));let S=t.tr.step(new Vn(e.pos-1,x,e.pos,x,new Ne(v,1,0),a.length,!0)),C=S.doc.resolve(x+2*a.length);C.nodeAfter&&C.nodeAfter.type==s.type&&Lo(S.doc,C.pos)&&S.join(C.pos),n(S.scrollIntoView())}return!0}let p=i.type.spec.isolating||r>0&&d?null:rt.findFrom(e,1),m=p&&p.$from.blockRange(p.$to),g=m&&cd(m);if(g!=null&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(h&&$u(i,"start",!0)&&$u(s,"end")){let x=s,v=[];for(;v.push(x),!x.isTextblock;)x=x.lastChild;let S=i,C=1;for(;!S.isTextblock;S=S.firstChild)C++;if(x.canReplace(x.childCount,x.childCount,S.content)){if(n){let j=de.empty;for(let A=v.length-1;A>=0;A--)j=de.from(v[A].copy(j));let E=t.tr.step(new Vn(e.pos-v.length,e.pos+i.nodeSize,e.pos+C,e.pos+i.nodeSize-C,new Ne(j,v.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function yU(t){return function(e,n){let r=e.selection,s=t<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(n&&n(e.tr.setSelection(Ke.create(e.doc,t<0?s.start(i):s.end(i)))),!0):!1}}const wge=yU(-1),Sge=yU(1);function kge(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,a=s.blockRange(i),l=a&&jC(a,t,e);return l?(r&&r(n.tr.wrap(a,l).scrollIntoView()),!0):!1}}function TR(t,e=null){return function(n,r){let s=!1;for(let i=0;i<n.selection.ranges.length&&!s;i++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(a,l,(d,h)=>{if(s)return!1;if(!(!d.isTextblock||d.hasMarkup(t,e)))if(d.type==t)s=!0;else{let p=n.doc.resolve(h),m=p.index();s=p.parent.canReplaceWith(m,m+1,t)}})}if(!s)return!1;if(r){let i=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:l},$to:{pos:d}}=n.selection.ranges[a];i.setBlockType(l,d,t,e)}r(i.scrollIntoView())}return!0}}function RC(...t){return function(e,n,r){for(let s=0;s<t.length;s++)if(t[s](e,n,r))return!0;return!1}}RC(TC,oU,cU);RC(TC,dU,hU);RC(fU,pU,mU,xge);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Cge(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,a=s.blockRange(i);if(!a)return!1;let l=r?n.tr:null;return Nge(l,a,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function Nge(t,e,n,r=null){let s=!1,i=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let d=a.resolve(e.start-2);i=new oy(d,d,e.depth),e.endIndex<e.parent.childCount&&(e=new oy(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let l=jC(i,n,r,e);return l?(t&&jge(t,e,l,s,n),!0):!1}function jge(t,e,n,r,s){let i=de.empty;for(let p=n.length-1;p>=0;p--)i=de.from(n[p].type.create(n[p].attrs,i));t.step(new Vn(e.start-(r?2:0),e.end,e.start,e.end,new Ne(i,0,0),n.length,!0));let a=0;for(let p=0;p<n.length;p++)n[p].type==s&&(a=p+1);let l=n.length-a,d=e.start+n.length-(r?2:0),h=e.parent;for(let p=e.startIndex,m=e.endIndex,g=!0;p<m;p++,g=!1)!g&&la(t.doc,d,l)&&(t.split(d,l),d+=2*l),d+=h.child(p).nodeSize;return t}function Ege(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,a=>a.childCount>0&&a.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?Tge(e,n,t,i):Age(e,n,i):!0:!1}}function Tge(t,e,n,r){let s=t.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(s.step(new Vn(i-1,a,i,a,new Ne(de.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new oy(s.doc.resolve(r.$from.pos),s.doc.resolve(a),r.depth));const l=cd(r);if(l==null)return!1;s.lift(r,l);let d=s.doc.resolve(s.mapping.map(i,-1)-1);return Lo(s.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&s.join(d.pos),e(s.scrollIntoView()),!0}function Age(t,e,n){let r=t.tr,s=n.parent;for(let x=n.end,v=n.endIndex-1,S=n.startIndex;v>S;v--)x-=s.child(v).nodeSize,r.delete(x-1,x+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,d=n.endIndex==s.childCount,h=i.node(-1),p=i.index(-1);if(!h.canReplace(p+(l?0:1),p+1,a.content.append(d?de.empty:de.from(s))))return!1;let m=i.pos,g=m+a.nodeSize;return r.step(new Vn(m-(l?1:0),g+(d?1:0),m+1,g-1,new Ne((l?de.empty:de.from(s.copy(de.empty))).append(d?de.empty:de.from(s.copy(de.empty))),l?0:1,d?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Mge(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,h=>h.childCount>0&&h.firstChild.type==t);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let l=i.parent,d=l.child(a-1);if(d.type!=t)return!1;if(n){let h=d.lastChild&&d.lastChild.type==l.type,p=de.from(h?t.create():null),m=new Ne(de.from(t.create(null,de.from(l.type.create(null,p)))),h?3:1,0),g=i.start,x=i.end;n(e.tr.step(new Vn(g-(h?3:1),x,g,x,m,1,!0)).scrollIntoView())}return!0}}const Qn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Hu=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let cS=null;const ia=function(t,e,n){let r=cS||(cS=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Oge=function(){cS=null},$l=function(t,e,n,r){return n&&(AR(t,e,n,r,-1)||AR(t,e,n,r,1))},Rge=/^(img|br|input|textarea|hr)$/i;function AR(t,e,n,r,s){for(var i;;){if(t==n&&e==r)return!0;
vendor: 5,321 bytes, line 136
136if(e==(s<0?0:bs(t))){let a=t.parentNode;if(!a||a.nodeType!=1||Xf(t)||Rge.test(t.nodeName)||t.contentEditable=="false")return!1;e=Qn(t)+(s<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(s<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((i=a.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=s;else return!1;else t=a,e=s<0?bs(t):0}else return!1}}function bs(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Dge(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=bs(t)}else if(t.parentNode&&!Xf(t))e=Qn(t),t=t.parentNode;else return null}}function _ge(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Xf(t))e=Qn(t)+1,t=t.parentNode;else return null}}function Pge(t,e,n){for(let r=e==0,s=e==bs(t);r||s;){if(t==n)return!0;let i=Qn(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,s=s&&i==bs(t)}}function Xf(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Lx=function(t){return t.focusNode&&$l(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function bl(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Lge(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ige(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(bs(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(bs(r.startContainer),r.startOffset)}}}const ji=typeof navigator<"u"?navigator:null,MR=typeof document<"u"?document:null,Io=ji&&ji.userAgent||"",uS=/Edge\/(\d+)/.exec(Io),xU=/MSIE \d/.exec(Io),dS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Io),Ir=!!(xU||dS||uS),ko=xU?document.documentMode:dS?+dS[1]:uS?+uS[1]:0,ks=!Ir&&/gecko\/(\d+)/i.test(Io);ks&&+(/Firefox\/(\d+)/.exec(Io)||[0,0])[1];const hS=!Ir&&/Chrome\/(\d+)/.exec(Io),Jn=!!hS,bU=hS?+hS[1]:0,cr=!Ir&&!!ji&&/Apple Computer/.test(ji.vendor),Ku=cr&&(/Mobile\/\w+/.test(Io)||!!ji&&ji.maxTouchPoints>2),xs=Ku||(ji?/Mac/.test(ji.platform):!1),vU=ji?/Win/.test(ji.platform):!1,aa=/Android \d/.test(Io),Jf=!!MR&&"webkitFontSmoothing"in MR.documentElement.style,Uge=Jf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Bge(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Qi(t,e){return typeof t=="number"?t:t[e]}function Fge(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function OR(t,e,n){let r=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=Hu(a);continue}let l=a,d=l==i.body,h=d?Bge(i):Fge(l),p=0,m=0;if(e.top<h.top+Qi(r,"top")?m=-(h.top-e.top+Qi(s,"top")):e.bottom>h.bottom-Qi(r,"bottom")&&(m=e.bottom-e.top>h.bottom-h.top?e.top+Qi(s,"top")-h.top:e.bottom-h.bottom+Qi(s,"bottom")),e.left<h.left+Qi(r,"left")?p=-(h.left-e.left+Qi(s,"left")):e.right>h.right-Qi(r,"right")&&(p=e.right-h.right+Qi(s,"right")),p||m)if(d)i.defaultView.scrollBy(p,m);else{let x=l.scrollLeft,v=l.scrollTop;m&&(l.scrollTop+=m),p&&(l.scrollLeft+=p);let S=l.scrollLeft-x,C=l.scrollTop-v;e={left:e.left-S,top:e.top-C,right:e.right-S,bottom:e.bottom-C}}let g=d?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(g))break;a=g=="absolute"?a.offsetParent:Hu(a)}}function zge(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let l=t.root.elementFromPoint(i,a);if(!l||l==t.dom||!t.dom.contains(l))continue;let d=l.getBoundingClientRect();if(d.top>=n-20){r=l,s=d.top;break}}return{refDOM:r,refTop:s,stack:wU(t.dom)}}function wU(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Hu(r));return e}function qge({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;SU(n,r==0?0:r-e)}function SU(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:s,left:i}=t[n];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let eu=null;function Vge(t){if(t.setActive)return t.setActive();if(eu)return t.focus(eu);let e=wU(t);t.focus(eu==null?{get preventScroll(){return eu={preventScroll:!0},!0}}:void 0),eu||(eu=!1,SU(e,0))}function kU(t,e){let n,r=2e8,s,i=0,a=e.top,l=e.top,d,h;for(let p=t.firstChild,m=0;p;p=p.nextSibling,m++){let g;if(p.nodeType==1)g=p.getClientRects();else if(p.nodeType==3)g=ia(p).getClientRects();else continue;for(let x=0;x<g.length;x++){let v=g[x];if(v.top<=a&&v.bottom>=l){a=Math.max(v.bottom,a),l=Math.min(v.top,l);let S=v.left>e.left?v.left-e.left:v.right<e.left?e.left-v.right:0;if(S<r){n=p,r=S,s=S&&n.nodeType==3?{left:v.right<e.left?v.right:v.left,top:e.top}:e,p.nodeType==1&&S&&(i=m+(e.left>=(v.left+v.right)/2?1:0));continue}}
vendor: 5,990 bytes, line 136
136else v.top>e.top&&!d&&v.left<=e.left&&v.right>=e.left&&(d=p,h={left:Math.max(v.left,Math.min(v.right,e.left)),top:v.top});!n&&(e.left>=v.right&&e.top>=v.top||e.left>=v.left&&e.top>=v.bottom)&&(i=m+1)}}return!n&&d&&(n=d,s=h,r=0),n&&n.nodeType==3?$ge(n,s):!n||r&&n.nodeType==1?{node:t,offset:i}:kU(n,s)}function $ge(t,e){let n=t.nodeValue.length,r=document.createRange(),s;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let a=so(r,1);if(a.top!=a.bottom&&DC(e,a)){s={node:t,offset:i+(e.left>=(a.left+a.right)/2?1:0)};break}}return r.detach(),s||{node:t,offset:0}}function DC(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Hge(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Kge(t,e,n){let{node:r,offset:s}=kU(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,s,i)}function Wge(t,e,n,r){let s=-1;for(let i=e,a=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0),d;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((d=l.dom.getBoundingClientRect()).width||d.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!a&&d.left>r.left||d.top>r.top?s=l.posBefore:(!a&&d.right<r.left||d.bottom<r.top)&&(s=l.posAfter),a=!0),!l.contentDOM&&s<0&&!l.node.isText))return(l.node.isBlock?r.top<(d.top+d.bottom)/2:r.left<(d.left+d.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function CU(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=s;;){let a=t.childNodes[i];if(a.nodeType==1){let l=a.getClientRects();for(let d=0;d<l.length;d++){let h=l[d];if(DC(e,h))return CU(a,e,h)}}if((i=(i+1)%r)==s)break}return t}function Gge(t,e){let n=t.dom.ownerDocument,r,s=0,i=Ige(n,e.left,e.top);i&&({node:r,offset:s}=i);let a=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let h=t.dom.getBoundingClientRect();if(!DC(e,h)||(a=CU(t.dom,e,h),!a))return null}if(cr)for(let h=a;r&&h;h=Hu(h))h.draggable&&(r=void 0);if(a=Hge(a,e),r){if(ks&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let p=r.childNodes[s],m;p.nodeName=="IMG"&&(m=p.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&s++}let h;Jf&&s&&r.nodeType==1&&(h=r.childNodes[s-1]).nodeType==1&&h.contentEditable=="false"&&h.getBoundingClientRect().top>=e.top&&s--,r==t.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(l=Wge(t,r,s,e))}l==null&&(l=Kge(t,a,e));let d=t.docView.nearestDesc(a,!0);return{pos:l,inside:d?d.posAtStart-d.border:-1}}function RR(t){return t.top<t.bottom||t.left<t.right}function so(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(RR(r))return r}return Array.prototype.find.call(n,RR)||t.getBoundingClientRect()}const Yge=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function NU(t,e,n){let{node:r,offset:s,atom:i}=t.docView.domFromPos(e,n<0?-1:1),a=Jf||ks;if(r.nodeType==3)if(a&&(Yge.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let d=so(ia(r,s,s),n);if(ks&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let h=so(ia(r,s-1,s-1),-1);if(h.top==d.top){let p=so(ia(r,s,s+1),-1);if(p.top!=d.top)return hh(p,p.left<h.left)}}return d}else{let d=s,h=s,p=n<0?1:-1;return n<0&&!s?(h++,p=-1):n>=0&&s==r.nodeValue.length?(d--,p=1):n<0?d--:h++,hh(so(ia(r,d,h),p),p<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(n<0||s==bs(r))){let d=r.childNodes[s-1];if(d.nodeType==1)return Cw(d.getBoundingClientRect(),!1)}if(i==null&&s<bs(r)){let d=r.childNodes[s];if(d.nodeType==1)return Cw(d.getBoundingClientRect(),!0)}return Cw(r.getBoundingClientRect(),n>=0)}if(i==null&&s&&(n<0||s==bs(r))){let d=r.childNodes[s-1],h=d.nodeType==3?ia(d,bs(d)-(a?0:1)):d.nodeType==1&&(d.nodeName!="BR"||!d.nextSibling)?d:null;if(h)return hh(so(h,1),!1)}if(i==null&&s<bs(r)){let d=r.childNodes[s];for(;d.pmViewDesc&&d.pmViewDesc.ignoreForCoords;)d=d.nextSibling;let h=d?d.nodeType==3?ia(d,0,a?0:1):d.nodeType==1?d:null:null;if(h)return hh(so(h,-1),!0)}return hh(so(r.nodeType==3?ia(r):r,-n),n>=0)}function hh(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Cw(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function jU(t,e,n){let r=t.state,s=t.root.activeElement;r!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),s!=t.dom&&s&&s.focus()}}function Qge(t,e,n){let r=e.selection,s=n=="up"?r.$from:r.$to;return jU(t,e,()=>{let{node:i}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let a=NU(t,s.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let d;if(l.nodeType==1)d=l.getClientRects();else if(l.nodeType==3)d=ia(l,0,l.nodeValue.length).getClientRects();else continue;for(let h=0;h<d.length;h++){let p=d[h];if(p.bottom>p.top+1&&(n=="up"?a.top-p.top>(p.bottom-a.top)*2:p.bottom-a.bottom>(a.bottom-p.top)*2))return!1}}return!0})}const Xge=/[\u0590-\u08ac]/;function Jge(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,a=s==r.parent.content.size,l=t.domSelection();return l?!Xge.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:a:jU(t,e,()=>{let{focusNode:d,focusOffset:h,anchorNode:p,anchorOffset:m}=t.domSelectionRange(),g=l.caretBidiLevel;l.modify("move",n,"character");let x=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:v,focusOffset:S}=t.domSelectionRange(),C=v&&!x.contains(v.nodeType==1?v:v.parentNode)||d==v&&h==S;
vendor: 5,533 bytes, lines 136-137
136try{l.collapse(p,m),d&&(d!=p||h!=m)&&l.extend&&l.extend(d,h)}catch{}return g!=null&&(l.caretBidiLevel=g),C}):r.pos==r.start()||r.pos==r.end()}let DR=null,_R=null,PR=!1;function Zge(t,e,n){return DR==e&&_R==n?PR:(DR=e,_R=n,PR=n=="up"||n=="down"?Qge(t,e,n):Jge(t,e,n))}const Cs=0,LR=1,Cl=2,Ei=3;class Zf{constructor(e,n,r,s){this.parent=e,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=Cs,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let s=this.children[n];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,a;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>Qn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)for(let a=0;a<s.children.length;a++){let l=s.children[a];if(l.size){s=l;break}}return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],l=i+a.size;if(l>e||a instanceof TU){s=e-i;break}i=l}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof EU&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Qn(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Qn(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let a=r,l=0;;l++){let d=this.children[l],h=a+d.size;if(s==-1&&e<=h){let p=a+d.border;if(e>=p&&n<=h-d.border&&d.node&&d.contentDOM&&this.contentDOM.contains(d.contentDOM))return d.parseRange(e,n,p);e=a;for(let m=l;m>0;m--){let g=this.children[m-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){s=Qn(g.dom)+1;break}e-=g.size}s==-1&&(s=0)}if(s>-1&&(h>n||l==this.children.length-1)){n=h;for(let p=l+1;p<this.children.length;p++){let m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=Qn(m.dom);break}n+=m.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=h}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,s=!1){let i=Math.min(e,n),a=Math.max(e,n);for(let x=0,v=0;x<this.children.length;x++){let S=this.children[x],C=v+S.size;if(i>v&&a<C)return S.setSelection(e-v-S.border,n-v-S.border,r,s);v=C}let l=this.domFromPos(e,e?-1:1),d=n==e?l:this.domFromPos(n,n?-1:1),h=r.root.getSelection(),p=r.domSelectionRange(),m=!1;if((ks||cr)&&e==n){let{node:x,offset:v}=l;if(x.nodeType==3){if(m=!!(v&&x.nodeValue[v-1]==`
137`),m&&v==x.nodeValue.length)for(let S=x,C;S;S=S.parentNode){if(C=S.nextSibling){C.nodeName=="BR"&&(l=d={node:C.parentNode,offset:Qn(C)+1});break}let j=S.pmViewDesc;if(j&&j.node&&j.node.isBlock)break}}else{let S=x.childNodes[v-1];
vendor: 4,388 bytes, line 137
137m=S&&(S.nodeName=="BR"||S.contentEditable=="false")}}if(ks&&p.focusNode&&p.focusNode!=d.node&&p.focusNode.nodeType==1){let x=p.focusNode.childNodes[p.focusOffset];x&&x.contentEditable=="false"&&(s=!0)}if(!(s||m&&cr)&&$l(l.node,l.offset,p.anchorNode,p.anchorOffset)&&$l(d.node,d.offset,p.focusNode,p.focusOffset))return;let g=!1;if((h.extend||e==n)&&!(m&&ks)){h.collapse(l.node,l.offset);try{e!=n&&h.extend(d.node,d.offset),g=!0}catch{}}if(!g){if(e>n){let v=l;l=d,d=v}let x=document.createRange();x.setEnd(d.node,d.offset),x.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(x)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],a=r+i.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let l=r+i.border,d=a-i.border;if(e>=l&&n<=d){this.dirty=e==r||n==a?Cl:LR,e==l&&n==d&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ei:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Cl:Ei}r=a}this.dirty=Cl}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Cl:LR;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class EU extends Zf{constructor(e,n,r,s){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let l=document.createElement("span");l.appendChild(a),a=l}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Cs&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class eye extends Zf{constructor(e,n,r,s){super(e,[],n,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Hl extends Zf{constructor(e,n,r,s,i){super(e,[],r,s),this.mark=n,this.spec=i}static create(e,n,r,s){let i=s.nodeViews[n.type.name],a=i&&i(n,s,r);return(!a||!a.dom)&&(a=Zl.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Hl(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Ei||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ei&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Cs){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Cs}}slice(e,n,r){let s=Hl.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=pS(i,n,a,r)),e>0&&(i=pS(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Co extends Zf{constructor(e,n,r,s,i,a,l,d,h){super(e,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=l}static create(e,n,r,s,i,a){let l=i.nodeViews[n.type.name],d,h=l&&l(n,i,()=>{if(!d)return a;if(d.parent)return d.parent.posBeforeChild(d)},r,s),p=h&&h.dom,m=h&&h.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:m}=Zl.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!m&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let g=p;return p=OU(p,r,n),h?d=new tye(e,n,r,s,p,m||null,g,h,i,a+1):n.isText?new Ix(e,n,r,s,p,g,i):new Co(e,n,r,s,p,m||null,g,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;
vendor: 5,114 bytes, line 137
137let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>de.empty)}return e}matchesNode(e,n,r){return this.dirty==Cs&&e.eq(this.node)&&cy(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,s=n,i=e.composing?this.localCompositionInfo(e,n):null,a=i&&i.pos>-1?i:null,l=i&&i.pos<0,d=new rye(this,a&&a.node,e);aye(this.node,this.innerDeco,(h,p,m)=>{h.spec.marks?d.syncToMarks(h.spec.marks,r,e,p):h.type.side>=0&&!m&&d.syncToMarks(p==this.node.childCount?_t.none:this.node.child(p).marks,r,e,p),d.placeWidget(h,e,s)},(h,p,m,g)=>{d.syncToMarks(h.marks,r,e,g);let x;d.findNodeMatch(h,p,m,g)||l&&e.state.selection.from>s&&e.state.selection.to<s+h.nodeSize&&(x=d.findIndexWithChild(i.node))>-1&&d.updateNodeAt(h,p,m,x,e)||d.updateNextNode(h,p,m,e,g,s)||d.addNode(h,p,m,e,s),s+=h.nodeSize}),d.syncToMarks([],r,e,0),this.node.isTextblock&&d.addTextblockHacks(),d.destroyRest(),(d.changed||this.dirty==Cl)&&(a&&this.protectLocalComposition(e,a),AU(this.contentDOM,this.children,e),Ku&&oye(this.dom))}localCompositionInfo(e,n){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof Ke)||r<n||s>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,l=lye(this.node.content,a,r-n,s-n);return l<0?null:{node:i,pos:l,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new eye(this,i,n,s);e.input.compositionNodes.push(a),this.children=pS(this.children,r,r+s.length,e,a)}update(e,n,r,s){return this.dirty==Ei||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,s),!0)}updateInner(e,n,r,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=Cs}updateOuterDeco(e){if(cy(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=MU(this.dom,this.nodeDOM,fS(this.outerDeco,this.node,n),fS(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function IR(t,e,n,r,s){OU(r,e,t);let i=new Co(void 0,t,e,n,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class Ix extends Co{constructor(e,n,r,s,i,a,l){super(e,n,r,s,i,null,a,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,s){return this.dirty==Ei||this.dirty!=Cs&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Cs||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=Cs,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let s=this.node.cut(e,n),i=document.createTextNode(s.text);return new Ix(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ei)}get domAtom(){return!1}isText(e){return this.node.text==e}}class TU extends Zf{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Cs&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class tye extends Co{constructor(e,n,r,s,i,a,l,d,h,p){super(e,n,r,s,i,a,l,h,p),this.spec=d}update(e,n,r,s){if(this.dirty==Ei)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}
vendor: 4,072 bytes, line 137
137setSelection(e,n,r,s){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function AU(t,e,n){let r=t.firstChild,s=!1;for(let i=0;i<e.length;i++){let a=e[i],l=a.dom;if(l.parentNode==t){for(;l!=r;)r=UR(r),s=!0;r=r.nextSibling}else s=!0,t.insertBefore(l,r);if(a instanceof Hl){let d=r?r.previousSibling:t.lastChild;AU(a.contentDOM,a.children,n),r=d?d.nextSibling:t.firstChild}}for(;r;)r=UR(r),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const Wh=function(t){t&&(this.nodeName=t)};Wh.prototype=Object.create(null);const Nl=[new Wh];function fS(t,e,n){if(t.length==0)return Nl;let r=n?Nl[0]:new Wh,s=[r];for(let i=0;i<t.length;i++){let a=t[i].type.attrs;if(a){a.nodeName&&s.push(r=new Wh(a.nodeName));for(let l in a){let d=a[l];d!=null&&(n&&s.length==1&&s.push(r=new Wh(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+d:l=="style"?r.style=(r.style?r.style+";":"")+d:l!="nodeName"&&(r[l]=d))}}}return s}function MU(t,e,n,r){if(n==Nl&&r==Nl)return e;let s=e;for(let i=0;i<r.length;i++){let a=r[i],l=n[i];if(i){let d;l&&l.nodeName==a.nodeName&&s!=t&&(d=s.parentNode)&&d.nodeName.toLowerCase()==a.nodeName||(d=document.createElement(a.nodeName),d.pmIsDeco=!0,d.appendChild(s),l=Nl[0]),s=d}nye(s,l||Nl[0],a)}return s}function nye(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&t.classList.add(s[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function OU(t,e,n){return MU(t,t,Nl,fS(e,n,t.nodeType!=1))}function cy(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function UR(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class rye{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=sye(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,s){let i=0,a=this.stack.length>>1,l=Math.min(a,e.length);for(;i<l&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=Cs,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let d=-1,h=this.top.children.length;s<this.preMatch.index&&(h=Math.min(this.index+3,h));for(let p=this.index;p<h;p++){let m=this.top.children[p];if(m.matchesMark(e[a])&&!this.isLocked(m.dom)){d=p;break}}if(d>-1)d>this.index&&(this.changed=!0,this.destroyBetween(this.index,d)),this.top=this.top.children[this.index];else{let p=Hl.create(this.top,e[a],n,r);this.top.children.splice(this.index,0,p),this.top=p,this.changed=!0}this.index=0,a++}}findNodeMatch(e,n,r,s){let i=-1,a;if(s>=this.preMatch.index&&(a=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))i=this.top.children.indexOf(a,this.index);else for(let l=this.index,d=Math.min(this.top.children.length,l+5);l<d;l++){let h=this.top.children[l];if(h.matchesNode(e,n,r)&&!this.preMatch.matched.has(h)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,s,i){let a=this.top.children[s];
vendor: 7,168 bytes, line 137
137return a.dirty==Ei&&a.dom==a.contentDOM&&(a.dirty=Cl),a.update(e,n,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=n}}updateNextNode(e,n,r,s,i,a){for(let l=this.index;l<this.top.children.length;l++){let d=this.top.children[l];if(d instanceof Co){let h=this.preMatch.matched.get(d);if(h!=null&&h!=i)return!1;let p=d.dom,m,g=this.isLocked(p)&&!(e.isText&&d.node&&d.node.isText&&d.nodeDOM.nodeValue==e.text&&d.dirty!=Ei&&cy(n,d.outerDeco));if(!g&&d.update(e,n,r,s))return this.destroyBetween(this.index,l),d.dom!=p&&(this.changed=!0),this.index++,!0;if(!g&&(m=this.recreateWrapper(d,e,n,r,s,a)))return this.destroyBetween(this.index,l),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Cl,m.updateChildren(s,a+1),m.dirty=Cs),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,s,i,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!cy(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let l=Co.create(this.top,n,r,s,i,a);if(l.contentDOM){l.children=e.children,e.children=[];for(let d of l.children)d.parent=l}return e.destroy(),l}addNode(e,n,r,s,i){let a=Co.create(this.top,e,n,r,s,i);a.contentDOM&&a.updateChildren(s,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new EU(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Hl;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ix)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((cr||Jn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new TU(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function sye(t,e){let n=e,r=n.children.length,s=t.childCount,i=new Map,a=[];e:for(;s>0;){let l;for(;;)if(r){let h=n.children[r-1];if(h instanceof Hl)n=h,r=h.children.length;else{l=h,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let d=l.node;if(d){if(d!=t.child(s-1))break;--s,i.set(l,s),a.push(l)}}return{index:s,matched:i,matches:a.reverse()}}function iye(t,e){return t.type.side-e.type.side}function aye(t,e,n,r){let s=e.locals(t),i=0;if(s.length==0){for(let h=0;h<t.childCount;h++){let p=t.child(h);r(p,s,e.forChild(i,p),h),i+=p.nodeSize}return}let a=0,l=[],d=null;for(let h=0;;){let p,m;for(;a<s.length&&s[a].to==i;){let C=s[a++];C.widget&&(p?(m||(m=[p])).push(C):p=C)}if(p)if(m){m.sort(iye);for(let C=0;C<m.length;C++)n(m[C],h,!!d)}else n(p,h,!!d);let g,x;if(d)x=-1,g=d,d=null;else if(h<t.childCount)x=h,g=t.child(h++);else break;for(let C=0;C<l.length;C++)l[C].to<=i&&l.splice(C--,1);for(;a<s.length&&s[a].from<=i&&s[a].to>i;)l.push(s[a++]);let v=i+g.nodeSize;if(g.isText){let C=v;a<s.length&&s[a].from<C&&(C=s[a].from);for(let j=0;j<l.length;j++)l[j].to<C&&(C=l[j].to);C<v&&(d=g.cut(C-i),g=g.cut(0,C-i),v=C,x=-1)}else for(;a<s.length&&s[a].to<v;)a++;let S=g.isInline&&!g.isLeaf?l.filter(C=>!C.inline):l.slice();r(g,S,e.forChild(i,g),x),i=v}}function oye(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function lye(t,e,n,r){for(let s=0,i=0;s<t.childCount&&i<=r;){let a=t.child(s++),l=i;if(i+=a.nodeSize,!a.isText)continue;let d=a.text;for(;s<t.childCount;){let h=t.child(s++);if(i+=h.nodeSize,!h.isText)break;d+=h.text}if(i>=n){if(i>=r&&d.slice(r-e.length-l,r-l)==e)return r-e.length;let h=l<r?d.lastIndexOf(e,r-l-1):-1;if(h>=0&&h+e.length+l>=n)return l+h;if(n==r&&d.length>=r+e.length-l&&d.slice(r-l,r-l+e.length)==e)return r}}return-1}function pS(t,e,n,r,s){let i=[];for(let a=0,l=0;a<t.length;a++){let d=t[a],h=l,p=l+=d.size;h>=n||p<=e?i.push(d):(h<e&&i.push(d.slice(0,e-h,r)),s&&(i.push(s),s=void 0),p>n&&i.push(d.slice(n-h,d.size,r)))}return i}function _C(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),i=s&&s.size==0,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let l=r.resolve(a),d,h;if(Lx(n)){for(d=a;s&&!s.node;)s=s.parent;let m=s.node;if(s&&m.isAtom&&Fe.isSelectable(m)&&s.parent&&!(m.isInline&&Pge(n.focusNode,n.focusOffset,s.dom))){let g=s.posBefore;h=new Fe(a==g?l:r.resolve(g))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let m=a,g=a;for(let x=0;x<n.rangeCount;x++){let v=n.getRangeAt(x);m=Math.min(m,t.docView.posFromDOM(v.startContainer,v.startOffset,1)),g=Math.max(g,t.docView.posFromDOM(v.endContainer,v.endOffset,-1))}if(m<0)return null;[d,a]=g==t.state.selection.anchor?[g,m]:[m,g],l=r.resolve(a)}else d=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null}let p=r.resolve(d);if(!h){let m=e=="pointer"||t.state.selection.head<l.pos&&!i?1:-1;h=PC(t,p,l,m)}return h}function RU(t){return t.editable?t.hasFocus():_U(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ca(t,e=!1){let n=t.state.selection;if(DU(t,n),!!RU(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Jn){let r=t.domSelectionRange(),s=t.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&$l(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)uye(t);else{let{anchor:r,head:s}=n,i,a;BR&&!(n instanceof Ke)&&(n.$from.parent.inlineContent||(i=FR(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=FR(t,n.to))),t.docView.setSelection(r,s,t,e),BR&&(i&&zR(i),a&&zR(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&cye(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const BR=cr||Jn&&bU<63;function FR(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),s=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(cr&&s&&s.contentEditable=="false")return Nw(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return Nw(s);if(i)return Nw(i)}}function Nw(t){return t.contentEditable="true",cr&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function zR(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function cye(t){let e=t.dom.ownerDocument;
vendor: 8,196 bytes, lines 137-140
137e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!RU(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function uye(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Qn(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Ir&&ko<=11&&(n.disabled=!0,n.disabled=!1)}function DU(t,e){if(e instanceof Fe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(qR(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else qR(t)}function qR(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function PC(t,e,n,r){return t.someProp("createSelectionBetween",s=>s(t,e,n))||Ke.between(e,n,r)}function VR(t){return t.editable&&!t.hasFocus()?!1:_U(t)}function _U(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function dye(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return $l(e.node,e.offset,n.anchorNode,n.anchorOffset)}function mS(t,e){let{$anchor:n,$head:r}=t.selection,s=e>0?n.max(r):n.min(r),i=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return i&&rt.findFrom(i,e)}function co(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function $R(t,e,n){let r=t.state.selection;if(r instanceof Ke)if(n.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=t.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return co(t,new Ke(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=mS(t.state,e);return s&&s instanceof Fe?co(t,s):!1}else if(!(xs&&n.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,a;if(!i||i.isText)return!1;let l=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(a=t.docView.descAt(l))&&!a.contentDOM?Fe.isSelectable(i)?co(t,new Fe(e<0?t.state.doc.resolve(s.pos-i.nodeSize):s)):Jf?co(t,new Ke(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Fe&&r.node.isInline)return co(t,new Ke(e>0?r.$to:r.$from));{let s=mS(t.state,e);return s?co(t,s):!1}}}function uy(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Gh(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function tu(t,e){return e<0?hye(t):fye(t)}function hye(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s,i,a=!1;for(ks&&n.nodeType==1&&r<uy(n)&&Gh(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Gh(l,-1))s=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(PU(n))break;{let l=n.previousSibling;for(;l&&Gh(l,-1);)s=n.parentNode,i=Qn(l),l=l.previousSibling;if(l)n=l,r=uy(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?gS(t,n,r):s&&gS(t,s,i)}function fye(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s=uy(n),i,a;for(;;)if(r<s){if(n.nodeType!=1)break;let l=n.childNodes[r];if(Gh(l,1))i=n,a=++r;else break}else{if(PU(n))break;{let l=n.nextSibling;for(;l&&Gh(l,1);)i=l.parentNode,a=Qn(l)+1,l=l.nextSibling;if(l)n=l,r=0,s=uy(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&gS(t,i,a)}function PU(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function pye(t,e){for(;t&&e==t.childNodes.length&&!Xf(t);)e=Qn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function mye(t,e){for(;t&&!e&&!Xf(t);)e=Qn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function gS(t,e,n){if(e.nodeType!=3){let i,a;(a=pye(e,n))?(e=a,n=0):(i=mye(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Lx(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&ca(t)},50)}function HR(t,e){let n=t.state.doc.resolve(e);if(!(Jn||vU)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),a=(i.top+i.bottom)/2;if(a>s.top&&a<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),a=(i.top+i.bottom)/2;if(a>s.top&&a<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function KR(t,e,n){let r=t.state.selection;if(r instanceof Ke&&!r.empty||n.indexOf("s")>-1||xs&&n.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=mS(t.state,e);if(a&&a instanceof Fe)return co(t,a)}if(!s.parent.inlineContent){let a=e<0?s:i,l=r instanceof ts?rt.near(a,e):rt.findFrom(a,e);return l?co(t,l):!1}return!1}function WR(t,e){if(!(t.state.selection instanceof Ke))return!0;let{$head:n,$anchor:r,empty:s}=t.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=t.state.tr;return e<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),t.dispatch(a),!0}return!1}function GR(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function gye(t){if(!cr||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;GR(t,r,"true"),setTimeout(()=>GR(t,r,"false"),20)}return!1}function yye(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function xye(t,e){let n=e.keyCode,r=yye(e);if(n==8||xs&&n==72&&r=="c")return WR(t,-1)||tu(t,-1);if(n==46&&!e.shiftKey||xs&&n==68&&r=="c")return WR(t,1)||tu(t,1);if(n==13||n==27)return!0;if(n==37||xs&&n==66&&r=="c"){let s=n==37?HR(t,t.state.selection.from)=="ltr"?-1:1:-1;return $R(t,s,r)||tu(t,s)}else if(n==39||xs&&n==70&&r=="c"){let s=n==39?HR(t,t.state.selection.from)=="ltr"?1:-1:1;return $R(t,s,r)||tu(t,s)}else{if(n==38||xs&&n==80&&r=="c")return KR(t,-1,r)||tu(t,-1);if(n==40||xs&&n==78&&r=="c")return gye(t)||KR(t,1,r)||tu(t,1);if(r==(xs?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function LC(t,e){t.someProp("transformCopied",x=>{e=x(e,t)});let n=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let x=r.firstChild;n.push(x.type.name,x.attrs!=x.type.defaultAttrs?x.attrs:null),r=x.content}let a=t.someProp("clipboardSerializer")||Zl.fromSchema(t.state.schema),l=zU(),d=l.createElement("div");d.appendChild(a.serializeFragment(r,{document:l}));let h=d.firstChild,p,m=0;for(;h&&h.nodeType==1&&(p=FU[h.nodeName.toLowerCase()]);){for(let x=p.length-1;x>=0;x--){let v=l.createElement(p[x]);for(;d.firstChild;)v.appendChild(d.firstChild);d.appendChild(v),m++}h=d.firstChild}h&&h.nodeType==1&&h.setAttribute("data-pm-slice",`${s} ${i}${m?` -${m}`:""} ${JSON.stringify(n)}`);let g=t.someProp("clipboardTextSerializer",x=>x(e,t))||e.content.textBetween(0,e.content.size,`
138
139`);return{dom:d,text:g,slice:e}}function LU(t,e,n,r,s){let i=s.parent.type.spec.code,a,l;if(!n&&!e)return null;let d=!!e&&(r||i||!n);if(d){if(t.someProp("transformPastedText",g=>{e=g(e,i||r,t)}),i)return l=new Ne(de.from(t.state.schema.text(e.replace(/\r\n?/g,`
140`))),0,0),t.someProp("transformPasted",g=>{l=g(l,t,!0)}),l;let m=t.someProp("clipboardTextParser",g=>g(e,s,r,t));if(m)l=m;else{let g=s.marks(),{schema:x}=t.state,v=Zl.fromSchema(x);
vendor: 13,815 bytes, line 140
140a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(S=>{let C=a.appendChild(document.createElement("p"));S&&C.appendChild(v.serializeNode(x.text(S,g)))})}}else t.someProp("transformPastedHTML",m=>{n=m(n,t)}),a=Sye(n),Jf&&kye(a);let h=a&&a.querySelector("[data-pm-slice]"),p=h&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(h.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let m=+p[3];m>0;m--){let g=a.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;a=g}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Hh.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(d||p),context:s,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!bye.test(g.parentNode.nodeName)?{ignore:!0}:null}})),p)l=Cye(YR(l,+p[1],+p[2]),p[4]);else if(l=Ne.maxOpen(vye(l.content,s),!0),l.openStart||l.openEnd){let m=0,g=0;for(let x=l.content.firstChild;m<l.openStart&&!x.type.spec.isolating;m++,x=x.firstChild);for(let x=l.content.lastChild;g<l.openEnd&&!x.type.spec.isolating;g++,x=x.lastChild);l=YR(l,m,g)}return t.someProp("transformPasted",m=>{l=m(l,t,d)}),l}const bye=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function vye(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),i,a=[];if(t.forEach(l=>{if(!a)return;let d=s.findWrapping(l.type),h;if(!d)return a=null;if(h=a.length&&i.length&&UU(d,i,l,a[a.length-1],0))a[a.length-1]=h;else{a.length&&(a[a.length-1]=BU(a[a.length-1],i.length));let p=IU(l,d);a.push(p),s=s.matchType(p.type),i=d}}),a)return de.from(a)}return t}function IU(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,de.from(t));return t}function UU(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=UU(t,e,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(de.from(IU(n,t,s+1))))}}function BU(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,BU(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(de.empty,!0);return t.copy(n.append(r))}function yS(t,e,n,r,s,i){let a=e<0?t.firstChild:t.lastChild,l=a.content;return t.childCount>1&&(i=0),s<r-1&&(l=yS(l,e,n,r,s+1,i)),s>=n&&(l=e<0?a.contentMatchAt(0).fillBefore(l,i<=s).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(de.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function YR(t,e,n){return e<t.openStart&&(t=new Ne(yS(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ne(yS(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const FU={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let QR=null;function zU(){return QR||(QR=document.implementation.createHTMLDocument("title"))}let jw=null;function wye(t){let e=window.trustedTypes;return e?(jw||(jw=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),jw.createHTML(t)):t}function Sye(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=zU().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),s;if((s=r&&FU[r[1].toLowerCase()])&&(t=s.map(i=>"<"+i+">").join("")+t+s.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=wye(t),s)for(let i=0;i<s.length;i++)n=n.querySelector(s[i])||n;return n}function kye(t){let e=t.querySelectorAll(Jn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Cye(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:s,openStart:i,openEnd:a}=t;for(let l=r.length-2;l>=0;l-=2){let d=n.nodes[r[l]];if(!d||d.hasRequiredAttrs())break;s=de.from(d.create(r[l+1],s)),i++,a++}return new Ne(s,i,a)}const jr={},Er={},Nye={touchstart:!0,touchmove:!0};class jye{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Eye(t){for(let e in jr){let n=jr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Aye(t,r)&&!IC(t,r)&&(t.editable||!(r.type in Er))&&n(t,r)},Nye[e]?{passive:!0}:void 0)}cr&&t.dom.addEventListener("input",()=>null),xS(t)}function bo(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Tye(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function xS(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>IC(t,r))})}function IC(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Aye(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Mye(t,e){!IC(t,e)&&jr[e.type]&&(t.editable||!(e.type in Er))&&jr[e.type](t,e)}Er.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!VU(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(aa&&Jn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Ku&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",s=>s(t,bl(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||xye(t,n)?n.preventDefault():bo(t,"key")};Er.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Er.keypress=(t,e)=>{let n=e;if(VU(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||xs&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Ke)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",a=>a(t,r.$from.pos,r.$to.pos,s,i))&&t.dispatch(i()),n.preventDefault()}};function Ux(t){return{left:t.clientX,top:t.clientY}}function Oye(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function UC(t,e,n,r,s){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(t.someProp(e,l=>a>i.depth?l(t,n,i.nodeAfter,i.before(a),s,!0):l(t,n,i.node(a),i.before(a),s,!1)))return!0;return!1}function Ou(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function Rye(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Fe.isSelectable(r)?(Ou(t,new Fe(n)),!0):!1}function Dye(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof Fe&&(r=n.node);let i=t.state.doc.resolve(e);for(let a=i.depth+1;a>0;a--){let l=a>i.depth?i.nodeAfter:i.node(a);if(Fe.isSelectable(l)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(a);break}}return s!=null?(Ou(t,Fe.create(t.state.doc,s)),!0):!1}function _ye(t,e,n,r,s){return UC(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(s?Dye(t,n):Rye(t,n))}function Pye(t,e,n,r){return UC(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function Lye(t,e,n,r){return UC(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||Iye(t,n,r)}function Iye(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Ou(t,Ke.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let a=i>s.depth?s.nodeAfter:s.node(i),l=s.before(i);if(a.inlineContent)Ou(t,Ke.create(r,l+1,l+1+a.content.size));else if(Fe.isSelectable(a))Ou(t,Fe.create(r,l));else continue;return!0}}function BC(t){return dy(t)}const qU=xs?"metaKey":"ctrlKey";jr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=BC(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&Oye(n,t.input.lastClick)&&!n[qU]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button};let a=t.posAtCoords(Ux(n));a&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Uye(t,a,n,!!r)):(i=="doubleClick"?Pye:Lye)(t,a.pos,a.inside,n)?n.preventDefault():bo(t,"pointer"))};class Uye{constructor(e,n,r,s){this.view=e,this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[qU],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),a=n.inside;else{let p=e.state.doc.resolve(n.pos);i=p.parent,a=p.depth?p.before():0}const l=s?null:r.target,d=l?e.docView.nearestDesc(l,!0):null;this.target=d&&d.nodeDOM.nodeType==1?d.nodeDOM:null;let{selection:h}=e.state;r.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||h instanceof Fe&&h.from<=a&&h.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ks&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),bo(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ca(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ux(e))),this.updateAllowDefault(e),this.allowDefault||!n?bo(this.view,"pointer"):_ye(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||cr&&this.mightDrag&&!this.mightDrag.node.isAtom||Jn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Ou(this.view,rt.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):bo(this.view,"pointer")}move(e){this.updateAllowDefault(e),bo(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}jr.touchstart=t=>{t.input.lastTouch=Date.now(),BC(t),bo(t,"pointer")};jr.touchmove=t=>{t.input.lastTouch=Date.now(),bo(t,"pointer")};jr.contextmenu=t=>BC(t);function VU(t,e){return t.composing?!0:cr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Bye=aa?5e3:-1;Er.compositionstart=Er.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Ke&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Jn&&vU&&Fye(t)))t.markCursor=t.state.storedMarks||n.marks(),dy(t,!0),t.markCursor=null;else if(dy(t,!e.selection.empty),ks&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let a=i<0?s.lastChild:s.childNodes[i-1];if(!a)break;if(a.nodeType==3){let l=t.domSelection();l&&l.collapse(a,a.nodeValue.length);break}else s=a,i=-1}}t.input.composing=!0}$U(t,Bye)};function Fye(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Er.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,$U(t,20))};function $U(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>dy(t),e))}function HU(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=qye());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function zye(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Dge(e.focusNode,e.focusOffset),r=_ge(e.focusNode,e.focusOffset);
vendor: 4,449 bytes, line 140
140if(n&&r&&n!=r){let s=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function qye(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function dy(t,e=!1){if(!(aa&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),HU(t),e||t.docView&&t.docView.dirty){let n=_C(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Vye(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const wf=Ir&&ko<15||Ku&&Uge<604;jr.copy=Er.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let i=wf?null:n.clipboardData,a=r.content(),{dom:l,text:d}=LC(t,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",d)):Vye(t,l),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function $ye(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Hye(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Sf(t,r.value,null,s,e):Sf(t,r.textContent,r.innerHTML,s,e)},50)}function Sf(t,e,n,r,s){let i=LU(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",d=>d(t,s,i||Ne.empty)))return!0;if(!i)return!1;let a=$ye(i),l=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function KU(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Er.paste=(t,e)=>{let n=e;if(t.composing&&!aa)return;let r=wf?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Sf(t,KU(r),r.getData("text/html"),s,n)?n.preventDefault():Hye(t,n)};class WU{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Kye=xs?"altKey":"ctrlKey";function GU(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[Kye]}jr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(Ux(n)),a;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof Fe?s.to-1:s.to))){if(r&&r.mightDrag)a=Fe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let m=t.docView.nearestDesc(n.target,!0);m&&m.node.type.spec.draggable&&m!=t.docView&&(a=Fe.create(t.state.doc,m.posBefore))}}let l=(a||t.state.selection).content(),{dom:d,text:h,slice:p}=LC(t,l);(!n.dataTransfer.files.length||!Jn||bU>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(wf?"Text":"text/html",d.innerHTML),n.dataTransfer.effectAllowed="copyMove",wf||n.dataTransfer.setData("text/plain",h),t.dragging=new WU(p,GU(t,n),a)};jr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Er.dragover=Er.dragenter=(t,e)=>e.preventDefault();Er.drop=(t,e)=>{try{Wye(t,e,t.dragging)}finally{t.dragging=null}};function Wye(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Ux(e));if(!r)return;let s=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",x=>{i=x(i,t,!1)}):i=LU(t,KU(e.dataTransfer),wf?null:e.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&GU(t,e));if(t.someProp("handleDrop",x=>x(t,e,i||Ne.empty,a))){e.preventDefault();return}if(!i)return;e.preventDefault();let l=i?J5(t.state.doc,s.pos,i):s.pos;l==null&&(l=s.pos);let d=t.state.tr;if(a){let{node:x}=n;x?x.replace(d):d.deleteSelection()}let h=d.mapping.map(l),p=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,m=d.doc;
vendor: 9,086 bytes, line 140
140if(p?d.replaceRangeWith(h,h,i.content.firstChild):d.replaceRange(h,h,i),d.doc.eq(m))return;let g=d.doc.resolve(h);if(p&&Fe.isSelectable(i.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(i.content.firstChild))d.setSelection(new Fe(g));else{let x=d.mapping.map(l);d.mapping.maps[d.mapping.maps.length-1].forEach((v,S,C,j)=>x=j),d.setSelection(PC(t,g,d.doc.resolve(x)))}t.focus(),t.dispatch(d.setMeta("uiEvent","drop"))}jr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ca(t)},20))};jr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};jr.beforeinput=(t,e)=>{if(Jn&&aa&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,bl(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Er)jr[t]=Er[t];function kf(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class hy{constructor(e,n){this.toDOM=e,this.spec=n||Ol,this.side=this.spec.side||0}map(e,n,r,s){let{pos:i,deleted:a}=e.mapResult(n.from+s,this.side<0?-1:1);return a?null:new kr(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof hy&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&kf(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class No{constructor(e,n){this.attrs=e,this.spec=n||Ol}map(e,n,r,s){let i=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new kr(i,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof No&&kf(this.attrs,e.attrs)&&kf(this.spec,e.spec)}static is(e){return e.type instanceof No}destroy(){}}class FC{constructor(e,n){this.attrs=e,this.spec=n||Ol}map(e,n,r,s){let i=e.mapResult(n.from+s,1);if(i.deleted)return null;let a=e.mapResult(n.to+s,-1);return a.deleted||a.pos<=i.pos?null:new kr(i.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),i;return s==n.from&&!(i=e.child(r)).isText&&s+i.nodeSize==n.to}eq(e){return this==e||e instanceof FC&&kf(this.attrs,e.attrs)&&kf(this.spec,e.spec)}destroy(){}}class kr{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new kr(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new kr(e,e,new hy(n,r))}static inline(e,n,r,s){return new kr(e,n,new No(r,s))}static node(e,n,r,s){return new kr(e,n,new FC(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof No}get widget(){return this.type instanceof hy}}const pu=[],Ol={};class Yt{constructor(e,n){this.local=e.length?e:pu,this.children=n.length?n:pu}static create(e,n){return n.length?fy(n,e,0,Ol):or}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,i){for(let a=0;a<this.local.length;a++){let l=this.local[a];l.from<=n&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+s,l.to+s))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>e){let l=this.children[a]+1;this.children[a+2].findInner(e-l,n-l,r,s+l,i)}}map(e,n,r){return this==or||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Ol)}mapInner(e,n,r,s,i){let a;for(let l=0;l<this.local.length;l++){let d=this.local[l].map(e,r,s);d&&d.type.valid(n,d)?(a||(a=[])).push(d):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?Gye(this.children,a||[],e,n,r,s,i):a?new Yt(a.sort(Rl),pu):or}add(e,n){return n.length?this==or?Yt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,i=0;e.forEach((l,d)=>{let h=d+r,p;if(p=QU(n,l,h)){for(s||(s=this.children.slice());i<s.length&&s[i]<d;)i+=3;s[i]==d?s[i+2]=s[i+2].addInner(l,p,h+1):s.splice(i,0,d,d+l.nodeSize,fy(p,l,h+1,Ol)),i+=3}});let a=YU(i?XU(n):n,-r);for(let l=0;l<a.length;l++)a[l].type.valid(e,a[l])||a.splice(l--,1);return new Yt(a.length?this.local.concat(a).sort(Rl):this.local,s||this.children)}remove(e){return e.length==0||this==or?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let a,l=r[i]+n,d=r[i+1]+n;for(let p=0,m;p<e.length;p++)(m=e[p])&&m.from>l&&m.to<d&&(e[p]=null,(a||(a=[])).push(m));if(!a)continue;r==this.children&&(r=this.children.slice());let h=r[i+2].removeInner(a,l+1);h!=or?r[i+2]=h:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,a;i<e.length;i++)if(a=e[i])for(let l=0;l<s.length;l++)s[l].eq(a,n)&&(s==this.local&&(s=this.local.slice()),s.splice(l--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new Yt(s,r):or}forChild(e,n){if(this==or)return this;if(n.isLeaf)return Yt.empty;let r,s;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,a=i+n.content.size;for(let l=0;l<this.local.length;l++){let d=this.local[l];if(d.from<a&&d.to>i&&d.type instanceof No){let h=Math.max(i,d.from)-i,p=Math.min(a,d.to)-i;h<p&&(s||(s=[])).push(d.copy(h,p))}}if(s){let l=new Yt(s.sort(Rl),pu);return r?new po([l,r]):l}return r||or}eq(e){if(this==e)return!0;if(!(e instanceof Yt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return zC(this.localsInner(e))}localsInner(e){if(this==or)return pu;if(e.inlineContent||!this.local.some(No.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof No||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Yt.empty=new Yt([],[]);Yt.removeOverlap=zC;const or=Yt.empty;class po{constructor(e){this.members=e}map(e,n){const r=this.members.map(s=>s.map(e,n,Ol));return po.from(r)}forChild(e,n){if(n.isLeaf)return Yt.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,n);i!=or&&(i instanceof po?r=r.concat(i.members):r.push(i))}return po.from(r)}eq(e){if(!(e instanceof po)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?zC(r?n:n.sort(Rl)):pu}static from(e){switch(e.length){case 0:return or;case 1:return e[0];default:return new po(e.every(n=>n instanceof Yt)?e:e.reduce((n,r)=>n.concat(r instanceof Yt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Gye(t,e,n,r,s,i,a){let l=t.slice();for(let h=0,p=i;h<n.maps.length;h++){let m=0;n.maps[h].forEach((g,x,v,S)=>{let C=S-v-(x-g);for(let j=0;j<l.length;j+=3){let E=l[j+1];if(E<0||g>E+p-m)continue;let A=l[j]+p-m;x>=A?l[j+1]=g<=A?-2:-1:g>=p&&C&&(l[j]+=C,l[j+1]+=C)}m+=C}),p=n.maps[h].map(p,-1)}let d=!1;for(let h=0;h<l.length;h+=3)if(l[h+1]<0){if(l[h+1]==-2){d=!0,l[h+1]=-1;continue}let p=n.map(t[h]+i),m=p-s;if(m<0||m>=r.content.size){d=!0;continue}let g=n.map(t[h+1]+i,-1),x=g-s,{index:v,offset:S}=r.content.findIndex(m),C=r.maybeChild(v);if(C&&S==m&&S+C.nodeSize==x){let j=l[h+2].mapInner(n,C,p+1,t[h]+i+1,a);j!=or?(l[h]=m,l[h+1]=x,l[h+2]=j):(l[h+1]=-2,d=!0)}else d=!0}if(d){let h=Yye(l,t,e,n,s,i,a),p=fy(h,r,0,a);e=p.local;for(let m=0;m<l.length;m+=3)l[m+1]<0&&(l.splice(m,3),m-=3);for(let m=0,g=0;m<p.children.length;m+=3){let x=p.children[m];for(;g<l.length&&l[g]<x;)g+=3;l.splice(g,0,p.children[m],p.children[m+1],p.children[m+2])}}return new Yt(e.sort(Rl),l)}function YU(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new kr(s.from+e,s.to+e,s.type))}return n}function Yye(t,e,n,r,s,i,a){function l(d,h){for(let p=0;p<d.local.length;p++){let m=d.local[p].map(r,s,h);m?n.push(m):a.onRemove&&a.onRemove(d.local[p].spec)}for(let p=0;p<d.children.length;p+=3)l(d.children[p+2],d.children[p]+h+1)}for(let d=0;d<t.length;d+=3)t[d+1]==-1&&l(t[d+2],e[d]+i+1);return n}function QU(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let i=0,a;i<t.length;i++)(a=t[i])&&a.from>n&&a.to<r&&((s||(s=[])).push(a),t[i]=null);return s}function XU(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function fy(t,e,n,r){let s=[],i=!1;e.forEach((l,d)=>{let h=QU(t,l,d+n);if(h){i=!0;let p=fy(h,l,n+d+1,r);p!=or&&s.push(d,d+l.nodeSize,p)}});let a=YU(i?XU(t):t,-n).sort(Rl);for(let l=0;l<a.length;
vendor: 10,954 bytes, line 140
140l++)a[l].type.valid(e,a[l])||(r.onRemove&&r.onRemove(a[l].spec),a.splice(l--,1));return a.length||s.length?new Yt(a,s):or}function Rl(t,e){return t.from-e.from||t.to-e.to}function zC(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,r.to),XR(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),XR(e,s,r.copy(i.from,r.to)));break}}}return e}function XR(t,e,n){for(;e<t.length&&Rl(n,t[e])>0;)e++;t.splice(e,0,n)}function Ew(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=or&&e.push(r)}),t.cursorWrapper&&e.push(Yt.create(t.state.doc,[t.cursorWrapper.deco])),po.from(e)}const Qye={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Xye=Ir&&ko<=11;class Jye{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Zye{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Jye,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);Ir&&ko<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():cr&&e.composing&&r.some(s=>s.type=="childList"&&s.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Xye&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Qye)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(VR(this.view)){if(this.suppressingSelectionUpdates)return ca(this.view);if(Ir&&ko<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&$l(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Hu(i))n.add(i);for(let i=e.anchorNode;i;i=Hu(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&VR(e)&&!this.ignoreSelectionChange(r),i=-1,a=-1,l=!1,d=[];if(e.editable)for(let p=0;p<n.length;p++){let m=this.registerMutation(n[p],d);m&&(i=i<0?m.from:Math.min(m.from,i),a=a<0?m.to:Math.max(m.to,a),m.typeOver&&(l=!0))}if(d.some(p=>p.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let p of d)if(p.nodeName=="BR"&&p.parentNode){let m=p.nextSibling;for(;m&&m.nodeType==1;){if(m.contentEditable=="false"){p.parentNode.removeChild(p);break}m=m.firstChild}}}else if(ks&&d.length){let p=d.filter(m=>m.nodeName=="BR");if(p.length==2){let[m,g]=p;m.parentNode&&m.parentNode.parentNode==g.parentNode?g.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let g of p){let x=g.parentNode;x&&x.nodeName=="LI"&&(!m||nxe(e,m)!=x)&&g.remove()}}}let h=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Lx(r)&&(h=_C(e))&&h.eq(rt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ca(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,a),exe(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,rxe(e,d)),this.handleDOMChange(i,a,l,d),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ca(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let p=0;p<e.addedNodes.length;p++){let m=e.addedNodes[p];n.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(Ir&&ko<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:m,nextSibling:g}=e.addedNodes[p];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(s=m),(!g||Array.prototype.indexOf.call(e.addedNodes,g)<0)&&(i=g)}let a=s&&s.parentNode==e.target?Qn(s)+1:0,l=r.localPosFromDOM(e.target,a,-1),d=i&&i.parentNode==e.target?Qn(i):e.target.childNodes.length,h=r.localPosFromDOM(e.target,d,1);return{from:l,to:h}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let JR=new WeakMap,ZR=!1;function exe(t){if(!JR.has(t)&&(JR.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=ks,ZR)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),ZR=!0}}function eD(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return $l(a.node,a.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function txe(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return eD(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?eD(t,n):null}function nxe(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function rxe(t,e){var n;let{focusNode:r,focusOffset:s}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let a=i.nextSibling;for(;a&&a.nodeName!="TD"&&a.nodeName!="TH";)a=a.nextSibling;if(a){let l=a;for(;;){let d=l.firstChild;if(!d||d.nodeType!=1||d.contentEditable=="false"||/^(BR|IMG)$/.test(d.nodeName))break;l=d}l.insertBefore(i,l.firstChild),r==i&&t.domSelection().collapse(i,s)}else i.parentNode.removeChild(i)}}function sxe(t,e,n){let{node:r,fromOffset:s,toOffset:i,from:a,to:l}=t.docView.parseRange(e,n),d=t.domSelectionRange(),h,p=d.anchorNode;if(p&&t.dom.contains(p.nodeType==1?p:p.parentNode)&&(h=[{node:p,offset:d.anchorOffset}],Lx(d)||h.push({node:d.focusNode,offset:d.focusOffset})),Jn&&t.input.lastKeyCode===8)for(let C=i;C>s;C--){let j=r.childNodes[C-1],E=j.pmViewDesc;if(j.nodeName=="BR"&&!E){i=C;break}if(!E||E.size)break}let m=t.state.doc,g=t.someProp("domParser")||Hh.fromSchema(t.state.schema),x=m.resolve(a),v=null,S=g.parse(r,{topNode:x.parent,topMatch:x.parent.contentMatchAt(x.index()),topOpen:!0,from:s,to:i,preserveWhitespace:x.parent.type.whitespace=="pre"?"full":!0,findPositions:h,ruleFromNode:ixe,context:x});if(h&&h[0].pos!=null){let C=h[0].pos,j=h[1]&&h[1].pos;j==null&&(j=C),v={anchor:C+a,head:j+a}}return{doc:S,sel:v,from:a,to:l}}function ixe(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(cr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||cr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const axe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function oxe(t,e,n,r,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let _=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,L=_C(t,_);if(L&&!t.state.selection.eq(L)){if(Jn&&aa&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",B=>B(t,bl(13,"Enter"))))return;let V=t.state.tr.setSelection(L);_=="pointer"?V.setMeta("pointer",!0):_=="key"&&V.scrollIntoView(),i&&V.setMeta("composition",i),t.dispatch(V)}return}let a=t.state.doc.resolve(e),l=a.sharedDepth(n);e=a.before(l+1),n=t.state.doc.resolve(n).after(l+1);let d=t.state.selection,h=sxe(t,e,n),p=t.state.doc,m=p.slice(h.from,h.to),g,x;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(g=t.state.selection.to,x="end"):(g=t.state.selection.from,x="start"),t.input.lastKeyCode=null;let v=uxe(m.content,h.doc.content,h.from,g,x);if(v&&t.input.domChangeCount++,(Ku&&t.input.lastIOSEnter>Date.now()-225||aa)&&s.some(_=>_.nodeType==1&&!axe.test(_.nodeName))&&(!v||v.endA>=v.endB)&&t.someProp("handleKeyDown",_=>_(t,bl(13,"Enter")))){t.input.lastIOSEnter=0;return}
vendor: 8,714 bytes, line 140
140if(!v)if(r&&d instanceof Ke&&!d.empty&&d.$head.sameParent(d.$anchor)&&!t.composing&&!(h.sel&&h.sel.anchor!=h.sel.head))v={start:d.from,endA:d.to,endB:d.to};else{if(h.sel){let _=tD(t,t.state.doc,h.sel);if(_&&!_.eq(t.state.selection)){let L=t.state.tr.setSelection(_);i&&L.setMeta("composition",i),t.dispatch(L)}}return}t.state.selection.from<t.state.selection.to&&v.start==v.endB&&t.state.selection instanceof Ke&&(v.start>t.state.selection.from&&v.start<=t.state.selection.from+2&&t.state.selection.from>=h.from?v.start=t.state.selection.from:v.endA<t.state.selection.to&&v.endA>=t.state.selection.to-2&&t.state.selection.to<=h.to&&(v.endB+=t.state.selection.to-v.endA,v.endA=t.state.selection.to)),Ir&&ko<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>h.from&&h.doc.textBetween(v.start-h.from-1,v.start-h.from+1)=="  "&&(v.start--,v.endA--,v.endB--);let S=h.doc.resolveNoCache(v.start-h.from),C=h.doc.resolveNoCache(v.endB-h.from),j=p.resolve(v.start),E=S.sameParent(C)&&S.parent.inlineContent&&j.end()>=v.endA;if((Ku&&t.input.lastIOSEnter>Date.now()-225&&(!E||s.some(_=>_.nodeName=="DIV"||_.nodeName=="P"))||!E&&S.pos<h.doc.content.size&&(!S.sameParent(C)||!S.parent.inlineContent)&&S.pos<C.pos&&!/\S/.test(h.doc.textBetween(S.pos,C.pos,"","")))&&t.someProp("handleKeyDown",_=>_(t,bl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>v.start&&cxe(p,v.start,v.endA,S,C)&&t.someProp("handleKeyDown",_=>_(t,bl(8,"Backspace")))){aa&&Jn&&t.domObserver.suppressSelectionUpdates();return}Jn&&v.endB==v.start&&(t.input.lastChromeDelete=Date.now()),aa&&!E&&S.start()!=C.start()&&C.parentOffset==0&&S.depth==C.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==v.endA&&(v.endB-=2,C=h.doc.resolveNoCache(v.endB-h.from),setTimeout(()=>{t.someProp("handleKeyDown",function(_){return _(t,bl(13,"Enter"))})},20));let A=v.start,D=v.endA,M=_=>{let L=_||t.state.tr.replace(A,D,h.doc.slice(v.start-h.from,v.endB-h.from));if(h.sel){let V=tD(t,L.doc,h.sel);V&&!(Jn&&t.composing&&V.empty&&(v.start!=v.endB||t.input.lastChromeDelete<Date.now()-100)&&(V.head==A||V.head==L.mapping.map(D)-1)||Ir&&V.empty&&V.head==A)&&L.setSelection(V)}return i&&L.setMeta("composition",i),L.scrollIntoView()},I;if(E)if(S.pos==C.pos){Ir&&ko<=11&&S.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ca(t),20));let _=M(t.state.tr.delete(A,D)),L=p.resolve(v.start).marksAcross(p.resolve(v.endA));L&&_.ensureMarks(L),t.dispatch(_)}else if(v.endA==v.endB&&(I=lxe(S.parent.content.cut(S.parentOffset,C.parentOffset),j.parent.content.cut(j.parentOffset,v.endA-j.start())))){let _=M(t.state.tr);I.type=="add"?_.addMark(A,D,I.mark):_.removeMark(A,D,I.mark),t.dispatch(_)}else if(S.parent.child(S.index()).isText&&S.index()==C.index()-(C.textOffset?0:1)){let _=S.parent.textBetween(S.parentOffset,C.parentOffset),L=()=>M(t.state.tr.insertText(_,A,D));t.someProp("handleTextInput",V=>V(t,A,D,_,L))||t.dispatch(L())}else t.dispatch(M());else t.dispatch(M())}function tD(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:PC(t,e.resolve(n.anchor),e.resolve(n.head))}function lxe(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,i=r,a,l,d;for(let p=0;p<r.length;p++)s=r[p].removeFromSet(s);for(let p=0;p<n.length;p++)i=n[p].removeFromSet(i);if(s.length==1&&i.length==0)l=s[0],a="add",d=p=>p.mark(l.addToSet(p.marks));else if(s.length==0&&i.length==1)l=i[0],a="remove",d=p=>p.mark(l.removeFromSet(p.marks));else return null;let h=[];for(let p=0;p<e.childCount;p++)h.push(d(e.child(p)));if(de.from(h).eq(t))return{mark:l,type:a}}function cxe(t,e,n,r,s){if(n-e<=s.pos-r.pos||Tw(r,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&n==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=t.resolve(Tw(i,!0,!0));return!a.parent.isTextblock||a.pos>n||Tw(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function Tw(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function uxe(t,e,n,r,s){let i=t.findDiffStart(e,n);if(i==null)return null;let{a,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let d=Math.max(0,i-Math.min(a,l));r-=a+d-i}if(a<i&&t.size<e.size){let d=r<=i&&r>=a?i-r:0;i-=d,i&&i<e.size&&nD(e.textBetween(i-1,i+1))&&(i+=d?1:-1),l=i+(l-a),a=i}else if(l<i){let d=r<=i&&r>=l?i-r:0;i-=d,i&&i<t.size&&nD(t.textBetween(i-1,i+1))&&(i+=d?1:-1),a=i+(a-l),l=i}return{start:i,endA:a,endB:l}}function nD(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class JU{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new jye,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(oD),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=iD(this),sD(this),this.nodeViews=aD(this),this.docView=IR(this.state.doc,rD(this),Ew(this),this.dom,this),this.domObserver=new Zye(this,(r,s,i,a)=>oxe(this,r,s,i,a)),this.domObserver.start(),Eye(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&xS(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(oD),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let s=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(HU(this),a=!0),this.state=e;let l=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let x=aD(this);hxe(x,this.nodeViews)&&(this.nodeViews=x,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&xS(this),this.editable=iD(this),sD(this);let d=Ew(this),h=rD(this),p=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(e.doc,h,d);(m||!e.selection.eq(s.selection))&&(a=!0);let g=p=="preserve"&&a&&this.dom.style.overflowAnchor==null&&zge(this);if(a){this.domObserver.stop();let x=m&&(Ir||Jn)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&dxe(s.selection,e.selection);if(m){let v=Jn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=zye(this)),(i||!this.docView.update(e.doc,h,d,this))&&(this.docView.updateOuterDeco(h),this.docView.destroy(),this.docView=IR(e.doc,h,d,this.dom,this)),v&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(x=!0)}x||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&dye(this))?ca(this,x):(DU(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():g&&qge(g)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Fe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&OR(this,n.getBoundingClientRect(),e)}else OR(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,s=-1;
vendor: 5,685 bytes, line 140
140if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new WU(e.slice,e.move,s<0?void 0:Fe.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let a=0;a<this.directPlugins.length;a++){let l=this.directPlugins[a].props[e];if(l!=null&&(s=n?n(l):l))return s}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let l=i[a].props[e];if(l!=null&&(s=n?n(l):l))return s}}hasFocus(){if(Ir){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Vge(this.dom),ca(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Gge(this,e)}coordsAtPos(e,n=1){return NU(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return Zge(this,n||this.state,e)}pasteHTML(e,n){return Sf(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Sf(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return LC(this,e)}destroy(){this.docView&&(Tye(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ew(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Oge())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Mye(this,e)}domSelectionRange(){let e=this.domSelection();return e?cr&&this.root.nodeType===11&&Lge(this.dom.ownerDocument)==this.dom&&txe(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}JU.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function rD(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[kr.node(0,t.state.doc.content.size,e)]}function sD(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:kr.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function iD(t){return!t.someProp("editable",e=>e(t.state)===!1)}function dxe(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function aD(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function hxe(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function oD(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Mo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},py={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},fxe=typeof navigator<"u"&&/Mac/.test(navigator.platform),pxe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Xn=0;Xn<10;Xn++)Mo[48+Xn]=Mo[96+Xn]=String(Xn);for(var Xn=1;Xn<=24;Xn++)Mo[Xn+111]="F"+Xn;for(var Xn=65;Xn<=90;Xn++)Mo[Xn]=String.fromCharCode(Xn+32),py[Xn]=String.fromCharCode(Xn);for(var Aw in Mo)py.hasOwnProperty(Aw)||(py[Aw]=Mo[Aw]);function mxe(t){var e=fxe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||pxe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?py:Mo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const gxe=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),yxe=typeof navigator<"u"&&/Win/.test(navigator.platform);function xxe(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,i,a;for(let l=0;l<e.length-1;l++){let d=e[l];
vendor: 16,749 bytes, line 140
140if(/^(cmd|meta|m)$/i.test(d))a=!0;else if(/^a(lt)?$/i.test(d))r=!0;else if(/^(c|ctrl|control)$/i.test(d))s=!0;else if(/^s(hift)?$/i.test(d))i=!0;else if(/^mod$/i.test(d))gxe?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+d)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function bxe(t){let e=Object.create(null);for(let n in t)e[xxe(n)]=t[n];return e}function Mw(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function vxe(t){return new Xt({props:{handleKeyDown:ZU(t)}})}function ZU(t){let e=bxe(t);return function(n,r){let s=mxe(r),i,a=e[Mw(s,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let l=e[Mw(s,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(yxe&&r.ctrlKey&&r.altKey)&&(i=Mo[r.keyCode])&&i!=s){let l=e[Mw(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}var wxe=Object.defineProperty,qC=(t,e)=>{for(var n in e)wxe(t,n,{get:e[n],enumerable:!0})};function Bx(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:s}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var Fx=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:s}=n,i=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...h)=>{const p=l(...h)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,a=[],l=!!t,d=t||s.tr,h=()=>(!l&&e&&!d.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(d),a.every(m=>m===!0)),p={...Object.fromEntries(Object.entries(n).map(([m,g])=>[m,(...v)=>{const S=this.buildProps(d,e),C=g(...v)(S);return a.push(C),p}])),run:h};return p}createCan(t){const{rawCommands:e,state:n}=this,r=!1,s=t||n.tr,i=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(e).map(([l,d])=>[l,(...h)=>d(...h)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,a={tr:t,editor:r,view:i,state:Bx({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,d])=>[l,(...h)=>d(...h)(a)]))}};return a}},eB={};qC(eB,{blur:()=>Sxe,clearContent:()=>kxe,clearNodes:()=>Cxe,command:()=>Nxe,createParagraphNear:()=>jxe,cut:()=>Exe,deleteCurrentNode:()=>Txe,deleteNode:()=>Axe,deleteRange:()=>Mxe,deleteSelection:()=>Oxe,enter:()=>Rxe,exitCode:()=>Dxe,extendMarkRange:()=>_xe,first:()=>Pxe,focus:()=>Ixe,forEach:()=>Uxe,insertContent:()=>Bxe,insertContentAt:()=>qxe,joinBackward:()=>Hxe,joinDown:()=>$xe,joinForward:()=>Kxe,joinItemBackward:()=>Wxe,joinItemForward:()=>Gxe,joinTextblockBackward:()=>Yxe,joinTextblockForward:()=>Qxe,joinUp:()=>Vxe,keyboardShortcut:()=>Jxe,lift:()=>Zxe,liftEmptyBlock:()=>ebe,liftListItem:()=>tbe,newlineInCode:()=>nbe,resetAttributes:()=>rbe,scrollIntoView:()=>sbe,selectAll:()=>ibe,selectNodeBackward:()=>abe,selectNodeForward:()=>obe,selectParentNode:()=>lbe,selectTextblockEnd:()=>cbe,selectTextblockStart:()=>ube,setContent:()=>dbe,setMark:()=>Rbe,setMeta:()=>Dbe,setNode:()=>_be,setNodeSelection:()=>Pbe,setTextDirection:()=>Lbe,setTextSelection:()=>Ibe,sinkListItem:()=>Ube,splitBlock:()=>Bbe,splitListItem:()=>Fbe,toggleList:()=>qbe,toggleMark:()=>Vbe,toggleNode:()=>$be,toggleWrap:()=>Hbe,undoInputRule:()=>Kbe,unsetAllMarks:()=>Wbe,unsetMark:()=>Gbe,unsetTextDirection:()=>Ybe,updateAttributes:()=>Qbe,wrapIn:()=>Xbe,wrapInList:()=>Jbe});var Sxe=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),kxe=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),Cxe=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:a})=>{t.doc.nodesBetween(i.pos,a.pos,(l,d)=>{if(l.type.isText)return;const{doc:h,mapping:p}=e,m=h.resolve(p.map(d)),g=h.resolve(p.map(d+l.nodeSize)),x=m.blockRange(g);if(!x)return;const v=cd(x);if(l.type.isTextblock){const{defaultType:S}=m.parent.contentMatchAt(m.index());e.setNodeMarkup(x.start,S)}(v||v===0)&&e.lift(x,v)})}),!0},Nxe=t=>e=>t(e),jxe=()=>({state:t,dispatch:e})=>pU(t,e),Exe=(t,e)=>({editor:n,tr:r})=>{const{state:s}=n,i=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,i.content),r.setSelection(new Ke(r.doc.resolve(Math.max(a-1,0)))),!0},Txe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const l=s.before(i),d=s.after(i);t.delete(l,d).scrollIntoView()}return!0}return!1};function Sn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var Axe=t=>({tr:e,state:n,dispatch:r})=>{const s=Sn(t,n.schema),i=e.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===s){if(r){const d=i.before(a),h=i.after(a);e.delete(d,h).scrollIntoView()}return!0}return!1},Mxe=t=>({tr:e,dispatch:n})=>{const{from:r,to:s}=t;return n&&e.delete(r,s),!0},Oxe=()=>({state:t,dispatch:e})=>TC(t,e),Rxe=()=>({commands:t})=>t.keyboardShortcut("Enter"),Dxe=()=>({state:t,dispatch:e})=>gge(t,e);function VC(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function my(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:VC(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function tB(t,e,n={}){return t.find(r=>r.type===e&&my(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function lD(t,e,n={}){return!!tB(t,e,n)}function $C(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(h=>h.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(h=>h.type===e))return;if(!n){const h=r.node.marks.find(p=>p.type===e);h&&(n=h.attrs)}if(!tB([...r.node.marks],e,n))return;let i=r.index,a=t.start()+r.offset,l=i+1,d=a+r.node.nodeSize;for(;i>0&&lD([...t.parent.child(i-1).marks],e,n);)i-=1,a-=t.parent.child(i).nodeSize;for(;l<t.parent.childCount&&lD([...t.parent.child(l).marks],e,n);)d+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:d}}function xa(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var _xe=(t,e)=>({tr:n,state:r,dispatch:s})=>{const i=xa(t,r.schema),{doc:a,selection:l}=n,{$from:d,from:h,to:p}=l;if(s){const m=$C(d,i,e);if(m&&m.from<=h&&m.to>=p){const g=Ke.create(a,m.from,m.to);n.setSelection(g)}}return!0},Pxe=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function nB(t){return t instanceof Ke}function jl(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function rB(t,e=null){if(!e)return null;const n=rt.atStart(t),r=rt.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const s=n.from,i=r.to;return e==="all"?Ke.create(t,jl(0,s,i),jl(t.content.size,s,i)):Ke.create(t,jl(e,s,i),jl(e,s,i))}function cD(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function gy(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Lxe(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var Ixe=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(gy()||cD())&&r.dom.focus(),Lxe()&&!gy()&&!cD()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!nB(n.state.selection))return a(),!0;const l=rB(s.doc,t)||n.state.selection,d=n.state.selection.eq(l);return i&&(d||s.setSelection(l),d&&s.storedMarks&&s.setStoredMarks(s.storedMarks),a()),!0},Uxe=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),Bxe=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),sB=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&sB(r)}return t};function Bm(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return sB(n)}function Cf(t,e,n){if(t instanceof So||t instanceof de)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return de.fromArray(t.map(l=>e.nodeFromJSON(l)));const a=e.nodeFromJSON(t);return n.errorOnInvalidContent&&a.check(),a}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Cf("",e,n)}if(s){if(n.errorOnInvalidContent){let a=!1,l="";const d=new z5({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:h=>(a=!0,l=typeof h=="string"?h:h.outerHTML,null)}]}})});if(n.slice?Hh.fromSchema(d).parseSlice(Bm(t),n.parseOptions):Hh.fromSchema(d).parse(Bm(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=Hh.fromSchema(e);return n.slice?i.parseSlice(Bm(t),n.parseOptions).content:i.parse(Bm(t),n.parseOptions)}return Cf("",e,n)}function Fxe(t,e,n){const r=t.steps.length-1;if(r<e)return;const s=t.steps[r];if(!(s instanceof bn||s instanceof Vn))return;const i=t.mapping.maps[r];let a=0;i.forEach((l,d,h,p)=>{a===0&&(a=p)}),t.setSelection(rt.near(t.doc.resolve(a),n))}var zxe=t=>!("type"in t),qxe=(t,e,n)=>({tr:r,dispatch:s,editor:i})=>{var a;if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const d=C=>{i.emit("contentError",{editor:i,error:C,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},h={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Cf(e,i.schema,{parseOptions:h,errorOnInvalidContent:!0})}catch(C){d(C)}try{l=Cf(e,i.schema,{parseOptions:h,errorOnInvalidContent:(a=n.errorOnInvalidContent)!=null?a:i.options.enableContentCheck})}catch(C){return d(C),!1}let{from:p,to:m}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},g=!0,x=!0;if((zxe(l)?l:[l]).forEach(C=>{C.check(),g=g?C.isText&&C.marks.length===0:!1,x=x?C.isBlock:!1}),p===m&&x){const{parent:C}=r.doc.resolve(p);C.isTextblock&&!C.type.spec.code&&!C.childCount&&(p-=1,m+=1)}let S;if(g){if(Array.isArray(e))S=e.map(C=>C.text||"").join("");else if(e instanceof de){let C="";e.forEach(j=>{j.text&&(C+=j.text)}),S=C}else typeof e=="object"&&e&&e.text?S=e.text:S=e;r.insertText(S,p,m)}else{S=l;const C=r.doc.resolve(p),j=C.node(),E=C.parentOffset===0,A=j.isText||j.isTextblock,D=j.content.size>0;E&&A&&D&&x&&(p=Math.max(0,p-1)),r.replaceWith(p,m,S)}n.updateSelection&&Fxe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:p,text:S}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:p,text:S})}return!0},Vxe=()=>({state:t,dispatch:e})=>fge(t,e),$xe=()=>({state:t,dispatch:e})=>pge(t,e),Hxe=()=>({state:t,dispatch:e})=>oU(t,e),Kxe=()=>({state:t,dispatch:e})=>dU(t,e),Wxe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Dx(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Gxe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Dx(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Yxe=()=>({state:t,dispatch:e})=>dge(t,e),Qxe=()=>({state:t,dispatch:e})=>hge(t,e);function iB(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Xxe(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,s,i,a;for(let l=0;l<e.length-1;l+=1){const d=e[l];if(/^(cmd|meta|m)$/i.test(d))a=!0;else if(/^a(lt)?$/i.test(d))r=!0;else if(/^(c|ctrl|control)$/i.test(d))s=!0;else if(/^s(hift)?$/i.test(d))i=!0;else if(/^mod$/i.test(d))gy()||iB()?a=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${d}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var Jxe=t=>({editor:e,view:n,tr:r,dispatch:s})=>{const i=Xxe(t).split(/-(?!$)/),a=i.find(h=>!["Alt","Ctrl","Meta","Shift"].includes(h)),l=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),d=e.captureTransaction(()=>{n.someProp("handleKeyDown",h=>h(n,l))});return d?.steps.forEach(h=>{const p=h.map(r.mapping);p&&s&&r.maybeStep(p)}),!0};function Oo(t,e,n={}){const{from:r,to:s,empty:i}=t.selection,a=e?Sn(e,t.schema):null,l=[];t.doc.nodesBetween(r,s,(m,g)=>{if(m.isText)return;const x=Math.max(r,g),v=Math.min(s,g+m.nodeSize);l.push({node:m,from:x,to:v})});const d=s-r,h=l.filter(m=>a?a.name===m.node.type.name:!0).filter(m=>my(m.node.attrs,n,{strict:!1}));return i?!!h.length:h.reduce((m,g)=>m+g.to-g.from,0)>=d}var Zxe=(t,e={})=>({state:n,dispatch:r})=>{const s=Sn(t,n.schema);return Oo(n,s,e)?mge(n,r):!1},ebe=()=>({state:t,dispatch:e})=>mU(t,e),tbe=t=>({state:e,dispatch:n})=>{const r=Sn(t,e.schema);return Ege(r)(e,n)},nbe=()=>({state:t,dispatch:e})=>fU(t,e);function zx(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function uD(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var rbe=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=null,a=null;const l=zx(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=Sn(t,r.schema)),l==="mark"&&(a=xa(t,r.schema));let d=!1;return n.selection.ranges.forEach(h=>{r.doc.nodesBetween(h.$from.pos,h.$to.pos,(p,m)=>{i&&i===p.type&&(d=!0,s&&n.setNodeMarkup(m,void 0,uD(p.attrs,e))),a&&p.marks.length&&p.marks.forEach(g=>{a===g.type&&(d=!0,s&&n.addMark(m,m+p.nodeSize,a.create(uD(g.attrs,e))))})})}),d},sbe=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),ibe=()=>({tr:t,dispatch:e})=>{if(e){const n=new ts(t.doc);t.setSelection(n)}return!0},abe=()=>({state:t,dispatch:e})=>cU(t,e),obe=()=>({state:t,dispatch:e})=>hU(t,e),lbe=()=>({state:t,dispatch:e})=>bge(t,e),cbe=()=>({state:t,dispatch:e})=>Sge(t,e),ube=()=>({state:t,dispatch:e})=>wge(t,e);function bS(t,e,n={},r={}){return Cf(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var dbe=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:a,commands:l})=>{const{doc:d}=i;if(r.preserveWhitespace!=="full"){const h=bS(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});return a&&i.replaceWith(0,d.content.size,h).setMeta("preventUpdate",!n),!0}return a&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:d.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function aB(t,e){const n=xa(e,t.schema),{from:r,to:s,empty:i}=t.selection,a=[];i?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,d=>{a.push(...d.marks)});const l=a.find(d=>d.type.name===n.name);return l?{...l.attrs}:{}}function oB(t,e){const n=new rU(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function hbe(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function fbe(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function pbe(t,e){for(let n=t.depth;
140n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function qx(t){return e=>pbe(e.$from,t)}function Ie(t,e,n){return t.config[e]===void 0&&t.parent?Ie(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ie(t.parent,e,n):null}):t.config[e]}function HC(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=Ie(e,"addExtensions",n);return r?[e,...HC(r())]:e}).flat(10)}function KC(t,e){const n=Zl.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function lB(t){return typeof t=="function"}function jt(t,e=void 0,...n){return lB(t)?e?t.bind(e)(...n):t(...n):t}function mbe(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Wu(t){const e=t.filter(s=>s.type==="extension"),n=t.filter(s=>s.type==="node"),r=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function cB(t){const e=[],{nodeExtensions:n,markExtensions:r}=Wu(t),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},a=n.filter(h=>h.name!=="text").map(h=>h.name),l=r.map(h=>h.name),d=[...a,...l];return t.forEach(h=>{const p={name:h.name,options:h.options,storage:h.storage,extensions:s},m=Ie(h,"addGlobalAttributes",p);if(!m)return;m().forEach(x=>{let v;Array.isArray(x.types)?v=x.types:x.types==="*"?v=d:x.types==="nodes"?v=a:x.types==="marks"?v=l:v=[],v.forEach(S=>{Object.entries(x.attributes).forEach(([C,j])=>{e.push({type:S,name:C,attribute:{...i,...j}})})})})}),s.forEach(h=>{const p={name:h.name,options:h.options,storage:h.storage},m=Ie(h,"addAttributes",p);if(!m)return;const g=m();Object.entries(g).forEach(([x,v])=>{const S={...i,...v};typeof S?.default=="function"&&(S.default=S.default()),S?.isRequired&&S?.default===void 0&&delete S.default,e.push({type:h.name,name:x,attribute:S})})}),e}function gbe(t){const e=[];let n="",r=!1,s=!1,i=0;const a=t.length;for(let l=0;l<a;l+=1){const d=t[l];if(d==="'"&&!s){r=!r,n+=d;continue}if(d==='"'&&!r){s=!s,n+=d;continue}if(!r&&!s){if(d==="("){i+=1,n+=d;continue}if(d===")"&&i>0){i-=1,n+=d;continue}if(d===";"&&i===0){e.push(n),n="";continue}}n+=d}return n&&e.push(n),e}function dD(t){const e=[],n=gbe(t||""),r=n.length;for(let s=0;s<r;s+=1){const i=n[s],a=i.indexOf(":");if(a===-1)continue;const l=i.slice(0,a).trim(),d=i.slice(a+1).trim();l&&d&&e.push([l,d])}return e}function cn(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const l=i?String(i).split(" "):[],d=r[s]?r[s].split(" "):[],h=l.filter(p=>!d.includes(p));r[s]=[...d,...h].join(" ")}else if(s==="style"){const l=new Map([...dD(r[s]),...dD(i)]);r[s]=Array.from(l.entries()).map(([d,h])=>`${d}: ${h}`).join("; ")}else r[s]=i}),r},{})}function Nf(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>cn(n,r),{})}function ybe(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function hD(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const s=e.reduce((i,a)=>{const l=a.attribute.parseHTML?a.attribute.parseHTML(n):ybe(n.getAttribute(a.name));return l==null?i:{...i,[a.name]:l}},{});return{...r,...s}}}}function fD(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&mbe(n)?!1:n!=null))}function pD(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function xbe(t,e){var n;const r=cB(t),{nodeExtensions:s,markExtensions:i}=Wu(t),a=(n=s.find(h=>Ie(h,"topNode")))==null?void 0:n.name,l=Object.fromEntries(s.map(h=>{const p=r.filter(j=>j.type===h.name),m={name:h.name,options:h.options,storage:h.storage,editor:e},g=t.reduce((j,E)=>{const A=Ie(E,"extendNodeSchema",m);return{...j,...A?A(h):{}}},{}),x=fD({...g,content:jt(Ie(h,"content",m)),marks:jt(Ie(h,"marks",m)),group:jt(Ie(h,"group",m)),inline:jt(Ie(h,"inline",m)),atom:jt(Ie(h,"atom",m)),selectable:jt(Ie(h,"selectable",m)),draggable:jt(Ie(h,"draggable",m)),code:jt(Ie(h,"code",m)),whitespace:jt(Ie(h,"whitespace",m)),linebreakReplacement:jt(Ie(h,"linebreakReplacement",m)),defining:jt(Ie(h,"defining",m)),isolating:jt(Ie(h,"isolating",m)),attrs:Object.fromEntries(p.map(pD))}),v=jt(Ie(h,"parseHTML",m));v&&(x.parseDOM=v.map(j=>hD(j,p)));const S=Ie(h,"renderHTML",m);S&&(x.toDOM=j=>S({node:j,HTMLAttributes:Nf(j,p)}));const C=Ie(h,"renderText",m);return C&&(x.toText=C),[h.name,x]})),d=Object.fromEntries(i.map(h=>{const p=r.filter(C=>C.type===h.name),m={name:h.name,options:h.options,storage:h.storage,editor:e},g=t.reduce((C,j)=>{const E=Ie(j,"extendMarkSchema",m);return{...C,...E?E(h):{}}},{}),x=fD({...g,inclusive:jt(Ie(h,"inclusive",m)),excludes:jt(Ie(h,"excludes",m)),group:jt(Ie(h,"group",m)),spanning:jt(Ie(h,"spanning",m)),code:jt(Ie(h,"code",m)),attrs:Object.fromEntries(p.map(pD))}),v=jt(Ie(h,"parseHTML",m));v&&(x.parseDOM=v.map(C=>hD(C,p)));const S=Ie(h,"renderHTML",m);return S&&(x.toDOM=C=>S({mark:C,HTMLAttributes:Nf(C,p)})),[h.name,x]}));return new z5({topNode:a,nodes:l,marks:d})}function bbe(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Yh(t){return t.sort((n,r)=>{const s=Ie(n,"priority")||100,i=Ie(r,"priority")||100;return s>i?-1:s<i?1:0})}function uB(t){const e=Yh(HC(t)),n=bbe(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function dB(t,e,n){const{from:r,to:s}=e,{blockSeparator:i=`
141
142`,textSerializers:a={}}=n||{};let l="";return t.nodesBetween(r,s,(d,h,p,m)=>{var g;d.isBlock&&h>r&&(l+=i);const x=a?.[d.type.name];if(x)return p&&(l+=x({node:d,pos:h,parent:p,index:m,range:e})),!1;d.isText&&(l+=(g=d?.text)==null?void 0:g.slice(Math.max(r,h)-h,s-h))}),l}function vbe(t,e){const n={from:0,to:t.content.size};return dB(t,n,e)}function hB(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function wbe(t,e){const n=Sn(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,l=>{i.push(l)});const a=i.reverse().find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function fB(t,e){const n=zx(typeof e=="string"?e:e.name,t.schema);return n==="node"?wbe(t,e):n==="mark"?aB(t,e):{}}function Sbe(t,e=JSON.stringify){const n={};return t.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function kbe(t){const e=Sbe(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,a)=>a!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function pB(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{const a=[];if(s.ranges.length)s.forEach((l,d)=>{a.push({from:l,to:d})});else{const{from:l,to:d}=n[i];if(l===void 0||d===void 0)return;a.push({from:l,to:d})}a.forEach(({from:l,to:d})=>{const h=e.slice(i).map(l,-1),p=e.slice(i).map(d),m=e.invert().map(h,-1),g=e.invert().map(p);r.push({oldRange:{from:m,to:g},newRange:{from:h,to:p}})})}),kbe(r)}function WC(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(s=>{const i=n.resolve(t),a=$C(i,s.type);a&&r.push({mark:s,...a})}):n.nodesBetween(t,e,(s,i)=>{!s||s?.nodeSize===void 0||r.push(...s.marks.map(a=>({from:i,to:i+s.nodeSize,mark:a})))}),r}var Cbe=(t,e,n,r=20)=>{const s=t.doc.resolve(n);let i=r,a=null;for(;i>0&&a===null;){const l=s.node(i);l?.type.name===e?a=l:i-=1}return[a,i]};function fh(t,e){return e.nodes[t]||e.marks[t]||null}function yg(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var Nbe=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,a,l)=>{var d,h;const p=((h=(d=s.type.spec).toText)==null?void 0:h.call(d,{node:s,pos:i,parent:a,index:l}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?p:p.slice(0,Math.max(0,r-i))}),n};function vS(t,e,n={}){const{empty:r,ranges:s}=t.selection,i=e?xa(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(m=>i?i.name===m.type.name:!0).find(m=>my(m.attrs,n,{strict:!1}));let a=0;const l=[];if(s.forEach(({$from:m,$to:g})=>{const x=m.pos,v=g.pos;t.doc.nodesBetween(x,v,(S,C)=>{if(i&&S.inlineContent&&!S.type.allowsMarkType(i))return!1;if(!S.isText&&!S.marks.length)return;const j=Math.max(x,C),E=Math.min(v,C+S.nodeSize),A=E-j;a+=A,l.push(...S.marks.map(D=>({mark:D,from:j,to:E})))})}),a===0)return!1;const d=l.filter(m=>i?i.name===m.mark.type.name:!0).filter(m=>my(m.mark.attrs,n,{strict:!1})).reduce((m,g)=>m+g.to-g.from,0),h=l.filter(m=>i?m.mark.type!==i&&m.mark.type.excludes(i):!0).reduce((m,g)=>m+g.to-g.from,0);return(d>0?d+h:d)>=a}function jbe(t,e,n={}){if(!e)return Oo(t,null,n)||vS(t,null,n);const r=zx(e,t.schema);return r==="node"?Oo(t,e,n):r==="mark"?vS(t,e,n):!1}var Ebe=(t,e)=>{const{$from:n,$to:r,$anchor:s}=t.selection;if(e){const i=qx(l=>l.type.name===e)(t.selection);if(!i)return!1;const a=t.doc.resolve(i.pos+1);return s.pos+1===a.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Tbe=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function mD(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Ow(t,e){const{nodeExtensions:n}=Wu(e),r=n.find(a=>a.name===t);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=jt(Ie(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function Vx(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;
vendor: 43,247 bytes, lines 142-215
142if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(Vx(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function mB(t){return t instanceof Fe}var gB=class yB{constructor(e){this.position=e}static fromJSON(e){return new yB(e.position)}toJSON(){return{position:this.position}}};function Abe(t,e){const n=e.mapping.mapResult(t.position);return{position:new gB(n.pos),mapResult:n}}function Mbe(t){return new gB(t)}function Obe(t,e,n){var r;const{selection:s}=e;let i=null;if(nB(s)&&(i=s.$cursor),i){const l=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(h=>h.type.excludes(n)))}const{ranges:a}=s;return a.some(({$from:l,$to:d})=>{let h=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,d.pos,(p,m,g)=>{if(h)return!1;if(p.isInline){const x=!g||g.type.allowsMarkType(n),v=!!n.isInSet(p.marks)||!p.marks.some(S=>S.type.excludes(n));h=x&&v}return!h}),h})}var Rbe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=n,{empty:a,ranges:l}=i,d=xa(t,r.schema);if(s)if(a){const h=aB(r,d);n.addStoredMark(d.create({...h,...e}))}else l.forEach(h=>{const p=h.$from.pos,m=h.$to.pos;r.doc.nodesBetween(p,m,(g,x)=>{const v=Math.max(x,p),S=Math.min(x+g.nodeSize,m);g.marks.find(j=>j.type===d)?g.marks.forEach(j=>{d===j.type&&n.addMark(v,S,d.create({...j.attrs,...e}))}):n.addMark(v,S,d.create(e))})});return Obe(r,n,d)},Dbe=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),_be=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const i=Sn(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:l})=>TR(i,{...a,...e})(n)?!0:l.clearNodes()).command(({state:l})=>TR(i,{...a,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Pbe=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,s=jl(t,0,r.content.size),i=Fe.create(r,s);e.setSelection(i)}return!0},Lbe=(t,e)=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=r;let a,l;return typeof e=="number"?(a=e,l=e):e&&"from"in e&&"to"in e?(a=e.from,l=e.to):(a=i.from,l=i.to),s&&n.doc.nodesBetween(a,l,(d,h)=>{d.isText||n.setNodeMarkup(h,void 0,{...d.attrs,dir:t})}),!0},Ibe=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,a=Ke.atStart(r).from,l=Ke.atEnd(r).to,d=jl(s,a,l),h=jl(i,a,l),p=Ke.create(r,d,h);e.setSelection(p)}return!0},Ube=t=>({state:e,dispatch:n})=>{const r=Sn(t,e.schema);return Mge(r)(e,n)};function gD(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(s=>e?.includes(s.type.name));t.tr.ensureMarks(r)}}var Bbe=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:i,doc:a}=e,{$from:l,$to:d}=i,h=s.extensionManager.attributes,p=yg(h,l.node().type.name,l.node().attrs);if(i instanceof Fe&&i.node.isBlock)return!l.parentOffset||!la(a,l.pos)?!1:(r&&(t&&gD(n,s.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const m=d.parentOffset===d.parent.content.size,g=l.depth===0?void 0:hbe(l.node(-1).contentMatchAt(l.indexAfter(-1)));let x=m&&g?[{type:g,attrs:p}]:void 0,v=la(e.doc,e.mapping.map(l.pos),1,x);if(!x&&!v&&la(e.doc,e.mapping.map(l.pos),1,g?[{type:g}]:void 0)&&(v=!0,x=g?[{type:g,attrs:p}]:void 0),r){if(v&&(i instanceof Ke&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,x),g&&!m&&!l.parentOffset&&l.parent.type!==g)){const S=e.mapping.map(l.before()),C=e.doc.resolve(S);l.node(-1).canReplaceWith(C.index(),C.index()+1,g)&&e.setNodeMarkup(e.mapping.map(l.before()),g)}t&&gD(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return v},Fbe=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{var a;const l=Sn(t,r.schema),{$from:d,$to:h}=r.selection,p=r.selection.node;if(p&&p.isBlock||d.depth<2||!d.sameParent(h))return!1;const m=d.node(-1);if(m.type!==l)return!1;const g=i.extensionManager.attributes;if(d.parent.content.size===0&&d.node(-1).childCount===d.indexAfter(-1)){if(d.depth===2||d.node(-3).type!==l||d.index(-2)!==d.node(-2).childCount-1)return!1;if(s){let j=de.empty;const E=d.index(-1)?1:d.index(-2)?2:3;for(let L=d.depth-E;L>=d.depth-3;L-=1)j=de.from(d.node(L).copy(j));const A=d.indexAfter(-1)<d.node(-2).childCount?1:d.indexAfter(-2)<d.node(-3).childCount?2:3,D={...yg(g,d.node().type.name,d.node().attrs),...e},M=((a=l.contentMatch.defaultType)==null?void 0:a.createAndFill(D))||void 0;j=j.append(de.from(l.createAndFill(null,M)||void 0));const I=d.before(d.depth-(E-1));n.replace(I,d.after(-A),new Ne(j,4-E,0));let _=-1;n.doc.nodesBetween(I,n.doc.content.size,(L,V)=>{if(_>-1)return!1;L.isTextblock&&L.content.size===0&&(_=V+1)}),_>-1&&n.setSelection(Ke.near(n.doc.resolve(_))),n.scrollIntoView()}return!0}const x=h.pos===d.end()?m.contentMatchAt(0).defaultType:null,v={...yg(g,m.type.name,m.attrs),...e},S={...yg(g,d.node().type.name,d.node().attrs),...e};n.delete(d.pos,h.pos);const C=x?[{type:l,attrs:v},{type:x,attrs:S}]:[{type:l,attrs:v}];if(!la(n.doc,d.pos,2))return!1;if(s){const{selection:j,storedMarks:E}=r,{splittableMarks:A}=i.extensionManager,D=E||j.$to.parentOffset&&j.$from.marks();if(n.split(d.pos,2,C).scrollIntoView(),!D||!s)return!0;const M=D.filter(I=>A.includes(I.type.name));n.ensureMarks(M)}return!0},Rw=(t,e)=>{const n=qx(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===s?.type&&Lo(t.doc,n.pos)&&t.join(n.pos),!0},Dw=(t,e)=>{const n=qx(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===s?.type&&Lo(t.doc,r)&&t.join(r),!0};function zbe(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),s=e.resolve(n.nodeSize-1);return Ke.between(r,s)}var qbe=(t,e,n,r={})=>({editor:s,tr:i,state:a,dispatch:l,chain:d,commands:h,can:p})=>{const{extensions:m,splittableMarks:g}=s.extensionManager,x=Sn(t,a.schema),v=Sn(e,a.schema),{selection:S,storedMarks:C}=a,{$from:j,$to:E}=S,A=j.blockRange(E),D=C||S.$to.parentOffset&&S.$from.marks();if(!A)return!1;const M=qx(ie=>Ow(ie.type.name,m))(S),I=S.from===0&&S.to===a.doc.content.size,_=a.doc.content.content,L=_.length===1?_[0]:null,V=I&&L&&Ow(L.type.name,m)?{node:L,pos:0}:null,B=M??V,K=!!M&&A.depth>=1&&A.depth-M.depth<=1,ee=!!V;if((K||ee)&&B){if(B.node.type===x)return I&&ee?d().command(({tr:ie,dispatch:se})=>{const he=zbe(ie);return he?(ie.setSelection(he),se&&se(ie),!0):!1}).liftListItem(v).run():h.liftListItem(v);if(Ow(B.node.type.name,m)&&x.validContent(B.node.content))return d().command(()=>(i.setNodeMarkup(B.pos,x),!0)).command(()=>Rw(i,x)).command(()=>Dw(i,x)).run()}return!n||!D||!l?d().command(()=>p().wrapInList(x,r)?!0:h.clearNodes()).wrapInList(x,r).command(()=>Rw(i,x)).command(()=>Dw(i,x)).run():d().command(()=>{const ie=p().wrapInList(x,r),se=D.filter(he=>g.includes(he.type.name));return i.ensureMarks(se),ie?!0:h.clearNodes()}).wrapInList(x,r).command(()=>Rw(i,x)).command(()=>Dw(i,x)).run()},Vbe=(t,e={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=n,a=xa(t,r.schema);return vS(r,a,e)?s.unsetMark(a,{extendEmptyMarkRange:i}):s.setMark(a,e)},$be=(t,e,n={})=>({state:r,commands:s})=>{const i=Sn(t,r.schema),a=Sn(e,r.schema),l=Oo(r,i,n);let d;return r.selection.$anchor.sameParent(r.selection.$head)&&(d=r.selection.$anchor.parent.attrs),l?s.setNode(a,d):s.setNode(i,{...d,...n})},Hbe=(t,e={})=>({state:n,commands:r})=>{const s=Sn(t,n.schema);return Oo(n,s,e)?r.lift(s):r.wrapIn(s,e)},Kbe=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){const a=t.tr,l=i.transform;for(let d=l.steps.length-1;d>=0;d-=1)a.step(l.steps[d].invert(l.docs[d]));if(i.text){const d=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,d))}else a.delete(i.from,i.to)}return!0}}return!1},Wbe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:s}=n;return r||e&&s.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},Gbe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:l}=n,d=xa(t,r.schema),{$from:h,empty:p,ranges:m}=l;if(!s)return!0;if(p&&a){let{from:g,to:x}=l;const v=(i=h.marks().find(C=>C.type===d))==null?void 0:i.attrs,S=$C(h,d,v);S&&(g=S.from,x=S.to),n.removeMark(g,x,d)}else m.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,d)});return n.removeStoredMark(d),!0},Ybe=t=>({tr:e,state:n,dispatch:r})=>{const{selection:s}=n;let i,a;return typeof t=="number"?(i=t,a=t):t&&"from"in t&&"to"in t?(i=t.from,a=t.to):(i=s.from,a=s.to),r&&e.doc.nodesBetween(i,a,(l,d)=>{if(l.isText)return;const h={...l.attrs};delete h.dir,e.setNodeMarkup(d,void 0,h)}),!0},Qbe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,a=null;const l=zx(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=Sn(t,r.schema)),l==="mark"&&(a=xa(t,r.schema));let d=!1;return n.selection.ranges.forEach(h=>{const p=h.$from.pos,m=h.$to.pos;let g,x,v,S;n.selection.empty?r.doc.nodesBetween(p,m,(C,j)=>{i&&i===C.type&&(d=!0,v=Math.max(j,p),S=Math.min(j+C.nodeSize,m),g=j,x=C)}):r.doc.nodesBetween(p,m,(C,j)=>{j<p&&i&&i===C.type&&(d=!0,v=Math.max(j,p),S=Math.min(j+C.nodeSize,m),g=j,x=C),j>=p&&j<=m&&(i&&i===C.type&&(d=!0,s&&n.setNodeMarkup(j,void 0,{...C.attrs,...e})),a&&C.marks.length&&C.marks.forEach(E=>{if(a===E.type&&(d=!0,s)){const A=Math.max(j,p),D=Math.min(j+C.nodeSize,m);n.addMark(A,D,a.create({...E.attrs,...e}))}}))}),x&&(g!==void 0&&s&&n.setNodeMarkup(g,void 0,{...x.attrs,...e}),a&&x.marks.length&&x.marks.forEach(C=>{a===C.type&&s&&n.addMark(v,S,a.create({...C.attrs,...e}))}))}),d},Xbe=(t,e={})=>({state:n,dispatch:r})=>{const s=Sn(t,n.schema);return kge(s,e)(n,r)},Jbe=(t,e={})=>({state:n,dispatch:r})=>{const s=Sn(t,n.schema);return Cge(s,e)(n,r)},Zbe=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},$x=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},e0e=(t,e)=>{if(VC(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Fm(t){var e;const{editor:n,from:r,to:s,text:i,rules:a,plugin:l}=t,{view:d}=n;if(d.composing)return!1;const h=d.state.doc.resolve(r);if(h.parent.type.spec.code||(e=h.nodeBefore||h.nodeAfter)!=null&&e.marks.find(g=>g.type.spec.code))return!1;let p=!1;const m=Nbe(h)+i;return a.forEach(g=>{if(p)return;const x=e0e(m,g.find);if(!x)return;const v=d.state.tr,S=Bx({state:d.state,transaction:v}),C={from:r-(x[0].length-i.length),to:s},{commands:j,chain:E,can:A}=new Fx({editor:n,state:S});g.handler({state:S,range:C,match:x,commands:j,chain:E,can:A})===null||!v.steps.length||(g.undoable&&v.setMeta(l,{transform:v,from:r,to:s,text:i}),d.dispatch(v),p=!0)}),p}function t0e(t){const{editor:e,rules:n}=t,r=new Xt({state:{init(){return null},apply(s,i,a){const l=s.getMeta(r);if(l)return l;const d=s.getMeta("applyInputRules");return d&&setTimeout(()=>{let{text:p}=d;typeof p=="string"?p=p:p=KC(de.from(p),a.schema);const{from:m}=d,g=m+p.length;Fm({editor:e,from:m,to:g,text:p,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,a,l){return Fm({editor:e,from:i,to:a,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&Fm({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:a}=s.state.selection;return a?Fm({editor:e,from:a.pos,to:a.pos,text:`
143`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function n0e(t){return Object.prototype.toString.call(t).slice(8,-1)}function zm(t){return n0e(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function xB(t,e){const n={...t};return zm(t)&&zm(e)&&Object.keys(e).forEach(r=>{zm(e[r])&&zm(t[r])?n[r]=xB(t[r],e[r]):n[r]=e[r]}),n}var GC=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...jt(Ie(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...jt(Ie(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>xB(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},ec=class bB extends GC{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new bB(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const a=s.marks();if(!!!a.find(h=>h?.type.name===n.name))return!1;const d=a.find(h=>h?.type.name===n.name);return d&&r.removeStoredMark(d),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function r0e(t){return typeof t=="number"}var s0e=class{constructor(t){this.find=t.find,this.handler=t.handler}},i0e=(t,e,n)=>{if(VC(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function a0e(t){const{editor:e,state:n,from:r,to:s,rule:i,pasteEvent:a,dropEvent:l}=t,{commands:d,chain:h,can:p}=new Fx({editor:e,state:n}),m=[];return n.doc.nodesBetween(r,s,(x,v)=>{var S,C,j,E,A;if((C=(S=x.type)==null?void 0:S.spec)!=null&&C.code||!(x.isText||x.isTextblock||x.isInline))return;const D=(A=(E=(j=x.content)==null?void 0:j.size)!=null?E:x.nodeSize)!=null?A:0,M=Math.max(r,v),I=Math.min(s,v+D);if(M>=I)return;const _=x.isText?x.text||"":x.textBetween(M-v,I-v,void 0,"");i0e(_,i.find,a).forEach(V=>{if(V.index===void 0)return;const B=M+V.index+1,K=B+V[0].length,ee={from:n.tr.mapping.map(B),to:n.tr.mapping.map(K)},ie=i.handler({state:n,range:ee,match:V,commands:d,chain:h,can:p,pasteEvent:a,dropEvent:l});m.push(ie)})}),m.every(x=>x!==null)}var qm=null,o0e=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function l0e(t){const{editor:e,rules:n}=t;let r=null,s=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const d=({state:p,from:m,to:g,rule:x,pasteEvt:v})=>{const S=p.tr,C=Bx({state:p,transaction:S});if(!(!a0e({editor:e,state:C,from:Math.max(m-1,0),to:g.b-1,rule:x,pasteEvent:v,dropEvent:l})||!S.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,S}};return n.map(p=>new Xt({view(m){const g=v=>{var S;r=(S=m.dom.parentElement)!=null&&S.contains(v.target)?m.dom.parentElement:null,r&&(qm=e)},x=()=>{qm&&(qm=null)};return window.addEventListener("dragstart",g),window.addEventListener("dragend",x),{destroy(){window.removeEventListener("dragstart",g),window.removeEventListener("dragend",x)}}},props:{handleDOMEvents:{drop:(m,g)=>{if(i=r===m.dom.parentElement,l=g,!i){const x=qm;x?.isEditable&&setTimeout(()=>{const v=x.state.selection;v&&x.commands.deleteRange({from:v.from,to:v.to})},10)}return!1},paste:(m,g)=>{var x;const v=(x=g.clipboardData)==null?void 0:x.getData("text/html");return a=g,s=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(m,g,x)=>{const v=m[0],S=v.getMeta("uiEvent")==="paste"&&!s,C=v.getMeta("uiEvent")==="drop"&&!i,j=v.getMeta("applyPasteRules"),E=!!j;if(!S&&!C&&!E)return;if(E){let{text:M}=j;typeof M=="string"?M=M:M=KC(de.from(M),x.schema);const{from:I}=j,_=I+M.length,L=o0e(M);return d({rule:p,state:x,from:I,to:{b:_},pasteEvt:L})}const A=g.doc.content.findDiffStart(x.doc.content),D=g.doc.content.findDiffEnd(x.doc.content);if(!(!r0e(A)||!D||A===D.b))return d({rule:p,state:x,from:A,to:D,pasteEvt:a})}}))}var Hx=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=uB(t),this.schema=xbe(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:fh(e.name,this.schema)},r=Ie(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Yh([...this.extensions].reverse()).flatMap(r=>{const s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:fh(r.name,this.schema)},i=[],a=Ie(r,"addKeyboardShortcuts",s);let l={};if(r.type==="mark"&&Ie(r,"exitable",s)&&(l.ArrowRight=()=>ec.handleExit({editor:t,mark:r})),a){const g=Object.fromEntries(Object.entries(a()).map(([x,v])=>[x,()=>v({editor:t})]));l={...l,...g}}const d=vxe(l);i.push(d);const h=Ie(r,"addInputRules",s);if(mD(r,t.options.enableInputRules)&&h){const g=h();if(g&&g.length){const x=t0e({editor:t,rules:g}),v=Array.isArray(x)?x:[x];i.push(...v)}}const p=Ie(r,"addPasteRules",s);if(mD(r,t.options.enablePasteRules)&&p){const g=p();if(g&&g.length){const x=l0e({editor:t,rules:g});i.push(...x)}}const m=Ie(r,"addProseMirrorPlugins",s);if(m){const g=m();i.push(...g)}return i})}get attributes(){return cB(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Wu(this.extensions);return Object.fromEntries(e.filter(n=>!!Ie(n,"addNodeView")).map(n=>{const r=this.attributes.filter(d=>d.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Sn(n.name,this.schema)},i=Ie(n,"addNodeView",s);if(!i)return[];const a=i();if(!a)return[];const l=(d,h,p,m,g)=>{const x=Nf(d,r);return a({node:d,view:h,getPos:p,decorations:m,innerDecorations:g,editor:t,extension:n,HTMLAttributes:x})};return[n.name,l]}))}dispatchTransaction(t){const{editor:e}=this;return Yh([...this.extensions].reverse()).reduceRight((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:fh(s.name,this.schema)},a=Ie(s,"dispatchTransaction",i);return a?l=>{a.call(i,{transaction:l,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Yh([...this.extensions]).reduce((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:fh(s.name,this.schema)},a=Ie(s,"transformPastedHTML",i);return a?(l,d)=>{const h=r(l,d);return a.call(i,h)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Wu(this.extensions);return Object.fromEntries(e.filter(n=>!!Ie(n,"addMarkView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:xa(n.name,this.schema)},i=Ie(n,"addMarkView",s);if(!i)return[];const a=(l,d,h)=>{const p=Nf(l,r);return i()({mark:l,view:d,inline:h,editor:t,extension:n,HTMLAttributes:p,updateAttributes:m=>{k0e(l,t,m)}})};return[n.name,a]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:fh(e.name,this.schema)};e.type==="mark"&&((n=jt(Ie(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const s=Ie(e,"onBeforeCreate",r),i=Ie(e,"onCreate",r),a=Ie(e,"onUpdate",r),l=Ie(e,"onSelectionUpdate",r),d=Ie(e,"onTransaction",r),h=Ie(e,"onFocus",r),p=Ie(e,"onBlur",r),m=Ie(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),d&&this.editor.on("transaction",d),h&&this.editor.on("focus",h),p&&this.editor.on("blur",p),m&&this.editor.on("destroy",m)})}};Hx.resolve=uB;Hx.sort=Yh;Hx.flatten=HC;var c0e={};qC(c0e,{ClipboardTextSerializer:()=>wB,Commands:()=>SB,Delete:()=>kB,Drop:()=>CB,Editable:()=>NB,FocusEvents:()=>EB,Keymap:()=>TB,Paste:()=>AB,Tabindex:()=>MB,TextDirection:()=>OB,focusEventsPluginKey:()=>jB});var un=class vB extends GC{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new vB(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},wB=un.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Xt({key:new Dn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,{ranges:i}=s,a=Math.min(...i.map(p=>p.$from.pos)),l=Math.max(...i.map(p=>p.$to.pos)),d=hB(n);return dB(r,{from:a,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:d})}}})]}}),SB=un.create({name:"commands",addCommands(){return{...eB}}}),kB=un.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,s;const i=()=>{var a,l,d,h;if((h=(d=(l=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:l.filterTransaction)==null?void 0:d.call(l,t))!=null?h:t.getMeta("y-sync$"))return;const p=oB(t.before,[t,...e]);pB(p).forEach(x=>{p.mapping.mapResult(x.oldRange.from).deletedAfter&&p.mapping.mapResult(x.oldRange.to).deletedBefore&&p.before.nodesBetween(x.oldRange.from,x.oldRange.to,(v,S)=>{const C=S+v.nodeSize-2,j=x.oldRange.from<=S&&C<=x.oldRange.to;this.editor.emit("delete",{type:"node",node:v,from:S,to:C,newFrom:p.mapping.map(S),newTo:p.mapping.map(C),deletedRange:x.oldRange,newRange:x.newRange,partial:!j,editor:this.editor,transaction:t,combinedTransform:p})})});const g=p.mapping;p.steps.forEach((x,v)=>{var S,C;if(x instanceof Ks){const j=g.slice(v).map(x.from,-1),E=g.slice(v).map(x.to),A=g.invert().map(j,-1),D=g.invert().map(E),M=j>0?(S=p.doc.nodeAt(j-1))==null?void 0:S.marks.some(_=>_.eq(x.mark)):!1,I=(C=p.doc.nodeAt(E))==null?void 0:C.marks.some(_=>_.eq(x.mark));this.editor.emit("delete",{type:"mark",mark:x.mark,from:x.from,to:x.to,deletedRange:{from:A,to:D},newRange:{from:j,to:E},partial:!!(I||M),editor:this.editor,transaction:t,combinedTransform:p})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(i,0):i()}}),CB=un.create({name:"drop",addProseMirrorPlugins(){return[new Xt({key:new Dn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),NB=un.create({name:"editable",addProseMirrorPlugins(){return[new Xt({key:new Dn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),jB=new Dn("focusEvents"),EB=un.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Xt({key:jB,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),TB=un.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:l})=>{const{selection:d,doc:h}=l,{empty:p,$anchor:m}=d,{pos:g,parent:x}=m,v=m.parent.isTextblock&&g>0?l.doc.resolve(g-1):m,S=v.parent.type.spec.isolating,C=m.pos-m.parentOffset,j=S&&v.parent.childCount===1?C===m.pos:rt.atStart(h).from===g;return!p||!x.type.isTextblock||x.textContent.length||!j||j&&m.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return gy()||iB()?i:s},addProseMirrorPlugins(){return[new Xt({key:new Dn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(S=>S.getMeta("composition")))return;const r=t.some(S=>S.docChanged)&&!e.doc.eq(n.doc),s=t.some(S=>S.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:a,to:l}=e.selection,d=rt.atStart(e.doc).from,h=rt.atEnd(e.doc).to;if(i||!(a===d&&l===h)||!Vx(n.doc))return;const g=n.tr,x=Bx({state:n,transaction:g}),{commands:v}=new Fx({editor:this.editor,state:x});if(v.clearNodes(),!!g.steps.length)return g}})]}}),AB=un.create({name:"paste",addProseMirrorPlugins(){return[new Xt({key:new Dn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),MB=un.create({name:"tabindex",addProseMirrorPlugins(){return[new Xt({key:new Dn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),OB=un.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Wu(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Xt({key:new Dn("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),u0e=class Eh{constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Eh(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Eh(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Eh(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,a=n.isInline,l=this.pos+r+(i?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;const d=this.resolvedPos.doc.resolve(l);if(!s&&!a&&d.depth<=this.depth)return;const h=new Eh(d,this.editor,s,s||a?n:null);s&&(h.actualDepth=this.depth+1),e.push(h)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){const i=s.node.attrs,a=Object.keys(n);for(let l=0;l<a.length;l+=1){const d=a[l];if(i[d]!==n[d])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(n);return this.children.forEach(a=>{r&&s.length>0||(a.node.type.name===e&&i.every(d=>n[d]===a.node.attrs[d])&&s.push(a),!(r&&s.length>0)&&(s=s.concat(a.querySelectorAll(e,n,r))))}),s}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},d0e=`.ProseMirror {
144  position: relative;
145}
146
147.ProseMirror {
148  word-wrap: break-word;
149  white-space: pre-wrap;
150  white-space: break-spaces;
151  -webkit-font-variant-ligatures: none;
152  font-variant-ligatures: none;
153  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
154}
155
156.ProseMirror [contenteditable="false"] {
157  white-space: normal;
158}
159
160.ProseMirror [contenteditable="false"] [contenteditable="true"] {
161  white-space: pre-wrap;
162}
163
164.ProseMirror pre {
165  white-space: pre-wrap;
166}
167
168img.ProseMirror-separator {
169  display: inline !important;
170  border: none !important;
171  margin: 0 !important;
172  width: 0 !important;
173  height: 0 !important;
174}
175
176.ProseMirror-gapcursor {
177  display: none;
178  pointer-events: none;
179  position: absolute;
180  margin: 0;
181}
182
183.ProseMirror-gapcursor:after {
184  content: "";
185  display: block;
186  position: absolute;
187  top: -2px;
188  width: 20px;
189  border-top: 1px solid black;
190  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
191}
192
193@keyframes ProseMirror-cursor-blink {
194  to {
195    visibility: hidden;
196  }
197}
198
199.ProseMirror-hideselection *::selection {
200  background: transparent;
201}
202
203.ProseMirror-hideselection *::-moz-selection {
204  background: transparent;
205}
206
207.ProseMirror-hideselection * {
208  caret-color: transparent;
209}
210
211.ProseMirror-focused .ProseMirror-gapcursor {
212  display: block;
213}`;function h0e(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}var f0e=class extends Zbe{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:s})=>{throw s},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Abe,createMappablePosition:Mbe},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:s,slice:i,moved:a})=>this.options.onDrop(s,i,a)),this.on("paste",({event:s,slice:i})=>this.options.onPaste(s,i)),this.on("delete",this.options.onDelete);const n=this.createDoc(),r=rB(n,this.options.autofocus);this.editorState=Cu.create({doc:n,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=h0e(d0e,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,n)=>{if(this.editorView)return this.editorView[n];if(n==="state")return this.editorState;if(n in e)return Reflect.get(e,n);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${n}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,n){const r=lB(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const a=typeof i=="string"?`${i}$`:i.key;r=r.filter(l=>!l.key.startsWith(a))}),n.length===r.length)return;const s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}createExtensionManager(){var e,n;const s=[...this.options.enableCoreExtensions?[NB,wB.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:n.blockSeparator}),SB,EB,TB,MB,CB,AB,kB,OB.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new Hx(s,this)}createCommandManager(){this.commandManager=new Fx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=bS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(n){if(!(n instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(n.message))throw n;this.emit("contentError",{editor:this,error:n,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),e=bS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){const{editorProps:n,enableExtensionDispatchTransaction:r}=this.options,s=n.dispatchTransaction||this.dispatchTransaction.bind(this),i=r?this.extensionManager.dispatchTransaction(s):s,a=n.transformPastedHTML,l=this.extensionManager.transformPastedHTML(a);this.editorView=new JU(e,{...n,attributes:{role:"textbox",...n?.attributes},dispatchTransaction:i,transformPastedHTML:l,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const d=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(d),this.prependClass(),this.injectCSS();const h=this.view.dom;h.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(p=>{var m;return(m=this.capturedTransaction)==null?void 0:m.step(p)});return}const{state:n,transactions:r}=this.state.applyTransaction(e),s=!this.state.selection.eq(n.selection),i=r.includes(e),a=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),!i)return;this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:r.slice(1)}),s&&this.emit("selectionUpdate",{editor:this,transaction:e});const l=r.findLast(p=>p.getMeta("focus")||p.getMeta("blur")),d=l?.getMeta("focus"),h=l?.getMeta("blur");d&&this.emit("focus",{editor:this,event:d.event,transaction:l}),h&&this.emit("blur",{editor:this,event:h.event,transaction:l}),!(e.getMeta("preventUpdate")||!r.some(p=>p.docChanged)||a.doc.eq(n.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:r.slice(1)})}getAttributes(e){return fB(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,s=typeof e=="string"?n:e;return jbe(this.state,r,s)}getJSON(){return this.state.doc.toJSON()}getHTML(){return KC(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
214
215`,textSerializers:r={}}=e||{};return vbe(this.state.doc,{blockSeparator:n,textSerializers:{...hB(this.schema),...r}})}get isEmpty(){return Vx(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,n;return(n=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?n:!0}$node(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new u0e(n,this)}get $doc(){return this.$pos(0)}};function Gu(t){return new $x({find:t.find,handler:({state:e,range:n,match:r})=>{const s=jt(t.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,a=r[r.length-1],l=r[0];if(a){const d=l.search(/\S/),h=n.from+l.indexOf(a),p=h+a.length;if(WC(n.from,n.to,e.doc).filter(x=>x.mark.type.excluded.find(S=>S===t.type&&S!==x.mark.type)).filter(x=>x.to>h).length)return null;p<n.to&&i.delete(p,n.to),h>n.from&&i.delete(n.from+d,h);const g=n.from+d+a.length;i.addMark(n.from+d,g,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function RB(t){return new $x({find:t.find,handler:({state:e,range:n,match:r})=>{const s=jt(t.getAttributes,void 0,r)||{},{tr:i}=e,a=n.from;let l=n.to;const d=t.type.create(s);if(r[1]){const h=r[0].lastIndexOf(r[1]);let p=a+h;p>l?p=l:l=p+r[1].length;const m=r[0][r[0].length-1];i.insertText(m,a+r[0].length-1),i.replaceWith(p,l,d)}else if(r[0]){const h=t.type.isInline?a:a-1;i.insert(h,t.type.create(s)).delete(i.mapping.map(a),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function wS(t){return new $x({find:t.find,handler:({state:e,range:n,match:r})=>{const s=e.doc.resolve(n.from),i=jt(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Yu(t){return new $x({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{const i=jt(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),d=a.doc.resolve(n.from).blockRange(),h=d&&jC(d,t.type,i);if(!h)return null;if(a.wrap(d,h),t.keepMarks&&t.editor){const{selection:m,storedMarks:g}=e,{splittableMarks:x}=t.editor.extensionManager,v=g||m.$to.parentOffset&&m.$from.marks();if(v){const S=v.filter(C=>x.includes(C.type.name));a.ensureMarks(S)}}if(t.keepAttributes){const m=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(m,i).run()}const p=a.doc.resolve(n.from-1).nodeBefore;p&&p.type===t.type&&Lo(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,p))&&a.join(n.from-1)},undoable:t.undoable})}var p0e=t=>"touches"in t,m0e=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;const d=l.clientX-this.startX,h=l.clientY-this.startY;this.handleResize(d,h)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;const d=l.touches[0];if(!d)return;const h=d.clientX-this.startX,p=d.clientY-this.startY;this.handleResize(h,p)},this.handleMouseUp=()=>
215{if(!this.isResizing)return;const l=this.element.offsetWidth,d=this.element.offsetHeight;this.onCommit(l,d),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,s,i,a;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t?.options)!=null&&r.directions&&(this.directions=t.options.directions),(s=t.options)!=null&&s.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(i=t.options)!=null&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(a=t.options)!=null&&a.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),s=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),s&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}
215removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,p0e(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:s}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,s,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,s=this.startHeight;const i=t.includes("right"),a=t.includes("left"),l=t.includes("bottom"),d=t.includes("top");return i?r=this.startWidth+e:a&&(r=this.startWidth-e),l?s=this.startHeight+n:d&&(s=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(s=this.startHeight+(l?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,s,t):{width:r,height:s}}applyConstraints(t,e,n){var r,s,i,a;if(!n){let h=Math.max(this.minSize.width,t),p=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(h=Math.min(this.maxSize.width,h)),(s=this.maxSize)!=null&&s.height&&(p=Math.min(this.maxSize.height,p)),{width:h,height:p}}let l=t,d=e;return l<this.minSize.width&&(l=this.minSize.width,d=l/this.aspectRatio),d<this.minSize.height&&(d=this.minSize.height,l=d*this.aspectRatio),(i=this.maxSize)!=null&&i.width&&l>this.maxSize.width&&(l=this.maxSize.width,d=l/this.aspectRatio),(a=this.maxSize)!=null&&a.height&&d>this.maxSize.height&&(d=this.maxSize.height,l=d*this.aspectRatio),{width:l,height:d}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",s=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:s?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function g0e(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Fe){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){const i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}var y0e={};qC(y0e,{createAtomBlockMarkdownSpec:()=>x0e,createBlockMarkdownSpec:()=>b0e,createInlineMarkdownSpec:()=>S0e,parseAttributes:()=>YC,parseIndentedBlocks:()=>SS,renderNestedMarkdownContent:()=>XC,serializeAttributes:()=>QC});function YC(t){if(!t?.trim())return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,h=>(n.push(h),`__QUOTED_${n.length-1}__`)),s=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(s){const h=s.map(p=>p.trim().slice(1));e.class=h.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(a)).forEach(([,h,p])=>{var m;const g=parseInt(((m=p.match(/__QUOTED_(\d+)__/))==null?void 0:m[1])||"0",10),x=n[g];x&&(e[h]=x.slice(1,-1))});const d=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();
vendor: 5,588 bytes, lines 215-227
215return d&&d.split(/\s+/).filter(Boolean).forEach(p=>{p.match(/^[a-zA-Z][\w-]*$/)&&(e[p]=!0)}),e}function QC(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function x0e(t){const{nodeName:e,name:n,parseAttributes:r=YC,serializeAttributes:s=QC,defaultAttributes:i={},requiredAttributes:a=[],allowedAttributes:l}=t,d=n||e,h=p=>{if(!l)return p;const m={};return l.forEach(g=>{g in p&&(m[g]=p[g])}),m};return{parseMarkdown:(p,m)=>{const g={...i,...p.attributes};return m.createNode(e,g,[])},markdownTokenizer:{name:e,level:"block",start(p){var m;const g=new RegExp(`^:::${d}(?:\\s|$)`,"m"),x=(m=p.match(g))==null?void 0:m.index;return x!==void 0?x:-1},tokenize(p,m,g){const x=new RegExp(`^:::${d}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),v=p.match(x);if(!v)return;const S=v[1]||"",C=r(S);if(!a.find(E=>!(E in C)))return{type:e,raw:v[0],attributes:C}}},renderMarkdown:p=>{const m=h(p.attrs||{}),g=s(m),x=g?` {${g}}`:"";return`:::${d}${x} :::`}}}function b0e(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=YC,serializeAttributes:i=QC,defaultAttributes:a={},content:l="block",allowedAttributes:d}=t,h=n||e,p=m=>{if(!d)return m;const g={};return d.forEach(x=>{x in m&&(g[x]=m[x])}),g};return{parseMarkdown:(m,g)=>{let x;if(r){const S=r(m);x=typeof S=="string"?[{type:"text",text:S}]:S}else l==="block"?x=g.parseChildren(m.tokens||[]):x=g.parseInline(m.tokens||[]);const v={...a,...m.attributes};return g.createNode(e,v,x)},markdownTokenizer:{name:e,level:"block",start(m){var g;const x=new RegExp(`^:::${h}`,"m"),v=(g=m.match(x))==null?void 0:g.index;return v!==void 0?v:-1},tokenize(m,g,x){var v;const S=new RegExp(`^:::${h}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),C=m.match(S);if(!C)return;const[j,E=""]=C,A=s(E);let D=1;const M=j.length;let I="";const _=/^:::([\w-]*)(\s.*)?/gm,L=m.slice(M);for(_.lastIndex=0;;){const V=_.exec(L);if(V===null)break;const B=V.index,K=V[1];if(!((v=V[2])!=null&&v.endsWith(":::"))){if(K)D+=1;else if(D-=1,D===0){const ee=L.slice(0,B);I=ee.trim();const ie=m.slice(0,M+B+V[0].length);let se=[];if(I)if(l==="block")for(se=x.blockTokens(ee),se.forEach(he=>{he.text&&(!he.tokens||he.tokens.length===0)&&(he.tokens=x.inlineTokens(he.text))});se.length>0;){const he=se[se.length-1];if(he.type==="paragraph"&&(!he.text||he.text.trim()===""))se.pop();else break}else se=x.inlineTokens(I);return{type:e,raw:ie,attributes:A,content:I,tokens:se}}}}}},renderMarkdown:(m,g)=>{const x=p(m.attrs||{}),v=i(x),S=v?` {${v}}`:"",C=g.renderChildren(m.content||[],`
216
217`);return`:::${h}${S}
218
219${C}
220
221:::`}}}function v0e(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,s,i,a]=r;e[s]=i||a,r=n.exec(t)}return e}function w0e(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function S0e(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=v0e,serializeAttributes:i=w0e,defaultAttributes:a={},selfClosing:l=!1,allowedAttributes:d}=t,h=n||e,p=g=>{if(!d)return g;const x={};return d.forEach(v=>{const S=typeof v=="string"?v:v.name,C=typeof v=="string"?void 0:v.skipIfDefault;if(S in g){const j=g[S];if(C!==void 0&&j===C)return;x[S]=j}}),x},m=h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(g,x)=>{const v={...a,...g.attributes};if(l)return x.createNode(e,v);const S=r?r(g):g.content||"";return S?x.createNode(e,v,[x.createTextNode(S)]):x.createNode(e,v,[])},markdownTokenizer:{name:e,level:"inline",start(g){const x=l?new RegExp(`\\[${m}\\s*[^\\]]*\\]`):new RegExp(`\\[${m}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${m}\\]`),v=g.match(x),S=v?.index;return S!==void 0?S:-1},tokenize(g,x,v){const S=l?new RegExp(`^\\[${m}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${m}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${m}\\]`),C=g.match(S);if(!C)return;let j="",E="";if(l){const[,D]=C;E=D}else{const[,D,M]=C;E=D,j=M||""}const A=s(E.trim());return{type:e,raw:C[0],content:j.trim(),attributes:A}}},renderMarkdown:g=>{let x="";r?x=r(g):g.content&&g.content.length>0&&(x=g.content.filter(j=>j.type==="text").map(j=>j.text).join(""));const v=p(g.attrs||{}),S=i(v),C=S?` ${S}`:"";return l?`[${h}${C}]`:`[${h}${C}]${x}[/${h}]`}}}function SS(t,e,n){var r,s,i,a;const l=t.split(`
222`),d=[];let h="",p=0;const m=e.baseIndentSize||2;for(;p<l.length;){const g=l[p],x=g.match(e.itemPattern);if(!x){if(d.length>0)break;if(g.trim()===""){p+=1,h=`${h}${g}
223`;continue}else return}const v=e.extractItemData(x),{indentLevel:S,mainContent:C}=v;h=`${h}${g}
224`;const j=[C];for(p+=1;p<l.length;){const M=l[p];if(M.trim()===""){const _=l.slice(p+1).findIndex(B=>B.trim()!=="");if(_===-1)break;if((((s=(r=l[p+1+_].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:s.length)||0)>S){j.push(M),h=`${h}${M}
225`,p+=1;continue}else break}if((((a=(i=M.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:a.length)||0)>S)j.push(M),h=`${h}${M}
226`,p+=1;else break}let E;const A=j.slice(1);if(A.length>0){const M=A.map(I=>I.slice(S+m)).join(`
227`);M.trim()&&(e.customNestedParser?E=e.customNestedParser(M):E=n.blockTokens(M))}const D=e.createToken(v,E);d.push(D)}if(d.length!==0)return{items:d,raw:h}}function XC(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const s=typeof n=="function"?n(r):n,[i,...a]=t.content,l=e.renderChildren([i]);let d=`${s}${l}`;return a&&a.length>0&&a.forEach((h,p)=>{var m,g;const x=(g=(m=e.renderChild)==null?void 0:m.call(e,h,p+1))!=null?g:e.renderChildren([h]);
227if(x!=null){const v=x.split(`
228`).map(S=>S?e.indent(S):e.indent("")).join(`
229`);d+=h.type==="paragraph"?`
230
231${v}`:`
232${v}`}}),d}function k0e(t,e,n={}){const{state:r}=e,{doc:s,tr:i}=r,a=t;s.descendants((l,d)=>{const h=i.mapping.map(d),p=i.mapping.map(d)+l.nodeSize;let m=null;if(l.marks.forEach(x=>{if(x!==a)return!1;m=x}),!m)return;let g=!1;if(Object.keys(n).forEach(x=>{n[x]!==m.attrs[x]&&(g=!0)}),g){const x=t.type.create({...t.attrs,...n});i.removeMark(h,p,t.type),i.addMark(h,p,x)}}),i.docChanged&&e.view.dispatch(i)}var Fr=class DB extends GC{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new DB(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Kl(t){return new s0e({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{const i=jt(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:a}=e,l=r[r.length-1],d=r[0];let h=n.to;if(l){const p=d.search(/\S/),m=n.from+d.indexOf(l),g=m+l.length;if(WC(n.from,n.to,e.doc).filter(S=>S.mark.type.excluded.find(j=>j===t.type&&j!==S.mark.type)).filter(S=>S.to>m).length)return null;g<n.to&&a.delete(g,n.to),m>n.from&&a.delete(n.from+p,m),h=n.from+p+l.length,a.addMark(n.from+p,h,t.type.create(i||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||a.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:C0e,getOwnPropertySymbols:N0e}=Object,{hasOwnProperty:j0e}=Object.prototype;function _w(t,e){return function(r,s,i){return t(r,s,i)&&e(r,s,i)}}function Vm(t){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,s);const{cache:i}=s,a=i.get(n),l=i.get(r);if(a&&l)return a===r&&l===n;i.set(n,r),i.set(r,n);const d=t(n,r,s);return i.delete(n),i.delete(r),d}}function E0e(t){return t?.[Symbol.toStringTag]}function yD(t){return C0e(t).concat(N0e(t))}const T0e=Object.hasOwn||((t,e)=>j0e.call(t,e));function tc(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const A0e="__v",M0e="__o",O0e="_owner",{getOwnPropertyDescriptor:xD,keys:bD}=Object;function R0e(t,e){return t.byteLength===e.byteLength&&yy(new Uint8Array(t),new Uint8Array(e))}function D0e(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function _0e(t,e){return t.byteLength===e.byteLength&&yy(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function P0e(t,e){return tc(t.getTime(),e.getTime())}function L0e(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function I0e(t,e){return t===e}function vD(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.entries();let a,l,d=0;for(;(a=i.next())&&!a.done;){const h=e.entries();let p=!1,m=0;for(;(l=h.next())&&!l.done;){if(s[m]){m++;continue}const g=a.value,x=l.value;if(n.equals(g[0],x[0],d,m,t,e,n)&&n.equals(g[1],x[1],g[0],x[0],t,e,n)){p=s[m]=!0;break}m++}if(!p)return!1;d++}return!0}const U0e=tc;function B0e(t,e,n){const r=bD(t);let s=r.length;if(bD(e).length!==s)return!1;for(;s-- >0;)if(!_B(t,e,n,r[s]))return!1;return!0}function ph(t,e,n){const r=yD(t);let s=r.length;if(yD(e).length!==s)return!1;let i,a,l;for(;s-- >0;)if(i=r[s],!_B(t,e,n,i)||(a=xD(t,i),l=xD(e,i),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function F0e(t,e){return tc(t.valueOf(),e.valueOf())}function z0e(t,e){return t.source===e.source&&t.flags===e.flags}function wD(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.values();let a,l;for(;(a=i.next())&&!a.done;){const d=e.values();let h=!1,p=0;for(;(l=d.next())&&!l.done;){if(!s[p]&&n.equals(a.value,l.value,a.value,l.value,t,e,n)){h=s[p]=!0;break}p++}if(!h)return!1}return!0}function yy(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function q0e(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function _B(t,e,n,r){return(r===O0e||r===M0e||r===A0e)&&(t.$$typeof||e.$$typeof)?!0:T0e(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const V0e="[object ArrayBuffer]",$0e="[object Arguments]",H0e="[object Boolean]",K0e="[object DataView]",W0e="[object Date]",G0e="[object Error]",Y0e="[object Map]",Q0e="[object Number]",X0e="[object Object]",J0e="[object RegExp]",Z0e="[object Set]",eve="[object String]",tve={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
232]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},nve="[object URL]",rve=Object.prototype.toString;function sve({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:l,areObjectsEqual:d,arePrimitiveWrappersEqual:h,areRegExpsEqual:p,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:x,unknownTagComparators:v}){return function(C,j,E){if(C===j)return!0;if(C==null||j==null)return!1;const A=typeof C;if(A!==typeof j)return!1;if(A!=="object")return A==="number"?l(C,j,E):A==="function"?i(C,j,E):!1;const D=C.constructor;if(D!==j.constructor)return!1;if(D===Object)return d(C,j,E);if(Array.isArray(C))return e(C,j,E);if(D===Date)return r(C,j,E);if(D===RegExp)return p(C,j,E);if(D===Map)return a(C,j,E);if(D===Set)return m(C,j,E);const M=rve.call(C);if(M===W0e)return r(C,j,E);if(M===J0e)return p(C,j,E);if(M===Y0e)return a(C,j,E);if(M===Z0e)return m(C,j,E);if(M===X0e)return typeof C.then!="function"&&typeof j.then!="function"&&d(C,j,E);if(M===nve)return x(C,j,E);if(M===G0e)return s(C,j,E);if(M===$0e)return d(C,j,E);if(tve[M])return g(C,j,E);if(M===V0e)return t(C,j,E);if(M===K0e)return n(C,j,E);if(M===H0e||M===Q0e||M===eve)return h(C,j,E);if(v){let I=v[M];if(!I){const _=E0e(C);_&&(I=v[_])}if(I)return I(C,j,E)}return!1}}function ive({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:R0e,areArraysEqual:n?ph:D0e,areDataViewsEqual:_0e,areDatesEqual:P0e,areErrorsEqual:L0e,areFunctionsEqual:I0e,areMapsEqual:n?_w(vD,ph):vD,areNumbersEqual:U0e,areObjectsEqual:n?ph:B0e,arePrimitiveWrappersEqual:F0e,areRegExpsEqual:z0e,areSetsEqual:n?_w(wD,ph):wD,areTypedArraysEqual:n?_w(yy,ph):yy,areUrlsEqual:q0e,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const s=Vm(r.areArraysEqual),i=Vm(r.areMapsEqual),a=Vm(r.areObjectsEqual),l=Vm(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:a,areSetsEqual:l})}return r}function ave(t){return function(e,n,r,s,i,a,l){return t(e,n,l)}}function ove({circular:t,comparator:e,createState:n,equals:r,strict:s}){if(n)return function(l,d){const{cache:h=t?new WeakMap:void 0,meta:p}=n();return e(l,d,{cache:h,equals:r,meta:p,strict:s})};if(t)return function(l,d){return e(l,d,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const i={cache:void 0,equals:r,meta:void 0,strict:s};return function(l,d){return e(l,d,i)}}const lve=Uo();Uo({strict:!0});Uo({circular:!0});Uo({circular:!0,strict:!0});Uo({createInternalComparator:()=>tc});Uo({strict:!0,createInternalComparator:()=>tc});Uo({circular:!0,createInternalComparator:()=>tc});Uo({circular:!0,createInternalComparator:()=>tc,strict:!0});function Uo(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:s=!1}=t,i=ive(t),a=sve(i),l=n?n(a):ave(a);return ove({circular:e,comparator:a,createState:r,equals:l,strict:s})}var Pw={exports:{}},Lw={};var SD;function cve(){if(SD)return Lw;SD=1;var t=Af(),e=JD();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,l=t.useMemo,d=t.useDebugValue;return Lw.useSyncExternalStoreWithSelector=function(h,p,m,g,x){var v=i(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=l(function(){function j(I){if(!E){if(E=!0,A=I,I=g(I),x!==void 0&&S.hasValue){var _=S.value;if(x(_,I))return D=_}return D=I}if(_=D,r(A,I))return _;var L=g(I);return x!==void 0&&x(_,L)?(A=I,_):(A=I,D=L)}var E=!1,A,D,M=m===void 0?null:m;return[function(){return j(p())},M===null?void 0:function(){return j(M())}]},[p,m,g,x]);var C=s(h,v[0],v[1]);return a(function(){S.hasValue=!0,S.value=C},[C]),d(C),C},Lw}var kD;function uve(){return kD||(kD=1,Pw.exports=cve()),Pw.exports}var dve=uve(),hve=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},fve=({contentComponent:t})=>{const e=LS.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return c.jsx(c.Fragment,{children:Object.values(e)})};function pve(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:QS.createPortal(r.reactElement,r.element,n)},t.forEach(s=>s())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(s=>s())}}}var mve=class extends z.Component{constructor(t){super(t),this.editorContentRef=z.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=pve(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return c.jsxs(c.Fragment,{children:[c.jsx("div",{ref:hve(e,this.editorContentRef),...n}),t?.contentComponent&&c.jsx(fve,{contentComponent:t.contentComponent})]})}},gve=N.forwardRef((t,e)=>{const n=z.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return z.createElement(mve,{key:n,innerRef:e,...t})}),PB=z.memo(gve),yve=typeof window<"u"?N.useLayoutEffect:N.useEffect,xve=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0}
232,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function bve(t){var e;const[n]=N.useState(()=>new xve(t.editor)),r=dve.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:lve);return yve(()=>n.watch(t.editor),[t.editor,n]),N.useDebugValue(r),r}var vve=!1,kS=typeof window>"u",wve=kS||!!(typeof window<"u"&&window.next),Sve=class LB{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?kS||wve?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...r)},onBlur:(...r)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...r)},onCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...r)},onDestroy:(...r)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...r)},onFocus:(...r)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...r)},onSelectionUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...r)},onTransaction:(...r)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...r)},onUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...r)},onContentError:(...r)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...r)},onDrop:(...r)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...r)},onPaste:(...r)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...r)},onDelete:(...r)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...r)}};return new f0e(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((s,i)=>{var a;return s===((a=n.extensions)==null?void 0:a[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?LB.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}
232):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,s)=>r===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function kve(t={},e=[]){const n=N.useRef(t);n.current=t;const[r]=N.useState(()=>new Sve(n)),s=LS.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return N.useDebugValue(s),N.useEffect(r.onRender(e)),bve({editor:s,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),s}var IB=N.createContext({editor:null});IB.Consumer;var Cve=N.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Nve=()=>N.useContext(Cve);z.forwardRef((t,e)=>{const{onDragStart:n}=Nve(),r=t.as||"div";return c.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});z.createContext({markViewContentRef:()=>{}});var JC=N.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});JC.displayName="TiptapContext";var jve=()=>N.useContext(JC);function UB({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const s=N.useMemo(()=>({editor:r}),[r]),i=N.useMemo(()=>({editor:r}),[r]);return c.jsx(IB.Provider,{value:i,children:c.jsx(JC.Provider,{value:s,children:n})})}UB.displayName="Tiptap";function BB({...t}){const{editor:e}=jve();return c.jsx(PB,{editor:e,...t})}BB.displayName="Tiptap.Content";Object.assign(UB,{Content:BB});var xy=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},Eve=/^\s*>\s$/,Tve=Fr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return xy("blockquote",{...cn(this.options.HTMLAttributes,t),children:xy("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((s,i)=>{var a,l;const p=((l=(a=e.renderChild)==null?void 0:a.call(e,s,i))!=null?l:e.renderChildren([s])).split(`
233`).map(m=>m.trim()===""?n:`${n} ${m}`);r.push(p.join(`
234`))}),r.join(`
235${n}
236`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Yu({find:Eve,type:this.type})]}}),Ave=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Mve=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Ove=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Rve=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Dve=ec.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return xy("strong",{...cn(this.options.HTMLAttributes,t),children:xy("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}}
vendor: 7,853 bytes, lines 236-257
236,addInputRules(){return[Gu({find:Ave,type:this.type}),Gu({find:Ove,type:this.type})]},addPasteRules(){return[Kl({find:Mve,type:this.type}),Kl({find:Rve,type:this.type})]}}),_ve=/(^|[^`])`([^`]+)`(?!`)$/,Pve=/(^|[^`])`([^`]+)`(?!`)/g,Lve=ec.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",cn(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Gu({find:_ve,type:this.type})]},addPasteRules(){return[Kl({find:Pve,type:this.type})]}}),Iw=4,Ive=/^```([a-z]+)?[\s\n]$/,Uve=/^~~~([a-z]+)?[\s\n]$/,Bve=Fr.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Iw,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",cn(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(`
237`):r=`\`\`\`${s}
238
239\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:Iw,{state:r}=t,{selection:s}=r,{$from:i,empty:a}=s;if(i.parent.type!==this.type)return!1;const l=" ".repeat(n);return a?t.commands.insertContent(l):t.commands.command(({tr:d})=>{const{from:h,to:p}=s,x=r.doc.textBetween(h,p,`
240`,`
241`).split(`
242`).map(v=>l+v).join(`
243`);return d.replaceWith(h,p,r.schema.text(x)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:Iw,{state:r}=t,{selection:s}=r,{$from:i,empty:a}=s;return i.parent.type!==this.type?!1:a?t.commands.command(({tr:l})=>{var d;const{pos:h}=i,p=i.start(),m=i.end(),x=r.doc.textBetween(p,m,`
244`,`
245`).split(`
246`);let v=0,S=0;const C=h-p;for(let I=0;I<x.length;I+=1){if(S+x[I].length>=C){v=I;break}S+=x[I].length+1}const E=((d=x[v].match(/^ */))==null?void 0:d[0])||"",A=Math.min(E.length,n);if(A===0)return!0;let D=p;for(let I=0;I<v;I+=1)D+=x[I].length+1;return l.delete(D,D+A),h-D<=A&&l.setSelection(Ke.create(l.doc,D)),!0}):t.commands.command(({tr:l})=>{const{from:d,to:h}=s,g=r.doc.textBetween(d,h,`
247`,`
248`).split(`
249`).map(x=>{var v;const S=((v=x.match(/^ */))==null?void 0:v[0])||"",C=Math.min(S.length,n);return x.slice(C)}).join(`
250`);return l.replaceWith(d,h,r.schema.text(g)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
251
252`);return!i||!a?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const l=s.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:h})=>(h.setSelection(rt.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[wS({find:Ive,type:this.type,getAttributes:t=>({language:t[1]})}),wS({find:Uve,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Xt({key:new Dn("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s?.mode;if(!n||!i)return!1;const{tr:a,schema:l}=t.state,d=l.text(n.replace(/\r\n?/g,`
253`));return a.replaceSelectionWith(this.type.create({language:i},d)),a.selection.$from.parent.type!==this.type&&a.setSelection(Ke.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),Fve=Fr.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
254
255`):""}),zve=Fr.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",cn(this.options.HTMLAttributes,t)]},renderText(){return`
256`},renderMarkdown:()=>`  
257`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,d=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:h,dispatch:p})=>{if(p&&d&&a){const m=d.filter(g=>l.includes(g.type.name));h.ensureMarks(m)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),qve=Fr.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,cn(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>wS({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
257)\\s$`),type:this.type,getAttributes:{level:t}}))}}),Vve=Fr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",cn(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!g0e(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return mB(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:a,dispatch:l})=>{if(l){const{$to:d}=a.selection,h=d.end();if(d.nodeAfter)d.nodeAfter.isTextblock?a.setSelection(Ke.create(a.doc,d.pos+1)):d.nodeAfter.isBlock?a.setSelection(Fe.create(a.doc,d.pos)):a.setSelection(Ke.create(a.doc,d.pos));else{const p=i.schema.nodes[this.options.nextNodeType]||d.parent.type.contentMatch.defaultType,m=p?.create();m&&(a.insert(h,m),a.setSelection(Ke.create(a.doc,h+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[RB({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
vendor: 4,520 bytes, line 257
257ype})]}}),$ve=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Hve=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Kve=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Wve=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Gve=ec.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",cn(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Gu({find:$ve,type:this.type}),Gu({find:Kve,type:this.type})]},addPasteRules(){return[Kl({find:Hve,type:this.type}),Kl({find:Wve,type:this.type})]}});const Yve="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
257ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Qve="ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
257ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2",CS="numeric",NS="ascii",jS="alpha",Qh="asciinumeric",Th="alphanumeric",ES="domain",FB="emoji",Xve="scheme",Jve="slashscheme",Uw="whitespace";function Zve(t,e){return t in e||(e[t]=[]),e[t]}function El(t,e,n){e[CS]&&(e[Qh]=!0,e[Th]=!0),e[NS]&&(e[Qh]=!0,e[jS]=!0),e[Qh]&&(e[Th]=!0),e[jS]&&(e[Th]=!0),e[Th]&&(e[ES]=!0),e[FB]&&(e[ES]=!0);for(const r in e){const s=Zve(r,n);s.indexOf(t)<0&&s.push(t)}}function ewe(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Pr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Pr.groups={};Pr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||Pr.groups;let s;return e&&e.j?s=e:(s=new Pr(e),n&&r&&El(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const i=t.length;if(!i)return s;for(let a=0;a<i-1;a++)s=s.tt(t[a]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||Pr.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let a,l=s.go(t);if(l?(a=new Pr,Object.assign(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new Pr,i){if(r)if(a.t&&typeof a.t=="string"){const d=Object.assign(ewe(a.t,r),n);El(i,d,r)}else n&&El(i,n,r);a.t=i}return s.j[t]=a,a}};const tt=(t,e,n,r,s)=>t.ta(e,n,r,s),nn=(t,e,n,r,s)=>t.tr(e,n,r,s),CD=(t,e,n,r,s)=>t.ts(e,n,r,s),me=(t,e,n,r,s)=>t.tt(e,n,r,s),sa="WORD",TS="UWORD",zB="ASCIINUMERICAL",qB="ALPHANUMERICAL",jf="LOCALHOST",AS="TLD",MS="UTLD",xg="SCHEME",mu="SLASH_SCHEME",ZC="NUM",OS="WS",eN="NL",Xh="OPENBRACE",Jh="CLOSEBRACE",by="OPENBRACKET",vy="CLOSEBRACKET",wy="OPENPAREN",Sy="CLOSEPAREN",ky="OPENANGLEBRACKET",Cy="CLOSEANGLEBRACKET",Ny="FULLWIDTHLEFTPAREN",jy="FULLWIDTHRIGHTPAREN",Ey="LEFTCORNERBRACKET",Ty="RIGHTCORNERBRACKET",Ay="LEFTWHITECORNERBRACKET",My="RIGHTWHITECORNERBRACKET",Oy="FULLWIDTHLESSTHAN",Ry="FULLWIDTHGREATERTHAN",Dy="AMPERSAND",_y="APOSTROPHE",Py="ASTERISK",uo="AT",Ly="BACKSLASH",Iy="BACKTICK",Uy="CARET",mo="COLON",tN="COMMA",By="DOLLAR",hi="DOT",Fy="EQUALS",nN="EXCLAMATION",ms="HYPHEN",Zh="PERCENT",zy="PIPE",qy="PLUS",Vy="POUND",ef="QUERY",rN="QUOTE",VB="FULLWIDTHMIDDLEDOT",sN="SEMI",fi="SLASH",tf="TILDE",$y="UNDERSCORE",$B="EMOJI",Hy="SYM";var HB=Object.freeze({__proto__:null,ALPHANUMERICAL:qB,AMPERSAND:Dy,APOSTROPHE:_y,ASCIINUMERICAL:zB,ASTERISK:Py,AT:uo,BACKSLASH:Ly,BACKTICK:Iy,CARET:Uy,CLOSEANGLEBRACKET:Cy,CLOSEBRACE:Jh,CLOSEBRACKET:vy,CLOSEPAREN:Sy,COLON:mo,COMMA:tN,DOLLAR:By,DOT:hi,EMOJI:$B,EQUALS:Fy,EXCLAMATION:nN,FULLWIDTHGREATERTHAN:Ry,FULLWIDTHLEFTPAREN:Ny,FULLWIDTHLESSTHAN:Oy,FULLWIDTHMIDDLEDOT:VB,FULLWIDTHRIGHTPAREN:jy,HYPHEN:ms,LEFTCORNERBRACKET:Ey,LEFTWHITECORNERBRACKET:Ay,LOCALHOST:jf,NL:eN,NUM:ZC,OPENANGLEBRACKET:ky,OPENBRACE:Xh,OPENBRACKET:by,OPENPAREN:wy,PERCENT:Zh,PIPE:zy,PLUS:qy,POUND:Vy,QUERY:ef,QUOTE:rN,RIGHTCORNERBRACKET:Ty,RIGHTWHITECORNERBRACKET:My,SCHEME:xg,SEMI:sN,SLASH:fi,SLASH_SCHEME:mu,SYM:Hy,TILDE:tf,TLD:AS,UNDERSCORE:$y,UTLD:MS,UWORD:TS,WORD:sa,WS:OS});const Xi=/[a-z]/,mh=new RegExp("\\p{L}","u"),Bw=new RegExp("\\p{Emoji}","u"),Ji=/\d/,Fw=/\s/,ND="\r",zw=`
258`,twe="️",nwe="‍",qw="";let $m=null,Hm=null;function rwe(t=[]){const e={};Pr.groups=e;const n=new Pr;$m==null&&($m=jD(Yve)),Hm==null&&(Hm=jD(Qve)),me(n,"'",_y),me(n,"{",Xh),me(n,"}",Jh),me(n,"[",by),me(n,"]",vy),me(n,"(",wy),me(n,")",Sy),me(n,"<",ky),me(n,">",Cy),me(n,"(",Ny),me(n,")",jy),me(n,"「",Ey),me(n,"」",Ty),me(n,"『",Ay),me(n,"』",My),me(n,"<",Oy),me(n,">",Ry),me(n,"&",Dy),me(n,"*",Py),me(n,"@",uo),me(n,"`",Iy),me(n,"^",Uy),me(n,":",mo),me(n,",",tN),me(n,"$",By),me(n,".",hi),me(n,"=",Fy),me(n,"!",nN),me(n,"-",ms),me(n,"%",Zh),me(n,"|",zy),me(n,"+",qy),me(n,"#",Vy),me(n,"?",ef),me(n,'"',rN),me(n,"/",fi),me(n,";",sN),me(n,"~",tf),me(n,"_",$y),me(n,"\\",Ly),me(n,"・",VB);const r=nn(n,Ji,ZC,{[CS]:!0});nn(r,Ji,r);const s=nn(r,Xi,zB,{[Qh]:!0}),i=nn(r,mh,qB,{[Th]:!0}),a=nn(n,Xi,sa,{[NS]:!0});nn(a,Ji,s),nn(a,Xi,a),nn(s,Ji,s),nn(s,Xi,s);const l=nn(n,mh,TS,{[jS]:!0});nn(l,Xi),nn(l,Ji,i),nn(l,mh,l),nn(i,Ji,i),nn(i,Xi),nn(i,mh,i);const d=me(n,zw,eN,{[Uw]:!0}),h=me(n,ND,OS,{[Uw]:!0}),p=nn(n,Fw,OS,{[Uw]:!0});me(n,qw,p),me(h,zw,d),me(h,qw,p),nn(h,Fw,p),me(p,ND),me(p,zw),nn(p,Fw,p),me(p,qw,p);const m=nn(n,Bw,$B,{[FB]:!0});me(m,"#"),nn(m,Bw,m),me(m,twe,m);const g=me(m,nwe);me(g,"#"),nn(g,Bw,m);const x=[[Xi,a],[Ji,s]],v=[[Xi,null],[mh,l],[Ji,i]];for(let S=0;S<$m.length;S++)Qa(n,$m[S],AS,sa,x);for(let S=0;S<Hm.length;S++)Qa(n,Hm[S],MS,TS,v);El(AS,{tld:!0,ascii:!0},e),El(MS,{utld:!0,alpha:!0},e),Qa(n,"file",xg,sa,x),Qa(n,"mailto",xg,sa,x),Qa(n,"http",mu,sa,x),Qa(n,"https",mu,sa,x),Qa(n,"ftp",mu,sa,x),Qa(n,"ftps",mu,sa,x),El(xg,{scheme:!0,ascii:!0},e),El(mu,{slashscheme:!0,ascii:!0},e),t=t.sort((S,C)=>S[0]>C[0]?1:-1);for(let S=0;S<t.length;S++){const C=t[S][0],E=t[S][1]?{[Xve]:!0}:{[Jve]:!0};C.indexOf("-")>=0?E[ES]=!0:Xi.test(C)?Ji.test(C)?E[Qh]=!0:E[NS]=!0:E[CS]=!0,CD(n,C,C,E)}return CD(n,"localhost",jf,{ascii:!0}),n.jd=new Pr(Hy),{start:n,tokens:Object.assign({groups:e},HB)}}function KB(t,e){const n=swe(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,s=[];let i=0,a=0;for(;a<r;){let l=t,d=null,h=0,p=null,m=-1,g=-1;for(;a<r&&(d=l.go(n[a]));)l=d,l.accepts()?(m=0,g=0,p=l):m>=0&&(m+=n[a].length,g++),h+=n[a].length,i+=n[a].length,a++;i-=m,a-=g,h-=m,s.push({t:p.t,v:e.slice(i-h,i),s:i-h,e:i})}return s}function swe(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),i,a=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function Qa(t,e,n,r,s){let i;const a=e.length;for(let l=0;l<a-1;l++){const d=e[l];t.j[d]?i=t.j[d]:(i=new Pr(r),i.jr=s.slice(),t.j[d]=i),t=i}return i=new Pr(n),i.jr=s.slice(),t.j[e[a-1]]=i,i}function jD(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+i),10);a>0;a--)n.pop();r+=i}else n.push(t[r]),r++}return e}const Ef={defaultProtocol:"http",events:null,format:ED,formatHref:ED,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function iN(t,e=null){let n=Object.assign({},Ef);t&&(n=Object.assign(n,t instanceof iN?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}iN.prototype={o:Ef,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:Ef[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function ED(t){return t}function WB(t,e){this.t="token",this.v=t,this.tk=e}WB.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Ef.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),a={},l=t.get("className",n,e),d=t.get("target",n,e),h=t.get("rel",n,e),p=t.getObj("attributes",n,e),m=t.getObj("events",n,e);return a.href=r,l&&(a.class=l),d&&(a.target=d),h&&(a.rel=h),p&&Object.assign(a,p),{tagName:s,attributes:a,content:i,eventListeners:m}}};
vendor: 4,632 bytes, lines 258-261
258function Kx(t,e){class n extends WB{constructor(s,i){super(s,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const TD=Kx("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),AD=Kx("text"),iwe=Kx("nl"),Km=Kx("url",{isLink:!0,toHref(t=Ef.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==jf&&t[1].t===mo}}),fs=t=>new Pr(t);function awe({groups:t}){const e=t.domain.concat([Dy,Py,uo,Ly,Iy,Uy,By,Fy,ms,ZC,Zh,zy,qy,Vy,fi,Hy,tf,$y]),n=[_y,mo,tN,hi,nN,Zh,ef,rN,sN,ky,Cy,Xh,Jh,vy,by,wy,Sy,Ny,jy,Ey,Ty,Ay,My,Oy,Ry],r=[Dy,_y,Py,Ly,Iy,Uy,By,Fy,ms,Xh,Jh,Zh,zy,qy,Vy,ef,fi,Hy,tf,$y],s=fs(),i=me(s,tf);tt(i,r,i),tt(i,t.domain,i);const a=fs(),l=fs(),d=fs();tt(s,t.domain,a),tt(s,t.scheme,l),tt(s,t.slashscheme,d),tt(a,r,i),tt(a,t.domain,a);const h=me(a,uo);me(i,uo,h),me(l,uo,h),me(d,uo,h);const p=me(i,hi);tt(p,r,i),tt(p,t.domain,i);const m=fs();tt(h,t.domain,m),tt(m,t.domain,m);const g=me(m,hi);tt(g,t.domain,m);const x=fs(TD);tt(g,t.tld,x),tt(g,t.utld,x),me(h,jf,x);const v=me(m,ms);me(v,ms,v),tt(v,t.domain,m),tt(x,t.domain,m),me(x,hi,g),me(x,ms,v);const S=me(x,mo);tt(S,t.numeric,TD);const C=me(a,ms),j=me(a,hi);me(C,ms,C),tt(C,t.domain,a),tt(j,r,i),tt(j,t.domain,a);const E=fs(Km);tt(j,t.tld,E),tt(j,t.utld,E),tt(E,t.domain,a),tt(E,r,i),me(E,hi,j),me(E,ms,C),me(E,uo,h);const A=me(E,mo),D=fs(Km);tt(A,t.numeric,D);const M=fs(Km),I=fs();tt(M,e,M),tt(M,n,I),tt(I,e,M),tt(I,n,I),me(E,fi,M),me(D,fi,M);const _=me(l,mo),L=me(d,mo),V=me(L,fi),B=me(V,fi);tt(l,t.domain,a),me(l,hi,j),me(l,ms,C),tt(d,t.domain,a),me(d,hi,j),me(d,ms,C),tt(_,t.domain,M),me(_,fi,M),me(_,ef,M),tt(B,t.domain,M),tt(B,e,M),me(B,fi,M);const K=[[Xh,Jh],[by,vy],[wy,Sy],[ky,Cy],[Ny,jy],[Ey,Ty],[Ay,My],[Oy,Ry]];for(let ee=0;ee<K.length;ee++){const[ie,se]=K[ee],he=me(M,ie);me(I,ie,he),me(he,se,M);const $=fs(Km);tt(he,e,$);const Q=fs();tt(he,n),tt($,e,$),tt($,n,Q),tt(Q,e,$),tt(Q,n,Q),me($,se,M),me(Q,se,M)}return me(s,jf,E),me(s,eN,iwe),{start:s,tokens:HB}}function owe(t,e,n){let r=n.length,s=0,i=[],a=[];for(;s<r;){let l=t,d=null,h=null,p=0,m=null,g=-1;for(;s<r&&!(d=l.go(n[s].t));)a.push(n[s++]);for(;s<r&&(h=d||l.go(n[s].t));)d=null,l=h,l.accepts()?(g=0,m=l):g>=0&&g++,s++,p++;if(g<0)s-=p,s<r&&(a.push(n[s]),s++);else{a.length>0&&(i.push(Vw(AD,e,a)),a=[]),s-=g,p-=g;const x=m.t,v=n.slice(s-p,s);i.push(Vw(x,e,v))}}return a.length>0&&i.push(Vw(AD,e,a)),i}function Vw(t,e,n){const r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}const lwe=typeof console<"u"&&console&&console.warn||(()=>{}),cwe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Bt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function uwe(){return Pr.groups={},Bt.scanner=null,Bt.parser=null,Bt.tokenQueue=[],Bt.pluginQueue=[],Bt.customSchemes=[],Bt.initialized=!1,Bt}function MD(t,e=!1){if(Bt.initialized&&lwe(`linkifyjs: already initialized - will not register custom scheme "${t}" ${cwe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
2591. Must only contain digits, lowercase ASCII letters or "-"
2602. Cannot start or end with "-"
2613. "-" cannot repeat`);Bt.customSchemes.push([t,e])}function dwe(){Bt.scanner=rwe(Bt.customSchemes);for(let t=0;t<Bt.tokenQueue.length;t++)Bt.tokenQueue[t][1]({scanner:Bt.scanner});Bt.parser=awe(Bt.scanner.tokens);for(let t=0;t<Bt.pluginQueue.length;t++)Bt.pluginQueue[t][1]({scanner:Bt.scanner,parser:Bt.parser});return Bt.initialized=!0,Bt}function aN(t){return Bt.initialized||dwe(),owe(Bt.parser.start,t,KB(Bt.scanner.start,t))}aN.scan=KB;function GB(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new iN(n),s=aN(t),i=[];for(let a=0;a<s.length;a++){const l=s[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var oN="[\0-   ᠎ -\u2029  ]",hwe=new RegExp(oN),fwe=new RegExp(`${oN}$`),pwe=new RegExp(oN,"g");function mwe(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function gwe(t){return new Xt({key:new Dn("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(h=>h.docChanged)&&!n.doc.eq(r.doc),i=e.some(h=>h.getMeta("preventAutolink"));if(!s||i)return;const{tr:a}=r,l=oB(n.doc,[...e]);if(pB(l).forEach(({newRange:h})=>{const p=fbe(r.doc,h,x=>x.isTextblock);let m,g;if(p.length>1)m=p[0],g=r.doc.textBetween(m.pos,m.pos+m.node.nodeSize,void 0," ");else if(p.length){const x=r.doc.textBetween(h.from,h.to," "," ");
261if(!fwe.test(x))return;m=p[0],g=r.doc.textBetween(m.pos,h.to,void 0," ")}if(m&&g){const x=g.split(hwe).filter(Boolean);if(x.length<=0)return!1;const v=x[x.length-1],S=m.pos+g.lastIndexOf(v);if(!v)return!1;const C=aN(v).map(j=>j.toObject(t.defaultProtocol));if(!mwe(C))return!1;C.filter(j=>j.isLink).map(j=>({...j,from:S+j.start+1,to:S+j.end+1})).filter(j=>r.schema.marks.code?!r.doc.rangeHasMark(j.from,j.to,r.schema.marks.code):!0).filter(j=>t.validate(j.value)).filter(j=>t.shouldAutoLink(j.value)).forEach(j=>{WC(j.from,j.to,r.doc).some(E=>E.mark.type===t.type)||a.addMark(j.from,j.to,t.type.create({href:j.href}))})}}),!!a.steps.length)return a}})}function ywe(t){return new Xt({key:new Dn("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const d=r.target;if(!d)return!1;const h=t.editor.view.dom;a=d.closest("a"),a&&!h.contains(a)&&(a=null)}if(!a)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const d=fB(e.state,t.type.name),h=(s=a.href)!=null?s:d.href,p=(i=a.target)!=null?i:d.target;h&&(window.open(h,p),l=!0)}return l}}})}function xwe(t){return new Xt({key:new Dn("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:a}=i,{empty:l}=a;if(l)return!1;let d="";r.content.forEach(p=>{d+=p.textContent});const h=GB(d,{defaultProtocol:t.defaultProtocol}).find(p=>p.isLink&&p.value===d);return!d||!h||s!==void 0&&!s(h.value)?!1:t.editor.commands.setMark(t.type,{href:h.href})}}})}function hl(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(pwe,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var YB=ec.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){MD(t);return}MD(t.scheme,t.optionalSlashes)})},onDestroy(){uwe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!hl(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const s=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!hl(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!hl(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",cn(this.options.HTMLAttributes,t),0]:["a",cn(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,i;const a=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",l=(i=(s=t.attrs)==null?void 0:s.title)!=null?i:"",d=e.renderChildren(t);return l?`[${d}](${a} "${l}")`:`[${d}](${a})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!hl(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!hl(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Kl({find:t=>{const e=[];
vendor: 4,894 bytes, lines 261-262
261if(t){const{protocols:n,defaultProtocol:r}=this.options,s=GB(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!hl(a,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(gwe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!hl(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(ywe({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(xwe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),bwe=YB,vwe=Object.defineProperty,wwe=(t,e)=>{for(var n in e)vwe(t,n,{get:e[n],enumerable:!0})},Swe="listItem",OD="textStyle",RD=/^\s*([-+*])\s$/,QB=Fr.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",cn(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
262`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Swe,this.editor.getAttributes(OD)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Yu({find:RD,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Yu({find:RD,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(OD),editor:this.editor})),[t]}}),XB=Fr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",cn(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let s=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(a=>a.type==="paragraph"))s=r(t.tokens);else{const a=t.tokens[0];if(a&&a.type==="text"&&a.tokens&&a.tokens.length>0){if(s=[{type:"paragraph",content:e.parseInline(a.tokens)}],t.tokens.length>1){const d=t.tokens.slice(1),h=r(d);s.push(...h)}}else s=r(t.tokens)}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(t,e,n)=>XC(t,e,r=>{var s,i;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((i=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:i.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kwe={};wwe(kwe,{findListItemPos:()=>ep,getNextListDepth:()=>lN,handleBackspace:()=>RS,handleDelete:()=>DS,hasListBefore:()=>JB,hasListItemAfter:()=>Cwe,hasListItemBefore:()=>ZB,listItemHasSubList:()=>eF,nextListIsDeeper:()=>tF,nextListIsHigher:()=>nF});var ep=(t,e)=>{const{$from:n}=e.selection,r=Sn(t,e.schema);let s=null,i=n.depth,a=n.pos,l=null;for(;i>0&&l===null;)s=n.node(i),s.type===r?l=i:(i-=1,a-=1);return l===null?null:{$pos:e.doc.resolve(a),depth:l}},lN=(t,e)=>{const n=ep(t,e);if(!n)return!1;const[,r]=Cbe(e,t,n.$pos.pos+4);return r},JB=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},ZB=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},eF=(t,e,n)=>{if(!n)return!1;const r=Sn(t,e.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},RS=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Oo(t.state,e)&&JB(t.state,e,n)){const{$anchor:l}=t.state.selection,d=t.state.doc.resolve(l.before()-1),h=[];d.node().descendants((g,x)=>
262{g.type.name===e&&h.push({node:g,pos:x})});const p=h.at(-1);if(!p)return!1;const m=t.state.doc.resolve(d.start()+p.pos+1);return t.chain().cut({from:l.start()-1,to:l.end()+1},m.end()).joinForward().run()}if(!Oo(t.state,e)||!Tbe(t.state))return!1;const r=ep(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=eF(e,t.state,i);return ZB(e,t.state)&&!a?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},tF=(t,e)=>{const n=lN(t,e),r=ep(t,e);return!r||!n?!1:n>r.depth},nF=(t,e)=>{const n=lN(t,e),r=ep(t,e);return!r||!n?!1:n<r.depth},DS=(t,e)=>{if(!Oo(t.state,e)||!Ebe(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:tF(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():nF(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},Cwe=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},rF=un.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&DS(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&DS(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&RS(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&RS(t,n,r)&&(e=!0)}),e}}}}),DD=/^(\s*)(\d+)\.\s+(.*)$/,Nwe=/^\s/;function jwe(t){const e=t.trimStart();return/^[-+*]\s+/.test(e)||/^\d+\.\s+/.test(e)||/^>\s?/.test(e)||/^```/.test(e)||/^~~~/.test(e)}function Ewe(t){const e=[],n=[];let r=!1;return t.forEach(s=>{if(r){n.push(s);return}if(s.trim()===""){r=!0,n.push(s);return}if(e.length>0&&jwe(s)){r=!0,n.push(s);return}e.push(s)}),{paragraphLines:e,blockLines:n}}function Twe(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],i=s.match(DD);if(!i)break;const[,a,l,d]=i,h=a.length,p=[d];let m=n+1;const g=[s];let x=!1;for(;m<t.length;){const v=t[m];
vendor: 8,437 bytes, lines 262-271
262if(v.match(DD))break;if(v.trim()==="")g.push(v),p.push(""),x=!0,m+=1;else if(v.match(Nwe))g.push(v),p.push(v.slice(h+2)),m+=1;else{if(x)break;g.push(v),p.push(v),m+=1}}e.push({indent:h,number:parseInt(l,10),content:p.join(`
263`).trim(),contentLines:p,raw:g.join(`
264`)}),r=m,n=m}return[e,r]}function sF(t,e,n){const r=[];let s=0;for(;s<t.length;){const i=t[s];if(i.indent===e){const{paragraphLines:a,blockLines:l}=Ewe(i.contentLines),d=a.join(`
265`).trim(),h=[];d&&h.push({type:"paragraph",raw:d,tokens:n.inlineTokens(d)});const p=l.join(`
266`).trim();if(p){const x=n.blockTokens(p);h.push(...x)}let m=s+1;const g=[];for(;m<t.length&&t[m].indent>e;)g.push(t[m]),m+=1;if(g.length>0){const x=Math.min(...g.map(S=>S.indent)),v=sF(g,x,n);h.push({type:"list",ordered:!0,start:g[0].number,items:v,raw:g.map(S=>S.raw).join(`
267`)})}r.push({type:"list_item",raw:i.raw,tokens:h}),s=m}else s+=1}return r}function Awe(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var Mwe="listItem",_D="textStyle",PD=/^(\d+)\.\s$/,iF=Fr.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",cn(this.options.HTMLAttributes,n),0]:["ol",cn(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?Awe(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
268`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e?.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const s=t.split(`
269`),[i,a]=Twe(s);if(i.length===0)return;const l=sF(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:s.slice(0,a).join(`
270`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Mwe,this.editor.getAttributes(_D)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Yu({find:PD,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Yu({find:PD,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(_D)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),Owe=/^\s*(\[([( |x])?\])\s$/,Rwe=Fr.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",cn(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return XC(t,e,s)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),d=document.createElement("div"),h=m=>{var g,x;l.ariaLabel=((x=(g=this.options.a11y)==null?void 0:g.checkboxLabel)==null?void 0:x.call(g,m,l.checked))||`Task item checkbox for ${m.textContent||"empty task item"}`};h(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",m=>m.preventDefault()),l.addEventListener("change",m=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:g}=m.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:x})=>{const v=n();if(typeof v!="number")return!1;const S=x.doc.nodeAt(v);return x.setNodeMarkup(v,void 0,{...S?.attrs,checked:g}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,g)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([m,g])=>{s.setAttribute(m,g)}),s.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,a),s.append(i,d),Object.entries(e).forEach(([m,g])=>{s.setAttribute(m,g)});let p=new Set(Object.keys(e));return{dom:s,contentDOM:d,update:m=>{if(m.type!==this.type)return!1;s.dataset.checked=m.attrs.checked,l.checked=m.attrs.checked,h(m);const g=r.extensionManager.attributes,x=Nf(m,g),v=new Set(Object.keys(x)),S=this.options.HTMLAttributes;return p.forEach(C=>{v.has(C)||(C in S?s.setAttribute(C,S[C]):s.removeAttribute(C))}),Object.entries(x).forEach(([C,j])=>{j==null?C in S?s.setAttribute(C,S[C]):s.removeAttribute(C):s.setAttribute(C,j)}),p=v,!0}}}},addInputRules(){return[Yu({find:Owe,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Dwe=Fr.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",cn(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
271`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const a=SS(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,d)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:d}),customNestedParser:r},n);return a?[{type:"taskList",raw:a.raw,items:a.items}]:n.blockTokens(i)},s=SS(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,a)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:a}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}}
271,addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});un.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(QB.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(XB.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(rF.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(iF.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Rwe.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Dwe.configure(this.options.taskList)),t}});var Wm="&nbsp;",$w=" ",_we=Fr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",cn(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Wm||n[0].text===Wm||n[0].raw===$w||n[0].text===$w)&&r.length===1&&r[0].type==="text"&&(r[0].text===Wm||r[0].text===$w)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,s;if(!t)return"";const i=Array.isArray(t.content)?t.content:[];if(i.length===0){const a=Array.isArray((r=n?.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((s=n?.previousNode)==null?void 0:s.type)==="paragraph"&&a.length===0?Wm:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Pwe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Lwe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Iwe=ec.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",cn(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Gu({find:Pwe,type:this.type})]},addPasteRules(){return[Kl({find:Lwe,type:this.type})]}}),Uwe=Fr.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),aF=ec.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",cn(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Bwe=aF;function Fwe(t={}){return new Xt({view(e){return new zwe(e,t)}})}class zwe{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=a=>{this[s](a)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}
vendor: 4,302 bytes, line 271
271destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),a=i.width/s.offsetWidth,l=i.height/s.offsetHeight;if(n){let m=e.nodeBefore,g=e.nodeAfter;if(m||g){let x=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(x){let v=x.getBoundingClientRect(),S=m?v.bottom:v.top;m&&g&&(S=(S+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let C=this.width/2*l;r={left:v.left,right:v.right,top:S-C,bottom:S+C}}}}if(!r){let m=this.editorView.coordsAtPos(this.cursorPos),g=this.width/2*a;r={left:m.left-g,right:m.left+g,top:m.top,bottom:m.bottom}}let d=this.editorView.dom.offsetParent;this.element||(this.element=d.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let h,p;if(!d||d==document.body&&getComputedStyle(d).position=="static")h=-pageXOffset,p=-pageYOffset;else{let m=d.getBoundingClientRect(),g=m.width/d.offsetWidth,x=m.height/d.offsetHeight;h=m.left-d.scrollLeft*g,p=m.top-d.scrollTop*x}this.element.style.left=(r.left-h)/a+"px",this.element.style.top=(r.top-p)/l+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=J5(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class sn extends rt{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return sn.valid(r)?new sn(r):rt.near(r)}content(){return Ne.empty}eq(e){return e instanceof sn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new sn(e.resolve(n.pos))}getBookmark(){return new cN(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!qwe(e)||!Vwe(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&sn.valid(e))return e;let s=e.pos,i=null;for(let a=e.depth;;a--){let l=e.node(a);if(n>0?e.indexAfter(a)<l.childCount:e.index(a)>0){i=l.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;s+=n;let d=e.doc.resolve(s);if(sn.valid(d))return d}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!Fe.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=a,s+=n;let l=e.doc.resolve(s);if(sn.valid(l))return l}return null}}}sn.prototype.visible=!1;sn.findFrom=sn.findGapCursorFrom;rt.jsonID("gapcursor",sn);class cN{constructor(e){this.pos=e}map(e){return new cN(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return sn.valid(n)?new sn(n):rt.near(n)}}function oF(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function qwe(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||oF(s.type))return!0;
vendor: 19,178 bytes, line 271
271if(s.inlineContent)return!1}}return!0}function Vwe(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||oF(s.type))return!0;if(s.inlineContent)return!1}}return!0}function $we(){return new Xt({props:{decorations:Gwe,createSelectionBetween(t,e,n){return e.pos==n.pos&&sn.valid(n)?new sn(n):null},handleClick:Kwe,handleKeyDown:Hwe,handleDOMEvents:{beforeinput:Wwe}}})}const Hwe=ZU({ArrowLeft:Gm("horiz",-1),ArrowRight:Gm("horiz",1),ArrowUp:Gm("vert",-1),ArrowDown:Gm("vert",1)});function Gm(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let a=r.selection,l=e>0?a.$to:a.$from,d=a.empty;if(a instanceof Ke){if(!i.endOfTextblock(n)||l.depth==0)return!1;d=!1,l=r.doc.resolve(e>0?l.after():l.before())}let h=sn.findGapCursorFrom(l,e,d);return h?(s&&s(r.tr.setSelection(new sn(h))),!0):!1}}function Kwe(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!sn.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&Fe.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new sn(r))),!0)}function Wwe(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof sn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=de.empty;for(let a=r.length-1;a>=0;a--)s=de.from(r[a].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new Ne(s,0,0));return i.setSelection(Ke.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Gwe(t){if(!(t.selection instanceof sn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Yt.create(t.doc,[kr.widget(t.selection.head,e,{key:"gapcursor"})])}var Ky=200,$n=function(){};$n.prototype.append=function(e){return e.length?(e=$n.from(e),!this.length&&e||e.length<Ky&&this.leafAppend(e)||this.length<Ky&&e.leafPrepend(this)||this.appendInner(e)):this};$n.prototype.prepend=function(e){return e.length?$n.from(e).append(this):this};$n.prototype.appendInner=function(e){return new Ywe(this,e)};$n.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?$n.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};$n.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};$n.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};$n.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,a){return s.push(e(i,a))},n,r),s};$n.from=function(e){return e instanceof $n?e:e&&e.length?new lF(e):$n.empty};var lF=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,a,l){for(var d=i;d<a;d++)if(s(this.values[d],l+d)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,a,l){for(var d=i-1;d>=a;d--)if(s(this.values[d],l+d)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Ky)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Ky)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})($n);$n.empty=new lF([]);var Ywe=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,a){var l=this.left.length;if(s<l&&this.left.forEachInner(r,s,Math.min(i,l),a)===!1||i>l&&this.right.forEachInner(r,Math.max(s-l,0),Math.min(this.length,i)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,a){var l=this.left.length;if(s>l&&this.right.forEachInvertedInner(r,s-l,Math.max(i,l)-l,a+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(s,l),i,a)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})($n);const Qwe=500;class Vs{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let a=e.tr,l,d,h=[],p=[];return this.items.forEach((m,g)=>{if(!m.step){s||(s=this.remapping(r,g+1),i=s.maps.length),i--,p.push(m);return}if(s){p.push(new pi(m.map));let x=m.step.map(s.slice(i)),v;x&&a.maybeStep(x).doc&&(v=a.mapping.maps[a.mapping.maps.length-1],h.push(new pi(v,void 0,void 0,h.length+p.length))),i--,v&&s.appendMap(v,i)}else a.maybeStep(m.step);if(m.selection)return l=s?m.selection.map(s.slice(i)):m.selection,d=new Vs(this.items.slice(0,r).append(p.reverse().concat(h)),this.eventCount-1),!1},this.items.length,0),{remaining:d,transform:a,selection:l}}addTransform(e,n,r,s){let i=[],a=this.eventCount,l=this.items,d=!s&&l.length?l.get(l.length-1):null;for(let p=0;p<e.steps.length;p++){let m=e.steps[p].invert(e.docs[p]),g=new pi(e.mapping.maps[p],m,n),x;(x=d&&d.merge(g))&&(g=x,p?i.pop():l=l.slice(0,l.length-1)),i.push(g),n&&(a++,n=void 0),s||(d=g)}let h=a-r.depth;return h>Jwe&&(l=Xwe(l,h),a-=h),new Vs(l.append(i),a)}remapping(e,n){let r=new bf;return this.items.forEach((s,i)=>{let a=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Vs(this.items.append(e.map(n=>new pi(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(g=>{g.selection&&l--},s);let d=n;this.items.forEach(g=>{let x=i.getMirror(--d);if(x==null)return;a=Math.min(a,x);let v=i.maps[x];if(g.step){let S=e.steps[x].invert(e.docs[x]),C=g.selection&&g.selection.map(i.slice(d+1,x));C&&l++,r.push(new pi(v,S,C))}else r.push(new pi(v))},s);let h=[];for(let g=n;g<a;g++)h.push(new pi(i.maps[g]));let p=this.items.slice(0,s).append(h).append(r),m=new Vs(p,l);return m.emptyItemCount()>Qwe&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],i=0;return this.items.forEach((a,l)=>{if(l>=e)s.push(a),a.selection&&i++;else if(a.step){let d=a.step.map(n.slice(r)),h=d&&d.getMap();if(r--,h&&n.appendMap(h,r),d){let p=a.selection&&a.selection.map(n.slice(r));p&&i++;let m=new pi(h.invert(),d,p),g,x=s.length-1;(g=s.length&&s[x].merge(m))?s[x]=g:s.push(m)}}else a.map&&r--},this.items.length,0),new Vs($n.from(s.reverse()),i)}}Vs.empty=new Vs($n.empty,0);function Xwe(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}class pi{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new pi(n.getMap().invert(),n,this.selection)}}}class ho{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const Jwe=20;function Zwe(t,e,n,r){let s=n.getMeta(Dl),i;if(s)return s.historyState;n.getMeta(n1e)&&(t=new ho(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Dl))return a.getMeta(Dl).redo?new ho(t.done.addTransform(n,void 0,r,bg(e)),t.undone,LD(n.mapping.maps),t.prevTime,t.prevComposition):new ho(t.done,t.undone.addTransform(n,void 0,r,bg(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),d=t.prevTime==0||!a&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!e1e(n,t.prevRanges)),h=a?Hw(t.prevRanges,n.mapping):LD(n.mapping.maps);return new ho(t.done.addTransform(n,d?e.selection.getBookmark():void 0,r,bg(e)),Vs.empty,h,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ho(t.done.rebased(n,i),t.undone.rebased(n,i),Hw(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ho(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Hw(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function e1e(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function LD(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,i,a)=>e.push(i,a));return e}function Hw(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function t1e(t,e,n){let r=bg(e),s=Dl.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),l=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),d=new ho(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(a).setMeta(Dl,{redo:n,historyState:d})}let Kw=!1,ID=null;function bg(t){let e=t.plugins;if(ID!=e){Kw=!1,ID=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Kw=!0;break}}return Kw}const Dl=new Dn("history"),n1e=new Dn("closeHistory");function r1e(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Xt({key:Dl,state:{init(){return new ho(Vs.empty,Vs.empty,null,0,-1)},apply(e,n,r){return Zwe(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?uF:r=="historyRedo"?dF:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function cF(t,e){return(n,r)=>{let s=Dl.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=t1e(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const uF=cF(!1,!0),dF=cF(!0,!0);un.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Xt({key:new Dn("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit;if(s==null||s===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>s){const a=i-s,l=0,d=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const h=r.tr.deleteRange(l,d);return t=!0,h}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,d=i-r,h=l-d,p=l;return e.deleteRange(h,p),!(this.storage.characters({node:e.doc})>r)}})]}});var s1e=un.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Fwe(this.options)]}});un.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Xt({key:new Dn("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return Yt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((d,h)=>{if(d.isText)return;if(!(s>=h&&s<=h+d.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((d,h)=>{if(d.isText||!(s>=h&&s<=h+d.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(kr.node(h,h+d.nodeSize,{class:this.options.className}))}),Yt.create(t,i)}}})]}});var i1e=un.create({name:"gapCursor",addProseMirrorPlugins(){return[$we()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=jt(Ie(t,"allowGapCursor",n)))!=null?e:null}}}),UD="placeholder";function a1e(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}un.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:UD,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${a1e(this.options.dataAttribute)}`:`data-${UD}`;return[new Xt({key:new Dn("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,i=[];if(!r)return null;const a=this.editor.isEmpty;return e.descendants((l,d)=>{const h=s>=d&&s<=d+l.nodeSize,p=!l.isLeaf&&Vx(l);if(!l.type.isTextblock)return this.options.includeChildren;if((h||!this.options.showOnlyCurrent)&&p){const m=[this.options.emptyNodeClass];a&&m.push(this.options.emptyEditorClass);const g=kr.node(d,d+l.nodeSize,{class:m.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:d,hasAnchor:h}):this.options.placeholder});i.push(g)}return this.options.includeChildren}),Yt.create(e,i)}}})]}});un.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Xt({key:new Dn("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||mB(n.selection)||t.view.dragging?null:Yt.create(n.doc,[kr.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});var o1e="skipTrailingNode";function BD({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var l1e=un.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Dn(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new Xt({key:e,appendTransaction:(s,i,a)=>{const{doc:l,tr:d,schema:h}=a,p=e.getState(a),m=l.content.size,g=h.nodes[n];if(!s.some(x=>x.getMeta(o1e))&&p)return d.insert(m,g.create())},state:{init:(s,i)=>{const a=i.tr.doc.lastChild;return!BD({node:a,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;const a=s.doc.lastChild;return!BD({node:a,types:r})}}})]}}),c1e=un.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>uF(t,e),redo:()=>({state:t,dispatch:e})=>dF(t,e)}},addProseMirrorPlugins(){return[r1e(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),u1e=un.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(Dve.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(Tve.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(QB.configure(this.options.bulletList)),this.options.code!==!1&&s.push(Lve.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(Bve.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(Fve.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(s1e.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(i1e.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(zve.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(qve.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(c1e.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(Vve.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Gve.configure(this.options.italic)),this.options.listItem!==!1&&s.push(XB.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(rF.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(YB.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(iF.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(_we.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(Iwe.configure(this.options.strike)),this.options.text!==!1&&s.push(Uwe.configure(this.options.text)),this.options.underline!==!1&&s.push(aF.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(l1e.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),d1e=u1e,h1e=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,f1e=Fr.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",cn(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,s,i,a;const l=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",d=(s=(r=t.attrs)==null?void 0:r.alt)!=null?s:"",h=(a=(i=t.attrs)==null?void 0:i.title)!=null?a:"";return h?`![${d}](${l} "${h}")`:`![${d}](${l})`}
271,addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:s,getPos:i,HTMLAttributes:a,editor:l})=>{const d=document.createElement("img");Object.entries(a).forEach(([m,g])=>{if(g!=null)switch(m){case"width":case"height":break;default:d.setAttribute(m,g);break}}),d.src=a.src;const h=new m0e({element:d,editor:l,node:s,getPos:i,onResize:(m,g)=>{d.style.width=`${m}px`,d.style.height=`${g}px`},onCommit:(m,g)=>{const x=i();x!==void 0&&this.editor.chain().setNodeSelection(x).updateAttributes(this.name,{width:m,height:g}).run()},onUpdate:(m,g,x)=>m.type===s.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),p=h.dom;return p.style.visibility="hidden",p.style.pointerEvents="none",d.onload=()=>{p.style.visibility="",p.style.pointerEvents=""},h}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[RB({find:h1e,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),p1e=f1e;const m1e=10*1024*1024;async function g1e(t,e){if(!t.type.startsWith("image/"))throw new Error("Please choose an image file (PNG, JPG, or WebP).");if(t.size>m1e)throw new Error("Image is too large (max 10 MB).");const n={"Content-Type":t.type||"image/jpeg"};e&&(n.Authorization=`Bearer ${e}`);const r=await fetch("/api/storage/uploads",{method:"POST",headers:n,credentials:"include",body:t});if(!r.ok){const i=await r.text().catch(()=>"");throw new Error(`Upload failed: ${r.status} ${i}`)}const{objectPath:s}=await r.json();return`/api/storage${s}`}function mr({onClick:t,active:e,disabled:n,title:r,children:s,testId:i}){return c.jsx("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:t,disabled:n,title:r,"aria-label":r,"data-testid":i,className:`p-2 rounded text-sm transition flex items-center justify-center ${e?"bg-[#003320] text-white":"text-neutral-700 hover:bg-neutral-200 disabled:opacity-40 disabled:hover:bg-transparent"}`,children:s})}function Ym(){return c.jsx("span",{className:"w-px h-6 bg-neutral-300 mx-1"})}function y1e({editor:t,onPickImage:e,uploading:n,uploadError:r}){const s=()=>{const l=t.getAttributes("link").href,d=window.prompt("Link URL",l??"https://");if(d!==null){if(d===""){t.chain().focus().extendMarkRange("link").unsetLink().run();return}t.chain().focus().extendMarkRange("link").setLink({href:d,target:"_blank",rel:"noopener noreferrer"}).run()}},i=()=>{t.isActive("listItem")&&t.chain().focus().sinkListItem("listItem").run()},a=()=>{t.isActive("listItem")&&t.chain().focus().liftListItem("listItem").run()};return c.jsxs("div",{className:"border border-neutral-200 border-b-0 rounded-t bg-neutral-50 px-2 py-1.5 flex items-center flex-wrap gap-0.5 sticky top-0 z-10",children:[c.jsx(mr,{title:"Paragraph",active:t.isActive("paragraph")&&!t.isActive("heading")&&!t.isActive("blockquote"),onClick:()=>t.chain().focus().setParagraph().run(),children:c.jsx(W8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Heading 2",active:t.isActive("heading",{level:2}),onClick:()=>t.chain().focus().toggleHeading({level:2}).run(),children:c.jsx(c8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Heading 3",active:t.isActive("heading",{level:3}),onClick:()=>t.chain().focus().toggleHeading({level:3}).run(),children:c.jsx(d8,{className:"w-4 h-4"})}),c.jsx(Ym,{}),c.jsx(mr,{title:"Bold (⌘B)",active:t.isActive("bold"),onClick:()=>t.chain().focus().toggleBold().run(),testId:"rt-bold",children:c.jsx(UH,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Italic (⌘I)",active:t.isActive("italic"),onClick:()=>t.chain().focus().toggleItalic().run(),children:c.jsx(x8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Underline (⌘U)",active:t.isActive("underline"),onClick:()=>t.chain().focus().toggleUnderline().run(),testId:"rt-underline",children:c.jsx(gK,{className:"w-4 h-4"})}),c.jsx(Ym,{}),c.jsx(mr,{title:"Bullet list",active:t.isActive("bulletList"),onClick:()=>t.chain().focus().toggleBulletList().run(),testId:"rt-bullet",children:c.jsx(D8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Numbered list",active:t.isActive("orderedList"),onClick:()=>t.chain().focus().toggleOrderedList().run(),testId:"rt-numbered",children:c.jsx(O8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Decrease indent",onClick:a,disabled:!t.isActive("listItem"),children:c.jsx(E8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Increase indent",onClick:i,disabled:!t.isActive("listItem"),children:c.jsx(A8,{className:"w-4 h-4"})}),c.jsx(Ym,{}),c.jsx(mr,{title:"Quote",active:t.isActive("blockquote"),onClick:()=>t.chain().focus().toggleBlockquote().run(),children:c.jsx(Q8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Link",active:t.isActive("link"),onClick:s,children:c.jsx(C8,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Insert image",onClick:e,disabled:n,testId:"rt-image",children:n?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):c.jsx(LP,{className:"w-4 h-4"})}),c.jsx(Ym,{}),c.jsx(mr,{title:"Undo",onClick:()=>
271t.chain().focus().undo().run(),disabled:!t.can().undo(),children:c.jsx(pK,{className:"w-4 h-4"})}),c.jsx(mr,{title:"Redo",onClick:()=>t.chain().focus().redo().run(),disabled:!t.can().redo(),children:c.jsx(J8,{className:"w-4 h-4"})}),r&&c.jsx("span",{className:"ml-2 text-xs text-red-600",children:r})]})}function x1e({value:t,onChange:e,placeholder:n}){const{getToken:r}=ax(),s=N.useRef(null),[i,a]=N.useState(!1),[l,d]=N.useState(null),h=kve({extensions:[d1e.configure({codeBlock:!1,link:!1,underline:!1}),Bwe,bwe.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),p1e.configure({inline:!1,allowBase64:!1})],content:t||"<p></p>",editorProps:{attributes:{class:"prose prose-neutral max-w-none min-h-[480px] px-5 py-4 focus:outline-none prose-headings:font-black prose-headings:uppercase prose-headings:tracking-tight prose-h2:text-2xl prose-h3:text-xl prose-p:text-neutral-800 prose-li:text-neutral-800 prose-a:text-[var(--feature-color-hover)] prose-strong:text-neutral-900 prose-blockquote:border-l-4 prose-blockquote:border-[var(--feature-color)] prose-blockquote:text-neutral-700 prose-img:rounded prose-img:my-6"}},onUpdate:({editor:g})=>{e(g.getHTML())}});N.useEffect(()=>{if(!h)return;const g=h.getHTML();(t||"<p></p>")!==g&&h.commands.setContent(t||"<p></p>",{emitUpdate:!1})},[t,h]);const p=N.useCallback(()=>{d(null),s.current?.click()},[d]),m=async g=>{if(h){a(!0),d(null);try{const x=await r(),v=await g1e(g,x);h.chain().focus().setImage({src:v}).run()}catch(x){d(x instanceof Error?x.message:"Upload failed")}finally{a(!1),s.current&&(s.current.value="")}}};return h?c.jsxs("div",{"data-testid":"rich-text-editor",children:[c.jsx(y1e,{editor:h,onPickImage:p,uploading:i,uploadError:l}),c.jsxs("div",{className:"border border-neutral-200 rounded-b bg-white",children:[c.jsx(PB,{editor:h}),!t&&n&&c.jsx("div",{className:"px-5 -mt-[460px] pointer-events-none text-neutral-400 text-sm hidden",children:n})]}),c.jsx("input",{ref:s,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:g=>{const x=g.target.files?.[0];x&&m(x)}})]}):c.jsx("div",{className:"border border-neutral-200 rounded p-6 text-sm text-neutral-500",children:"Loading editor…"})}function b1e({value:t,onChange:e}){const{getToken:n}=ax(),r=N.useRef(null),[s,i]=N.useState(!1),[a,l]=N.useState(!1),[d,h]=N.useState(null),p=t?decodeURIComponent(t.split("/").pop()??"document.pdf"):null,m=async g=>{if(h(null),g.type!=="application/pdf"){h("Only PDF files are supported.");return}if(g.size>25*1024*1024){h("File must be under 25 MB.");return}i(!0);try{let x=null;try{x=await n()}catch{}const v={"Content-Type":"application/pdf"};x&&(v.Authorization=`Bearer ${x}`);const S=await g.arrayBuffer(),C=`/api/storage/uploads?name=${encodeURIComponent(g.name)}`,j=await fetch(C,{method:"POST",headers:v,credentials:"include",body:S});if(!j.ok){const A=await j.text().catch(()=>"");throw new Error(`Upload failed (${j.status}) ${A}`)}const{objectPath:E}=await j.json();e(`/api/storage${E}`)}catch(x){h(x instanceof Error?x.message:"Upload failed.")}finally{i(!1)}};return c.jsxs("div",{children:[c.jsxs("label",{className:"block text-xs uppercase tracking-wider text-neutral-500 mb-2",children:["PDF attachment ",c.jsx("span",{className:"text-red-500",children:"*"})," ",c.jsx("span",{className:"normal-case text-neutral-400 font-normal",children:"(required)"})]}),t&&c.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mb-3 border border-[#099492]/40 rounded bg-[#099492]/5",children:[c.jsx(Ng,{className:"w-5 h-5 text-[#099492] shrink-0"}),c.jsx("span",{className:"text-sm text-neutral-700 flex-1 truncate",title:p??t,children:p}),c.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-neutral-400 hover:text-[#099492] transition shrink-0",title:"View PDF",children:c.jsx(da,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>{e(""),h(null)},className:"text-neutral-400 hover:text-red-500 transition shrink-0",title:"Remove PDF",children:c.jsx(Zs,{className:"w-4 h-4"})})]}),c.jsx("div",{onDrop:g=>{g.preventDefault(),l(!1);const x=g.dataTransfer.files?.[0];x&&m(x)},onDragOver:g=>{g.preventDefault(),l(!0)},onDragLeave:()=>l(!1),onClick:()=>
271!s&&r.current?.click(),className:`cursor-pointer rounded border-2 border-dashed transition-colors flex flex-col items-center justify-center gap-2 px-6 py-8 ${a?"border-[#099492] bg-[#099492]/10":"border-neutral-300 bg-neutral-50 hover:border-[#099492]/60 hover:bg-[#099492]/5"} ${s?"pointer-events-none opacity-70":""}`,children:s?c.jsxs(c.Fragment,{children:[c.jsx(Be,{className:"w-7 h-7 text-[#099492] animate-spin"}),c.jsx("p",{className:"text-sm text-neutral-500 font-medium",children:"Uploading…"})]}):c.jsxs(c.Fragment,{children:[c.jsx(e8,{className:`w-7 h-7 ${a?"text-[#099492]":"text-neutral-400"}`}),c.jsx("p",{className:"text-sm font-medium text-neutral-600",children:a?"Drop PDF here":t?"Drag & drop to replace, or click to browse":"Drag & drop a PDF, or click to browse"}),c.jsx("p",{className:"text-xs text-neutral-400",children:"PDF only · max 25 MB"})]})}),c.jsx("input",{ref:r,type:"file",accept:"application/pdf",className:"hidden",onChange:g=>{const x=g.target.files?.[0];x&&m(x),g.target.value=""}}),d&&c.jsxs("div",{className:"flex items-center gap-1.5 mt-2 text-xs text-red-600",children:[c.jsx(kt,{className:"w-3.5 h-3.5 shrink-0"}),d]}),c.jsx("p",{className:"mt-1.5 text-xs text-neutral-500",children:"Required. Uploaded PDF becomes the download link on the public Insights page."})]})}function Ww(t){return t.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,240)}function hF(t){try{return new Date(t).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}catch{return""}}function v1e(t){const e=new Date(t);if(Number.isNaN(e.getTime()))return"";const n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${n}-${r}-${s}`}function w1e(t){return t?new Date(`${t}T00:00:00.000Z`).toISOString():new Date().toISOString()}function Gw(t){return{slug:t.slug,title:t.title,category:t.category,excerpt:t.excerpt??"",coverImageUrl:t.coverImageUrl??"",sourceUrl:t.sourceUrl??"",bodyHtml:t.bodyHtml??"",isPublished:t.isPublished,publishedAt:t.publishedAt}}function S1e(){const t=YX(),e=ZX(),[n,r]=N.useState(""),[s,i]=N.useState(!1),a=t.data?n!==t.data.subtitle:!1;N.useEffect(()=>{t.data&&r(t.data.subtitle??"")},[t.data]);const l=()=>{e.mutate({data:{subtitle:n}},{onSuccess:()=>{t.refetch(),i(!0),setTimeout(()=>i(!1),2500)}})};return c.jsxs("div",{className:"mb-8",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx("div",{className:"w-1 h-5 rounded-full bg-[#0BB9B7]"}),c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.25em] text-neutral-500",children:"Page hero subtitle"})]}),c.jsxs("div",{className:"bg-white border border-neutral-200 rounded p-5",children:[c.jsxs("p",{className:"text-sm text-neutral-500 mb-3",children:["This text appears on the public ",c.jsx("strong",{className:"text-neutral-700",children:"/stories"}),' page beneath the "News & Insights" heading.']}),c.jsx("textarea",{value:n,onChange:d=>{r(d.target.value),i(!1)},rows:3,className:"w-full text-sm border border-neutral-200 rounded px-3 py-2 focus:outline-none focus:border-[#099492] resize-none",placeholder:"Subtitle shown below the page heading…"}),c.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[c.jsx("button",{onClick:l,disabled:!a||e.isPending,className:"px-3 py-1.5 rounded bg-[#003320] text-white text-xs font-bold hover:bg-[#099492] transition disabled:opacity-50",children:e.isPending?"Saving…":"Save"}),s&&c.jsx("span",{className:"text-xs text-[#099492] font-medium",children:"Saved ✓"}),t.isError&&c.jsx("span",{className:"text-xs text-red-500",children:"Failed to load — check your connection"})]})]})]})}function k1e(){const t=kn(),e=cX({query:{staleTime:0}}),n=N.useMemo(()=>e.data??[],[e.data]),[r,s]=N.useState(null),[i,a]=N.useState(""),[l,d]=N.useState("All");N.useEffect(()=>{if(n.length===0){s(null);return}(!r||!n.some(x=>x.id===r))&&s(n[0].id)},[n,r]);const h=N.useMemo(()=>{const x=i.trim().toLowerCase();return n.filter(v=>{const S=l==="All"||v.category===l,C=!x||v.title.toLowerCase().includes(x)||v.slug.toLowerCase().includes(x)||v.category.toLowerCase().includes(x);return S&&C})},[n,i,l]),p=n.find(x=>x.id===r)??null,m=fX({mutation:{onSuccess:x=>{t.invalidateQueries({queryKey:Og()}),s(x.id)}}}),g=()=>{const x=new Date,v=`${x.getFullYear()}${String(x.getMonth()+1).padStart(2,"0")}${String(x.getDate()).padStart(2,"0")}-${String(x.getHours()).padStart(2,"0")}${String(x.getMinutes()).padStart(2,"0")}`;m.mutate({data:{slug:`untitled-story-${v}`,title:"Untitled story",category:"Insights",bodyHtml:"<p></p>",isPublished:!1,publishedAt:x.toISOString()}})};return c.jsx("div",{className:"bg-neutral-100 min-h-screen pt-6 pb-20",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("header",{className:"flex items-center justify-between mb-6",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:[c.jsx(MP,{className:"w-3.5 h-3.5"}),"Stories"]}),c.jsx("h1",{className:"text-3xl font-black uppercase tracking-tight text-neutral-900",children:"News & insights"})]}),c.jsxs("button",{onClick:g,disabled:m.isPending,className:"inline-flex items-center gap-2 px-4 py-2 rounded bg-[#003320] text-white text-sm font-bold hover:bg-[#099492] transition disabled:opacity-60","data-testid":"button-new-story",children:[m.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):c.jsx(zn,{className:"w-4 h-4"}),"New story"]})]}),c.jsx(S1e,{}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[300px_1fr] gap-6 items-start",children:[c.jsxs("aside",{className:"bg-white border border-neutral-200 rounded overflow-hidden lg:sticky lg:top-6",children:[c.jsxs("div",{className:"p-3 border-b border-neutral-200 bg-neutral-50 space-y-2",children:[c.jsx("div",{className:"flex gap-1",children:["All","News","Insights"].map(x=>c.jsxs("button",{type:"button",onClick:()=>d(x),className:`px-2.5 py-1 rounded text-xs font-bold uppercase tracking-wider transition ${l===x?"bg-[#003320] text-white":"text-neutral-500 hover:bg-neutral-200"}`,children:[x,c.jsx("span",{className:"ml-1 font-normal opacity-70",children:x==="All"?n.length:n.filter(v=>v.category===x).length})]},x))}),c.jsxs("div",{className:"relative",children:[c.jsx(Uf,{className:"w-4 h-4 absolute left-2.5 top-1/2 -translate-y-1/2 text-neutral-400"}),c.jsx("input",{value:i,onChange:x=>a(x.target.value),placeholder:"Search stories…",className:"w-full pl-8 pr-2 py-1.5 text-sm rounded border border-neutral-200 bg-white focus:outline-none focus:border-[#099492]","data-testid":"input-search-stories"})]})]}),c.jsxs("div",{children:[e.isLoading&&c.jsxs("div",{className:"p-6 text-sm text-neutral-500 flex items-center gap-2",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"}),"Loading…"]}
271),!e.isLoading&&h.length===0&&c.jsx("div",{className:"p-6 text-sm text-neutral-500",children:n.length===0?"No stories yet. Click ‘New story’ to start.":"No matches."}),c.jsx("ul",{children:h.map(x=>{const v=x.id===r;return c.jsx("li",{children:c.jsxs("button",{onClick:()=>s(x.id),className:`w-full text-left flex gap-3 px-3 py-2.5 border-b border-neutral-100 transition ${v?"bg-[#003320]/5 border-l-4 border-l-[#099492] pl-2":"hover:bg-neutral-50 border-l-4 border-l-transparent pl-2"}`,"data-testid":`story-list-item-${x.slug}`,children:[c.jsx("div",{className:"w-12 h-12 rounded bg-neutral-200 overflow-hidden flex-shrink-0",children:x.coverImageUrl?c.jsx("img",{src:x.coverImageUrl,alt:"",className:"w-full h-full object-cover"}):null}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"text-[11px] font-bold uppercase tracking-widest flex items-center gap-2 mb-0.5",children:[c.jsx("span",{className:x.category==="Insights"?"text-[#099492]":"text-neutral-500",children:x.category}),!x.isPublished&&c.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-100 text-amber-800 normal-case tracking-normal font-semibold",children:"Draft"})]}),c.jsx("div",{className:"text-sm font-bold text-neutral-900 leading-tight line-clamp-2",children:x.title}),c.jsx("div",{className:"text-[11px] text-neutral-500 mt-0.5",children:hF(x.publishedAt)})]})]})},x.id)})})]})]}),c.jsx("section",{className:"min-w-0",children:p?c.jsx(C1e,{story:p},p.id):c.jsxs("div",{className:"border-2 border-dashed border-neutral-300 rounded p-12 text-center text-sm text-neutral-500 bg-white",children:["Pick a story on the left, or click ",c.jsx("strong",{children:"New story"})," ","to create one."]})})]})]})})}function C1e({story:t}){const e=kn(),[n,r]=N.useState(()=>Gw(t)),s=N.useRef(n),[i,a]=N.useState(null),[l,d]=N.useState(()=>Ww(t.title)===t.slug);N.useEffect(()=>{const S=Gw(t);r(S),s.current=S,a(null),d(Ww(t.title)===t.slug)},[t.id]);const h=yX({mutation:{onSuccess:S=>{e.invalidateQueries({queryKey:Og()});const C=Gw(S);s.current=C,r(C)},onError:S=>{a(S.response?.data?.error??"Failed to save.")}}}),p=wX({mutation:{onSuccess:()=>{e.invalidateQueries({queryKey:Og()})}}}),m=JSON.stringify(n)!==JSON.stringify(s.current),g=()=>{if(a(null),!n.title.trim()){a("Title is required.");return}if(!n.slug.trim()||!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n.slug)){a("Slug must be lowercase letters, numbers, and dashes.");return}if(n.category==="Insights"&&!n.sourceUrl.trim()){a("A PDF document is required for Insights stories.");return}h.mutate({id:t.id,data:{slug:n.slug.trim(),title:n.title.trim(),category:n.category,excerpt:n.excerpt.trim()||null,coverImageUrl:n.coverImageUrl.trim()||null,sourceUrl:n.sourceUrl.trim()||null,bodyHtml:n.bodyHtml,isPublished:n.isPublished,publishedAt:n.publishedAt}})},x=()=>{window.confirm(`Delete “${t.title}”? This cannot be undone.`)&&p.mutate({id:t.id})},v=S=>{r(C=>({...C,title:S,slug:l?Ww(S):C.slug}))};return c.jsxs("div",{className:"bg-white border border-neutral-200 rounded p-6 lg:p-8 space-y-6",children:[c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-neutral-200",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:"Edit story"}),c.jsx("h2",{className:"text-xl font-black uppercase tracking-tight text-neutral-900 truncate",children:n.title||"Untitled"}),c.jsxs("div",{className:"mt-1 text-xs text-neutral-500",children:["Last saved ",hF(t.updatedAt)," ·"," ",c.jsxs("code",{className:"text-[11px]",children:["/stories/",n.slug]})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:x,disabled:p.isPending,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm rounded border border-red-300 text-red-700 hover:bg-red-50 disabled:opacity-60","data-testid":"button-delete-story",children:[c.jsx(qn,{className:"w-4 h-4"}),"Delete"]}),c.jsxs("button",{type:"button",onClick:g,disabled:!m||h.isPending,className:"inline-flex items-center gap-1.5 px-4 py-1.5 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-story",children:[h.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,m?"Save changes":"Saved"]})]})]}),i&&c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:i})]}),c.jsx(nu,{label:"Title",children:c.jsx("input",{className:"input",value:n.title,onChange:S=>v(S.target.value),placeholder:"Untitled story","data-testid":"input-story-title"})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsx(nu,{label:"Slug",hint:"URL: /stories/your-slug",children:c.jsx("input",{className:"input font-mono text-sm",value:n.slug,onChange:S=>{d(!1),r({...n,slug:S.target.value})},"data-testid":"input-story-slug"})}),c.jsx(nu,{label:"Category",children:c.jsxs("select",{className:"input",value:n.category,onChange:S=>r({...n,category:S.target.value}),"data-testid":"select-story-category",children:[c.jsx("option",{value:"News",children:"News"}),c.jsx("option",{value:"Insights",children:"Insights"})]})}),c.jsx(nu,{label:"Date",children:c.jsx("input",{type:"date",className:"input",value:v1e(n.publishedAt),onChange:S=>r({...n,publishedAt:w1e(S.target.value)}),"data-testid":"input-story-date"})})]}),n.category==="Insights"?c.jsx(b1e,{value:n.sourceUrl,onChange:S=>r({...n,sourceUrl:S})}):c.jsx(nu,{label:"Original source URL (optional)",hint:"Linked from the bottom of the public story page.",children:c.jsx("input",{className:"input",value:n.sourceUrl,onChange:S=>r({...n,sourceUrl:S.target.value}),placeholder:"https://…","data-testid":"input-story-source"})}),c.jsx(Ss,{label:"Cover image",hint:n.category==="Insights"?"Document cover shown beside the body text. Upload at its natural size — no crop is forced.":"Landscape 16:9 hero image shown on the listing and at the top of the story.",value:n.coverImageUrl,onChange:S=>r({...n,coverImageUrl:S}),aspect:n.category==="Insights"?1/1.414:16/9,outputWidth:n.category==="Insights"?800:1920,shape:"rect",free
271Crop:n.category==="Insights",testId:"upload-story-cover"}),c.jsx(nu,{label:"Excerpt (optional)",hint:"Short summary used for previews and SEO.",children:c.jsx("textarea",{className:"input min-h-[80px]",value:n.excerpt,onChange:S=>r({...n,excerpt:S.target.value}),placeholder:"One or two lines summarising the story…","data-testid":"input-story-excerpt"})}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs uppercase tracking-wider text-neutral-500 mb-2",children:"Body"}),c.jsx(x1e,{value:n.bodyHtml,onChange:S=>r(C=>({...C,bodyHtml:S}))})]}),c.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-neutral-200",children:[c.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:n.isPublished,onChange:S=>r({...n,isPublished:S.target.checked}),className:"w-4 h-4 accent-[#099492]","data-testid":"checkbox-story-published"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm font-bold text-neutral-900",children:"Published"}),c.jsx("div",{className:"text-xs text-neutral-500",children:"When off, the story is hidden from the public site."})]})]}),c.jsxs("button",{type:"button",onClick:g,disabled:!m||h.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50",children:[h.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,m?"Save changes":"Saved"]})]})]})}function nu({label:t,hint:e,children:n}){return c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs uppercase tracking-wider text-neutral-500 mb-2",children:t}),n,e&&c.jsx("p",{className:"mt-1.5 text-xs text-neutral-500",children:e})]})}function fF(t,e){if(!t)return e;const n=t;return n?.response?.data?.error??n?.message??e}const Qm={heading:"Report a concern.",subheading:"We take responsible conduct seriously.",paragraphs:["100x100 is committed to ethical business practices and will endeavour to handle any grievances related to our firm, our team, or our portfolio companies in a fair and timely manner.","Our grievance redressal channel is available for anyone wishing to raise concerns linked to suspected misconduct, fraud, or practices that could cause environmental, social, or ethical harm.","We review every submission thoroughly and treat all information with discretion.","All concerns received through this channel undergo a preliminary assessment. 100x100 reserves the right to dismiss any grievance deemed frivolous or irrelevant."],contactEmail:"[email protected]",contactAddress:["100x100","2b Jiak Chuan Road","Singapore 089260","Attention: Compliance Officer"],privacyNotice:"Information shared through this channel will be handled confidentially and used solely to review and address the concern.",formFields:[{id:"name",label:"Full Name",type:"text",required:!0,placeholder:"e.g. Jane Doe",options:[]},{id:"email",label:"Email Address",type:"email",required:!0,placeholder:"e.g. [email protected]",options:[]},{id:"description",label:"Concern Description",type:"textarea",required:!0,placeholder:"Please provide details...",options:[]}]};function N1e(){const t=PZ({query:{retry:!1}});return t.isLoading?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):t.error||!t.data?c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:fF(t.error,"Couldn't load Grievance page content.")})]})}):c.jsx(j1e,{initial:t.data})}function j1e({initial:t}){const e=kn(),[n,r]=N.useState({...Qm,...t,formFields:t.formFields??Qm.formFields}),s=N.useRef({...Qm,...t,formFields:t.formFields??Qm.formFields}),[i,a]=N.useState(null),l=JSON.stringify(n)!==JSON.stringify(s.current),d=BZ({mutation:{onSuccess:S=>{const C=S;s.current=C,r(C),a(Date.now()),e.invalidateQueries({queryKey:JL()})}}});function h(){d.mutate({data:n})}const p=(S,C)=>r(j=>({...j,[S]:C})),m=(S,C)=>{const j=[...n.formFields];j[S]={...j[S],...C},p("formFields",j)},g=S=>{n.formFields.length<=1||p("formFields",n.formFields.filter((C,j)=>j!==S))},x=(S,C)=>{if(S+C<0||S+C>=n.formFields.length)return;const j=[...n.formFields],E=j[S];j[S]=j[S+C],j[S+C]=E,p("formFields",j)},v=()=>{const S=`field_${Date.now()}`;p("formFields",[...n.formFields,{id:S,label:"New Field",type:"text",required:!1,placeholder:"",options:[]}])};return c.jsxs("div",{className:"p-8 max-w-4xl",children:[c.jsxs("div",{className:"mb-6",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Grievance Redressal"}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Edit the content of the public grievance redressal page and intake form."})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs(gh,{title:"Hero",children:[c.jsx(Zi,{label:"Headline",children:c.jsx("input",{type:"text",value:n.heading,onChange:S=>p("heading",S.target.value),className:Is})}),c.jsx(Zi,{label:"Subheadline",children:c.jsx("input",{type:"text",value:n.subheading,onChange:S=>p("subheading",S.target.value),className:Is})})]}),c.jsx(gh,{title:"Body paragraphs",children:c.jsxs("div",{className:"space-y-3",children:[n.paragraphs.map((S,C)=>c.jsxs("div",{className:"flex gap-2",children:[c.jsx("textarea",{rows:3,value:S,onChange:j=>{const E=[...n.paragraphs];E[C]=j.target.value,p("paragraphs",E)},className:`${Is} flex-1 resize-y`}),c.jsx("button",{type:"button",onClick:()=>p("paragraphs",n.paragraphs.filter((j,E)=>E!==C)),className:"p-1.5 rounded text-gray-400 hover:text-red-600 hover:bg-red-50 self-start mt-0.5",title:"Remove paragraph",children:c.jsx(qn,{
271className:"w-4 h-4"})})]},C)),c.jsxs("button",{type:"button",onClick:()=>p("paragraphs",[...n.paragraphs,""]),className:"inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900 border border-dashed border-gray-300 rounded px-3 py-1.5 hover:border-gray-400 transition-colors",children:[c.jsx(zn,{className:"w-3.5 h-3.5"})," Add paragraph"]})]})}),c.jsxs(gh,{title:"Contact details",children:[c.jsx(Zi,{label:"Email address",children:c.jsx("input",{type:"email",value:n.contactEmail,onChange:S=>p("contactEmail",S.target.value),className:Is})}),c.jsx(Zi,{label:"Postal address lines",children:c.jsxs("div",{className:"space-y-2",children:[n.contactAddress.map((S,C)=>c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",value:S,onChange:j=>{const E=[...n.contactAddress];E[C]=j.target.value,p("contactAddress",E)},className:`${Is} flex-1`}),c.jsx("button",{type:"button",onClick:()=>p("contactAddress",n.contactAddress.filter((j,E)=>E!==C)),className:"p-1.5 rounded text-gray-400 hover:text-red-600 hover:bg-red-50",title:"Remove line",children:c.jsx(qn,{className:"w-4 h-4"})})]},C)),c.jsxs("button",{type:"button",onClick:()=>p("contactAddress",[...n.contactAddress,""]),className:"inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900 border border-dashed border-gray-300 rounded px-3 py-1.5 hover:border-gray-400 transition-colors",children:[c.jsx(zn,{className:"w-3.5 h-3.5"})," Add line"]})]})})]}),c.jsx(gh,{title:"Privacy notice",children:c.jsx("textarea",{rows:3,value:n.privacyNotice,onChange:S=>p("privacyNotice",S.target.value),className:`${Is} w-full resize-y`})}),c.jsx(gh,{title:"Intake Form Fields",children:c.jsxs("div",{className:"space-y-4",children:[n.formFields.map((S,C)=>c.jsxs("div",{className:"p-4 border border-gray-200 rounded-md bg-gray-50 flex gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-1 pt-1",children:[c.jsx("button",{type:"button",onClick:()=>x(C,-1),disabled:C===0,className:"p-1 text-gray-400 hover:text-gray-900 disabled:opacity-30 disabled:cursor-not-allowed",title:"Move up",children:c.jsx(LH,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>x(C,1),disabled:C===n.formFields.length-1,className:"p-1 text-gray-400 hover:text-gray-900 disabled:opacity-30 disabled:cursor-not-allowed",title:"Move down",children:c.jsx(OH,{className:"w-4 h-4"})})]}),c.jsxs("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(Zi,{label:"Field Label",children:c.jsx("input",{type:"text",value:S.label,onChange:j=>m(C,{label:j.target.value}),className:Is})}),c.jsx(Zi,{label:"Field Type",children:c.jsxs("select",{value:S.type,onChange:j=>m(C,{type:j.target.value}),className:Is,children:[c.jsx("option",{value:"text",children:"Short Text"}),c.jsx("option",{value:"textarea",children:"Long Text (Textarea)"}),c.jsx("option",{value:"email",children:"Email"}),c.jsx("option",{value:"tel",children:"Phone"}),c.jsx("option",{value:"select",children:"Dropdown Select"})]})}),c.jsx("div",{className:"flex items-center mt-6",children:c.jsxs("label",{className:"flex items-center gap-2 text-sm font-medium text-gray-700 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:S.required,onChange:j=>m(C,{required:j.target.checked}),className:"rounded border-gray-300 text-[#003320] focus:ring-[#003320] w-4 h-4"}),"Required field"]})}),S.type!=="select"&&c.jsx(Zi,{label:"Placeholder",children:c.jsx("input",{type:"text",value:S.placeholder||"",onChange:j=>m(C,{placeholder:j.target.value}),className:Is,placeholder:"e.g. Enter your name"})}),S.type==="select"&&c.jsx(Zi,{label:"Select Options (comma-separated)",children:c.jsx("input",{type:"text",value:(S.options||[]).join(", "),onChange:j=>m(C,{options:j.target.value.split(",").map(E=>E.trim()).filter(Boolean)}),className:Is,placeholder:"Option 1, Option 2, Option 3"})}),c.jsx("div",{className:"md:col-span-2 mt-2",children:c.jsx(Zi,{label:"Field ID (Internal)",children:c.jsx("input",{type:"text",value:S.id,onChange:j=>m(C,{id:j.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"_")}),className:`${Is} bg-gray-100 text-gray-500 font-mono text-xs`,placeholder:"e.g. first_name"})})})]}),c.jsx("div",{className:"pt-1",children:c.jsx("button",{type:"button",onClick:()=>g(C),className:"p-1.5 rounded text-gray-400 hover:text-red-600 hover:bg-red-50",title:"Remove field",children:c.jsx(qn,{
vendor: 6,526 bytes, line 271
271className:"w-5 h-5"})})})]},S.id)),c.jsxs("button",{type:"button",onClick:v,className:"inline-flex items-center gap-1.5 text-sm font-medium text-[#003320] hover:text-[#099492] border border-dashed border-[#003320]/30 rounded-md w-full justify-center py-4 hover:border-[#099492]/50 hover:bg-[#099492]/5 transition-colors",children:[c.jsx(zn,{className:"w-4 h-4"})," Add Form Field"]})]})})]}),c.jsxs("div",{className:"sticky bottom-0 mt-8 -mx-8 px-8 py-4 bg-white border-t border-gray-200 flex items-center gap-4",children:[c.jsxs("button",{type:"button",onClick:h,disabled:!l||d.isPending,className:"inline-flex items-center gap-2 px-5 py-2.5 rounded bg-[#003320] text-white text-sm font-bold uppercase tracking-wider hover:bg-[#099492] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):c.jsx(Xl,{className:"w-4 h-4"}),"Save changes"]}),d.error?c.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-red-700",children:[c.jsx(kt,{className:"w-3.5 h-3.5"}),fF(d.error,"Save failed.")]}):!d.error&&i&&!l?c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-emerald-700 font-semibold",children:[c.jsx(Lf,{className:"w-3 h-3"})," Saved"]}):null]})]})}function gh({title:t,children:e}){return c.jsxs("section",{className:"rounded border border-gray-200 bg-white",children:[c.jsx("header",{className:"px-5 py-3 border-b border-gray-100 bg-white sticky top-0 z-10 rounded-t",children:c.jsx("h2",{className:"text-sm font-semibold text-gray-900",children:t})}),c.jsx("div",{className:"px-5 py-4 space-y-4",children:e})]})}function Zi({label:t,children:e}){return c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:t}),e]})}const Is="w-full px-2.5 py-1.5 text-sm rounded border border-gray-300 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500";function ti(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function Wl(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const pF=6048e5,E1e=864e5;let T1e={};function Wx(){return T1e}function Tf(t,e){const n=Wx(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=ti(t),i=s.getDay(),a=(i<r?7:0)+i-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function Wy(t){return Tf(t,{weekStartsOn:1})}function mF(t){const e=ti(t),n=e.getFullYear(),r=Wl(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=Wy(r),i=Wl(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const a=Wy(i);return e.getTime()>=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function FD(t){const e=ti(t);return e.setHours(0,0,0,0),e}function zD(t){const e=ti(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function A1e(t,e){const n=FD(t),r=FD(e),s=+n-zD(n),i=+r-zD(r);return Math.round((s-i)/E1e)}function M1e(t){const e=mF(t),n=Wl(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Wy(n)}function O1e(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function R1e(t){if(!O1e(t)&&typeof t!="number")return!1;const e=ti(t);return!isNaN(Number(e))}function D1e(t){const e=ti(t),n=Wl(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _1e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},P1e=(t,e,n)=>{let r;const s=_1e[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Yw(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const L1e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},I1e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},U1e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B1e={date:Yw({formats:L1e,defaultWidth:"full"}),time:Yw({formats:I1e,defaultWidth:"full"}),dateTime:Yw({formats:U1e,defaultWidth:"full"})},F1e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},z1e=(t,e,n,r)=>F1e[t];function yh(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,l=n?.width?String(n.width):a;s=t.formattingValues[l]||t.formattingValues[a]}else{const a=t.defaultWidth,l=n?.width?String(n.width):t.defaultWidth;s=t.values[l]||t.values[a]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const q1e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},V1e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$1e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},H1e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
271ay","Saturday"]},K1e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},W1e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},G1e=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Y1e={ordinalNumber:G1e,era:yh({values:q1e,defaultWidth:"wide"}),quarter:yh({values:V1e,defaultWidth:"wide",argumentCallback:t=>t-1}),month:yh({values:$1e,defaultWidth:"wide"}),day:yh({values:H1e,defaultWidth:"wide"}),dayPeriod:yh({values:K1e,defaultWidth:"wide",formattingValues:W1e,defaultFormattingWidth:"wide"})};function xh(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const a=i[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(l)?X1e(l,m=>m.test(a)):Q1e(l,m=>m.test(a));let h;h=t.valueCallback?t.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const p=e.slice(a.length);return{value:h,rest:p}}}function Q1e(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function X1e(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function J1e(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let a=t.valueCallback?t.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=e.slice(s.length);return{value:a,rest:l}}}const Z1e=/^(\d+)(th|st|nd|rd)?/i,eSe=/\d+/i,tSe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nSe={any:[/^b/i,/^(a|c)/i]},rSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sSe={any:[/1/i,/2/i,/3/i,/4/i]},iSe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},aSe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oSe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lSe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cSe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uSe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dSe={ordinalNumber:J1e({matchPattern:Z1e,parsePattern:eSe,valueCallback:t=>parseInt(t,10)}),era:xh({matchPatterns:tSe,defaultMatchWidth:"wide",parsePatterns:nSe,defaultParseWidth:"any"}),quarter:xh({matchPatterns:rSe,defaultMatchWidth:"wide",parsePatterns:sSe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:xh({matchPatterns:iSe,defaultMatchWidth:"wide",parsePatterns:aSe,defaultParseWidth:"any"}),day:xh({matchPatterns:oSe,defaultMatchWidth:"wide",parsePatterns:lSe,defaultParseWidth:"any"}),dayPeriod:xh({matchPatterns:cSe,defaultMatchWidth:"any",parsePatterns:uSe,defaultParseWidth:"any"})},hSe={code:"en-US",formatDistance:P1e,formatLong:B1e,formatRelative:z1e,localize:Y1e,match:dSe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function fSe(t){const e=ti(t);return A1e(e,D1e(e))+1}function pSe(t){const e=ti(t),n=+Wy(e)-+M1e(e);return Math.round(n/pF)+1}function gF(t,e){const n=ti(t),r=n.getFullYear(),s=Wx(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=Wl(t,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=Tf(a,e),d=Wl(t,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const h=Tf(d,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function mSe(t,e){const n=Wx(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=gF(t,e),i=Wl(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),Tf(i,e)}function gSe(t,e){const n=ti(t),r=+Tf(n,e)-+mSe(n,e);return Math.round(r/pF)+1}function Et(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Xa={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return Et(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Et(n+1,2)},d(t,e){return Et(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Et(t.getHours()%12||12,e.length)},H(t,e){return Et(t.getHours(),e.length)},m(t,e){return Et(t.getMinutes(),e.length)},s(t,e){return Et(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return Et(s,e.length)}},ru={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qD={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Xa.y(t,e)},Y:function(t,e,n,r){const s=gF(t,r),i=s>0?s:1-s;if(e==="YY"){const a=i%100;return Et(a,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):Et(i,e.length)},R:function(t,e){const n=mF(t);return Et(n,e.length)},u:function(t,e){const n=t.getFullYear();return Et(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Et(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Et(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Xa.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return Et(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=gSe(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):Et(s,e.length)},I:function(t,e,n){const r=pSe(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):Et(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Xa.d(t,e)},D:function(t,e,n){const r=fSe(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Et(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Et(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Et(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return Et(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=ru.noon:r===0?s=ru.midnight:s=r/12>
vendor: 4,219 bytes, line 271
271=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=ru.evening:r>=12?s=ru.afternoon:r>=4?s=ru.morning:s=ru.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Xa.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Xa.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Et(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):Et(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Xa.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Xa.s(t,e)},S:function(t,e){return Xa.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return $D(r);case"XXXX":case"XX":return xl(r);default:return xl(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return $D(r);case"xxxx":case"xx":return xl(r);default:return xl(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+VD(r,":");default:return"GMT"+xl(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+VD(r,":");default:return"GMT"+xl(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return Et(r,e.length)},T:function(t,e,n){const r=t.getTime();return Et(r,e.length)}};function VD(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+Et(i,2)}function $D(t,e){return t%60===0?(t>0?"-":"+")+Et(Math.abs(t)/60,2):xl(t,e)}function xl(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Et(Math.trunc(r/60),2),i=Et(r%60,2);return n+s+e+i}const HD=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},yF=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ySe=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return HD(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",HD(r,e)).replace("{{time}}",yF(s,e))},xSe={p:yF,P:ySe},bSe=/^D+$/,vSe=/^Y+$/,wSe=["D","DD","YY","YYYY"];function SSe(t){return bSe.test(t)}function kSe(t){return vSe.test(t)}function CSe(t,e,n){const r=NSe(t,e,n);if(console.warn(r),wSe.includes(t))throw new RangeError(r)}function NSe(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jSe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ESe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TSe=/^'([^]*?)'?$/,ASe=/''/g,MSe=/[a-zA-Z]/;function OSe(t,e,n){const r=Wx(),s=r.locale??hSe,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=ti(t);if(!R1e(l))throw new RangeError("Invalid time value");let d=e.match(ESe).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=xSe[m];return g(p,s.formatLong)}return p}).join("").match(jSe).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:RSe(p)};if(qD[m])return{isToken:!0,value:p};
271if(m.match(MSe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});s.localize.preprocessor&&(d=s.localize.preprocessor(l,d));const h={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return d.map(p=>{if(!p.isToken)return p.value;const m=p.value;(kSe(m)||SSe(m))&&CSe(m,e,String(t));const g=qD[m[0]];return g(l,m,s.localize,h)}).join("")}function RSe(t){const e=t.match(TSe);return e?e[1].replace(ASe,"'"):t}function DSe(){const[t,e]=N.useState(""),n=VZ({query:{retry:!1}});if(n.isLoading)return c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})});if(n.error)return c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:"Couldn't load submissions."})]})});const r=n.data||[],s=r.filter(i=>{if(!t)return!0;const a=t.toLowerCase();return Object.values(i.responses).some(l=>typeof l=="string"&&l.toLowerCase().includes(a))});return c.jsxs("div",{className:"p-8 max-w-5xl",children:[c.jsxs("div",{className:"mb-6 flex flex-col md:flex-row md:items-end justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Grievance Inbox"}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Review and manage submitted grievances and concerns."})]}),c.jsxs("div",{className:"relative w-full md:w-64",children:[c.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:c.jsx(Uf,{className:"h-4 w-4 text-gray-400"})}),c.jsx("input",{type:"text",placeholder:"Search submissions...",value:t,onChange:i=>e(i.target.value),className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-[#003320] focus:border-[#003320] sm:text-sm transition duration-150 ease-in-out"})]})]}),c.jsxs("div",{className:"bg-white shadow rounded-lg border border-gray-200",children:[c.jsxs("div",{className:"border-b border-gray-200 px-6 py-4 flex items-center gap-3 bg-gray-50/50",children:[c.jsx(af,{className:"w-5 h-5 text-[#003320]"}),c.jsx("h2",{className:"text-sm font-semibold text-gray-900",children:"All Submissions"}),c.jsxs("span",{className:"ml-auto bg-gray-100 text-gray-600 py-0.5 px-2.5 rounded-full text-xs font-medium",children:[r.length," total"]})]}),s.length===0?c.jsxs("div",{className:"p-12 text-center flex flex-col items-center",children:[c.jsx(Du,{className:"w-12 h-12 text-gray-300 mb-4"}),c.jsx("p",{className:"text-gray-500 font-medium",children:"No submissions found"}),t&&c.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Try adjusting your search"})]}):c.jsx("ul",{className:"divide-y divide-gray-200",children:s.map(i=>c.jsx(_Se,{submission:i},i.id))})]})]})}function _Se({submission:t}){const[e,n]=N.useState(!1),r=kn(),s=WZ({mutation:{onSuccess:()=>{r.invalidateQueries({queryKey:ZL()})}}}),i=h=>{s.mutate({id:t.id,data:{status:h}})};let a="Anonymous Submission",l="";for(const h of t.fieldSnapshot){const p=t.responses[h.id];p&&(h.type==="email"||h.label.toLowerCase().includes("email")?l=p:(h.type==="text"&&h.label.toLowerCase().includes("name")&&a==="Anonymous Submission"||h.type==="text"&&h.label.toLowerCase().includes("subject")&&a==="Anonymous Submission")&&(a=p))}const d=t.status==="new";return c.jsxs("li",{className:`transition-colors ${d?"bg-[#003320]/5":"hover:bg-gray-50"}`,children:[c.jsxs("div",{className:"px-6 py-4 cursor-pointer flex items-center justify-between",onClick:()=>n(!e),children:[c.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[c.jsx("div",{className:"flex-shrink-0",children:t.status==="resolved"?c.jsx(If,{className:"w-5 h-5 text-emerald-600"}):t.status==="reviewed"?c.jsx(ak,{className:"w-5 h-5 text-amber-500"}):c.jsx(ok,{className:"w-5 h-5 text-[#003320]"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("p",{className:`text-sm truncate ${d?"font-bold text-gray-900":"font-medium text-gray-900"}`,children:a}),c.jsx(PSe,{status:t.status})]}),c.jsxs("div",{className:"flex items-center gap-4 mt-1",children:[c.jsx("p",{className:"text-xs text-gray-500 truncate",children:l||"No contact info provided"}),c.jsx("span",{className:"text-xs text-gray-400",children:"•"}),c.jsx("p",{className:"text-xs text-gray-500 truncate",children:OSe(new Date(t.submittedAt),"MMM d, yyyy 'at' h:mm a")})]})]})]}),c.jsx("div",{children:c.jsx(ik,{className:`w-5 h-5 text-gray-400 transition-transform ${e?"rotate-90":""}`})})]}),e&&c.jsx("div",{className:"px-6 pb-6 pt-2 bg-gray-50/80 border-t border-gray-100",children:c.jsxs("div",{className:"bg-white rounded border border-gray-200 p-5 mt-2",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6 pb-4 border-b border-gray-100",children:[c.jsx("h3",{className:"text-sm font-bold text-gray-900 uppercase tracking-wider",children:"Submission Details"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs font-medium text-gray-500 mr-2",children:"Update status:"}),c.jsxs("select",{value:t.status,onChange:h=>i(h.target.value),disabled:s.isPending,className:"text-xs font-medium rounded border border-gray-300 py-1 pl-2 pr-6 focus:ring-[#003320] focus:border-[#003320] disabled:opacity-50 bg-white",children:[c.jsx("option",{value:"new",children:"New"}),c.jsx("option",{value:"reviewed",children:"Under Review"}),c.jsx("option",{value:"resolved",children:"Resolved"})]}),s.isPending&&c.jsx(Be,{className:"w-3 h-3 animate-spin text-gray-400"})]})]}),c.jsx("dl",{className:"space-y-6",children:t.fieldSnapshot.map(h=>{const p=t.responses[h.id];return c.jsxs("div",{children:[c.jsx("dt",{className:"text-xs font-semibold text-gray-500 mb-1.5 uppercase tracking-wide",children:h.label}),c.jsx("dd",{className:"text-sm text-gray-900 whitespace-pre-wrap leading-relaxed",children:p||c.jsx("span",{className:"text-gray-400 italic",children:"No response"})})]}
271,h.id)})})]})})]})}function PSe({status:t}){return t==="resolved"?c.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-emerald-100 text-emerald-800",children:"Resolved"}):t==="reviewed"?c.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-amber-100 text-amber-800",children:"Reviewing"}):c.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-[#003320] text-white",children:"New"})}const LSe=[{category:"Overview",links:[{label:"Home",href:"/"},{label:"Our Thesis",href:"/thesis"}]},{category:"For Founders",links:[{label:"For Founders",href:"/founders"},{label:"Apply",href:"/apply"}]},{category:"For Investors",links:[{label:"For Investors",href:"/investors"},{label:"Portfolio",href:"/companies"}]},{category:"Company",links:[{label:"Team",href:"/team"},{label:"Stories",href:"/stories"},{label:"Careers",href:"/careers"}]},{category:"Legal",links:[{label:"Grievance Redressal",href:"/grievance-redressal"}]},{category:"Utilities",links:[{label:"Sitemap",href:"/sitemap"}]}],ISe=[{category:"Content pages",links:[{label:"Homepage",href:"/admin/homepage"},{label:"For Founders",href:"/admin/founders"},{label:"Apply page",href:"/admin/apply"},{label:"For Investors",href:"/admin/investors"},{label:"Thesis",href:"/admin/thesis"},{label:"Grievance Redressal",href:"/admin/grievance"}]},{category:"Operations",links:[{label:"Applications",href:"/admin/founder-applications"},{label:"Portfolio",href:"/admin/companies"},{label:"Team",href:"/admin/team"},{label:"Stories",href:"/admin/stories"},{label:"Careers",href:"/admin/jobs"}]},{category:"System",links:[{label:"Settings",href:"/admin/settings"},{label:"Audit log",href:"/admin/audit-log"}]}];function USe(){return c.jsxs("div",{className:"p-8 max-w-4xl",children:[c.jsxs("div",{className:"mb-8",children:[c.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center gap-2",children:[c.jsx(UP,{className:"w-5 h-5 text-emerald-600"})," Sitemap"]}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Every public page and admin section in one place."})]}),c.jsxs("section",{className:"rounded border border-gray-200 bg-white mb-6",children:[c.jsxs("header",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Public site"}),c.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"Pages visible to all visitors at 100x100.com"})]}),c.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-emerald-700 hover:underline font-medium",children:["Open site ",c.jsx(da,{className:"w-3 h-3"})]})]}),c.jsx("div",{className:"divide-y divide-gray-50",children:LSe.map(t=>c.jsxs("div",{className:"grid grid-cols-4 px-6 py-4 gap-4",children:[c.jsx("div",{className:"col-span-1",children:c.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-gray-400",children:t.category})}),c.jsx("div",{className:"col-span-3 flex flex-wrap gap-x-8 gap-y-2",children:t.links.map(e=>c.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm font-medium text-gray-700 hover:text-emerald-700 hover:underline transition-colors",children:[e.label,c.jsx(da,{className:"w-3 h-3 opacity-40"})]},e.href))})]},t.category))})]}),c.jsxs("section",{className:"rounded border border-gray-200 bg-white",children:[c.jsxs("header",{className:"px-6 py-4 border-b border-gray-100",children:[c.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Admin CMS"}),c.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"All sections available in this admin panel"})]}),c.jsx("div",{className:"divide-y divide-gray-50",children:ISe.map(t=>c.jsxs("div",{className:"grid grid-cols-4 px-6 py-4 gap-4",children:[c.jsx("div",{className:"col-span-1",children:c.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-gray-400",children:t.category})}),c.jsx("div",{className:"col-span-3 flex flex-wrap gap-x-8 gap-y-2",children:t.links.map(e=>c.jsx("a",{href:e.href,className:"text-sm font-medium text-gray-700 hover:text-emerald-700 hover:underline transition-colors",children:e.label},e.href))})]},t.category))})]}),c.jsxs("p",{className:"mt-8 text-xs text-gray-400",children:["© ",new Date().getFullYear()," 100x100 Pte Ltd"]})]})}const su={hero:"Hero",statement:"Model Statement",process:`Process — "We don't pick 
271winners"`,sectorsSection:"Sectors",stats:"Stats",pathways:"Pathways (CTAs)"};function BSe(){const t=yG();return t.isLoading?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):t.error||!t.data?c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:xF(t.error,"Couldn't load homepage content.")})]})}):c.jsx(FSe,{initial:t.data})}function FSe({initial:t}){const[e,n]=N.useState(t),r=N.useRef(t),[s,i]=N.useState(null),[a,l]=N.useState(null);N.useEffect(()=>{r.current=t,n(t)},[t]);const d=wG({mutation:{onSuccess:g=>{r.current=g,n(g),l(new Date)},onError:g=>{i(xF(g,"Failed to save."))}}}),h=JSON.stringify(e)!==JSON.stringify(r.current),p=()=>{i(null),d.mutate({data:e})},m=(g,x)=>{n(v=>({...v,[g]:x}))};return c.jsxs("div",{className:"p-6 lg:p-10 max-w-4xl",children:[c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-6 mb-6 border-b border-neutral-200",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:"Homepage"}),c.jsx("h1",{className:"text-2xl font-black uppercase tracking-tight text-neutral-900",children:"Edit homepage content"}),c.jsxs("div",{className:"mt-1 text-xs text-neutral-500",children:["Edits go live on the public homepage immediately on save.",a&&!h?c.jsxs("span",{className:"ml-2 text-[#099492]",children:["Saved ",a.toLocaleTimeString()]}):null]})]}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-homepage",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]}),s&&c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 mb-6",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:s})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs(iu,{title:su.hero,defaultOpen:!0,children:[c.jsx(zt,{label:"Line 1",children:c.jsx("input",{className:"input",value:e.hero.line1,onChange:g=>m("hero",{...e.hero,line1:g.target.value}),"data-testid":"input-hero-line1"})}),c.jsx(zt,{label:"Line 2",children:c.jsx("input",{className:"input",value:e.hero.line2,onChange:g=>m("hero",{...e.hero,line2:g.target.value}),"data-testid":"input-hero-line2"})}),c.jsx(zt,{label:"Highlight (mint colored)",children:c.jsx("input",{className:"input",value:e.hero.highlight,onChange:g=>m("hero",{...e.hero,highlight:g.target.value}),"data-testid":"input-hero-highlight"})}),c.jsx(zt,{label:"Sub tagline (uppercase below hero)",children:c.jsx("input",{className:"input",value:e.hero.subTagline,onChange:g=>m("hero",{...e.hero,subTagline:g.target.value}),"data-testid":"input-hero-subtagline"})})]}),c.jsxs(iu,{title:su.statement,children:[c.jsx(zt,{label:"Line 1",children:c.jsx("input",{className:"input",value:e.statement.line1,onChange:g=>m("statement",{...e.statement,line1:g.target.value}),"data-testid":"input-statement-line1"})}),c.jsx(zt,{label:"Line 2",children:c.jsx("input",{className:"input",value:e.statement.line2,onChange:g=>m("statement",{...e.statement,line2:g.target.value}),"data-testid":"input-statement-line2"})}),c.jsx(zt,{label:"Line 3 (mint colored)",children:c.jsx("input",{className:"input",value:e.statement.line3,onChange:g=>m("statement",{...e.statement,line3:g.target.value}),"data-testid":"input-statement-line3"})}),c.jsx(zt,{label:"Kicker (small caption underneath)",children:c.jsx("input",{className:"input",value:e.statement.kicker,onChange:g=>m("statement",{...e.statement,kicker:g.target.value}),"data-testid":"input-statement-kicker"})})]}),c.jsxs(iu,{title:su.process,children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(zt,{label:"Headline line 1",children:c.jsx("input",{className:"input",value:e.process.headline1,onChange:g=>m("process",{...e.process,headline1:g.target.value}),"data-testid":"input-process-headline1"})}),c.jsx(zt,{label:"Headline line 2",children:c.jsx("input",{className:"input",value:e.process.headline2,onChange:g=>m("process",{...e.process,headline2:g.target.value}),"data-testid":"input-process-headline2"})})]}),c.jsx(zt,{label:"Intro paragraph",children:c.jsx("textarea",{className:"input min-h-[100px]",value:e.process.intro,onChange:g=>m("process",{...e.process,intro:g.target.value}),"data-testid":"input-process-intro"})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(zt,{label:"CTA label",children:c.jsx("input",{className:"input",value:e.process.ctaLabel,onChange:g=>m("process",{...e.process,ctaLabel:g.target.value}),"data-testid":"input-process-ctalabel"})}),c.jsx(zt,{label:"CTA link",hint:"Internal route, e.g. /founders",children:c.jsx("input",{className:"input font-mono text-sm",value:e.process.ctaHref,onCh
271ange:g=>m("process",{...e.process,ctaHref:g.target.value}),"data-testid":"input-process-ctahref"})})]}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500 mb-3",children:"Pillars"}),c.jsx("div",{className:"space-y-4",children:e.process.pillars.map((g,x)=>c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-3 p-3 rounded border border-neutral-200 bg-neutral-50",children:[c.jsx(zt,{label:`#0${x+1} Title`,children:c.jsx("input",{className:"input",value:g.title,onChange:v=>{const S=[...e.process.pillars];S[x]={...g,title:v.target.value},m("process",{...e.process,pillars:S})},"data-testid":`input-pillar-title-${x}`})}),c.jsx(zt,{label:"Description",children:c.jsx("textarea",{className:"input min-h-[80px]",value:g.desc,onChange:v=>{const S=[...e.process.pillars];S[x]={...g,desc:v.target.value},m("process",{...e.process,pillars:S})},"data-testid":`input-pillar-desc-${x}`})})]},x))})]})]}),c.jsxs(iu,{title:su.sectorsSection,children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(zt,{label:"Heading",children:c.jsx("input",{className:"input",value:e.sectorsSection.heading,onChange:g=>m("sectorsSection",{...e.sectorsSection,heading:g.target.value}),"data-testid":"input-sectors-heading"})}),c.jsx(zt,{label:"Subheading",children:c.jsx("input",{className:"input",value:e.sectorsSection.subheading,onChange:g=>m("sectorsSection",{...e.sectorsSection,subheading:g.target.value}),"data-testid":"input-sectors-subheading"})})]}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500 mb-3",children:"Sector cards"}),c.jsx("p",{className:"text-xs text-neutral-500 mb-3",children:"Each sector has a full-bleed background image on the homepage. Upload a custom image or leave blank to keep the shipped default."}),c.jsx("div",{className:"space-y-6",children:e.sectorsSection.items.map((g,x)=>c.jsxs("div",{className:"rounded border border-neutral-200 bg-neutral-50 overflow-hidden","data-testid":`sector-editor-${x}`,children:[c.jsxs("div",{className:"aspect-[16/9] w-full bg-neutral-900 relative overflow-hidden border-b border-neutral-200",children:[g.image?c.jsx("img",{src:g.image,alt:g.name||`Sector ${x+1}`,className:"w-full h-full object-cover","data-testid":`sector-preview-${x}`}):c.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs font-bold uppercase tracking-[0.25em] text-neutral-400",children:"Default image"}),c.jsxs("div",{className:"absolute top-2 left-2 px-2 py-1 rounded bg-black/60 text-[10px] font-bold uppercase tracking-widest text-white",children:["#0",x+1]})]}),c.jsxs("div",{className:"p-4 space-y-4",children:[c.jsx(zt,{label:`#0${x+1} Name`,children:c.jsx("input",{className:"input",value:g.name,onChange:v=>{const S=[...e.sectorsSection.items];S[x]={...g,name:v.target.value},m("sectorsSection",{...e.sectorsSection,items:S})},"data-testid":`input-sector-name-${x}`})}),c.jsx(zt,{label:"Challenge",children:c.jsx("textarea",{className:"input min-h-[60px]",value:g.challenge,onChange:v=>{const S=[...e.sectorsSection.items];S[x]={...g,challenge:v.target.value},m("sectorsSection",{...e.sectorsSection,items:S})},"data-testid":`input-sector-challenge-${x}`})}),c.jsx(zt,{label:"Action (mint colored on site)",children:c.jsx("textarea",{className:"input min-h-[60px]",value:g.action,onChange:v=>{const S=[...e.sectorsSection.items];S[x]={...g,action:v.target.value},m("sectorsSection",{...e.sectorsSection,items:S})},"data-testid":`input-sector-action-${x}`})}),c.jsxs("div",{className:"pt-3 border-t border-neutral-200",children:[c.jsx(Ss,{label:g.image?"Replace image":"Upload image",hint:"Wide landscape works best. Crop free-form; homepage uses object-cover.",value:g.image??"",onChange:v=>{const S=[...e.sectorsSection.items];S[x]={...g,image:v||null},m("sectorsSection",{...e.sectorsSection,items:S})},aspect:16/9,outputWidth:1600,shape:"rect",freeCrop:!0,outputFormat:"jpeg",compact:!0,testId:`sector-image-${x}`}),g.image?c.jsx("button",{type:"button",className:"mt-2 text-xs text-neutral-600 underline hover:text-neutral-900",onClick:()=>{const v=[...e.sectorsSection.items];v[x]={...g,image:null},m("sectorsSection",{...e.sectorsSection,items:v})},"data-testid":`button-clear-sector-image-${x}`,children:"Clear image (use default)"}):null]})]})]},x))})]})]}),c.jsx(iu,{title:su.stats,children:c.jsx("div",{className:"space-y-3",children:e.stats.items.map((g,x)=>c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_2fr_auto] gap-3 items-end p-3 rounded border border-neutral-200 bg-neutral-50",children:[c.jsx(zt,{label:"Value",children:c.jsx("input",{className:"input",value:g.value,onChange:v=>{const S=[...e.stats.items];S[x]={...g,value:v.target.value},m("stats",{items:S})},"data-testid":`input-stat-value-${x}`})}),c.jsx(zt,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:v=>{const S=[...e.stats.items];S[x]={...g,label:v.target.value},m("stats",{items:S})},"data-testid":`input-stat-label-${x}`})}),c.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-wider pb-2",children:[c.jsx("input",{type:"checkbox",checked:g.accent,onChange:v=>{const S=[...e.stats.items];S[x]={...g,accent:v.target.checked},m("stats",{items:S})},"data-testid":`input-stat-accent-${x}`}),"Mint"]})]},x))})}),c.jsx(iu,{title:su.pathways,children:c.jsx("div",{className:"space-y-3",children:e.pathways.items.map((g,x)=>c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[2fr_2fr_auto] gap-3 items-end p-3 rounded border border-neutral-200 bg-neutral-50",children:[c.jsx(zt,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:v=>{const S=[...e.pathways.items];S[x]={...g,label:v.target.value},m("pathways",{items:S})},"data-testid":`input-pathway-label-${x}`})}),c.jsx(zt,{label:"Link",hint:"Internal route",children:c.jsx("input",{className:"input font-mono text-sm",value:g.href,onCh
271ange:v=>{const S=[...e.pathways.items];S[x]={...g,href:v.target.value},m("pathways",{items:S})},"data-testid":`input-pathway-href-${x}`})}),c.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-wider pb-2",children:[c.jsx("input",{type:"checkbox",checked:g.accent,onChange:v=>{const S=[...e.pathways.items];S[x]={...g,accent:v.target.checked},m("pathways",{items:S})},"data-testid":`input-pathway-accent-${x}`}),"Mint bg"]})]},x))})})]}),c.jsxs("div",{className:"sticky bottom-0 bg-white/90 backdrop-blur border-t border-neutral-200 mt-8 -mx-6 lg:-mx-10 px-6 lg:px-10 py-3 flex items-center justify-end gap-3",children:[c.jsx("span",{className:"text-xs text-neutral-500",children:h?"Unsaved changes":"All changes saved"}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-homepage-footer",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]})]})}function xF(t,e){if(t instanceof _o){const n=t.data;return n&&typeof n.error=="string"&&n.error?n.error:`${t.status} ${t.statusText||e}`}return t instanceof Error&&t.message?t.message:e}function iu({title:t,children:e,defaultOpen:n=!1}){const[r,s]=N.useState(n);return c.jsxs("section",{className:"bg-white border border-neutral-200 rounded overflow-hidden min-w-0","data-testid":`panel-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`,children:[c.jsxs("button",{type:"button",onClick:()=>s(i=>!i),className:"w-full flex items-center justify-between px-5 py-3 hover:bg-neutral-50 transition",children:[c.jsx("span",{className:"text-sm font-bold uppercase tracking-wider text-neutral-900",children:t}),c.jsx(Ql,{className:`w-4 h-4 text-neutral-500 transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"px-5 py-4 border-t border-neutral-200 space-y-4",children:e})]})}function zt({label:t,hint:e,children:n}){return c.jsxs("label",{className:"block",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.2em] text-neutral-600 mb-1.5",children:t}),n,e&&c.jsx("div",{className:"mt-1 text-[11px] text-neutral-500",children:e})]})}const fl={hero:"Hero",why:"Why invest with us",stats:"Fund stats",lpQuote:"LP quote band",partners:"Who we work with",deiCommitment:"DEI commitment",cta:"Closing CTA"};function zSe(){const t=sZ();return t.isLoading?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):t.error||!t.data?c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:bF(t.error,"Couldn't load Investors page content.")})]})}):c.jsx(qSe,{initial:t.data})}const Ja={heading:"Building diverse teams and backing diverse founders isn't a pledge. It's how we operate.",stats:[{value:"25%",label:"Target for women founders"},{value:"50%",label:"Women across our team"}],paragraphs:["We have an internal 25% target for women founders and a firm-wide commitment to 50% women across our team, with active succession and development programmes to maintain it.","We champion women funders and actively partner with 2x Global and are signatories of the IIX Orange Pledge for gender lens investing — two of the leading standards for institutional investors with DEI mandates."],partners:[]};function qSe({initial:t}){const[e,n]=N.useState(t),r=N.useRef(t),[s,i]=N.useState(null),[a,l]=N.useState(null);N.useEffect(()=>{r.current=t,n(t)},[t]);const d=lZ({mutation:{onSuccess:g=>{r.current=g,n(g),l(new Date)},onError:g=>{i(bF(g,"Failed to save."))}}}),h=JSON.stringify(e)!==JSON.stringify(r.current),p=()=>{i(null),d.mutate({data:e})},m=(g,x)=>{n(v=>({...v,[g]:x}))};return c.jsxs("div",{className:"p-6 lg:p-10 max-w-4xl",children:[c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-6 mb
271-6 border-b border-neutral-200",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:"Investors page"}),c.jsx("h1",{className:"text-2xl font-black uppercase tracking-tight text-neutral-900",children:"Edit Investors content"}),c.jsxs("div",{className:"mt-1 text-xs text-neutral-500",children:["Edits go live on the public /investors page immediately on save.",a&&!h?c.jsxs("span",{className:"ml-2 text-[#099492]",children:["Saved ",a.toLocaleTimeString()]}):null]})]}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-investors",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]}),s&&c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 mb-6",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:s})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs(pl,{title:fl.hero,defaultOpen:!0,children:[c.jsx(qt,{label:"Line 1",children:c.jsx("input",{className:"input",value:e.hero.line1,onChange:g=>m("hero",{...e.hero,line1:g.target.value}),"data-testid":"input-investors-hero-line1"})}),c.jsx(qt,{label:"Highlight (mint colored)",children:c.jsx("input",{className:"input",value:e.hero.highlight,onChange:g=>m("hero",{...e.hero,highlight:g.target.value}),"data-testid":"input-investors-hero-highlight"})}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx(Ss,{label:"Hero background image",hint:"Wide cinematic image works best. Falls back to the shipped default if cleared.",value:e.heroImage??"",onChange:g=>n(x=>({...x,heroImage:g||null})),aspect:16/9,outputWidth:1920,shape:"rect",freeCrop:!0,outputFormat:"jpeg",testId:"investors-hero-image"}),e.heroImage?c.jsx("button",{type:"button",className:"mt-2 text-xs text-neutral-600 underline hover:text-neutral-900",onClick:()=>n(g=>({...g,heroImage:null})),"data-testid":"button-clear-investors-hero-image",children:"Clear image (use default)"}):null]})]}),c.jsxs(pl,{title:fl.why,children:[c.jsx(qt,{label:"Heading",children:c.jsx("input",{className:"input",value:e.why.heading,onChange:g=>m("why",{...e.why,heading:g.target.value}),"data-testid":"input-investors-why-heading"})}),c.jsx(qt,{label:"Intro paragraph",children:c.jsx("textarea",{className:"input min-h-[100px]",value:e.why.intro,onChange:g=>m("why",{...e.why,intro:g.target.value}),"data-testid":"input-investors-why-intro"})}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500 mb-3",children:"Reasons"}),c.jsx("div",{className:"space-y-4",children:e.why.reasons.map((g,x)=>c.jsxs("div",{className:"p-3 rounded border border-neutral-200 bg-neutral-50 space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[120px_1fr] gap-3",children:[c.jsx(qt,{label:"Number",children:c.jsx("input",{className:"input font-mono",value:g.num,onChange:v=>{const S=[...e.why.reasons];S[x]={...g,num:v.target.value},m("why",{...e.why,reasons:S})},"data-testid":`input-investors-reason-num-${x}`})}),c.jsx(qt,{label:"Title",children:c.jsx("input",{className:"input",value:g.title,onChange:v=>{const S=[...e.why.reasons];S[x]={...g,title:v.target.value},m("why",{...e.why,reasons:S})},"data-testid":`input-investors-reason-title-${x}`})})]}),c.jsx(qt,{label:"Description",children:c.jsx("textarea",{className:"input min-h-[80px]",value:g.desc,onChange:v=>{const S=[...e.why.reasons];S[x]={...g,desc:v.target.value},m("why",{...e.why,reasons:S})},"data-testid":`input-investors-reason-desc-${x}`})})]},x))})]})]}),c.jsx(pl,{title:fl.stats,children:c.jsxs("div",{className:"space-y-3",children:[e.stats.items.map((g,x)=>c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_2fr_auto] gap-3 items-end p-3 rounded border border-neutral-200 bg-neutral-50",children:[c.jsx(qt,{label:"Stat",children:c.jsx("input",{className:"input",value:g.stat,onChange:v=>{const S=[...e.stats.items];S[x]={...g,stat:v.target.value},m("stats",{items:S})},"data-testid":`input-investors-stat-${x}`})}),c.jsx(qt,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:v=>{const S=[...e.stats.items];S[x]={...g,label:v.target.value},m("stats",{items:S})},"data-testid":`input-investors-stat-label-${x}`})}),c.jsx("button",{type:"button",onClick:()=>{const v=e.stats.items.filter((S,C)=>C!==x);m("stats",{items:v})},className:"mb-0.5 p-1.5 text-neutral-400 hover:text-red-500 transition rounded",title:"Remove stat",children:c.jsx(Zs,{className:"w-4 h-4"})})]},x)),c.jsxs("button",{type:"button",onClick:()=>m("stats",{items:[...e.stats.items,{stat:"",label:""}]}),className:"flex items-center gap-2 text-sm font-medium text-[#099492] hover:text-[#077a78] transition",children:[c.jsx(zn,{className:"w-4 h-4"}),"Add stat"]})]})}),c.jsxs(pl,{title:fl.lpQuote,children:[c.jsx(qt,{label:"Quote",children:c.jsx("textarea",{className:"input min-h-[120px]",value:e.lpQuote.quote,onChange:g=>m("lpQuote",{...e.lpQuote,quote:g.target.value}),"data-testid":"input-investors-quote"})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(qt,{label:"Attribution",children:c.jsx("input",{className:"input",value:e.lpQuote.attribution,onChange:g=>m("lpQuote",{...e.lpQuote,attribution:g.target.value}),"data-testid":"input-investors-quote-attribution"})}),c.jsx(qt,{label:"Attribution sub",children:c.jsx("input",{className:"input",value:e.lpQuote.attributionSub,onChange:g=>m("lpQuote",{...e.lpQuote,attributionSub:g.target.value}),"data-testid":"input-investors-quote-attribution-sub"})})]})]}),c.jsxs(pl,{title:fl.partners,children:[c.jsx(qt,{label:"Heading",children:c.jsx("input",{className:"input",value:e.partners.heading,onChange:g=>m("partners",{...e.partners,heading:g.target.value}),"data-testid":"input-investors-partners-heading"})}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500 mb-3",children:"Partner types"}),c.jsx("div",{className:"space-y-4",children:e.partners.items.map((g,x)=>c.jsxs("div",{className:"p-3 rounded border border-neutral-200 bg-neutral-50 space-y-3",children:[c.jsx(qt,{label:"Title",children:c.jsx("input",{className:"input",value:g.title,onChange:v=>{const S=[...e.partners.items];S[x]={...g,title:v.target.value},m("partners",{...e.partners,items:S})},"data-testid":`input-investors-partner-title-${x}`})}),c.jsx(qt,{label:"Description",children:c.jsx("textarea",{className:"input min-h-[80px]",value:g.de
271sc,onChange:v=>{const S=[...e.partners.items];S[x]={...g,desc:v.target.value},m("partners",{...e.partners,items:S})},"data-testid":`input-investors-partner-desc-${x}`})})]},x))})]})]}),c.jsxs(pl,{title:fl.deiCommitment,children:[c.jsx(qt,{label:"Heading",children:c.jsx("input",{className:"input",value:e.deiCommitment?.heading??Ja.heading,onChange:g=>m("deiCommitment",{...Ja,...e.deiCommitment,heading:g.target.value}),"data-testid":"input-investors-dei-heading"})}),c.jsx(Qw,{label:"Stats",items:e.deiCommitment?.stats??Ja.stats,onChange:g=>m("deiCommitment",{...Ja,...e.deiCommitment,stats:g}),empty:{value:"",label:""},testIdPrefix:"investors-dei-stat",renderRow:(g,x,v)=>c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(qt,{label:"Value (e.g. 25%)",children:c.jsx("input",{className:"input",value:g.value,onChange:S=>v({...g,value:S.target.value}),"data-testid":`input-investors-dei-stat-value-${x}`})}),c.jsx(qt,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:S=>v({...g,label:S.target.value}),"data-testid":`input-investors-dei-stat-label-${x}`})})]})}),c.jsx(Qw,{label:"Body paragraphs",items:e.deiCommitment?.paragraphs??Ja.paragraphs,onChange:g=>m("deiCommitment",{...Ja,...e.deiCommitment,paragraphs:g}),empty:"",testIdPrefix:"investors-dei-para",renderRow:(g,x,v)=>c.jsx(qt,{label:`Paragraph ${x+1}`,children:c.jsx("textarea",{className:"input min-h-[80px]",value:g,onChange:S=>v(S.target.value),"data-testid":`input-investors-dei-para-${x}`})})}),c.jsx(Qw,{label:"Partner logos (e.g. 2x Global, IIX Orange Pledge)",items:e.deiCommitment?.partners??Ja.partners,onChange:g=>m("deiCommitment",{...Ja,...e.deiCommitment,partners:g}),empty:{name:"",logoUrl:"",websiteUrl:""},testIdPrefix:"investors-dei-partner",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[c.jsx(qt,{label:"Partner name",children:c.jsx("input",{className:"input",value:g.name,onChange:S=>v({...g,name:S.target.value}),"data-testid":`input-investors-dei-partner-name-${x}`})}),c.jsx(qt,{label:"Website URL",children:c.jsx("input",{className:"input",value:g.websiteUrl,onChange:S=>v({...g,websiteUrl:S.target.value}),"data-testid":`input-investors-dei-partner-url-${x}`})})]}),c.jsx(Ss,{label:"Partner logo",hint:"Will be displayed white/inverted on a dark background.",value:g.logoUrl,onChange:S=>v({...g,logoUrl:S}),aspect:3,outputWidth:600,outputFormat:"png",testId:`investors-dei-partner-logo-${x}`})]})})]}),c.jsxs(pl,{title:fl.cta,children:[c.jsx(qt,{label:"Heading",children:c.jsx("input",{className:"input",value:e.cta.heading,onChange:g=>m("cta",{...e.cta,heading:g.target.value}),"data-testid":"input-investors-cta-heading"})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(qt,{label:"Button label",children:c.jsx("input",{className:"input",value:e.cta.label,onChange:g=>m("cta",{...e.cta,label:g.target.value}),"data-testid":"input-investors-cta-label"})}),c.jsx(qt,{label:"Link / mailto",hint:"e.g. mailto:[email protected]",children:c.jsx("input",{className:"input font-mono text-sm",value:e.cta.href,onCh
271ange:g=>m("cta",{...e.cta,href:g.target.value}),"data-testid":"input-investors-cta-href"})})]})]})]}),c.jsxs("div",{className:"sticky bottom-0 bg-white/90 backdrop-blur border-t border-neutral-200 mt-8 -mx-6 lg:-mx-10 px-6 lg:px-10 py-3 flex items-center justify-end gap-3",children:[c.jsx("span",{className:"text-xs text-neutral-500",children:h?"Unsaved changes":"All changes saved"}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-investors-footer",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]})]})}function bF(t,e){if(t instanceof _o){const n=t.data;return n&&typeof n.error=="string"&&n.error?n.error:`${t.status} ${t.statusText||e}`}return t instanceof Error&&t.message?t.message:e}function pl({title:t,children:e,defaultOpen:n=!1}){const[r,s]=N.useState(n);return c.jsxs("section",{className:"bg-white border border-neutral-200 rounded overflow-hidden min-w-0","data-testid":`panel-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`,children:[c.jsxs("button",{type:"button",onClick:()=>s(i=>!i),className:"w-full flex items-center justify-between px-5 py-3 hover:bg-neutral-50 transition",children:[c.jsx("span",{className:"text-sm font-bold uppercase tracking-wider text-neutral-900",children:t}),c.jsx(Ql,{className:`w-4 h-4 text-neutral-500 transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"px-5 py-4 border-t border-neutral-200 space-y-4",children:e})]})}function qt({label:t,hint:e,children:n}){return c.jsxs("label",{className:"block",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.2em] text-neutral-600 mb-1.5",children:t}),n,e&&c.jsx("div",{className:"mt-1 text-[11px] text-neutral-500",children:e})]})}function Qw({label:t,items:e,onChange:n,empty:r,renderRow:s,testIdPrefix:i}){return c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500",children:t}),c.jsxs("button",{type:"button",onClick:()=>n([...e,structuredClone(r)]),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded border border-neutral-300 text-neutral-700 hover:bg-neutral-50","data-testid":`button-add-${i}`,children:[c.jsx(zn,{className:"w-3.5 h-3.5"})," Add"]})]}),c.jsx("div",{className:"space-y-4",children:e.map((a,l)=>c.jsxs("div",{className:"p-3 rounded border border-neutral-200 bg-neutral-50 space-y-3 relative","data-testid":`${i}-row-${l}`,children:[c.jsx("button",{type:"button",onClick:()=>{const d=[...e];d.splice(l,1),n(d)},className:"absolute top-2 right-2 p-1.5 rounded text-neutral-400 hover:bg-red-50 hover:text-red-600","data-testid":`button-remove-${i}-${l}`,"aria-label":"Remove",children:c.jsx(qn,{className:"w-3.5 h-3.5"})}),s(a,l,d=>{const h=[...e];h[l]=d,n(h)})]},l))})]})}const ar={heading:"Our commitment to women leaders and founders",stats:[{value:"25%",label:"Target for women founders"},{value:"50%",label:"Women across our team"}],paragraphs:["We believe that the strongest companies are built by teams that bring together different experiences, perspectives, and capabilities. We are committed to creating equal opportunities for talented entrepreneurs and professionals and to supporting merit-based advancement across our organization and portfolio.","Today we see more men starting businesses and raising capital. We want to see more women founding companies, leading businesses, sitting on boards — and we're actively working to make that happen.","We are active members of 2X Global and signatories of the IIX Orange Pledge for gender lens investing. We partner, mentor, and show up."],partners:[{name:"2X Global",logoUrl:"/logo-2x-global.png",websiteUrl:"https://www.2xglobal.org"},{name:"IIX Orange Pledge",logoUrl:"/logo-iix.png",websiteUrl:"https://iixglobal.com"}]},au={hero:"Hero",intro:"Intro paragraph",thesis:"Thesis statement",principles:"Principles",metrics:"The math (metrics)",womenCommitment:"Commitment to women leaders"};function VSe(){const t=xZ();return t.isLoading?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):t.error||!t.data?c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:vF(t.error,"Couldn't load Thesis page content.")})]})}):c.jsx($Se,{initial:t.data})}function $Se({initial:t}){const[e,n]=N.useState({...t,womenCommitment:t.womenCommitment??ar}),r=N.useRef({...t,womenCommitment:t.womenCommitment??ar}),[s,i]=N.useState(null),[a,l]=N.useState(null);N.useEffect(()=>{const g={...t,womenCommitment:t.womenCommitment??ar};r.current=g,n(g)},[t]);const d=SZ({mutation:{onSuccess:g=>{r.current=g,n(g),l(new Date)},onError:g=>{i(vF(g,"Failed to save."))}}}),h=JSON.stringify(e)!==JSON.stringify(r.current),p=()=>{i(null),d.mutate({data:e})},m=(g,x)=>{n(v=>({...v,[g]:x}))};return c.jsxs("div",{className:"p-6 lg:p-10 max-w-4xl",children:[c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-6 mb
271-6 border-b border-neutral-200",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:"Thesis page"}),c.jsx("h1",{className:"text-2xl font-black uppercase tracking-tight text-neutral-900",children:"Edit Thesis content"}),c.jsxs("div",{className:"mt-1 text-xs text-neutral-500",children:["Edits go live on the public /thesis page immediately on save.",a&&!h?c.jsxs("span",{className:"ml-2 text-[#099492]",children:["Saved ",a.toLocaleTimeString()]}):null]})]}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-thesis",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]}),s&&c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 mb-6",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:s})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs(ou,{title:au.hero,defaultOpen:!0,children:[c.jsx(Vt,{label:"Line 1",hint:"e.g. The biggest",children:c.jsx("input",{className:"input",value:e.hero.line1,onChange:g=>m("hero",{...e.hero,line1:g.target.value}),"data-testid":"input-thesis-hero-line1"})}),c.jsx(Vt,{label:"Line 2",hint:"e.g. emissions are the",children:c.jsx("input",{className:"input",value:e.hero.line2,onChange:g=>m("hero",{...e.hero,line2:g.target.value}),"data-testid":"input-thesis-hero-line2"})}),c.jsx(Vt,{label:"Highlight (mint colored)",hint:"e.g. biggest opportunities.",children:c.jsx("input",{className:"input",value:e.hero.highlight,onChange:g=>m("hero",{...e.hero,highlight:g.target.value}),"data-testid":"input-thesis-hero-highlight"})})]}),c.jsx(ou,{title:au.intro,children:c.jsx(Vt,{label:"Intro paragraph",children:c.jsx("textarea",{className:"input min-h-[140px]",value:e.intro,onChange:g=>n(x=>({...x,intro:g.target.value})),"data-testid":"input-thesis-intro"})})}),c.jsxs(ou,{title:au.thesis,children:[c.jsx(Vt,{label:"Eyebrow (small mint caption)",children:c.jsx("input",{className:"input",value:e.thesis.eyebrow,onChange:g=>m("thesis",{...e.thesis,eyebrow:g.target.value}),"data-testid":"input-thesis-eyebrow"})}),c.jsx(Vt,{label:"Statement",hint:"Use plain text. Subscript characters like CO\\u2082e are accepted.",children:c.jsx("textarea",{className:"input min-h-[100px]",value:e.thesis.statement,onChange:g=>m("thesis",{...e.thesis,statement:g.target.value}),"data-testid":"input-thesis-statement"})})]}),c.jsxs(ou,{title:au.principles,children:[c.jsx(Vt,{label:"Section heading",hint:"Optional larger heading shown above the principle cards. Leave blank to hide.",children:c.jsx("input",{className:"input",value:e.principles.heading??"",onChange:g=>m("principles",{...e.principles,heading:g.target.value}),"data-testid":"input-thesis-principles-heading"})}),c.jsx(Vt,{label:"Section subheading",hint:"Optional supporting line under the heading. Leave blank to hide.",children:c.jsx("textarea",{className:"input min-h-[60px]",value:e.principles.subheading??"",onChange:g=>m("principles",{...e.principles,subheading:g.target.value}),"data-testid":"input-thesis-principles-subheading"})}),c.jsx("div",{className:"pt-3 mt-2 border-t border-neutral-200"}),c.jsx("div",{className:"space-y-4",children:e.principles.items.map((g,x)=>c.jsxs("div",{className:"p-3 rounded border border-neutral-200 bg-neutral-50 space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[120px_1fr] gap-3",children:[c.jsx(Vt,{label:"Number",children:c.jsx("input",{className:"input font-mono",value:g.num,onChange:v=>{const S=[...e.principles.items];S[x]={...g,num:v.target.value},m("principles",{...e.principles,items:S})},"data-testid":`input-thesis-principle-num-${x}`})}),c.jsx(Vt,{label:"Title",children:c.jsx("input",{className:"input",value:g.title,onChange:v=>{const S=[...e.principles.items];S[x]={...g,title:v.target.value},m("principles",{...e.principles,items:S})},"data-testid":`input-thesis-principle-title-${x}`})})]}),c.jsx(Vt,{label:"Description",children:c.jsx("textarea",{className:"input min-h-[100px]",value:g.de
271sc,onChange:v=>{const S=[...e.principles.items];S[x]={...g,desc:v.target.value},m("principles",{...e.principles,items:S})},"data-testid":`input-thesis-principle-desc-${x}`})}),c.jsx(Vt,{label:"Italic example (optional)",hint:"Leave blank to omit. Shows below the description on the public site.",children:c.jsx("textarea",{className:"input min-h-[60px]",value:g.example??"",onChange:v=>{const S=[...e.principles.items],C=v.target.value;S[x]={...g,example:C.length>0?C:null},m("principles",{...e.principles,items:S})},"data-testid":`input-thesis-principle-example-${x}`})})]},x))})]}),c.jsxs(ou,{title:au.metrics,children:[c.jsx(Vt,{label:"Eyebrow",hint:"e.g. The math",children:c.jsx("input",{className:"input",value:e.metrics.eyebrow,onChange:g=>m("metrics",{...e.metrics,eyebrow:g.target.value}),"data-testid":"input-thesis-metrics-eyebrow"})}),c.jsx(Vt,{label:"Section heading",hint:"Optional larger heading shown alongside the eyebrow. Leave blank to hide.",children:c.jsx("input",{className:"input",value:e.metrics.heading??"",onChange:g=>m("metrics",{...e.metrics,heading:g.target.value}),"data-testid":"input-thesis-metrics-heading"})}),c.jsx(Vt,{label:"Section subheading",hint:"Optional supporting line under the heading. Leave blank to hide.",children:c.jsx("textarea",{className:"input min-h-[60px]",value:e.metrics.subheading??"",onChange:g=>m("metrics",{...e.metrics,subheading:g.target.value}),"data-testid":"input-thesis-metrics-subheading"})}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500 mb-3",children:"Metrics"}),c.jsx("div",{className:"space-y-3",children:e.metrics.items.map((g,x)=>c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_1fr_2fr] gap-3 items-end p-3 rounded border border-neutral-200 bg-neutral-50",children:[c.jsx(Vt,{label:"Value",children:c.jsx("input",{className:"input",value:g.value,onChange:v=>{const S=[...e.metrics.items];S[x]={...g,value:v.target.value},m("metrics",{...e.metrics,items:S})},"data-testid":`input-thesis-metric-value-${x}`})}),c.jsx(Vt,{label:"Sub",children:c.jsx("input",{className:"input",value:g.sub,onChange:v=>{const S=[...e.metrics.items];S[x]={...g,sub:v.target.value},m("metrics",{...e.metrics,items:S})},"data-testid":`input-thesis-metric-sub-${x}`})}),c.jsx(Vt,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:v=>{const S=[...e.metrics.items];S[x]={...g,label:v.target.value},m("metrics",{...e.metrics,items:S})},"data-testid":`input-thesis-metric-label-${x}`})})]},x))})]})]}),c.jsxs(ou,{title:au.womenCommitment,children:[c.jsx(Vt,{label:"Section heading",children:c.jsx("input",{className:"input",value:e.womenCommitment?.heading??"",onChange:g=>n(x=>({...x,womenCommitment:{...x.womenCommitment??ar,heading:g.target.value}})),"data-testid":"input-thesis-women-heading"})}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500",children:"Stats"}),c.jsxs("button",{type:"button",onClick:()=>n(g=>({...g,womenCommitment:{...g.womenCommitment??ar,stats:[...g.womenCommitment?.stats??[],{value:"",label:""}]}})),className:"inline-flex items-center gap-1 text-xs font-bold text-[#099492] hover:text-[#0BB9B7]",children:[c.jsx(zn,{className:"w-3 h-3"})," Add stat"]})]}),c.jsx("div",{className:"space-y-3",children:(e.womenCommitment?.stats??[]).map((g,x)=>c.jsxs("div",{className:"flex gap-2 items-end",children:[c.jsx(Vt,{label:"Value (e.g. 25%)",children:c.jsx("input",{className:"input",value:g.value,onChange:v=>{const S=[...e.womenCommitment?.stats??[]];S[x]={...g,value:v.target.value},n(C=>({...C,womenCommitment:{...C.womenCommitment??ar,stats:S}}))}})}),c.jsx(Vt,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:v=>{const S=[...e.womenCommitment?.stats??[]];S[x]={...g,label:v.target.value},n(C=>({...C,womenCommitment:{...C.womenCommitment??ar,stats:S}}))}})}),c.jsx("button",{type:"button",className:"mb-0.5 p-1 text-neutral-400 hover:text-red-500 transition-colors flex-shrink-0",onClick:()=>{const v=(e.womenCommitment?.stats??[]).filter((S,C)=>C!==x);n(S=>({...S,womenCommitment:{...S.womenCommitment??ar,stats:v}}))}
271,children:c.jsx(qn,{className:"w-4 h-4"})})]},x))})]}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500",children:"Paragraphs"}),c.jsxs("button",{type:"button",onClick:()=>n(g=>({...g,womenCommitment:{...g.womenCommitment??ar,paragraphs:[...g.womenCommitment?.paragraphs??[],""]}})),className:"inline-flex items-center gap-1 text-xs font-bold text-[#099492] hover:text-[#0BB9B7]",children:[c.jsx(zn,{className:"w-3 h-3"})," Add paragraph"]})]}),c.jsx("div",{className:"space-y-3",children:(e.womenCommitment?.paragraphs??[]).map((g,x)=>c.jsxs("div",{className:"flex gap-2 items-start",children:[c.jsx(Vt,{label:`Paragraph ${x+1}`,children:c.jsx("textarea",{className:"input min-h-[80px]",value:g,onChange:v=>{const S=[...e.womenCommitment?.paragraphs??[]];S[x]=v.target.value,n(C=>({...C,womenCommitment:{...C.womenCommitment??ar,paragraphs:S}}))},"data-testid":`input-thesis-women-para-${x}`})}),c.jsx("button",{type:"button",className:"mt-6 p-1 text-neutral-400 hover:text-red-500 transition-colors",onClick:()=>{const v=(e.womenCommitment?.paragraphs??[]).filter((S,C)=>C!==x);n(S=>({...S,womenCommitment:{...S.womenCommitment??ar,paragraphs:v}}))},children:c.jsx(qn,{className:"w-4 h-4"})})]},x))})]}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500",children:"Partner logos"}),c.jsxs("button",{type:"button",onClick:()=>n(g=>({...g,womenCommitment:{...g.womenCommitment??ar,partners:[...g.womenCommitment?.partners??[],{name:"",logoUrl:"",websiteUrl:""}]}})),className:"inline-flex items-center gap-1 text-xs font-bold text-[#099492] hover:text-[#0BB9B7]",children:[c.jsx(zn,{className:"w-3 h-3"})," Add partner"]})]}),c.jsx("div",{className:"space-y-4",children:(e.womenCommitment?.partners??[]).map((g,x)=>c.jsxs("div",{className:"p-3 rounded border border-neutral-200 bg-neutral-50 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("span",{className:"text-xs font-bold text-neutral-500",children:["Partner ",x+1]}),c.jsx("button",{type:"button",className:"p-1 text-neutral-400 hover:text-red-500 transition-colors",onClick:()=>{const v=(e.womenCommitment?.partners??[]).filter((S,C)=>C!==x);n(S=>({...S,womenCommitment:{...S.womenCommitment??ar,partners:v}}))},children:c.jsx(qn,{className:"w-4 h-4"})})]}),c.jsx(Vt,{label:"Organisation name",children:c.jsx("input",{className:"input",value:g.name,onChange:v=>{const S=[...e.womenCommitment?.partners??[]];S[x]={...g,name:v.target.value},n(C=>({...C,womenCommitment:{...C.womenCommitment??ar,partners:S}}))},"data-testid":`input-thesis-women-partner-name-${x}`})}),c.jsx(Vt,{label:"Website URL",children:c.jsx("input",{className:"input",value:g.websiteUrl,onChange:v=>{const S=[...e.womenCommitment?.partners??[]];S[x]={...g,websiteUrl:v.target.value},n(C=>({...C,womenCommitment:{...C.womenCommitment??ar,partners:S}}))},"data-testid":`input-thesis-women-partner-url-${x}`})}),c.jsx(Ss,{label:"Logo image",hint:"Upload partner logo. Clear background works best on dark backgrounds.",value:g.logoUrl,onChange:v=>{const S=[...e.womenCommitment?.partners??[]];S[x]={...g,logoUrl:v},n(C=>({...C,womenCommitment:{...C.womenCommitment??ar,partners:S}}))},aspect:3/1,outputWidth:600,shape:"rect",freeCrop:!0,testId:`thesis-women-partner-logo-${x}`})]},x))})]})]})]}),c.jsxs("div",{className:"sticky bottom-0 bg-white/90 backdrop-blur border-t border-neutral-200 mt-8 -mx-6 lg:-mx-10 px-6 lg:px-10 py-3 flex items-center justify-end gap-3",children:[c.jsx("span",{className:"text-xs text-neutral-500",children:h?"Unsaved changes":"All changes saved"}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-thesis-footer",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]})]})}function vF(t,e){if(t instanceof _o){const n=t.data;return n&&typeof n.error=="string"&&n.error?n.error:`${t.status} ${t.statusText||e}`}return t instanceof Error&&t.message?t.message:e}function ou({title:t,children:e,defaultOpen:n=!1}){const[r,s]=N.useState(n);return c.jsxs("section",{className:"bg-white border border-neutral-200 rounded overflow-hidden min-w-0","data-testid":`panel-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`,children:[c.jsxs("button",{type:"button",onClick:()=>s(i=>!i),className:"w-full flex items-center justify-between px-5 py-3 hover:bg-neutral-50 transition",children:[c.jsx("span",{className:"text-sm font-bold uppercase tracking-wider text-neutral-900",children:t}),c.jsx(Ql,{className:`w-4 h-4 text-neutral-500 transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"px-5 py-4 border-t border-neutral-200 space-y-4",children:e})]})}function Vt({label:t,hint:e,children:n}){return c.jsxs("label",{className:"block",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.2em] text-neutral-600 mb-1.5",children:t}),n,e&&c.jsx("div",{className:"mt-1 text-[11px] text-neutral-500",children:e})]})}const ea={hero:"Hero",whatYouGet:"What you get",howItWorks:"How it works (intro)",stages:"Stages",signals:"What we look for",testimonials:"Founder testimonials",whoWeLookFor:"Who we look for",womenCommitment:"Our commitment to women founders",cta:"Closing CTA"},Xw={heading:"If we are serious about tackling climate change, we simply need more women at the top table — in governments, boards, funders, and founders.",paragraphs:["We have an internal 25% target for women founders — still not high enough, but more than 5× the industry standard. We are active members of 2x Global and signatories of the IIX Orange Pledge for gender lens investing.","We actively partner and participate in events and mentoring programmes, and shine a light on successful women founders and funders across Singapore, Indonesia, Philippines, Australia and New Zealand.","If you're a woman founder building in climate, we've built this programme with you in mind."],partners:[]};function HSe(){const t=sJ();return t.isLoading?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):t.error||!t.data?c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:wF(t.error,"Couldn't load Founders page content.")})]})}):c.jsx(KSe,{initial:t.data})}function KSe({initial:t}){const[e,n]=N.useState(t),r=N.useRef(t),[s,i]=N.useState(null),[a,l]=N.useState(null);N.useEffect(()=>{r.current=t,n(t)},[t]);const d=lJ({mutation:{onSuccess:g=>{r.current=g,n(g),l(new Date)},onError:g=>{i(wF(g,"Failed to save."))}}}),h=JSON.stringify(e)!==JSON.stringify(r.current),p=()=>{i(null),d.mutate({data:e})},m=(g,x)=>{n(v=>({...v,[g]:x}))};return c.jsxs("div",{className:"p-6 lg:p-10 max-w-4xl",children:[c.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-6 mb
271-6 border-b border-neutral-200",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.3em] text-[#099492] mb-1",children:"Founders page"}),c.jsx("h1",{className:"text-2xl font-black uppercase tracking-tight text-neutral-900",children:"Edit Founders content"}),c.jsxs("div",{className:"mt-1 text-xs text-neutral-500",children:["Edits go live on the public /founders page immediately on save.",a&&!h?c.jsxs("span",{className:"ml-2 text-[#099492]",children:["Saved ",a.toLocaleTimeString()]}):null]})]}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-founders",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]}),s&&c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 mb-6",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:s})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs(ta,{title:ea.hero,defaultOpen:!0,children:[c.jsx(at,{label:"Line 1",hint:`e.g. "We don't invest"`,children:c.jsx("input",{className:"input",value:e.hero.line1,onChange:g=>m("hero",{...e.hero,line1:g.target.value}),"data-testid":"input-founders-hero-line1"})}),c.jsx(at,{label:"Line 2",hint:'e.g. "in ideas."',children:c.jsx("input",{className:"input",value:e.hero.line2,onChange:g=>m("hero",{...e.hero,line2:g.target.value}),"data-testid":"input-founders-hero-line2"})}),c.jsx(at,{label:"Highlight (mint coloured)",hint:'e.g. "We co-build companies."',children:c.jsx("input",{className:"input",value:e.hero.highlight,onChange:g=>m("hero",{...e.hero,highlight:g.target.value}),"data-testid":"input-founders-hero-highlight"})}),c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsx(Ss,{label:"Hero background image",hint:"Wide cinematic image works best. Falls back to the shipped default if cleared.",value:e.heroImage??"",onChange:g=>n(x=>({...x,heroImage:g||null})),aspect:16/9,outputWidth:1920,shape:"rect",freeCrop:!0,outputFormat:"jpeg",testId:"founders-hero-image"}),e.heroImage?c.jsx("button",{type:"button",className:"mt-2 text-xs text-neutral-600 underline hover:text-neutral-900",onClick:()=>n(g=>({...g,heroImage:null})),"data-testid":"button-clear-founders-hero-image",children:"Clear image (use default)"}):null]})]}),c.jsxs(ta,{title:ea.whatYouGet,children:[c.jsx(at,{label:"Heading",children:c.jsx("input",{className:"input",value:e.whatYouGet.heading,onChange:g=>m("whatYouGet",{...e.whatYouGet,heading:g.target.value}),"data-testid":"input-founders-what-heading"})}),c.jsx(at,{label:"Intro",children:c.jsx("textarea",{className:"input min-h-[100px]",value:e.whatYouGet.intro,onChange:g=>m("whatYouGet",{...e.whatYouGet,intro:g.target.value}),"data-testid":"input-founders-what-intro"})}),c.jsx(ml,{label:"Items",items:e.whatYouGet.items,onChange:g=>m("whatYouGet",{...e.whatYouGet,items:g}),empty:{num:"",title:"",desc:""},testIdPrefix:"what",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[120px_1fr] gap-3",children:[c.jsx(at,{label:"Number",children:c.jsx("input",{className:"input font-mono",value:g.num,onChange:S=>v({...g,num:S.target.value}),"data-testid":`input-founders-what-num-${x}`})}),c.jsx(at,{label:"Title",children:c.jsx("input",{className:"input",value:g.title,onChange:S=>v({...g,title:S.target.value}),"data-testid":`input-founders-what-title-${x}`})})]}),c.jsx(at,{label:"Description",children:c.jsx("textarea",{className:"input min-h-[80px]",value:g.desc,onChange:S=>v({...g,desc:S.target.value}),"data-testid":`input-founders-what-desc-${x}`})})]})})]}),c.jsxs(ta,{title:ea.howItWorks,children:[c.jsx(at,{label:"Heading",children:c.jsx("input",{className:"input",value:e.howItWorks.heading,onChange:g=>m("howItWorks",{...e.howItWorks,heading:g.target.value}),"data-testid":"input-founders-how-heading"})}),c.jsx(at,{label:"Intro",hint:"The chart math, milestones, and revenue curve are intentionally hard-coded.",children:c.jsx("textarea",{className:"input min-h-[100px]",value:e.howItWorks.intro,onChange:g=>m("howItWorks",{...e.howItWorks,intro:g.target.value}),"data-testid":"input-founders-how-intro"})})]}),c.jsx(ta,{title:ea.stages,children:c.jsx(ml,{label:"Stage cards",items:e.stages.items,onChange:g=>m("stages",{items:g}),empty:{label:"",window:"",body:""},testIdPrefix:"stage",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_1fr] gap-3",children:[c.jsx(at,{label:"Window",children:c.jsx("input",{className:"input",value:g.window,onChange:S=>v({...g,window:S.target.value}),"data-testid":`input-founders-stage-window-${x}`})}),c.jsx(at,{label:"Label",children:c.jsx("input",{className:"input",value:g.label,onChange:S=>v({...g,label:S.target.value}),"data-testid":`input-founders-stage-label-${x}`})})]}),c.jsx(at,{label:"Body",children:c.jsx("textarea",{className:"input min-h-[80px]",value:g.body,onChange:S=>v({...g,body:S.target.value}),"data-testid":`input-founders-stage-body-${x}`})})]})})}),c.jsxs(ta,{title:ea.signals,children:[c.jsx(at,{label:"Eyebrow",children:c.jsx("input",{className:"input",value:e.signals.eyebrow,onChange:g=>m("signals",{...e.signals,eyebrow:g.target.value}),"data-testid":"input-founders-signals-eyebrow"})}),c.jsx(at,{label:"Heading",children:c.jsx("input",{className:"input",value:e.signals.heading,onChange:g=>m("signals",{...e.signals,heading:g.target.value}),"data-testid":"input-founders-signals-heading"})}),c.jsx(ml,{label:"Signals",items:e.signals.items,onChange:g=>m("signals",{...e.signals,items:g}),empty:{num:"",title:"",desc:""},testIdPrefix:"signal",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[120px_1fr] gap-3",children:[c.jsx(at,{label:"Number",children:c.jsx("input",{className:"input font-mono",value:g.num,onChange:S=>v({...g,num:S.target.value}),"data-testid":`input-founders-signal-num-${x}`})}),c.jsx(at,{label:"Title",children:c.jsx("input",{className:"input",value:g.title,onChange:S=>v({...g,title:S.target.value}),"data-testid":`input-founders-signal-title-${x}`})})]}),c.jsx(at,{label:"Description",children:c.jsx("textarea",{className:"input min-h-[60
271px]",value:g.desc,onChange:S=>v({...g,desc:S.target.value}),"data-testid":`input-founders-signal-desc-${x}`})})]})}),c.jsx(at,{label:"Footnote (italic line under signals)",children:c.jsx("textarea",{className:"input min-h-[60px]",value:e.signals.footnote,onChange:g=>m("signals",{...e.signals,footnote:g.target.value}),"data-testid":"input-founders-signals-footnote"})})]}),c.jsxs(ta,{title:ea.testimonials,children:[c.jsx(at,{label:"Eyebrow",children:c.jsx("input",{className:"input",value:e.testimonials.eyebrow,onChange:g=>m("testimonials",{...e.testimonials,eyebrow:g.target.value}),"data-testid":"input-founders-testimonials-eyebrow"})}),c.jsx(ml,{label:"Testimonials",items:e.testimonials.items,onChange:g=>m("testimonials",{...e.testimonials,items:g}),empty:{name:"",role:"",photo:"",linkedin:"",quote:"",side:"left"},testIdPrefix:"testimonial",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[c.jsx(at,{label:"Name",children:c.jsx("input",{className:"input",value:g.name,onChange:S=>v({...g,name:S.target.value}),"data-testid":`input-founders-testimonial-name-${x}`})}),c.jsx(at,{label:"Role",children:c.jsx("input",{className:"input",value:g.role,onChange:S=>v({...g,role:S.target.value}),"data-testid":`input-founders-testimonial-role-${x}`})})]}),c.jsx(at,{label:"LinkedIn URL",children:c.jsx("input",{className:"input",value:g.linkedin,onChange:S=>v({...g,linkedin:S.target.value}),"data-testid":`input-founders-testimonial-linkedin-${x}`})}),c.jsx(at,{label:"Photo side",children:c.jsxs("select",{className:"input",value:g.side,onChange:S=>v({...g,side:S.target.value}),"data-testid":`input-founders-testimonial-side-${x}`,children:[c.jsx("option",{value:"left",children:"Left"}),c.jsx("option",{value:"right",children:"Right"})]})}),c.jsx(at,{label:"Quote",children:c.jsx("textarea",{className:"input min-h-[100px]",value:g.quote,onChange:S=>v({...g,quote:S.target.value}),"data-testid":`input-founders-testimonial-quote-${x}`})}),c.jsx(Ss,{label:"Founder photo",hint:"Square photo works best.",value:g.photo,onChange:S=>v({...g,photo:S}),aspect:1,outputWidth:400,shape:"square",outputFormat:"jpeg",testId:`founders-testimonial-photo-${x}`})]})})]}),c.jsxs(ta,{title:ea.whoWeLookFor,children:[c.jsx(at,{label:"Section heading",hint:'Displayed as the large section title, e.g. "Who we look for"',children:c.jsx("input",{className:"input",value:e.whoWeLookFor?.heading??"",onChange:g=>m("whoWeLookFor",{...e.whoWeLookFor,heading:g.target.value}),"data-testid":"input-founders-who-heading"})}),c.jsx(at,{label:"Bold line",hint:`Large bold opener, e.g. "Please don't send us your deck"`,children:c.jsx("input",{className:"input font-semibold",value:e.whoWeLookFor?.introBold??"",onChange:g=>m("whoWeLookFor",{...e.whoWeLookFor,introBold:g.target.value}),"data-testid":"input-founders-who-intro-bold"})}),c.jsx(at,{label:"Bold tagline",hint:"Teal-coloured line under the bold opener",children:c.jsx("input",{className:"input",value:e.whoWeLookFor?.introTagline??"",onChange:g=>m("whoWeLookFor",{...e.whoWeLookFor,introTagline:g.target.value}),"data-testid":"input-founders-who-intro-tagline"})}),c.jsx(at,{label:"Body paragraph",hint:"Regular text below the bold opener.",children:c.jsx("textarea",{className:"input min-h-[120px]",value:e.whoWeLookFor?.introBody??"",onChange:g=>m("whoWeLookFor",{...e.whoWeLookFor,introBody:g.target.value}),"data-testid":"input-founders-who-intro-body"})}),c.jsx(at,{label:"Sub-header",hint:`e.g. "Here's who tends to thrive with us:"`,children:c.jsx("input",{className:"input",value:e.whoWeLookFor?.subheading??"",onChange:g=>m("whoWeLookFor",{...e.whoWeLookFor,subheading:g.target.value}),"data-testid":"input-founders-who-subheading"})}),c.jsx(ml,{label:"Profile cards",items:e.whoWeLookFor?.items??[],onChange:g=>m("whoWeLookFor",{...e.whoWeLookFor,items:g}),empty:{title:"",body:""},testIdPrefix:"who",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsx(at,{label:"Title (bold)",children:c.jsx("input",{className:"input font-semibold",value:g.title,onChange:S=>v({...g,title:S.target.value}),"data-testid":`input-founders-who-title-${x}`})}),c.jsx(at,{label:"Body",children:c.jsx("textarea",{className:"input min-h-[80px]",value:g.body,onChange:S=>v({...g,body:S.target.value}),"data-testid":`input-founders-who-body-${x}`})})]})})]}),c.jsxs(ta,{title:ea.womenCommitment,children:[c.jsx(at,{label:"Heading / pull quote",hint:"The large bold quote displayed at the top of the section.",children:c.jsx("textarea",{className:"input min-h-[100px]",value:e.womenCommitment?.heading??"",onChange:g=>m("womenCommitment",{...Xw,...e.womenCommitment,heading:g.target.value}),"data-testid":"input-founders-women-heading"})}),c.jsx(ml,{label:"Body paragraphs",items:e.womenCommitment?.paragraphs??[],onChange:g=>m("womenCommitment",{...Xw,...e.womenCommitment,paragraphs:g}),empty:"",testIdPrefix:"women-paragraph",renderRow:(g,x,v)=>c.jsx(at,{label:`Paragraph ${x+1}`,children:c.jsx("textarea",{className:"input min-h-[80px]",value:g,onChange:S=>v(S.target.value),"data-testid":`input-founders-women-para-${x}`})})}),c.jsx(ml,{label:"Partner logos (e.g. 2x Global, IIX Orange Pledge)",items:e.womenCommitment?.partners??[],onChange:g=>m("womenCommitment",{...Xw,...e.womenCommitment,partners:g}),empty:{name:"",logoUrl:"",websiteUrl:""},testIdPrefix:"women-partner",renderRow:(g,x,v)=>c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[c.jsx(at,{label:"Partner name",children:c.jsx("input",{className:"input",value:g.name,onChange:S=>v({...g,name:S.target.value}),"data-testid":`input-founders-women-partner-name-${x}`})}),c.jsx(at,{label:"Website URL",children:c.jsx("input",{className:"input",value:g.websiteUrl,onChange:S=>v({...g,websiteUrl:S.target.value}),"data-testid":`input-founders-women-partner-url-${x}`})})]}),c.jsx(Ss,{label:"Partner logo",hint:"Will be displayed white/inverted on a dark background.",value:g.logoUrl,onChange:S=>v({...g,logoUrl:S}),aspect:3,outputWidth:600,outputFormat:"png",testId:`founders-women-partner-logo-${x}`})]})})]}),c.jsxs(ta,{title:ea.cta,children:[c.jsx(at,{label:"Heading",children:c.jsx("input",{className:"input",value:e.cta.heading,onChange:g=>m("cta",{...e.cta,heading:g.target.value}),"data-testid":"input-founders-cta-heading"})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[c.jsx(at,{label:"Button label",children:c.jsx("input",{className:"input",value:e.cta.label,onChange:g=>m("cta",{...e.cta,label:g.target.value}),"data-testid":"input-founders-cta-label"})}),c.jsx(at,{label:"Button href",hint:"Internal path or full URL.",children:c.jsx("input",{className:"input",value:e.cta.href,onCh
271ange:g=>m("cta",{...e.cta,href:g.target.value}),"data-testid":"input-founders-cta-href"})})]})]})]}),c.jsxs("div",{className:"sticky bottom-0 bg-white/90 backdrop-blur border-t border-neutral-200 mt-8 -mx-6 lg:-mx-10 px-6 lg:px-10 py-3 flex items-center justify-end gap-3",children:[c.jsx("span",{className:"text-xs text-neutral-500",children:h?"Unsaved changes":"All changes saved"}),c.jsxs("button",{type:"button",onClick:p,disabled:!h||d.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm rounded bg-[#003320] text-white font-bold hover:bg-[#099492] transition disabled:opacity-50","data-testid":"button-save-founders-footer",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):null,h?"Save changes":"Saved"]})]})]})}function wF(t,e){if(t instanceof _o){const n=t.data;return n&&typeof n.error=="string"&&n.error?n.error:`${t.status} ${t.statusText||e}`}return t instanceof Error&&t.message?t.message:e}function ta({title:t,children:e,defaultOpen:n=!1}){const[r,s]=N.useState(n);return c.jsxs("section",{className:"bg-white border border-neutral-200 rounded overflow-hidden min-w-0","data-testid":`panel-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`,children:[c.jsxs("button",{type:"button",onClick:()=>s(i=>!i),className:"w-full flex items-center justify-between px-5 py-3 hover:bg-neutral-50 transition",children:[c.jsx("span",{className:"text-sm font-bold uppercase tracking-wider text-neutral-900",children:t}),c.jsx(Ql,{className:`w-4 h-4 text-neutral-500 transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"px-5 py-4 border-t border-neutral-200 space-y-4",children:e})]})}function at({label:t,hint:e,children:n}){return c.jsxs("label",{className:"block",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.2em] text-neutral-600 mb-1.5",children:t}),n,e&&c.jsx("div",{className:"mt-1 text-[11px] text-neutral-500",children:e})]})}function ml({label:t,items:e,onChange:n,empty:r,renderRow:s,testIdPrefix:i}){return c.jsxs("div",{className:"pt-3 mt-2 border-t border-neutral-200",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.25em] text-neutral-500",children:t}),c.jsxs("button",{type:"button",onClick:()=>n([...e,structuredClone(r)]),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded border border-neutral-300 text-neutral-700 hover:bg-neutral-50","data-testid":`button-add-${i}`,children:[c.jsx(zn,{className:"w-3.5 h-3.5"})," Add"]})]}),c.jsx("div",{className:"space-y-4",children:e.map((a,l)=>c.jsxs("div",{className:"p-3 rounded border border-neutral-200 bg-neutral-50 space-y-3 relative","data-testid":`${i}-row-${l}`,children:[c.jsx("button",{type:"button",onClick:()=>{const d=[...e];d.splice(l,1),n(d)},className:"absolute top-2 right-2 p-1.5 rounded text-neutral-400 hover:bg-red-50 hover:text-red-600","data-testid":`button-remove-${i}-${l}`,"aria-label":"Remove",children:c.jsx(qn,{className:"w-3.5 h-3.5"})}),s(a,l,d=>{const h=[...e];h[l]=d,n(h)})]},l))})]})}function WSe(){const t=xJ();return t.isLoading?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx(Be,{className:"w-6 h-6 animate-spin text-neutral-400"})}):t.error||!t.data?c.jsx("div",{className:"p-8",children:c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:SF(t.error,"Couldn't load Apply page content.")})]})}):c.jsx(GSe,{initial:t.data})}function SF(t,e){return t?t instanceof _o?t.data?.error??e:t instanceof Error?t.message:e:e}function GSe({initial:t}){const[e,n]=N.useState(t),r=N.useRef(t),[s,i]=N.useState(null),[a,l]=N.useState(null);N.useEffect(()=>{r.current=t,n(t)},[t]);const d=SJ({mutation:{onSuccess:g=>{r.current=g,n(g),l(new Date),i(null)},onError:g=>{i(SF(g,"Failed to save changes."))}}}),h=JSON.stringify(e)!==JSON.stringify(r.current);function p(g,x){n(v=>({...v,[g]:x}))}function m(){i(null),d.mutate({data:e})}return c.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-10 pb-32",children:[c.jsxs("div",{className:"mb-8",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-[#0BB9B7] mb-1",children:"Apply page"}),c.jsx("h1",{className:"text-2xl font-black uppercase tracking-tight text-neutral-900",children:"Edit Apply page"}),c.jsxs("p",{className:"text-sm text-neutral-500 mt-1",children:["Controls the heading, intro text, and confirmation messages shown on"," ",c.jsx("a",{href:"/apply",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-[#0BB9B7] transition-colors",children:"/apply"}),"."]})]}),s&&c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 mb
271-6",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:s})]}),c.jsxs("div",{className:"space-y-8",children:[c.jsxs(_S,{title:"Hero copy",children:[c.jsx(yu,{label:"Eyebrow",hint:'Small text above the heading, e.g. "Apply to build with 100x100"',children:c.jsx("input",{value:e.eyebrow,onChange:g=>p("eyebrow",g.target.value),className:gu})}),c.jsx(yu,{label:"Heading",hint:'Large title, e.g. "Tell us about you."',children:c.jsx("input",{value:e.heading,onChange:g=>p("heading",g.target.value),className:gu})}),c.jsx(yu,{label:"Description",hint:"Intro paragraph shown below the heading. Explain who should apply.",children:c.jsx("textarea",{value:e.description,onChange:g=>p("description",g.target.value),rows:4,className:`${gu} resize-y`})})]}),c.jsx(YSe,{}),c.jsxs(_S,{title:"Success state",children:[c.jsx(yu,{label:"Success title",hint:'Headline shown after a successful submission, e.g. "Application received"',children:c.jsx("input",{value:e.successTitle,onChange:g=>p("successTitle",g.target.value),className:gu})}),c.jsx(yu,{label:"Success message",hint:"Body text shown below the success title.",children:c.jsx("textarea",{value:e.successMessage,onChange:g=>p("successMessage",g.target.value),rows:3,className:`${gu} resize-y`})})]})]}),c.jsxs("div",{className:"fixed bottom-0 left-64 right-0 bg-white border-t border-neutral-200 px-8 py-4 flex items-center justify-between z-10",children:[c.jsx("div",{className:"text-xs text-neutral-400",children:h?"Unsaved changes":a?`Saved ${a.toLocaleTimeString()}`:"No changes"}),c.jsxs("button",{onClick:m,disabled:!h||d.isPending,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-neutral-900 text-white text-sm font-bold uppercase tracking-wider rounded hover:bg-neutral-800 transition disabled:opacity-40 disabled:pointer-events-none",children:[d.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):c.jsx(Xl,{className:"w-4 h-4"}),"Save changes"]})]})]})}function YSe(){const t=GL(),e=YL(),[n,r]=N.useState(""),[s,i]=N.useState(!1),[a,l]=N.useState(!1),[d,h]=N.useState(!1),p=N.useRef(null);N.useEffect(()=>{t.data&&!a&&(p.current=t.data,r(t.data.resendApiKey??""))},[t.data,a]);async function m(){p.current&&(await e.mutateAsync({data:{...p.current,resendApiKey:n||null}}),p.current={...p.current,resendApiKey:n||null},l(!1),h(!0),setTimeout(()=>h(!1),3e3))}return c.jsx(_S,{title:"Email notifications",children:c.jsx(yu,{label:"Resend API key",hint:c.jsxs(c.Fragment,{children:["Used to send notification emails when someone submits this form. Get a free key at"," ",c.jsx("a",{href:"https://resend.com/api-keys",target:"_blank",rel:"noreferrer",className:"text-[#0BB9B7] hover:underline",children:"resend.com/api-keys"}),". Also verify your sending domain (",c.jsx("a",{href:"https://resend.com/domains",target:"_blank",rel:"noreferrer",className:"text-[#0BB9B7] hover:underline",children:"resend.com/domains"}),") so outgoing mail is accepted."]}),children:t.isLoading?c.jsxs("div",{className:"flex items-center gap-2 h-9 text-sm text-neutral-400",children:[c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"})," Loading…"]}):c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{type:s?"text":"password",value:n,placeholder:"re_••••••••••••••••••••••••••••••••",onChange:g=>{r(g.target.value),l(!0),h(!1)},className:`${gu} pr-9`,autoComplete:"off"}),c.jsx("button",{type:"button",onClick:()=>i(g=>!g),className:"absolute inset-y-0 right-2 flex items-center text-neutral-400 hover:text-neutral-600",tabIndex:-1,"aria-label":s?"Hide key":"Show key",children:s?c.jsx(s8,{className:"w-4 h-4"}):c.jsx(DP,{className:"w-4 h-4"})})]}),c.jsxs("button",{onClick:m,disabled:!a||e.isPending,className:"inline-flex items-center gap-1.5 px-4 py-2 bg-neutral-900 text-white text-sm font-bold uppercase tracking-wider rounded hover:bg-neutral-800 transition disabled:opacity-40 disabled:pointer-events-none whitespace-nowrap",children:[e.isPending?c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}):d?c.jsx(If,{className:"w-3.5 h-3.5 text-[#0BB9B7]"}):c.jsx(Xl,{className:"w-3.5 h-3.5"}),d?"Saved":"Save key"]})]})})})}const gu="w-full border border-neutral-200 rounded px-3 py-2 text-sm text-neutral-900 bg-white focus:outline-none focus:ring-1 focus:ring-[#0BB9B7] focus:border-[#0BB9B7]";function _S({title:t,children:e}){return c.jsxs("div",{className:"border border-neutral-200 rounded-lg overflow-hidden",children:[c.jsx("div",{className:"bg-neutral-50 border-b border-neutral-200 px-5 py-3",children:c.jsx("h2",{className:"text-xs font-bold uppercase tracking-[0.18em] text-neutral-600",children:t})}),c.jsx("div",{className:"p-5 space-y-5",children:e})]})}function yu({label:t,hint:e,children:n}){return c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-neutral-600 mb-1.5 block",children:t}),n,e&&c.jsx("span",{className:"text-[11px] text-neutral-400 mt-1 block",children:e})]})}const Ah=N.forwardRef(({className:t,type:e,...n},r)=>c.jsx("input",{type:e,className:er("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));Ah.displayName="Input";var QSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],XSe=QSe.reduce((t,e)=>{const n=ZI(`Primitive.${e}`),r=N.forwardRef((s,i)=>{const{asChild:a,...l}=s,d=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),JSe="Label",kF=N.forwardRef((t,e)=>c.jsx(XSe.label,{...t,ref:e,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(t.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));kF.displayName=JSe;var CF=kF;const ZSe=sk("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xu=N.forwardRef(({className:t,...e},n)=>c.jsx(CF,{ref:n,className:er(ZSe(),t),...e}));xu.displayName=CF.displayName;const NF=N.forwardRef(({className:t,...e},n)=>
271c.jsx("textarea",{className:er("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...e}));NF.displayName="Textarea";const eke="{{fullName}}  {{email}}  {{phone}}  {{linkedinUrl}}  {{websiteUrl}}  {{location}}  {{background}}  {{motivation}}  {{applicationId}}  {{submittedAt}}";function KD(t){const e=(t??"").replace(/\r\n/g,`
272`).replace(/\r/g,`
273`);return`"${(/^[=+\-@\t]/.test(e)?`'${e}`:e).replace(/"/g,'""')}"`}function tke(t){const e=["Submitted At","Full Name","Email","Phone","Location","LinkedIn URL","Website URL","Background","Motivation","Status","Application ID"],n=t.map(l=>[l.createdAt,l.fullName,l.email,l.phone,l.location,l.linkedinUrl,l.websiteUrl,l.background,l.motivation,l.status,l.id]),r=[e.map(KD).join(","),...n.map(l=>l.map(KD).join(","))].join(`\r
274`),s=new Blob([`\uFEFF${r}`],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(s),a=document.createElement("a");a.href=i,a.download=`founder-applications-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}function Za({label:t,value:e}){return e?c.jsxs("div",{children:[c.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wider text-neutral-500 mb-0.5",children:t}),c.jsx("dd",{className:"text-sm text-neutral-900 whitespace-pre-wrap break-words",children:e.startsWith("http")?c.jsxs("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-[#099492] hover:underline inline-flex items-center gap-1",children:[e," ",c.jsx(da,{className:"w-3 h-3 flex-shrink-0"})]}):e})]}):null}function nke({app:t,onClose:e}){return c.jsxs("div",{className:"border border-neutral-200 rounded bg-neutral-50 p-5 relative",children:[c.jsx("button",{onClick:e,className:"absolute top-3 right-3 text-neutral-400 hover:text-neutral-700","aria-label":"Close",children:c.jsx(Zs,{className:"w-4 h-4"})}),c.jsx("h3",{className:"font-bold text-base mb-4 pr-6",children:t.fullName}),c.jsxs("dl",{className:"grid sm:grid-cols-2 gap-x-8 gap-y-4",children:[c.jsx(Za,{label:"Email",value:t.email}),c.jsx(Za,{label:"Phone",value:t.phone}),c.jsx(Za,{label:"Location",value:t.location}),c.jsx(Za,{label:"Status",value:t.status}),c.jsx(Za,{label:"LinkedIn",value:t.linkedinUrl}),c.jsx(Za,{label:"Website",value:t.websiteUrl}),c.jsx("div",{className:"sm:col-span-2",children:c.jsx(Za,{label:"Background",value:t.background})}),c.jsx("div",{className:"sm:col-span-2",children:c.jsx(Za,{label:"Motivation",value:t.motivation})})]}),c.jsxs("p",{className:"text-xs text-neutral-400 mt-4",children:["ID: ",t.id," · Submitted:"," ",new Date(t.createdAt).toLocaleString(void 0,{dateStyle:"long",timeStyle:"short"})]})]})}function rke(){const t=GL(),e=YL(),n=TQ(),[r,s]=N.useState(!1),[i,a]=N.useState(!1),[l,d]=N.useState(!1),[h,p]=N.useState({fromEmail:"",toEmail:"",ccEmail:"",subjectTemplate:"",bodyTemplate:""}),[m,g]=N.useState(null),x=n.data?.find(j=>j.id===m)??null;N.useEffect(()=>{t.data&&!i&&p({fromEmail:t.data.fromEmail,toEmail:t.data.toEmail,ccEmail:t.data.ccEmail??"",subjectTemplate:t.data.subjectTemplate,bodyTemplate:t.data.bodyTemplate})},[t.data,i]);function v(j,E){p(A=>({...A,[j]:E})),a(!0),d(!1)}async function S(){await e.mutateAsync({data:{fromEmail:h.fromEmail,toEmail:h.toEmail,ccEmail:h.ccEmail||null,subjectTemplate:h.subjectTemplate,bodyTemplate:h.bodyTemplate}}),a(!1),d(!0)}const C=n.data??[];return c.jsxs("div",{className:"max-w-5xl mx-auto py-8 px-4 space-y-8",children:[c.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-2xl font-black tracking-tight mb-1 flex items-center gap-2",children:[c.jsx(Du,{className:"w-6 h-6 text-[#099492]"}),"Founder Applications"]}),c.jsx("p",{className:"text-sm text-neutral-500",children:"Review submissions from the Apply page and manage notification email templates."})]}),c.jsxs(gi,{type:"button",onClick:()=>tke(C),disabled:n.isLoading||C.length===0,className:"shrink-0",children:[c.jsx(RP,{className:"w-4 h-4"}),"Download all CSV"]})]}),c.jsxs("div",{className:"border border-neutral-200 rounded bg-white overflow-hidden",children:[c.jsxs("button",{onClick:()=>s(j=>!j),className:"w-full flex items-center justify-between px-4 py-3 text-sm font-semibold hover:bg-neutral-50 transition-colors",children:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(ok,{className:"w-4 h-4 text-[#099492]"}),"Email notification settings"]}),r?c.jsx(WH,{className:"w-4 h-4 text-neutral-400"}):c.jsx(Ql,{className:"w-4 h-4 text-neutral-400"})]}),r&&c.jsx("div",{className:"border-t border-neutral-200 p-5 space-y-5",children:t.isLoading?c.jsxs("div",{className:"flex items-center gap-2 text-sm text-neutral-500",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading…"]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx(xu,{htmlFor:"fromEmail",className:"mb-1 block",children:"From address"}),c.jsx(Ah,{id:"fromEmail",value:h.fromEmail,onChange:j=>v("fromEmail",j.target.value),placeholder:"100x100 <[email protected]>"}),c.jsxs("p",{className:"text-xs text-neutral-400 mt-1",children:["Must be a verified sender in your Resend account (",c.jsx("a",{href:"https://resend.com/domains",target:"_blank",rel:"noreferrer",className:"text-[#099492] hover:underline",children:"resend.com/domains"}),")."]})]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(xu,{htmlFor:"toEmail",className:"mb-1 block",children:"To"}),c.jsx(Ah,{id:"toEmail",value:h.toEmail,onChange:j=>v("toEmail",j.target.value),placeholder:"[email protected]"})]}),c.jsxs("div",{children:[c.jsx(xu,{htmlFor:"ccEmail",className:"mb-1 block",children:"CC"}),c.jsx(Ah,{id:"ccEmail",value:h.ccEmail,onChange:j=>v("ccEmail",j.target.value),placeholder:"[email protected]"})]})]}),c.jsxs("div",{children:[c.jsx(xu,{htmlFor:"subjectTemplate",className:"mb-1 block",children:"Subject template"}),c.jsx(Ah,{id:"subjectTemplate",value:h.subjectTemplate,onChange:j=>v("subjectTemplate",j.target.value),placeholder:"New Founder Application – {{fullName}}"})]}),c.jsxs("div",{children:[c.jsxs(xu,{htmlFor:"bodyTemplate",className:"mb-1 block",children:["Body template"," ",c.jsx("span",{className:"font-normal text-neutral-400",children:"(HTML)"})]}),c.jsx(NF,{id:"bodyTemplate",value:h.bodyTemplate,onChange:j=>v("bodyTemplate",j.target.value),rows:18,className:"font-mono text-xs"}),c.jsxs("p",{className:"text-xs text-neutral-400 mt-1",children:["Available variables:"," ",c.jsx("code",{className:"bg-neutral-100 px-1 rounded text-[11px]",children:eke})]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs(gi,{onClick:S,disabled:e.isPending||!i,className:"flex items-center gap-2",children:[e.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):c.jsx(Xl,{className:"w-4 h-4"}),"Save settings"]}),l&&c.jsx("span",{className:"text-sm text-[#099492] font-medium",children:"Saved ✓"}),e.isError&&c.jsx("span",{className:"text-sm text-red-600",children:"Save failed — try again."})]})]})})]}),c.jsxs("div",{children:[c.jsxs("h2",{className:"text-sm font-bold uppercase tracking-wider mb-3 flex items-center gap-2",children:[c.jsx(Du,{className:"w-4 h-4"}),"Applications"," ",!n.isLoading&&c.jsxs("span",{className:"font-normal text-neutral-400 normal-case tracking-normal",children:["(",C.length,")"]})]}),n.isLoading?c.jsxs("div",{className:"flex items-center gap-2 text-sm text-neutral-500 py-6",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading…"]}):C.length===0?c.jsx("div",{className:"bg-white border border-neutral-200 rounded p-8 text-center text-sm text-neutral-400",children:"No applications yet."}):c.jsx("div",{className:"bg-white border border-neutral-200 rounded overflow-hidden",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{className:"bg-neutral-50 border-b border-neutral-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left px-4 py-2 font-semibold text-neutral-600 text-xs uppercase tracking-wider",children:"Date"}),c.jsx("th",{className:"text-left px-4 py-2 font-semibold text-neutral-600 text-xs uppercase tracking-wider",children:"Name"}),c.jsx("th",{className:"text-left px-4 py-2 font-semibold text-neutral-600 text-xs uppercase tracking-wider hidden sm:table-cell",children:"Email"}),c.jsx("th",{className:"text-left px-4 py-2 font-semibold text-neutral-600 text-xs uppercase tracking-wider hidden md:table-cell",children:"Location"}),c.jsx("th",{className:"text-left px-4 py-2 font-semibold text-neutral-600 text-xs uppercase tracking-wider",children:"Status"})]})}),c.jsx("tbody",{className:"divide-y divide-neutral-100",children:C.map(j=>c.jsxs("tr",{onClick:()=>g(E=>
274E===j.id?null:j.id),className:`cursor-pointer hover:bg-neutral-50 transition-colors ${m===j.id?"bg-teal-50":""}`,children:[c.jsx("td",{className:"px-4 py-3 text-neutral-500 whitespace-nowrap",children:new Date(j.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),c.jsx("td",{className:"px-4 py-3 font-medium text-neutral-900",children:j.fullName}),c.jsx("td",{className:"px-4 py-3 text-neutral-600 hidden sm:table-cell",children:j.email}),c.jsx("td",{className:"px-4 py-3 text-neutral-500 hidden md:table-cell",children:j.location??"—"}),c.jsx("td",{className:"px-4 py-3",children:c.jsx("span",{className:"inline-block px-2 py-0.5 rounded-full text-xs font-medium bg-neutral-100 text-neutral-600 capitalize",children:j.status})})]},j.id))})]})}),x&&c.jsx("div",{className:"mt-4",children:c.jsx(nke,{app:x,onClose:()=>g(null)})})]})]})}function ske(){const t=QL({limit:200},{query:{retry:!1}});return c.jsxs("div",{className:"p-8 max-w-5xl",children:[c.jsxs("div",{className:"mb-6",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Audit log"}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Append-only history of every saved change. Showing the most recent 200 entries, newest first."}),c.jsxs("div",{className:"mt-3 inline-flex items-center gap-2 px-3 py-1.5 rounded bg-gray-50 border border-gray-200 text-xs text-gray-700","data-testid":"audit-log-readonly-banner",children:[c.jsx(I8,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Read-only. Entries cannot be edited or deleted from the app."})]})]}),t.isLoading?c.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading audit log…"]}):t.error?c.jsx(ake,{err:t.error}):c.jsx(ike,{items:t.data?.items??[]})]})}function ike({items:t}){return t.length===0?c.jsx("div",{className:"rounded border border-dashed border-gray-300 p-8 text-center text-sm text-gray-500","data-testid":"audit-log-empty",children:"No saved changes yet. Edits made through the admin will appear here."}):c.jsx("div",{className:"overflow-x-auto rounded border border-gray-200",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm","data-testid":"audit-log-table",children:[c.jsx("thead",{className:"bg-gray-50",children:c.jsxs("tr",{children:[c.jsx(Xm,{children:"When"}),c.jsx(Xm,{children:"User"}),c.jsx(Xm,{children:"Item changed"}),c.jsx(Xm,{children:"Details"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-100 bg-white",children:t.map(e=>c.jsxs("tr",{"data-testid":`audit-row-${e.id}`,children:[c.jsx(Jm,{className:"whitespace-nowrap text-gray-700",children:oke(e.createdAt)}),c.jsx(Jm,{className:"whitespace-nowrap text-gray-900","data-testid":`audit-row-${e.id}-email`,children:e.userEmail}),c.jsx(Jm,{className:"whitespace-nowrap",children:c.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded bg-gray-100 text-gray-800 text-xs font-mono","data-testid":`audit-row-${e.id}-action`,children:e.action})}),c.jsx(Jm,{className:"text-gray-700","data-testid":`audit-row-${e.id}-summary`,children:e.summary})]},e.id))})]})})}function Xm({children:t}){return c.jsx("th",{className:"px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-gray-500",children:t})}function Jm({children:t,className:e="",...n}){return c.jsx("td",{className:`px-3 py-2 align-top ${e}`,...n,children:t})}function ake({err:t}){let e="Couldn't load the audit log.";if(t instanceof _o)if(t.status===403)e="Only admins can view the audit log.";else{const n=t.data;n?.error&&(e=n.error)}return c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl","data-testid":"audit-log-error",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:e})]})}function oke(t){try{return new Date(t).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return t}}const lke=[{key:wm.white,label:"White",description:"Original solid white wordmark.",tinted:!1},{key:wm["mint-bright"],label:"Teal bright",description:"Feature-coloured wordmark on transparent.",tinted:!0},{key:wm["mint-bright-x"],label:"Teal bright X",description:"Compact feature-coloured variant for small surfaces.",tinted:!0},{key:wm["mint-duo-dark"],label:"Teal duo dark",description:"Two-tone (white 
274+ teal) for dark backgrounds.",tinted:!0}];function cke(t){return`/logos/${t}.png`}const jF={admin:"Admin",marketing:"Marketing",jobs_manager:"Jobs manager",portfolio_editor:"Portfolio editor"},uke=/^#[0-9a-fA-F]{6}$/;function dke(){const t=BQ({query:{retry:!1}}),{data:e}=nd({query:{retry:!1}}),n=e?.role==="admin";return c.jsxs("div",{className:"p-8 max-w-4xl",children:[c.jsxs("div",{className:"mb-6",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Settings"}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Manage site-wide preferences."})]}),c.jsxs("section",{className:"rounded border border-gray-200 bg-white p-6 mb-6",children:[c.jsxs("header",{className:"mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Feature colour"}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Saved palette of brand colours. Pick one as the active feature colour. Add more by entering a hex value or using the colour picker."})]}),t.isLoading?c.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 py-4",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading colours…"]}):t.error?c.jsx(Gy,{err:t.error}):c.jsx(mke,{items:t.data?.items??[]})]}),n?c.jsx(hke,{}):null,n?c.jsx(fke,{meId:e.id}):null]})}function hke(){const t=kn(),e=eee({query:{retry:!1}}),n=see(),[r,s]=N.useState(null),[i,a]=N.useState(null);N.useEffect(()=>{e.data&&s(e.data)},[e.data]);const l=N.useMemo(()=>!r||!e.data?!1:r.navbarLogoKey!==e.data.navbarLogoKey||r.footerLogoKey!==e.data.footerLogoKey||(r.faviconUrl??null)!==(e.data.faviconUrl??null),[r,e.data]);function d(){r&&n.mutate({data:r},{onSuccess:()=>{a(Date.now()),t.invalidateQueries({queryKey:t3()}),t.invalidateQueries({queryKey:e3()})}})}return c.jsxs("section",{className:"rounded border border-gray-200 bg-white p-6 mb-6","data-testid":"settings-logos",children:[c.jsxs("header",{className:"mb-4",children:[c.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center gap-2",children:[c.jsx(LP,{className:"w-4 h-4 text-emerald-600"})," Logos"]}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Pick which logo file the public site uses in the navbar and the footer. Changes are visible to visitors within ~60 seconds."})]}),e.isLoading?c.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 py-4",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading…"]}):e.error||!r?c.jsx(Gy,{err:e.error}):c.jsxs("div",{className:"space-y-8",children:[c.jsx(WD,{label:"Navbar logo",value:r.navbarLogoKey,background:"dark",onChange:h=>s({...r,navbarLogoKey:h}),testId:"picker-navbar-logo"}),c.jsx(WD,{label:"Footer logo",value:r.footerLogoKey,background:"dark",onChange:h=>s({...r,footerLogoKey:h}),testId:"picker-footer-logo"}),c.jsxs("div",{className:"pt-2 border-t border-gray-100",children:[c.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:"Favicon"}),c.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"The icon shown in browser tabs. Upload a square image (e.g. your logo mark). Changes take effect after saving."}),c.jsx(Ss,{label:"",value:r.faviconUrl??"",onChange:h=>s({...r,faviconUrl:h||null}),aspect:1,outputWidth:256,shape:"rect",testId:"upload-favicon"})]}),c.jsxs("div",{className:"flex items-center gap-3 pt-2 border-t border-gray-100",children:[c.jsxs("button",{type:"button",onClick:d,disabled:!l||n.isPending,className:"inline-flex items-center gap-2 px-4 py-2 rounded bg-[#003320] text-white text-sm font-bold uppercase tracking-wider hover:bg-[#099492] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","data-testid":"button-save-logos",children:[n.isPending?c.jsx(Be,{className:"w-4 h-4 animate-spin"}):c.jsx(Xl,{className:"w-4 h-4"}),"Save logos"]}),n.error?c.jsx(Gy,{err:n.error}):null,!n.error&&i&&!l?c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-emerald-700 font-semibold",children:[c.jsx(Lf,{className:"w-3 h-3"})," Saved"]}):null]})]})]})}function WD({label:t,value:e,background:n,onChange:r,testId:s}){const i=n==="dark"?"bg-neutral-900":"bg-neutral-100 border border-neutral-200";return c.jsxs("div",{"data-testid":s,children:[c.jsx("div",{className:"text-sm font-semibold text-gray-900 mb-2",children:t}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:lke.map(a=>{const l=e===a.key;return c.jsxs("button",{type:"button",onClick:()=>r(a.key),className:`text-left rounded border-2 transition ${l?"border-[#099492] ring-2 ring-[#0BB9B7]/30":"border-gray-200 hover:border-gray-400"}`,"data-testid":`${s}-option-${a.key}`,"aria-pressed":l,children:[c.jsx("div",{className:`flex items-center justify-center h-20 rounded-t ${i}`,children:c.jsx("img",{src:cke(a.key),alt:a.label,className:"h-8 w-auto",loading:"lazy",style:a.tinted?{filter:"hue-rotate(var(--logo-hue-rotate, 35deg))"}:void 0})}),c.jsxs("div",{className:"px-3 py-2",children:[c.jsx("div",{className:"text-xs font-bold text-gray-900",children:a.label}),c.jsx("div",{className:"text-[11px] text-gray-500 mt-0.5 leading-tight",children:a.description})]})]},a.key)})})]})}function fke({meId:t}){const e=jJ({query:{retry:!1}}),n=zf({query:{retry:!1}}),[r,s]=N.useState(!1);return c.jsxs("section",{className:"rounded border border-gray-200 bg-white p-6","data-testid":"settings-access-control",children:[c.jsxs("header",{className:"mb-4 flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center gap-2",children:[c.jsx(oK,{className:"w-4 h-4 text-emerald-600"})," Access control"]}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Invite teammates and assign their CMS role. Portfolio editors must be linked to a company."})]}),r?null:c.jsxs("button",{type:"button",onClick:()=>s(!0),className:"inline-flex items-center gap-2 px-3 py-2 rounded border border-gray-300 bg-white hover:bg-gray-50 text-sm font-medium text-gray-700","data-testid":"button-invite-user",children:[c.jsx(zn,{className:"w-4 h-4"})," Invite user"]})]}),r?c.jsx(EF,{mode:"create",companies:n.data??[],onClose:()=>s(!1)}):null,e.isLoading?c.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 py-4",children:[c.jsx(Be,{className:"w-4 h-4 animate-spin"})," Loading users…"]}):e.error?c.jsx(Gy,{err:e.error}):c.jsxs("div",{className:"mt-4 divide-y divide-gray-100 border border-gray-100 rounded","data-testid":"cms-users-l
274ist",children:[(e.data?.items??[]).map(i=>c.jsx(pke,{user:i,meId:t,companies:n.data??[]},i.id)),(e.data?.items??[]).length===0?c.jsx("div",{className:"px-3 py-4 text-sm text-gray-500",children:"No CMS users yet."}):null]})]})}function pke({user:t,meId:e,companies:n}){const r=kn(),s=()=>r.invalidateQueries({queryKey:kk()}),[i,a]=N.useState(!1),[l,d]=N.useState(null),h=UJ({mutation:{onSuccess:s,onError:g=>d(Ro(g,"Couldn't remove user."))}}),p=t.id===e,m=n.find(g=>g.id===t.companyId);return i?c.jsx("div",{className:"p-3",children:c.jsx(EF,{mode:"edit",user:t,isSelf:p,companies:n,onClose:()=>a(!1)})}):c.jsxs("div",{className:"px-3 py-3 flex items-center gap-3","data-testid":`cms-user-row-${t.id}`,children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"font-medium text-gray-900 truncate",children:t.fullName||t.email}),p?c.jsx("span",{className:"text-[10px] uppercase tracking-wide font-bold text-emerald-700 bg-emerald-50 border border-emerald-200 rounded px-1.5 py-0.5",children:"You"}):null,t.isActive?null:c.jsx("span",{className:"text-[10px] uppercase tracking-wide font-bold text-gray-600 bg-gray-100 rounded px-1.5 py-0.5",children:"Disabled"})]}),c.jsxs("div",{className:"text-xs text-gray-500 mt-0.5 truncate",children:[t.email,m?` · ${m.name}`:""]})]}),c.jsx("div",{className:"text-xs font-semibold text-gray-700 capitalize whitespace-nowrap",children:jF[t.role]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>{d(null),a(!0)},className:"p-1.5 rounded text-gray-500 hover:bg-gray-100","aria-label":"Edit user","data-testid":`button-edit-user-${t.id}`,children:c.jsx(BP,{className:"w-3.5 h-3.5"})}),c.jsx("button",{type:"button",onClick:()=>{p||confirm(`Remove ${t.email} from the CMS?`)&&(d(null),h.mutate({id:t.id}))},disabled:p||h.isPending,className:"p-1.5 rounded text-gray-500 hover:bg-red-50 hover:text-red-600 disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500","aria-label":"Remove user",title:p?"You can't remove your own access":"Remove","data-testid":`button-delete-user-${t.id}`,children:h.isPending?c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(qn,{className:"w-3.5 h-3.5"})})]}),l?c.jsx("div",{className:"text-xs text-red-600 ml-2 max-w-[40%]",children:l}):null]})}function EF({mode:t,user:e,isSelf:n,companies:r,onClose:s}){const i=kn(),a=()=>i.invalidateQueries({queryKey:kk()}),[l,d]=N.useState(e?.email??""),[h,p]=N.useState(e?.fullName??""),[m,g]=N.useState(e?.role??"marketing"),[x,v]=N.useState(e?.companyId??""),[S,C]=N.useState(e?.canPublish??!0),[j,E]=N.useState(e?.isActive??!0),[A,D]=N.useState(null),M=MJ({mutation:{onSuccess:()=>{a(),s()},onError:B=>D(Ro(B,"Couldn't invite user."))}}),I=_J({mutation:{onSuccess:()=>{a(),s()},onError:B=>D(Ro(B,"Couldn't save user."))}}),_=M.isPending||I.isPending,L=N.useMemo(()=>r.filter(B=>B.kind==="portfolio"),[r]);function V(){if(D(null),m==="portfolio_editor"&&!x){D("Pick a portfolio company for this editor.");return}if(t==="create"){if(!l.trim()){D("Email is required.");return}M.mutate({data:{email:l.trim().toLowerCase(),fullName:h.trim()||void 0,role:m,companyId:m==="portfolio_editor"?x:void 0,canPublish:S}})}else e&&I.mutate({id:e.id,data:{fullName:h.trim()||null,role:m,companyId:m==="portfolio_editor"?x:null,canPublish:S,isActive:j}})}return c.jsxs("div",{className:"rounded border border-gray-300 bg-gray-50 p-4","data-testid":t==="create"?"user-editor-new":`user-editor-${e.id}`,children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Email"}),c.jsx("input",{type:"email",value:l,disabled:t==="edit",onChange:B=>d(B.target.value),placeholder:"[email protected]",className:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 disabled:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500","data-testid":"input-user-email"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Full name"}),c.jsx("input",{type:"text",value:h,onChange:B=>p(B.target.value),placeholder:"Optional",className:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500","data-testid":"input-user-fullname"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Role"}),c.jsx("select",{value:m,onChange:B=>g(B.target.value),disabled:n,className:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 bg-white disabled:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500","data-testid":"select-user-role",children:Object.entries(jF).map(([B,K])=>c.jsx("option",{value:B,children:K},B))}),n?c.jsx("p",{className:"text-[11px] text-gray-500 mt-1",children:"You can't change your own role."}):null]}),m==="portfolio_editor"?c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Linked company"}),c.jsxs("select",{value:x,onChange:B=>v(B.target.value),className:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 bg-white focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500","data-testid":"select-user-company",children:[c.jsx("option",{value:"",children:"Pick a company…"}),L.map(B=>c.jsx("option",{value:B.id,children:B.name},B.id))]})]}):null,c.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-700",children:[c.jsx("input",{type:"checkbox",checked:S,onChange:B=>C(B.target.checked),"data-testid":"input-user-can-publish"}),"Can publish jobs without approval"]}),t==="edit"?c.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-700",children:[c.jsx("input",{type:"checkbox",checked:j,disabled:n,onChange:B=>E(B.target.checked),"data-testid":"input-user-active"}),"Active"]}):null]}),A?c.jsxs("div",{className:"mt-3 flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-xs text-red-800","data-testid":"user-editor-error",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:A})]}):null,c.jsxs("div",{className:"mt-3 flex items-center justify-end gap-2",children:[c.jsxs("button",{type:"button",onClick:s,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm text-gray-700 hover:bg-gray-100",children:[c.jsx(Zs,{className:"w-3.5 h-3.5"})," Cancel"]}),c.jsxs("button",{type:"button",onClick:V,disabled:_,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded bg-emerald-600 text-white text-sm font-medium hover:bg-emerald-700 disabled:opacity-50","data-testid":"button-save-user",children:[_?c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(Lf,{className:"w-3.5 h-3.5"}),t==="create"?"Send invite":"Save"]})]})]})}function mke({items:t}){const[e,n]=N.useState(!1);return c.jsxs("div",{children:[c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3","data-testid":"brand-colors-list",children:t.map(r=>c.jsx(gke,{item:r,canDelete:!r.isActive},r.id))}),c.jsx("div",{className:"mt-6",children:e?c.jsx(TF,{mode:"create",initial:{name:"",hex:"#0bb9b7"},onClose:()=>n(!1)}):c.jsxs("button",{type:"button",onClick:()=>n(!0),className:"inline-flex items-center gap-2 px-3 py-2 rounded border border-gray-300 bg-white hover:bg-gray-50 text-sm font-medium text-gray-700","data-testid":"button-add-brand-color",children:[c.jsx(zn,{className:"w-4 h-4"})," Add colour"]})})]})}function gke({item:t,canDelete:e}){const n=kn(),r=()=>n.invalidateQueries({queryKey:Sk()}),[s,i]=N.useState(!1),[a,l]=N.useState(null),d=tX({mutation:{onSuccess:r,onError:p=>l(Ro(p,"Couldn't set as active."))}}),h=XQ({mutation:{onSuccess:r,onError:p=>l(Ro(p,"Couldn't delete colour."))}});return s?c.jsx(TF,{mode:"edit",id:t.id,initial:{name:t.name,hex:t.hex},onClose:()=>i(!1)}):c.jsxs("div",{className:"flex items-center gap-3 rounded border border-gray-200 bg-white p-3","data-testid":`brand-color-row-${t.id}`,children:[c.jsx(yke,{hex:t.hex}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"font-medium text-gray-900 truncate","data-testid":`brand-color-name-${t.id}`,children:t.name}),t.isActive&&c.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wide bg-emerald-50 text-emerald-700 border border-emerald-200","data-testid":`brand-color-active-badge-${t.id}`,children:[c.jsx(Lf,{className:"w-3 h-3"})," Active"]})]}),c.jsx("div",{className:"text-xs font-mono text-gray-500 mt-0.5",children:t.hex.toUpperCase()})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[!t.isActive&&c.jsx("button",{type:"button",onClick:()=>{l(null),d.mutate({id:t.id})},disabled:d.isPending,className:"px-2 py-1 rounded text-xs font-medium text-emerald-700 hover:bg-emerald-50 disabled:opacity-50","data-testid":`button-activate-${t.id}`,children:d.isPending?c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}):"Set active"}),c.jsx("button",{type:"button",onClick:()=>{l(null),i(!0)},className:"p-1.5 rounded text-gray-500 hover:bg-gray-100","data-testid":`button-edit-${t.id}`,"aria-label":"Edit colour",children:c.jsx(BP,{className:"w-3.5 h-3.5"})}),c.jsx("button",{type:"button",onClick:()=>{e&&confirm(`Delete "${t.name}"?`)&&(l(null),h.mutate({id:t.id}))},disabled:!e||h.isPending,className:"p-1.5 rounded text-gray-500 hover:bg-red-50 hover:text-red-600 disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500","data-testid":`button-delete-${t.id}`,"aria-label":"Delete colour",title:e?"Delete":"Cannot delete the active colour",children:h.isPending?c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}
274):c.jsx(qn,{className:"w-3.5 h-3.5"})})]}),a&&c.jsx("div",{className:"ml-2 text-xs text-red-600 max-w-[40%]","data-testid":`brand-color-error-${t.id}`,children:a})]})}function TF({mode:t,id:e,initial:n,onClose:r}){const s=kn(),i=()=>s.invalidateQueries({queryKey:Sk()}),[a,l]=N.useState(n.name),[d,h]=N.useState(n.hex.toLowerCase()),[p,m]=N.useState(null),g=N.useRef(null);N.useEffect(()=>{g.current?.focus()},[]);const x=VQ({mutation:{onSuccess:()=>{i(),r()},onError:D=>m(Ro(D,"Couldn't save colour."))}}),v=WQ({mutation:{onSuccess:()=>{i(),r()},onError:D=>m(Ro(D,"Couldn't save colour."))}}),S=x.isPending||v.isPending,C=a.trim(),j=uke.test(d),E=C.length>0&&j&&!S;function A(){E&&(m(null),t==="create"?x.mutate({data:{name:C,hex:d.toLowerCase()}}):e&&v.mutate({id:e,data:{name:C,hex:d.toLowerCase()}}))}return c.jsxs("div",{className:"rounded border border-gray-300 bg-gray-50 p-4","data-testid":t==="create"?"brand-color-editor-new":`brand-color-editor-${e}`,children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex flex-col items-center gap-1",children:c.jsx("label",{className:"block w-12 h-12 rounded border border-gray-300 cursor-pointer overflow-hidden",style:{backgroundColor:j?d:"#cccccc"},"aria-label":"Pick a colour",children:c.jsx("input",{type:"color",value:j?d:"#cccccc",onChange:D=>h(D.target.value.toLowerCase()),className:"opacity-0 w-12 h-12 cursor-pointer","data-testid":"input-color-picker"})})}),c.jsxs("div",{className:"flex-1 grid grid-cols-1 sm:grid-cols-2 gap-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Name"}),c.jsx("input",{ref:g,type:"text",value:a,onChange:D=>l(D.target.value),maxLength:60,placeholder:"e.g. Charged Mint",className:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500","data-testid":"input-color-name"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Hex"}),c.jsx("input",{type:"text",value:d,onChange:D=>{let M=D.target.value.trim().toLowerCase();M&&!M.startsWith("#")&&(M="#"+M),h(M)},maxLength:7,placeholder:"#0bb9b7",className:`w-full px-2 py-1.5 text-sm font-mono rounded border ${d&&!j?"border-red-400 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-emerald-500 focus:border-emerald-500"} focus:outline-none focus:ring-1`,"data-testid":"input-color-hex"})]})]})]}),p&&c.jsxs("div",{className:"mt-3 flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-xs text-red-800","data-testid":"brand-color-editor-error",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:p})]}),c.jsxs("div",{className:"mt-3 flex items-center justify-end gap-2",children:[c.jsxs("button",{type:"button",onClick:r,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm text-gray-700 hover:bg-gray-100",children:[c.jsx(Zs,{className:"w-3.5 h-3.5"})," Cancel"]}),c.jsxs("button",{type:"button",onClick:A,disabled:!E,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded bg-emerald-600 text-white text-sm font-medium hover:bg-emerald-700 disabled:opacity-50","data-testid":"button-save-color",children:[S?c.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(Lf,{className:"w-3.5 h-3.5"}),t==="create"?"Add colour":"Save"]})]})]})}function yke({hex:t}){return c.jsx("div",{className:"w-10 h-10 rounded border border-gray-300 flex-shrink-0",style:{backgroundColor:t},"aria-hidden":!0})}function Gy({err:t}){return c.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-red-50 border border-red-200 text-sm text-red-800 max-w-xl",children:[c.jsx(kt,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:Ro(t,"Couldn't load colours.")})]})}function Ro(t,e){if(t instanceof _o){const n=t.data;return n?.error?n.error:t.status===403?"Only admins can manage settings.":`${t.status} ${t.statusText||e}`}return t instanceof Error&&t.message?t.message:e}const xke=new I6,AF=rV(window.location.hostname,"pk_live_Y2xlcmsud3d3LjEwMHgxMDAuY29tJA"),bke="/api/__clerk",Ur="/".replace(/\/$/,"");function GD(t){return Ur&&t.startsWith(Ur)?t.slice(Ur.length)||"/":t}if(!AF)throw new Error("Missing VITE_CLERK_PUBLISHABLE_KEY");const vke={theme:E9.shadcn,cssLayerName:"clerk",options:{logoPlacement:"inside",logoLinkUrl:Ur||"/",logoImageUrl:`${window.location.origin}${Ur}/logos/100x100-charcoal-mint.png`},variables:{colorPrimary:"#003320",colorForeground:"#0a0a0a",colorMutedForeground:"#737373",colorDanger:"#dc2626",colorBackgroun
274d:"#ffffff",colorInput:"#ffffff",colorInputForeground:"#0a0a0a",colorNeutral:"#e5e5e5",fontFamily:"Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif",borderRadius:"0.375rem"},elements:{rootBox:"w-full flex justify-center",cardBox:"bg-white rounded-2xl w-[440px] max-w-full overflow-hidden shadow-xl border border-neutral-200",card:"!shadow-none !border-0 !bg-transparent !rounded-none",footer:"!shadow-none !border-0 !bg-transparent !rounded-none",headerTitle:"text-2xl font-black uppercase tracking-tight text-neutral-900",headerSubtitle:"text-sm text-neutral-600",socialButtonsBlockButton:"!border-neutral-300 hover:!bg-neutral-50 transition",socialButtonsBlockButtonText:"font-semibold text-neutral-900",formButtonPrimary:"!bg-[#003320] hover:!bg-[#099492] !text-white font-bold uppercase tracking-wider transition",formFieldLabel:"text-xs font-bold uppercase tracking-wider text-neutral-700",formFieldInput:"!border-neutral-300 focus:!border-neutral-900 focus:!ring-1 focus:!ring-neutral-900",footerActionLink:"!text-[#0BB9B7] hover:!text-[#003320] font-semibold transition",footerActionText:"text-neutral-600",dividerText:"text-neutral-500",dividerLine:"bg-neutral-200",identityPreviewEditButton:"text-[#0BB9B7] hover:text-[#003320]",formFieldSuccessText:"text-[#0BB9B7]",alertText:"text-red-700",logoBox:"justify-center",logoImage:"h-10"}};function wke(t){const e=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16),s=.8;return`#${Math.round(e*s).toString(16).padStart(2,"0")}${Math.round(n*s).toString(16).padStart(2,"0")}${Math.round(r*s).toString(16).padStart(2,"0")}`}function Ske(t){const e=parseInt(t.slice(1,3),16)/255,n=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,s=Math.max(e,n,r),i=Math.min(e,n,r);if(s===i)return 0;const a=s-i;let l=0;return s===e?l=(n-r)/a+(n<r?6:0):s===n?l=(r-e)/a+2:l=(e-n)/a+4,Math.round(l*60)%360}const kke=144;function Cke(){const{data:t}=yx({query:{retry:!1,staleTime:6e4}});return N.useEffect(()=>{const e=t?.faviconUrl,n=document.querySelector("link[rel='icon']");n&&(e?(n.href=e,n.type="image/png"):(n.href="/favicon.png",n.type="image/png"))},[t?.faviconUrl]),null}function Nke(){const{data:t}=yx({query:{retry:!1,staleTime:6e4}});return N.useEffect(()=>{const e=t?.featureColor,n=document.documentElement;if(e&&/^#[0-9a-fA-F]{6}$/.test(e)){n.style.setProperty("--feature-color",e),n.style.setProperty("--feature-color-hover",wke(e));const r=Ske(e)-kke;n.style.setProperty("--logo-hue-rotate",`${r}deg`)}else n.style.removeProperty("--feature-color"),n.style.removeProperty("--feature-color-hover"),n.style.removeProperty("--logo-hue-rotate")},[t?.featureColor]),null}function jke(){const[t]=Ti();return N.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[t]),null}function Eke(){const{addListener:t}=E_(),e=kn(),n=N.useRef(void 0);return N.useEffect(()=>t(({user:s})=>{const i=s?.id??null;n.current!==void 0&&n.current!==i&&e.clear(),n.current=i}),[t,e]),null}function Tke(){return c.jsx("div",{className:"flex min-h-[100dvh] items-center justify-center bg-neutral-50 px-4 py-10",children:c.jsx(w$,{routing:"path",path:`${Ur}/sign-in`,signUpUrl:`${Ur}/sign-up`,fallbackRedirectUrl:`${Ur}/admin`})})}function Ake(){return c.jsx("div",{className:"flex min-h-[100dvh] items-center justify-center bg-neutral-50 px-4 py-10",children:c.jsx(S$,{routing:"path",path:`${Ur}/sign-up`,signInUrl:`${Ur}/sign-in`,fallbackRedirectUrl:`${Ur}/admin`})})}function Mke(){return _he(),c.jsxs("div",{className:"flex flex-col min-h-screen",children:[c.jsx(K4,{}),c.jsx("main",{className:"flex-grow",children:c.jsxs(FS,{children:[c.jsx(nt,{path:"/",component:Die}),c.jsx(nt,{path:"/founders",component:_ie}),c.jsx(nt,{path:"/apply",component:zhe}),c.jsx(nt,{path:"/investors",component:Yie}),c.jsx(nt,{path:"/companies",component:nae}),c.jsx(nt,{path:"/team",component:aae}),c.jsx(nt,{path:"/thesis",component:lae}),c.jsx(nt,{path:"/stories",component:fae}),c.jsx(nt,{path:"/stories/:slug",component:yae}),c.jsx(nt,{path:"/grievance-redressal",component:qae}),c.jsx(nt,{path:"/sitemap",component:Hae}),c.jsx(nt,{path:"/careers",component:Yae}),c.jsx(nt,{path:"/careers/:slug",component:Uhe}),c.jsx(nt,{component:G4})]})}),c.jsx(W4,{})]})}function YD(){return c.jsxs(c.Fragment,{children:[c.jsx(s1,{when:"signed-out",children:c.jsx(Oke,{})}),c.jsx(s1,{when:"signed-in",children:c.jsx(Khe,{children:c.jsxs(FS,{children:[c.jsx(nt,{path:"/admin",component:Ghe}),c.jsx(nt,{path:"/admin/homepage",component:BSe}),c.jsx(nt,{path:"/admin/investors",component:zSe}),c.jsx(nt,{path:"/admin/thesis",component:VSe}),c.jsx(nt,{path:"/admin/founders",component:HSe}),c.jsx(nt,{path:"/admin/apply",component:WSe}),c.jsx(nt,{path:"/admin/founder-applications",component:rke}),c.jsx(nt,{path:"/admin/audit-log",component:ske}),c.jsx(nt,{path:"/admin/settings",component:dke}),c.jsx(nt,{path:"/admin/jobs",component:Qhe}),c.jsx(nt,{path:"/admin/jobs/new",component:qO}),c.jsx(nt,{path:"/admin/jobs/:id",component:qO}),c.jsx(nt,{path:"/admin/companies",component:tfe}),c.jsx(nt,{path:"/admin/companies/new",component:GO}),c.jsx(nt,{path:"/admin/companies/:id",component:GO}),c.jsx(nt,{path:"/admin/team",component:cme}),c.jsx(nt,{path:"/admin/stories",component:k1e}),c.jsx(nt,{path:"/admin/grievance",component:N1e}),c.jsx(nt,{path:"/admin/grievance-submissions",component:DSe}),c.jsx(nt,{path:"/admin/sitemap",component:USe}),c.jsx(nt,{component:G4})]})})})]})}function Oke(){const[,t]=Ti();return N.useEffect(()=>{t("/sign-in")},[t]),null}function Rke(){return c.jsxs(c.Fragment,{children:[c.jsx(jke,{}),c.jsxs(FS,{children:[c.jsx(nt,{path:"/sign-in/*?",component:Tke}),c.jsx(nt,{path:"/sign-up/*?",component:Ake}),c.jsx(nt,{path:"/admin",component:YD}),c.jsx(nt,{path:"/admin/*",component:YD}),c.jsx(nt,{component:Mke})]})]})}function Dke(){const[,t]=Ti();return c.jsx(Z_,{publishableKey:AF,proxyUrl:bke,appearance:vke,signInUrl:`${Ur}/sign-in`,signUpUrl:`${Ur}/sign-up`,routerPush:e=>t(GD(e)),routerReplace:e=>t(GD(e),{replace:!0}),children:c.jsxs(U6,{client:xke,children:[c.jsx(Eke,{}),c.jsx(Nke,{}),c.jsx(Cke,{}),c.jsxs(W7,{children:[c.jsx(Rke,{}),c.jsx(dW,{})]})]})})}function _ke(){return c.jsx(a_,{base:Ur,children:c.jsx(Dke,{})})}PS.createRoot(document.getElementById("root")).render(c.jsx(_ke,{}));

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.