PageSourceSearch

https://govidhya.com/static/js/main.cea5f194.js

js govidhya.com collected 2026-09-24 14:44:01 UTC 1,015,719 bytes, 3 lines download raw bytes

1/*! For license information please see main.cea5f194.js.LICENSE.txt */
2(()=>{"use strict";var e={4(e,t,n){var r=n(853),i=n(43),a=n(950);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function u(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function c(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(s(188))}function h(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=h(e)))return t;e=e.sibling}return null}var p=Object.assign,f=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),x=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),w=Symbol.for("react.lazy");Symbol.for("react.scope");var E=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var j=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var A=Symbol.iterator;function S(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=A&&e[A]||e["@@iterator"])?e:null}var N=Symbol.for("react.client.reference");function B(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case v:return"Fragment";case D:return"Profiler";case y:return"StrictMode";case F:return"Suspense";case _:return"SuspenseList";case E:return"Activity"}if("object"===typeof e)switch(e.$$typeof){case g:return"Portal";case x:return e.displayName||"Context";case b:return(e._context.displayName||"Context")+".Consumer";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case w:t=e._payload,e=e._init;try{return B(e(t))}catch(rn){}}return null}var T=Array.isArray,P=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],O=-1;function M(e){return{current:e}}function I(e){0>O||(e.current=z[O],z[O]=null,O--)}function U(e,t){O++,z[O]=e.current,e.current=t}var $,W,H=M(null),q=M(null),V=M(null),G=M(null);function K(e,t){switch(U(V,t),U(q,e),U(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=Dd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(H),U(H,e)}function Y(){I(H),I(q),I(V)}function Q(e){null!==e.memoizedState&&U(G,e);var t=H.current,n=bd(t,e.type);t!==n&&(U(q,e),U(H,n))}function J(e){q.current===e&&(I(H),I(q)),G.current===e&&(I(G),hh._currentValue=R)}function X(e){if(void 0===$)try{throw Error()}catch(rn){var t=rn.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",W=-1<rn.stack.indexOf("\n    at")?" (<anonymous>)":-1<rn.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+$+e+W}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(rn){var r=rn}Reflect.construct(e,[],n)}
vendor: 5,951 bytes, line 2
2else{try{n.call()}catch(i){r=i}e.call(n.prototype)}}else{try{throw Error()}catch(a){r=a}(n=e())&&"function"===typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"===typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split("\n"),u=o.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===u.length)for(r=l.length-1,i=u.length-1;1<=r&&0<=i&&l[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==u[i]){if(1!==r||1!==i)do{if(r--,0>--i||l[r]!==u[i]){var c="\n"+l[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(rn){return"\nError generating stack: "+rn.message+"\n"+rn.stack}}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,ae=r.unstable_cancelCallback,se=r.unstable_shouldYield,oe=r.unstable_requestPaint,le=r.unstable_now,ue=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,pe=r.unstable_LowPriority,fe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,ve=null,ye=null;function De(e){if("function"===typeof me&&ge(e),ye&&"function"===typeof ye.setStrictMode)try{ye.setStrictMode(ve,e)}catch(t){}}var be=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(xe(e)/Ce|0)|0},xe=Math.log,Ce=Math.LN2;var Fe=256,_e=262144,ke=4194304;function we(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=134217727&r;return 0!==o?0!==(r=o&~a)?i=we(r):0!==(s&=o)?i=we(s):n||0!==(n=o&~e)&&(i=we(n)):0!==(o=r&~a)?i=we(o):0!==s?i=we(s):n||0!==(n=r&~e)&&(i=we(n)),0===i?0:0!==t&&t!==i&&0===(t&a)&&((a=i&-i)>=(n=t&-t)||32===a&&0!==(4194048&n))?t:i}function je(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ae(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+5e3;default:return-1}}function Se(){var e=ke;return 0===(62914560&(ke<<=1))&&(ke=4194304),e}function Ne(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Be(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Te(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-be(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Pe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Le(e,t){var n=t&-t;return 0!==((n=0!==(42&n)?1:Re(n))&(e.suspendedLanes|t))?0:n}function Re(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ze(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function Oe(){var e=L.p;return 0!==e?e:void 0===(e=window.event)?32:jh(e.type)}function Me(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var Ie=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Ie,$e="__reactProps$"+Ie,We="__reactContainer$"+Ie,He="__reactEvents$"+Ie,qe="__reactListeners$"+Ie,Ve="__reactHandles$"+Ie,Ge="__reactResources$"+Ie,Ke="__reactMarker$"+Ie;function Ye(e){delete e[Ue],delete e[$e],delete e[He],delete e[qe],delete e[Ve]}function Qe(e){var t=e[Ue];if(t)return t;for(var n=e.parentNode;n;){if(t=n[We]||n[Ue]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Od(e);null!==e;){if(n=e[Ue])return n;e=Od(e)}return t}n=(e=n).parentNode}return null}function Je(e){if(e=e[Ue]||e[We]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Xe(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(s(33))}function Ze(e){var t=e[Ge];return t||(t=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ke]=!0}var tt=new Set,nt={};function rt(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var at=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
2037D\\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]*$"),st={},ot={};function lt(e,t,n){if(i=t,re.call(ot,i)||!re.call(st,i)&&(at.test(i)?ot[i]=!0:(st[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function ut(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ct(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function pt(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ht(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function mt(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(Lt){return e.body}}var gt=/[\n"\\]/g;function vt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function yt(e,t,n,r,i,a,s,o){e.name="",null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?bt(e,s,dt(t)):null!=n?bt(e,s,dt(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=a&&(e.defaultChecked=!!a),null!=i&&(e.checked=i&&"function"!==typeof i&&"symbol"!==typeof i),null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o?e.name=""+dt(o):e.removeAttribute("name")}function Dt(e,t,n,r,i,a,s,o){if(null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&"boolean"!==typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||void 0!==t&&null!==t))return void pt(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r="function"!==typeof(r=null!=r?r:i)&&"symbol"!==typeof r&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s&&(e.name=s),pt(e)}function bt(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function xt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Ct(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Ft(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(s(92));if(T(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),pt(e)}function _t(e,t){if(t){var n=e.firstChild;
2if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kt=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 wt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"===typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!==typeof n||0===n||kt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Et(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(s(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&wt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&wt(e,a,t[a])}function jt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var At=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"],["colorRendering","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
2-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"]]),St=/^[\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 Nt(e){return St.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bt(){}var Tt=null;function Pt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Rt=null,zt=null;function Ot(e){var t=Je(e);if(t&&(e=t.stateNode)){var n=e[$e]||null;e:switch(e=t.stateNode,t.type){case"input":if(yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+vt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[$e]||null;if(!i)throw Error(s(90));yt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ft(r)}break e;case"textarea":Ct(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&xt(e,!!n.multiple,t,!1)}}}var Mt=!1;function It(e,t,n){if(Mt)return e(t,n);Mt=!0;try{return e(t)}finally{if(Mt=!1,(null!==Rt||null!==zt)&&(tc(),Rt&&(t=Rt,e=zt,zt=Rt=null,Ot(t),e)))for(t=0;t<e.length;t++)Ot(e[t])}}function Ut(e,t){var n=e.stateNode;if(null===n)return null;var r=n[$e]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var $t=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Wt=!1;if($t)try{var Ht={};Object.defineProperty(Ht,"passive",{get:function(){Wt=!0}}),window.addEventListener("test",Ht,Ht),window.removeEventListener("test",Ht,Ht)}catch(Lt){Wt=!1}var qt=null,Vt=null,Gt=null;function Kt(){if(Gt)return Gt;var e,t,n=Vt,r=n.length,i="value"in qt?qt.value:qt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[a-t];t++);return Gt=i.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Qt(){return!0}function Jt(){return!1}function Xt(e){function t(t,n,r,i,a){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Qt:Jt,this.isPropagationStopped=Jt,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Qt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Qt)},persist:function(){},isPersistent:Qt}),t}var Zt,en,tn,nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Xt(nn),sn=p({},nn,{view:0,detail:0}),on=Xt(sn),ln=p({},sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 4,404 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tn&&(tn&&"mousemove"===e.type?(Zt=e.screenX-tn.screenX,en=e.screenY-tn.screenY):en=Zt=0,tn=e),Zt)},movementY:function(e){return"movementY"in e?e.movementY:en}}),un=Xt(ln),cn=Xt(p({},ln,{dataTransfer:0})),dn=Xt(p({},sn,{relatedTarget:0})),hn=Xt(p({},nn,{animationName:0,elapsedTime:0,pseudoElement:0})),pn=Xt(p({},nn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),fn=Xt(p({},nn,{data:0})),mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={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"},vn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=vn[e])&&!!t[e]}function Dn(){return yn}var bn=Xt(p({},sn,{key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),xn=Xt(p({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=Xt(p({},sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dn})),Fn=Xt(p({},nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),_n=Xt(p({},ln,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),kn=Xt(p({},nn,{newState:0,oldState:0})),wn=[9,13,27,32],En=$t&&"CompositionEvent"in window,jn=null;$t&&"documentMode"in document&&(jn=document.documentMode);var An=$t&&"TextEvent"in window&&!jn,Sn=$t&&(!En||jn&&8<jn&&11>=jn),Nn=String.fromCharCode(32),Bn=!1;function Tn(e,t){switch(e){case"keyup":return-1!==wn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Ln=!1;var Rn={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 zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function On(e,t,n,r){Rt?zt?zt.push(r):zt=[r]:Rt=r,0<(t=ad(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mn=null,In=null;function Un(e){Jc(e,0)}function $n(e){if(ft(Xe(e)))return e}function Wn(e,t){if("change"===e)return t}var Hn=!1;if($t){var qn;if($t){var Vn="oninput"in document;if(!Vn){var Gn=document.createElement("div");Gn.setAttribute("oninput","return;"),Vn="function"===typeof Gn.oninput}qn=Vn}else qn=!1;Hn=qn&&(!document.documentMode||9<document.documentMode)}function Kn(){Mn&&(Mn.detachEvent("onpropertychange",Yn),In=Mn=null)}function Yn(e){if("value"===e.propertyName&&$n(In)){var t=[];On(t,In,e,Pt(e)),It(Un,t)}}function Qn(e,t,n){"focusin"===e?(Kn(),In=n,(Mn=t).attachEvent("onpropertychange",Yn)):"focusout"===e&&Kn()}function Jn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(In)}function Xn(e,t){if("click"===e)return $n(t)}function Zn(e,t){if("input"===e||"change"===e)return $n(t)}var er="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function tr(e,t){if(er(e,t))return!0;
2if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!re.call(t,i)||!er(e[i],t[i]))return!1}return!0}function nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rr(e,t){var n,r=nr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function ir(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ir(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ar(e){for(var t=mt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=mt((e=t.contentWindow).document)}return t}function sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=$t&&"documentMode"in document&&11>=document.documentMode,lr=null,ur=null,cr=null,dr=!1;function hr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==lr||lr!==mt(r)||("selectionStart"in(r=lr)&&sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},cr&&tr(cr,r)||(cr=r,0<(r=ad(ur,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionrun:pr("Transition","TransitionRun"),transitionstart:pr("Transition","TransitionStart"),transitioncancel:pr("Transition","TransitionCancel"),transitionend:pr("Transition","TransitionEnd")},mr={},gr={};function vr(e){if(mr[e])return mr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in gr)return mr[e]=n[t];return e}$t&&(gr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var yr=vr("animationend"),Dr=vr("animationiteration"),br=vr("animationstart"),xr=vr("transitionrun"),Cr=vr("transitionstart"),Fr=vr("transitioncancel"),_r=vr("transitionend"),kr=new Map,wr="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(" ");function Er(e,t){kr.set(e,t),rt(t,[e])}wr.push("scrollEnd");var jr="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Ar=[],Sr=0,Nr=0;function Br(){for(var e=Sr,t=Nr=Sr=0;t<e;){var n=Ar[t];Ar[t++]=null;var r=Ar[t];Ar[t++]=null;var i=Ar[t];Ar[t++]=null;var a=Ar[t];if(Ar[t++]=null,null!==r&&null!==i){var s=r.pending;
vendor: 33,437 bytes, line 2
2null===s?i.next=i:(i.next=s.next,s.next=i),r.pending=i}0!==a&&Rr(n,i,a)}}function Tr(e,t,n,r){Ar[Sr++]=e,Ar[Sr++]=t,Ar[Sr++]=n,Ar[Sr++]=r,Nr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Pr(e,t,n,r){return Tr(e,t,n,r),zr(e)}function Lr(e,t){return Tr(e,null,null,t),zr(e)}function Rr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,i&&null!==t&&(i=31-be(n),null===(r=(e=a.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),a):null}function zr(e){if(50<Vu)throw Vu=0,Gu=null,Error(s(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Or={};function Mr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ir(e,t,n,r){return new Mr(e,t,n,r)}function Ur(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return null===n?((n=Ir(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Wr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hr(e,t,n,r,i,a){var o=0;if(r=e,"function"===typeof e)Ur(e)&&(o=1);else if("string"===typeof e)o=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!==typeof t.precedence||"string"!==typeof t.href||""===t.href)break;return!0;case"link":if("string"!==typeof t.rel||"string"!==typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"===typeof t.precedence&&null==e);case"script":if(t.async&&"function"!==typeof t.async&&"symbol"!==typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"===typeof t.src)return!0}return!1}(e,n,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case E:return(e=Ir(31,n,t,i)).elementType=E,e.lanes=a,e;case v:return qr(n.children,i,a,t);case y:o=8,i|=24;break;case D:return(e=Ir(12,n,t,2|i)).elementType=D,e.lanes=a,e;case F:return(e=Ir(13,n,t,i)).elementType=F,e.lanes=a,e;case _:return(e=Ir(19,n,t,i)).elementType=_,e.lanes=a,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case x:o=10;break e;case b:o=9;break e;case C:o=11;break e;case k:o=14;break e;case w:o=16,r=null;break e}o=29,n=Error(s(130,null===e?"null":typeof e,"")),r=null}return(t=Ir(o,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function qr(e,t,n,r){return(e=Ir(7,e,r,t)).lanes=n,e}function Vr(e,t,n){return(e=Ir(6,e,null,t)).lanes=n,e}function Gr(e){var t=Ir(18,null,null,0);return t.stateNode=e,t}function Kr(e,t,n){return(t=Ir(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yr=new WeakMap;function Qr(e,t){if("object"===typeof e&&null!==e){var n=Yr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Yr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Jr=[],Xr=0,Zr=null,ei=0,ti=[],ni=0,ri=null,ii=1,ai="";function si(e,t){Jr[Xr++]=ei,Jr[Xr++]=Zr,Zr=e,ei=t}function oi(e,t,n){ti[ni++]=ii,ti[ni++]=ai,ti[ni++]=ri,ri=e;var r=ii;e=ai;var i=32-be(r)-1;r&=~(1<<i),n+=1;var a=32-be(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,ii=1<<32-be(t)+i|n<<i|r,ai=a+e}else ii=1<<a|n<<i|r,ai=e}function li(e){null!==e.return&&(si(e,1),oi(e,1,0))}function ui(e){for(;e===Zr;)Zr=Jr[--Xr],Jr[Xr]=null,ei=Jr[--Xr],Jr[Xr]=null;for(;e===ri;)ri=ti[--ni],ti[ni]=null,ai=ti[--ni],ti[ni]=null,ii=ti[--ni],ti[ni]=null}function ci(e,t){ti[ni++]=ii,ti[ni++]=ai,ti[ni++]=ri,ii=t.id,ai=t.overflow,ri=e}var di=null,hi=null,pi=!1,fi=null,mi=!1,gi=Error(s(519));function vi(e){throw Fi(Qr(Error(s(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),gi}function yi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ue]=e,t[$e]=r,n){case"dialog":Xc("cancel",t),Xc("close",t);break;case"iframe":case"object":case"embed":Xc("load",t);break;case"video":case"audio":for(n=0;n<Yc.length;n++)Xc(Yc[n],t);break;case"source":Xc("error",t);break;case"img":case"image":case"link":Xc("error",t),Xc("load",t);break;case"details":Xc("toggle",t);break;case"input":Xc("invalid",t),Dt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xc("invalid",t);break;case"textarea":Xc("invalid",t),Ft(t,r.value,r.defaultValue,r.children)}"string"!==typeof(n=r.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||dd(t.textContent,n)?(null!=r.popover&&(Xc("beforetoggle",t),Xc("toggle",t)),null!=r.onScroll&&Xc("scroll",t),null!=r.onScrollEnd&&Xc("scrollend",t),null!=r.onClick&&(t.onclick=Bt),t=!0):t=!1,t||vi(e,!0)}function Di(e){for(di=e.return;di;)switch(di.tag){case 5:case 31:case 13:return void(mi=!1);case 27:case 3:return void(mi=!0);default:di=di.return}}function bi(e){if(e!==di)return!1;if(!pi)return Di(e),pi=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||xd(e.type,e.memoizedProps)),t=!t),t&&hi&&vi(e),Di(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));hi=zd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));hi=zd(e)}else 27===n?(n=hi,jd(e.type)?(e=Rd,Rd=null,hi=e):hi=n):hi=di?Ld(e.stateNode.nextSibling):null;return!0}function xi(){hi=di=null,pi=!1}function Ci(){var e=fi;return null!==e&&(null===Bu?Bu=e:Bu.push.apply(Bu,e),fi=null),e}function Fi(e){null===fi?fi=[e]:fi.push(e)}var _i=M(null),ki=null,wi=null;function Ei(e,t,n){U(_i,t._currentValue),t._currentValue=n}function ji(e){e._currentValue=_i.current,I(_i)}function Ai(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Si(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var o=i.child;a=a.firstContext;e:for(;null!==a;){var l=a;a=i;for(var u=0;u<t.length;u++)if(l.context===t[u]){a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Ai(a.return,n,e),r||(o=null);break e}a=l.next}}else if(18===i.tag){if(null===(o=i.return))throw Error(s(341));o.lanes|=n,null!==(a=o.alternate)&&(a.lanes|=n),Ai(o,n,e),o=null}else o=i.child;if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Ni(e,t,n,r){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(0!==(524288&i.flags))a=!0;else if(0!==(262144&i.flags))break;if(10===i.tag){var o=i.alternate;if(null===o)throw Error(s(387));if(null!==(o=o.memoizedProps)){var l=i.type;er(i.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(i===G.current){if(null===(o=i.alternate))throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(hh):e=[hh])}i=i.return}null!==e&&Si(t,e,n,r),t.flags|=262144}function Bi(e){for(e=e.firstContext;null!==e;){if(!er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ti(e){ki=e,wi=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Pi(e){return Ri(ki,e)}function Li(e,t){return null===ki&&Ti(e),Ri(e,t)}function Ri(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===wi){if(null===e)throw Error(s(308));wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wi=wi.next=t;return n}var zi="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Oi=r.unstable_scheduleCallback,Mi=r.unstable_NormalPriority,Ii={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new zi,data:new Map,refCount:0}}function $i(e){e.refCount--,0===e.refCount&&Oi(Mi,function(){e.controller.abort()})}var Wi=null,Hi=0,qi=0,Vi=null;function Gi(){if(0===--Hi&&null!==Wi){null!==Vi&&(Vi.status="fulfilled");var e=Wi;Wi=null,qi=0,Vi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ki=P.S;P.S=function(e,t){Lu=le(),"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===Wi){var n=Wi=[];Hi=0,qi=Hc(),Vi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hi++,t.then(Gi,Gi)}(0,t),null!==Ki&&Ki(e,t)};var Yi=M(null);function Qi(){var e=Yi.current;return null!==e?e:gu.pooledCache}function Ji(e,t){U(Yi,null===t?Yi.current:t.pool)}function Xi(){var e=Qi();return null===e?null:{parent:Ii._currentValue,pool:e}}var Zi=Error(s(460)),ea=Error(s(474)),ta=Error(s(542)),na={then:function(){}};function ra(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ia(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Bt,Bt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw la(e=t.reason),e;default:if("string"===typeof t.status)t.then(Bt,Bt);else{if(null!==(e=gu)&&100<e.shellSuspendCounter)throw Error(s(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw la(e=t.reason),e}throw sa=t,Zi}}function aa(e){try{return(0,e._init)(e._payload)}catch(rn){if(null!==rn&&"object"===typeof rn&&"function"===typeof rn.then)throw sa=rn,Zi;throw rn}}var sa=null;function oa(){if(null===sa)throw Error(s(459));var e=sa;return sa=null,e}function la(e){if(e===Zi||e===ta)throw Error(s(483))}var ua=null,ca=0;function da(e){var t=ca;return ca+=1,null===ua&&(ua=[]),ia(ua,e,t)}function ha(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function pa(e,t){if(t.$$typeof===f)throw Error(s(525));throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=$r(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Vr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===w&&aa(a)===t.type)?(ha(t=i(t,n.props),n),t.return=e,t):(ha(t=Hr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Kr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=qr(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=Vr(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case m:return ha(n=Hr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Kr(t,e.mode,n)).return=e,t;case w:return h(e,t=aa(t),n)}if(T(t)||S(t))return(t=qr(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return h(e,da(t),n);if(t.$$typeof===x)return h(e,Li(e,t),n);pa(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n||"bigint"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case m:return n.key===i?u(e,t,n,r):null;case g:return n.key===i?c(e,t,n,r):null;case w:return p(e,t,n=aa(n),r)}if(T(n)||S(n))return null!==i?null:d(e,t,n,r,null);if("function"===typeof n.then)return p(e,t,da(n),r);if(n.$$typeof===x)return p(e,t,Li(e,n),r);pa(e,n)}return null}function f(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r||"bigint"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case m:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case g:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return f(e,t,n,r=aa(r),i)}if(T(r)||S(r))return d(t,e=e.get(n)||null,r,i,null);if("function"===typeof r.then)return f(e,t,n,da(r),i);if(r.$$typeof===x)return f(e,t,n,Li(t,r),i);pa(t,r)}return null}function y(l,u,c,d){if("object"===typeof c&&null!==c&&c.type===v&&null===c.key&&(c=c.props.children),"object"===typeof c&&null!==c){switch(c.$$typeof){case m:e:{for(var D=c.key;null!==u;){if(u.key===D){if((D=c.type)===v){if(7===u.tag){n(l,u.sibling),(d=i(u,c.props.children)).return=l,l=d;break e}}else if(u.elementType===D||"object"===typeof D&&null!==D&&D.$$typeof===w&&aa(D)===u.type){n(l,u.sibling),ha(d=i(u,c.props),c),d.return=l,l=d;break e}n(l,u);break}t(l,u),u=u.sibling}c.type===v?((d=qr(c.props.children,l.mode,d,c.key)).return=l,l=d):(ha(d=Hr(c.type,c.key,c.props,null,l.mode,d),c),d.return=l,l=d)}return o(l);case g:e:{for(D=c.key;null!==u;){if(u.key===D){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(d=i(u,c.children||[])).return=l,l=d;break e}n(l,u);break}t(l,u),u=u.sibling}(d=Kr(c,l.mode,d)).return=l,l=d}return o(l);case w:return y(l,u,c=aa(c),d)}if(T(c))return function(i,s,o,l){for(var u=null,c=null,d=s,m=s=0,g=null;null!==d&&m<o.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=p(i,d,o[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),s=a(v,s,m),null===c?u=v:c.sibling=v,c=v,d=g}if(m===o.length)return n(i,d),pi&&si(i,m),u;if(null===d){for(;m<o.length;m++)null!==(d=h(i,o[m],l))&&(s=a(d,s,m),null===c?u=d:c.sibling=d,c=d);return pi&&si(i,m),u}for(d=r(d);m<o.length;m++)null!==(g=f(d,i,m,o[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),s=a(g,s,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach(function(e){return t(i,e)}),pi&&si(i,m),u}(l,u,c,d);if(S(c)){if("function"!==typeof(D=S(c)))throw Error(s(150));return function(i,o,l,u){if(null==l)throw Error(s(151));for(var c=null,d=null,m=o,g=o=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var D=p(i,m,y.value,u);if(null===D){null===m&&(m=v);break}e&&m&&null===D.alternate&&t(i,m),o=a(D,o,g),null===d?c=D:d.sibling=D,d=D,m=v}if(y.done)return n(i,m),pi&&si(i,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,u))&&(o=a(y,o,g),null===d?c=y:d.sibling=y,d=y);return pi&&si(i,g),c}for(m=r(m);!y.done;g++,y=l.next())null!==(y=f(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),o=a(y,o,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),pi&&si(i,g),c}(l,u,c=D.call(c),d)}if("function"===typeof c.then)return y(l,u,da(c),d);if(c.$$typeof===x)return y(l,u,Li(l,c),d);pa(l,c)}return"string"===typeof c&&""!==c||"number"===typeof c||"bigint"===typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(d=i(u,c)).return=l,l=d):(n(l,u),(d=Vr(c,l.mode,d)).return=l,l=d),o(l)):n(l,u)}return function(e,t,n,r){try{ca=0;var i=y(e,t,n,r);return ua=null,i}catch(rn){if(rn===Zi||rn===ta)throw rn;var a=Ir(29,rn,null,e.mode);return a.lanes=r,a.return=e,a}}}var ma=fa(!0),ga=fa(!1),va=!1;function ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Da(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&mu)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=zr(e),Rr(e,null,n),t}return Tr(e,r,t,n),zr(e)}function Ca(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Pe(e,n)}}function Fa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?i=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var _a=!1;function ka(){if(_a){if(null!==Vi)throw Vi}}function wa(e,t,n,r){_a=!1;var i=e.updateQueue;va=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,u=l.next;l.next=null,null===s?a=u:s.next=u,s=l;var c=e.alternate;null!==c&&((o=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===o?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=i.baseState;for(s=0,c=u=l=null,o=a;;){var h=-536870913&o.lane,f=h!==o.lane;if(f?(yu&h)===h:(r&h)===h){0!==h&&h===qi&&(_a=!0),null!==c&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var v=n;switch(g.tag){case 1:if("function"===typeof(m=g.payload)){d=m.call(v,d,h);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(h="function"===typeof(m=g.payload)?m.call(v,d,h):m)||void 0===h)break e;d=p({},d,h);break e;case 2:va=!0}}null!==(h=o.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=i.callbacks)?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=f,l=d):c=c.next=f,s|=h;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(f=o).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null===a&&(i.shared.lanes=0),wu|=s,e.lanes=s,e.memoizedState=d}}function Ea(e,t){if("function"!==typeof e)throw Error(s(191,e));e.call(t)}function ja(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ea(n[e],t)}var Aa=M(null),Sa=M(0);function Na(e,t){U(Sa,e=_u),U(Aa,t),_u=e|t.baseLanes}function Ba(){U(Sa,_u),U(Aa,Aa.current)}function Ta(){_u=Sa.current,I(Aa),I(Sa)}var Pa=M(null),La=null;function Ra(e){var t=e.alternate;U(Ua,1&Ua.current),U(Pa,e),null===La&&(null===t||null!==Aa.current||null!==t.memoizedState)&&(La=e)}function za(e){U(Ua,Ua.current),U(Pa,e),null===La&&(La=e)}function Oa(e){22===e.tag?(U(Ua,Ua.current),U(Pa,e),null===La&&(La=e)):Ma()}function Ma(){U(Ua,Ua.current),U(Pa,Pa.current)}function Ia(e){I(Pa),La===e&&(La=null),I(Ua)}var Ua=M(0);function $a(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Td(n)||Pd(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(0!==(128&t.flags))return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wa=0,Ha=null,qa=null,Va=null,Ga=!1,Ka=!1,Ya=!1,Qa=0,Ja=0,Xa=null,Za=0;function es(){throw Error(s(321))}function ts(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,i,a){return Wa=a,Ha=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=null===e||null===e.memoizedState?yo:Do,Ya=!1,a=n(r,i),Ya=!1,Ka&&(a=is(t,n,r,i)),rs(e),a}function rs(e){P.H=vo;var t=null!==qa&&null!==qa.next;if(Wa=0,Va=qa=Ha=null,Ga=!1,Ja=0,Xa=null,t)throw Error(s(300));null===e||Lo||null!==(e=e.dependencies)&&Bi(e)&&(Lo=!0)}function is(e,t,n,r){Ha=e;var i=0;do{if(Ka&&(Xa=null),Ja=0,Ka=!1,25<=i)throw Error(s(301));if(i+=1,Va=qa=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}P.H=bo,a=t(n,r)}while(Ka);return a}function as(){var e=P.H,t=e.useState()[0];return t="function"===typeof t.then?ds(t):t,e=e.useState()[0],(null!==qa?qa.memoizedState:null)!==e&&(Ha.flags|=1024),t}function ss(){var e=0!==Qa;return Qa=0,e}function os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ls(e){if(Ga){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Ga=!1}Wa=0,Va=qa=Ha=null,Ka=!1,Ja=Qa=0,Xa=null}function us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Va?Ha.memoizedState=Va=e:Va=Va.next=e,Va}function cs(){if(null===qa){var e=Ha.alternate;e=null!==e?e.memoizedState:null}else e=qa.next;var t=null===Va?Ha.memoizedState:Va.next;if(null!==t)Va=t,qa=e;else{if(null===e){if(null===Ha.alternate)throw Error(s(467));throw Error(s(310))}e={memoizedState:(qa=e).memoizedState,baseState:qa.baseState,baseQueue:qa.baseQueue,queue:qa.queue,next:null},null===Va?Ha.memoizedState=Va=e:Va=Va.next=e}return Va}function ds(e){var t=Ja;return Ja+=1,null===Xa&&(Xa=[]),e=ia(Xa,e,t),t=Ha,null===(null===Va?t.memoizedState:Va.next)&&(t=t.alternate,P.H=null===t||null===t.memoizedState?yo:Do),e}function hs(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return ds(e);if(e.$$typeof===x)return Pi(e)}throw Error(s(438,String(e)))}function ps(e){var t=null,n=Ha.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ha.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=j;return t.index++,n}function fs(e,t){return"function"===typeof t?t(e):t}function ms(e){return gs(cs(),qa,e)}function gs(e,t,n){var r=e.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var l=o=null,u=null,c=t=i.next,d=!1;do{var h=-536870913&c.lane;if(h!==c.lane?(yu&h)===h:(Wa&h)===h){var p=c.revertLane;if(0===p)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===qi&&(d=!0);else{if((Wa&p)===p){c=c.next,p===qi&&(d=!0);continue}h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=h,o=a):u=u.next=h,Ha.lanes|=p,wu|=p}h=c.action,Ya&&n(a,h),a=c.hasEagerState?c.eagerState:n(a,h)}else p={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=p,o=a):u=u.next=p,Ha.lanes|=h,wu|=h;c=c.next}while(null!==c&&c!==t);if(null===u?o=a:u.next=l,!er(a,e.memoizedState)&&(Lo=!0,d&&null!==(n=Vi)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=u,r.lastRenderedState=a}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vs(e){var t=cs(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);er(a,t.memoizedState)||(Lo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ys(e,t,n){var r=Ha,i=cs(),a=pi;if(a){if(void 0===n)throw Error(s(407));n=n()}else n=t();var o=!er((qa||i).memoizedState,n);if(o&&(i.memoizedState=n,Lo=!0),i=i.queue,Ws(xs.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||null!==Va&&1&Va.memoizedState.tag){if(r.flags|=2048,Os(9,{destroy:void 0},bs.bind(null,r,i,n,t),null),null===gu)throw Error(s(349));a||0!==(127&Wa)||Ds(r,t,n)}return n}function Ds(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ha.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function bs(e,t,n,r){t.value=n,t.getSnapshot=r,Cs(t)&&Fs(e)}function xs(e,t,n){return n(function(){Cs(t)&&Fs(e)})}function Cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function Fs(e){var t=Lr(e,2);null!==t&&Qu(t,e,2)}function _s(e){var t=us();if("function"===typeof e){var n=e;if(e=n(),Ya){De(!0);try{n()}finally{De(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:e},t}function ks(e,t,n,r){return e.baseState=n,gs(e,qa,"function"===typeof r?r:fs)}function ws(e,t,n,r,i){if(fo(e))throw Error(s(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==P.T?n(!0):a.isTransition=!1,r(a),null===(n=t.pending)?(a.next=t.pending=a,Es(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,s={};P.T=s;try{var o=n(i,r),l=P.S;null!==l&&l(s,o),js(e,t,o)}catch(u){Ss(e,t,u)}finally{null!==a&&null!==s.types&&(a.types=s.types),P.T=a}}else try{js(e,t,a=n(i,r))}catch(c){Ss(e,t,c)}}function js(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then(function(n){As(e,t,n)},function(n){return Ss(e,t,n)}):As(e,t,n)}function As(e,t,n){t.status="fulfilled",t.value=n,Ns(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Es(e,n)))}function Ss(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ns(t),t=t.next}while(t!==r)}e.action=null}function Ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bs(e,t){return t}function Ts(e,t){if(pi){var n=gu.formState;if(null!==n){e:{var r=Ha;if(pi){if(hi){t:{for(var i=hi,a=mi;8!==i.nodeType;){if(!a){i=null;break t}if(null===(i=Ld(i.nextSibling))){i=null;break t}}i="F!"===(a=i.data)||"F"===a?i:null}if(i){hi=Ld(i.nextSibling),r="F!"===i.data;break e}}vi(r)}r=!1}r&&(t=n[0])}}return(n=us()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bs,lastRenderedState:t},n.queue=r,n=co.bind(null,Ha,r),r.dispatch=n,r=_s(!1),a=po.bind(null,Ha,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=us()).queue=i,n=ws.bind(null,Ha,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ps(e){return Ls(cs(),qa,e)}function Ls(e,t,n){if(t=gs(e,t,Bs)[0],e=ms(fs)[0],"object"===typeof t&&null!==t&&"function"===typeof t.then)try{var r=ds(t)}catch(rn){if(rn===Zi)throw ta;throw rn}else r=t;var i=(t=cs()).queue,a=i.dispatch;return n!==t.memoizedState&&(Ha.flags|=2048,Os(9,{destroy:void 0},Rs.bind(null,i,n),null)),[r,a,e]}function Rs(e,t){e.action=t}function zs(e){var t=cs(),n=qa;if(null!==n)return Ls(t,n,e);cs(),t=t.memoizedState;var r=(n=cs()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ha.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ms(){return cs().memoizedState}function Is(e,t,n,r){var i=us();Ha.flags|=e,i.memoizedState=Os(1|t,{destroy:void 0},n,void 0===r?null:r)}function Us(e,t,n,r){var i=cs();r=void 0===r?null:r;var a=i.memoizedState.inst;null!==qa&&null!==r&&ts(r,qa.memoizedState.deps)?i.memoizedState=Os(t,a,n,r):(Ha.flags|=e,i.memoizedState=Os(1|t,a,n,r))}function $s(e,t){Is(8390656,8,e,t)}function Ws(e,t){Us(2048,8,e,t)}function Hs(e){var t=cs().memoizedState;return function(e){Ha.flags|=4;var t=Ha.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(0!==(2&mu))throw Error(s(440));return t.impl.apply(void 0,arguments)}}function qs(e,t){return Us(4,2,e,t)}function Vs(e,t){return Us(4,4,e,t)}function Gs(e,t){if("function"===typeof t){e=e();var n=t(e);return function(){"function"===typeof n?n():t(null)}}if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Us(4,4,Gs.bind(null,t,e),n)}function Ys(){}function Qs(e,t){var n=cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Js(e,t){var n=cs();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ts(t,r[1]))return r[0];if(r=e(),Ya){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return void 0===n||0!==(1073741824&Wa)&&0===(261930&yu)?e.memoizedState=t:(e.memoizedState=n,e=Yu(),Ha.lanes|=e,wu|=e,n)}function Zs(e,t,n,r){return er(n,t)?n:null!==Aa.current?(e=Xs(e,n,r),er(e,t)||(Lo=!0),e):0===(42&Wa)||0!==(1073741824&Wa)&&0===(261930&yu)?(Lo=!0,e.memoizedState=n):(e=Yu(),Ha.lanes|=e,wu|=e,t)}function eo(e,t,n,r,i){var a=L.p;L.p=0!==a&&8>a?a:8;var s=P.T,o={};P.T=o,po(e,!1,t,n);try{var l=i(),u=P.S;if(null!==u&&u(o,l),null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status="rejected",r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}(l,r);ho(e,t,c,Ku())}else ho(e,t,r,Ku())}catch(d){ho(e,t,{then:function(){},status:"rejected",reason:d},Ku())}finally{L.p=a,null!==s&&null!==o.types&&(s.types=o.types),P.T=s}}function to(){}function no(e,t,n,r){if(5!==e.tag)throw Error(s(476));var i=ro(e).queue;eo(e,i,t,R,null===n?to:function(){return io(e),n(r)})}function ro(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:R},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function io(e){var t=ro(e);null===t.next&&(t=e.alternate.memoizedState),ho(e,t.next.queue,{},Ku())}function ao(){return Pi(hh)}function so(){return cs().memoizedState}function oo(){return cs().memoizedState}function lo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Ku(),r=xa(t,e=ba(n),n);return null!==r&&(Qu(r,t,n),Ca(r,t,n)),t={cache:Ui()},void(e.payload=t)}t=t.return}}function uo(e,t,n){var r=Ku();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fo(e)?mo(t,n):null!==(n=Pr(e,t,n,r))&&(Qu(n,e,r),go(n,t,r))}function co(e,t,n){ho(e,t,n,Ku())}function ho(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fo(e))mo(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,er(o,s))return Tr(e,t,i,0),null===gu&&Br(),!1}catch(l){}if(null!==(n=Pr(e,t,i,r)))return Qu(n,e,r),go(n,t,r),!0}return!1}function po(e,t,n,r){if(r={lane:2,revertLane:Hc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fo(e)){if(t)throw Error(s(479))}else null!==(t=Pr(e,n,r,2))&&Qu(t,e,2)}function fo(e){var t=e.alternate;return e===Ha||null!==t&&t===Ha}function mo(e,t){Ka=Ga=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function go(e,t,n){if(0!==(4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Pe(e,n)}}var vo={readContext:Pi,use:hs,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useLayoutEffect:es,useInsertionEffect:es,useMemo:es,useReducer:es,useRef
2:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useSyncExternalStore:es,useId:es,useHostTransitionStatus:es,useFormState:es,useActionState:es,useOptimistic:es,useMemoCache:es,useCacheRefresh:es};vo.useEffectEvent=es;var yo={readContext:Pi,use:hs,useCallback:function(e,t){return us().memoizedState=[e,void 0===t?null:t],e},useContext:Pi,useEffect:$s,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Is(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){Is(4,2,e,t)},useMemo:function(e,t){var n=us();t=void 0===t?null:t;var r=e();if(Ya){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=us();if(void 0!==n){var i=n(t);if(Ya){De(!0);try{n(t)}finally{De(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=uo.bind(null,Ha,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},us().memoizedState=e},useState:function(e){var t=(e=_s(e)).queue,n=co.bind(null,Ha,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Xs(us(),e,t)},useTransition:function(){var e=_s(!1);return e=eo.bind(null,Ha,e.queue,!0,!1),us().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ha,i=us();if(pi){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===gu)throw Error(s(349));0!==(127&yu)||Ds(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,$s(xs.bind(null,r,a,e),[e]),r.flags|=2048,Os(9,{destroy:void 0},bs.bind(null,r,a,n,t),null),n},useId:function(){var e=us(),t=gu.identifierPrefix;if(pi){var n=ai;t="_"+t+"R_"+(n=(ii&~(1<<32-be(ii)-1)).toString(32)+n),0<(n=Qa++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Za++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ao,useFormState:Ts,useActionState:Ts,useOptimistic:function(e){var t=us();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=po.bind(null,Ha,!0,n),n.dispatch=t,[e,t]},useMemoCache:ps,useCacheRefresh:function(){return us().memoizedState=lo.bind(null,Ha)},useEffectEvent:function(e){var t=us(),n={impl:e};return t.memoizedState=n,function(){if(0!==(2&mu))throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Do={readContext:Pi,use:hs,useCallback:Qs,useContext:Pi,useEffect:Ws,useImperativeHandle:Ks,useInsertionEffect:qs,useLayoutEffect:Vs,useMemo:Js,useReducer:ms,useRef:Ms,useState:function(){return ms(fs)},useDebugValue:Ys,useDeferredValue:function(e,t){return Zs(cs(),qa.memoizedState,e,t)},useTransition:function(){var e=ms(fs)[0],t=cs().memoizedState;return["boolean"===typeof e?e:ds(e),t]},useSyncExternalStore:ys,useId:so,useHostTransitionStatus:ao,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){return ks(cs(),0,e,t)},useMemoCache:ps,useCacheRefresh:oo};Do.useEffectEvent=Hs;var bo={readContext:Pi,use:hs,useCallback:Qs,useContext:Pi,useEffect:Ws,useImperativeHandle:Ks,useInsertionEffect:qs,useLayoutEffect:Vs,useMemo:Js,useReducer:vs,useRef:Ms,useState:function(){return vs(fs)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=cs();return null===qa?Xs(n,e,t):Zs(n,qa.memoizedState,e,t)},useTransition:function(){var e=vs(fs)[0],t=cs().memoizedState;return["boolean"===typeof e?e:ds(e),t]},useSyncExternalStore:ys,useId:so,useHostTransitionStatus:ao,useFormState:zs,useActionState:zs,useOptimistic:function(e,t){var n=cs();return null!==qa?ks(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ps,useCacheRefresh:oo};function xo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:p({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}bo.useEffectEvent=Hs;var Co={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ku(),i=ba(r);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=xa(e,i,r))&&(Qu(t,e,r),Ca(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ku(),i=ba(r);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=xa(e,i,r))&&(Qu(t,e,r),Ca(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ku(),r=ba(n);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=xa(e,r,n))&&(Qu(t,e,n),
2Ca(t,e,n))}};function Fo(e,t,n,r,i,a,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,s):!t.prototype||!t.prototype.isPureReactComponent||(!tr(n,r)||!tr(i,a))}function _o(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Co.enqueueReplaceState(t,t.state,null)}function ko(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function wo(e){jr(e)}function Eo(e){console.error(e)}function jo(e){jr(e)}function Ao(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function So(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function No(e,t,n){return(n=ba(n)).tag=3,n.payload={element:null},n.callback=function(){Ao(e,t)},n}function Bo(e){return(e=ba(e)).tag=3,e}function To(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"===typeof i){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){So(t,n,r)}}var s=n.stateNode;null!==s&&"function"===typeof s.componentDidCatch&&(e.callback=function(){So(t,n,r),"function"!==typeof i&&(null===Ou?Ou=new Set([this]):Ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Po=Error(s(461)),Lo=!1;function Ro(e,t,n,r){t.child=null===e?ga(t,null,n,r):ma(t,e.child,n,r)}function zo(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var s={};for(var o in r)"ref"!==o&&(s[o]=r[o])}else s=r;return Ti(t),r=ns(e,t,n,s,a,i),o=ss(),null===e||Lo?(pi&&o&&li(t),t.flags|=1,Ro(e,t,r,i),t.child):(os(e,t,i),sl(e,t,i))}function Oo(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Ur(a)||void 0!==a.defaultProps||null!==n.compare?((e=Hr(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Mo(e,t,a,r,i))}if(a=e.child,!ol(e,i)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:tr)(s,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,(e=$r(a,r)).ref=t.ref,e.return=t,t.child=e}function Mo(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(tr(a,r)&&e.ref===t.ref){if(Lo=!1,t.pendingProps=r=a,!ol(e,i))return t.lanes=e.lanes,sl(e,t,i);0!==(131072&e.flags)&&(Lo=!0)}}return Vo(e,t,n,r,i)}function Io(e,t,n,r){var i=r.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(0!==(128&t.flags)){if(a=null!==a?a.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return $o(e,t,a,n,r)}if(0===(536870912&n))return r=t.lanes=536870912,$o(e,t,null!==a?a.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Ji(0,null!==a?a.cachePool:null),null!==a?Na(t,a):Ba(),Oa(t)}else null!==a?(Ji(0,a.cachePool),Na(t,a),Ma(),t.memoizedState=null):(null!==e&&Ji(0,null),Ba(),Ma());return Ro(e,t,i,n),t.child}function Uo(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $o(e,t,n,r,i){var a=Qi();return a=null===a?null:{parent:Ii._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&Ji(0,null),Ba(),Oa(t),null!==e&&Ni(e,t,r,!0),t.childLanes=i,null}function Wo(e,t){return(t=tl({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Ho(e,t,n){return ma(t,e.child,null,n),(e=Wo(t,t.pendingProps)).flags|=2,Ia(t),t.memoizedState=null,e}function qo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(s(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Vo(e,t,n,r,i){return Ti(t),n=ns(e,t,n,r,void 0,i),r=ss(),null===e||Lo?(pi&&r&&li(t),t.flags|=1,Ro(e,t,n,i),t.child):(os(e,t,i),sl(e,t,i))}function Go(e,t,n,r,i,a){return Ti(t),t.updateQueue=null,n=is(t,r,n,i),rs(e),r=ss(),null===e||Lo?(pi&&r&&li(t),t.flags|=1,Ro(e,t,n,a),t.child):(os(e,t,a),sl(e,t,a))}function Ko(e,t,n,r,i){if(Ti(t),null===t.stateNode){var a=Or,s=n.contextType;"object"===typeof s&&null!==s&&(a=Pi(s)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Co,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={}
2,ya(t),s=n.contextType,a.context="object"===typeof s&&null!==s?Pi(s):Or,a.state=t.memoizedState,"function"===typeof(s=n.getDerivedStateFromProps)&&(xo(t,n,s,r),a.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof a.getSnapshotBeforeUpdate||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||(s=a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),s!==a.state&&Co.enqueueReplaceState(a,a.state,null),wa(t,r,a,i),ka(),a.state=t.memoizedState),"function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=ko(n,o);a.props=l;var u=a.context,c=n.contextType;s=Or,"object"===typeof c&&null!==c&&(s=Pi(c));var d=n.getDerivedStateFromProps;c="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,c||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(o||u!==s)&&_o(t,a,r,s),va=!1;var h=t.memoizedState;a.state=h,wa(t,r,a,i),ka(),u=t.memoizedState,o||h!==u||va?("function"===typeof d&&(xo(t,n,d,r),u=t.memoizedState),(l=va||Fo(t,n,l,r,h,u,s))?(c||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=s,r=l):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Da(e,t),c=ko(n,s=t.memoizedProps),a.props=c,d=t.pendingProps,h=a.context,u=n.contextType,l=Or,"object"===typeof u&&null!==u&&(l=Pi(u)),(u="function"===typeof(o=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&_o(t,a,r,l),va=!1,h=t.memoizedState,a.state=h,wa(t,r,a,i),ka();var p=t.memoizedState;s!==d||h!==p||va||null!==e&&null!==e.dependencies&&Bi(e.dependencies)?("function"===typeof o&&(xo(t,n,o,r),p=t.memoizedState),(c=va||Fo(t,n,c,r,h,p,l)||null!==e&&null!==e.dependencies&&Bi(e.dependencies))?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,qo(e,t),r=0!==(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!==typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=ma(t,e.child,null,i),t.child=ma(t,null,n,i)):Ro(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Yo(e,t,n,r){return xi(),t.flags|=256,Ro(e,t,n,r),t.child}var Qo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jo(e){return{baseLanes:e,cachePool:Xi()}}function Xo(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Au),e}function Zo(e,t,n){var r,i=t.pendingProps,a=!1,o=0!==(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!==(2&Ua.current)),r&&(a=!0,t.flags&=-129),r=0!==(32&t.flags),t.flags&=-33,null===e){if(pi){if(a?Ra(t):Ma(),(e=hi)?null!==(e=null!==(e=Bd(e,mi))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ri?{id:ii,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},(n=Gr(e)).return=t,t.child=n,di=t,hi=null):e=null,null===e)throw vi(t);return Pd(e)?t.lanes=32:t.lanes=536870912,null}var l=i.children;return i=i.fallback,a?(Ma(),l=tl({mode:"hidden",children:l},a=t.mode),i=qr(i,a,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(i=t.child).memoizedState=Jo(n),i.childLanes=Xo(e,r,n),t.memoizedState=Qo,Uo(null,i)):(Ra(t),el(t,l))}var u=e.memoizedState;if(null!==u&&null!==(l=u.dehydrated)){if(o)256&t.flags?(Ra(t),t.flags&=-257,t=nl(e,t,n)):null!==t.memoizedState?(Ma(),t.child=e.child,t.flags|=128,t=null):(Ma(),l=i.fallback,a=t.mode,i=tl({mode:"visible",children:i.children},a),(l=qr(l,a,n,null)).flags|=2,i.return=t,l.return=t,i.sibling=l,t.child=i,ma(t,e.child,null,n),(i=t.child).memoizedState=Jo(n),i.childLanes=Xo(e,r,n),t.memoizedState=Qo,t=Uo(null,i));else if(Ra(t),Pd(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var c=r.dgst;
vendor: 18,696 bytes, line 2
2r=c,(i=Error(s(419))).stack="",i.digest=r,Fi({value:i,source:null,stack:null}),t=nl(e,t,n)}else if(Lo||Ni(e,t,n,!1),r=0!==(n&e.childLanes),Lo||r){if(null!==(r=gu)&&(0!==(i=Le(r,n))&&i!==u.retryLane))throw u.retryLane=i,Lr(e,i),Qu(r,e,i),Po;Td(l)||lc(),t=nl(e,t,n)}else Td(l)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,hi=Ld(l.nextSibling),di=t,pi=!0,fi=null,mi=!1,null!==e&&ci(t,e),(t=el(t,i.children)).flags|=4096);return t}return a?(Ma(),l=i.fallback,a=t.mode,c=(u=e.child).sibling,(i=$r(u,{mode:"hidden",children:i.children})).subtreeFlags=65011712&u.subtreeFlags,null!==c?l=$r(c,l):(l=qr(l,a,n,null)).flags|=2,l.return=t,i.return=t,i.sibling=l,t.child=i,Uo(null,i),i=t.child,null===(l=e.child.memoizedState)?l=Jo(n):(null!==(a=l.cachePool)?(u=Ii._currentValue,a=a.parent!==u?{parent:u,pool:u}:a):a=Xi(),l={baseLanes:l.baseLanes|n,cachePool:a}),i.memoizedState=l,i.childLanes=Xo(e,r,n),t.memoizedState=Qo,Uo(e.child,i)):(Ra(t),e=(n=e.child).sibling,(n=$r(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function el(e,t){return(t=tl({mode:"visible",children:t},e.mode)).return=e,e.child=t}function tl(e,t){return(e=Ir(22,e,null,t)).lanes=0,e}function nl(e,t,n){return ma(t,e.child,null,n),(e=el(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function rl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ai(e.return,t,n)}function il(e,t,n,r,i,a){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i,s.treeForkCount=a)}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var s=Ua.current,o=0!==(2&s);if(o?(s=1&s|2,t.flags|=128):s&=1,U(Ua,s),Ro(e,t,r,n),r=pi?ei:0,!o&&null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rl(e,n,t);else if(19===e.tag)rl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===$a(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),il(t,!1,i,n,a,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===$a(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}il(t,!0,n,null,a,r);break;case"together":il(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function sl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),wu|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Ni(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=$r(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$r(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ol(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Bi(e))}function ll(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Lo=!0;else{if(!ol(e,n)&&0===(128&t.flags))return Lo=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ei(0,Ii,e.memoizedState.cache),xi();break;case 27:case 5:Q(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ei(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,za(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ra(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Zo(e,t,n):(Ra(t),null!==(e=sl(e,t,n))?e.sibling:null);Ra(t);break;case 19:var i=0!==(128&e.flags);if((r=0!==(n&t.childLanes))||(Ni(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return al(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(Ua,Ua.current),r)break;return null;case 22:return t.lanes=0,Io(e,t,n,t.pendingProps);case 24:Ei(0,Ii,e.memoizedState.cache)}return sl(e,t,n)}(e,t,n);Lo=0!==(131072&e.flags)}else Lo=!1,pi&&0!==(1048576&t.flags)&&oi(t,ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=aa(t.elementType),t.type=e,"function"!==typeof e){if(void 0!==e&&null!==e){var i=e.$$typeof;if(i===C){t.tag=11,t=zo(null,t,e,r,n);break e}if(i===k){t.tag=14,t=Oo(null,t,e,r,n);break e}}throw t=B(e)||e,Error(s(306,t,""))}Ur(e)?(r=ko(e,r),t.tag=1,t=Ko(null,t,e,r,n)):(t.tag=0,t=Vo(null,t,e,r,n))}return t;case 0:return Vo(e,t,t.type,t.pendingProps,n);case 1:return Ko(e,t,r=t.type,i=ko(r,t.pendingProps),n);case 3:e:{if(K(t,t.stateNode.containerInfo),null===e)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Da(e,t),wa(t,r,null,n);var o=t.memoizedState;if(r=o.cache,Ei(0,Ii,r),r!==a.cache&&Si(t,[Ii],n,!0),ka(),r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Yo(e,t,r,n);break e}if(r!==i){Fi(i=Qr(Error(s(424)),t)),t=Yo(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(hi=Ld(e.firstChild),di=t,pi=!0,fi=null,mi=!0,n=ga(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xi(),r===i){t=sl(e,t,n);break e}Ro(e,t,r,n)}t=t.child}return t;case 26:return qo(e,t),null===e?(n=Gd(t.type,null,t.pendingProps,null))?t.memoizedState=n:pi||(n=t.type,e=t.pendingProps,(r=yd(V.current).createElement(n))[Ue]=t,r[$e]=e,fd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Gd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Q(t),null===e&&pi&&(r=t.stateNode=Md(t.type,t.pendingProps,V.current),di=t,mi=!0,i=hi,jd(t.type)?(Rd=i,hi=Ld(r.firstChild)):hi=i),Ro(e,t,t.pendingProps.children,n),qo(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&pi&&((i=r=hi)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===a)return e}if(null===(e=Ld(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,mi))?(t.stateNode=r,di=t,hi=Ld(r.firstChild),mi=!1,i=!0):i=!1),i||vi(t)),Q(t),i=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,r=a.children,xd(i,a)?r=null:null!==o&&xd(i,o)&&(t.flags|=32),null!==t.memoizedState&&(i=ns(e,t,as,null,null,n),hh._currentValue=i),qo(e,t),Ro(e,t,r,n),t.child;case 6:return null===e&&pi&&((e=n=hi)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Ld(e.nextSibling)))return null}return e}(n,t.pendingProps,mi))?(t.stateNode=n,di=t,hi=null,e=!0):e=!1),e||vi(t)),null;case 13:return Zo(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ma(t,null,r,n):Ro(e,t,r,n),t.child;case 11:return zo(e,t,t.type,t.pendingProps,n);case 7:return Ro(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ro(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ei(0,t.type,r.value),Ro(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ti(t),r=r(i=Pi(i)),t.flags|=1,Ro(e,t,r,n),t.child;case 14:return Oo(e,t,t.type,t.pendingProps,n);case 15:return Mo(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,i=0!==(128&t.flags);if(t.flags&=-129,null===e){if(pi){if("hidden"===r.mode)return e=Wo(t,r),t.lanes=536870912,Uo(null,e);if(za(t),(e=hi)?null!==(e=null!==(e=Bd(e,mi))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ri?{id:ii,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},(n=Gr(e)).return=t,t.child=n,di=t,hi=null):e=null,null===e)throw vi(t);return t.lanes=536870912,null}return Wo(t,r)}var a=e.memoizedState;if(null!==a){var o=a.dehydrated;if(za(t),i)if(256&t.flags)t.flags&=-257,t=Ho(e,t,n);else{if(null===t.memoizedState)throw Error(s(558));t.child=e.child,t.flags|=128,t=null}else if(Lo||Ni(e,t,n,!1),i=0!==(n&e.childLanes),Lo||i){if(null!==(r=gu)&&0!==(o=Le(r,n))&&o!==a.retryLane)throw a.retryLane=o,Lr(e,o),Qu(r,e,o),Po;lc(),t=Ho(e,t,n)}else e=a.treeContext,hi=Ld(o.nextSibling),di=t,pi=!0,fi=null,mi=!1,null!==e&&ci(t,e),(t=Wo(t,r)).flags|=4096;return t}return(e=$r(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Io(e,t,n,t.pendingProps);case 24:return Ti(t),r=Pi(Ii),null===e?(null===(i=Qi())&&(i=gu,a=Ui(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},ya(t),Ei(0,Ii,i)):(0!==(e.lanes&n)&&(Da(e,t),wa(t,null,null,n),ka()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),Ei(0,Ii,r)):(r=a.cache,Ei(0,Ii,r),r!==i.cache&&Si(t,[Ii],n,!0))),Ro(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function ul(e){e.flags|=4}function cl(e,t,n,r,i){if((t=0!==(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&i)===i)if(e.stateNode.complete)e.flags|=8192;else{if(!ac())throw sa=na,ea;e.flags|=8192}}else e.flags&=-16777217}function dl(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!sh(t)){if(!ac())throw sa=na,ea;e.flags|=8192}}function hl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Se():536870912,e.lanes|=t,Su|=t)}function pl(e,t){if(!pi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var r=t.pendingProps;switch(ui(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ji(Ii),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(bi(t)?ul(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,Ci())),fl(t),null;case 26:var i=t.type,a=t.memoizedState;return null===e?(ul(t),null!==a?(fl(t),dl(t,a)):(fl(t),cl(t,i,0,0,n))):a?a!==e.memoizedState?(ul(t),fl(t),dl(t,a)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&ul(t),fl(t),cl(t,i,0,0,n)),null;case 27:if(J(t),n=V.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&ul(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}e=H.current,bi(t)?yi(t):(e=Md(i,r,n),t.stateNode=e,ul(t))}return fl(t),null;case 5:if(J(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&ul(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}if(a=H.current,bi(t))yi(t);else{var o=yd(V.current);switch(a){case 1:a=o.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=o.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(a=o.createElement("div")).innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a="string"===typeof r.is?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a="string"===typeof r.is?o.createElement(i,{is:r.is}):o.createElement(i)}}a[Ue]=t,a[$e]=r;e:for(o=t.child;null!==o;){if(5===o.tag||6===o.tag)a.appendChild(o.stateNode);else if(4!==o.tag&&27!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;null===o.sibling;){if(null===o.return||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;e:switch(fd(a,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ul(t)}}return fl(t),cl(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ul(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));if(e=V.current,bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=di))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||dd(e.nodeValue,n)))||vi(t,!0)}else(e=yd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=bi(t),null!==n){if(null===e){if(!r)throw Error(s(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(557));e[Ue]=t}else xi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=Ci(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Ia(t),t):(Ia(t),null);if(0!==(128&t.flags))throw Error(s(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=bi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(s(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(s(317));i[Ue]=t}else xi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),i=!1}else i=Ci(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(Ia(t),t):(Ia(t),null)}return Ia(t),0!==(128&t.flags)?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),hl(t,t.updateQueue),fl(t),null);case 4:return Y(),null===e&&td(t.stateNode.containerInfo),fl(t),null;case 10:return ji(t.type),fl(t),null;case 19:if(I(Ua),null===(r=t.memoizedState))return fl(t),null;if(i=0!==(128&t.flags),null===(a=r.rendering))if(i)pl(r,!1);else{if(0!==ku||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=$a(e))){for(t.flags|=128,pl(r,!1),e=a.updateQueue,t.updateQueue=e,hl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Wr(n,e),n=n.sibling;return U(Ua,1&Ua.current|2),pi&&si(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Ru&&(t.flags|=128,i=!0,pl(r,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=$a(a))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,hl(t,e),pl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate&&!pi)return fl(t),null}else 2*le()-r.renderingStartTime>Ru&&536870912!==n&&(t.flags|=128,i=!0,pl(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=r.last)?e.sibling=a:t.child=a,r.last=a)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Ua.current,U(Ua,i?1&n|2:1&n),pi&&si(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return Ia(t),Ta(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&hl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&I(Yi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ji(Ii),fl(t),null;case 25:case 30:return null}throw Error(s(156,t.tag))}function gl(e,t){switch(ui(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ji(Ii),Y(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if(Ia(t),null===t.alternate)throw Error(s(340));xi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Ia(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));xi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return I(Ua),null;case 4:return Y(),null;case 10:return ji(t.type),null;case 22:case 23:return Ia(t),Ta(),null!==e&&I(Yi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return ji(Ii),null;default:return null}}function vl(e,t){switch(ui(t),t.tag){case 3:ji(Ii),Y();break;case 26:case 27:case 5:J(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Ia(t);break;case 13:Ia(t);break;case 19:I(Ua);break;case 10:ji(t.type);break;case 22:case 23:Ia(t),Ta(),null!==e&&I(Yi);break;case 24:ji(Ii)}}function yl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,s=n.inst;r=a(),s.destroy=r}n=n.next}while(n!==i)}}catch(o){kc(t,t.return,o)}}function Dl(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next;r=a;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,i=t;var l=n,u=o;try{u()}catch(c){kc(i,l,c)}}}r=r.next}
vendor: 4,339 bytes, line 2
2while(r!==a)}}catch(c){kc(t,t.return,c)}}function bl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{ja(t,n)}catch(r){kc(e,e.return,r)}}}function xl(e,t,n){n.props=ko(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){kc(e,t,r)}}function Cl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(i){kc(e,t,i)}}function Fl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(i){kc(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(a){kc(e,t,a)}else n.current=null}function _l(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){kc(e,e.return,i)}}function kl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,o=null,l=null,u=null,c=null,d=null;for(f in n){var h=n[f];if(n.hasOwnProperty(f)&&null!=h)switch(f){case"checked":case"value":break;case"defaultValue":u=h;default:r.hasOwnProperty(f)||hd(e,t,f,null,r,h)}}for(var p in r){var f=r[p];if(h=n[p],r.hasOwnProperty(p)&&(null!=f||null!=h))switch(p){case"type":a=f;break;case"name":i=f;break;case"checked":c=f;break;case"defaultChecked":d=f;break;case"value":o=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(s(137,t));break;default:f!==h&&hd(e,t,p,f,r,h)}}return void yt(e,o,l,u,c,d,a,i);case"select":for(a in f=o=l=p=null,n)if(u=n[a],n.hasOwnProperty(a)&&null!=u)switch(a){case"value":break;case"multiple":f=u;default:r.hasOwnProperty(a)||hd(e,t,a,null,r,u)}for(i in r)if(a=r[i],u=n[i],r.hasOwnProperty(i)&&(null!=a||null!=u))switch(i){case"value":p=a;break;case"defaultValue":l=a;break;case"multiple":o=a;default:a!==u&&hd(e,t,i,a,r,u)}return t=l,n=o,r=f,void(null!=p?xt(e,!!n,p,!1):!!r!==!!n&&(null!=t?xt(e,!!n,t,!0):xt(e,!!n,n?[]:"",!1)));case"textarea":for(l in f=p=null,n)if(i=n[l],n.hasOwnProperty(l)&&null!=i&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:hd(e,t,l,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(null!=i||null!=a))switch(o){case"value":p=i;break;case"defaultValue":f=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(s(91));break;default:i!==a&&hd(e,t,o,i,r,a)}return void Ct(e,p,f);case"option":for(var m in n)if(p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else hd(e,t,m,null,r,p);for(u in r)if(p=r[u],f=n[u],r.hasOwnProperty(u)&&p!==f&&(null!=p||null!=f))if("selected"===u)e.selected=p&&"function"!==typeof p&&"symbol"!==typeof p;else hd(e,t,u,p,r,f);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 g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&hd(e,t,g,null,r,p);for(c in r)if(p=r[c],f=n[c],r.hasOwnProperty(c)&&p!==f&&(null!=p||null!=f))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(s(137,t));break;default:hd(e,t,c,p,r,f)}return;default:if(jt(t)){for(var v in n)p=n[v],n.hasOwnProperty(v)&&void 0!==p&&!r.hasOwnProperty(v)&&pd(e,t,v,void 0,r,p);for(d in r)p=r[d],f=n[d],!r.hasOwnProperty(d)||p===f||void 0===p&&void 0===f||pd(e,t,d,p,r,f);return}}for(var y in n)p=n[y],n.hasOwnProperty(y)&&null!=p&&!r.hasOwnProperty(y)&&hd(e,t,y,null,r,p);for(h in r)p=r[h],f=n[h],!r.hasOwnProperty(h)||p===f||null==p&&null==f||hd(e,t,h,p,r,f)}(r,e.type,n,t),r[$e]=t}catch(i){kc(e,e.return,i)}}function wl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&jd(e.type)||4===e.tag}function El(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||wl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&jd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function jl(e,t,n){var r=e.tag;
vendor: 5,674 bytes, line 2
2if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Bt));else if(4!==r&&(27===r&&jd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(jl(e,t,n),e=e.sibling;null!==e;)jl(e,t,n),e=e.sibling}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&jd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function Sl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);fd(t,r,n),t[Ue]=e,t[$e]=n}catch(a){kc(e,e.return,a)}}var Nl=!1,Bl=!1,Tl=!1,Pl="function"===typeof WeakSet?WeakSet:Set,Ll=null;function Rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ql(e,n),4&r&&yl(5,n);break;case 1:if(Ql(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(s){kc(n,n.return,s)}else{var i=ko(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){kc(n,n.return,o)}}64&r&&bl(n),512&r&&Cl(n,n.return);break;case 3:if(Ql(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{ja(e,t)}catch(s){kc(n,n.return,s)}}break;case 27:null===t&&4&r&&Sl(n);case 26:case 5:Ql(e,n),null===t&&4&r&&_l(n),512&r&&Cl(n,n.return);break;case 12:Ql(e,n);break;case 31:Ql(e,n),4&r&&$l(e,n);break;case 13:Ql(e,n),4&r&&Wl(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Ac.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Nl)){t=null!==t&&null!==t.memoizedState||Bl,i=Nl;var a=Bl;Nl=r,(Bl=t)&&!a?Xl(e,n,0!==(8772&n.subtreeFlags)):Ql(e,n),Nl=i,Bl=a}break;case 30:break;default:Ql(e,n)}}function zl(e){var t=e.alternate;null!==t&&(e.alternate=null,zl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ol=null,Ml=!1;function Il(e,t,n){for(n=n.child;null!==n;)Ul(e,t,n),n=n.sibling}function Ul(e,t,n){if(ye&&"function"===typeof ye.onCommitFiberUnmount)try{ye.onCommitFiberUnmount(ve,n)}catch(a){}switch(n.tag){case 26:Bl||Fl(n,t),Il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Bl||Fl(n,t);var r=Ol,i=Ml;jd(n.type)&&(Ol=n.stateNode,Ml=!1),Il(e,t,n),Id(n.stateNode),Ol=r,Ml=i;break;case 5:Bl||Fl(n,t);case 6:if(r=Ol,i=Ml,Ol=null,Il(e,t,n),Ml=i,null!==(Ol=r))if(Ml)try{(9===Ol.nodeType?Ol.body:"HTML"===Ol.nodeName?Ol.ownerDocument.body:Ol).removeChild(n.stateNode)}catch(s){kc(n,t,s)}else try{Ol.removeChild(n.stateNode)}catch(s){kc(n,t,s)}break;case 18:null!==Ol&&(Ml?(Ad(9===(e=Ol).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Vh(e)):Ad(Ol,n.stateNode));break;case 4:r=Ol,i=Ml,Ol=n.stateNode.containerInfo,Ml=!0,Il(e,t,n),Ol=r,Ml=i;break;case 0:case 11:case 14:case 15:Dl(2,n,t),Bl||Dl(4,n,t),Il(e,t,n);break;case 1:Bl||(Fl(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&xl(n,t,r)),Il(e,t,n);break;case 21:Il(e,t,n);break;case 22:Bl=(r=Bl)||null!==n.memoizedState,Il(e,t,n),Bl=r;break;default:Il(e,t,n)}}function $l(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Vh(e)}catch(n){kc(t,t.return,n)}}}function Wl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Vh(e)}catch(n){kc(t,t.return,n)}}function Hl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Pl),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Pl),t;default:throw Error(s(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Sc.bind(null,e,t);t.then(r,r)}})}function ql(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],a=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 27:if(jd(l.type)){Ol=l.stateNode,Ml=!1;break e}break;case 5:Ol=l.stateNode,Ml=!1;break e;case 3:case 4:Ol=l.stateNode.containerInfo,Ml=!0;break e}l=l.return}if(null===Ol)throw Error(s(160));Ul(a,o,i),Ol=null,Ml=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Gl(t,e),t=t.sibling}var Vl=null;function Gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ql(t,e),Kl(e),4&r&&(Dl(3,e,e.return),yl(3,e),Dl(5,e,e.return));break;case 1:ql(t,e),Kl(e),512&r&&(Bl||null===n||Fl(n,n.return)),64&r&&Nl&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var i=Vl;if(ql(t,e),Kl(e),512&r&&(Bl||null===n||Fl(n,n.return)),4&r){var a=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(a=i.getElementsByTagName("title")[0])||a[Ke]||a[Ue]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector("head >
2 title"))),fd(a,r,n),a[Ue]=e,et(a),r=a;break e;case"link":var o=ih("link","href",i).get(r+(n.href||""));if(o)for(var l=0;l<o.length;l++)if((a=o[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){o.splice(l,1);break t}fd(a=i.createElement(r),r,n),i.head.appendChild(a);break;case"meta":if(o=ih("meta","content",i).get(r+(n.content||"")))for(l=0;l<o.length;l++)if((a=o[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){o.splice(l,1);break t}fd(a=i.createElement(r),r,n),i.head.appendChild(a);break;default:throw Error(s(468,r))}a[Ue]=e,et(a),r=a}e.stateNode=r}else ah(i,e.type,e.stateNode);else e.stateNode=Zd(i,r,e.memoizedProps);else a!==r?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===r?ah(i,e.type,e.stateNode):Zd(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&kl(e,e.memoizedProps,n.memoizedProps)}break;case 27:ql(t,e),Kl(e),512&r&&(Bl||null===n||Fl(n,n.return)),null!==n&&4&r&&kl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ql(t,e),Kl(e),512&r&&(Bl||null===n||Fl(n,n.return)),32&e.flags){i=e.stateNode;try{_t(i,"")}catch(m){kc(e,e.return,m)}}4&r&&null!=e.stateNode&&kl(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Tl=!0);break;case 6:if(ql(t,e),Kl(e),4&r){if(null===e.stateNode)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){kc(e,e.return,m)}}break;case 3:if(rh=null,i=Vl,Vl=Wd(t.containerInfo),ql(t,e),Vl=i,Kl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vh(t.containerInfo)}catch(m){kc(e,e.return,m)}Tl&&(Tl=!1,Yl(e));break;case 4:r=Vl,Vl=Wd(e.stateNode.containerInfo),ql(t,e),Kl(e),Vl=r;break;case 12:default:ql(t,e),Kl(e);break;case 31:case 19:ql(t,e),Kl(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r)));break;case 13:ql(t,e),Kl(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(Pu=le()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r)));break;case 22:i=null!==e.memoizedState;var u=null!==n&&null!==n.memoizedState,c=Nl,d=Bl;if(Nl=c||i,Bl=d||u,ql(t,e),Bl=d,Nl=c,Kl(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||u||Nl||Bl||Jl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){u=n=t;try{if(a=u.stateNode,i)"function"===typeof(o=a.style).setProperty?o.setProperty("display","none","important"):o.display="none";else{l=u.stateNode;var h=u.memoizedProps.style,p=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==p||"boolean"===typeof p?"":(""+p).trim()}}catch(m){kc(u,u.return,m)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(m){kc(u,u.return,m)}}}else if(18===t.tag){if(null===n){u=t;try{var f=u.stateNode;i?Sd(f,!0):Sd(u.stateNode,!1)}catch(m){kc(u,u.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,Hl(e,n))));case 30:case 21:}}function Kl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(wl(r)){n=r;break}r=r.return}if(null==n)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode;Al(e,El(e),i);break;case 5:var a=n.stateNode;32&n.flags&&(_t(a,""),n.flags&=-33),Al(e,El(e),a);break;case 3:case 4:var o=n.stateNode.containerInfo;jl(e,El(e),o);break;default:throw Error(s(161))}}catch(l){kc(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Yl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Yl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Ql(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Rl(e,t.alternate,t),t=t.sibling}function Jl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Dl(4,t,t.return),Jl(t);break;case 1:Fl(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&xl(t,t.return,n),Jl(t);break;case 27:Id(t.stateNode);case 26:case 5:Fl(t,t.return),Jl(t);break;case 22:null===t.memoizedState&&Jl(t);break;default:Jl(t)}e=e.sibling}}function Xl(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,a=t,s=a.flags;switch(a.tag){case 0:case 11:case 15:Xl(i,a,n),yl(4,a);break;case 1:if(Xl(i,a,n),"function"===typeof(i=(r=a).stateNode).componentDidMount)try{i.componentDidMount()}catch(u){kc(r,r.return,u)}if(null!==(i=(r=a).updateQueue)){var o=r.stateNode;try{var l=i.shared.hiddenCallbacks;
vendor: 14,219 bytes, line 2
2if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Ea(l[i],o)}catch(u){kc(r,r.return,u)}}n&&64&s&&bl(a),Cl(a,a.return);break;case 27:Sl(a);case 26:case 5:Xl(i,a,n),n&&null===r&&4&s&&_l(a),Cl(a,a.return);break;case 12:Xl(i,a,n);break;case 31:Xl(i,a,n),n&&4&s&&$l(i,a);break;case 13:Xl(i,a,n),n&&4&s&&Wl(i,a);break;case 22:null===a.memoizedState&&Xl(i,a,n),Cl(a,a.return);break;case 30:break;default:Xl(i,a,n)}t=t.sibling}}function Zl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&$i(n))}function eu(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&$i(e))}function tu(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)nu(e,t,n,r),t=t.sibling}function nu(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:tu(e,t,n,r),2048&i&&yl(9,t);break;case 1:case 31:case 13:default:tu(e,t,n,r);break;case 3:tu(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&$i(e)));break;case 12:if(2048&i){tu(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;"function"===typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){kc(t,t.return,l)}}else tu(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?tu(e,t,n,r):iu(e,t):2&a._visibility?tu(e,t,n,r):(a._visibility|=2,ru(e,t,n,r,0!==(10256&t.subtreeFlags)||!1)),2048&i&&Zl(s,t);break;case 24:tu(e,t,n,r),2048&i&&eu(t.alternate,t)}}function ru(e,t,n,r,i){for(i=i&&(0!==(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,s=t,o=n,l=r,u=s.flags;switch(s.tag){case 0:case 11:case 15:ru(a,s,o,l,i),yl(8,s);break;case 23:break;case 22:var c=s.stateNode;null!==s.memoizedState?2&c._visibility?ru(a,s,o,l,i):iu(a,s):(c._visibility|=2,ru(a,s,o,l,i)),i&&2048&u&&Zl(s.alternate,s);break;case 24:ru(a,s,o,l,i),i&&2048&u&&eu(s.alternate,s);break;default:ru(a,s,o,l,i)}t=t.sibling}}function iu(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:iu(n,r),2048&i&&Zl(r.alternate,r);break;case 24:iu(n,r),2048&i&&eu(r.alternate,r);break;default:iu(n,r)}t=t.sibling}}var au=8192;function su(e,t,n){if(e.subtreeFlags&au)for(e=e.child;null!==e;)ou(e,t,n),e=e.sibling}function ou(e,t,n){switch(e.tag){case 26:su(e,t,n),e.flags&au&&null!==e.memoizedState&&function(e,t,n,r){if("stylesheet"===n.type&&("string"!==typeof r.media||!1!==matchMedia(r.media).matches)&&0===(4&n.state.loading)){if(null===n.instance){var i=Kd(r.href),a=t.querySelector(Yd(i));if(a)return null!==(t=a._p)&&"object"===typeof t&&"function"===typeof t.then&&(e.count++,e=lh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,void et(a);a=t.ownerDocument||t,r=Qd(r),(i=Ud.get(i))&&th(r,i),et(a=a.createElement("link"));var s=a;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fd(a,"link",r),n.instance=a}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&0===(3&n.state.loading)&&(e.count++,n=lh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Vl,e.memoizedState,e.memoizedProps);break;case 5:default:su(e,t,n);break;case 3:case 4:var r=Vl;Vl=Wd(e.stateNode.containerInfo),su(e,t,n),Vl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=au,au=16777216,su(e,t,n),au=r):su(e,t,n))}}function lu(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function uu(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Ll=r,hu(r,e)}lu(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)cu(e),e=e.sibling}function cu(e){switch(e.tag){case 0:case 11:case 15:uu(e),2048&e.flags&&Dl(9,e,e.return);break;case 3:case 12:default:uu(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,du(e)):uu(e)}}function du(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Ll=r,hu(r,e)}lu(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:Dl(8,t,t.return),du(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,du(t));break;default:du(t)}e=e.sibling}}function hu(e,t){for(;null!==Ll;){var n=Ll;switch(n.tag){case 0:case 11:case 15:Dl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:$i(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Ll=r;else e:for(n=e;null!==Ll;){var i=(r=Ll).sibling,a=r.return;if(zl(r),r===n){Ll=null;break e}if(null!==i){i.return=a,Ll=i;break e}Ll=a}}}var pu={getCacheForType:function(e){var t=Pi(Ii),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pi(Ii).controller.signal}},fu="function"===typeof WeakMap?WeakMap:Map,mu=0,gu=null,vu=null,yu=0,Du=0,bu=null,xu=!1,Cu=!1,Fu=!1,_u=0,ku=0,wu=0,Eu=0,ju=0,Au=0,Su=0,Nu=null,Bu=null,Tu=!1,Pu=0,Lu=0,Ru=1/0,zu=null,Ou=null,Mu=0,Iu=null,Uu=null,$u=0,Wu=0,Hu=null,qu=null,Vu=0,Gu=null;function Ku(){return 0!==(2&mu)&&0!==yu?yu&-yu:null!==P.T?Hc():Oe()}function Yu(){if(0===Au)if(0===(536870912&yu)||pi){var e=_e;0===(3932160&(_e<<=1))&&(_e=262144),Au=e}else Au=536870912;return null!==(e=Pa.current)&&(e.flags|=32),Au}function Qu(e,t,n){(e!==gu||2!==Du&&9!==Du)&&null===e.cancelPendingCommit||(rc(e,0),ec(e,yu,Au,!1)),Be(e,n),0!==(2&mu)&&e===gu||(e===gu&&(0===(2&mu)&&(Eu|=n),4===ku&&ec(e,yu,Au,!1)),zc(e))}function Ju(e,t,n){if(0!==(6&mu))throw Error(s(327));for(var r=!n&&0===(127&t)&&0===(t&e.expiredLanes)||je(e,t),i=r?function(e,t){var n=mu;mu|=2;var r=sc(),i=oc();gu!==e||yu!==t?(zu=null,Ru=le()+500,rc(e,t)):Cu=je(e,t);e:for(;;)try{if(0!==Du&&null!==vu){t=vu;var a=bu;t:switch(Du){case 1:Du=0,bu=null,fc(e,t,a,1);break;case 2:case 9:if(ra(a)){Du=0,bu=null,pc(t);break}t=function(){2!==Du&&9!==Du||gu!==e||(Du=7),zc(e)},a.then(t,t);break e;case 3:Du=7;break e;case 4:Du=5;break e;case 7:ra(a)?(Du=0,bu=null,pc(t)):(Du=0,bu=null,fc(e,t,a,7));break;case 5:var o=null;switch(vu.tag){case 26:o=vu.memoizedState;case 5:case 27:var l=vu;if(o?sh(o):l.stateNode.complete){Du=0,bu=null;var u=l.sibling;if(null!==u)vu=u;else{var c=l.return;null!==c?(vu=c,mc(c)):vu=null}break t}}Du=0,bu=null,fc(e,t,a,5);break;case 6:Du=0,bu=null,fc(e,t,a,6);break;case 8:nc(),ku=6;break e;default:throw Error(s(462))}}dc();break}catch(d){ic(e,d)}return wi=ki=null,P.H=r,P.A=i,mu=n,null!==vu?0:(gu=null,yu=0,Br(),ku)}(e,t):uc(e,t,!0),a=r;;){if(0===i){Cu&&!r&&ec(e,t,0,!1);break}if(n=e.current.alternate,!a||Zu(n)){if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=0!==(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){t=o;e:{var l=e;i=Nu;var u=l.current.memoizedState.isDehydrated;if(u&&(rc(l,o).flags|=256),2!==(o=uc(l,o,!1))){if(Fu&&!u){l.errorRecoveryDisabledLanes|=a,Eu|=a,i=4;break e}a=Bu,Bu=i,null!==a&&(null===Bu?Bu=a:Bu.push.apply(Bu,a))}i=o}if(a=!1,2!==i)continue}}if(1===i){rc(e,0),ec(e,t,0,!0);break}e:{switch(r=e,a=i){case 0:case 1:throw Error(s(345));case 4:if((4194048&t)!==t)break;case 6:ec(r,t,Au,!xu);break e;case 2:Bu=null;break;case 3:case 5:break;default:throw Error(s(329))}if((62914560&t)===t&&10<(i=Pu+300-le())){if(ec(r,t,Au,!xu),0!==Ee(r,0,!0))break e;$u=t,r.timeoutHandle=Fd(Xu.bind(null,r,n,Bu,zu,Tu,t,Au,Eu,Su,xu,a,"Throttled",-0,0),i)}else Xu(r,n,Bu,zu,Tu,t,Au,Eu,Su,xu,a,null,-0,0)}break}i=uc(e,t,!1),a=!1}zc(e)}function Xu(e,t,n,r,i,a,s,o,l,u,c,d,h,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||16785408===(16785408&d)){ou(t,a,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bt});var f=(62914560&a)===a?Pu-le():(4194048&a)===a?Lu-le():0;if(f=function(e,t){return e.stylesheets&&0===e.count&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===oh&&(oh=62500*function(){if("function"===typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,s=i.initiatorType,o=i.duration;if(a&&o&&md(s)){for(s=0,o=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],u=l.startTime;if(u>o)break;var c=l.transferSize,d=l.initiatorType;c&&md(d)&&(s+=c*((l=l.responseEnd)<o?1:(o-u)/(l-u)))}if(--r,t+=8*(a+s)/(i.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"===typeof(e=navigator.connection.downlink)?e:5}());var i=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>oh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}(d,f),null!==f)return $u=a,e.cancelPendingCommit=f(vc.bind(null,e,t,a,n,r,i,s,o,l,c,d,null,h,p)),void ec(e,a,s,!u)}vc(e,t,a,n,r,i,s,o,l)}function Zu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!er(a(),i))return!1}catch(s){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ec(e,t,n,r){t&=~ju,t&=~Eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-be(i),s=1<<a;r[a]=-1,i&=~s}0!==n&&Te(e,n,t)}function tc(){return 0!==(6&mu)||(Oc(0,!1),!1)}function nc(){if(null!==vu){if(0===Du)var e=vu.return;else wi=ki=null,ls(e=vu),ua=null,ca=0,e=vu;for(;null!==e;)vl(e.alternate,e),e=e.return;vu=null}}function rc(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,_d(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),$u=0,nc(),gu=e,vu=n=$r(e.current,null),yu=t,Du=0,bu=null,xu=!1,Cu=je(e,t),Fu=!1,Su=Au=ju=Eu=wu=ku=0,Bu=Nu=null,Tu=!1,0!==(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-be(r),a=1<<i;t|=e[i],r&=~a}return _u=t,Br(),n}function ic(e,t){Ha=null,P.H=vo,t===Zi||t===ta?(t=oa(),Du=3):t===ea?(t=oa(),Du=4):Du=t===Po?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,bu=t,null===vu&&(ku=1,Ao(e,Qr(t,e.current)))}function ac(){var e=Pa.current;return null===e||((4194048&yu)===yu?null===La:((62914560&yu)===yu||0!==(536870912&yu))&&e===La)}function sc(){var e=P.H;return P.H=vo,null===e?vo:e}function oc(){var e=P.A;return P.A=pu,e}function lc(){ku=4,xu||(4194048&yu)!==yu&&null!==Pa.current||(Cu=!0),0===(134217727&wu)&&0===(134217727&Eu)||null===gu||ec(gu,yu,Au,!1)}function uc(e,t,n){var r=mu;mu|=2;var i=sc(),a=oc();gu===e&&yu===t||(zu=null,rc(e,t)),t=!1;var s=ku;e:for(;;)try{if(0!==Du&&null!==vu){var o=vu,l=bu;switch(Du){case 8:nc(),s=6;break e;case 3:case 2:case 9:case 6:null===Pa.current&&(t=!0);var u=Du;if(Du=0,bu=null,fc(e,o,l,u),n&&Cu){s=0;break e}break;default:u=Du,Du=0,bu=null,fc(e,o,l,u)}}cc(),s=ku;break}catch(c){ic(e,c)}return t&&e.shellSuspendCounter++,wi=ki=null,mu=r,P.H=i,P.A=a,null===vu&&(gu=null,yu=0,Br()),s}function cc(){for(;null!==vu;)hc(vu)}function dc(){for(;null!==vu&&!se();)hc(vu)}function hc(e){var t=ll(e.alternate,e,_u);e.memoizedProps=e.pendingProps,null===t?mc(e):vu=t}function pc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Go(n,t,t.pendingProps,t.type,void 0,yu);break;case 11:t=Go(n,t,t.pendingProps,t.type.render,t.ref,yu);break;case 5:ls(t);default:vl(n,t),t=ll(n,t=vu=Wr(t,_u),_u)}e.memoizedProps=e.pendingProps,null===t?mc(e):vu=t}function fc(e,t,n,r){wi=ki=null,ls(t),ua=null,ca=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"===typeof r&&"function"===typeof r.then){if(null!==(t=n.alternate)&&Ni(t,n,i,!0),null!==(n=Pa.current)){switch(n.tag){case 31:case 13:return null===La?lc():null===n.alternate&&0===ku&&(ku=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===na?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),wc(e,r,i)),!1;case 22:return n.flags|=65536,r===na?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),wc(e,r,i)),!1}throw Error(s(435,n.tag))}return wc(e,r,i),lc(),!1}if(pi)return null!==(t=Pa.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==gi&&Fi(Qr(e=Error(s(422),{cause:r}),n))):(r!==gi&&Fi(Qr(t=Error(s(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Qr(r,n),Fa(e,i=No(e.stateNode,r,i)),4!==ku&&(ku=2)),!1;var a=Error(s(520),{cause:r});if(a=Qr(a,n),null===Nu?Nu=[a]:Nu.push(a),4!==ku&&(ku=2),null===t)return!0;r=Qr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Fa(n,e=No(n.stateNode,r,e)),!1;case 1:if(t=n.type,a=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==a&&"function"===typeof a.componentDidCatch&&(null===Ou||!Ou.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,To(i=Bo(i),e,n,r),Fa(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,yu))return ku=1,Ao(e,Qr(n,e.current)),void(vu=null)}catch(a){if(null!==i)throw vu=i,a;return ku=1,Ao(e,Qr(n,e.current)),void(vu=null)}32768&t.flags?(pi||1===r?e=!0:Cu||0!==(536870912&yu)?e=!1:(xu=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=Pa.current)&&13===r.tag&&(r.flags|=16384))),gc(t,e)):mc(t)}function mc(e){var t=e;do{if(0!==(32768&t.flags))return void gc(t,xu);e=t.return;var n=ml(t.alternate,t,_u);if(null!==n)return void(vu=n);if(null!==(t=t.sibling))return void(vu=t);vu=t=e}while(null!==t);0===ku&&(ku=5)}function gc(e,t){do{var n=gl(e.alternate,e);if(null!==n)return n.flags&=32767,void(vu=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deleti
2ons=null),!t&&null!==(e=e.sibling))return void(vu=e);vu=e=n}while(null!==e);ku=6,vu=null}function vc(e,t,n,r,i,a,o,l,u){e.cancelPendingCommit=null;do{Cc()}while(0!==Mu);if(0!==(6&mu))throw Error(s(327));if(null!==t){if(t===e.current)throw Error(s(177));if(a=t.lanes|t.childLanes,function(e,t,n,r,i,a){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=s&~n;0<n;){var c=31-be(n),d=1<<c;o[c]=0,l[c]=-1;var h=u[c];if(null!==h)for(u[c]=null,c=0;c<h.length;c++){var p=h[c];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Te(e,r,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,n,a|=Nr,o,l,u),e===gu&&(vu=gu=null,yu=0),Uu=t,Iu=e,$u=n,Wu=a,Hu=i,qu=r,0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,ie(he,function(){return Fc(),null})):(e.callbackNode=null,e.callbackPriority=0),r=0!==(13878&t.flags),0!==(13878&t.subtreeFlags)||r){r=P.T,P.T=null,i=L.p,L.p=2,o=mu,mu|=4;try{!function(e,t){if(e=e.containerInfo,gd=xh,sr(e=ar(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(g){n=null;break e}var o=0,l=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(l=o+i),h!==a||0!==r&&3!==h.nodeType||(u=o+r),3===h.nodeType&&(o+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++c===i&&(l=o),p===a&&++d===r&&(u=o),null!==(f=h.nextSibling))break;
2p=(h=p).parentNode}h=f}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(vd={focusedElem:e,selectionRange:n},xh=!1,Ll=t;null!==Ll;)if(e=(t=Ll).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Ll=e;else for(;null!==Ll;){switch(a=(t=Ll).alternate,e=t.flags,t.tag){case 0:if(0!==(4&e)&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var m=ko(n.type,i);e=r.getSnapshotBeforeUpdate(m,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){kc(n,n.return,v)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))Nd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nd(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(s(163))}if(null!==(e=t.sibling)){e.return=t.return,Ll=e;break}Ll=t.return}}(e,t)}finally{mu=o,L.p=i,P.T=r}}Mu=1,yc(),Dc(),bc()}}function yc(){if(1===Mu){Mu=0;var e=Iu,t=Uu,n=0!==(13878&t.flags);if(0!==(13878&t.subtreeFlags)||n){n=P.T,P.T=null;var r=L.p;L.p=2;var i=mu;mu|=4;try{Gl(t,e);var a=vd,s=ar(e.containerInfo),o=a.focusedElem,l=a.selectionRange;if(s!==o&&o&&o.ownerDocument&&ir(o.ownerDocument.documentElement,o)){if(null!==l&&sr(o)){var u=l.start,c=l.end;if(void 0===c&&(c=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(c,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var p=h.getSelection(),f=o.textContent.length,m=Math.min(l.start,f),g=void 0===l.end?m:Math.min(l.end,f);!p.extend&&m>g&&(s=g,g=m,m=s);var v=rr(o,m),y=rr(o,g);if(v&&y&&(1!==p.rangeCount||p.anchorNode!==v.node||p.anchorOffset!==v.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var D=d.createRange();D.setStart(v.node,v.offset),p.removeAllRanges(),m>g?(p.addRange(D),p.extend(y.node,y.offset)):(D.setEnd(y.node,y.offset),p.addRange(D))}}}}for(d=[],p=o;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"===typeof o.focus&&o.focus(),o=0;o<d.length;o++){var b=d[o];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}xh=!!gd,vd=gd=null}finally{mu=i,L.p=r,P.T=n}}e.current=t,Mu=2}}function Dc(){if(2===Mu){Mu=0;var e=Iu,t=Uu,n=0!==(8772&t.flags);if(0!==(8772&t.subtreeFlags)||n){n=P.T,P.T=null;var r=L.p;L.p=2;var i=mu;mu|=4;try{Rl(e,t.alternate,t)}finally{mu=i,L.p=r,P.T=n}}Mu=3}}function bc(){if(4===Mu||3===Mu){Mu=0,oe();var e=Iu,t=Uu,n=$u,r=qu;0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?Mu=5:(Mu=0,Uu=Iu=null,xc(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(Ou=null),ze(n),t=t.stateNode,ye&&"function"===typeof ye.onCommitFiberRoot)try{ye.onCommitFiberRoot(ve,t,void 0,128===(128&t.current.flags))}catch(l){}if(null!==r){t=P.T,i=L.p,L.p=2,P.T=null;try{for(var a=e.onRecoverableError,s=0;s<r.length;s++){var o=r[s];a(o.value,{componentStack:o.stack})}}finally{P.T=t,L.p=i}}0!==(3&$u)&&Cc(),zc(e),i=e.pendingLanes,0!==(261930&n)&&0!==(42&i)?e===Gu?Vu++:(Vu=0,Gu=e):Vu=0,Oc(0,!1)}}function xc(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,$i(t)))}function Cc(){return yc(),Dc(),bc(),Fc()}function Fc(){if(5!==Mu)return!1;var e=Iu,t=Wu;Wu=0;var n=ze($u),r=P.T,i=L.p;try{L.p=32>n?32:n,P.T=null,n=Hu,Hu=null;var a=Iu,o=$u;if(Mu=0,Uu=Iu=null,$u=0,0!==(6&mu))throw Error(s(331));var l=mu;if(mu|=4,cu(a.current),nu(a,a.current,o,n),mu=l,Oc(0,!1),ye&&"function"===typeof ye.onPostCommitFiberRoot)try{ye.onPostCommitFiberRoot(ve,a)}catch(u){}return!0}finally{L.p=i,P.T=r,xc(e,t)}}function _c(e,t,n){t=Qr(n,t),null!==(e=xa(e,t=No(e.stateNode,t,2),2))&&(Be(e,2),zc(e))}function kc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ou||!Ou.has(r))){e=Qr(n,e),null!==(r=xa(t,n=Bo(2),2))&&(To(n,r,t,e),Be(r,2),zc(r));break}}t=t.return}}function wc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fu;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(Fu=!0,i.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function Ec(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gu===e&&(yu&n)===n&&(4===ku||3===ku&&(62914560&yu)===yu&&300>le()-Pu?0===(2&mu)&&rc(e,0):ju|=n,Su===yu&&(Su=0)),zc(e)}function jc(e,t){0===t&&(t=Se()),null!==(e=Lr(e,t))&&(Be(e,t),zc(e))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),jc(e,n)}function Sc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),jc(e,n)}
vendor: 4,915 bytes, line 2
2var Nc=null,Bc=null,Tc=!1,Pc=!1,Lc=!1,Rc=0;function zc(e){e!==Bc&&null===e.next&&(null===Bc?Nc=Bc=e:Bc=Bc.next=e),Pc=!0,Tc||(Tc=!0,wd(function(){0!==(6&mu)?ie(ce,Mc):Ic()}))}function Oc(e,t){if(!Lc&&Pc){Lc=!0;do{for(var n=!1,r=Nc;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var s=r.suspendedLanes,o=r.pingedLanes;a=(1<<31-be(42|e)+1)-1,a=201326741&(a&=i&~(s&~o))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,Wc(r,a))}else a=yu,0===(3&(a=Ee(r,r===gu?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||je(r,a)||(n=!0,Wc(r,a));r=r.next}}while(n);Lc=!1}}function Mc(){Ic()}function Ic(){Pc=Tc=!1;var e=0;0!==Rc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Cd&&(Cd=e,!0);return Cd=null,!1}()&&(e=Rc);for(var t=le(),n=null,r=Nc;null!==r;){var i=r.next,a=Uc(r,t);0===a?(r.next=null,null===n?Nc=i:n.next=i,null===i&&(Bc=n)):(n=r,(0!==e||0!==(3&a))&&(Pc=!0)),r=i}0!==Mu&&5!==Mu||Oc(e,!1),0!==Rc&&(Rc=0)}function Uc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var s=31-be(a),o=1<<s,l=i[s];-1===l?0!==(o&n)&&0===(o&r)||(i[s]=Ae(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(n=yu,n=Ee(e,e===(t=gu)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===Du||9===Du)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ae(r),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||je(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ae(r),ze(n)){case 2:case 8:n=de;break;case 32:default:n=he;break;case 268435456:n=fe}return r=$c.bind(null,e),n=ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ae(r),e.callbackPriority=2,e.callbackNode=null,2}function $c(e,t){if(0!==Mu&&5!==Mu)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Cc()&&e.callbackNode!==n)return null;var r=yu;return 0===(r=Ee(e,e===gu?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Ju(e,r,t),Uc(e,le()),null!=e.callbackNode&&e.callbackNode===n?$c.bind(null,e):null)}function Wc(e,t){if(Cc())return null;Ju(e,t,!0)}function Hc(){if(0===Rc){var e=qi;0===e&&(e=Fe,0===(261888&(Fe<<=1))&&(Fe=256)),Rc=e}return Rc}function qc(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:Nt(""+e)}function Vc(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Gc=0;Gc<wr.length;Gc++){var Kc=wr[Gc];Er(Kc.toLowerCase(),"on"+(Kc[0].toUpperCase()+Kc.slice(1)))}Er(yr,"onAnimationEnd"),Er(Dr,"onAnimationIteration"),Er(br,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(xr,"onTransitionRun"),Er(Cr,"onTransitionStart"),Er(Fr,"onTransitionCancel"),Er(_r,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yc="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(" "),Qc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yc));function Jc(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=u;try{a(i)}catch(c){jr(c)}i.currentTarget=null,a=l}else for(s=0;s<r.length;s++){if(l=(o=r[s]).instance,u=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=u;try{a(i)}catch(c){jr(c)}i.currentTarget=null,a=l}}}}function Xc(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var r=e+"__bubble";n.has(r)||(nd(t,e,2,!1),n.add(r))}function Zc(e,t,n){var r=0;t&&(r|=4),nd(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[ed]){e[ed]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Qc.has(t)||Zc(t,!1,e),Zc(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ed]||(t[ed]=!0,Zc("selectionchange",!1,t))}}
vendor: 2,406 bytes, line 2
2function nd(e,t,n,r){switch(jh(t)){case 2:var i=Ch;break;case 8:i=Fh;break;default:i=_h}n=i.bind(null,t,n,e),i=void 0,!Wt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function rd(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var o=r.stateNode.containerInfo;if(o===i)break;if(4===s)for(s=r.return;null!==s;){var u=s.tag;if((3===u||4===u)&&s.stateNode.containerInfo===i)return;s=s.return}for(;null!==o;){if(null===(s=Qe(o)))return;if(5===(u=s.tag)||6===u||26===u||27===u){r=a=s;continue e}o=o.parentNode}}r=r.return}It(function(){var r=a,i=Pt(n),s=[];e:{var o=kr.get(e);if(void 0!==o){var u=an,c=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":u=bn;break;case"focusin":c="focus",u=dn;break;case"focusout":c="blur",u=dn;break;case"beforeblur":case"afterblur":u=dn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=un;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=cn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Cn;break;case yr:case Dr:case br:u=hn;break;case _r:u=Fn;break;case"scroll":case"scrollend":u=on;break;case"wheel":u=_n;break;case"copy":case"cut":case"paste":u=pn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=xn;break;case"toggle":case"beforetoggle":u=kn}var d=0!==(4&t),h=!d&&("scroll"===e||"scrollend"===e),p=d?null!==o?o+"Capture":null:o;d=[];for(var f,m=r;null!==m;){var g=m;if(f=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===f||null===p||null!=(g=Ut(m,p))&&d.push(id(m,g,f)),h)break;m=m.return}0<d.length&&(o=new u(o,c,null,n,i),s.push({event:o,listeners:d}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===Tt||!(c=n.relatedTarget||n.fromElement)||!Qe(c)&&!c[We])&&(u||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Qe(c):null)&&(h=l(c),d=c.tag,c!==
vendor: 6,900 bytes, line 2
2h||5!==d&&27!==d&&6!==d)&&(c=null)):(u=null,c=r),u!==c)){if(d=un,g="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=xn,g="onPointerLeave",p="onPointerEnter",m="pointer"),h=null==u?o:Xe(u),f=null==c?o:Xe(c),(o=new d(g,m+"leave",u,n,i)).target=h,o.relatedTarget=f,g=null,Qe(i)===r&&((d=new d(p,m+"enter",c,n,i)).target=f,d.relatedTarget=h,g=d),h=g,u&&c)e:{for(d=sd,m=c,f=0,g=p=u;g;g=d(g))f++;g=0;for(var v=m;v;v=d(v))g++;for(;0<f-g;)p=d(p),f--;for(;0<g-f;)m=d(m),g--;for(;f--;){if(p===m||null!==m&&p===m.alternate){d=p;break e}p=d(p),m=d(m)}d=null}else d=null;null!==u&&od(s,o,u,d,!1),null!==c&&null!==h&&od(s,h,c,d,!0)}if("select"===(u=(o=r?Xe(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===u&&"file"===o.type)var y=Wn;else if(zn(o))if(Hn)y=Zn;else{y=Jn;var D=Qn}else!(u=o.nodeName)||"input"!==u.toLowerCase()||"checkbox"!==o.type&&"radio"!==o.type?r&&jt(r.elementType)&&(y=Wn):y=Xn;switch(y&&(y=y(e,r))?On(s,y,n,i):(D&&D(e,o,r),"focusout"===e&&r&&"number"===o.type&&null!=r.memoizedProps.value&&bt(o,"number",o.value)),D=r?Xe(r):window,e){case"focusin":(zn(D)||"true"===D.contentEditable)&&(lr=D,ur=r,cr=null);break;case"focusout":cr=ur=lr=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,hr(s,n,i);break;case"selectionchange":if(or)break;case"keydown":case"keyup":hr(s,n,i)}var b;if(En)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Ln?Tn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Sn&&"ko"!==n.locale&&(Ln||"onCompositionStart"!==x?"onCompositionEnd"===x&&Ln&&(b=Kt()):(Vt="value"in(qt=i)?qt.value:qt.textContent,Ln=!0)),0<(D=ad(r,x)).length&&(x=new fn(x,e,null,n,i),s.push({event:x,listeners:D}),b?x.data=b:null!==(b=Pn(n))&&(x.data=b))),(b=An?function(e,t){switch(e){case"compositionend":return Pn(t);case"keypress":return 32!==t.which?null:(Bn=!0,Nn);case"textInput":return(e=t.data)===Nn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Ln)return"compositionend"===e||!En&&Tn(e,t)?(e=Kt(),Gt=Vt=qt=null,Ln=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(x=ad(r,"onBeforeInput")).length&&(D=new fn("onBeforeInput","beforeinput",null,n,i),s.push({event:D,listeners:x}),D.data=b)),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var a=qc((i[$e]||null).action),s=r.submitter;s&&null!==(t=(t=s[$e]||null)?qc(t.formAction):s.getAttribute("formAction"))&&(a=t,s=null);var o=new an("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Rc){var e=s?Vc(i,s):new FormData(i);no(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else"function"===typeof a&&(o.preventDefault(),e=s?Vc(i,s):new FormData(i),no(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}(s,e,r,n,i)}Jc(s,t)})}function id(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ad(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===a||(null!=(i=Ut(e,n))&&r.unshift(id(e,i,a)),null!=(i=Ut(e,t))&&r.push(id(e,i,a))),3===e.tag)return r;e=e.return}return[]}function sd(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function od(e,t,n,r,i){for(var a=t._reactName,s=[];null!==n&&n!==r;){var o=n,l=o.alternate,u=o.stateNode;if(o=o.tag,null!==l&&l===r)break;5!==o&&26!==o&&27!==o||null===u||(l=u,i?null!=(u=Ut(n,a))&&s.unshift(id(n,u,l)):i||null!=(u=Ut(n,a))&&s.push(id(n,u,l))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var ld=/\r\n?/g,ud=/\u0000|\uFFFD/g;function cd(e){return("string"===typeof e?e:""+e).replace(ld,"\n").replace(ud,"")}function dd(e,t){return t=cd(t),cd(e)===t}function hd(e,t,n,r,i,a){switch(n){case"children":"string"===typeof r?"body"===t||"textarea"===t&&""===r||_t(e,r):("number"===typeof r||"bigint"===typeof r)&&"body"!==t&&_t(e,""+r);break;case"className":ut(e,"class",r);break;case"tabIndex":ut(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ut(e,n,r);break;case"style":Et(e,r,a);break;case"data":if("object"!==t){ut(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"===typeof r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Nt(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"===typeof r){e.setAttribute(n,"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}if("function"===typeof a&&("formAction"===n?("input"!==t&&hd(e,t,"name",i.name,i,null),hd(e,t,"formEncType",i.formEncType,i,null),hd(e,t,"formMethod",i.formMethod,i,null),hd(e,t,"formTarget",i.formTarget,i,null)):(hd(e,t,"encType",i.encType,i,null),hd(e,t,"method",i.method,i,null),hd(e,t,"target",i.target,i,null))),null==r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Nt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Bt);break;case"onScroll":null!=r&&Xc("scroll",e);break;case"onScrollEnd":null!=r&&Xc("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"muted":e.muted=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"===typeof r||"boolean"===typeof r||"symbol"===typeof r){e.removeAttribute("xlink:href");break}n=Nt(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);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"playsInl
2ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!==typeof r&&"symbol"!==typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"===typeof r||"symbol"===typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xc("beforetoggle",e),Xc("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ct(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ct(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ct(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ct(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ct(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ct(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ct(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ct(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ct(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&lt(e,n=At.get(n)||n,r)}}function pd(e,t,n,r,i,a){switch(n){case"style":Et(e,r,a);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(s(60));e.innerHTML=n}}break;case"children":"string"===typeof r?_t(e,r):("number"===typeof r||"bigint"===typeof r)&&_t(e,""+r);break;case"onScroll":null!=r&&Xc("scroll",e);break;case"onScrollEnd":null!=r&&Xc("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Bt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"===typeof(a=null!=(a=e[$e]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!==typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!==typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function fd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xc("error",e),Xc("load",e);var r,i=!1,a=!1;for(r in n)if(n.hasOwnProperty(r)){var o=n[r];if(null!=o)switch(r){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:hd(e,t,r,o,n,null)}}return a&&hd(e,t,"srcSet",n.srcSet,n,null),void(i&&hd(e,t,"src",n.src,n,null));case"input":Xc("invalid",e);var l=r=o=a=null,u=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":a=d;break;case"type":o=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(s(137,t));break;default:hd(e,t,i,d,n,null)}}return void Dt(e,r,l,u,c,o,a,!1);case"select":for(a in Xc("invalid",e),i=o=r=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]
2))switch(a){case"value":r=l;break;case"defaultValue":o=l;break;case"multiple":i=l;default:hd(e,t,a,l,n,null)}return t=r,n=o,e.multiple=!!i,void(null!=t?xt(e,!!i,t,!1):null!=n&&xt(e,!!i,n,!0));case"textarea":for(o in Xc("invalid",e),r=a=i=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":i=l;break;case"defaultValue":a=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(s(91));break;default:hd(e,t,o,l,n,null)}return void Ft(e,i,a,r);case"option":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))if("selected"===u)e.selected=i&&"function"!==typeof i&&"symbol"!==typeof i;else hd(e,t,u,i,n,null);return;case"dialog":Xc("beforetoggle",e),Xc("toggle",e),Xc("cancel",e),Xc("close",e);break;case"iframe":case"object":Xc("load",e);break;case"video":case"audio":for(i=0;i<Yc.length;i++)Xc(Yc[i],e);break;case"image":Xc("error",e),Xc("load",e);break;case"details":Xc("toggle",e);break;case"embed":case"source":case"link":Xc("error",e),Xc("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:hd(e,t,c,i,n,null)}return;default:if(jt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&pd(e,t,d,i,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(i=n[l])&&hd(e,t,l,i,n,null))}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gd=null,vd=null;function yd(e){return 9===e.nodeType?e:e.ownerDocument}function Dd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function xd(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"bigint"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Cd=null;var Fd="function"===typeof setTimeout?setTimeout:void 0,_d="function"===typeof clearTimeout?clearTimeout:void 0,kd="function"===typeof Promise?Promise:void 0,wd="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof kd?function(e){return kd.resolve(null).then(e).catch(Ed)}:Fd;function Ed(e){setTimeout(function(){throw e})}function jd(e){return"head"===e}function Ad(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)||"/&"===n){if(0===r)return e.removeChild(i),void Vh(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Id(e.ownerDocument.documentElement);else if("head"===n){Id(n=e.ownerDocument.head);for(var a=n.firstChild;a;){var s=a.nextSibling,o=a.nodeName;a[Ke]||"SCRIPT"===o||"STYLE"===o||"LINK"===o&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=s}}else"body"===n&&Id(e.ownerDocument.body);n=i}while(n);Vh(t)}function Sd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Nd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Nd(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Bd(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Ld(e.nextSibling)))return null}return e}function Td(e){return"$?"===e.data||"$~"===e.data}function Pd(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Ld(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;
vendor: 20,158 bytes, line 2
2if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Rd=null;function zd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Ld(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Od(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Md(e,t,n){switch(t=yd(n),e){case"html":if(!(e=t.documentElement))throw Error(s(452));return e;case"head":if(!(e=t.head))throw Error(s(453));return e;case"body":if(!(e=t.body))throw Error(s(454));return e;default:throw Error(s(451))}}function Id(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Ud=new Map,$d=new Set;function Wd(e){return"function"===typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=L.d;L.d={f:function(){var e=Hd.f(),t=tc();return e||t},r:function(e){var t=Je(e);null!==t&&5===t.tag&&"form"===t.type?io(t):Hd.r(e)},D:function(e){Hd.D(e),Vd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Vd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=qd;if(r&&e&&t){var i='link[rel="preload"][as="'+vt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+vt(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(i+='[imagesizes="'+vt(n.imageSizes)+'"]')):i+='[href="'+vt(e)+'"]';var a=i;switch(t){case"style":a=Kd(e);break;case"script":a=Jd(e)}Ud.has(a)||(e=p({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Ud.set(a,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Yd(a))||"script"===t&&r.querySelector(Xd(a))||(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=qd;if(n&&e){var r=t&&"string"===typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+vt(r)+'"][href="'+vt(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Jd(e)}if(!Ud.has(a)&&(e=p({rel:"modulepreload",href:e},t),Ud.set(a,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xd(a)))return}fd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=qd;if(n&&e){var r=Ze(n).hoistableScripts,i=Jd(e),a=r.get(i);a||((a=n.querySelector(Xd(i)))||(e=p({src:e,async:!0},t),(t=Ud.get(i))&&nh(e,t),et(a=n.createElement("script")),fd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}},S:function(e,t,n){Hd.S(e,t,n);var r=qd;if(r&&e){var i=Ze(r).hoistableStyles,a=Kd(e);t=t||"default";var s=i.get(a);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Yd(a)))o.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ud.get(a))&&th(e,n);var l=s=r.createElement("link");et(l),fd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,eh(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},i.set(a,s)}}},M:function(e,t){Hd.M(e,t);var n=qd;if(n&&e){var r=Ze(n).hoistableScripts,i=Jd(e),a=r.get(i);a||((a=n.querySelector(Xd(i)))||(e=p({src:e,async:!0,type:"module"},t),(t=Ud.get(i))&&nh(e,t),et(a=n.createElement("script")),fd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}};var qd="undefined"===typeof document?null:document;function Vd(e,t,n){var r=qd;if(r&&"string"===typeof t&&t){var i=vt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"===typeof n&&(i+='[crossorigin="'+n+'"]'),$d.has(i)||($d.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Gd(e,t,n,r){var i,a,o,l,u=(u=V.current)?Wd(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=Kd(n.href),(r=(n=Ze(u).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"===typeof n.href&&"string"===typeof n.precedence){e=Kd(n.href);var c=Ze(u).hoistableStyles,d=c.get(e);if(d||(u=u.ownerDocument||u,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=u.querySelector(Yd(e)))&&!c._p&&(d.instance=c,d.state.loading=5),Ud.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ud.set(e,n),c||(i=u,a=e,o=n,l=d.state,i.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=i.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),fd(a,"link",o),et(a),i.head.appendChild(a))))),t&&null===r)throw Error(s(528,""));return d}if(t&&null!==r)throw Error(s(529,""));return null;case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=Jd(n),(r=(n=Ze(u).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Kd(e){return'href="'+vt(e)+'"'}function Yd(e){return'link[rel="stylesheet"]['+e+"]"}function Qd(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Jd(e){return'[src="'+vt(e)+'"]'}function Xd(e){return"script[async]"+e}function Zd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+vt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),fd(r,"style",i),eh(r,n.precedence,e),t.instance=r;case"stylesheet":i=Kd(n.href);var a=e.querySelector(Yd(i));if(a)return t.state.loading|=4,t.instance=a,et(a),a;r=Qd(n),(i=Ud.get(i))&&th(r,i),et(a=(e.ownerDocument||e).createElement("link"));var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fd(a,"link",r),t.state.loading|=4,eh(a,n.precedence,e),t.instance=a;case"script":return a=Jd(n.src),(i=e.querySelector(Xd(a)))?(t.instance=i,et(i),i):(r=n,(i=Ud.get(a))&&nh(r=p({},n),i),et(i=(e=e.ownerDocument||e).createElement("script")),fd(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(s(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,eh(r,n.precedence,e));return t.instance}function eh(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)a=o;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function th(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function nh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var rh=null;function ih(e,t,n){if(null===rh){var r=new Map,i=rh=new Map;i.set(n,r)}else(r=(i=rh).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ke]||a[Ue]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var s=a.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(a):r.set(s,[a])}}return r}function ah(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function sh(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var oh=0;function lh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)ch(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var uh=null;function ch(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,uh=new Map,t.forEach(dh,e),uh=null,lh.call(e))}function dh(e,t){if(!(4&t.state.loading)){var n=uh.get(e);if(n)var r=n.get(null);else{n=new Map,uh.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var s=i[a];"LINK"!==s.nodeName&&"not all"===s.getAttribute("media")||(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}s=(i=t.instance).getAttribute("data-precedence"),(a=n.get(s)||r)===r&&n.set(null,i),n.set(s,i),this.count++,r=lh.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var hh={$$typeof:x,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function ph(e,t,n,r,i,a,s,o,l){this.tag=1,this.containerInfo=e,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=Ne(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.hiddenUpdates=Ne(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,s,o,l,u,c,d){return e=new ph(e,t,n,s,l,u,c,d,o),t=1,!0===a&&(t|=24),a=Ir(3,null,null,t),e.current=a,a.stateNode=e,(t=Ui()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ya(a),e}function mh(e){return e?e=Or:Or}function gh(e,t,n,r,i,a){i=mh(i),null===r.context?r.context=i:r.pendingContext=i,(r=ba(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=xa(e,r,t))&&(Qu(n,0,t),Ca(n,e,t))}function vh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function yh(e,t){vh(e,t),(e=e.alternate)&&vh(e,t)}function Dh(e){if(13===e.tag||31===e.tag){var t=Lr(e,67108864);null!==t&&Qu(t,0,67108864),yh(e,67108864)}}function bh(e){if(13===e.tag||31===e.tag){var t=Ku(),n=Lr(e,t=Re(t));null!==n&&Qu(n,0,t),yh(e,t)}}var xh=!0;function Ch(e,t,n,r){var i=P.T;P.T=null;var a=L.p;try{L.p=2,_h(e,t,n,r)}finally{L.p=a,P.T=i}}function Fh(e,t,n,r){var i=P.T;P.T=null;var a=L.p;try{L.p=8,_h(e,t,n,r)}finally{L.p=a,P.T=i}}function _h(e,t,n,r){if(xh){var i=kh(r);if(null===i)rd(e,t,r,wh,n),zh(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Sh=Oh(Sh,e,t,n,r,i),!0;case"dragenter":return Nh=Oh(Nh,e,t,n,r,i),!0;case"mouseover":return Bh=Oh(Bh,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Th.set(a,Oh(Th.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Ph.set(a,Oh(Ph.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(zh(e,r),4&t&&-1<Rh.indexOf(e)){for(;null!==i;){var a=Je(i);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var s=we(a.pendingLanes);if(0!==s){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-be(s);o.entanglements[1]|=l,s&=~l}zc(a),0===(6&mu)&&(Ru=le()+500,Oc(0,!1))}}break;case 31:case 13:null!==(o=Lr(a,2))&&Qu(o,0,2),tc(),yh(a,2)}if(null===(a=kh(r))&&rd(e,t,r,wh,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else rd(e,t,r,null,n)}}function kh(e){return Eh(e=Pt(e))}var wh=null;function Eh(e){if(wh=null,null!==(e=Qe(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=u(t)))return e;e=null}else if(31===n){if(null!==(e=c(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wh=e,null}function jh(e){switch(e){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(ue()){case ce:return 2;case de:return 8;case he:case pe:return 32;case fe:return 268435456;default:return 32}default:return 32}}var Ah=!1,Sh=null,Nh=null,Bh=null,Th=new Map,Ph=new Map,Lh=[],Rh="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 zh(e,t){switch(e){case"focusin":case"focusout":Sh=null;break;case"dragenter":case"dragleave":Nh=null;break;case"mouseover":case"mouseout":Bh=null;break;case"pointerover":case"pointerout":Th.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ph.delete(t.pointerId)}}function Oh(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=Je(t))&&Dh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Mh(e){var t=Qe(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=u(n)))return e.blockedOn=t,void Me(e.priority,function(){bh(n)})}else if(31===t){if(null!==(t=c(n)))return e.blockedOn=t,void Me(e.priority,function(){bh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ih(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=kh(e.nativeEvent);if(null!==n)return null!==(t=Je(n))&&Dh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Tt=r,n.target.dispatchEvent(r),Tt=null,t.shift()}return!0}function Uh(e,t,n){Ih(e)&&n.delete(t)}function $h(){Ah=!1,null!==Sh&&Ih(Sh)&&(Sh=null),null!==Nh&&Ih(Nh)&&(Nh=null),null!==Bh&&Ih(Bh)&&(Bh=null),Th.forEach(Uh),Ph.forEach(Uh)}function Wh(e,t){e.blockedOn===t&&(e.blockedOn=null,Ah||(Ah=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,$h)))}var Hh=null;function qh(e){Hh!==e&&(Hh=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!==typeof r){if(null===Eh(r||n))continue;break}var a=Je(n);null!==a&&(e.splice(t,3),t-=3,no(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Vh(e){function t(t){return Wh(t,e)}null!==Sh&&Wh(Sh,e),null!==Nh&&Wh(Nh,e),null!==Bh&&Wh(Bh,e),Th.forEach(t),Ph.forEach(t);for(var n=0;n<Lh.length;n++){var r=Lh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Lh.length&&null===(n=Lh[0]).blockedOn;)Mh(n),null===n.blockedOn&&Lh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],s=i[$e]||null;if("function"===typeof a)s||qh(n);else if(s){var o=null;if(a&&a.hasAttribute("formAction")){if(i=a,s=a[$e]||null)o=s.formAction;else if(null!==Eh(i))continue}else o=s.action;"function"===typeof o?n[r+1]=o:(n.splice(r,3),r-=3),qh(n)}}}function Gh(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==i&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"===typeof navigation){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==i&&(i(),i=null)}}}function Kh(e){this._internalRoot=e}function Yh(e){this._internalRoot=e}Yh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));gh(t.current,Ku(),e,t,null,null)},Yh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),tc(),t[We]=null}},Yh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lh.length&&0!==t&&t<Lh[n].priority;n++);Lh.splice(n,0,e),0===n&&Mh(e)}};var Qh=i.version;if("19.2.3"!==Qh)throw Error(s(527,Qh,"19.2.3"));L.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return d(i),e;if(a===r)return d(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,u=i.child;u;){if(u===n){o=!0,n=i,r=a;break}if(u===r){o=!0,r=i,n=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===n){o=!0,n=a,r=i;break}if(u===r){o=!0,r=a,n=i;break}u=u.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?h(e):null)?null:e.stateNode};var Jh={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{ve=Xh.inject(Jh),ye=Xh}catch(Zh){}}t.createRoot=function(e,t){if(!o(e))throw Error(s(299));var n=!1,r="",i=wo,a=Eo,l=jo;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=fh(e,1,!1,null,0,n,r,null,i,a,l,Gh),e[We]=t.current,td(e),new Kh(t)},t.hydrateRoot=function(e,t,n){if(!o(e))throw Error(s(299));var r=!1,i="",a=wo,l=Eo,u=jo,c=null;return null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(a=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(u=n.onRecoverableError),void 0!==n.formState&&(c=n.formState)),(t=fh(e,1,!0,t,0,r,i,c,a,l,u,Gh)).context=mh(null),n=t.current,(i=ba(r=Re(r=Ku()))).c
2allback=null,xa(n,i,r),n=r,t.current.lanes=n,Be(t,n),zc(t),e[We]=t.current,td(e),new Yh(t)},t.version="19.2.3"},43(e,t,n){e.exports=n(288)},106(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,u="";function c(e){return e?e.replace(l,u):u}e.exports=function(e,l){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}function g(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function y(){v(r)}function D(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function x(){var e=f(),n=v(i);if(n){if(b(),!v(a))return g("property missing ':'");var r=v(s),l=e({type:"declaration",property:c(n[0].replace(t,u)),value:r?c(r[0].replace(t,u)):u});return v(o),l}}return m.prototype.content=e,y(),function(){var e,t=[];for(D(t);e=x();)!1!==e&&(t.push(e),D(t));return t}()}},146(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(a,l)).replace(r,o))}},222(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!==typeof e)return n;const r=(0,i.default)(e),a="function"===typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:i}=e;a?t(r,i,e):i&&(n=n||{},n[r]=i)}),n};const i=r(n(106))},240(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!a)return!1;for(r in e);return"undefined"===typeof r||t.call(e,r)},o=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"===typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!==typeof d&&"function"!==typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(f&&i&&(s(i)||(u=a(i)))?(u?(u=!1,c=r&&a(r)?r:[]):c=r&&s(r)?r:{},o(d,{name:n,newValue:e(f,c,i)})):"undefined"!==typeof i&&o(d,{name:n,newValue:i}));return d}},288(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||m}function D(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},D.prototype=y.prototype;var x=b.prototype=new D;x.constructor=b,g(x,y.prototype),x.isPureReactComponent=!0;var C=Array.isArray;function F(){}var _={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function w(e,t,r){var i=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==i?i:null,props:r}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var j=/\/+/g;function A(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function S(e,t,i,a,s){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l,u,c=!1;if(null===e)c=!0;else switch(o){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0;break;case h:return S((c=e._init)(e._payload),t,i,a,s)}}if(c)return s=s(e),c=""===a?"."+A(e,0):a,C(s)?(i="",null!=c&&(i=c.replace(j,"$&/")+"/"),S(s,t,i,"",function(e){return e})):null!=s&&(E(s)&&(l=s,u=i+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(j,"$&/")+"/")+c,s=w(l.type,u,l.props)),t.push(s)),1;c=0;var d,p=""===a?".":a+":";if(C(e))for(var m=0;m<e.length;m++)c+=S(a=e[m],t,i,o=p+A(a,m),s);else if("function"===typeof(m=null===(d=e)||"object"!==typeof d?null:"function"===typeof(d=f&&d[f]||d["@@iterator"])?d:null))for(e=m.call(e),m=0;!(a=e.next()).done;)c+=S(a=a.value,t,i,o=p+A(a,m++),s);else if("object"===o){if("function"===typeof e.then)return S(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(F,F):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,i,a,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return c}function N(e,t,n){if(null==e)return e;var r=[],i=0;return S(e,r,"","",function(e){return t.call(n,e,i++)}),r}function B(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},P={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=p,t.Children=P,t.Component=y,t.Fragment=i,t.Profiler=s,t.PureComponent=b,t.StrictMode=a,t.Suspense=c,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return _.H.useMemoCache(e)}}
2,t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),i=e.key;if(null!=t)for(a in void 0!==t.key&&(i=""+t.key),t)!k.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(r[a]=t[a]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var s=Array(a),o=0;o<a;o++)s[o]=arguments[o+2];r.children=s}return w(e.type,i,r)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:o,_context:e},e},t.createElement=function(e,t,n){var r,i={},a=null;if(null!=t)for(r in void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];i.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return w(e,a,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:B}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=_.T,n={};_.T=n;try{var r=e(),i=_.S;null!==i&&i(n,r),"object"===typeof r&&null!==r&&"function"===typeof r.then&&r.then(F,T)}catch(a){T(a)}finally{null!==t&&null!==n.types&&(t.types=n.types),_.T=t}},t.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},t.use=function(e){return _.H.use(e)},t.useActionState=function(e,t,n){return _.H.useActionState(e,t,n)},t.useCallback=function(e,t){return _.H.useCallback(e,t)},t.useContext=function(e){return _.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return _.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return _.H.useEffect(e,t)},t.useEffectEvent=function(e){return _.H.useEffectEvent(e)},t.useId=function(){return _.H.useId()},t.useImperativeHandle=function(e,t,n){return _.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return _.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return _.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return _.H.useMemo(e,t)},t.useOptimistic=function(e,t){return _.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return _.H.useReducer(e,t,n)},t.useRef=function(e){return _.H.useRef(e)},t.useState=function(e){return _.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return _.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return _.H.useTransition()},t.version="19.2.3"},294(e,t,n){var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(222)),i=n(146);function a(e,t){var n={};return e&&"string"===typeof e?((0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n):n}a.default=a,e.exports=a},391(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4)},555(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?s(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}n.d(t,{A:()=>o})},579(e,t,n){e.exports=n(799)},672(e,t,n){var r=n(43);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");var l=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){return"font"===e?"":"string"===typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=s.p;try{if(l.T=null,s.p=2,e)return e()}finally{l.T=t,s.p=n,s.d.f()}},t.preconnect=function(e,t){"string"===typeof e&&(t?t="string"===typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,s.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&s.d.D(e)},t.preinit=function(e,t){if("string"===typeof e&&t&&"string"===typeof t.as){var n=t.as,r=u(n,t.crossOrigin),i="string"===typeof t.integrity?t.integrity:void 0,a="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?s.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:a}):"script"===n&&s.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:a,nonce:"string"===typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"===typeof e)if("object"===typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=u(t.as,t.crossOrigin);s.d.M(e,{crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0})}}else null==t&&s.d.M(e)},t.preload=function(e,t){if("string"===typeof e&&"object"===typeof t&&null!==t&&"string"===typeof t.as){var n=t.as,r=u(n,t.crossOrigin);s.d.L(e,n,{crossOrigin:r,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0,type:"string"===typeof t.type?t.type:void 0,fetchPriority:"string"===typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"===typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"===typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"===typeof t.imageSizes?t.imageSizes:void 0,media:"string"===typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"===typeof e)if(t){var n=u(t.as,t.crossOrigin);s.d.m(e,{as:"string"===typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0})}else s.d.m(e)},t.requestFormReset=function(e){s.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.2.3"},722(e,t,n){n.d(t,{A:()=>Et});var r={};function i(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>ce,hasStandardBrowserEnv:()=>he,hasStandardBrowserWebWorkerEnv:()=>pe,navigator:()=>de,origin:()=>fe});const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:o,toStringTag:l}=Symbol,u=(c=Object.create(null),e=>{const t=a.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const d=e=>(e=e.toLowerCase(),t=>u(t)===e),h=e=>t=>typeof t===e,{isArray:p}=Array,f=h("undefined");function m(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=d("ArrayBuffer");const v=h("string"),y=h("function"),D=h("number"),b=e=>null!==e&&"object"===typeof e,x=e=>{if("object"!==u(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(l in e)&&!(o in e)},C=d("Date"),F=d("File"),_=d("Blob"),k=d("FileList"),w=d("URLSearchParams"),[E,j,A,S]=["ReadableStream","Request","Response","Headers"].map(d);function N(e,t){let n,r,{allOwnKeys:i=!1}
2=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),p(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{if(m(e))return;const r=i?Object.getOwnPropertyNames(e):Object.keys(e),a=r.length;let s;for(n=0;n<a;n++)s=r[n],t.call(null,e[s],s,e)}}function B(e,t){if(m(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const T="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:n.g,P=e=>!f(e)&&e!==T;const L=(R="undefined"!==typeof Uint8Array&&s(Uint8Array),e=>R&&e instanceof R);var R;const z=d("HTMLFormElement"),O=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),M=d("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};N(n,(n,i)=>{let a;!1!==(a=t(n,i,e))&&(r[i]=a||n)}),Object.defineProperties(e,r)};const U=d("AsyncFunction"),$=((e,t)=>{return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],T.addEventListener("message",e=>{let{source:t,data:i}=e;t===T&&i===n&&r.length&&r.shift()()},!1),e=>{r.push(e),T.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,y(T.postMessage)),W="undefined"!==typeof queueMicrotask?queueMicrotask.bind(T):"undefined"!==typeof process&&process.nextTick||$,H={isArray:p,isArrayBuffer:g,isBuffer:m,isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||y(e.append)&&("formdata"===(t=u(e))||"object"===t&&y(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:v,isNumber:D,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:x,isEmptyObject:e=>{if(!b(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(Lt){return!1}},isReadableStream:E,isRequest:j,isResponse:A,isHeaders:S,isUndefined:f,isDate:C,isFile:F,isBlob:_,isRegExp:M,isFunction:y,isStream:e=>b(e)&&y(e.pipe),isURLSearchParams:w,isTypedArray:L,isFileList:k,forEach:N,merge:function e(){const{caseless:t,skipUndefined:n}=P(this)&&this||{},r={},i=(i,a)=>{const s=t&&B(r,a)||a;x(r[s])&&x(i)?r[s]=e(r[s],i):x(i)?r[s]=e({},i):p(i)?r[s]=i.slice():n&&f(i)||(r[s]=i)};for(let a=0,s=arguments.length;a<s;a++)arguments[a]&&N(arguments[a],i);return r},extend:function(e,t,n){let{allOwnKeys:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return N(t,(t,r)=>{n&&y(t)?e[r]=i(t,n):e[r]=t},{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,o;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],r&&!r(o,e,t)||l[o]||(t[o]=e[o],l[o]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!D(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[o]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:z,hasOwnProperty:O,hasOwnProp:O,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];y(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:B,global:T,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[l]&&e[o])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(m(e))return e;if(!("toJSON"in e)){t[r]=e;const i=p(e)?[]:{};return N(e,(e,t)=>{const a=n(e,r+1);!f(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:U,isThenable:e=>e&&(b(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:$,asap:W,isIterable:e=>null!=e&&y(e[o])};function q(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const V=q.prototype,G={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","E
2RR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{G[e]={value:e}}),Object.defineProperties(q,G),Object.defineProperty(V,"isAxiosError",{value:!0}),q.from=(e,t,n,r,i,a)=>{const s=Object.create(V);H.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const o=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return q.call(s,o,l,n,r,i),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};const K=q;function Y(e){return H.isPlainObject(e)||H.isArray(e)}function Q(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,n){return e?e.concat(t).map(function(e,t){return e=Q(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const X=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});const Z=function(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!H.isUndefined(t[e])})).metaTokens,i=n.visitor||u,a=n.dots,s=n.indexes,o=(n.Blob||"undefined"!==typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!o&&H.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?o&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let o=e;if(e&&!i&&"object"===typeof e)if(H.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&function(e){return H.isArray(e)&&!e.some(Y)}(e)||(H.isFileList(e)||H.endsWith(n,"[]"))&&(o=H.toArray(e)))return n=Q(n),o.forEach(function(e,r){!H.isUndefined(e)&&null!==e&&t.append(!0===s?J([n],r,a):null===s?n:n+"[]",l(e))}),!1;return!!Y(e)||(t.append(J(i,n,a),l(e)),!1)}const c=[],d=Object.assign(X,{defaultVisitor:u,convertValue:l,isVisitable:Y});if(!H.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!H.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),H.forEach(n,function(n,a){!0===(!(H.isUndefined(n)||null===n)&&i.call(t,n,H.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])}),c.pop()}}(e),t};function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function te(e,t){this._pairs=[],e&&Z(e,this,t)}const ne=te.prototype;ne.append=function(e,t){this._pairs.push([e,t])},ne.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const re=te;function ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||ie;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(a=i?i(t,n):H.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const se=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(t){null!==t&&e(t)})}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var le=n(555);const ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ce="undefined"!==typeof window&&"undefined"!==typeof document,de="object"===typeof navigator&&navigator||void 0,he=ce&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),pe="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,fe=ce&&window.location.href||"http://localhost",me=(0,le.A)((0,le.A)({},r),ue);const ge=function(e){function t(e,n,r,i){let a=e[i++];if("__proto__"===a)return!0;const s=Number.isFinite(+a),o=i>=e.length;if(a=!a&&H.isArray(r)?r.length:a,o)return H.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!s;r[a]&&H.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],i)&&H.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}(r[a])),!s}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(e,r)=>{t(function(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null};const ve={transitional:oe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=H.isObject(e);i&&H.isHTMLForm(e)&&(e=new FormData(e));if(H.isFormData(e))return r?JSON.stringify(ge(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new me.classes.URLSearchParams,(0,le.A)({visitor:function(e,t,n,r){return me.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}
vendor: 4,488 bytes, line 2
2(e,this.formSerializer).toString();if((a=H.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(Lt){if("SyntaxError"!==Lt.name)throw Lt}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ve.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(Lt){if(n){if("SyntaxError"===Lt.name)throw K.from(Lt,K.ERR_BAD_RESPONSE,this,null,this.response);throw Lt}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ve.headers[e]={}});const ye=ve,De=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),be=Symbol("internals");function xe(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return!1===e||null==e?e:H.isArray(e)?e.map(Ce):String(e)}function Fe(e,t,n,r,i){return H.isFunction(r)?r.call(this,t,n):(i&&(t=n),H.isString(t)?H.isString(r)?-1!==t.indexOf(r):H.isRegExp(r)?r.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=xe(t);if(!i)throw new Error("header name must be a non-empty string");const a=H.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Ce(e))}const a=(e,t)=>H.forEach(e,(e,n)=>i(e,n,t));if(H.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(H.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&De[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(H.isObject(e)&&H.isIterable(e)){let n,r,i={};for(const t of e){if(!H.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?H.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=xe(e)){const n=H.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(H.isFunction(t))return t.call(this,e,n);if(H.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=xe(e)){const n=H.findKey(this,e);return!(!n||void 0===this[n]||t&&!Fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=xe(e)){const i=H.findKey(n,e);!i||t&&!Fe(0,n[i],i,t)||(delete n[i],r=!0)}}return H.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Fe(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return H.forEach(this,(r,i)=>{const a=H.findKey(n,i);if(a)return t[a]=Ce(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();s!==i&&delete t[i],t[s]=Ce(r),n[s]=!0}),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return H.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&H.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(e=>{let[t,n]=e;return t+": "+n}).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];
2return r.forEach(e=>t.set(e)),t}static accessor(e){const t=(this[be]=this[be]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=xe(e);t[r]||(!function(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(_e.prototype,(e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}}),H.freezeMethods(_e);const ke=_e;function we(e,t){const n=this||ye,r=t||n,i=ke.from(r.headers);let a=r.data;return H.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Ee(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){K.call(this,null==e?"canceled":e,K.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(je,K,{__CANCEL__:!0});const Ae=je;function Se(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ne=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,a=0,s=0;return t=void 0!==t?t:1e3,function(o){const l=Date.now(),u=r[s];i||(i=l),n[a]=o,r[a]=l;let c=s,d=0;for(;c!==a;)d+=n[c++],c%=e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),l-i<t)return;const h=u&&l-u;return h?Math.round(1e3*d/h):void 0}};const Be=function(e,t){let n,r,i=0,a=1e3/t;const s=function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[function(){const e=Date.now(),t=e-i;for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];t>=a?s(l,e):(n=l,r||(r=setTimeout(()=>{r=null,s(n)},a-t)))},()=>n&&s(n)]},Te=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const i=Ne(50,250);return Be(n=>{const a=n.loaded,s=n.lengthComputable?n.total:void 0,o=a-r,l=i(o);r=a;e({loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},Pe=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Le=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return H.asap(()=>e(...n))},Re=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,ze=me.hasStandardBrowserEnv?{write(e,t,n,r,i,a,s){if("undefined"===typeof document)return;const o=["".concat(e,"=").concat(encodeURIComponent(t))];H.isNumber(n)&&o.push("expires=".concat(new Date(n).toUTCString())),H.isString(r)&&o.push("path=".concat(r)),H.isString(i)&&o.push("domain=".concat(i)),!0===a&&o.push("secure"),H.isString(s)&&o.push("SameSite=".concat(s)),document.cookie=o.join("; ")},read(e){if("undefined"===typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Oe(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Me=e=>e instanceof ke?(0,le.A)({},e):e;function Ie(e,t){t=t||{};const n={};function r(e,t,n,r){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:r},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function i(e,t,n,i){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function a(e,t){if(!H.isUndefined(t))return r(void 0,t)}function s(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function o(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(e,t,n)=>i(Me(e),Me(t),0,!0)};return H.forEach(Object.keys((0,le.A)((0,le.A)({},e),t)),function(r){const a=l[r]||i,s=a(e[r],t[r],r);H.isUndefined(s)&&a!==o||(n[r]=s)}),n}const Ue=e=>{const t=Ie({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:o}=t;if(t.headers=s=ke.from(s),t.url=ae(Oe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),H.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(H.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];
2Object.entries(e).forEach(e=>{let[n,r]=e;t.includes(n.toLowerCase())&&s.set(n,r)})}if(me.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||!1!==r&&Re(t.url))){const e=i&&a&&ze.read(a);e&&s.set(i,e)}return t},$e="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ue(e);let i=r.data;const a=ke.from(r.headers).normalize();let s,o,l,u,c,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=r;function f(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=ke.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Se(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new K("Request aborted",K.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",i=new K(r,K.ERR_NETWORK,e,m);i.event=t||null,n(i),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||oe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new K(t,i.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,m)),m=null},void 0===i&&a.setContentType(null),"setRequestHeader"in m&&H.forEach(a.toJSON(),function(e,t){m.setRequestHeader(t,e)}),H.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,c]=Te(p,!0),m.addEventListener("progress",l)),h&&m.upload&&([o,u]=Te(h),m.upload.addEventListener("progress",o),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new Ae(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===me.protocols.indexOf(v)?n(new K("Unsupported protocol "+v+":",K.ERR_BAD_REQUEST,e)):m.send(i||null)})},We=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof K?t:new Ae(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,i(new K("timeout ".concat(t," of ms exceeded"),K.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:o}=r;return o.unsubscribe=()=>H.asap(s),o}};function He(e,t){this.v=e,this.k=t}function qe(e){return function(){return new Ve(e.apply(this,arguments))}}function Ve(e){var t,n;function r(t,n){try{var a=e[t](n),s=a.value,o=s instanceof He;Promise.resolve(o?s.v:s).then(function(n){if(o){var l="return"===t?"return":"next";if(!s.k||n.done)return r(l,n);n=e[l](n).value}i(a.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,s){var o={key:e,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(t=n=o,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function Ge(e){return new He(e,0)}function Ke(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new He(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}
2),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Ye(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Qe(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Qe(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return Qe=function(e){this.s=e,this.n=e.next},Qe.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Qe(e)}Ve.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ve.prototype.next=function(e){return this._invoke("next",e)},Ve.prototype.throw=function(e){return this._invoke("throw",e)},Ve.prototype.return=function(e){return this._invoke("return",e)};const Je=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},Xe=function(){var e=qe(function*(e,t){var n,r=!1,i=!1;try{for(var a,s=Ye(Ze(e));r=!(a=yield Ge(s.next())).done;r=!1){const e=a.value;yield*Ke(Ye(Je(e,t)))}}catch(o){i=!0,n=o}finally{try{r&&null!=s.return&&(yield Ge(s.return()))}finally{if(i)throw n}}});return function(t,n){return e.apply(this,arguments)}}(),Ze=function(){var e=qe(function*(e){if(e[Symbol.asyncIterator])return void(yield*Ke(Ye(e)));const t=e.getReader();try{for(;;){const{done:e,value:n}=yield Ge(t.read());if(e)break;yield n}}finally{yield Ge(t.cancel())}});return function(t){return e.apply(this,arguments)}}(),et=(e,t,n,r)=>{const i=Xe(e,t);let a,s=0,o=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return o(),void e.close();let a=r.byteLength;if(n){let e=s+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw o(t),t}},cancel:e=>(o(e),i.return())},{highWaterMark:2})},{isFunction:tt}=H,nt=(e=>{let{Request:t,Response:n}=e;return{Request:t,Response:n}})(H.global),{ReadableStream:rt,TextEncoder:it}=H.global,at=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return!!e(...n)}catch(Lt){return!1}},st=e=>{e=H.merge.call({skipUndefined:!0},nt,e);const{fetch:t,Request:n,Response:r}=e,i=t?tt(t):"function"===typeof fetch,a=tt(n),s=tt(r);if(!i)return!1;const o=i&&tt(rt),l=i&&("function"===typeof it?(u=new it,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const c=a&&o&&at(()=>{let e=!1;const t=new n(me.origin,{body:new rt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&o&&at(()=>H.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new K("Response type '".concat(e,"' is not supported"),K.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:i,method:s,data:o,signal:l,cancelToken:u,timeout:f,onDownloadProgress:m,onUploadProgress:g,responseType:v,headers:y,withCredentials:D="same-origin",fetchOptions:b}=Ue(e),x=t||fetch;v=v?(v+"").toLowerCase():"text";let C=We([l,u&&u.toAbortSignal()],f),F=null;const _=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let k;try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(k=await p(y,o))){let e,t=new n(i,{method:"POST",body:o,duplex:"half"});if(H.isFormData(o)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=Pe(k,Te(Le(g)));o=et(t.body,65536,e,n)}}H.isString(D)||(D=D?"include":"omit");const t=a&&"credentials"in n.prototype,l=(0,le.A)((0,le.A)({},b),{},{signal:C,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:o,duplex:"half",credentials:t?D:void 0});F=a&&new n(i,l);let u=await(a?x(F,b):x(i,l));const f=d&&("stream"===v||"response"===v);if(d&&(m||f&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=H.toFiniteNumber(u.headers.get("content-length")),[n,i]=m&&Pe(t,Te(Le(m),!0))||[];u=new r(et(u.body,65536,n,()=>{i&&i(),_&&_()}),e)}v=v||"text";let w=await h[H.findKey(h,v)||"text"](u,e);return!f&&_&&_(),await new Promise((t,n)=>{Se(t,n,{data:w,headers:ke.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:F})})}catch(w){if(_&&_(),w&&"TypeError"===w.name&&/Load failed|fetch/i.test(w.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,F),{cause:w.cause||w});throw K.from(w,w&&w.code,e,F)}}},ot=new Map,lt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let s,o,l=a.length,u=ot;for(;l--;)s=a[l],o=u.get(s),void 0===o&&u.set(s,o=l?new Map:st(t)),u=o;return o},ut=(lt(),{http:null,xhr:$e,fetch:{get:lt}});H.forEach(ut,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Lt){}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>"- ".concat(e),dt=e=>H.isFunction(e)||null===e||!1===e;
2const ht={getAdapter:function(e,t){e=H.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let s=0;s<n;s++){let n;if(r=e[s],i=r,!dt(r)&&(i=ut[(n=String(r)).toLowerCase()],void 0===i))throw new K("Unknown adapter '".concat(n,"'"));if(i&&(H.isFunction(i)||(i=i.get(t))))break;a[n||"#"+s]=i}if(!i){const e=Object.entries(a).map(e=>{let[t,n]=e;return"adapter ".concat(t," ")+(!1===n?"is not supported by the environment":"is not available in the build")});let t=n?e.length>1?"since :\n"+e.map(ct).join("\n"):" "+ct(e[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i},adapters:ut};function pt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function ft(e){pt(e),e.headers=ke.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ht.getAdapter(e.adapter||ye.adapter,e)(e).then(function(t){return pt(e),t.data=we.call(e,e.transformResponse,t),t.headers=ke.from(t.headers),t},function(t){return Ee(t)||(pt(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=ke.from(t.response.headers))),Promise.reject(t)})}const mt="1.13.2",gt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const vt={};gt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+mt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,a)=>{if(!1===e)throw new K(r(i," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!vt[i]&&(vt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},gt.spelling=function(e){return(t,n)=>(console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0)};const yt={assertOptions:function(e,t,n){if("object"!==typeof e)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],s=t[a];if(s){const t=e[a],n=void 0===t||s(t,a,e);if(!0!==n)throw new K("option "+a+" must be "+n,K.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new K("Unknown option "+a,K.ERR_BAD_OPTION)}},validators:gt},Dt=yt.validators;class bt{constructor(e){this.defaults=e||{},this.interceptors={request:new se,response:new se}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(Lt){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Ie(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&yt.assertOptions(n,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=r&&(H.isFunction(r)?t.paramsSerializer={serialize:r}:yt.assertOptions(r,{encode:Dt.function,serialize:Dt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),yt.assertOptions(t,{baseUrl:Dt.spelling("baseURL"),withXsrfToken:Dt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&H.merge(i.common,i[t.method]);i&&H.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=ke.concat(a,i);const s=[];let o=!0;this.interceptors.request.forEach(function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!o){const e=[ft.bind(this),void 0];for(e.unshift(...s),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=s.length;let h=t;for(;d<c;){const e=s[d++],t=s[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{u=ft.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return ae(Oe((e=Ie(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}
2H.forEach(["delete","get","head","options"],function(e){bt.prototype[e]=function(t,n){return this.request(Ie(n||{},{method:e,url:t,data:(n||{}).data}))}}),H.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(Ie(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}bt.prototype[e]=t(),bt.prototype[e+"Form"]=t(!0)});const xt=bt;class Ct{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Ae(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new Ct(function(t){e=t});return{token:t,cancel:e}}}const Ft=Ct;const _t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
2alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_t).forEach(e=>{let[t,n]=e;_t[n]=t});const kt=_t;const wt=function e(t){const n=new xt(t),r=i(xt.prototype.request,n);return H.extend(r,xt.prototype,n,{allOwnKeys:!0}),H.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ie(t,n))},r}(ye);wt.Axios=xt,wt.CanceledError=Ae,wt.CancelToken=Ft,wt.isCancel=Ee,wt.VERSION=mt,wt.toFormData=Z,wt.AxiosError=K,wt.Cancel=wt.CanceledError,wt.all=function(e){return Promise.all(e)},wt.spread=function(e){return function(t){return e.apply(null,t)}},wt.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},wt.mergeConfig=Ie,wt.AxiosHeaders=ke,wt.formToJSON=e=>ge(H.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=ht.getAdapter,wt.HttpStatusCode=kt,wt.default=wt;const Et=wt},768(e,t,n){n.d(t,{K:()=>o,http:()=>s,n:()=>a});var r=n(722);const i=function(){const e="https://govidhya.com".replace(/\/$/,"");if("undefined"===typeof window)return e;if(!e)return"";try{const t=new URL(e).host,n=window.location.host;return t===n||(/^localhost(:\d+)?$/i.test(n)||/^127\.0\.0\.1(:\d+)?$/.test(n))?e:""}catch(Lt){return e}}(),a="".concat(i,"/api"),s=r.A.create({baseURL:a});function o(e){var t,n,r;if(e&&!e.response)return"ECONNABORTED"===e.code?"That took too long. Please check your connection and try again.":"Network Error"===e.message?"Can't reach Vidhya right now. Check your connection and try again.":"We hit a snag connecting. Please try again in a moment.";const i=null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status;if(502===i||503===i||504===i)return"Vidhya is briefly unavailable. Please try again in a moment.";if(429===i)return"You're going a bit fast \u2014 give it a few seconds and try again.";if(500===i)return"Something went wrong on our end. Please try again \u2014 if it persists, ping support.";const a=null===e||void 0===e||null===(n=e.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail;if(!a)return(null===e||void 0===e?void 0:e.message)||"Something went wrong.";if("string"===typeof a)return a;if(Array.isArray(a))return a.map(e=>null!==e&&void 0!==e&&e.msg?e.msg:JSON.stringify(e)).join(" ");if(null!==a&&void 0!==a&&a.message)return a.message;if(null!==a&&void 0!==a&&a.msg)return a.msg;if(null!==a&&void 0!==a&&a.error)return a.error;try{return JSON.stringify(a)}catch(s){return"Something went wrong."}}s.interceptors.request.use(e=>{const t=localStorage.getItem("sa_token");return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),s.interceptors.response.use(e=>e,e=>{var t;if(401===(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status)){const e=window.location.pathname;"/login"!==e&&"/register"!==e&&(localStorage.removeItem("sa_token"),window.location.href="/login")}return Promise.reject(e)})},799(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i},853(e,t,n){e.exports=n(896)},896(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var o=2*(r+1)-1,l=e[o],u=o+1,c=e[u];if(0>a(l,n))u<i&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],c=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,v=!1,y="function"===typeof setTimeout?setTimeout:null,D="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function C(e){if(g=!1,x(e),!m)if(null!==r(u))m=!0,_||(_=!0,F());else{var t=r(c);null!==t&&B(C,t.startTime-e)}}var F,_=!1,k=-1,w=5,E=-1;function j(){return!!v||!(t.unstable_now()-E<w)}function A(){if(v=!1,_){var e=t.unstable_now();E=e;var n=!0;try{e:{m=!1,g&&(g=!1,D(k),k=-1),f=!0;var a=p;try{t:{for(x(e),h=r(u);null!==h&&!(h.expirationTime>e&&j());){var s=h.callback;if("function"===typeof s){h.callback=null,p=h.priorityLevel;var o=s(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof o){h.callback=o,x(e),n=!0;break t}h===r(u)&&i(u),x(e)}else i(u);h=r(u)}if(null!==h)n=!0;else{var l=r(c);null!==l&&B(C,l.startTime-e),n=!1}}break e}finally{h=null,p=a,f=!1}n=void 0}}finally{n?F():_=!1}}}if("function"===typeof b)F=function(){b(A)};else if("undefined"!==typeof MessageChannel){var S=new MessageChannel,N=S.port2;S.port1.onmessage=A,F=function(){N.postMessage(null)}}else F=function(){y(A,0)};function B(e,n){k=y(function(){e(t.unstable_now())},n)}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(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>s?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(D(k),k=-1):g=!0,B(C,a-s))):(e.sortIndex=o,n(u,e),m||f||(m=!0,_||(_=!0,F()))),e},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},950(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(672)}},t={};function n(r){var i=t[r];
2if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var a=Object.create(null);n.r(a);var s={};e=e||[null,t({}),t([]),t(t)];for(var o=2&i&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>s[e]=()=>r[e]);return s.default=()=>r,n.d(a,s),a}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(Lt){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/";var r={};n.r(r),n.d(r,{boolean:()=>cf,booleanish:()=>df,commaOrSpaceSeparated:()=>gf,commaSeparated:()=>mf,number:()=>pf,overloadedBoolean:()=>hf,spaceSeparated:()=>ff});var i={};n.r(i),n.d(i,{attentionMarkers:()=>Vg,contentInitial:()=>Ig,disable:()=>Gg,document:()=>Mg,flow:()=>$g,flowInitial:()=>Ug,insideSpan:()=>qg,string:()=>Wg,text:()=>Hg});var a=n(43),s=n.t(a,2),o=n(391);function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=n(555);const c=["sri"],d=["page"],h=["page","matches"],p=["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition","unstable_defaultShouldRevalidate"],f=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],m=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition","unstable_defaultShouldRevalidate"];var g="popstate";function v(){return _(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return x("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:C(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function y(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function D(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(Lt){}}}function b(e,t){return{usr:e.state,key:e.key,idx:t}}function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return(0,u.A)((0,u.A)({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?F(t):t),{},{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function C(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function F(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o="POP",l=null,c=d();function d(){return(s.state||{idx:null}).idx}function h(){o="POP";let e=d(),t=null==e?null:e-c;c=e,l&&l({action:o,location:f.location,delta:t})}function p(e){return k(e)}null==c&&(c=0,s.replaceState((0,u.A)((0,u.A)({},s.state),{},{idx:c}),""));let f={get action(){return o},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(g,h),l=e,()=>{i.removeEventListener(g,h),l=null}},createHref:e=>
2t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){o="PUSH";let r=x(f.location,e,t);n&&n(r,e),c=d()+1;let u=b(r,c),h=f.createHref(r);try{s.pushState(u,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}a&&l&&l({action:o,location:f.location,delta:1})},replace:function(e,t){o="REPLACE";let r=x(f.location,e,t);n&&n(r,e),c=d();let i=b(r,c),u=f.createHref(r);s.replaceState(i,"",u),a&&l&&l({action:o,location:f.location,delta:0})},go:e=>s.go(e)};return f}function k(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),y(n,"No window.location.(origin|href) available to create URL");let r="string"===typeof e?e:C(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}new WeakMap;function w(e,t){return E(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function E(e,t,n,r){let i=$(("string"===typeof t?F(t):t).pathname||"/",n);if(null==i)return null;let a=j(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let s=null;for(let o=0;null==s&&o<a.length;++o){let e=U(i);s=O(a[o],e,r)}return s}function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function(e,a){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,o=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&s)return;y(l.relativePath.startsWith(r),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(r,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),l.relativePath=l.relativePath.slice(r.length)}let u=Q([r,l.relativePath]),c=n.concat(l);e.children&&e.children.length>0&&(y(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(u,'".')),j(e.children,t,c,u,s)),(null!=e.path||e.index)&&t.push({path:u,score:z(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let r of A(e.path))a(e,t,!0,r);else a(e,t)}),t}function A(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let s=A(r.join("/")),o=[];return o.push(...s.map(e=>""===e?a:[a,e].join("/"))),i&&o.push(...s),o.map(t=>e.startsWith("/")&&""===t?"/":t)}var S=/^:[\w-]+$/,N=3,B=2,T=1,P=10,L=-2,R=e=>"*"===e;function z(e,t){let n=e.split("/"),r=n.length;return n.some(R)&&(r+=L),t&&(r+=B),n.filter(e=>!R(e)).reduce((e,t)=>e+(S.test(t)?N:""===t?T:P),r)}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,i={},a="/",s=[];for(let o=0;o<r.length;++o){let e=r[o],l=o===r.length-1,u="/"===a?t:t.slice(a.length)||"/",c=M({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=M({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;
2Object.assign(i,c.params),s.push({params:i,pathname:Q([a,c.pathname]),pathnameBase:J(Q([a,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(a=Q([a,c.pathnameBase]))}return s}function M(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=I(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1),l=r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=o[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=o[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:a,pathnameBase:s,pattern:e}}function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];D("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function U(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return D(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function $(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var W=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,H=e=>W.test(e);function q(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function V(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"].  Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function G(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function K(e){let t=G(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Y(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=F(e):(r=(0,u.A)({},e),y(!r.pathname||!r.pathname.includes("?"),V("?","pathname","search",r)),y(!r.pathname||!r.pathname.includes("#"),V("#","pathname","hash",r)),y(!r.search||!r.search.includes("#"),V("#","search","hash",r)));let a,s=""===e||""===r.pathname,o=s?"/":r.pathname;if(null==o)a=n;else{let e=t.length-1;if(!i&&o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:r,search:i="",hash:a=""}="string"===typeof e?F(e):e;if(r)if(H(r))t=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),D(!1,"Pathnames cannot have embedded double slashes - normalizing ".concat(e," -> ").concat(r))}t=r.startsWith("/")?q(r.substring(1),"/"):q(r,n)}else t=n;return{pathname:t,search:X(i),hash:Z(a)}}(r,a),c=o&&"/"!==o&&o.endsWith("/"),d=(s||"."===o)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}var Q=e=>e.join("/").replace(/\/\/+/g,"/"),J=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var ee=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function te(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}function ne(e){return e.map(e=>
2e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var re="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function ie(e,t){let n=e;if("string"!==typeof n||!W.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(re)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),a=$(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:i=!0}catch(Lt){D(!1,'<Link to="'.concat(n,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:r,isExternal:i,to:n}}Symbol("Uninstrumented");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ae=["POST","PUT","PATCH","DELETE"],se=(new Set(ae),["GET",...ae]);new Set(se),Symbol("ResetLoaderData");var oe=a.createContext(null);oe.displayName="DataRouter";var le=a.createContext(null);le.displayName="DataRouterState";var ue=a.createContext(!1);function ce(){return a.useContext(ue)}var de=a.createContext({isTransitioning:!1});de.displayName="ViewTransition";var he=a.createContext(new Map);he.displayName="Fetchers";var pe=a.createContext(null);pe.displayName="Await";var fe=a.createContext(null);fe.displayName="Navigation";var me=a.createContext(null);me.displayName="Location";var ge=a.createContext({outlet:null,matches:[],isDataRoute:!1});ge.displayName="Route";var ve=a.createContext(null);ve.displayName="RouteError";var ye="REACT_ROUTER_ERROR";function De(){return null!=a.useContext(me)}function be(){return y(De(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(me).location}var xe="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ce(e){a.useContext(fe).static||a.useLayoutEffect(e)}function Fe(){let{isDataRoute:e}=a.useContext(ge);return e?function(){let{router:e}=Pe("useNavigate"),t=Re("useNavigate"),n=a.useRef(!1);Ce(()=>{n.current=!0});let r=a.useCallback(async function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(n.current,xe),n.current&&("number"===typeof r?await e.navigate(r):await e.navigate(r,(0,u.A)({fromRouteId:t},i)))},[e,t]);return r}():function(){y(De(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(oe),{basename:t,navigator:n}=a.useContext(fe),{matches:r}=a.useContext(ge),{pathname:i}=be(),s=JSON.stringify(K(r)),o=a.useRef(!1);Ce(()=>{o.current=!0});let l=a.useCallback(function(r){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(D(o.current,xe),!o.current)return;if("number"===typeof r)return void n.go(r);let l=Y(r,JSON.parse(s),i,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Q([t,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)},[t,n,s,i,e]);return l}()}a.createContext(null);function _e(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=a.useContext(ge),{pathname:r}=be(),i=JSON.stringify(K(n));return a.useMemo(()=>Y(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function ke(e,t,n,r,i){y(De(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=a.useContext(fe),{matches:o}=a.useContext(ge),l=o[o.length-1],c=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",p=l&&l.route;{let e=p&&p.path||"";Me(d,!p||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let f,m=be();if(t){var g;let e="string"===typeof t?F(t):t;y("/"===h||(null===(g=e.pathname)||void 0===g?void 0:g.startsWith(h)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(h,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),f=e}else f=m;let v=f.pathname||"/",b=v;if("/"!==h){let e=h.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=w(e,{pathname:b});D(p||null!=x,'No routes matched location "'.concat(f.pathname).concat(f.search).concat(f.hash,'" ')),D(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,'Matched leaf route at location "'.concat(f.pathname).concat(f.search).concat(f.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let C=Be(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Q([h,s.encodeLocation?s.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:Q([h,s.encodeLocation?s.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,n,r,i);return t&&C?a.createElement(me.Provider,{value:{location:(0,u.A)({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:"POP"}},C):C}function we(){let e=ze(),t=te(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=a.createElement(a.Fragment,null,a.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:s},"ErrorBoundary")," or"," ",a.createElement("code",{style:s},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application 
2Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),n?a.createElement("pre",{style:i},n):null,o)}var Ee=a.createElement(we,null),je=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"===typeof e&&e&&"digest"in e&&"string"===typeof e.digest){const t=function(e){if(e.startsWith("".concat(ye,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText)return new ee(t.status,t.statusText,t.data)}catch(t){}}(e.digest);t&&(e=t)}let t=void 0!==e?a.createElement(ge.Provider,{value:this.props.routeContext},a.createElement(ve.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?a.createElement(Se,{error:e},t):t}};je.contextType=ue;var Ae=new WeakMap;function Se(e){let{children:t,error:n}=e,{basename:r}=a.useContext(fe);if("object"===typeof n&&n&&"digest"in n&&"string"===typeof n.digest){let e=function(e){if(e.startsWith("".concat(ye,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"string"===typeof t.location&&"boolean"===typeof t.reloadDocument&&"boolean"===typeof t.replace)return t}catch(t){}}(n.digest);if(e){let t=Ae.get(n);if(t)throw t;let i=ie(e.location,r);if(re&&!Ae.get(n)){if(!i.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Ae.set(n,t),t}window.location.href=i.absoluteURL||i.to}return a.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(i.absoluteURL||i.to)})}}return t}function Ne(e){let{routeContext:t,match:n,children:r}=e,i=a.useContext(oe);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),a.createElement(ge.Provider,{value:t},r)}function Be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,s=null===n||void 0===n?void 0:n.errors;if(null!=s){let e=i.findIndex(e=>e.route.id&&void 0!==(null===s||void 0===s?void 0:s[e.route.id]));y(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(s).join(","))),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,l=-1;if(n)for(let a=0;a<i.length;a++){let e=i[a];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(l=a),e.route.id){let{loaderData:t,errors:r}=n,a=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||a){o=!0,i=l>=0?i.slice(0,l+1):[i[0]];break}}}let u=n&&r?(e,t)=>{var i,a;r(e,{location:n.location,params:null!==(i=null===(a=n.matches)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.params)&&void 0!==i?i:{},unstable_pattern:ne(n.matches),errorInfo:t})}:void 0;return i.reduceRight((e,r,c)=>{let d,h=!1,p=null,f=null;n&&(d=s&&r.route.id?s[r.route.id]:void 0,p=r.route.errorElement||Ee,o&&(l<0&&0===c?(Me("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,f=null):l===c&&(h=!0,f=r.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:h?f:r.route.Component?a.createElement(r.route.Component,null):r.route.element?r.route.element:e,a.createElement(Ne,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?a.createElement(je,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:g(),routeC
2ontext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}function Te(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function Pe(e){let t=a.useContext(oe);return y(t,Te(e)),t}function Le(e){let t=a.useContext(le);return y(t,Te(e)),t}function Re(e){let t=function(e){let t=a.useContext(ge);return y(t,Te(e)),t}(e),n=t.matches[t.matches.length-1];return y(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function ze(){var e;let t=a.useContext(ve),n=Le("useRouteError"),r=Re("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[r]}var Oe={};function Me(e,t,n){t||Oe[e]||(Oe[e]=!0,D(!1,n))}var Ie={};function Ue(e,t){e||Ie[t]||(Ie[t]=!0,console.warn(t))}s.useOptimistic;a.memo(function(e){let{routes:t,future:n,state:r,onError:i}=e;return ke(t,void 0,r,i,n)});function $e(e){let{to:t,replace:n,state:r,relative:i}=e;y(De(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=a.useContext(fe);D(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=a.useContext(ge),{pathname:l}=be(),u=Fe(),c=Y(t,K(o),l,"path"===i),d=JSON.stringify(c);return a.useEffect(()=>{u(JSON.parse(d),{replace:n,state:r,relative:i})},[u,d,i,n,r]),null}function We(e){y(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function He(e){let{basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:s,static:o=!1,unstable_useTransitions:l}=e;y(!De(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),c=a.useMemo(()=>({basename:u,navigator:s,static:o,unstable_useTransitions:l,future:{}}),[u,s,o,l]);"string"===typeof r&&(r=F(r));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:m="default"}=r,g=a.useMemo(()=>{let e=$(d,u);return null==e?null:{location:{pathname:e,search:h,hash:p,state:f,key:m},navigationType:i}},[u,d,h,p,f,m,i]);return D(null!=g,'<Router basename="'.concat(u,'"> is not able to match the URL "').concat(d).concat(h).concat(p,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==g?null:a.createElement(fe.Provider,{value:c},a.createElement(me.Provider,{children:n,value:g}))}function qe(e){let{children:t,location:n}=e;return ke(Ve(t),n)}a.Component;function Ve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return a.Children.forEach(e,(e,r)=>{if(!a.isValidElement(e))return;let i=[...t,r];if(e.type===a.Fragment)return void n.push.apply(n,Ve(e.props.children,i));y(e.type===We,"[".concat("string"===typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),y(!e.props.index||!e.props.children,"An index route cannot have child routes.");let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=Ve(e.props.children,i)),n.push(s)}),n}var Ge="get",Ke="application/x-www-form-urlencoded";function Ye(e){return"undefined"!==typeof HTMLElement&&e instanceof HTMLElement}var Qe=null;var Je=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xe(e){return null==e||Je.has(e)?e:(D(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Ke,'"')),null)}function Ze(e,t){let n,r,i,a,s;if(Ye(o=e)&&"form"===o.tagName.toLowerCase()){let s=e.getAttribute("action");r=s?$(s,t):null,n=e.getAttribute("method")||Ge,i=Xe(e.getAttribute("enctype"))||Ke,a=new FormData(e)}else if(function(e){return Ye(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ye(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=e.getAttribute("formaction")||s.getAttribute("action");if(r=o?$(o,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Ge,i=Xe(e.getAttribute("formenctype"))||Xe(s.getAttribute("enctype"))||Ke,a=new FormData(s,e),!function(){if(null===Qe)try{new FormData(document.createElement("form"),0),Qe=!1}catch(Lt){Qe=!0}return Qe}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?"".concat(t,"."):"";a.append("".concat(e,"x"),"0"),a.append("".concat(e,"y"),"0")}else t&&a.append(t,r)}}else{if(Ye(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ge,r=null,i=Ke,s=e}var o;return a&&"text/plain"===i&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!==typeof window?window:"undefined"!==typeof globalThis&&globalThis;function et(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}Symbol("SingleFetchRedirect");function tt(e,t,n){let r="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname="_root.".concat(n):t&&"/"===$(r.pathname,t)?r.pathname="".concat(t.replace(/\/$/,""),"/_root.").concat(n):r.pathname="".concat(r.pathname.replace(/\/$/,""),".").concat(n),r}async function nt(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error("Error loading route module `".concat(e.module,"`, reloading page...")),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.
2isSpaMode,window.location.reload(),new Promise(()=>{})}}function rt(e){return null!=e&&"string"===typeof e.page}function it(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"===typeof e.imageSrcSet&&"string"===typeof e.imageSizes:"string"===typeof e.rel&&"string"===typeof e.href)}function at(e,t,n,r,i,a){let s=(e,t)=>!n[t]||e.route.id!==n[t].route.id,o=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null===(r=n[t].route.path)||void 0===r?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===a?t.filter((e,t)=>s(e,t)||o(e,t)):"data"===a?t.filter((t,a)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(s(t,a)||o(t,a))return!0;if(t.route.shouldRevalidate){var u;let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null===(u=n[0])||void 0===u?void 0:u.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof r)return r}return!0}):[]}function st(e,t){let{includeHydrateFallback:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function ot(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!rt(i)&&"script"===i.as&&i.href&&r.has(i.href))return e;let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function lt(e,t){return"lazy"===e.mode&&!0===t}function ut(){let e=a.useContext(oe);return et(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ct(){let e=a.useContext(le);return et(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var dt=a.createContext(void 0);function ht(){let e=a.useContext(dt);return et(e,"You must render this element inside a <HydratedRouter> element"),e}function pt(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ft(e,t,n){if(n&&!yt)return[e[0]];if(t){let n=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,n+1)}return e}dt.displayName="FrameworkContext";function mt(e){let{page:t}=e,n=l(e,d),{router:r}=ut(),i=a.useMemo(()=>w(r.routes,t,r.basename),[r.routes,t,r.basename]);return i?a.createElement(vt,(0,u.A)({page:t,matches:i},n)):null}function gt(e){let{manifest:t,routeModules:n}=ht(),[r,i]=a.useState([]);return a.useEffect(()=>{let r=!1;return async function(e,t,n){return ot((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await nt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(it).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?(0,u.A)((0,u.A)({},e),{},{rel:"prefetch",as:"style"}):(0,u.A)((0,u.A)({},e),{},{rel:"prefetch"})))}(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function vt(e){let{page:t,matches:n}=e,r=l(e,h),i=be(),{manifest:s,routeModules:o}=ht(),{basename:c}=ut(),{loaderData:d,matches:p}=ct(),f=a.useMemo(()=>at(t,n,p,s,i,"data"),[t,n,p,s,i]),m=a.useMemo(()=>at(t,n,p,s,i,"assets"),[t,n,p,s,i]),g=a.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=new Set,r=!1;if(n.forEach(t=>{var n;let i=s.routes[t.route.id];i&&i.hasLoader&&(!f.some(e=>e.route.id===t.route.id)&&t.route.id in d&&null!==(n=o[t.route.id])&&void 0!==n&&n.shouldRevalidate||i.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let a=tt(t,c,"data");return r&&e.size>0&&a.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[a.pathname+a.search]},[c,d,i,s,f,n,t,o]),v=a.useMemo(()=>st(m,s),[m,s]),y=gt(m);return a.createElement(a.Fragment,null,g.map(e=>a.createElement("link",(0,u.A)({key:e,rel:"prefetch",as:"fetch",href:e},r))),v.map(e=>a.createElement("link",(0,u.A)({key:e,rel:"modulepreload",href:e},r))),y.map(e=>{let{key:t,link:n}=e;return a.createElement("link",(0,u.A)({key:t,nonce:r.nonce},n))}))}var yt=!1;function Dt(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:s,ssr:o}=ht(),{router:d,static:h,staticContext:p}=ut(),{matches:f}=ct(),m=ce(),g=lt(s,o);i&&(i.didRenderScripts=!0);let v=ft(f,null,r);a.useEffect(()=>{yt=!0},[]);let y=a.useMemo(()=>{var r;if(m)return null;let i=p?"window.__reactRouterContext = ".concat(n,";").concat("window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}
2).pipeThrough(new TextEncoderStream());"):" ",s=h?"".concat(null!==(r=t.hmr)&&void 0!==r&&r.runtime?"import ".concat(JSON.stringify(t.hmr.runtime),";"):"").concat(g?"":"import ".concat(JSON.stringify(t.url)),";\n").concat(v.map((e,n)=>{let r="route".concat(n),i=t.routes[e.route.id];et(i,"Route ".concat(e.route.id," not found in manifest"));let{clientActionModule:a,clientLoaderModule:s,clientMiddlewareModule:o,hydrateFallbackModule:l,module:u}=i,c=[...a?[{module:a,varName:"".concat(r,"_clientAction")}]:[],...s?[{module:s,varName:"".concat(r,"_clientLoader")}]:[],...o?[{module:o,varName:"".concat(r,"_clientMiddleware")}]:[],...l?[{module:l,varName:"".concat(r,"_HydrateFallback")}]:[],{module:u,varName:"".concat(r,"_main")}];return 1===c.length?"import * as ".concat(r," from ").concat(JSON.stringify(u),";"):[c.map(e=>"import * as ".concat(e.varName,' from "').concat(e.module,'";')).join("\n"),"const ".concat(r," = {").concat(c.map(e=>"...".concat(e.varName)).join(","),"};")].join("\n")}).join("\n"),"\n  ").concat(g?"window.__reactRouterManifest = ".concat(JSON.stringify(function(e,t){let{sri:n}=e,r=l(e,c),i=new Set(t.state.matches.map(e=>e.route.id)),a=t.state.location.pathname.split("/").filter(Boolean),s=["/"];for(a.pop();a.length>0;)s.push("/".concat(a.join("/"))),a.pop();s.forEach(e=>{let n=w(t.routes,e,t.basename);n&&n.forEach(e=>i.add(e.route.id))});let o=[...i].reduce((e,t)=>Object.assign(e,{[t]:r.routes[t]}),{});return(0,u.A)((0,u.A)({},r),{},{routes:o,sri:!!n||void 0})}(t,d),null,2),";"):"","\n  window.__reactRouterRouteModules = {").concat(v.map((e,t)=>"".concat(JSON.stringify(e.route.id),":route").concat(t)).join(","),"};\n\nimport(").concat(JSON.stringify(t.entry.module),");"):" ";return a.createElement(a.Fragment,null,a.createElement("script",(0,u.A)((0,u.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:void 0})),a.createElement("script",(0,u.A)((0,u.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:s},type:"module",async:!0})))},[]),D=yt||m?[]:(b=t.entry.imports.concat(st(v,t,{includeHydrateFallback:!0})),[...new Set(b)]);var b;let x="object"===typeof t.sri?t.sri:{};return Ue(!m,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),yt||m?null:a.createElement(a.Fragment,null,"object"===typeof t.sri?a.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:x})}}):null,g?null:a.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:x[t.url],suppressHydrationWarning:!0}),a.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:x[t.entry.module],suppressHydrationWarning:!0}),D.map(t=>a.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:x[t],suppressHydrationWarning:!0})),y)}function bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)})}}a.Component;function xt(e){let{error:t,isOutsideRemixApp:n}=e;console.error(t);let r,i=a.createElement("script",{dangerouslySetInnerHTML:{__html:'\n        console.log(\n          "\ud83d\udcbf Hey developer \ud83d\udc4b. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n        );\n      '}});if(te(t))return a.createElement(Ct,{title:"Unhandled Thrown Response!"},a.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),i);if(t instanceof Error)r=t;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);r=new Error(e)}return a.createElement(Ct,{title:"Application Error!",isOutsideRemixApp:n},a.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),a.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),i)}function Ct(e){var t;let{title:n,renderScripts:r,isOutsideRemixApp:i,children:s}=e,{routeModules:o}=ht();return null!==(t=o.root)&&void 0!==t&&t.Layout&&!i?s:a.createElement("html",{lang:"en"},a.createElement("head",null,a.createElement("meta",{charSet:"utf-8"}),a.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),a.createElement("title",null,n)),a.createElement("body",null,a.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},s,r?a.createElement(Dt,null):null)))}var Ft="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{Ft&&(window.__reactRouterVersion="7.11.0")}catch(Lt){}function _t(e){let{basename:t,children:n,unstable_useTransitions:r,
2window:i}=e,s=a.useRef();null==s.current&&(s.current=v({window:i,v5Compat:!0}));let o=s.current,[l,u]=a.useState({action:o.action,location:o.location}),c=a.useCallback(e=>{!1===r?u(e):a.startTransition(()=>u(e))},[r]);return a.useLayoutEffect(()=>o.listen(c),[o,c]),a.createElement(He,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:r})}var kt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wt=a.forwardRef(function(e,t){let{onClick:n,discover:r="render",prefetch:i="none",relative:s,reloadDocument:o,replace:c,state:d,target:h,to:f,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:v}=e,D=l(e,p),{basename:b,unstable_useTransitions:x}=a.useContext(fe),F="string"===typeof f&&kt.test(f),_=ie(f,b);f=_.to;let k=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y(De(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=a.useContext(fe),{hash:i,pathname:s,search:o}=_e(e,{relative:t}),l=s;return"/"!==n&&(l="/"===s?n:Q([n,s])),r.createHref({pathname:l,search:o,hash:i})}(f,{relative:s}),[w,E,j]=function(e,t){let n=a.useContext(dt),[r,i]=a.useState(!1),[s,o]=a.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:h}=t,p=a.useRef(null);a.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let f=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?"intent"!==e?[s,p,{}]:[s,p,{onFocus:pt(l,f),onBlur:pt(u,m),onMouseEnter:pt(c,f),onMouseLeave:pt(d,m),onTouchStart:pt(h,f)}]:[!1,p,{}]}(i,D),A=function(e){let{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=Fe(),d=be(),h=_e(e,{relative:s});return a.useCallback(p=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(p,t)){p.preventDefault();let t=void 0!==n?n:C(d)===C(h),f=()=>c(e,{replace:t,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:l});u?a.startTransition(()=>f()):f()}},[d,c,h,n,r,t,e,i,s,o,l,u])}(f,{replace:c,state:d,target:h,preventScrollReset:m,relative:s,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:x});let S=a.createElement("a",(0,u.A)((0,u.A)((0,u.A)({},D),j),{},{href:_.absoluteURL||k,onClick:_.isExternal||o?n:function(e){n&&n(e),e.defaultPrevented||A(e)},ref:bt(t,E),target:h,"data-discover":F||"render"!==r?void 0:"true"}));return w&&!F?a.createElement(a.Fragment,null,S,a.createElement(mt,{page:k})):S});wt.displayName="Link";var Et=a.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:i="",end:s=!1,style:o,to:c,viewTransition:d,children:h}=e,p=l(e,f),m=_e(c,{relative:p.relative}),g=be(),v=a.useContext(le),{navigator:D,basename:b}=a.useContext(fe),x=null!=v&&function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.useContext(de);y(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=St("useViewTransitionState"),i=_e(e,{relative:t});if(!n.isTransitioning)return!1;let s=$(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=$(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=M(i.pathname,o)||null!=M(i.pathname,s)}(m)&&!0===d,C=D.encodeLocation?D.encodeLocation(m).pathname:m.pathname,F=g.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(F=F.toLowerCase(),_=_?_.toLowerCase():null,C=C.toLowerCase()),_&&b&&(_=$(_,b)||_);const k="/"!==C&&C.endsWith("/")?C.length-1:C.length;let w,E=F===C||!s&&F.startsWith(C)&&"/"===F.charAt(k),j=null!=_&&(_===C||!s&&_.startsWith(C)&&"/"===_.charAt(C.length)),A={isActive:E,isPending:j,isTransitioning:x},S=E?n:void 0;w="function"===typeof i?i(A):[i,E?"active":null,j?"pending":null,x?"transitioning":null].filter(
2Boolean).join(" ");let N="function"===typeof o?o(A):o;return a.createElement(wt,(0,u.A)((0,u.A)({},p),{},{"aria-current":S,className:w,ref:t,style:N,to:c,viewTransition:d}),"function"===typeof h?h(A):h)});Et.displayName="NavLink";var jt=a.forwardRef((e,t)=>{let{discover:n="render",fetcherKey:r,navigate:i,reloadDocument:s,replace:o,state:c,method:d=Ge,action:h,onSubmit:p,relative:f,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:D}=e,b=l(e,m),{unstable_useTransitions:x}=a.useContext(fe),F=Tt(),_=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{basename:n}=a.useContext(fe),r=a.useContext(ge);y(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s=(0,u.A)({},_e(e||".",{relative:t})),o=be();if(null==e){s.search=o.search;let e=new URLSearchParams(s.search),t=e.getAll("index"),n=t.some(e=>""===e);if(n){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();s.search=n?"?".concat(n):""}}e&&"."!==e||!i.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(s.pathname="/"===s.pathname?n:Q([n,s.pathname]));return C(s)}(h,{relative:f}),k="get"===d.toLowerCase()?"get":"post",w="string"===typeof h&&kt.test(h);return a.createElement("form",(0,u.A)((0,u.A)({ref:t,method:k,action:_,onSubmit:s?p:e=>{if(p&&p(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null===t||void 0===t?void 0:t.getAttribute("formmethod"))||d,s=()=>F(t||e.currentTarget,{fetcherKey:r,method:n,navigate:i,replace:o,state:c,relative:f,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:D});x&&!1!==i?a.startTransition(()=>s()):s()}},b),{},{"data-discover":w||"render"!==n?void 0:"true"}))});function At(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function St(e){let t=a.useContext(oe);return y(t,At(e)),t}jt.displayName="Form";var Nt=0,Bt=()=>"__".concat(String(++Nt),"__");function Tt(){let{router:e}=St("useSubmit"),{basename:t}=a.useContext(fe),n=Re("useRouteId"),r=e.fetch,i=e.navigate;return a.useCallback(async function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{action:s,method:o,encType:l,formData:u,body:c}=Ze(e,t);if(!1===a.navigate){let e=a.fetcherKey||Bt();await r(e,n,a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:u,body:c,formMethod:a.method||o,formEncType:a.encType||l,flushSync:a.flushSync})}else await i(a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:u,body:c,formMethod:a.method||o,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}var Pt="undefined"!=typeof window?window:void 0,Lt="undefined"!=typeof globalThis?globalThis:Pt;"undefined"==typeof self&&(Lt.self=Lt),"undefined"==typeof File&&(Lt.File=function(){});var Rt=null==Lt?void 0:Lt.navigator,zt=null==Lt?void 0:Lt.document,Ot=null==Lt?void 0:Lt.location,Mt=null==Lt?void 0:Lt.fetch,It=null!=Lt&&Lt.XMLHttpRequest&&"withCredentials"in new Lt.XMLHttpRequest?Lt.XMLHttpRequest:void 0,Ut=null==Lt?void 0:Lt.AbortController,$t=null==Lt?void 0:Lt.CompressionStream,Wt=null==Rt?void 0:Rt.userAgent,Ht=null!=Pt?Pt:{},qt="1.395.0",Vt={DEBUG:!1,LIB_VERSION:qt,LIB_NAME:"web",JS_SDK_VERSION:qt};function Gt(e,t,n,r,i,a,s){try{var o=e[a](s),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function Kt(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function s(e){Gt(a,r,i,s,o,"next",e)}function o(e){Gt(a,r,i,s,o,"throw",e)}s(void 0)})}}function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yt.apply(null,arguments)}function Qt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var Jt=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(Lt){return e}};function Xt(e){return"string"==typeof e||e}function Zt(e){return"string"==typeof e?e:void 0}var en,tn=function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.LogsQueue="logs_queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e}({}),nn=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),rn=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],an=["token"],sn="NativeGzipValidationError",on=e=>e.length>=2&&31===e[0]&&139===e[1],ln=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),un=e=>
2{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=sn,t},cn=function(){var e=Kt(function*(e,t){18>e.size&&un("too-short");var n=new Uint8Array(yield e.slice(0,10).arrayBuffer());on(n)&&8===n[2]||un("invalid-header");var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(en)return en;en=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;en[e]=t>>>0}return en})(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&un("invalid-crc");var i=t.length>>>0;r.getUint32(4,!0)!==i&&un("invalid-size")});return function(t,n){return e.apply(this,arguments)}}();function dn(){return dn=Kt(function*(e,t,n){void 0===t&&(t=!0);try{var r=(new TextEncoder).encode(e),i=new CompressionStream("gzip"),a=i.writable.getWriter(),s=a.write(r).then(()=>a.close()).catch(function(){var e=Kt(function*(e){try{yield a.abort(e)}catch(e){}throw e});return function(t){return e.apply(this,arguments)}}()),o=new Response(i.readable).blob(),[l]=yield Promise.all([o,s]);return yield cn(l,r),l}catch(e){if(null!=n&&n.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}}),dn.apply(this,arguments)}var hn=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],pn=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return hn.concat(t).some(e=>{var t=e.toLowerCase();return-1!==n.indexOf(t)})};function fn(e,t){return-1!==e.indexOf(t)}var mn=function(e){return e.trim()},gn=function(e){return e.replace(/^\$/,"")},vn=Object.prototype,yn=vn.hasOwnProperty,Dn=vn.toString,bn=Array.isArray||function(e){return"[object Array]"===Dn.call(e)},xn=e=>"function"==typeof e,Cn=e=>e===Object(e)&&!bn(e),Fn=e=>{if(Cn(e)){for(var t in e)if(yn.call(e,t))return!1;return!0}return!1},_n=e=>void 0===e,kn=e=>"[object String]"==Dn.call(e),wn=e=>kn(e)&&0===e.trim().length,En=e=>null===e,jn=e=>_n(e)||En(e),An=e=>"[object Number]"==Dn.call(e)&&e==e,Sn=e=>An(e)&&e>0,Nn=e=>"[object Boolean]"===Dn.call(e),Bn=e=>fn(rn,e),Tn=e=>fn(an,e);function Pn(e){return null===e||"object"!=typeof e}function Ln(e,t){return{}.toString.call(e)==="[object "+t+"]"}function Rn(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var zn=[!0,"true",1,"1","yes"],On=e=>fn(zn,e),Mn=[!1,"false",0,"0","no"];function In(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),An(e)?e>n?(r.warn(" cannot be  greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),In(i||n,t,n,r))}class Un{constructor(e){this.Ee={},this.Pe=e.Pe,this.Fe=In(e.bucketSize,0,100,e.Ae),this.$e=In(e.refillRate,0,this.Fe,e.Ae),this.De=In(e.refillInterval,0,864e5,e.Ae)}Ne(e,t){var n=Math.floor((t-e.lastAccess)/this.De);n>0&&(e.tokens=Math.min(e.tokens+n*this.$e,this.Fe),e.lastAccess=e.lastAccess+n*this.De)}consumeRateLimit(e){var t,n=Date.now(),r=String(e),i=this.Ee[r];return i?this.Ne(i,n):this.Ee[r]=i={tokens:this.Fe,lastAccess:n},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this.Pe)||t.call(this,e)),0===i.tokens)}stop(){this.Ee={}}}var $n="Mobile",Wn="iOS",Hn="Android",qn="Tablet",Vn=Hn+" "+qn,Gn="iPad",Kn="Apple",Yn=Kn+" Watch",Qn="Safari",Jn="BlackBerry",Xn="Samsung",Zn=Xn+"Browser",er=Xn+" Internet",tr="Chrome",nr=tr+" OS",rr=tr+" "+Wn,ir="Internet Explorer",ar=ir+" "+$n,sr="Opera",or=sr+" Mini",lr="Edge",ur="Microsoft "+lr,cr="Firefox",dr=cr+" "+Wn,hr="Nintendo",pr="PlayStation",fr="Xbox",mr=Hn+" "+$n,gr=$n+" "+Qn,vr="Windows",yr=vr+" Phone",Dr="Nokia",br="Ouya",xr="Generic",Cr=xr+" "+$n.toLowerCase(),Fr=xr+" "+qn.toLowerCase(),_r="Konqueror",kr="Oculus Browser",wr="Vivaldi",Er="Yandex",jr="Whale",Ar="DuckDuckGo",Sr="Pale Moon",Nr="Waterfox",Br="Brave",Tr="Google Search App",Pr="(\\d+(\\.\\d+)?)",Lr=new RegExp("Version/"+Pr),Rr=new RegExp(fr,"i"),zr=new RegExp(pr+" \\w+","i"),Or=new RegExp(hr+" \\w+","i"),Mr=new RegExp(Jn+"|PlayBook|BB10","i"),Ir={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},Ur=function(e,t,n,r){t=t||"";var i=function(e){return null!=e&&e.brave?Br:null}(n);
2return i||(null!=r&&r.detectGoogleSearchApp&&fn(e,"GSA/")?Tr:fn(e," OPR/")&&fn(e,"Mini")?or:fn(e," OPR/")?sr:Mr.test(e)?Jn:fn(e,"IE"+$n)||fn(e,"WPDesktop")?ar:fn(e,"OculusBrowser")?kr:fn(e,Zn)?er:fn(e,lr)||fn(e,"Edg/")?ur:fn(e,wr+"/")?wr:fn(e,"YaBrowser/")?Er:fn(e,jr+"/")?jr:fn(e,Ar+"/")||fn(e,"Ddg/")?Ar:fn(e,"FBIOS")?"Facebook "+$n:fn(e,"UCWEB")||fn(e,"UCBrowser")?"UC Browser":fn(e,"CriOS")?rr:fn(e,"CrMo")||fn(e,tr)?tr:fn(e,Hn)&&fn(e,Qn)?mr:fn(e,"FxiOS")?dr:fn(e.toLowerCase(),_r.toLowerCase())?_r:fn(e,Br+"/")?Br:((e,t)=>t&&fn(t,Kn)||function(e){return fn(e,Qn)&&!fn(e,tr)&&!fn(e,Hn)}(e))(e,t)?fn(e,$n)?gr:Qn:fn(e,"PaleMoon/")?Sr:fn(e,Nr+"/")?Nr:fn(e,cr)?cr:fn(e,"MSIE")||fn(e,"Trident/")?ir:fn(e,"Gecko")?cr:"")},$r={[ar]:[new RegExp("rv:"+Pr)],[ur]:[new RegExp(lr+"?\\/"+Pr)],[tr]:[new RegExp("("+tr+"|CrMo)\\/"+Pr)],[rr]:[new RegExp("CriOS\\/"+Pr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Pr)],[Qn]:[Lr],[gr]:[Lr],[sr]:[new RegExp("(Opera|OPR)\\/"+Pr)],[cr]:[new RegExp(cr+"\\/"+Pr)],[dr]:[new RegExp("FxiOS\\/"+Pr)],[_r]:[new RegExp("Konqueror[:/]?"+Pr,"i")],[Jn]:[new RegExp(Jn+" "+Pr),Lr],[mr]:[new RegExp("android\\s"+Pr,"i")],[er]:[new RegExp(Zn+"\\/"+Pr)],[kr]:[new RegExp("OculusBrowser\\/"+Pr)],[wr]:[new RegExp(wr+"\\/"+Pr)],[Er]:[new RegExp("YaBrowser\\/"+Pr)],[jr]:[new RegExp(jr+"\\/"+Pr)],[Br]:[new RegExp(Br+"\\/"+Pr)],[Ar]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Pr)],[Sr]:[new RegExp("PaleMoon\\/"+Pr)],[Nr]:[new RegExp(Nr+"\\/"+Pr)],[Tr]:[new RegExp("GSA\\/"+Pr)],[ir]:[new RegExp("(rv:|MSIE )"+Pr)],Mozilla:[new RegExp("rv:"+Pr)]},Wr=function(e,t,n,r){var i=Ur(e,t,n,r),a=$r[i];if(_n(a))return null;for(var s=0;a.length>s;s++){var o=e.match(a[s]);if(o)return parseFloat(o[o.length-2])}return null},Hr=[[new RegExp(fr+"; "+fr+" (.*?)[);]","i"),e=>[fr,e&&e[1]||""]],[new RegExp(hr,"i"),[hr,""]],[new RegExp(pr,"i"),[pr,""]],[Mr,[Jn,""]],[new RegExp(vr,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[yr,""];if(new RegExp($n).test(t)&&!/IEMobile\b/.test(t))return[vr+" "+$n,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=Ir[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[vr,r]}return[vr,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Wn,[e[3],e[4],e[5]||"0"].join(".")]:[Wn,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=_n(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Hn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Hn+")","i"),e=>e&&e[2]?[Hn,[e[2],e[3],e[4]||"0"].join(".")]:[Hn,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[nr,""]],[/Linux|debian/i,["Linux",""]]],qr=function(e){return Or.test(e)?hr:zr.test(e)?pr:Rr.test(e)?fr:new RegExp(br,"i").test(e)?br:new RegExp("("+yr+"|WPDesktop)","i").test(e)?yr:/iPad/.test(e)?Gn:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Yn:Mr.test(e)?Jn:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Dr,"i").test(e)?Dr:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp($n).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Hn:Vn:new RegExp("(pda|"+$n+")","i").test(e)?Cr:new RegExp(qn,"i").test(e)&&!new RegExp(qn+" pc","i").test(e)?Fr:""},Vr=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Gr(e,t){return"string"==typeof(n=e)&&Vr.test(n)?e:t();var n}function Kr(e){return e?e.split("#")[0]:e}function Yr(e,t){var n=setTimeout(e,t);return(null==n?void 0:n.unref)&&(null==n||n.unref()),n}var Qr=e=>e instanceof Error,Jr={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},Xr=Jr.info;function Zr(e){if(Nn(e))return{boolValue:e};if("number"==typeof e)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if("string"==typeof e)return{stringValue:e};if(bn(e))return{arrayValue:{values:e.map(e=>Zr(e))}};try{return{stringValue:JSON.stringify(e)}}catch(Lt){return{stringValue:String(e)}}}function ei(e){var t=[];for(var n in e){var r=e[n];En(r)||_n(r)||t.push({key:n,value:Zr(r)})}return t}function ti(e,t){var n=e.level||"info",{text:r,number:i}=Jr[n]||Xr,a=String(Date.now())+"000000",s={};t.distinctId&&(s.posthogDistinctId=t.distinctId),t.sessionId&&(s.sessionId=t.sessionId),t.windowId&&(s["window.id"]=t.windowId),jn(t.sessionStartTimestamp)||(s.sessionStartTimestamp=String(t.sessionStartTimestamp)),jn(t.lastActivityTimestamp)||(s.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(s["url.full"]=t.currentUrl),t.screenName&&(s["screen.name"]=t.screenName),t.appState&&(s["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(s.feature_flags=t.activeFeatureFlags);var o=Yt({},s,e.attributes||{}),l={timeUnixNano:a,observedTimeUnixNano:a,severityNumber:i,severityText:r,body:{stringValue:e.body},attributes:ei(o)};return e.trace_id&&(l.traceId=e.trace_id),e.span_id&&(l.spanId=e.span_id),_n(e.trace_flags)||(l.flags=e.trace_flags),l}function ni(e,t,n){return Yt({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}function ri(e,t,n,r){return{resourceLogs:[{resource:{attributes:ei(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}let ii=class{constructor(e,t,n,r,i,a,s){var o;void 0===a&&(a=()=>Promise.resolve()),this._instance=e,this.Se=t,this.Ae=n,this.qe=r,this.je=i,this.Be=a,this.He=s,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=t.maxBufferSize,this.Je=Math.max(null!==(o=t.maxQueueSize)&&void 0!==o?o:t.maxBufferSize,t.maxBufferSize),this.Ye=t.flushIntervalMs,this.Ke=t.maxBatchRecordsPerPost,this.Xe=t.rateCapWindowMs,this.et=t.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&null!=e&&e.body){var t=this.it(e);
2if(null!==t)if(t.body){if(this.nt()){var n={record:ti(t,this.qe())};this.je(()=>this.st(n))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(e){var t=this.Se.beforeSend;if(!t)return e;var n=bn(t)?t:[t],r=e;for(var i of n)try{var a=i(r);if(!a)return this.Ae.info("Log was rejected in beforeSend function"),null;r=a}catch(e){return this.Ae.error("Error in beforeSend function for log:",e),null}return r}nt(){if(void 0===this.et)return!0;var e=Date.now(),t=e-this.We;return this.Xe>t&&t>=0||(this.We=e,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ze=!0),!1)}flush(){var e=this;return Kt(function*(){if(!e._instance.isDisabled)return e.Ue||(e.Ue=e.ot().finally(()=>{e.Ue=null})),e.Ue})()}ot(){var e=this;return Kt(function*(){var t;e.tt();var n=null!==(t=e._instance.getPersistedProperty(tn.LogsQueue))&&void 0!==t?t:[];if(0!==n.length)for(var r=n.length,i=0;n.length>0&&r>i;){var a,s;e.ze=0;var o=Math.min(n.length,e.Ke),l=n.slice(0,o),u=ri(l.map(e=>e.record),e.ut(),null!==(a=e.He)&&void 0!==a?a:e._instance.getLibraryId(),e._instance.getLibraryVersion()),c=yield e._instance.ht(u);if("too-large"===c.kind&&l.length>1)e.Ke=Math.max(1,Math.floor(l.length/2)),e.Ae.warn("Received 413 when sending logs batch of size "+l.length+", reducing batch size to "+e.Ke);else{if("retry-later"===c.kind)throw c.error;if("too-large"===c.kind?e.Ae.warn("Dropping a single log record after 413 with batch size 1 \u2014 the record is larger than the server cap and cannot be split further."):"ok"===c.kind&&e.Se.maxBatchRecordsPerPost>e.Ke&&(e.Ke=Math.min(e.Se.maxBatchRecordsPerPost,e.Ke+1)),yield e.dt(l.length),n=null!==(s=e._instance.getPersistedProperty(tn.LogsQueue))&&void 0!==s?s:[],i+=l.length,"fatal"===c.kind)throw c.error}}})()}dt(e){var t=this;return Kt(function*(){var n,r=Math.max(0,e-t.ze),i=null!==(n=t._instance.getPersistedProperty(tn.LogsQueue))&&void 0!==n?n:[];t._instance.setPersistedProperty(tn.LogsQueue,i.slice(r)),yield t.Be()})()}ut(){return ni(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(e){var t;if(!this._instance.optedOut){var n=null!==(t=this._instance.getPersistedProperty(tn.LogsQueue))&&void 0!==t?t:[];this.Je>n.length||(n.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),n.push(e),this._instance.setPersistedProperty(tn.LogsQueue,n),this.Qe>n.length?this.ct():this.rt()}}ct(e){void 0===e&&(e=this.Ye),this.vt||(this.vt=Yr(()=>{this.vt=void 0,this.rt()},e))}ft(){var e=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*Math.pow(2,e)}yt(){var e=this._instance.getPersistedProperty(tn.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return Kt(function*(){t.tt();var n=t.flush().catch(()=>{});void 0!==e?yield Promise.race([n,new Promise(t=>Yr(t,e))]):yield n})()}flushWithTimeout(e){var t=this;return Kt(function*(){var n=!1,r=t.flush(),i=new Promise(t=>Yr(()=>{n=!0,t()},e));try{yield Promise.race([r,i])}finally{n&&r.catch(()=>{})}})()}rt(){this.flush().then(()=>{this.Ve=0},e=>{this.Ve++,this.Ae.error("PostHog logs flush failed:",e)}).finally(()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())})}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var ai,si,oi;function li(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return oi&&n.length===si||(si=n.length,oi=n.reduce((n,r)=>{ai||(ai={});var i=ai[r];if(i)n[i[0]]=i[1];else for(var a=e(r),s=a.length-1;s>=0;s--){var o=a[s],l=null==o?void 0:o.filename,u=t[r];if(l&&u){n[l]=u,ai[r]=[l,u];break}}return n},{})),oi}}class ui{constructor(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),a=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(a,n),$exception_level:"error"}}modifyFrames(e){var t=this;return Kt(function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&bn(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
2pFirstLines:0),t.chunkIdMap)),Yt({},e,{cause:n,stack:r})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Kt(function*(){var n=e;for(var r of t.modifiers)n=yield r(n);return n})()}convertToExceptionList(e,t){var n,r,i,a={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var s=[a];return null!=e.cause&&s.push(...this.convertToExceptionList(e.cause,Yt({},t,{handled:!0}))),s}buildParsingContext(e){var t;return{chunkIdMap:li(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var r=(n,r)=>{if(4>=r){var i=this.buildCoercingContext(e,t,r);return this.applyCoercers(n,i)}};return Yt({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,n),next:e=>r(e,n+1)})}}var ci="?";function di(e,t,n,r,i){var a={platform:e,filename:t,function:"<anonymous>"===n?ci:n,in_app:!0};return _n(r)||(a.lineno=r),_n(i)||(a.colno=i),a}var hi=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ci,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},pi=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,fi=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mi=/\((\S*)(?::(\d+))(?::(\d+))\)/,gi=(e,t)=>{var n=pi.exec(e);if(n){var[,r,i,a]=n;return di(t,r,ci,+i,+a)}var s=fi.exec(e);if(s){if(s[2]&&0===s[2].indexOf("eval")){var o=mi.exec(s[2]);o&&(s[2]=o[1],s[3]=o[2],s[4]=o[3])}var[l,u]=hi(s[1]||ci,s[2]);return di(t,u,l,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},vi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Di=(e,t)=>{var n=vi.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=yi.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],a=n[1]||ci;return[a,i]=hi(a,i),di(t,i,a,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},bi=/\(error: (.*)\)/;class xi{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var n=kn(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return Ln(e,"DOMException")}isDOMError(e){return Ln(e,"DOMError")}}class Ci{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var n=e.message;return String(n.error&&"string"==typeof n.error.message?n.error.message:n)}getStack(e){return e.stacktrace||e.stack||void 0}}class Fi{constructor(){}match(e){return Ln(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var n;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}var _i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ki{match(e){return"string"==typeof e}coerce(e,t){var n,[r,i]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=i?i:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}getInfos(e){var t="Error",n=e,r=e.match(_i);return r&&(t=r[1],n=r[2]),[t,n]}}var wi=["fatal","error","warning","log","info","debug"];function Ei(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");
2if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}class ji{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return Rn(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Ei(e)}isSeverityLevel(e){return kn(e)&&!wn(e)&&wi.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(Qr(n))return n}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class Ai{match(e){return Rn(e)}coerce(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Ei(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}class Si{match(e){return Pn(e)}coerce(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}class Ni{match(e){return Ln(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!Rn(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var n,r=this.getUnhandledRejectionReason(e);return Pn(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var Bi="$message",Ti="$timestamp",Pi=new Set([Bi,Ti]),Li={enabled:!0,max_bytes:32768};function Ri(e){var t;return e?{enabled:null!==(t=e.enabled)&&void 0!==t?t:Li.enabled,max_bytes:Oi(e.max_bytes,Li.max_bytes)}:Yt({},Li)}class zi{constructor(e){this.bt=[],this._t=0,this.Se=Ri(e)}setConfig(e){this.Se=Ri(e),this.wt()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(e,n)=>{if("bigint"==typeof n)return n.toString();if("function"!=typeof n&&"symbol"!=typeof n){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&"object"==typeof n){if(t.has(n))return"[Circular]";t.add(n)}return n}})}catch(e){return}}(e);if(t)try{var n=JSON.parse(t);if(!Cn(n))return;var r=n,i=r[Bi],a=r[Ti];if(!kn(i)||0===i.trim().length)return;if(!kn(a)&&!An(a))return;return{step:r,json:t}}catch(e){return}}(e);if(t){var n=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),n=0,r=0;t.length>r;r++)"%"===t[r]?(n+=1,r+=2):n+=1;return n}(t.json);n>this.Se.max_bytes||(this.bt.push({step:t.step,bytes:n}),this._t+=n,this.wt())}}getAttachable(){return this.bt.map(e=>e.step)}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var e=this.bt.shift();e&&(this._t-=e.bytes)}}}function Oi(e,t){if(!An(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var Mi=function(e,t){var{debugEnabled:n}=void 0===t?{}:t,r={k(t){if(Pt&&(Vt.DEBUG||Ht.POSTHOG_DEBUG||n)&&!_n(Pt.console)&&Pt.console){for(var r=("__rrweb_original__"in Pt.console[t]?Pt.console[t].__rrweb_original__:Pt.console[t]),i=arguments.length,a=new Array(i>1?i-1:0),s=1;i>s;s++)a[s-1]=arguments[s];r(e,...a)}},debug(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("error",...t)},critical(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning(e){r.error("You must initialize PostHog before calling "+e)},createLogger:(t,n)=>Mi(e+" "+t,n)};return r},Ii=Mi("[PostHog.js]"),Ui=Ii.createLogger,$i=Ui("[ExternalScriptsLoader]"),Wi=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return $i.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=null==zt?void 0:zt.querySelectorAll("script");
2if(r)for(var i,a=function(){if(r[s].src===t){var e=r[s];return e.__posthog_loading_callback_fired?{v:n()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,n(void 0,t)}),e.onerror=e=>n(e),{v:void 0})}},s=0;r.length>s;s++)if(i=a())return i.v;var o=()=>{if(!zt)return n("document not found");var r=zt.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>n(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)zt.head.appendChild(r);else{var i,a=zt.querySelectorAll("body > script");a.length>0?null==(i=a[0].parentNode)||i.insertBefore(r,a[0]):zt.body.appendChild(r)}};null!=zt&&zt.body?o():null==zt||zt.addEventListener("DOMContentLoaded",o)};Ht.__PosthogExtensions__=Ht.__PosthogExtensions__||{},Ht.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if("remote-config"!==t){var r;if(e.config.strict_script_versioning)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var i="/static/"+t+".js?v="+e.version;if("toolbar"===t){var a=3e5;i=i+"&t="+Math.floor(Date.now()/a)*a}r=e.requestRouter.endpointFor("assets",i)}Wi(e,r,n)}else{var s=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");Wi(e,s,n)}},Ht.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);Wi(e,r,n)};var Hi="$people_distinct_id",qi="$device_id",Vi="$device_model",Gi="__alias",Ki="__timers",Yi="$autocapture_disabled_server_side",Qi="$heatmaps_enabled_server_side",Ji="$exception_capture_enabled_server_side",Xi="$error_tracking_suppression_rules",Zi="$error_tracking_capture_extension_exceptions",ea="$web_vitals_enabled_server_side",ta="$dead_clicks_enabled_server_side",na="$product_tours_enabled_server_side",ra="$web_vitals_allowed_metrics",ia="$session_recording_remote_config",aa="$replay_sample_rate",sa="$replay_override_sampling",oa="$replay_override_linked_flag",la="$replay_override_url_trigger",ua="$replay_override_event_trigger",ca="$sesid",da="$session_is_sampled",ha="$enabled_feature_flags",pa="$active_feature_flags",fa="$early_access_features",ma="$feature_flag_details",ga="$feature_flag_payloads",va="$feature_flag_request_id",ya="$override_feature_flags",Da="$override_feature_flag_payloads",ba="$stored_person_properties",xa="$stored_group_properties",Ca="$surveys",Fa="$surveys_loaded_at",_a="$surveys_activated",ka="ph_product_tours",wa="$flag_call_reported",Ea="$flag_call_reported_session_id",ja="$feature_flag_errors",Aa="$feature_flag_evaluated_at",Sa="$user_state",Na="$client_session_props",Ba="$capture_rate_limit",Ta="$initial_campaign_params",Pa="$initial_referrer_info",La="$initial_person_info",Ra="$epp",za="__POSTHOG_TOOLBAR__",Oa="$posthog_cookieless",Ma="$sdk_debug_extensions_init_method",Ia="$sdk_debug_extensions_init_time_ms",Ua="$sdk_debug_recording_script_not_loaded",$a="PostHog loadExternalDependency extension not found.",Wa="on_reject",Ha="always",qa="anonymous",Va="identified",Ga="identified_only",Ka="visibilitychange",Ya="beforeunload",Qa="$pageview",Ja="$pageleave",Xa="$identify",Za="$groupidentify";function es(e,t){bn(e)&&e.forEach(t)}function ts(e,t){if(!jn(e))if(bn(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(var n in e)yn.call(e,n)&&t(e[n],n)}var ns=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var a in i)void 0!==i[a]&&(e[a]=i[a]);return e};function rs(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var is=function(e){try{return e()}catch(e){return}},as=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){Ii.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Ii.critical(e)}}},ss=function(e){var t={};return ts(e,function(e,n){(kn(e)&&e.length>0||An(e))&&(t[n]=e)}),t},os=["herokuapp.com","vercel.app","netlify.app"];function ls(e){var t=null==e?void 0:e.hostname;if(!kn(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of os)if(n===r)return!1;return!0}function us(e,t,n,r){var{capture:i=!1,passive:a=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:i,passive:a})}function cs(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return An(e)&&isFinite(e)&&Math.floor(e)===e});class ds{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,n,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||0>e||0>t||0>n||0>r||e>0xffffffffffff||t>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=r>>>24,i[13]=r>>>16,i[14]=r>>>8,i[15]=r,new ds(i)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new ds(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}}class hs{constructor(){this.S=0,this.C=0,this.I=new ms}generate(){var e=this.generateOrAbort();if(_n(e)){this.S=0;var t=this.generateOrAbort();if(_n(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return ds.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var ps,fs=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};Pt&&!_n(Pt.crypto)&&crypto.getRandomValues&&(fs=e=>crypto.getRandomValues(e));class ms{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(fs(this.R),this.O=0),this.R[this.O++]}}var gs=()=>vs().toString(),vs=()=>(ps||(ps=new hs)).generate(),ys="",Ds=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,bs={N:()=>!!zt,D(e){Ii.error("cookieStore error: "+e)},P(e){if(zt){try{for(var t=e+"=",n=zt.cookie.split(";").filter(e=>e.length),r=0;n.length>r;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},F(e){var t;try{t=JSON.parse(bs.P(e))||{}}catch(e){}return t},q(e,t,n,r,i){if(!zt)return!1;try{var a="",s="",o=function(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=zt),ys)return ys;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+gs();!ys&&r--;){var a=n.slice(r).join("."),s=i+"=1;domain=."+a+";path=/";t.cookie=s+";max-age=3",t.cookie.includes(i)&&(t.cookie=s+";max-age=0",ys=a)}return ys}(e);if(!n){var r=(e=>{var t=e.match(Ds);return t?t[0]:""})(e);r!==n&&Ii.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}(zt.location.hostname,r);
2if(n){var l=new Date;l.setTime(l.getTime()+864e5*n),a="; expires="+l.toUTCString()}i&&(s="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+a+"; SameSite=Lax; path=/"+o+s;return u.length>3686.4&&Ii.warn("cookieStore warning: large cookie, len="+u.length),zt.cookie=u,!0}catch(e){return!1}},A(e,t){if(null!=zt&&zt.cookie)try{bs.q(e,"",-1,t)}catch(e){return}}},xs=null,Cs={N(){if(!En(xs))return xs;var e=!0;if(_n(Pt))e=!1;else try{var t="__mplssupport__";Cs.q(t,"xyz"),'"xyz"'!==Cs.P(t)&&(e=!1),Cs.A(t)}catch(Pt){e=!1}return e||Ii.error("localStorage unsupported; falling back to cookie store"),xs=e,e},D(e){Ii.error("localStorage error: "+e)},P(e){try{return null==Pt?void 0:Pt.localStorage.getItem(e)}catch(Pt){Cs.D(Pt)}return null},F(e){try{return JSON.parse(Cs.P(e))||{}}catch(e){}return null},q(e,t){try{return null==Pt||Pt.localStorage.setItem(e,JSON.stringify(t)),!0}catch(Pt){Cs.D(Pt)}return!1},A(e){try{null==Pt||Pt.localStorage.removeItem(e)}catch(Pt){Cs.D(Pt)}}},Fs=[qi,"distinct_id",ca,da,Ra,La,Sa],_s={},ks={N:()=>!0,D(e){Ii.error("memoryStorage error: "+e)},P:e=>_s[e]||null,F:e=>_s[e]||null,q:(e,t)=>(_s[e]=t,!0),A(e){delete _s[e]}},ws=null,Es={N(){if(!En(ws))return ws;if(ws=!0,_n(Pt))ws=!1;else try{var e="__support__";Es.q(e,"xyz"),'"xyz"'!==Es.P(e)&&(ws=!1),Es.A(e)}catch(Pt){ws=!1}return ws},D(e){Ii.error("sessionStorage error: ",e)},P(e){try{return null==Pt?void 0:Pt.sessionStorage.getItem(e)}catch(Pt){Es.D(Pt)}return null},F(e){try{return JSON.parse(Es.P(e))||null}catch(e){}return null},q(e,t){try{return null==Pt||Pt.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(Pt){Es.D(Pt)}return!1},A(e){try{null==Pt||Pt.sessionStorage.removeItem(e)}catch(Pt){Es.D(Pt)}}};class js{constructor(e){this._instance=e}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}
2isOptedOut(){return this.Se.cookieless_mode===Ha||this.isRejected()||-1===this.consent&&this.Se.cookieless_mode===Wa}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.Se.opt_out_capturing_by_default}optInOut(e){this.Ct.q(this.It,e?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.A(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:n}=this._instance.config;return n||(t?t+e:"__ph_opt_in_out_"+e)}get St(){var e=this.Ct.P(this.It);return On(e)?1:fn(Mn,e)?0:-1}get Ct(){var e=this.Se.opt_out_capturing_persistence_type,t="localStorage"===e?Cs:bs;if(!this.Tt||this.Tt!==t){this.Tt=t;var n="localStorage"===e?bs:Cs;n.P(this.It)&&(this.Tt.P(this.It)||this.optInOut(On(n.P(this.It))),n.A(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[null==Rt?void 0:Rt.doNotTrack,null==Rt?void 0:Rt.msDoNotTrack,Ht.doNotTrack].some(e=>On(e))}}function As(e){return e instanceof Element&&(e.id===za||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function Ss(e){return!!e&&1===e.nodeType}function Ns(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Bs(e){return!!e&&3===e.nodeType}function Ts(e){return!!e&&11===e.nodeType&&Ss(e.host)}function Ps(e){return e?mn(e).split(/\s+/):[]}function Ls(e){var t=null==Pt?void 0:Pt.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function Rs(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Ps(t)}function zs(e){return jn(e)?null:mn(e).split(/(\s+)/).filter(e=>so(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Os(e){var t="";return Xs(e)&&!Zs(e)&&e.childNodes&&e.childNodes.length&&ts(e.childNodes,function(e){var n;Bs(e)&&e.textContent&&(t+=null!==(n=zs(e.textContent))&&void 0!==n?n:"")}),mn(t)}function Ms(e){return _n(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Is=["a","button","form","input","select","textarea","label"];function Us(e,t){if(_n(t))return!0;var n,r=function(e){if(t.some(t=>function(e,t){var n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!n&&n.call(e,t)}catch(e){return!1}}(e,t)))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function $s(e){var t=e.parentNode;return!(!t||!Ss(t))&&t}var Ws=[".ph-no-autocapture","[data-ph-no-autocapture]"],Hs=["next","previous","prev",">","<"],qs=[...Hs,"+","-","\u2212","\u2013"],Vs=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,Gs=[".ph-no-rageclick",".ph-no-capture"],Ks=["","text","search","email","password","url","tel","number"];function Ys(e,t){if(!Pt||Qs(e))return!1;var n,r,i,a,s;if(Nn(t)?(n=!!t&&Gs,r=void 0,i=!1):(n=null!==(a=null==t?void 0:t.css_selector_ignorelist)&&void 0!==a?a:Gs,r=null==t?void 0:t.content_ignorelist,i=null!==(s=null==t?void 0:t.ignore_text_selection)&&void 0!==s&&s),!1===n)return!1;if(i&&function(e){return!(!e||!Ss(e))&&(!!Ns(e,"textarea")||(Ns(e,"input")?fn(Ks,(e.getAttribute("type")||"").toLowerCase()):function(e){if(e.isContentEditable)return!0;var t=null==e.getAttribute?void 0:e.getAttribute("contenteditable");return"true"===t||""===t}(e)))}(e))return!1;var{targetElementList:o}=Js(e,!1);return!function(e,t){if(!1===e||_n(e))return!1;var n;if(!0===e)n=Hs;else{if(!bn(e))return!1;if(e.length>10)return Ii.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:r}=e;return n.some(e=>Vs(t,e)||Vs(r,e))})}(r,o.map(e=>{var t;return{safeText:Os(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!Us(o,n)}var Qs=e=>!e||Ns(e,"html")||!Ss(e),Js=(e,t)=>{if(!Pt||Qs(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!Ns(i,"body");)if(Ts(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var a=$s(i);if(!a)break;if(t||Is.indexOf(a.tagName.toLowerCase())>-1)n=!0;else{var s=Pt.getComputedStyle(a);s&&"pointer"===s.getPropertyValue("cursor")&&(n=!0)}r.push(a),i=a}return{parentIsUsefulElement:n,targetElementList:r}};function Xs(e){for(var t=e;t.parentNode&&!Ns(t,"body");t=t.parentNode){var n=Rs(t);if(fn(n,"ph-sensitive")||fn(n,"ph-no-capture"))return!1}if(fn(Rs(e),"ph-include"))return!0;var r=e.type||"";if(kn(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}
2var i=e.name||e.id||"";return!kn(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function Zs(e){return!!(Ns(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Ns(e,"select")||Ns(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var eo="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",to=new RegExp("^(?:"+eo+")$"),no=new RegExp(eo),ro="\\d{3}-?\\d{2}-?\\d{4}",io=new RegExp("^("+ro+")$"),ao=new RegExp("("+ro+")");function so(e,t){if(void 0===t&&(t=!0),jn(e))return!1;if(kn(e)){if(e=mn(e),(t?to:no).test((e||"").replace(/[- ]/g,"")))return!1;if((t?io:ao).test(e))return!1}return!0}function oo(e){var t=Os(e);return so(t=(t+" "+lo(e)).trim())?t:""}function lo(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ts(e.childNodes,function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=Os(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+lo(e)).trim())}catch(e){Ii.error("[AutoCapture]",e)}}),t}function uo(e){return e.replace(/"|\\"/g,'\\"')}function co(e){var t=e.attr__class;return t?bn(t)?t:Ps(t):void 0}var ho=Ui("[Dead Clicks]"),po=()=>!0,fo=e=>{var t,n=!(null==(t=e.instance.persistence)||!t.get_property(ta)),r=e.instance.config.capture_dead_clicks;return Nn(r)?r:!!Cn(r)||n};class mo{get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[ta]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt(()=>{this.Pt()}):this.stop()}Mt(e){var t,n;null!=(t=Ht.__PosthogExtensions__)&&t.initDeadClicksAutocapture?e():null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?ho.error("failed to load script",t):e()})}Pt(){var e;if(zt){if(!this.Et&&null!=(e=Ht.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=Cn(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.Et=Ht.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.Et.start(zt),ho.info("starting...")}}else ho.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,ho.info("stopping..."))}}var go=Ui("[SegmentIntegration]"),vo="posthog-js";function yo(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:a=["error"],sendExceptionsToPostHog:s=!0}=void 0===t?{}:t;return t=>{var o,l,u,c,d;if("*"!==a&&!a.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p,f=(null==(o=t.exception)?void 0:o.values)||[],m=f.map(e=>Yt({},e,{stacktrace:e.stacktrace?Yt({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>Yt({},e,{platform:"web:javascript"}))}):void 0})),g={$exception_message:(null==(l=f[0])?void 0:l.value)||t.message,$exception_type:null==(u=f[0])?void 0:u.type,$exception_level:t.level,$exception_list:m,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=f[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=f[0])?void 0:d.type,$sentry_tags:t.tags};return n&&r&&(g.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+t.event_id),s&&(null==(p=e.exceptions)||p.sendExceptionEvent(g)),t}}class Do{constructor(e,t,n,r,i,a){this.name=vo,this.setupOnce=function(s){s(yo(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==a||a}))}}}class bo{constructor(e){this.Rt=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength||n.crossTabAdoption)&&(Ii.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:n}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Lt()}Lt(){var e;this.Ft=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.Rt)}destroy(){var e;null==(e=this.Ft)||e.call(this),this.Ft=void 0}doPageView(e,t){var n,r=this.At(e,t);return this.Ot={pathname:null!==(n=null==Pt?void 0:Pt.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.At(e,null==(t=this.Ot)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Ot)?void 0:e.pageViewId}}At(e,t){var n=this.Ot;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:a,lastScrollY:s,maxScrollY:o,maxContentHeight:l,lastContentY:u,maxContentY:c}=i;
2if(!(_n(a)||_n(s)||_n(o)||_n(l)||_n(u)||_n(c))){a=Math.ceil(a),s=Math.ceil(s),o=Math.ceil(o),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var d=a>1?In(s/a,0,1,Ii):1,h=a>1?In(o/a,0,1,Ii):1,p=l>1?In(u/l,0,1,Ii):1,f=l>1?In(c/l,0,1,Ii):1;r=ns(r,{$prev_pageview_last_scroll:s,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:f})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}}var xo=["flags","surveys"],Co={[Hi]:{exposure:"hidden"},[Gi]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Ki]:{exposure:"hidden"},[Yi]:{exposure:"event"},[Qi]:{exposure:"hidden"},[Ji]:{exposure:"event"},[Xi]:{exposure:"hidden"},[Zi]:{exposure:"event"},[ea]:{exposure:"event"},[ta]:{exposure:"event"},[na]:{exposure:"hidden"},[ra]:{exposure:"event"},[ia]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[ca]:{exposure:"hidden"},[da]:{exposure:"event"},[aa]:{exposure:"event",shouldSkipFromEventProperties:e=>En(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[ha]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!Cn(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[pa]:{exposure:"event",storageGroup:"flags"},[fa]:{exposure:"hidden"},[ma]:{exposure:"hidden",storageGroup:"flags"},[ga]:{exposure:"event",storageGroup:"flags"},[va]:{exposure:"event",storageGroup:"flags",volatile:!0},[ya]:{exposure:"event"},[Da]:{exposure:"hidden"},[ba]:{exposure:"hidden"},[xa]:{exposure:"hidden"},[Ca]:{exposure:"hidden",storageGroup:"surveys"},[Fa]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[_a]:{exposure:"event"},[ka]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[wa]:{exposure:"hidden"},[Ea]:{exposure:"hidden"},[ja]:{exposure:"hidden"},[Aa]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Sa]:{exposure:"hidden"},[Na]:{exposure:"hidden"},[Ba]:{exposure:"hidden"},[Ta]:{exposure:"hidden"},[Pa]:{exposure:"hidden"},[La]:{exposure:"hidden"},[Ra]:{exposure:"hidden"},[sa]:{exposure:"event"},[oa]:{exposure:"event"},[la]:{exposure:"event"},[ua]:{exposure:"event"},[Ma]:{exposure:"event"},[Ia]:{exposure:"event"},[Ua]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},Fo=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],_o=e=>{var t=Co[e];if(t)return t;for(var[n,r]of Fo)if(0===e.indexOf(n))return r},ko=e=>{var t=null==zt?void 0:zt.createElement("a");return _n(t)?null:(t.href=e,t)},wo=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var a=r[i].split("=");if(a[0]===t){n=a;break}}if(!bn(n)||2>n.length)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){Ii.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},Eo=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],a=(r[0]||"").split("?"),s=a[1],o=a[0],l=(s||"").split("&"),u=[],c=0;l.length>c;c++){var d=l[c].split("=");bn(d)&&(t.includes(d[0])?u.push(d[0]+"="+n):u.push(l[c]))}var h=o;return null!=s&&(h+="?"+u.join("&")),null!=i&&(h+="#"+i),h},jo=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));
2return n?n[1]:null},Ao="https?://(.*)",So=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],No=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...So],Bo="<masked>",To=["li_fat_id"];function Po(e,t,n){if(!zt)return{};var r,i=t?[...So,...n||[]]:[],a=Lo(Eo(zt.URL,i,Bo),e),s=(r={},ts(To,function(e){var t=bs.P(e);r[e]=t||null}),r);return ns(s,a)}function Lo(e,t){var n=No.concat(t||[]),r={};return ts(n,function(t){var n=wo(e,t);r[t]=n||null}),r}function Ro(e){var t=function(e){return e?0===e.search(Ao+"google.([^/?]*)")?"google":0===e.search(Ao+"bing.com")?"bing":0===e.search(Ao+"yahoo.com")?"yahoo":0===e.search(Ao+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!En(t)){r.$search_engine=t;var i=zt?wo(zt.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function zo(){return navigator.language||navigator.userLanguage}var Oo="$direct";function Mo(){return(null==zt?void 0:zt.referrer)||Oo}function Io(e,t,n){void 0===n&&(n=!1);var r=e?[...So,...t||[]]:[],i=n?Kr(null==Ot?void 0:Ot.href):null==Ot?void 0:Ot.href,a=null==i?void 0:i.substring(0,1e3);return{r:Mo().substring(0,1e3),u:a?Eo(a,r,Bo):void 0}}function Uo(e,t){var n;void 0===t&&(t=!1);var{r:r,u:i}=e,a=t?Kr(i):i,s={$referrer:r,$referring_domain:null==r?void 0:r==Oo?Oo:null==(n=ko(r))?void 0:n.host};
2if(a){s.$current_url=a;var o=ko(a);s.$host=null==o?void 0:o.host,s.$pathname=null==o?void 0:o.pathname;var l=Lo(a);ns(s,l)}if(r){var u=Ro(r);ns(s,u)}return s}function $o(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(Pt){return}}function Wo(){try{return(new Date).getTimezoneOffset()}catch(Pt){return}}var Ho={flags:Aa,surveys:Fa},qo=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Vo="main";class Go{constructor(e,t,n){if(void 0===n&&(n=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=e,this.qt=n,this.props={},this.jt=!1,this.Bt=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.Ct=this.Ht(e),this.Nt=this.Ut(e),this.load(),e.debug&&Ii.info("Persistence loaded",e.persistence,Yt({},this.props)),this.update_config(e,e,t),this.save(),Pt){var r=()=>this.flush();us(Pt,"beforeunload",r,{capture:!1}),us(Pt,"pagehide",r,{capture:!1})}}zt(){var e,t=null==(e=this.Se)?void 0:e.persistence_save_debounce_ms;return An(t)&&t>0?t:0}isDisabled(){return!!this.Vt}Ht(e){-1===qo.indexOf(e.persistence.toLowerCase())&&(Ii.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,n=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1);var n=[...Fs,...e];return Yt({},Cs,{F(e){try{var n={};try{n=bs.F(e)||{}}catch(e){}var r,i=JSON.parse(Cs.P(e)||"{}");if(t){var a={};for(var s in n){var o=n[s];En(o)||""===o||(a[s]=o)}r=ns(i,a)}else r=ns(n,i);return Cs.q(e,r),r}catch(e){}return null},q(e,t,r,i,a,s){var o=Cs.q(e,t,void 0,void 0,s);try{var l={};n.forEach(e=>{t[e]&&(l[e]=t[e])}),Object.keys(l).length&&bs.q(e,l,r,i,a,s)}catch(e){Cs.D(e)}return o},A(e,t){try{null==Pt||Pt.localStorage.removeItem(e),bs.A(e,t)}catch(Pt){Cs.D(Pt)}}})}(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),r=!1,i=e.persistence.toLowerCase();return"localstorage"===i&&Cs.N()?(t=Cs,r=!0):"localstorage+cookie"===i&&n.N()?(t=n,r=!0):"sessionstorage"===i&&Es.N()?t=Es:"memory"===i?t=ks:"cookie"===i?t=bs:n.N()?(t=n,r=!0):t=bs,this.Dt=r,t}Wt(e){return this.Bt+"__"+e}Ut(e){return this.Dt&&!!e.split_storage}Gt(e){var t=null!=e?e:this.Se.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[Aa];return!n||"number"!=typeof n||Date.now()-n>t}properties(){var e={};return ts(this.props,(t,n)=>{var r=_o(n);if("derived"===(null==r?void 0:r.exposure)){if(null!=r.shouldSkipFromEventProperties&&r.shouldSkipFromEventProperties(t,n===ha?()=>this.Gt():()=>!1))return;r.transformToEventProperties&&ns(e,r.transformToEventProperties(t))}else if(!r||"event"===r.exposure){if(null!=r&&null!=r.shouldSkipFromEventProperties&&r.shouldSkipFromEventProperties(t,()=>!1))return;e[n]=t}}),e}load(){if(!this.Vt){var e=this.Ct.F(this.Bt);e&&(this.props=ns({},e)),this.Nt&&this.Zt()}}Zt(){for(var e of xo){var t=Cs.F(this.Wt(e));if(t&&!Fn(t)){var n=this.Qt(e);n.persisted=!0,this.Jt(e)||(n.fingerprint=this.Yt(t,e)),this.Kt(e,t)||ns(this.props,t)}}}Jt(e){return Object.keys(this.props).some(t=>{var n;return(null==(n=_o(t))?void 0:n.storageGroup)===e})}Kt(e,t){var n=Ho[e];if(!n)return!1;var r=t[n],i=this.props[n];return An(r)&&An(i)&&i>r}refreshKey(e){var t;if(!this.Vt){var n=this.Nt?null==(t=_o(e))?void 0:t.storageGroup:void 0,r=n?Cs.F(this.Wt(n)):this.Ct.F(this.Bt);if(r&&e in r)this.Xt(e,r[e]);else{if(n){var i=this.Ct.F(this.Bt);if(i&&e in i)return void this.Xt(e,i[e])}this.er(e)}}}save(){if(!this.Vt){var e=this.zt();e>0?_n(this.tr)&&(this.tr=setTimeout(()=>{this.tr=void 0,this.rr()},e)):this.rr()}}flush(){_n(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.Bt,this.props,Vo))}ir(){var{main:e,groups:t}=this.sr();for(var n of(this.nr(this.Ct,this.Bt,e,Vo),xo)){var r,i=t[n];(!Fn(i)||null!=(r=this.$t[n])&&r.persisted)&&this.nr(Cs,this.Wt(n),i,n)}}sr(){var e={},t={};for(var n of xo)t[n]={};return ts(this.props,(n,r)=>{var i,a=null==(i=_o(r))?void 0:i.storageGroup;a?t[a][r]=n:e[r]=n}),{main:e,groups:t}}Yt(e,t){if(t===Vo)return JSON.stringify(e)+"|"+this.ar+"|"+this.lr+"|"+this.ur;var n={};return ts(e,(e,t)=>{var r;n[t]=null!=(r=_o(t))&&r.volatile?"__volatile__":e}),JSON.stringify(n)}nr(e,t,n,r){var i=this.Qt(r);if(r===Vo||i.dirty||_n(i.fingerprint)){var a;try{if((a=this.Yt(n,r))===i.fingerprint)return void(i.dirty=!1)}catch(e){a=void 0}e.q(t,n,this.ar,this.lr,this.ur,this.Se.debug)?(i.dirty=!1,r!==Vo&&(i.persisted=!0),_n(a)||(i.fingerprint=a)):this.Se.debug&&Ii.warn('failed to persist storage entry "'+t+'"; will retry on next save')}}remove(e){var{keepGroupEntries:t=!1}=void 0===e?{}:e;if(_n(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.A(this.Bt,!1),this.Ct.A(this.Bt,!0),!t&&this.qt)for(var n of xo)Cs.A(this.Wt(n));t?delete this.$t[Vo]:this.$t={}}clear(){this.remove(),this.props={}}register_once(e,t,n){if(Cn(e)){_n(t)&&(t="None"),this.ar=_n(n)?this.hr:n;var r=!1;if(ts(e,(e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.Xt(n,e),r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(Cn(e)){this.ar=_n(t)?this.hr:t;var n=!1;if(ts(e,(t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.Xt(r,t),n=!0)}),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.er(e),this.save())}update_campaign_params(){if(!this.jt){var e=Po(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);Fn(ss(e))||this.register(e),this.jt=!0}}update_search_keyword(){var e;this.register((e=null==zt?void 0:zt.referrer)?Ro(e):{})}update_referrer_info(){var e;this.register_once({$referrer:Mo(),$referring_domain:null!=zt&&zt.referrer&&(null==(e=ko(zt.referrer))?void 0:e.host)||Oo},void 0)}set_initial_person_info(){this.props[Ta]||this.props[Pa]||this.register_once({[La]:Io(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes
2)},void 0)}get_initial_props(){var e={};ts([Pa,Ta],t=>{var n=this.props[t];n&&ts(n,function(t,n){e["$initial_"+gn(n)]=t})});var t=this.props[La];if(t){var n=function(e,t){void 0===t&&(t=!1);var n=Uo(e,t),r={};return ts(n,function(e,t){r["$initial_"+gn(t)]=e}),r}(t,this.Se.disable_capture_url_hashes);ns(e,n)}return e}safe_merge(e){return ts(this.props,function(t,n){n in e||(e[n]=t)}),e}update_config(e,t,n){this.hr=this.ar=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var r=e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var n=[...e].sort(),r=[...t].sort();return n.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),i=r?this.Ht(e):this.Ct,a=this.Ut(e);if(r||a!==this.Nt){var s=this.props;this.clear(),this.Ct=i,this.Nt=a,this.props=s,this.save()}}set_disabled(e){this.Vt=e,this.Vt?this.remove():this.save()}set_cross_subdomain(e){e!==this.lr&&(this.lr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.ur&&(this.ur=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var n=this.props[Ki]||{};n[e]=t,this.Xt(Ki,n),this.save()}remove_event_timer(e){var t=this.props[Ki]||{},n=t[e];return _n(n)||(delete t[e],this.Xt(Ki,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.Xt(e,t),this.save()}Xt(e,t){var n;this.props[e]=t,null!=(n=_o(e))&&n.volatile||this.dr(e)}er(e){delete this.props[e],this.dr(e)}dr(e){var t,n=null==(t=_o(e))?void 0:t.storageGroup;n&&(this.Qt(n).dirty=!0)}Qt(e){return this.$t[e]||(this.$t[e]={})}}var Ko="events",Yo="cancelEvents",Qo="popover",Jo="api",Xo="widget",Zo="always",el="survey shown",tl="survey dismissed",nl="survey sent",rl="$survey_id",il="$survey_iteration",al="$survey_last_seen_date",sl="popover",ol="inline",ll="product tour shown",ul="$product_tour_last_seen_date",cl="$product_tour_type",dl=Ui("[RateLimiter]");class hl{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{dl.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void dl.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t,n,r;void 0===e&&(e=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:a}=this,s=(new Date).getTime(),o=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property(Ba))&&void 0!==t?t:{tokens:i,last:s};o.tokens+=(s-o.last)/1e3*a,o.last=s,o.tokens>i&&(o.tokens=i);var l=1>o.tokens;return l||e||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+a+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(r=this.instance.persistence)||r.set_property(Ba,o),{isRateLimited:l,remainingTokens:o.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var pl=Ui("[RemoteConfig]");class fl{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=Ht._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}cr(e){var t,n;null!=(t=Ht.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}vr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return pl.info("Using preloaded remote config",this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void pl.warn("Remote config is disabled. Falling back to local config.");this.cr(e=>{if(!e)return pl.info("No config found after loading remote JS config. Falling back to JSON."),void this.vr(e=>{this.pr(e),this.gr()});this.pr(e),this.gr()})}catch(Pt){pl.error("Error loading remote config",Pt)}}stop(){this.yr&&(clearInterval(this.yr),this.yr=void 0)}
vendor: 4,328 bytes, line 2
2refresh(){!this._instance.mr()&&zt&&"hidden"!==zt.visibilityState&&this._instance.reloadFeatureFlags()}gr(){var e;if(!this.yr){var t=null!==(e=this._instance.config.remote_config_refresh_interval_ms)&&void 0!==e?e:3e5;0!==t&&(this.yr=setInterval(()=>{this.refresh()},t))}}pr(e){var t;e||pl.error("Failed to fetch remote config from PostHog."),this._instance.pr(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var ml="gzip-js",gl="base64",vl=Uint8Array,yl=Uint16Array,Dl=Uint32Array,bl=new vl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xl=new vl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Cl=new vl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Fl=function(e,t){for(var n=new yl(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new Dl(n[30]);for(r=1;30>r;++r)for(var a=n[r];n[r+1]>a;++a)i[a]=a-n[r]<<5|r;return[n,i]},_l=Fl(bl,2),kl=_l[1];_l[0][28]=258,kl[258]=28;for(var wl=Fl(xl,0)[1],El=new yl(32768),jl=0;32768>jl;++jl){var Al=(43690&jl)>>>1|(21845&jl)<<1;El[jl]=((65280&(Al=(61680&(Al=(52428&Al)>>>2|(13107&Al)<<2))>>>4|(3855&Al)<<4))>>>8|(255&Al)<<8)>>>1}var Sl=function(e,t,n){for(var r=e.length,i=0,a=new yl(t);r>i;++i)++a[e[i]-1];var s,o=new yl(t);for(i=0;t>i;++i)o[i]=o[i-1]+a[i-1]<<1;if(n){s=new yl(1<<t);var l=15-t;for(i=0;r>i;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],d=o[e[i]-1]++<<c,h=d|(1<<c)-1;h>=d;++d)s[El[d]>>>l]=u}else for(s=new yl(r),i=0;r>i;++i)s[i]=El[o[e[i]-1]++]>>>15-e[i];return s},Nl=new vl(288);for(jl=0;144>jl;++jl)Nl[jl]=8;for(jl=144;256>jl;++jl)Nl[jl]=9;for(jl=256;280>jl;++jl)Nl[jl]=7;for(jl=280;288>jl;++jl)Nl[jl]=8;var Bl=new vl(32);for(jl=0;32>jl;++jl)Bl[jl]=5;var Tl=Sl(Nl,9,0),Pl=Sl(Bl,5,0),Ll=function(e){return(e/8|0)+(7&e&&1)},Rl=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof yl?yl:e instanceof Dl?Dl:vl)(n-t);return r.set(e.subarray(t,n)),r},zl=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},Ol=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Ml=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return[new vl(0),0];if(1==i){var s=new vl(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var o=n[0],l=n[1],u=0,c=1,d=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=i-1;)o=n[n[d].f>n[u].f?u++:d++],l=n[u!=c&&n[d].f>n[u].f?u++:d++],n[c++]={s:-1,f:o.f+l.f,l:o,r:l};var h=a[0].s;for(r=1;i>r;++r)a[r].s>h&&(h=a[r].s);var p=new yl(h+1),f=Il(n[c-1],p,0);if(f>t){r=0;var m=0,g=f-t,v=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i>r;++r){var y=a[r].s;if(t>=p[y])break;m+=v-(1<<f-p[y]),p[y]=t}for(m>>>=g;m>0;){var D=a[r].s;t>p[D]?m-=1<<t-p[D]++-1:++r}for(;r>=0&&m;--r){var b=a[r].s;p[b]==t&&(--p[b],++m)}f=t}return[new vl(p),f]},Il=function(e,t,n){return-1==e.s?Math.max(Il(e.l,t,n+1),Il(e.r,t,n+1)):t[e.s]=n},Ul=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new yl(++t),r=0,i=e[0],a=1,s=function(e){n[r++]=e},o=1;t>=o;++o)if(e[o]==i&&o!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=e[o]}return[n.subarray(0,r),t]},$l=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},Wl=function(e,t,n){var r=n.length,i=Ll(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;r>a;++a)e[i+a+4]=n[a];return 8*(i+4+r)},Hl=function(e,t,n,r,i,a,s,o,l,u,c){zl(t,c++,n),++i[256];for(var d=Ml(i,15),h=d[0],p=d[1],f=Ml(a,15),m=f[0],g=f[1],v=Ul(h),y=v[0],D=v[1],b=Ul(m),x=b[0],C=b[1],F=new yl(19),_=0;y.length>_;++_)F[31&y[_]]++;for(_=0;x.length>_;++_)F[31&x[_]]++;for(var k=Ml(F,7),w=k[0],E=k[1],j=19;j>4&&!w[Cl[j-1]];--j);var A,S,N,B,T=u+5<<3,P=$l(i,Nl)+$l(a,Bl)+s,L=$l(i,h)+$l(a,m)+s+14+3*j+$l(F,w)+(2*F[16]+3*F[17]+7*F[18]);if(P>=T&&L>=T)return Wl(t,c,e.subarray(l,l+u));if(zl(t,c,1+(P>L)),c+=2,P>L){A=Sl(h,p,0),S=h,N=Sl(m,g,0),B=m;var R=Sl(w,E,0);for(zl(t,c,D-257),zl(t,c+5,C-1),zl(t,c+10,j-4),c+=14,_=0;j>_;++_)zl(t,c+3*_,w[Cl[_]]);c+=3*j;for(var z=[y,x],O=0;2>O;++O){var M=z[O];for(_=0;M.length>_;++_)zl(t,c,R[I=31&M[_]]),c+=w[I],I>15&&(zl(t,c,M[_]>>>5&127),c+=M[_]>
2>>12)}}else A=Tl,S=Nl,N=Pl,B=Bl;for(_=0;o>_;++_)if(r[_]>255){var I;Ol(t,c,A[257+(I=r[_]>>>18&31)]),c+=S[I+257],I>7&&(zl(t,c,r[_]>>>23&31),c+=bl[I]);var U=31&r[_];Ol(t,c,N[U]),c+=B[U],U>3&&(Ol(t,c,r[_]>>>5&8191),c+=xl[U])}else Ol(t,c,A[r[_]]),c+=S[r[_]];return Ol(t,c,A[256]),c+S[256]},ql=new Dl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Vl=function(){for(var e=new Dl(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Gl=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var Kl=!!It||!!Mt,Yl="text/plain",Ql=!1,Jl=(e,t)=>{var[n,r]=e.split("#"),[i,a]=n.split("?");if(!a)return e;var s=a.split("&").filter(e=>e.split("=")[0]!==t).join("&");return i+(s?"?"+s:"")+(r?"#"+r:"")},Xl=function(e,t,n){var r;void 0===n&&(n=!0);var[i,a]=e.split("?"),s=Yt({},t),o=null!==(r=null==a?void 0:a.split("&").map(e=>{var t,[r,i]=e.split("="),a=n&&null!==(t=s[r])&&void 0!==t?t:i;return delete s[r],r+"="+a}))&&void 0!==r?r:[],l=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return ts(e,function(e,t){_n(e)||_n(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)}),i.join(t)}(s);return l&&o.push(l),i+"?"+o.join("&")},Zl=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),eu=e=>{if(e.xt)return e.xt;var{data:t,compression:n}=e;if(t){if(n===ml){var r=function(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=Vl[255&n^t[r]]^n>>>8;e=n},d:()=>4294967295^e}}(),r=e.length;n.p(e);var i,a,s,o,l=(o=10+((i=t).filename&&i.filename.length+1||0),function(e,t,n,r){var i=e.length,a=new vl(r+i+5*(1+Math.floor(i/7e3))+8),s=a.subarray(r,a.length-8),o=0;if(!t||8>i)for(var l=0;i>=l;l+=65535){var u=l+65535;i>u?o=Wl(s,o,e.subarray(l,u)):(s[l]=!0,o=Wl(s,o,e.subarray(l,i)))}else{for(var c=ql[t-1],d=c>>>13,h=8191&c,p=(1<<n)-1,f=new yl(32768),m=new yl(p+1),g=Math.ceil(n/3),v=2*g,y=function(t){return(e[t]^e[t+1]<<g^e[t+2]<<v)&p},D=new Dl(25e3),b=new yl(288),x=new yl(32),C=0,F=0,_=(l=0,0),k=0,w=0;i>l;++l){var E=y(l),j=32767&l,A=m[E];if(f[j]=A,m[E]=j,l>=k){var S=i-l;if((C>7e3||_>24576)&&S>423){o=Hl(e,s,0,D,b,x,F,_,w,l-w,o),_=C=F=0,w=l;for(var N=0;286>N;++N)b[N]=0;for(N=0;30>N;++N)x[N]=0}var B=2,T=0,P=h,L=j-A&32767;if(S>2&&E==y(l-L))for(var R=Math.min(d,S)-1,z=Math.min(32767,l),O=Math.min(258,S);z>=L&&--P&&j!=A;){if(e[l+B]==e[l+B-L]){for(var M=0;O>M&&e[l+M]==e[l+M-L];++M);if(M>B){if(B=M,T=L,M>R)break;var I=Math.min(L,M-2),U=0;for(N=0;I>N;++N){var $=l-L+N+32768&32767,W=$-f[$]+32768&32767;W>U&&(U=W,A=$)}}}L+=(j=A)-(A=f[j])+32768&32767}if(T){D[_++]=268435456|kl[B]<<18|wl[T];var H=31&kl[B],q=31&wl[T];F+=bl[H]+xl[q],++b[257+H],++x[q],k=l+B,++C}else D[_++]=e[l],++b[e[l]]}}o=Hl(e,s,!0,D,b,x,F,_,w,l-w,o)}return Rl(a,0,r+Ll(o)+8)}(a=e,null==(s=t).level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o)),u=l.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Gl(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(l,t),Gl(l,u-8,n.d()),Gl(l,u-4,r),l}(function(e){var t=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new vl(e.length+(e.length>>>1)),r=0,i=function(e){n[r++]=e},a=0;t>a;++a){if(r+5>n.length){var s=new vl(r+8+(t-a<<1));s.set(n),n=s}var o=e.charCodeAt(a);128>o?i(o):2048>o?(i(192|o>>>6),i(128|63&o)):o>55295&&57344>o?(i(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++a))>>>18),i(128|o>>>12&63),i(128|o>>>6&63),i(128|63&o)):(i(224|o>>>12),i(128|o>>>6&63),i(128|63&o))}return Rl(n,0,r)}(Zl(t)),{mtime:0});return{contentType:Yl,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===gl){var i=function(e){return e?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):e}(Zl(t)),a=(e=>"data="+encodeURIComponent("string"==typeof e?e:Zl(e)))(i);return{contentType:"application/x-www-form-urlencoded",body:a,estimatedSize:new Blob([a]).size}}var s=Zl(t);return{contentType:"application/json",body:s,estimatedSize:new Blob([s]).size}}},tu=e=>{var t,n,r,i=eu(e);return!i||(n=e.compression,r=wo(e.url,"compression"),n!==nn.GZipJS&&r!==nn.GZipJS&&"gzip"!==r)||((t=i.body)instanceof ArrayBuffer?on(new Uint8Array(t)):ArrayBuffer.isView(t)&&on(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:i}:(Ql=!0,{url:Jl(e.url,"compression"),encodedBody:eu(Yt({},e,{compression:void 0,xt:void 0}))})},nu=e=>{try{return tu(e)}catch(Lt){return Ii.error(Lt),void(null==e.callback||e.callback({statusCode:0,error:Lt}))}},ru=function(){var e=Kt(function*(e){var t=Zl(e.data),n=yield function(e,t,n){return dn.apply(this,arguments)}(t,Vt.DEBUG,{rethrow:!0});if(!n)return e;var r=yield n.arrayBuffer();return Yt({},e,{xt:{contentType:Yl,body:r,estimatedSize:r.byteLength}})});return function(t){return e.apply(this,arguments)}}(),iu=(e,t)=>Xl(e,{_:(new Date).getTime().toString(),ver:Vt.JS_SDK_VERSION,compression:t}),au=[];Mt&&au.push({transport:"fetch",method(e){var t,n=nu(e);if(n){var{url:r,encodedBody:i}=n,{contentType:a,body:s,estimatedSize:o}=null!=i?i:{},l=new Headers;ts(e.headers,function(e,t){l.append(t,e)}
2),a&&l.append("Content-Type",a);var u=null,c=null;if(Ut){var d=new Ut;u={signal:d.signal,timeout:setTimeout(()=>{var t,n;t=e.timeout,(n=new Error("PostHog request timed out"+(t?" after "+t+"ms":""))).name="AbortError",d.abort(c=n)},e.timeout)}}Mt(r,Yt({method:(null==e?void 0:e.method)||"GET",headers:l,keepalive:"POST"===e.method&&52428.8>(o||0),body:s,signal:null==(t=u)?void 0:t.signal},e.fetchOptions)).then(t=>t.text().then(n=>{var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){Ii.error(e)}null==e.callback||e.callback(r)})).catch(t=>{t===c?Ii.warn(t):Ii.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>u?clearTimeout(u.timeout):null)}}}),It&&au.push({transport:"XHR",method(e){var t=nu(e);if(t){var n=new It,{url:r,encodedBody:i}=t;n.open(e.method||"GET",r,!0);var{contentType:a,body:s}=null!=i?i:{};ts(e.headers,function(e,t){n.setRequestHeader(t,e)}),a&&n.setRequestHeader("Content-Type",a),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(e){}null==e.callback||e.callback(t)}},n.send(s)}}}),null!=Rt&&Rt.sendBeacon&&au.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:n}=tu(e),{contentType:r,body:i}=null!=n?n:{};if(!i)return;var a=i instanceof Blob?i:new Blob([i],{type:r});Rt.sendBeacon(t,a)}catch(e){}}});var su=3e3;class ou{constructor(e,t){this.br=!0,this._r=[],this.wr=In((null==t?void 0:t.flush_interval_ms)||su,250,5e3,Ii.createLogger("flush interval"),su),this.kr=e}enqueue(e){this._r.push(e),this.Sr||this.Cr()}unload(){this.Ir();var e=this._r.length>0?this.Tr():{},t=Object.values(e);[...t.filter(e=>0===e.url.indexOf("/e")),...t.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Er(Yt({},e,{transport:"sendBeacon"}))})}enable(){this.br=!1,this.Cr()}Cr(){var e=this;this.br||(this.Sr=setTimeout(()=>{if(this.Ir(),this._r.length>0){var t=this.Tr(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&bn(n.data)&&ts(n.data,e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp}),e.Er(n)};for(var r in t)n()}},this.wr))}Er(e){try{this.kr(e)}catch(e){Ii.error(e)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var e={};return ts(this._r,t=>{var n,r=t,i=(r?r.batchKey:null)||r.url;_n(e[i])&&(e[i]=Yt({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)}),this._r=[],e}}var lu=["retriesPerformedSoFar"];class uu{constructor(e){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=e,this._r=[],this.Rr=!0,!_n(Pt)&&"onLine"in Pt.navigator&&(this.Rr=Pt.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},us(Pt,"online",this.Or),us(Pt,"offline",this.Fr))}get length(){return this._r.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,n=Qt(e,lu);Sn(t)&&(n.url=Xl(n.url,{retry_count:t})),this._instance._send_request(Yt({},n,{callback:e=>{if(200!==e.statusCode&&(400>e.statusCode||e.statusCode>=500)){if((0===e.statusCode?3:10)>(null!=t?t:0))return void this.st(Yt({retriesPerformedSoFar:t},n));0===e.statusCode&&Ii.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(null!=t?t:0)+" retries.")}null==n.callback||n.callback(e)}}))}st(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=Math.random()-.5;return Math.ceil(r+i*(r-n))}(t),r=Date.now()+n;this._r.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),Ii.warn(i),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),0===this._r.length)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout(()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()},this.Pr)}Lr(){var e=Date.now(),t=[],n=this._r.filter(n=>e>n.retryAt||(t.push(n),!1));if(this._r=t,n.length>0)for(var{requestOptions:r}of n)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.$r&&(clearTimeout(this.$r),this.$r=void 0),this.Mr=!1,_n(Pt)||(this.Or&&(Pt.removeEventListener("online",this.Or),this.Or=void 0),this.Fr&&(Pt.removeEventListener("offline",this.Fr),this.Fr=void 0)),this._r))try{this._instance._send_request(Yt({},e,{transport:"sendBeacon"}))}catch(Pt){Ii.error(Pt)}this._r=[]}}class cu{constructor(e){this.Dr=()=>{var e,t,n,r;this.Nr||(this.Nr={});var i=this.scrollElement(),a=this.scrollY(),s=i?Math.max(0,i.scrollHeight-i.clientHeight):0,o=a+((null==i?void 0:i.clientHeight)||0),l=(null==i?void 0:i.scrollHeight)||0;this.Nr.lastScrollY=Math.ceil(a),this.Nr.maxScrollY=Math.max(a,null!==(e=this.Nr.maxScrollY)&&void 0!==e?e:0),this.Nr.maxScrollHeight=Math.max(s,null!==(t=this.Nr.maxScrollHeight)&&void 0!==t?t:0),this.Nr.lastContentY=o,this.Nr.maxContentY=Math.max(o,null!==(n=this.Nr.maxContentY)&&void 0!==n?n:0),this.Nr.maxContentHeight=Math.max(l,null!==(r=this.Nr.maxContentHeight)&&void 0!==r?r:0)},this._instance=e}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){us(Pt,"scroll",this.Dr,{capture:!0}),us(Pt,"scrollend",this.Dr,{capture:!0}),us(Pt,"resize",this.Dr)}scrollElement(){if(!this.qr)return null==Pt?void 0:Pt.document.documentElement;var e=bn(this.qr)?this.qr:[this.qr];for(var t of e){var n=null==Pt?void 0:Pt.document.querySelector(t);if(n)return n}}jr(e){var t="y"===e?"scrollTop":"scrollLeft";if(this.qr){var n=this.scrollElement();return n&&n[t]||0}return Pt?"y"===e?Pt.scrollY||Pt.pageYOffset||Pt.document.documentElement.scrollTop||0:Pt.scrollX||Pt.pageXOffset||Pt.document.documentElement.scrollLeft||0:0}scrollY(){return this.jr("y")}scrollX(){return this.jr("x")}}var du=e=>Io(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties,null==e?void 0:e.config.disable_capture_url_hashes
2);class hu{constructor(e,t,n,r){this.Br=e=>{var t=this.Hr();if(!t||t.sessionId!==e){var n={sessionId:e,props:this.Ur(this._instance)};this.zr.register({[Na]:n})}},this._instance=e,this.Vr=t,this.zr=n,this.Ur=r||du,this.Vr.onSessionId(this.Br)}Hr(){return this.zr.props[Na]}getSetOnceProps(){var e,t=null==(e=this.Hr())?void 0:e.props;return t?"r"in t?Uo(t,this._instance.config.disable_capture_url_hashes):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return ts(ss(this.getSetOnceProps()),(t,n)=>{"$current_url"===n&&(n="url"),e["$session_entry_"+gn(n)]=t}),e}}class pu{constructor(){this.Wr={}}on(e,t){return this.Wr[e]||(this.Wr[e]=[]),this.Wr[e].push(t),()=>{this.Wr[e]=this.Wr[e].filter(e=>e!==t)}}emit(e,t){for(var n of this.Wr[e]||[])n(t);for(var r of this.Wr["*"]||[])r(e,t)}}var fu=Ui("[SessionId]");class mu{on(e,t){return this.Gr.on(e,t)}constructor(e,t,n){var r;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new pu,this.Kr=(e,t)=>
2!(!Sn(e)||!Sn(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Ha)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=e.config,this.zr=e.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=t||gs,this.ri=n||gs;var i=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*In(this.Se.session_idle_timeout_seconds||1800,60,36e3,fu.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni="ph_"+i+"_window_id",this.si="ph_"+i+"_primary_window_exists",this.oi()){var a=Es.F(this.ni),s=Es.F(this.si);a&&!s?this.Xr=a:Es.A(this.ni),Es.q(this.si,!0)}if(null!=(r=this.Se.bootstrap)&&r.sessionID)try{var o=(()=>{var e=this.Se.bootstrap.sessionID.replace(/-/g,"");if(32!==e.length)throw new Error("Not a valid UUID");if("7"!==e[12])throw new Error("Not a UUIDv7");return parseInt(e.substring(0,12),16)})();this.ai(this.Se.bootstrap.sessionID,(new Date).getTime(),o)}catch(e){fu.error("Invalid sessionID in bootstrap",e)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return _n(this.Qr)&&(this.Qr=[]),this.Qr.push(e),this.ei&&e(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter(t=>t!==e)}}oi(){return"memory"!==this.Se.persistence&&!this.zr.Vt&&Es.N()}ui(e){e!==this.Xr&&(this.Xr=e,this.oi()&&Es.q(this.ni,e))}hi(){return this.Xr?this.Xr:this.oi()?Es.F(this.ni):null}di(e){var t=this.Zr;return!En(t)&&!En(e)&&5e3>Math.abs(e-t)}ai(e,t,n){var r=t!==this._sessionActivityTimestamp,i=!(e!==this.ei||n!==this._sessionStartTimestamp);this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.ei=e,i&&!r||i&&this.di(t)||(this.Zr=t,this.zr.register({[ca]:[t,e,n]}))}ci(){var e,t=null==(e=this.Se)?void 0:e.persistence_save_debounce_ms;return Sn(t)&&t>0}vi(){this.ci()?this.zr.refreshKey(ca):(this.zr.flush(),this.zr.load())}fi(){var e;if(!En(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,t,n]=this.pi();t===this.ei&&n===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[ca]:[this._sessionActivityTimestamp,null!==(e=this.ei)&&void 0!==e?e:null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[e]=this.pi(),t=Sn(e)?e:0,n=Sn(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(t,n)}mi(e){return this.vi(),this.Kr(e,this.gi())}pi(){var e=this.zr.props[ca];return bn(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&Pt&&(Pt.removeEventListener(Ya,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&Es.A(this.si)},us(Pt,Ya,this.Jr,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.Se.cookieless_mode===Ha)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),[,r,i]=this.pi(),a=this.gi(),s=this.hi(),o=Sn(i)&&Math.abs(n-i)>864e5,l=!1,u=!1,c=!r,d=r,h=!c&&!e&&this.Kr(n,a);h&&((h=this.mi(n))||fu.info("cross-tab refresh kept the session alive",{sessionId:r}),[,r,i]=this.pi()),c||h||o?(r=this.ti(),s=this.ri(),fu.info("new session ID generated",{sessionId:r,windowId:s,changeReason:{noSessionId:c,activityTimeout:h,sessionPastMaximumLength:o}}),i=n,l=!0):(s||(s=this.ri(),l=!0),(u=r!==d)&&(fu.info("adopted cross-tab session id",{sessionId:r,windowId:s}),l=!0));var p=Sn(a)&&e&&!o?a:n,f=Sn(i)?i:(new Date).getTime();this.ui(s),this.ai(r,p,f),e||this.ii();var m={noSessionId:c,activityTimeout:h,sessionPastMaximumLength:o,crossTabAdoption:u};return l&&this.Qr.forEach(e=>e(r,s,m)),{sessionId:r,windowId:s,sessionStartTimestamp:f,changeReason:l?m:void 0,lastActivityTimestamp:a}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout(()=>{if(!this.Yr)if(this.mi((new Date).getTime())){var e=this.ei;this.resetSessionId(),this.Gr.emit("forcedIdleReset",{idleSessionId:e})}else this.ii()},1.1*this.sessionTimeoutMs))}}var gu=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&pn(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>pn(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver};function vu(){return(vu=Kt(function*(){var e=null==Rt?void 0:Rt.userAgentData;if(null!=e&&e.getHighEntropyValues)try{var t=yield e.getHighEntropyValues(["model"]),n=null==t?void 0:t.model;return kn(n)&&n.length>0?n:void 0}catch(e){return void Ii.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",e)}})).apply(this,arguments)}var yu=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function Du(e,t,n){return Zl({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var bu={exact:(e,t)=>
2t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>yu(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!yu(t,e))),icontains:(e,t)=>t.map(xu).some(t=>e.map(xu).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(xu).every(t=>e.map(xu).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})},xu=e=>e.toLowerCase();function Cu(e,t){return!e||Object.entries(e).every(e=>{var[n,r]=e,i=null==t?void 0:t[n];if(_n(i)||En(i))return!1;var a=[String(i)],s=bu[r.operator];return!!s&&s(r.values,a)})}var Fu="custom",_u="i.posthog.com",ku=/^\/static\//;class wu{constructor(e){this.bi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+_u,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.bi[this.apiHost]||(this.bi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Fu),this.bi[this.apiHost]}wi(e){if(ku.test(e)){var t=this.instance.config.asset_host;if("string"==typeof t)return t.trim().replace(/\/$/,"")||void 0}}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var n=this.wi(t);if(n)return""+n+t}if(this.region===Fu)return this.apiHost+t;var r=_u+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var Eu=Ui("[Surveys]"),ju="seenSurvey_",Au=[Qo,Xo,Jo],Su={ignoreConditions:!1,ignoreDelay:!1,displayType:sl},Nu=Ui("[PostHog ExternalIntegrations]"),Bu={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Tu{constructor(e){this._instance=e}Mt(e,t){var n;null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,e=>{if(e)return Nu.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e=this,t=function(t){var n,i,a;!r||null!=(n=Ht.__PosthogExtensions__)&&null!=(n=n.integrations)&&n[t]||e.Mt(Bu[t],()=>{var n;null==(n=Ht.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[t])||n.start(e._instance)}),!r&&null!=(i=Ht.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[t]&&(null==(a=Ht.__PosthogExtensions__)||null==(a=a.integrations)||null==(a=a[t])||a.stop())};for(var[n,r]of Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{})){var i;t(n)}}}var Pu,Lu={},Ru=0,zu=()=>{},Ou='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Mu="Surveys module not available",Iu="sanitize_properties is deprecated. Use before_send instead",Uu="Invalid value for property_denylist config: ",$u="posthog",Wu=!Kl&&-1===(null==Wt?void 0:Wt.indexOf("MSIE"))&&-1===(null==Wt?void 0:Wt.indexOf("Mozilla")),Hu=e=>{var t;return Yt({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ls(null==zt?void 0:zt.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:zu,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:Ot&&kn(null==Ot?void 0:Ot.search)&&-1!==Ot.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==Pt||null==(t=Pt.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){Ii.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Ga,before_send:void 0,request_queue_config:{flush_interval_ms:su},error_tracking:{},_onCapture:zu},(e=>({rageclick:e&&e>="2026-05-30"?{content_ignorelist:qs,ignore_text_selection:!0}
2:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:e&&e>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>="2026-05-30"?250:0,split_storage:!(!e||"2026-05-30">e),detect_google_search_app:!(!e||"2026-05-30">e),disable_capture_url_hashes:!(!e||"2026-06-25">e)}))(e))},qu=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],Vu=e=>{var t={};for(var[n,r]of qu)_n(e[n])||(t[r]=e[n]);var i=ns({},t,e),a=e.__preview_external_dependency_versioned_paths;return _n(a)||(_n(e.strict_script_versioning)&&(i.strict_script_versioning=!!a),kn(a)&&_n(e.asset_host)&&(i.asset_host=a)),bn(e.property_blacklist)&&(_n(e.property_denylist)?i.property_denylist=e.property_blacklist:bn(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:Ii.error(Uu+e.property_denylist)),i};class Gu{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(e){Ii.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Ku{ki(e,t){if(e){var n=this.Si.indexOf(e);-1!==n&&this.Si.splice(n,1)}return this.Si.push(t),null==t.initialize||t.initialize(),t}Ci(){return this.config.cookieless_mode===Ha||this.config.cookieless_mode===Wa&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}get flagsEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}constructor(){var e;this.webPerformance=new Gu,this.Ii=!1,this.version=Vt.LIB_VERSION,this.Ti=new pu,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Hu(),this.SentryIntegration=Do,this.sentryIntegration=e=>function(e,t){var n=yo(e,t);return{name:vo,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new cu(this),this.pageViewManager=new bo(this),this.rateLimiter=new hl(this),this.requestRouter=new wu(this),this.consent=new js(this),this.externalIntegrations=new Tu(this);var t=null!==(e=Ku.__defaultExtensionClasses)&&void 0!==e?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{var r=kn(e)?{[e]:t}:e;this.setPersonProperties(r),null==n||n({})},set_once:(e,t,n)=>{var r=kn(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==n||n({})}},this.on("eventCaptured",e=>Ii.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,n){if(n&&n!==$u){var r,i=null!==(r=Lu[n])&&void 0!==r?r:new Ku;return i._init(e,t,n),Lu[n]=i,Lu[$u][n]=i,i}return this._init(e,t,n)}_init(e,t,n){var r,i;void 0===t&&(t={});var a=kn(e)?e.trim():"";if(!a)return Ii.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.Oi(t.debug),this.Li=t,this.Fi=[],t.person_profiles?this.Pi=t.person_profiles:t.process_person&&(this.Pi=t.process_person);var s=Hu(t.defaults),o=Vu(t),l=ns({},s,o,{name:n,token:a});Cn(s.rageclick)&&Cn(o.rageclick)&&(l.rageclick=ns({},s.rageclick,o.rageclick)),Cn(s.session_recording)&&Cn(o.session_recording)&&(l.session_recording=ns({},s.session_recording,o.session_recording)),this.set_config(l),this.config.on_xhr_error&&Ii.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:ml;var u=this.Ai();this.persistence=new Go(this.config,u),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new Go(Yt({},this.config,{persistence:"sessionStorage"}),u,!1);var c=Yt({},this.persistence.props),d=Yt({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.$i=new ou(e=>this.Di(e),this.config.request_queue_config),this.Ni=new uu(this),this.__request_queue=[];var h=this.Ci();if(h||(this.sessionManager=new mu(this),this.sessionPropsManager=new hu(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Ii.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.qi(h)},0)):(Ii.info("Initializing extensions synchronously"),this.qi(h)),Vt.DEBUG=Vt.DEBUG||this.config.debug,Vt.DEBUG&&Ii.info("Starting in debug mode",{this:this,config:t,thisC:Yt({},this.config),p:c,s:d}),!this.config.identity_distinct_id||null!=(r=t.bootstrap)&&r.distinctID||(t.bootstrap=Yt({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}
2)),void 0!==(null==(i=t.bootstrap)?void 0:i.distinctID)){var p=t.bootstrap.distinctID,f=this.get_distinct_id(),m=this.persistence.get_property(Sa);if(t.bootstrap.isIdentifiedID&&null!=f&&f!==p&&m===qa)this.identify(p);else if(t.bootstrap.isIdentifiedID&&null!=f&&f!==p&&m===Va)Ii.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var g=this.config.get_device_id(gs()),v=t.bootstrap.isIdentifiedID?g:p;this.persistence.set_property(Sa,t.bootstrap.isIdentifiedID?Va:qa),this.register({distinct_id:p,$device_id:v})}}if(h)this.register_once({distinct_id:Oa,$device_id:null},"");else if(!this.get_distinct_id()){var y=this.config.get_device_id(gs());this.register_once({distinct_id:y,$device_id:y},""),this.persistence.set_property(Sa,qa)}return us(Pt,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var n=e.config.segment;if(!n)return t();!function(e,t){var n=e.config.segment;if(!n)return t();var r=n=>{var r=()=>n.anonymousId()||gs();e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(Sa,Va)),t()},i=n.user();"then"in i&&xn(i.then)?i.then(r):r(i)}(e,()=>{n.register((e=>{Promise&&Promise.resolve||go.warn("This browser does not have Promise support, and can not use the segment integration");var t=(t,n)=>{if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(go.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(go.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,Qa),identify:e=>t(e,Xa),screen:e=>t(e,"$screen")}})(e)).then(()=>{t()})})}(this,()=>this.ji()):this.ji(),xn(this.config._onCapture)&&this.config._onCapture!==zu&&(Ii.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&Ii.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||function(){return vu.apply(this,arguments)}().then(e=>{e&&this.register({[Vi]:e})}).catch(zu),this}qi(e){var t,n,r,i,a,s,o,l=performance.now(),u=Yt({},Ku.__defaultExtensionClasses,this.config.__extensionClasses),c=[];u.featureFlags&&this.Si.push(this.featureFlags=null!==(t=this.featureFlags)&&void 0!==t?t:new u.featureFlags(this)),u.exceptions&&this.Si.push(this.exceptions=null!==(n=this.exceptions)&&void 0!==n?n:new u.exceptions(this)),u.historyAutocapture&&this.Si.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.Si.push(this.tracingHeaders=new u.tracingHeaders(this)),u.siteApps&&this.Si.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.Si.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.Si.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.Si.push(this.surveys=null!==(r=this.surveys)&&void 0!==r?r:new u.surveys(this)),u.logs&&this.Si.push(this.logs=null!==(i=this.logs)&&void 0!==i?i:new u.logs(this)),u.conversations&&this.Si.push(this.conversations=null!==(a=this.conversations)&&void 0!==a?a:new u.conversations(this)),u.productTours&&this.Si.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.Si.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.Si.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,fo)),u.toolbar&&this.Si.push(this.toolbar=null!==(s=this.toolbar)&&void 0!==s?s:new u.toolbar(this)),u.experiments&&this.Si.push(this.experiments=null!==(o=this.experiments)&&void 0!==o?o:new u.experiments(this)),this.Si.forEach(e
2=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>{if(this.Bi){var e=this.Bi;this.Bi=void 0,this.pr(e)}}),this.Hi(c,l)}Hi(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Hi(e,t)},0);var n=e.shift();if(n)try{n()}catch(e){Ii.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({[Ma]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[Ia]:r}),this.config.__preview_deferred_init_extensions&&Ii.info("PostHog extensions initialized ("+r+"ms)")}pr(e){var t;if(!zt||!zt.body)return Ii.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.pr(e)},500);this.config.__preview_deferred_init_extensions&&(this.Bi=e),this.Ui=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=fn(e.supportedCompression,ml)?ml:fn(e.supportedCompression,gl)?gl:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:Ga}),this.Si.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}ji(){try{this.config.loaded(this)}catch(e){Ii.critical("`loaded` function failed",e)}if(this.zi(),this.config.internal_or_test_user_hostname&&null!=Ot&&Ot.hostname){var e=Ot.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ci())&&this.Vi()},1),this.Wi=new fl(this),this.Wi.load()}zi(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.$i)||e.enable())}_dom_loaded(){this.is_capturing()&&es(this.__request_queue,e=>this.Di(e)),this.__request_queue=[],this.zi()}_handle_unload(){var e,t,n,r;null==(e=this.surveys)||null==e.handlePageUnload||e.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(Ja),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(n=this.$i)||n.unload(),null==(r=this.Ni)||r.unload()):this.Gi()&&this.capture(Ja,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?Wu?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=Yt({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,(_n(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,n,r,i=Yt({},e);i.timeout=i.timeout||6e4,i.url=iu(i.url,i.compression);var a=null!==(t=i.transport)&&void 0!==t?t:"fetch",s=au.filter(e=>!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)),o=null!==(n=null==(r=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===a)return e[t]}(s))?void 0:r.method)&&void 0!==n?n:s[0].method;if(!o)throw new Error("No available transport method");"sendBeacon"!==a&&i.data&&i.compression===ml&&$t&&!Ql?ru(i).then(e=>{o(e)}).catch(t=>{if(ln(t))return Ql=!0,void o(Yt({},i,{compression:void 0,url:iu(e.url,void 0)}));(e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return ln(e)||t===sn})(t)&&(Ql=!0),o(i)}):o(i)})(Yt({},e,{callback:t=>{var n,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(n=(r=this.config).on_request_error)||n.call(r,t),null==e.callback||e.callback(t)}}))):e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:0}))}Di(e){this.Ni?this.Ni.retriableRequest(e):this._send_request(e)}_execute_array(e){Ru++;try{var t,n=[],r=[],i=[];es(e,e=>{if(e)if(bn(t=e[0]))i.push(e);else if(xn(e))try{e.call(this)}catch(t){Ii.error("Error executing queued PostHog call",e,t)}else bn(e)&&"alias"===t?n.push(e):bn(e)&&-1!==t.indexOf("capture")&&xn(this[t])?i.push(e):r.push(e)});var a=function(e,t){es(e,function(e){try{if(bn(e[0])){var n=t;ts(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){Ii.error("Error executing queued PostHog call",e,t)}})};a(n,this),a(r,this),a(i,this)}finally{Ru--}}push(e){if(Ru>0&&bn(e)&&kn(e[0])){var t=Ku.prototype[e[0]];xn(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,n){var r,i,a,s,o;
2if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!_n(e)&&kn(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var u=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==u||!u.isRateLimited){null!=t&&t.$current_url&&!kn(null==t?void 0:t.$current_url)&&(Ii.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=n&&n.Zi||Ii.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var c=new Date,d=(null==n?void 0:n.timestamp)||c,h=Gr(null==n?void 0:n.uuid,gs),p={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},d,h)};e===Qa&&this.config.__preview_capture_bot_pageviews&&l&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),u&&(p.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),(null==n?void 0:n.$set)&&(p.$set=null==n?void 0:n.$set);var f=null==n?void 0:n.$unset;f&&(p.$unset=f);var m,g,v,y=this.Qi(null==n?void 0:n.$set_once,e!==Za,e===Xa);if(y&&(p.$set_once=y),null!=n&&n._noTruncate||(i=this.config.properties_string_max_length,a=p,s=e=>kn(e)?e.slice(0,i):e,o=new Set,p=function e(t,n){return t!==Object(t)?s?s(t):t:o.has(t)?void 0:(o.add(t),bn(t)?(r=[],es(t,t=>{r.push(e(t))})):(r={},ts(t,(t,n)=>{o.has(t)||(r[n]=e(t,n))})),r);var r}(a)),p.timestamp=d,_n(null==n?void 0:n.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),e===tl||e===nl){var D=null==t?void 0:t[rl],b=null==t?void 0:t[il];(e=>{try{var t=(e=>((e,t)=>{var n=""+ju+t.id;return t.current_iteration&&t.current_iteration>0&&(n=""+ju+t.id+"_"+t.current_iteration),n})(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){Eu.error("Failed to persist survey seen state",e)}})({id:D,current_iteration:b}),p.$set=Yt({},p.$set,{[(m={id:D,current_iteration:b},g=e===nl?"responded":"dismissed",v="$survey_"+g+"/"+m.id,m.current_iteration&&m.current_iteration>0&&(v="$survey_"+g+"/"+m.id+"/"+m.current_iteration),v)]:!0})}else e===el&&(p.$set=Yt({},p.$set,{[al]:(new Date).toISOString()}));if(e===ll){var x=null==t?void 0:t[cl];x&&(p.$set=Yt({},p.$set,{[ul+"/"+x]:(new Date).toISOString()}))}var C=Yt({},p.properties.$set,p.$set);if(Fn(C)||this.setPersonPropertiesForFlags(C),!jn(this.config.before_send)){var F=this.it(p);if(!F)return;(p=F).uuid=Gr(p.uuid,gs)}this.Ti.emit("eventCaptured",p);var _={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==n?void 0:n._batchKey,transport:null==n?void 0:n.transport};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this.Di(_):this.$i.enqueue(_),p}Ii.critical("This capture call is ignored due to client rate limiting.")}}else Ii.error("No event name provided to posthog.capture")}else Ii.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var a=i?void 0:this.persistence.remove_event_timer(e),s=Yt({},t);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,this.Ci()&&(s.$cookieless_mode=!0),"$snapshot"===e){var o=Yt({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=o.distinct_id,(!kn(s.distinct_id)&&!An(s.distinct_id)||wn(s.distinct_id))&&Ii.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var l,u=function(e,t,n,r){var i,a,s,o;
2if(void 0===r&&(r=!1),!Wt)return{};var l,u,c,d,h,p,f,m,g,v=e?[...So,...t||[]]:[],[y,D]=function(e){for(var t=0;Hr.length>t;t++){var[n,r]=Hr[t],i=n.exec(e),a=i&&(xn(r)?r(i,e):r);if(a)return a}return["",""]}(Wt),b=null!=(l="undefined"!=typeof navigator?navigator:void 0)&&l.brave?{brave:!0}:{},x={detectGoogleSearchApp:n},C=ns(ss({$os:y,$os_version:D,$browser:Ur(Wt,navigator.vendor,b,x),$device:qr(Wt),$device_type:(c=Wt,d={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(a=navigator)?void 0:a.maxTouchPoints,screenWidth:null==Pt||null==(s=Pt.screen)?void 0:s.width,screenHeight:null==Pt||null==(o=Pt.screen)?void 0:o.height,devicePixelRatio:null==Pt?void 0:Pt.devicePixelRatio},g=qr(c),g===Gn||g===Vn||"Kobo"===g||"Kindle Fire"===g||g===Fr?qn:g===hr||g===fr||g===pr||g===br?"Console":g===Yn?"Wearable":g?$n:"Android"===(null==d?void 0:d.userAgentDataPlatform)&&(null!==(h=null==d?void 0:d.maxTouchPoints)&&void 0!==h?h:0)>0?600>Math.min(null!==(p=null==d?void 0:d.screenWidth)&&void 0!==p?p:0,null!==(f=null==d?void 0:d.screenHeight)&&void 0!==f?f:0)/(null!==(m=null==d?void 0:d.devicePixelRatio)&&void 0!==m?m:1)?$n:qn:"Desktop"),$timezone:$o(),$timezone_offset:Wo()}),{$current_url:Eo(r?Kr(null==Ot?void 0:Ot.href):null==Ot?void 0:Ot.href,v,Bo),$host:null==Ot?void 0:Ot.host,$pathname:null==Ot?void 0:Ot.pathname,$raw_user_agent:Wt.length>1e3?Wt.substring(0,997)+"...":Wt,$browser_version:Wr(Wt,navigator.vendor,b,x),$browser_language:zo(),$browser_language_prefix:(u=zo(),"string"==typeof u?u.split("-")[0]:void 0),$screen_height:null==Pt?void 0:Pt.screen.height,$screen_width:null==Pt?void 0:Pt.screen.width,$viewport_height:null==Pt?void 0:Pt.innerHeight,$viewport_width:null==Pt?void 0:Pt.innerWidth,$lib:Vt.LIB_NAME,$lib_version:Vt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return Vt.SDK_DIST_CHANNEL&&(C.$sdk_dist_channel=Vt.SDK_DIST_CHANNEL),C}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var{sessionId:c,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime());s.$session_id=c,s.$window_id=d}this.sessionPropsManager&&ns(s,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&ns(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=null==(h=this.Ni)?void 0:h.length}catch(Pt){s.$sdk_debug_error_capturing_properties=String(Pt)}if(this.requestRouter.region===Fu&&(s.$lib_custom_api_host=this.config.api_host),l=e!==Qa||i?e!==Ja||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),s=ns(s,l),e===Qa&&zt&&(s.title=zt.title),!_n(a)){var p=n.getTime()-a;s.$duration=parseFloat((p/1e3).toFixed(3))}Wt&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=ns({},u,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),bn(this.config.property_denylist)?ts(this.config.property_denylist,function(e){delete s[e]}):Ii.error(Uu+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var f=this.config.sanitize_properties;f&&(Ii.error(Iu),s=f(s,e));var m=this.Ji();return s.$process_person_profile=m,m&&!i&&this.Yi("_calculate_event_properties"),s}Qi(e,t,n){var r;if(void 0===t&&(t=!0),void 0===n&&(n=!1),!this.persistence||!this.Ji())return e;if(this.Ii&&!n)return e;var i=this.persistence.get_initial_props(),a=null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps(),s=ns({},i,a||{},e||{}),o=this.config.sanitize_properties;return o&&(Ii.error(Iu),s=o(s,"$set_once")),t&&(this.Ii=!0),Fn(s)?void 0:s}register(e,t){var n;null==(n=this.persistence)||n.register(e,t)}register_once(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}Ki(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlagResult(e,t)}getAllFeatureFlags(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.getAllFeatureFlags())&&void 0!==e?e:[]}isFeatureEnabled(e,t){var n;return null==(n=this.featureFlags)?void 0:n.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}
2updateFlags(e,t,n){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t,n){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.Ti.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Mu}),()=>{})}onSessionId(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:Mu})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:Mu})}renderSurvey(e,t){var n;null==(n=this.surveys)||n.renderSurvey(e,t)}displaySurvey(e,t){var n;void 0===t&&(t=Su),null==(n=this.surveys)||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,n;return null!==(t=null==(n=this.surveys)?void 0:n.canRenderSurvey(e))&&void 0!==t?t:{visible:!1,disabledReason:Mu}}canRenderSurveyAsync(e,t){var n,r;return void 0===t&&(t=!1),null!==(n=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))&&void 0!==n?n:Promise.resolve({visible:!1,disabledReason:Mu})}Xi(e){return!e||wn(e)?(Ii.critical("Unique user id has not been set in posthog.identify"),!1):e===Oa?(Ii.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(Ii.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return Ii.uninitializedWarning("posthog.identify");if(An(e)&&(e=e.toString(),Ii.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Xi(e)&&this.Yi("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(qi)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(Gi)&&(this.unregister(Gi),this.register({distinct_id:e}));var i,a=(this.persistence.get_property(Sa)||qa)===qa;e!==r&&a?(this.persistence.set_property(Sa,Va),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(Xa,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.Ri=Du(e,t,n),null==(i=this.featureFlags)||i.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(wa))}}setPersonProperties(e,t){if((e||t)&&this.Yi("posthog.setPersonProperties")){var n=Du(this.get_distinct_id(),e,t);this.Ri!==n?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Ri=n):Ii.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var t,n=(bn(e)?e:[e]).filter(e=>kn(e)&&e.length>0);0!==n.length&&this.Yi("posthog.unsetPersonProperties")&&(null==(t=this.featureFlags)||t.unsetPersonPropertiesForFlags(n,!0),this.capture("$set",{$unset:n}),this.Ri=null)}group(e,t,n){if(e&&t){var r=this.getGroups(),i=r[e]!==t;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Yt({},r,{[e]:t})}),i||n){var a={$group_type:e,$group_key:t};n&&(a.$group_set=n),this.capture(Za,a)}n&&this.setGroupPropertiesForFlags({[e]:n}),i&&!n&&this.reloadFeatureFlags()}else Ii.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var n;void 0===t&&(t=!0),null==(n=this.featureFlags)||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e){var t;void 0===e&&(e=!0),null==(t=this.featureFlags)||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t){var n;void 0===t&&(t=!0),this.Yi("posthog.setGroupPropertiesForFlags")&&(null==(n=this.featureFlags)||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){var t,n,r,i,a,s,o,l,u;if(Ii.info("reset"),!this.__loaded)return Ii.uninitializedWarning("posthog.reset");var c,d=this.get_property(qi),h=this.get_property(Vi),p=this.get_property(ia);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),_n(p)||null==(c=this.persistence)||c.register({[ia]:p}),null==(r=this.surveys)||r.reset(),null==(i=this.Wi)||i.stop(),null==(a=this.featureFlags)||a.reset(),null==(s=this.conversations)||s.reset(),null==(o=this.logs)||o.reset(),null==(l=this.persistence)||l.set_property(Sa,qa),null==(u=this.sessionManager)||u.resetSessionId(),this.Ri=null,this.config.cookieless_mode===Ha)this.register_once({distinct_id:Oa,$device_id:null},"");else{var f=this.config.get_device_id(gs());this.register_once({distinct_id:f,$device_id:e?f:d},""),e||_n(h)||this.register({[Vi]:h})}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(n=this.conversations)||n.en()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&n){var i,a=null!==(i=e.timestampLookBack)&&void 0!==i?i:10;if(!n)return r;
2r+="?t="+Math.max(Math.floor(((new Date).getTime()-n)/1e3)-a,0)}return r}alias(e,t){return e===this.get_property(Hi)?(Ii.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yi("posthog.alias")?(_n(t)&&(t=this.get_distinct_id()),e!==t?(this.Ki(Gi,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(Ii.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=Yt({},this.config);if(Cn(e)){var n,r,i,a,s,o,l,u,c,d,h;ns(this.config,Vu(e));var p=this.Ai();null==(n=this.persistence)||n.update_config(this.config,t,p),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new Go(Yt({},this.config,{persistence:"sessionStorage"}),p,!1);var f=this.Oi(this.config.debug);Nn(f)&&(this.config.debug=f),Nn(this.config.debug)&&(this.config.debug?(Vt.DEBUG=!0,Cs.N()&&Cs.q("ph_debug",!0),Ii.info("set_config",{config:e,oldConfig:t,newConfig:Yt({},this.config)})):(Vt.DEBUG=!1,Cs.N()&&Cs.A("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(i=this.exceptions)||i.onConfigChange(),null==(a=this.sessionRecording)||a.startIfEnabledOrStop(),null==(s=this.tracingHeaders)||s.startIfEnabledOrStop(),null==(o=this.autocapture)||o.startIfEnabled(),null==(l=this.heatmaps)||l.startIfEnabled(),null==(u=this.exceptionObserver)||u.startIfEnabledOrStop(),null==(c=this.deadClicksAutocapture)||c.startIfEnabledOrStop(),null==(d=this.surveys)||d.loadIfEnabled(),this.rn(),null==(h=this.externalIntegrations)||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){Vt.LIB_NAME=e,Vt.LIB_VERSION=t}startSessionRecording(e){var t,n,r,i,a,s=!0===e,o={sampling:s||!(null==e||!e.sampling),linked_flag:s||!(null==e||!e.linked_flag),url_trigger:s||!(null==e||!e.url_trigger),event_trigger:s||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(n=this.sessionRecording)||n.overrideSampling()),o.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),o.url_trigger&&(null==(i=this.sessionRecording)||i.overrideTrigger("url")),o.event_trigger&&(null==(a=this.sessionRecording)||a.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Yt({},r,t))}}addExceptionStep(e,t){var n;null==(n=this.exceptions)||n.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!==(e=null==(t=this.logs)?void 0:t.logger)&&void 0!==e?e:Ku.nn}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,n;return null!==(t=null==(n=this.toolbar)?void 0:n.loadToolbar(e))&&void 0!==t&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:$u;return t!==$u&&(t=$u+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(Sa))===Va||(null==(t=this.sessionPersistence)?void 0:t.get_property(Sa))===Va}Ji(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===Ga&&!this._isIdentified()&&Fn(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[Gi])&&(null==(t=this.persistence)||null==(t=t.props)||!t[Ra]))}Gi(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Ji()||this.Yi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(e){return"never"===this.config.person_profiles?(Ii.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ki(Ra,!0),!0)}Ai(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Wa)}rn(){var e,t,n,r,i=this.Ai();return(null==(e=this.persistence)?void 0:e.Vt)!==i&&(null==(n=this.persistence)||n.set_disabled(i)),(null==(t=this.sessionPersistence)?void 0:t.Vt)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i)),i}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==Ha){if(this.Ci()){var n,r,i,a,s;this.reset(!0),null==(n=this.sessionManager)||n.destroy(),null==(r=this.pageViewM
2anager)||r.destroy(),this.sessionManager=new mu(this),this.pageViewManager=new bo(this),this.persistence&&(this.sessionPropsManager=new hu(this,this.sessionManager,this.persistence));var o,l=null!==(i=null==(a=this.config.__extensionClasses)?void 0:a.sessionRecording)&&void 0!==i?i:null==(s=Ku.__defaultExtensionClasses)?void 0:s.sessionRecording;l&&(this.sessionRecording=this.ki(this.sessionRecording,new l(this)),this.Ui&&(null==(o=this.sessionRecording)||null==o.onRemoteConfig||o.onRemoteConfig(this.Ui)))}var u,c;this.consent.optInOut(!0),this.rn(),this.zi(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==Wa&&(null==(u=this.surveys)||u.loadIfEnabled()),(_n(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!==(c=null==e?void 0:e.captureEventName)&&void 0!==c?c:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else Ii.warn(Ou)}opt_out_capturing(){var e,t,n;this.config.cookieless_mode!==Ha?(this.config.cookieless_mode===Wa&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Wa&&(this.register({distinct_id:Oa,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi())):Ii.warn(Ou)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Ha||(this.config.cookieless_mode===Wa?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return Rt?gu(Rt,this.config.custom_blocked_useragents):void 0}Vi(){zt&&("visible"===zt.visibilityState?this.Ei||(this.Ei=!0,this.capture(Qa,{title:zt.title},{send_instantly:!0}),this.Mi&&(zt.removeEventListener(Ka,this.Mi),this.Mi=null)):this.Mi||(this.Mi=this.Vi.bind(this),us(zt,Ka,this.Mi)))}debug(e){!1===e?(null==Pt||Pt.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==Pt||Pt.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}mr(){var e,t,n,r,i,a,s=this.Li||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(Ii.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",r=Ii,i=(t="advanced_disable_flags")in(e=s)&&!jn(e[t]),a=n in e&&!jn(e[n]),i?e[t]:!!a&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]))}it(e){var t;if(jn(this.config.before_send))return e;var n=Object.keys(null!==(t=e.properties)&&void 0!==t?t:{}).filter(Tn),r=bn(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var a of r){if(i=a(i),jn(i)){var s="Event '"+e.event+"' was rejected in beforeSend function";return Bn(e.event)?Ii.warn(s+". This can cause unexpected behavior."):Ii.info(s),null}i.properties&&!Fn(i.properties)||Ii.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var o of n)if(i.properties&&jn(i.properties[o]))return Ii.warn("Event '"+e.event+"' had its '"+o+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return i}getPageViewId(){var e;return null==(e=this.pageViewManager.Ot)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}Oi(e){var t=Nn(e)&&!e,n=Cs.N()&&"true"===Cs.P("ph_debug");return!t&&(!!n||e)}}Ku.__defaultExtensionClasses={},Ku.nn={trace:Pu=()=>{},debug:Pu,info:Pu,warn:Pu,error:Pu,fatal:Pu},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=as(e.prototype[t[n]])}(Ku,["identify"]);class Yu{constructor(e){this.disabled=!1===e;var t=Cn(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}var Qu="$copy_autocapture",Ju=Ui("[AutoCapture]");function Xu(e,t){return t.length>e?t.slice(0,e)+"...":t}function Zu(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Ss(t));return t}var ec=Ui("[ExceptionAutocapture]"),tc=Ui("[TracingHeaders]"),nc=Ui("[Web Vitals]"),rc=9e5,ic="disabled",ac="lazy_loading",sc="awaiting_config",oc="missing_config";Ui("[SessionRecording]"),Ui("[SessionRecording]");var lc="[SessionRecording]",uc=Ui(lc),cc=Ui("[Heatmaps]");function dc(e){return Cn(e)&&"clientX"in e&&"clientY"in e&&An(e.clientX)&&An(e.clientY)}var hc=Ui("[Product Tours]"),pc=e=>{var t;return!e.config.disable_product_tours&&!(null==(t=e.persistence)||!t.get_property(na))},fc=["$set_once","$set"],mc=Ui("[SiteApps]"),gc="Error while initializing PostHog app with config id ";function vc(e,t,n){if(jn(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class yc{constructor(e){this.sn=new pu,this.an=(e,t)=>this.ln(e,t)&&this.un(e,t)&&this.hn(e,t)&&this.dn(e,t),this.ln=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.cn=new Set,this.vn=new Set}init(){var e,t;_n(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,n;if(!_n(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e
2=>{var t,n;null==(t=this.vn)||t.add(e),null==(n=e.steps)||n.forEach(e=>{var t;null==(t=this.cn)||t.add((null==e?void 0:e.event)||"")})}),null!=(n=this._instance)&&n.autocapture)){var r,i=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&i.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(i)}}on(e,t){var n;null!=t&&0!=e.length&&(this.cn.has(e)||this.cn.has(null==t?void 0:t.event))&&this.vn&&(null==(n=this.vn)?void 0:n.size)>0&&this.vn.forEach(e=>{this.fn(t,e)&&this.sn.emit("actionCaptured",e.name)})}pn(e){this.onAction("actionCaptured",t=>e(t))}fn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n of t.steps)if(this.an(e,n))return!0;return!1}onAction(e,t){return this.sn.on(e,t)}un(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!vc(r,t.url,t.url_matching||"contains"))return!1}return!0}hn(e,t){return!!this.gn(e,t)&&!!this.mn(e,t)&&!!this.yn(e,t)}gn(e,t){var n;if(null==t||!t.href)return!0;var r=this.bn(e);if(r.length>0)return r.some(e=>vc(e.href,t.href,t.href_matching||"exact"));var i,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&vc((i=a.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")}mn(e,t){var n;if(null==t||!t.text)return!0;var r=this.bn(e);if(r.length>0)return r.some(e=>vc(e.text,t.text,t.text_matching||"exact")||vc(e.$el_text,t.text,t.text_matching||"exact"));var i,a,s,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!jn(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(o),a=t.text,s=t.text_matching||"exact",i.some(e=>vc(e,a,s)))}yn(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var a=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&a)try{return new RegExp(t.selector_regex).test(a)}catch(e){return!1}return!1}bn(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}dn(e,t){return null==t||!t.properties||0===t.properties.length||Cu(t.properties.reduce((e,t)=>{var n=bn(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class Dc{constructor(e){this._n=[],this._instance=e,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(e,t){return!!e&&Cu(e.propertyFilters,null==t?void 0:t.properties)}Cn(e,t){var n=new Map;return e.forEach(e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach(t=>{if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}})}),n}In(e,t,n){var r=(n===Ko?this.wn:this.xn).get(e),i=[];return this.Tn(e=>{i=e.filter(e=>null==r?void 0:r.includes(e.id))}),i.filter(r=>{var i,a=null==(i=r.conditions)||null==(i=i[n])||null==(i=i.values)?void 0:i.find(t=>t.name===e);return this.Sn(a,t)})}register(e){var t;_n(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.En(e),this.Mn(e))}Mn(e){var t=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0});0!==t.length&&(null==this.Pn&&(this.Pn=new yc(this._instance),this.Pn.init(),this.Pn.pn(e=>{this.onAction(e)})),t.forEach(e=>{var t,n,r,i,a;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(n=e.conditions)&&null!=(n=n.actions)&&n.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(i=this.Pn)||i.register(e.conditions.actions.values),null==(a=e.conditions)||null==(a=a.actions)||null==(a=a.values)||a.forEach(t=>{if(t&&t.name){var n=this.kn.get(t.name);n&&n.push(e.id),this.kn.set(t.name,n||[e.id])}}))}))}En(e){var t,n=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}),r=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0});0===n.length&&0===r.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.wn=this.Cn(e,Ko),this.xn=this.Cn(e,Yo))}onEvent(e,t){var n,r,i=this.Rn(),a=(null==t||null==(n=t.properties)?void 0:n.$survey_id)||(null==t||null==(r=t.properties)?void 0:r.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){var s=this.On(e,a);if("consume"===s)return i.info("event consumed activated item, remov
2ing it",{event:e,itemId:a}),void this.Ln([a]);if("persist"===s)return i.info("shown item promoted to persisted activation",{event:e,itemId:a}),void this.Fn(a)}if(this.xn.has(e)){var o=this.In(e,t,Yo);o.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:o.map(e=>e.id)}),this.Ln(o.map(e=>e.id)),o.forEach(e=>this.An(e.id)))}if(this.wn.has(e)){i.info("event name matched",{event:e,eventPayload:t,items:this.wn.get(e)});var l=this.In(e,t,Ko);this.$n(l.map(e=>e.id))}}onAction(e){this.kn.has(e)&&this.$n(this.kn.get(e)||[])}$n(e){0!==e.length&&(this._n=[...new Set([...this._n,...e])],this.Rn().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Fn(e){this._n=this._n.filter(t=>t!==e);var t=this.Dn();t.includes(e)||this.Nn([...t,e])}Ln(e){var t=new Set(e);this._n=this._n.filter(e=>!t.has(e));var n=this.Dn(),r=n.filter(e=>!t.has(e));r.length!==n.length&&this.Nn(r)}Dn(){var e,t=this.qn();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter(e=>!this.jn(e))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}Bn(){return this.Pn}}class bc extends Dc{constructor(e){super(e)}qn(){return _a}Hn(){return el}Tn(e){var t;null==(t=this._instance)||t.getSurveys(e)}An(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}Rn(){return Eu}Nn(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[_a]:e})}jn(){return!1}On(e,t){var n;this.Tn(e=>{n=e.find(e=>e.id===t)});var r=!n||function(e){var t,n,r,i=(null!==(t=null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)&&void 0!==t?t:0)>0;return e.schedule===Zo||!(null==(r=e.conditions)||null==(r=r.events)||!r.repeatedActivation||!i)}(n);return r?e===el?"consume":"ignore":e===el?"persist":e===tl||e===nl?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var xc="SDK is not enabled or survey functionality is not yet loaded",Cc="Disabled. Not loading surveys.",Fc=null!=Pt&&Pt.location?jo(Pt.location.hash,"__posthog")||jo(location.hash,"state"):null,_c="_postHogToolbarParams",kc=Ui("[Toolbar]"),wc=Ui("[FeatureFlags]"),Ec=Ui("[FeatureFlags]",{debugEnabled:!0}),jc="\" failed. Feature flags didn't load in time.",Ac=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},Sc=e=>{var t={};for(var[n,r]of rs(e||{}))r&&(t[n]=r);return t},Nc=Ui("[Error tracking]"),Bc="Refusing to render web experiment since the viewer is a likely bot",Tc={icontains:(e,t)=>!!Pt&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!Pt&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!Pt&&yu(t.href,e),not_regex:(e,t)=>!!Pt&&!yu(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class Pc{get Se(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{Pc.Un("retrieved web experiments from the server"),t.zn=new Map,e.forEach(e=>{if(e.feature_flag_key){var n;t.zn&&(Pc.Un("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(n=t.zn)||n.set(e.feature_flag_key,e));var r=t._instance.getFeatureFlag(e.feature_flag_key);kn(r)&&e.variants[r]&&t.Vn(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var i in e.variants){var a=e.variants[i];Pc.Wn(a)&&t.Vn(e.name,i,a.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())Pc.Un(Bc);else if(!this.Se.disable_web_experiments){if(jn(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Pc.Un("applying feature flags",e),e.forEach(e=>{var t;if(this.zn&&null!=(t=this.zn)&&t.has(e)){var n,r=this._instance.getFeatureFlag(e),i=null==(n=this.zn)?void 0:n.get(e);r&&null!=i&&i.variants[r]&&this.Vn(i.name,r,i.variants[r].transforms)}})}}previewWebExperiment(){var e=Pc.getWindowLocation();if(null!=e&&e.search){var t=wo(null==e?void 0:e.search,"__experiment_id"),n=wo(null==e?void 0:e.search,"__experiment_variant");t&&n&&(Pc.Un("previewing web experiments "+t+" && "+n),this.getWebExperiments(e=>{this.Gn(parseInt(t),n,e)},!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}
2getWebExperiments(e,t,n){if(this.Se.disable_web_experiments&&!n)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}Gn(e,t,n){var r=n.filter(t=>t.id===e);r&&r.length>0&&(Pc.Un("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Vn(r[0].name,t,r[0].variants[t].transforms))}static Wn(e){return!jn(e.conditions)&&Pc.Zn(e)&&Pc.Qn(e)}static Zn(e){var t;if(jn(e.conditions)||jn(null==(t=e.conditions)?void 0:t.url))return!0;var n,r,i,a=Pc.getWindowLocation();return!!a&&(null==(n=e.conditions)||!n.url||Tc[null!==(r=null==(i=e.conditions)?void 0:i.urlMatchType)&&void 0!==r?r:"icontains"](e.conditions.url,a))}static getWindowLocation(){return null==Pt?void 0:Pt.location}static Qn(e){var t;if(jn(e.conditions)||jn(null==(t=e.conditions)?void 0:t.utm))return!0;var n=Po();if(n.utm_source){var r,i,a,s,o,l,u,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,h=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_source||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_source)==n.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==n.utm_medium,f=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==n.utm_term;return d&&p&&f&&h}return!1}static Un(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];Ii.info("[WebExperiments] "+e,n)}
2Vn(e,t,n){this._is_bot()?Pc.Un(Bc):"control"!==t?n.forEach(n=>{if(n.selector){var r;Pc.Un("applying transform of variant "+t+" for experiment "+e+" ",n);var i=null==(r=document)?void 0:r.querySelectorAll(n.selector);null==i||i.forEach(e=>{var t=e;n.html&&(t.innerHTML=n.html),n.css&&t.setAttribute("style",n.css)})}}):Pc.Un("Control variants leave the page unmodified.")}_is_bot(){return Rt&&this._instance?gu(Rt,this.Se.custom_blocked_useragents):void 0}}var Lc=Ui("[Conversations]"),Rc="Conversations not available yet.",zc="console",Oc={featureFlags:class{constructor(e){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Se(){return this._instance.config}get zr(){return this._instance.persistence}ss(e){return this._instance.get_property(e)}os(){var e,t;return null!==(e=null==(t=this.zr)?void 0:t.Gt(this.Se.feature_flag_cache_ttl_ms))&&void 0!==e&&e}ls(){return!!this.os()&&(this.ns||this.Kn||(this.ns=!0,wc.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}us(){var e,t=null!==(e=this.Se.evaluation_contexts)&&void 0!==e?e:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(wc.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.rs=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||wc.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}hs(){return this.us().length>0}ds(){var e=this.Se.flag_keys;if(!_n(e)){if(bn(e))return e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||wc.error("Invalid flag key found:",e,"Expected non-empty string"),t});wc.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:n}=this._instance,r=null!==(e=null==(t=n.bootstrap)?void 0:t.featureFlags)&&void 0!==e?e:{};if(Object.keys(r).length){var i,a,s=null!==(i=null==(a=n.bootstrap)?void 0:a.featureFlagPayloads)&&void 0!==i?i:{},o=Object.keys(r).filter(e=>!!r[e]).reduce((e,t)=>(e[t]=r[t]||!1,e),{}),l=Object.keys(s).filter(e=>o[e]).reduce((e,t)=>(s[t]&&(e[t]=s[t]),e),{});this.receivedFeatureFlags({featureFlags:o,featureFlagPayloads:l})}}updateFlags(e,t,n){var r,i,a=null!=n&&n.merge&&null!==(r=this.ss(ha))&&void 0!==r?r:{},s=null!=n&&n.merge&&null!==(i=this.ss(ga))&&void 0!==i?i:{},o=Yt({},a,e),l=Yt({},s,t),u={};for(var[c,d]of Object.entries(o))u[c]={key:c,enabled:Xt(d),variant:Zt(d),reason:void 0,metadata:_n(null==l?void 0:l[c])?void 0:{id:0,version:void 0,description:void 0,payload:l[c]}};this.receivedFeatureFlags({flags:u})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.ss(ma),t=this.ss(ya),n=this.ss(Da);if(!n&&!t)return e||{};var r=ns({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var a of i){var s,o,l=r[a],u=null==t?void 0:t[a],c=_n(u)?null!==(s=null==l?void 0:l.enabled)&&void 0!==s&&s:!!u,d=_n(u)?l.variant:"string"==typeof u?u:void 0,h=null==n?void 0:n[a],p=Yt({},l,{enabled:c,variant:c?null!=d?d:null==l?void 0:l.variant:void 0});c!==(null==l?void 0:l.enabled)&&(p.original_enabled=null==l?void 0:l.enabled),d!==(null==l?void 0:l.variant)&&(p.original_variant=null==l?void 0:l.variant),h&&(p.metadata=Yt({},null==l?void 0:l.metadata,{payload:h,original_payload:null==l||null==(o=l.metadata)?void 0:o.payload})),r[a]=p}return this.Jn||(wc.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map(n=>{var r=e[n];return{key:n,enabled:Xt(r),variant:Zt(r),payload:Jt(t[n])}})}getFlagVariants(){var e=this.ss(ha),t=this.ss(ya);if(!t)return e||{};for(var n=ns({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||(wc.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var e=this.ss(ga),t=this.ss(Da);if(!t)return e||{};for(var n=ns({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||(wc.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.cs||(this._instance.Ti.emit("featureFlagsReloading",!0),this.cs=setTimeout(()=>{this.vs()},5))}fs(){clearTimeout(this.cs),this.cs=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.cs||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Xn=e}vs(e){var t;if(this.fs(),!this._instance.mr())if(this.Kn)this.es=!0;else{var n=this.Se.token,r=this.ss(qi),i={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Yt({},(null==(t=this.zr)?void 0:t.get_initial_props())||{},this.ss(ba)||{}),group_properties:this.ss(xa),timezone:$o()};En(r)||_n(r)||(i.$device_id=r),(null!=e&&e.disableFlags||this.Se.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.hs()&&(i.evaluation_contexts=this.us());var a=this.ds();_n(a)||(i.flag_keys=a);var s=!!this.Se.advanced_only_evaluate_survey_feature_flags,o=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Se.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Kn=!0,this._instance._send_request({method:"POST",url:o,data:i,compression:this.Se.disable_compression?void 0:gl,timeout:this.Se.feature_flag_request_timeout_ms,callback:e=>{var t,n,r,a=!0;if(200===e.statusCode&&(this.es||(this.$anon_distinct_id=void 0),a=!1),this.Kn=!1,!i.disable_flags||this.es){this.ts=!a;var o=[];e.error?e.error instanceof Error?o.push("AbortError"===e.error.name?"timeout":"connection_error"):o.push("unknown_error"):200!==e.statusCode&&o.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&o.push("errors_while_computing_flags");var l,u=!(null==(n=e.json)||null==(n=n.quotaLimited)||!n.includes("feature_flags"));u&&o.push("quota_limited"),null==(r=this.zr)||r.register({[ja]:o}),u?wc.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags(null!==(l=e.json)&&void 0!==l?l:{},a,{partialResponse:s}
2),this.es&&(this.es=!1,this.vs()))}}})}}getFeatureFlag(e,t){var n;if(void 0===t&&(t={}),!t.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFeatureFlagResult(e,t);return null!==(n=null==r?void 0:r.variant)&&void 0!==n?n:null==r?void 0:r.enabled}}else wc.warn('getFeatureFlag for key "'+e+jc)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),r=e in n,i=n[e],a=this.getFlagPayloads()[e],s=String(i),o=this.ss(va)||void 0,l=this.ss(Aa)||void 0,u=this.ss(wa)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var c,d=this._instance.get_session_id(),h=this.ss(Ea);d&&d!==h&&(u={},null==(c=this.zr)||c.register({[wa]:u,[Ea]:d}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(s))){var p,f,m,g,v,y,D,b,x,C;bn(u[e])?u[e].push(s):u[e]=[s],null==(p=this.zr)||p.register({[wa]:u});var F=this.getFeatureFlagDetails(e),_=[...null!==(f=this.ss(ja))&&void 0!==f?f:[]];_n(i)&&_.push("flag_missing");var k={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:a||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(m=this.Se.bootstrap)||null==(m
2=m.featureFlags)?void 0:m[e])||null,$feature_flag_bootstrapped_payload:(null==(g=this.Se.bootstrap)||null==(g=g.featureFlagPayloads)?void 0:g[e])||null,$used_bootstrap_value:!this.ts};_n(null==F||null==(v=F.metadata)?void 0:v.version)||(k.$feature_flag_version=F.metadata.version);var w,E=null!==(y=null==F||null==(D=F.reason)?void 0:D.description)&&void 0!==y?y:null==F||null==(b=F.reason)?void 0:b.code;E&&(k.$feature_flag_reason=E),null!=F&&null!=(x=F.metadata)&&x.id&&(k.$feature_flag_id=F.metadata.id),_n(null==F?void 0:F.original_variant)&&_n(null==F?void 0:F.original_enabled)||(k.$feature_flag_original_response=_n(F.original_variant)?F.original_enabled:F.original_variant),null!=F&&null!=(C=F.metadata)&&C.original_payload&&(k.$feature_flag_original_payload=null==F||null==(w=F.metadata)?void 0:w.original_payload),_.length&&(k.$feature_flag_error=_.join(",")),this._instance.capture("$feature_flag_called",k)}if(r)return{key:e,enabled:!!i,variant:"string"==typeof i?i:void 0,payload:Jt(a)}}}else wc.warn('getFeatureFlagResult for key "'+e+jc)}getRemoteConfigPayload(e,t){var n=this.Se.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.hs()&&(r.evaluation_contexts=this.us());var i=this.ds();_n(i)||(r.flag_keys=i),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Se.disable_compression?void 0:gl,timeout:this.Se.feature_flag_request_timeout_ms,callback(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return _n(n)?void 0:!!n}wc.warn('isFeatureEnabled for key "'+e+jc)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,n){if(this.zr){this.Yn=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),a=this.getFlagsWithDetails();!function(e,t,n,r,i,a){void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var s=(e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(e=>{var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(e=>t[e].enabled).filter(e=>{var n;return null==(n=t[e].metadata)?void 0:n.payload}).map(e=>{var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]}))):e.featureFlags&&wc.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e})(e),o=s.flags,l=s.featureFlags,u=s.featureFlagPayloads;if(l){var c=e.requestId,d=e.evaluatedAt;if(bn(l)){wc.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(l)for(var p=0;l.length>p;p++)h[l[p]]=!0;t&&t.register({[pa]:l,[ha]:h})}else{var f=l,m=u,g=o;if(null!=a&&a.partialResponse)f=Yt({},n,f),m=Yt({},r,m),g=Yt({},i,g);else if(e.errorsWhileComputingFlags)if(o){var v=new Set(Object.keys(o).filter(e=>{var t;return!(null!=(t=o[e])&&t.failed)}));f=Yt({},n,Object.fromEntries(Object.entries(f).filter(e=>{var[t]=e;return v.has(t)}))),m=Yt({},r,Object.fromEntries(Object.entries(m||{}).filter(e=>{var[t]=e;return v.has(t)}))),g=Yt({},i,Object.fromEntries(Object.entries(g||{}).filter(e=>{var[t]=e;return v.has(t)})))}else f=Yt({},n,f),m=Yt({},r,m),g=Yt({},i,g);t&&t.register(Yt({[pa]:Object.keys(Sc(f)),[ha]:f||{},[ga]:m||{},[ma]:g||{}},c?{[va]:c}:{},d?{[Aa]:d}:{}))}}}(e,this.zr,r,i,a,n),t||(this.ns=!1),this.ps(t)}}override(e,t){void 0===t&&(t=!1),wc.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.zr)return wc.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.zr.unregister(ya),this.zr.unregister(Da),this.ps(),Ec.info("All overrides cleared");if(bn(e)){var t=Ac(e);return this.zr.register({[ya]:t}),this.ps(),Ec.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Jn=Boolean(null!==(n=r.suppressWarning)&&void 0!==n&&n),"flags"in r)if(!1===r.flags)this.zr.unregister(ya),Ec.info("Flag overrides cleared");else if(r.flags){if(bn(r.flags)){var i=Ac(r.flags);this.zr.register({[ya]:i})}else this.zr.register({[ya]:r.flags});Ec.info("Flag overrides set",{flags:r.flags})}return"payloads"in r&&(!1===r.payloads?(this.zr.unregister(Da),Ec.info("Payload overrides cleared")):r.payloads&&(this.zr.register({[Da]:r.payloads}),Ec.info("Payload overrides set",{payloads:r.payloads}))),void this.ps()}if(e&&"object"==typeof e)return this.zr.register({[ya]:e}),this.ps(),Ec.info("Flag overrides set",{flags:e});wc.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:n}=this.gs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,i=(this.ss(fa)||[]).find(t=>t.flagKey===e),a={["$feature_enrollment/"+e]:t},s={$feature_flag:e,$feature_enrollment:t,$set:a};i&&(s.$early_access_feature_name=i.name),n&&(s.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",s),this.setPersonPropertiesForFlags(a,!1);var o=Yt({},this.getFlagVariants(),{[e]:t});null==(r=this.zr)||r.register({[pa]:Object.keys(Sc(o)),[ha]:o}),this.ps()}
2getEarlyAccessFeatures(e,t,n){void 0===t&&(t=!1);var r=this.ss(fa),i=n?"&"+n.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+i),method:"GET",callback:t=>{var n,r;if(t.json){var i=t.json.earlyAccessFeatures;return null==(n=this.zr)||n.unregister(fa),null==(r=this.zr)||r.register({[fa]:i}),e(i)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,n)=>(e[n]=t[n],e),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach(r=>r(t,n,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=this.ss(ba)||{},r=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),i=null==e?void 0:e.$set_once,a={};if(i)for(var s in i)({}).hasOwnProperty.call(i,s)&&(s in n||(a[s]=i[s]));this._instance.register({[ba]:Yt({},n,a,r)}),t&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=Yt({},this.ss(ba)||{});e.forEach(e=>{delete n[e]}),this._instance.register({[ba]:n}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){void 0===e&&(e=!0),this._instance.unregister(ba),e&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=this.ss(xa)||{};0!==Object.keys(n).length&&Object.keys(n).forEach(t=>{n[t]=Yt({},n[t],e[t]),delete e[t]}),this._instance.register({[xa]:Yt({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.ss(xa)||{};this._instance.register({[xa]:Yt({},t,{[e]:{}})})}else this._instance.unregister(xa)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},Mc={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var e;return!(null==(e=this.ys)||!e.isStarted)}get status(){var e,t;return this.bs===sc||this.bs===oc?this.bs:null!==(e=null==(t=this.ys)?void 0:t.status)&&void 0!==e?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=ic,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw uc.error("started without valid sessionManager"),new Error(lc+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===Ha)throw new Error(lc+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!(null==(e=this._instance.get_property(ia))||!e.enabled),n=!this.Se.disable_session_recording,r=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return Pt&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||null==(t=this.ys)||!t.isStarted){var n=!_n(Object.assign)&&!_n(Array.from);this.ws&&n?(this.xs(e),uc.info("starting")):(this.bs=ic,this.stopRecording())}}xs(e){var t,n,r;this.ws&&(this.bs!==sc&&this.bs!==oc&&(this.bs=ac),null!=Ht&&null!=(t=Ht.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=Ht.__PosthogExtensions__)&&n.initSessionRecording?this.ks(e):null==(r=Ht.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.Ss,t=>{if(t)return uc.error("could not load recorder",t);this.ks(e)}))}stopRecording(){var e,t;null==(e=this._s)||e.call(this),this._s=void 0,null==(t=this.ys)||t.stop()}Cs(){var e,t;null==(e=this._s)||e.call(this),this._s=void 0,null==(t=this.ys)||t.discard()}Is(){var e,t;null==(e=this.zr)||e.unregister(da),null==(t=this.zr)||t.unregister(aa)}Ts(e,t){if(jn(e))return null;var n,r=An(e)?e:parseFloat(e);return"number"!=typeof(n=r)||!Number.isFinite(n)||0>n||n>1?(uc.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}Es(e){if(this.zr){var t,n,r=this.zr,i=()=>{var t,n=!1===e.sessionRecording?void 0:e.sessionRecording,i=this.Ts(null==(t=this.Se.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),a=this.Ts(null==n?void 0:n.sampleRate,"remote config sampleRate"),s=null!=i?i:a;jn(s)&&this.Is();var o=null==n?void 0:n.minimumDurationMilliseconds;r.register({[ia]:Yt({cache_timestamp:Date.now(),enabled:!!n},n,{networkPayloadCapture:Yt({capturePerformance:e.capturePerformance},null==n?void 0:n.networkPayloadCapture),canvasRecording:{enabled:null==n?void 0:n.recordCanvas,fps:null==n?void 0:n.canvasFps,quality:null==n?void 0:n.canvasQuality},sampleRate:s,minimumDurationMilliseconds:_n(o)?null:o,endpoint:null==n?void 0:n.endpoint,triggerMatchType:null==n?void 0:n.triggerMatchType,masking:null==n?void 0:n.masking,urlTriggers:null==n?void 0:n.urlTriggers,version:null==n?void 0:n.version,triggerGroups:null==n?void 0:n.triggerGroups})})};i(),null==(t=this._s)||t.call(this),this._s=null==(n=this._instance.sessionManager)?void 0:n.onSessionId(i)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.Es(e),void this.Cs()):(this.Es(e),void this.startIfEnabledOrStop()):(this.bs===sc&&(this.bs=oc,uc.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;void 0===t&&(t="log"),null!=(n=this.ys)&&n.log?this.ys.log(e,t):uc.warn("log called before recorder was ready")}get Ss(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(ia);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}Ms(){var e,t,n=this._instance.get_property(ia);if(!n)return!1;try{t="object"==typeof n?n:JSON.parse(n)}catch(e){return uc.warn("persisted remote config for session recording is invali
2d and will be ignored",e),!1}var r=null!==(e=t.cache_timestamp)&&void 0!==e?e:Date.now();return 36e5>=Date.now()-r}ks(e){var t,n;if(null==(t=Ht.__PosthogExtensions__)||!t.initSessionRecording)return uc.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[Ua]:!0});if(this.ys||(this.ys=null==(n=Ht.__PosthogExtensions__)?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms()){if(this.bs===oc||this.bs===sc)return;return this.bs=sc,uc.info("persisted remote config is stale, requesting fresh config before starting"),void new fl(this._instance).load()}this.bs=ac,this.ys.start(e)}onRRwebEmit(e){var t;null==(t=this.ys)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||null==(t=this.zr)||t.register({[oa]:!0}),null==(e=this.ys)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||null==(t=this.zr)||t.register({[sa]:!0}),null==(e=this.ys)||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||null==(n=this.zr)||n.register({["url"===e?la:ua]:!0}),null==(t=this.ys)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.ys)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!(null==(n=this.ys)||!n.tryAddCustomEvent(e,t))}}},Ic={autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new Yu(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get Se(){var e,t,n=Cn(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map(e=>new RegExp(e)),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),n}Fs(){if(this.isBrowserSupported()){if(Pt&&zt){var e=e=>{e=e||(null==Pt?void 0:Pt.event);try{this.As(e)}catch(Pt){Ju.error("Failed to capture event",Pt)}};if(us(zt,"submit",e,{capture:!0}),us(zt,"change",e,{capture:!0}),us(zt,"click",e,{capture:!0}),this.Se.capture_copied_text){var t=e=>{e=e||(null==Pt?void 0:Pt.event);try{this.As(e,Qu)}catch(Pt){Ju.error("Failed to capture copy/cut event",Pt)}};us(zt,"copy",t,{capture:!0}),us(zt,"cut",t,{capture:!0})}}}else Ju.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Yi]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,n=[];return null==(t=this.Ls)||t.forEach(t=>{var r=null==zt?void 0:zt.querySelectorAll(t);null==r||r.forEach(r=>{e===r&&n.push(t)})}),n}get isEnabled(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[Yi];if(En(this.Rs)&&!Nn(n)&&!this.instance.mr())return!1;var r=null!==(t=this.Rs)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!r}As(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=Ms(e);Bs(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&Ys(r,this.instance.config.rageclick)&&this.As(e,"$rageclick");var i=t===Qu;if(r&&function(e,t,n,r,i){var a,s,o,l,u,c;if(void 0===n&&(n=void 0),!Pt||Qs(e))return!1;if(null!=(a=n)&&a.url_allowlist&&!Ls(n.url_allowlist))return!1;if(null!=(s=n)&&s.url_ignorelist&&Ls(n.url_ignorelist))return!1;if(null!=(o=n)&&o.dom_event_allowlist){var d=n.dom_event_allowlist;if(d&&!d.some(e=>t.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:p}=Js(e,r);if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(_n(n))return!0;var r,i=function(e){if(n.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var a of e)if(r=i(a))return r.v;return!1}(p,n))return!1;if(!Us(p,null==(l=n)?void 0:l.css_selector_allowlist))return!1;if(Us(p,null!==(u=null==(c=n)?void 0:c.css_selector_ignorelist)&&void 0!==u?u:Ws))return!1;var f=Pt.getComputedStyle(e);
2if(f&&"pointer"===f.getPropertyValue("cursor")&&"click"===t.type)return!0;var m=e.tagName.toLowerCase();switch(m){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return h?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(Is.indexOf(m)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.Se,i,i?["copy","cut"]:void 0)){var{props:a,explicitNoCapture:s}=function(e,t){var n,r,{e:i,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:o,elementsChainAsString:l,disableCaptureUrlHashes:u}=t;if(!Ss(e))return{props:{}};for(var c=[e],d=e;d.parentNode&&!Ns(d,"body");)if(Ts(d.parentNode))c.push(d.parentNode.host),d=d.parentNode.host;else{if(!Ss(d.parentNode))break;c.push(d.parentNode),d=d.parentNode}var h,p,f=[],m={},g=!1,v=!1;if(ts(c,e=>{var t=Xs(e);if(Ns(e,"a")){var n=e.getAttribute("href");g=!!(t&&n&&so(n))&&(u?Kr(n):n)}fn(Rs(e),"ph-no-capture")&&(v=!0),f.push(function(e,t,n,r,i){void 0===i&&(i=!1);var a=e.tagName.toLowerCase(),s={tag_name:a};Is.indexOf(a)>-1&&!n&&(s.$el_text="a"===a.toLowerCase()||"button"===a.toLowerCase()?Xu(1024,oo(e)):Xu(1024,Os(e)));var o=Rs(e);o.length>0&&(s.classes=o.filter(function(e){return""!==e})),ts(e.attributes,function(n){var a;if((!Zs(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&(null==r||!r.includes(n.name))&&!t&&so(n.value)&&(!kn(a=n.name)||"_ngcontent"!==a.substring(0,10)&&"_nghost"!==a.substring(0,7))){var o=n.value;"class"===n.name&&(o=Ps(o).join(" ")),s["attr__"+n.name]=Xu(1024,"href"===n.name&&i?Kr(o):o)}});for(var l=1,u=1,c=e;c=Zu(c);)l++,c.tagName===e.tagName&&u++;return s.nth_child=l,s.nth_of_type=u,s}(e,a,s,o,u));var r=function(e){if(!Xs(e))return{};var t={};return ts(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&so(r)&&(t[n]=r)}}),t}(e);ns(m,r)}),v)return{props:{},explicitNoCapture:v};if(s||(f[0].$el_text=Ns(e,"a")||Ns(e,"button")?oo(e):Os(e)),g){var y,D;f[0].attr__href=g;var b=null==(y=ko(g))?void 0:y.host,x=null==Pt||null==(D=Pt.location)?void 0:D.host;b&&x&&b!==x&&(h=g)}return{props:ns({$event_type:i.type,$ce_version:1},l?{}:{$elements:f},{$elements_chain:(p=f,function(e){return e.map(e=>{var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var i of(e.attr_class.sort(),e.attr_class))r+="."+i.replace(/"/g,"");var a=Yt({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return rs(a).sort((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)}).forEach(e=>{var[t,n]=e;return s[uo(t.toString())]=uo(n.toString())}),(r+=":")+rs(s).map(e=>{var[t,n]=e;return t+'="'+n+'"'}).join("")}).join(";")}(function(e){return e.map(e=>{var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:co(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return rs(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,n]=e;return r.attributes[t]=n}),r})}(p)))},null!=(n=f[0])&&n.$el_text?{$el_text:null==(r=f[0])?void 0:r.$el_text}:{},h&&"click"===i.type?{$external_click_url:h}:{},m)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.Os,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(s)return!1;var o=this.getElementSelectors(r);if(o&&o.length>0&&(a.$element_selectors=o),t===Qu){var l,u=zs(null==Pt||null==(l=Pt.getSelection())?void 0:l.toString()),c=e.type||"clipboard";if(!u)return!1;a.$selected_content=u,a.$copy_type=c}return this.instance.capture(t,a),!0}}}isBrowserSupported(){return xn(null==zt?void 0:zt.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.$s=(null==Pt||null==(t=Pt.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(Ii.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,Ii.info("History API monitoring stopped")}monitorHistoryChanges(){Pt&&Pt.history&&(this.Ns("pushState"),this.Ns("replaceState"),this.qs())}Ns(e){var t;if(Pt&&(null==(t=Pt.history[e])||!t.__posthog_wrapped__)){var n=this;!function(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return xn(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]===i&&(e[t]=r)}}catch(e){return()=>{}}}(Pt.history,e,t=>function(r,i,a){t.call(this,r,i,a),n.js(e)})}}js(e){try{var t,n=null==Pt||null==(t=Pt.location)?void 0:t.pathname;if(!n)return;n!==this.$s&&this.isEnabled&&this._instance.capture(Qa,{navigation_type:e}),this.$s=n}catch(Pt){Ii.error("Error capturing "+e+" pageview",Pt)}}qs(){if(!this.Ds){var e=()=>{this.js("popstate")};us(Pt,"popstate",e),this.Ds=()=>{Pt&&Pt.removeEventListener("popstate",e)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(e){var t;this.Bs=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.Bs=!(null==(t=this.instance.persistence)||!t.props[Qi]),this.rageclicks=new Yu(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return Cn(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(e=this.Se.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return jn(this.Se.capture_heatmaps)?jn(this.Se.enable_heatmaps)?this.Bs:this.Se.enable_heatmaps:!1!==this.Se.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;cc.info("starting..."),this.Us(),this.ke()}else{var e;clearInterval(null!==(e=this.Hs)&&void 0!==e?e:void 0),this.zs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Qi]:t}),this.Bs=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}Vs(e){this.fe(e.originalEvent,"deadclick")}ke(){this.Hs&&clearInterval(this.Hs),this.Hs="visible"===(null==zt?void 0:zt.visibilityState)?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Us(){Pt&&zt&&(this.Ws=this.Lr.bind(this),us(Pt,Ya,this.Ws),this.Gs=e=>this.fe(e||(null==Pt?void 0:Pt.event)),us(zt,"click",this.Gs,{capture:!0}),this.Zs=e=>this.Qs(e||(null==Pt?void 0:Pt.event)),us(zt,"mousemove",this.Zs,{capture:!0}),this.Js=new mo(this.instance,po,this.Vs.bind(this)),this.Js.startIfEnabledOrStop(),this.Ys=this.ke.bind(this),us(zt,Ka,this.Ys),this.Ps=!0)}zs(){var e;Pt&&zt&&(this.Ws&&Pt.removeEventListener(Ya,this.Ws),this.Gs&&zt.removeEventListener("click",this.Gs,{capture:!0}),this.Zs&&zt.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Ys&&zt.removeEventListener(Ka,this.Ys),clearTimeout(this.Ks),null==(e=this.Js)||e.stop(),this.Ps=!1)}Xs(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),a=function(e,t,n){for(var r=e;r&&Ss(r)&&!Ns(r,"body");){if(r===n)return!1;if(fn(t,null==Pt?void 0:Pt.getComputedStyle(r).position))return!0;r=$s(r)}return!1}(Ms(e),["fixed","sticky"],i);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:n),target_fixed:a,type:t}}fe(e,t){var n;if(void 0===t&&(t="click"),!As(e.target)&&dc(e)){var r=this.Xs(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&Ys(Ms(e),this.instance.config.rageclick)&&this.eo(Yt({},r,{type:"rageclick"})),this.eo(r)}}Qs(e){!As(e.target)&&dc(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout(()=>{this.eo(this.Xs(e,"mousemove"))},500))}eo(e){if(Pt){var t=this.Se.disable_capture_url_hashes?Kr(Pt.location.href):Pt.location.href,n=this.Se.custom_personal_data_properties,r=this.Se.mask_personal_data_properties?[...So,...n||[]]:[],i=Eo(t,r,Bo);this.R=this.R||{},this.R[i]||(this.R[i]=[]),this.R[i].push(e)}}Lr(){this.R&&!Fn(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:mo,webVitalsAutocapture:class{constructor(e){var t;this.Bs=!1,this.Ps=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.ro=()=>{clearTimeout(this.io),0!==this.R.metrics.length&&(this._instance.capture("$web_vitals",this.R.metrics.reduce((e,t)=>
2Yt({},e,{["$web_vitals_"+t.name+"_event"]:Yt({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.no=e=>{var t;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var n=this.so();if(!_n(n))if(jn(null==e?void 0:e.name)||jn(null==e?void 0:e.value))nc.error("Invalid metric received",e);else if(!this.oo||this.oo>e.value){this.R.url!==n&&(this.ro(),this.io=setTimeout(this.ro,this.flushToCaptureTimeoutMs)),_n(this.R.url)&&(this.R.url=n),this.R.firstMetricTimestamp=_n(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var r=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),i=Yt({},e,{$current_url:n,timestamp:Date.now()});_n(r)||(i.$session_id=r.sessionId,i.$window_id=r.windowId),this.R.metrics.push(i),this.R.metrics.length===this.allowedMetrics.length&&this.ro()}else nc.error("Ignoring metric with value >= "+this.oo,e)},this.ao=()=>{if(!this.Ps){var e,t,n,r,i=Ht.__PosthogExtensions__;_n(i)||_n(i.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:n,onINP:r}=i.postHogWebVitalsCallbacks),e&&t&&n&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.no.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.no.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&n(this.no.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.no.bind(this)),this.Ps=!0):nc.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Bs=!(null==(t=this._instance.persistence)||!t.props[ea]),this.startIfEnabled()}get lo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=Cn(this.lo)?null==(e=this.lo)?void 0:e.web_vitals_allowed_metrics:void 0;return jn(n)?(null==(t=this._instance.persistence)?void 0:t.props[ra])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Cn(this.lo)?this.lo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Cn(this.lo)?this.lo.web_vitals_attribution:void 0;return null!=e&&e}get oo(){var e=Cn(this.lo)&&An(this.lo.__web_vitals_max_value)?this.lo.__web_vitals_max_value:rc;return e>0&&6e4>=e?rc:e}get isEnabled(){var e=null==Ot?void 0:Ot.protocol;if("http:"!==e&&"https:"!==e)return nc.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Cn(this.lo)?this.lo.web_vitals:Nn(this.lo)?this.lo:void 0;return Nn(t)?t:this.Bs}startIfEnabled(){this.isEnabled&&!this.Ps&&(nc.info("enabled, starting..."),this.Mt(this.ao))}onRemoteConfig(e){if("capturePerformance"in e){var t=Cn(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=Cn(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ea]:t}),this._instance.persistence.register({[ra]:n})),this.Bs=t,this.startIfEnabled()}}Mt(e){var t,n;null!=(t=Ht.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?nc.error("failed to load script",t):e()})}so(){var e=Pt?this._instance.config.disable_capture_url_hashes?Kr(Pt.location.href):Pt.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...So,...t||[]]:[];return Eo(e,n,Bo)}nc.error("Could not determine current URL")}}},Uc={exceptionObserver:class{constructor(e){var t,n,r;this.ao=()=>{var e;if(Pt&&this.isEnabled&&null!=(e=Ht.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=Ht.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=Ht.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=Ht.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.uo&&this.Se.capture_unhandled_errors&&(this.uo=t(this.captureException.bind(this))),!this.ho&&this.Se.capture_unhandled_rejections&&(this.ho=n(this.captureException.bind(this))),!this.do&&this.Se.capture_console_errors&&(this.do=r(this.captureException.bind(this)))}catch(Pt){ec.error("failed to start",Pt),this.co()}}},this._instance=e,this.vo=!(null==(t=this._instance.persistence)||!t.props[Ji]),this.fo=new Un({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,Ae:ec}),this.Se=this.po(),this.startIfEnabledOrStop()}po(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Cn(e)?t=Yt({},t,e):(_n(e)?this.vo:e)&&(t=Yt({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ec.info("enabled"),this.co(),this.Mt(this.ao)):this.co()}Mt(e){var t,n;null!=(t=Ht.__PosthogExtensions__)&&t.errorWrappingFunctions?e():null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return ec.error("failed to load script",t);e()})}co(){var e,t,n;null==(e=this.uo)||e.call(this),this.uo=void 0,null==(t=this.ho)||t.call(this),this.ho=void 0,null==(n=this.do)||n.call(this),this.do=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.vo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[Ji]:this.vo}),this.Se=this.po(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this.po()}captureException(e){var t,n,r,i=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this.fo.consumeRateLimit(i)?ec.info("Skipping exception capture because of client rate limiting.",{exception:i}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.mo=[],this.yo=new ui([new xi,new Ni,new Fi,new Ci,new Ai,new ji,new ki,new Si],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],a=t.split("\n"),s=r;a.length>s;s++){var o=a[s];if(1024>=o.length){var l=bi.test(o)?o.replace(bi,"$1"):o;if(!l.match(/\S*Error: /)){for(var u of n){var c=u(l,e);if(c){i.push(c);break}}if(i.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map(e=>{return Yt({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||ci});var n})}(i)}}("web:javascript",gi,Di)),this._instance=e,this.mo=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(Xi))&&void 0!==t?t:[],this.bo=Ri(this._o()),this.wo=new zi(this.bo)}onConfigChange(){this.bo=Ri(this._o()),this.wo.setConfig(this.bo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var i=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],a=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.mo=i,this._instance.persistence&&this._instance.persistence.register({[Xi]:this.mo,[Zi]:a})}}get xo(){var e,t=!!this._instance.get_property(Zi),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}buildProperties(e,t){return this.yo.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.bo.enabled)try{if(!kn(e)||0===e.trim().length)return void Nc.warn("Ignoring exception step because message must be a non-empty string");var n=this.ko(t),{sanitizedProperties:r,droppedKeys:i}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((n,r)=>Pi.has(r)?(t.push(r),n):(n[r]=e[r],n),{}),droppedKeys:t}}(n);i.length>0&&Nc.warn("Ignoring reserved exception step fields",{droppedKeys:i}),this.wo.add(Yt({[Bi]:e,[Ti]:(new Date).toISOString()},r))}catch(e){Nc.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.So(t)){if(this.Co(t))return this.Io("Exception dropped: matched a suppression rule"),void Nc.info("Skipping exception capture because a suppression rule matched");if(!this.xo&&this.To(t))return this.Io("Exception dropped: thrown by a browser extension"),void Nc.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Eo(t))return this.Io("Exception dropped: thrown by the PostHog SDK"),void Nc.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.bo.enabled&&jn(e.$exception_steps)?this.Mo(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",Zi:!0});return r&&this.wo.clear(),r}catch(e){return Nc.error("Failed to capture exception event. Dropping this exception.",e),void this.wo.clear()}}catch(e){return void Nc.error("Failed to process exception event. Ignoring this exception.",e)}}Mo(e){try{var t=this.wo.getAttachable();return 0===t.length?e:Yt({},e,{$exception_steps:t})}catch(t){return Nc.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}Io(e){this.bo.enabled&&this.wo.add({[Bi]:e,[Ti]:(new Date).toISOString()})}ko(e){return Cn(e)?Yt({},e):{}}_o(){var e,t;return null!==(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)&&void 0!==e?e:{}}Co(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>
2{var{type:n,value:r}=t;return kn(n)&&n.length>0&&e.$exception_types.push(n),kn(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.mo.some(e=>{var n=e.values.map(e=>{var n,r=bu[e.operator],i=bn(e.value)?e.value:[e.value],a=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,a)});return"OR"===e.type?n.some(Boolean):n.every(Boolean)})}To(e){return e.flatMap(e=>{var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Eo(e){if(e.length>0){var t,n,r,i,a=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],s=a[a.length-1];return null!==(r=null==s||null==(i=s.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1}So(e){return!jn(e)&&bn(e)}}},$c=Yt({productTours:class{get zr(){return this._instance.persistence}constructor(e){this.Po=null,this.Ro=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if("productTours"in e){var t,n;if(this.zr&&this.zr.register({[na]:!!e.productTours}),!pc(this._instance))return!this.Po&&jn(null==(t=this.zr)?void 0:t.props[ka])||hc.info("product tours disabled; stopping and clearing cached tours"),null==(n=this.Po)||n.stop(),this.Po=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Po&&pc(this._instance)&&this.Mt(()=>this.Oo())}Mt(e){var t,n;null!=(t=Ht.__PosthogExtensions__)&&t.generateProductTours?e():null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"product-tours",t=>{t?hc.error("Could not load product tours script",t):e()})}Oo(){var e;!this.Po&&null!=(e=Ht.__PosthogExtensions__)&&e.generateProductTours&&(this.Po=Ht.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!bn(this.Ro)||t){var n=this.zr;if(n){var r=n.props[ka];if(bn(r)&&!t)return this.Ro=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{if(pc(this._instance)){var r=t.statusCode;if(200!==r||!t.json){var i="Product Tours API could not be loaded, status: "+r;return hc.error(i),void e([],{isLoaded:!1,error:i})}var a=bn(t.json.product_tours)?t.json.product_tours:[];this.Ro=a,n&&n.register({[ka]:a}),e(a,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.Ro,{isLoaded:!0})}getActiveProductTours(e){jn(this.Po)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Po.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Po)||t.showTourById(e)}previewTour(e){this.Po?this.Po.previewTour(e):this.Mt(()=>{var t;this.Oo(),null==(t=this.Po)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Po)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Po)||e.nextStep()}previousStep(){var e;null==(e=this.Po)||e.previousStep()}clearCache(){var e;this.Ro=null,null==(e=this.zr)||e.unregister(ka)}resetTour(e){var t;null==(t=this.Po)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Po)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Po)||t.cancelPendingTour(e)}}},Oc),Wc={siteApps:class{constructor(e){this.Lo=0,this._instance=e,this.Fo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Ao(e,t){if(t){var n=this.globalsForEvent(t);this.Fo.push(n),this.Fo.length>1e3&&(this.Fo=this.Fo.slice(10))}}get siteAppLoaders(){var e;return null==(e=Ht._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Ao.bind(this));this.$o=()=>{e(),this.Fo=[],this.$o=void 0}}}globalsForEvent(e){var t,n,r,i,a,s,o;if(!e)throw new Error("Event payload is required");var l={},u=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{};for(var[d,h]of Object.entries(c))l[d]={id:u[d],type:d,properties:h};var{$set_once:p,$set:f}=e;return{event:Yt({},Qt(e,fc),{properties:Yt({},e.properties,f?{$set:Yt({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},f)}:{},p?{$set_once:Yt({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},p)}:{}),elements_chain:null!==(a=null==(s=e.properties)?void 0:s.$elements_chain)&&void 0!==a?a:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}Do(e){var t,n=null==(t=e.tagName)?void 0:t.toLowerCase();return"style"===n&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(mc.error("prepare_external_dependency_stylesheet returned null"),null):"script"===n&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(mc.error("prepare_external_dependency_script returned null"),null):e}No(){var e,t,n,r,i,a,s,o;
vendor: 6,058 bytes, line 2
2if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var l=null==zt?void 0:zt.defaultView,u=null==l||null==(e=l.Node)?void 0:e.prototype;if(!l||!u)return()=>{};if(this.Lo++,this.qo)return this.jo();var c=[],d=this,h=new WeakSet,p=(e,t,n)=>{if(null!=e&&e[t]){var r=e[t];e[t]=n(r),c.push(()=>{e[t]=r})}},f=e=>{if(h.has(e))return e;var t=d.Do(e);return t&&h.add(t),t},m=e=>e.map(e=>"string"==typeof e?e:f(e)).filter(e=>!En(e));return p(u,"appendChild",e=>function(t){var n=f(t);return n?e.call(this,n):t}),p(u,"insertBefore",e=>function(t,n){var r=f(t);return r?e.call(this,r,n):t}),p(u,"replaceChild",e=>function(t,n){var r=f(t);return r?e.call(this,r,n):n}),[null==(t=l.Element)?void 0:t.prototype,null==(n=l.Document)?void 0:n.prototype,null==(r=l.DocumentFragment)?void 0:r.prototype].forEach(e=>{p(e,"append",e=>function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,m(n))}),p(e,"prepend",e=>function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,m(n))})}),[null==(i=l.Element)?void 0:i.prototype,null==(a=l.CharacterData)?void 0:a.prototype,null==(s=l.DocumentType)?void 0:s.prototype].forEach(e=>{p(e,"before",e=>function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,m(n))}),p(e,"after",e=>function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,m(n))}),p(e,"replaceWith",e=>function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];var i=m(n);return n.length&&!i.length?void 0:e.apply(this,i)})}),p(null==(o=l.Element)?void 0:o.prototype,"insertAdjacentElement",e=>function(t,n){var r=f(n);return r?e.call(this,t,r):null}),this.qo=()=>{c.forEach(e=>e()),this.qo=void 0},this.jo()}jo(){var e=!1;return()=>{var t;e||(e=!0,this.Lo--,0===this.Lo&&(null==(t=this.qo)||t.call(this)))}}Bo(e,t){void 0===t&&(t=!0);var n=this.No();try{var r=e(n);return t&&n(),r}catch(e){throw n(),e}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var n;!t.errored&&this.Fo.length&&(mc.info("Processing "+this.Fo.length+" events for site app with id "+e.id),this.Fo.forEach(e=>this.Bo(()=>null==t.processEvent?void 0:t.processEvent(e))),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(n=this.$o)||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,mc.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),r&&n()};try{var{processEvent:a}=this.Bo(t=>e.init({posthog:this._instance,callback(e){t(),i(e)}}),!1);a&&(t.processEvent=a),r=!0}catch(t){mc.error(gc+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){mc.error("Error while processing buffered events PostHog app with config id "+e.id,n),t.errored=!0}}Ho(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Uo(e){var t=this;if(0!==Object.keys(this.apps).length){var n=this.globalsForEvent(e),r=function(r){try{t.Bo(()=>null==r.processEvent?void 0:r.processEvent(n))}catch(t){mc.error("Error while processing event "+e.event+" for site app "+r.id,t)}};for(var i of Object.values(this.apps))r(i)}}onRemoteConfig(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.Ho(),void this._instance.on("eventCaptured",e=>this.Uo(e))):void mc.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this.$o)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var a=function(e){var t;Ht["__$$ph_site_app_"+e]=i._instance,null==(t=Ht.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(i._instance,o,t=>{if(t)return mc.error(gc+e,t)})};for(var{id:s,url:o}of e.siteApps)a(s)}else mc.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},Hc={tracingHeaders:class{constructor(e){this.zo=void 0,this.Vo=void 0,this.Wo=void 0,this.ao=()=>{var e,t,n=this.Go();n?(_n(this.zo)&&(this.zo=null==(e=Ht.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)?void 0:e._patchXHR(n,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),_n(this.Vo)&&(this.Vo=null==(t=Ht.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)?void 0:t._patchFetch(n,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.co()},this._instance=e}initialize(){this.startIfEnabledOrStop()}Mt(e){var t,n;null!=(t=Ht.__PosthogExtensions__)&&t.tracingHeadersPatchFns?e():null==(n=Ht.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return tc.error("failed to load script",t);e()})}Zo(){var e,t;return null!==(e=null!==(t=this._instance.config.tracing_headers)&&void 0!==t?t:this._instance.config.addTracingHeaders)&&void 0!==e?e:this._instance.config.__add_tracing_headers}Go(){var e=this.Zo();return bn(e)?(bn(this.Wo)?this.Wo.splice(0,this.Wo.length,...e):this.Wo=[...e],e.length>0?this.Wo:void 0):(bn(this.Wo)&&this.Wo.splice(0),this.Wo=e||void 0,this.Wo)}co(){var e,t;null==(e=this.zo)||e.call(this),null==(t=this.Vo)||t.call(this),this.zo=void 0,this.Vo=void 0}startIfEnabledOrStop(){this.Go()?this.Mt(this.ao):this.co()}}},qc=Yt({surveys:class{get Se(){return this._instance.config}constructor(e){this.Qo=void 0,this._surveyManager=null,this.Jo=!1,this.Yo=[],this.Ko=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Se.disable_surveys){var t=e.surveys;if(jn(t))return Eu.warn("Flags not loaded yet. Not loading surveys.");var n=bn(t);this.Qo=n?t.length>0:t,Eu.info("flags response received, isSurveysEnabled: "+this.Qo),this.loadIfEnabled()}}reset(){try{var e;null==(e=this._surveyEventReceiver)||e.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(null!=r&&r.startsWith(ju)||null!=r&&r.startsWith("inProgressSurvey_"))&&t.push(r)}
2t.forEach(e=>localStorage.removeItem(e))}catch(e){}}loadIfEnabled(){if(!this._surveyManager)if(this.Jo)Eu.info("Already initializing surveys, skipping...");else if(this.Se.disable_surveys)Eu.info(Cc);else if(this.Se.cookieless_mode&&this._instance.consent.isOptedOut())Eu.info("Not loading surveys in cookieless mode without consent.");else{var e=null==Ht?void 0:Ht.__PosthogExtensions__;if(e){if(!_n(this.Qo)||this.Se.advanced_enable_surveys){var t=this.Qo||this.Se.advanced_enable_surveys;this.Jo=!0;try{var n=e.generateSurveys;if(n)return void this.Xo(n,t);var r=e.loadExternalDependency;if(!r)return void this.ea($a);r(this._instance,"surveys",n=>{n||!e.generateSurveys?this.ea("Could not load surveys script",n):this.Xo(e.generateSurveys,t)})}catch(e){throw this.ea("Error initializing surveys",e),e}finally{this.Jo=!1}}}else Eu.error("PostHog Extensions not found.")}}Xo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new bc(this._instance),Eu.info("Surveys loaded successfully"),this.ta({isLoaded:!0})}ea(e,t){Eu.error(e,t),this.ta({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Yo.push(e),this._surveyManager&&this.ta({isLoaded:!0}),()=>{this.Yo=this.Yo.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.Se.disable_surveys)return Eu.info(Cc),e([]);var n,r=this._instance.get_property(Ca);if(r&&!t)return e(r,{isLoaded:!0});"undefined"!=typeof Promise&&this.Ko?this.Ko.then(t=>{var{surveys:n,context:r}=t;return e(n,r)}):("undefined"!=typeof Promise&&(this.Ko=new Promise(e=>{n=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Se.token),method:"GET",timeout:this.Se.surveys_request_timeout_ms,callback:t=>{var r;this.Ko=null;var i=t.statusCode;if(200!==i||!t.json){var a="Surveys API could not be loaded, status: "+i;Eu.error(a);var s={isLoaded:!1,error:a};return e([],s),void(null==n||n({surveys:[],context:s}))}var o,l=t.json.surveys||[],u=l.filter(e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)||function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e)));u.length>0&&(null==(o=this._surveyEventReceiver)||o.register(u)),null==(r=this._instance.persistence)||r.register({[Ca]:l,[Fa]:Date.now()});var c={isLoaded:!0};e(l,c),null==n||n({surveys:l,context:c})}}))}ta(e){for(var t of this.Yo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){Eu.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!jn(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Eu.warn("init was not called")}ra(e){var t=null;return this.getSurveys(n=>{var r;t=null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:null}),t}ia(e){if(jn(this._surveyManager))return{eligible:!1,reason:xc};var t="string"==typeof e?this.ra(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(jn(this._surveyManager))return Eu.warn("init was not called"),{visible:!1,disabledReason:xc};var t=this.ia(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return jn(this._surveyManager)?(Eu.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:xc})):new Promise(n=>{this.getSurveys(t=>{var r,i=null!==(r=t.find(t=>t.id===e))&&void 0!==r?r:null;if(i){var a=this.ia(i);n({visible:a.eligible,disabledReason:a.reason})}else n({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,n){var r;if(jn(this._surveyManager))Eu.warn("init was not called");else{var i="string"==typeof e?this.ra(e):e;if(null!=i&&i.id)if(Au.includes(i.type)){var a=null==zt?void 0:zt.querySelector(t);if(a)return null!=(r=i.appearance)&&r.surveyPopupDelaySeconds?(Eu.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;Eu.info("Rendering survey "+i.id+" with delay of "+(null==(e=i.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(i,a,n),Eu.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,a,n);Eu.warn("Survey element not found")}else Eu.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Eu.warn("Survey not found")}}displaySurvey(e,t){var n;if(jn(this._surveyManager))Eu.warn("init was not called");else{var r=this.ra(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=Yt({},r,{appearance:Yt({},r.appearance,{surveyPopupDelaySeconds:0})}
vendor: 4,614 bytes, line 2
2)),t.displayType!==sl&&t.initialResponses&&Eu.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var a=this.canRenderSurvey(r);if(!a.visible)return void Eu.warn("Survey is not eligible to be displayed: ",a.disabledReason)}t.displayType!==ol?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else Eu.warn("Survey not found")}}cancelPendingSurvey(e){jn(this._surveyManager)?Eu.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},Oc),Vc={toolbar:class{constructor(e){this.instance=e}na(e){Ht.ph_toolbar_state=e}sa(){var e;return null!==(e=Ht.ph_toolbar_state)&&void 0!==e?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),cs(this.instance.config))return!1;if(!Pt||!zt)return!1;e=null!=e?e:Pt.location,n=null!=n?n:Pt.history;try{if(!t){try{Pt.localStorage.setItem("test","test"),Pt.localStorage.removeItem("test")}catch(Pt){return!1}t=null==Pt?void 0:Pt.localStorage}var r,i=Fc||jo(e.hash,"__posthog")||jo(e.hash,"state"),a=i?is(()=>JSON.parse(atob(decodeURIComponent(i))))||is(()=>JSON.parse(decodeURIComponent(i))):null;return a&&"ph_authorize"===a.action?((r=a).source="url",r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(_c)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch(Pt){return!1}}oa(e){var t=Ht.ph_load_toolbar||Ht.ph_load_editor;!jn(t)&&xn(t)?t(e,this.instance):kc.warn("No toolbar load function found")}loadToolbar(e){var t=!(null==zt||!zt.getElementById(za));if(!Pt||t)return!1;var n="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=Yt({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(Pt.localStorage.setItem(_c,JSON.stringify(Yt({},r,{source:void 0}))),2===this.sa())this.oa(r);else if(0===this.sa()){var i;this.na(1),null==(i=Ht.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"toolbar",e=>{if(e)return kc.error("[Toolbar] Failed to load",e),void this.na(0);this.na(2),this.oa(r)}),us(Pt,"turbolinks:load",()=>{this.na(0),this.loadToolbar(r)})}return!0}aa(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},Gc=Yt({experiments:Pc},Oc),Kc=Yt({},Oc,Mc,Ic,Uc,$c,Wc,qc,Hc,Vc,Gc,{conversations:class{constructor(e){this.la=void 0,this._conversationsManager=null,this.ua=!1,this.ha=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;jn(t)||(Nn(t)?this.la=t:(this.la=t.enabled,this.ha=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.la=void 0,this.ha=null}loadIfEnabled(){if(!(this._conversationsManager||this.ua||this._instance.config.disable_conversations||cs(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==Ht?void 0:Ht.__PosthogExtensions__;if(e&&!_n(this.la)&&this.la)if(this.ha&&this.ha.token){this.ua=!0;try{var t=e.initConversations;if(t)return this.da(t),void(this.ua=!1);var n=e.loadExternalDependency;if(!n)return void this.ca($a);n(this._instance,"conversations",t=>{t||!e.initConversations?this.ca("Could not load conversations script",t):this.da(e.initConversations),this.ua=!1})}catch(e){this.ca("Error initializing conversations",e),this.ua=!1}}else Lc.error("Conversations enabled but missing token in remote config.")}}da(e){if(this.ha)try{this._conversationsManager=e(this.ha,this._instance),Lc.info("Conversations loaded successfully")}catch(e){this.ca("Error completing conversations initialization",e)}else Lc.error("Cannot complete initialization: remote config is null")}ca(e,t){Lc.error(e,t),this._conversationsManager=null,this.ua=!1}show(){this._conversationsManager?this._conversationsManager.show():Lc.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.la&&!En(this._conversationsManager)}isVisible(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&void 0!==e&&e}
2sendMessage(e,t,n){var r=this;return Kt(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(Lc.warn(Rc),null)})()}getMessages(e,t){var n=this;return Kt(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(Lc.warn(Rc),null)})()}markAsRead(e){var t=this;return Kt(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Lc.warn(Rc),null)})()}getTickets(e){var t=this;return Kt(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Lc.warn(Rc),null)})()}requestRestoreLink(e){var t=this;return Kt(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Lc.warn(Rc),null)})()}restoreFromToken(e){var t=this;return Kt(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Lc.warn(Rc),null)})()}restoreFromUrlToken(){var e=this;return Kt(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Lc.warn(Rc),null)})()}getCurrentTicketId(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())&&void 0!==e?e:null}getWidgetSessionId(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())&&void 0!==e?e:null}en(){var e;null==(e=this._conversationsManager)||e.setIdentity()}tn(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.va=!1,this.fa=!1,this.Ae=Ui("[logs]"),this._r=[],this.pa=[],this.ga=()=>{var e,t;null==(e=this.ma)||e.onReconnect(),null==(t=this.ya)||t.onReconnect()},this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.va=!0),Pt&&us(Pt,"online",this.ga)}ba(e,t,n,r){var i,a=function(e,t){var n,r,i,a,s,o,l,u=null!==(n=null==e?void 0:e.flushIntervalMs)&&void 0!==n?n:3e3,c=null!==(r=null==e?void 0:e.maxBufferSize)&&void 0!==r?r:100,d=null!=t&&t.consoleCapture?void 0:null!==(i=null==e?void 0:e.maxLogsPerInterval)&&void 0!==i?i:1e3,h=_n(d)?Math.max(c,2048):Math.max(c,d),p=null==e?void 0:e.resourceAttributes;return{serviceName:null!==(a=null!==(s=null==p?void 0:p["service.name"])&&void 0!==s?s:null==e?void 0:e.serviceName)&&void 0!==a?a:null==t?void 0:t.serviceNameDefault,serviceVersion:null!==(o=null==p?void 0:p["service.version"])&&void 0!==o?o:null==e?void 0:e.serviceVersion,environment:null!==(l=null==p?void 0:p["deployment.environment"])&&void 0!==l?l:null==e?void 0:e.environment,resourceAttributes:p,beforeSend:null==e?void 0:e.beforeSend,flushIntervalMs:u,maxBufferSize:c,maxQueueSize:h,maxBatchRecordsPerPost:100,rateCapWindowMs:u,maxLogsPerInterval:d,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}(null==(i=this._instance)||null==(i=i.config)?void 0:i.logs,n);return[new ii(this._a(e,t),a,this.Ae,()=>this.wa(),e=>e(),void 0,r),a]}xa(){var e,t,n=null==(e=this._instance)||null==(e=e.config)?void 0:e.logs;return this.ma&&this.ka===n||(null==(t=this.ma)||t.reset(),this.ka=n,[this.ma,this.Sa]=this.ba(()=>this._r,e=>{this._r=e})),this.ma}Ca(){var e,t,n=null==(e=this._instance)||null==(e=e.config)?void 0:e.logs;return this.ya&&this.Ia===n||(null==(t=this.ya)||t.reset(),this.Ia=n,[this.ya,this.Ta]=this.ba(()=>this.pa,e=>{this.pa=e},{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},zc)),this.ya}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=null==(t=e.logs)?void 0:t.captureConsoleLogs;!jn(n)&&n&&(this.va=!0,this.loadIfEnabled())}reset(){var e,t;this._r=[],null==(e=this.ma)||e.reset(),this.pa=[],null==(t=this.ya)||t.reset()}captureLog(e){this.xa().captureLog(e)}le(e){this.Ca().captureLog(e)}get logger(){return this.Ea||(this.Ea={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Ea}flushLogs(e){e?this.Ma(e):(this.ma&&this.ma.flush().catch(e=>this.Ae.error("PostHog logs flush failed:",e)),this.ya&&this.ya.flush().catch(e=>this.Ae.error("PostHog logs flush failed:",e)))}loadIfEnabled(){if(this.va&&!this.fa){var e=null==Ht?void 0:Ht.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var n;t||null==(n=e.logs)||!n.initializeLogs?this.Ae.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.fa=!0)}):this.Ae.error($a)}else this.Ae.error("PostHog Extensions not found.")}}_a(e,t){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:t=>t===tn.LogsQueue?e():void 0,setPersistedProperty(e,n){var r;e===tn.LogsQueue&&t(null!==(r=n)&&void 0!==r?r:[])},ht:e=>this.ht(e),getLibraryId:()=>Vt.LIB_NAME,getLibraryVersion:()=>Vt.LIB_VERSION}}ht(e){return new Promise(t=>{var n=!1,r=e=>{n||(n=!0,clearTimeout(i),t(e))},i=setTimeout(()=>r({kind:"retry-later",error:new Error("logs request timed out")}),9e4);this._instance._send_request({method:"POST",url:this.Pa(),data:e,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback(e){var t=e.statusCode;if(t>=200&&300>t)r({kind:"ok"});else if(413===t)r({kind:"too-large"});else if(0!==t&&429!==t&&500>t)r({kind:"fatal",error:new Error("logs request failed with status "+t)});else{var n;r({kind:"retry-later",error:null!==(n=e.error)&&void 0!==n?n:new Error("logs request failed with status "+t)})}}})})}Ma(e){this._r.length>0&&this.Ra(e,this._r,this.Sa,Vt.LIB_NAME,e=>{this._r=e}),this.pa.length>0&&this.Ra(e,this.pa,this.Ta,zc,e=>{this.pa=e})}Ra(e,t,n,r,i){if(0!==t.length){var a=t.map(e=>e.record);i([]);var s=ri(a,ni(n,Vt.LIB_NAME,Vt.LIB_VERSION),r,Vt.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Pa(),data:s,compression:"best-available",batchKey:"logs",transport:e})}}Pa(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}wa(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n,windowId:r,sessionStartTimestamp:i,lastActivityTimestamp:a}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n,t.windowId=r,jn(i)||(t.sessionStartTimestamp=i),jn(a)||(t.lastActivityTimestamp=a)}if(null!=Ht&&null!=(e=Ht.location)&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?Kr(Ht.location.href):Ht.location.href),this._instance.featureFlags){var s=this._instance.featureFlags.getFlags();s&&s.length>0&&(t.activeFeatureFlags=s)}return t}}});Ku.__defaultExtensionClasses=Yt({},Kc);var Yc,Qc=function(){Vt.SDK_DIST_CHANNEL="npm";var e=Lu[$u]=new Ku;return function(){function e(){e.done||(e.done=!0,Wu=!1,ts(Lu,function(e){e._dom_loaded()}))}null!=zt&&zt.addEventListener?"complete"===zt.readyState?e():us(zt,"DOMContentLoaded",e,{capture:!1}):Pt&&Ii.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),e}();
2function Jc(){return Yc}var Xc=(0,a.createContext)({get client(){return Jc()},bootstrap:void 0});function Zc(e,t,n){if(void 0===n&&(n=new WeakMap),e===t)return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;if(n.has(e)&&n.get(e)===t)return!0;n.set(e,t);var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0,s=r;a<s.length;a++){var o=s[a];if(!i.includes(o))return!1;if(!Zc(e[o],t[o],n))return!1}return!0}function ed(e){var t,n,r=e.children,i=e.client,s=e.apiKey,o=e.options,l=(0,a.useRef)(null),u=(0,a.useMemo)(function(){if(i)return s&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),o&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),i;var e=Jc();return s||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[i,s,JSON.stringify(o)]);return(0,a.useEffect)(function(){if(!i&&s){var e=Jc(),t=l.current;t?(s!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),o&&!Zc(o,t.options)&&e.set_config(o),l.current={apiKey:s,options:null!==o&&void 0!==o?o:{}}):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(s,o),l.current={apiKey:s,options:null!==o&&void 0!==o?o:{}})}},[i,s,JSON.stringify(o)]),a.createElement(Xc.Provider,{value:{client:u,bootstrap:null!==(t=null===o||void 0===o?void 0:o.bootstrap)&&void 0!==t?t:null===(n=null===i||void 0===i?void 0:i.config)||void 0===n?void 0:n.bootstrap}},r)}var td=function(e){return"function"===typeof e};var nd=function(e,t){return nd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},nd(e,t)};"function"===typeof SuppressedError&&SuppressedError;var rd={componentStack:null,exceptionEvent:null,error:null},id="[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element.";!function(e){function t(t){var n=e.call(this,t)||this;return n.state=rd,n}(function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}nd(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(t,e),t.prototype.componentDidCatch=function(e,t){var n,r=this.props.additionalProperties;td(r)?n=r(e):"object"===typeof r&&(n=r);var i=this.context.client.captureException(e,n),a=t.componentStack;this.setState({error:e,componentStack:null!==a&&void 0!==a?a:null,exceptionEvent:i})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,r=this.state;if(null==r.componentStack)return td(t)?t():t;var i=td(n)?a.createElement(n,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):n;return a.isValidElement(i)?i:(console.warn(id),a.createElement(a.Fragment,null))},t.contextType=Xc}(a.Component);Yc=Qc;var ad=n(768),sd=n(579);const od=(0,a.createContext)(null);function ld(e){let{children:t}=e;const[n,r]=(0,a.useState)(null),[i,s]=(0,a.useState)("loading"),o=(0,a.useCallback)(async()=>{if(localStorage.getItem("sa_token"))try{const{data:e}=await ad.http.get("/auth/me");r(e),s("authed")}catch(e){localStorage.removeItem("sa_token"),s("guest")}else s("guest")},[]);(0,a.useEffect)(()=>{o()},[o]);return(0,sd.jsx)(od.Provider,{value:{user:n,status:i,setUser:r,setToken:e=>{e?(localStorage.setItem("sa_token",e),s("authed")):(localStorage.removeItem("sa_token"),s("guest"))},login:async(e,t)=>{const{data:n}=await ad.http.post("/auth/login",{email:e,password:t});return localStorage.setItem("sa_token",n.token),r(n.user),s("authed"),n.user},register:async(e,t,n)=>{const{data:r}=await ad.http.post("/auth/register",{name:e,email:t,password:n});return r},logout:()=>{localStorage.removeItem("sa_token");
2try{Object.keys(localStorage).forEach(e=>{e.startsWith("vidhya_chat_history_v1::")&&localStorage.removeItem(e)})}catch(Lt){}r(null),s("guest")},refresh:o,refreshMe:o},children:t})}const ud=()=>(0,a.useContext)(od),cd=(0,a.createContext)(null);function dd(e){let{children:t}=e;const{status:n}=ud(),[r,i]=(0,a.useState)([]),[s,o]=(0,a.useState)([]),[l,c]=(0,a.useState)([]),[d,h]=(0,a.useState)([]),[p,f]=(0,a.useState)(null),[m,g]=(0,a.useState)({percent:0,missing_core:[],core_filled:0,core_total:10}),[v,y]=(0,a.useState)({connected:!1,email:null}),[D,b]=(0,a.useState)(!1),x=(0,a.useCallback)(async()=>{if("authed"===n)try{const[e,t,n,r,a,s]=await Promise.all([ad.http.get("/universities").then(e=>e.data),ad.http.get("/tasks").then(e=>e.data),ad.http.get("/scholarships").then(e=>e.data),ad.http.get("/emails").then(e=>e.data),ad.http.get("/profile").then(e=>e.data),ad.http.get("/gmail/status").then(e=>e.data).catch(()=>({connected:!1}))]);i(e),o(t),c(n),h(r),f(a.profile||{}),g(a.completeness||{percent:0,missing_core:[]}),y(s),b(!0)}catch(e){console.error("workspace load error",e)}},[n]);(0,a.useEffect)(()=>{x()},[x]);const C={universities:r,tasks:s,scholarships:l,emails:d,profile:p,completeness:m,gmail:v,loaded:D,refresh:x,addUniversity:async e=>{const{data:t}=await ad.http.post("/universities",e);return i(e=>[...e,t]),t},updateUniversity:async(e,t)=>{const{data:n}=await ad.http.patch("/universities/".concat(e),t);return i(t=>t.map(t=>t.id===e?n:t)),n},deleteUniversity:async e=>{await ad.http.delete("/universities/".concat(e)),i(t=>t.filter(t=>t.id!==e))},backfillUniversity:async e=>{i(t=>t.map(t=>t.id===e?(0,u.A)((0,u.A)({},t),{},{research_status:"pending"}):t));const{data:t}=await ad.http.post("/universities/".concat(e,"/backfill-research"));return null!==t&&void 0!==t&&t.data&&i(n=>n.map(n=>n.id===e?t.data:n)),t},computeCostAndAid:async e=>{const{data:t}=await ad.http.post("/universities/".concat(e,"/cost-and-aid"));return null!==t&&void 0!==t&&t.data&&i(n=>n.map(n=>n.id===e?(0,u.A)((0,u.A)({},n),{},{cost_aid:t.data}):n)),t},syncChecklistTasks:async e=>{const{data:t}=await ad.http.post("/universities/".concat(e,"/sync-checklist-tasks"));try{const{data:e}=await ad.http.get("/tasks");o(e)}catch(n){console.warn("[sync-tasks] task refresh failed:",n)}return t},listDocuments:async e=>{const{data:t}=await ad.http.get("/universities/".concat(e,"/documents"));return t},uploadDocument:async function(e,t){let{name:n,doc_type:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=new FormData;i.append("file",t),n&&i.append("name",n),r&&i.append("doc_type",r);const{data:a}=await ad.http.post("/universities/".concat(e,"/documents"),i,{headers:{"Content-Type":"multipart/form-data"}});return a},renameDocument:async(e,t)=>{const{data:n}=await ad.http.patch("/documents/".concat(e),t);return n},deleteDocument:async e=>{await ad.http.delete("/documents/".concat(e))},duplicateDocument:async(e,t,n)=>{const{data:r}=await ad.http.post("/documents/".concat(e,"/duplicate"),(0,u.A)({target_uni_id:t},n?{name:n}:{}));return r},addTask:async e=>{const{data:t}=await ad.http.post("/tasks",e);return o(e=>[...e,t]),t},updateTask:async(e,t)=>{const{data:n}=await ad.http.patch("/tasks/".concat(e),t);return o(t=>t.map(t=>t.id===e?n:t)),n},deleteTask:async e=>{await ad.http.delete("/tasks/".concat(e)),o(t=>t.filter(t=>t.id!==e))},addScholarship:async e=>{const{data:t}=await ad.http.post("/scholarships",e);return c(e=>[...e,t]),t},updateScholarship:async(e,t)=>{const{data:n}=await ad.http.patch("/scholarships/".concat(e),t);return c(t=>t.map(t=>t.id===e?n:t)),n},deleteScholarship:async e=>{await ad.http.delete("/scholarships/".concat(e)),c(t=>t.filter(t=>t.id!==e))},addEmail:async e=>{const{data:t}=await ad.http.post("/emails",e);return h(e=>[...e,t]),t},updateProfile:async e=>{const{data:t}=await ad.http.put("/profile",e);return f(t.profile||{}),g(t.completeness||m),t},refreshGmailStatus:async()=>{try{const{data:e}=await ad.http.get("/gmail/status");return y(e),e}catch(Lt){return null}},connectGmail:async()=>{const{data:e}=await ad.http.post("/gmail/connect");return e},disconnectGmail:async()=>{await ad.http.delete("/gmail/disconnect"),y({connected:!1,email:null})},draftToGmail:async e=>{let{to:t,subject:n,body:r,university_id:i,professor:a}=e;const{data:s}=await ad.http.post("/gmail/draft",{to:t,subject:n,body:r,university_id:i,professor:a});return s.email&&h(e=>[s.email,...e]),s},sendViaGmail:async e=>{const{data:t}=await ad.http.post("/gmail/send",e);return await x(),t},syncGmailEmail:async e=>{const{data:t}=await ad.http.post("/gmail/sync/".concat(e));return await x(),t},syncAllGmail:async()=>{const{data:e}=await ad.http.post("/gmail/sync-all");return await x(),e}};return(0,sd.jsx)(cd.Provider,{value:C,children:t})}const hd=()=>(0,a.useContext)(cd),pd={Sparkle:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M12 3l1.6 4.6L18 9l-4.4 1.4L12 15l-1.6-4.6L6 9l4.4-1.4L12 3z"}),(0,sd.jsx)("path",{d:"M19 15l.7 1.8L21 17.5l-1.3.7L19 20l-.7-1.8L17 17.5l1.3-.7L19 15z"})]}),Search:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,sd.jsx)("path",{d:"m20 20-3.5-3.5"})]}),Home:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-7h-6v7H4a1 1 0 0 1-1-1z"})}),Board:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("rect",{x:"3",y:"4",width:"6",height:"16",rx:"1.5"}),(0,sd.jsx)("rect",{x:"11",y:"4",width:"6",height:"10",rx:"1.5"}),(0,sd.jsx)("rect",{x:"19",y:"4",width:"2",height:"6",rx:"1"})]}),Chat:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-7l-4 3v-3H6a2 2 0 0 1-2-2z"})}),Check:e=>(0,sd.jsx)("svg",{width:e.size||14,height:e.size||14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"m5 13 4 4L19 7"})}),Calendar:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2"}),(0,sd.jsx)("path",{d:"M3 10h18M8 3v4M16 3v4"})]}),Mail:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,sd.jsx)("path",{d:"m3 7 9 6 9-6"})]}),Coin:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,sd.jsx)("path",{d:"M9 9.5a3 3 0 0 1 6 0v.5a2.5 2.5 0 0 1-2.5 2.5H12a2.5 2.5 0 0 0 0 5h.5a3 3 0 0 0 2.5-1.5M12 7v1.5m0 7V17"})]}),Globe:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,sd.jsx)("path",{d:"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"})]}),Send:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M5 12 22 4l-7 18-3-7-7-3z"})}),Plus:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M12 5v14M5 12h14"})}),Filter:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M3 5h18l-7 9v5l-4 2v-7z"})}),Bell:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M6 9a6 6 0 0 1 12 0c0 7 3 7 3 9H3c0-2 3-2 3-9z"}),(0,sd.jsx)("path",{d:"M10 21a2 2 0 0 0 4 0"})]}),ArrowRight:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})}),Doc:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),(0,sd.jsx)("path",{d:"M14 3v6h6M8 13h8M8 17h6"})]}),Copy:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,sd.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),Paperclip:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M21 11l-9 9a5 5 0 0 1-7-7l9-9a3.5 3.5 0 0 1 5 5L10 18a2 2 0 0 1-3-3l8-8"})}),GraduationCap:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M22 9 12 4 2 9l10 5z"}),(0,sd.jsx)("path",{d:"M6 11v5c0 1.5 3 3 6 3s6-1.5 6-3v-5"})]}),Trophy:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M8 21h8M12 17v4M7 4h10v5a5 5 0 0 1-10 0z"}),(0,sd.jsx)("path",{d:"M17 5h3a2 2 0 0 1 0 4h-3M7 5H4a2 2 0 0 0 0 4h3"})]}),Bolt:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7z"})}),Settings:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,sd.jsx)("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1A1.7 1.7 0 0 0 9 19.4a1.7 1.7 0 0 0-1.9.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1A1.7 1.7 0 0 0 4.6 9a1.7 1.7 0 0 0-.3-1.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.9.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.9-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.9V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]}),Inbox:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),(0,sd.jsx)("path",{d:"M5 5h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z"})]}),Compare:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M16 3l5 5-5 5M21 8H9M8 21l-5-5 5-5M3 
216h12"})}),Logout:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"})}),User:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("circle",{cx:"12",cy:"8",r:"4"}),(0,sd.jsx)("path",{d:"M4 21c0-4 4-7 8-7s8 3 8 7"})]}),Shield:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M12 2l8 4v6c0 5-3.5 9-8 10-4.5-1-8-5-8-10V6l8-4z"}),(0,sd.jsx)("path",{d:"M9 12l2 2 4-4"})]}),Trash:e=>(0,sd.jsx)("svg",{width:e.size||14,height:e.size||14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1.5 14a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2L5 6"})}),Caret:e=>(0,sd.jsx)("svg",{width:e.size||10,height:e.size||10,viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M3 5l3 3 3-3"})}),Menu:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M4 7h16M4 12h16M4 17h16"})}),Close:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})}),Upload:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5-5 5 5M12 5v12"})}),Download:e=>(0,sd.jsx)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,sd.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})}),Eye:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z"}),(0,sd.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),EyeOff:e=>(0,sd.jsxs)("svg",{width:e.size||16,height:e.size||16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,sd.jsx)("path",{d:"M17.94 17.94A10.94 10.94 0 0 1 12 19c-7 0-11-7-11-7a18.83 18.83 0 0 1 4.22-5.06M9.9 4.24A11.13 11.13 0 0 1 12 4c7 0 11 7 11 7a17.78 17.78 0 0 1-2.07 3.2"}),(0,sd.jsx)("path",{d:"M14.12 14.12A3 3 0 0 1 9.88 9.88M1 1l22 22"})]})},fd=[{id:"researching",name:"Researching",dotColor:"#9A938A"},{id:"preparing",name:"Preparing",dotColor:"#B8893A"},{id:"applied",name:"Applied",dotColor:"#4A6F8A"},{id:"offer",name:"Got Offer",dotColor:"#4F7A4A"}],md=["#4A6F8A","#B85A3D","#4F7A4A","#8A6BB8","#B8893A","#5C7A8C","#A04D5E","#6B7A4F","#7A5C8C","#8C6B4F"],gd=n.p+"static/media/wordmark-indigo.8b5fc4b5b54fba5d28ca.png",vd=n.p+"static/media/wordmark-lime.00836ce856d1a67b4315.png",yd=["size","tone","className","testId"];function Dd(e){let{size:t=30,tone:n="indigo",className:r="",testId:i="vidhya-logo"}=e,a=l(e,yd);const s="lime"===n?vd:gd;return(0,sd.jsx)("img",(0,u.A)({src:s,alt:"Vidhya",className:"vidhya-wordmark ".concat(r),"data-testid":i,style:{height:t,width:"auto",display:"block",userSelect:"none"},draggable:!1},a))}function bd(e){let{value:t,onChange:n,testid:r,autoFocus:i,minLength:s,placeholder:o}=e;const[l,u]=(0,a.useState)(!1);return(0,sd.jsxs)("div",{className:"password-wrap",children:[(0,sd.jsx)("input",{className:"input",type:l?"text":"password",value:t,onChange:e=>n(e.target.value),required:!0,autoFocus:i,minLength:s,placeholder:o,"data-testid":r}),(0,sd.jsx)("button",{type:"button",className:"password-toggle",onClick:()=>u(e=>!e),"aria-label":l?"Hide password":"Show password","data-testid":"".concat(r,"-toggle"),tabIndex:-1,
2children:l?(0,sd.jsx)(pd.EyeOff,{size:16}):(0,sd.jsx)(pd.Eye,{size:16})})]})}function xd(e){let{eyebrow:t,headline:n,quote:r}=e;return(0,sd.jsxs)("div",{className:"auth-aside",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:12,color:"var(--clay-soft)",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:18,position:"relative"},children:t}),(0,sd.jsx)("div",{className:"auth-aside-h1",children:n})]}),(0,sd.jsxs)("div",{className:"auth-aside-quote",children:["\u201c",r,"\u201d"]})]})}function Cd(){const{login:e}=ud(),t=Fe(),[n,r]=(0,a.useState)(""),[i,s]=(0,a.useState)(""),[o,l]=(0,a.useState)(""),[u,c]=(0,a.useState)(!1),[d,h]=(0,a.useState)(!1);return d?(0,sd.jsx)(kd,{onBack:()=>h(!1),initialEmail:n}):(0,sd.jsxs)("div",{className:"auth-shell","data-testid":"login-page",children:[(0,sd.jsx)("div",{className:"auth-form-side",children:(0,sd.jsxs)("div",{className:"auth-card",children:[(0,sd.jsx)("div",{className:"brand",style:{borderBottom:"none",paddingBottom:0,marginBottom:24},children:(0,sd.jsx)(Dd,{size:30})}),(0,sd.jsxs)("h2",{children:["Welcome ",(0,sd.jsx)("em",{children:"back"}),"."]}),(0,sd.jsx)("p",{className:"sub",children:"Sign in to your higher-education copilot."}),o&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"login-error",children:o}),(0,sd.jsxs)("form",{onSubmit:async r=>{r.preventDefault(),l(""),c(!0);try{const r=await e(n,i);t(r&&!1===r.onboarded?"/onboarding":"/app")}catch(a){l((0,ad.K)(a))}finally{c(!1)}},children:[(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"Email"}),(0,sd.jsx)("input",{className:"input",type:"email",value:n,onChange:e=>r(e.target.value),required:!0,autoFocus:!0,"data-testid":"login-email-input"})]}),(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",marginBottom:4},children:[(0,sd.jsx)("label",{style:{margin:0},children:"Password"}),(0,sd.jsx)("button",{type:"button",className:"link-btn-inline",onClick:()=>h(!0),"data-testid":"forgot-password-link",children:"Forgot?"})]}),(0,sd.jsx)(bd,{value:i,onChange:s,testid:"login-password-input"})]}),(0,sd.jsx)("button",{type:"submit",className:"btn btn-clay auth-cta",disabled:u,"data-testid":"login-submit-btn",children:u?"Signing in\u2026":"Sign in"})]}),(0,sd.jsxs)("div",{className:"auth-switch",children:["New to Vidhya? ",(0,sd.jsx)(wt,{to:"/register","data-testid":"go-to-register",children:"Create an account"})]})]})}),(0,sd.jsx)(xd,{eyebrow:"Higher-education copilot",headline:(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)(sd.Fragment,{children:["Plan ",(0,sd.jsx)("strong",{children:"smarter,"})]}),(0,sd.jsx)("br",{}),(0,sd.jsxs)(sd.Fragment,{children:["apply with ",(0,sd.jsx)("em",{children:"clarity."})]})]}),quote:"Vidhya helps high-school students plan, organize, and research their path to higher education \u2014 anywhere in the world."})]})}function Fd(){const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(""),[i,s]=(0,a.useState)(""),[o,l]=(0,a.useState)(""),[u,c]=(0,a.useState)(!1),[d,h]=(0,a.useState)("form");return"verify"===d?(0,sd.jsx)(_d,{email:n,name:e,password:i,onBack:()=>h("form")}):(0,sd.jsxs)("div",{className:"auth-shell","data-testid":"register-page",children:[(0,sd.jsx)("div",{className:"auth-form-side",children:(0,sd.jsxs)("div",{className:"auth-card",children:[(0,sd.jsx)("div",{className:"brand",style:{borderBottom:"none",paddingBottom:0,marginBottom:24},children:(0,sd.jsx)(Dd,{size:30})}),(0,sd.jsxs)("h2",{children:["Begin your ",(0,sd.jsx)("em",{children:"shortlist."})]}),(0,sd.jsx)("p",{className:"sub",children:"Create an account \u2014 your AI advisor is waiting."}),o&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"register-error",children:o}),(0,sd.jsxs)("form",{onSubmit:async t=>{t.preventDefault(),l(""),c(!0);try{await ad.http.post("/auth/register",{name:e,email:n,password:i}),h("verify")}catch(r){l((0,ad.K)(r))}finally{c(!1)}},children:[(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"Name"}
2),(0,sd.jsx)("input",{className:"input",value:e,onChange:e=>t(e.target.value),required:!0,"data-testid":"register-name-input"})]}),(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"Email"}),(0,sd.jsx)("input",{className:"input",type:"email",value:n,onChange:e=>r(e.target.value),required:!0,"data-testid":"register-email-input"})]}),(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"Password (min 6)"}),(0,sd.jsx)(bd,{value:i,onChange:s,testid:"register-password-input",minLength:6})]}),(0,sd.jsx)("button",{type:"submit",className:"btn btn-clay auth-cta",disabled:u,"data-testid":"register-submit-btn",children:u?"Sending code\u2026":"Create account"}),(0,sd.jsxs)("p",{className:"auth-legal","data-testid":"register-legal-note",children:["By creating an account you agree to our"," ",(0,sd.jsx)(wt,{to:"/terms","data-testid":"register-terms-link",children:"Terms"})," and"," ",(0,sd.jsx)(wt,{to:"/privacy","data-testid":"register-privacy-link",children:"Privacy Policy"}),"."]})]}),(0,sd.jsxs)("div",{className:"auth-switch",children:["Already have one? ",(0,sd.jsx)(wt,{to:"/login","data-testid":"go-to-login",children:"Sign in"})]})]})}),(0,sd.jsx)(xd,{eyebrow:"Built with real counselors",headline:(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("em",{children:"Real"})," data,",(0,sd.jsx)("br",{}),(0,sd.jsx)("strong",{children:"real"})," deadlines,",(0,sd.jsx)("br",{}),(0,sd.jsx)("strong",{children:"real"})," professors."]}),quote:"We pull live data from university pages and faculty directories, so your shortlist isn't built on stale Reddit threads."})]})}function _d(e){let{email:t,name:n,password:r,onBack:i}=e;const{setUser:s,setToken:o}=ud(),l=Fe(),[u,c]=(0,a.useState)(""),[d,h]=(0,a.useState)(""),[p,f]=(0,a.useState)("We sent a 6-digit code to ".concat(t,". Enter it below to finish setting up your account.")),[m,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1);return(0,sd.jsxs)("div",{className:"auth-shell","data-testid":"verify-email-page",children:[(0,sd.jsx)("div",{className:"auth-form-side",children:(0,sd.jsxs)("div",{className:"auth-card",children:[(0,sd.jsx)("div",{className:"brand",style:{borderBottom:"none",paddingBottom:0,marginBottom:24},children:(0,sd.jsx)(Dd,{size:30})}),(0,sd.jsxs)("h2",{children:["Check your ",(0,sd.jsx)("em",{children:"inbox"}),"."]}),p&&(0,sd.jsx)("p",{className:"sub","data-testid":"verify-info",children:p}),d&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"verify-error",children:d}),(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),h(""),g(!0);try{const{data:e}=await ad.http.post("/auth/verify-email",{email:t,code:u});localStorage.setItem("sa_token",e.token),o(e.token),s(e.user),l("/onboarding")}catch(n){h((0,ad.K)(n))}finally{g(!1)}},children:[(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"6-digit code"}),(0,sd.jsx)("input",{className:"input code-input",inputMode:"numeric",maxLength:6,pattern:"\\d{6}",value:u,onChange:e=>c(e.target.value.replace(/\D/g,"").slice(0,6)),required:!0,autoFocus:!0,"data-testid":"verify-code-input"})]}),(0,sd.jsx)("button",{type:"submit",className:"btn btn-clay auth-cta",disabled:m||6!==u.length,"data-testid":"verify-submit-btn",children:m?"Verifying\u2026":"Verify & continue"})]}),(0,sd.jsxs)("div",{className:"auth-switch",style:{display:"flex",justifyContent:"space-between",gap:8},children:[(0,sd.jsx)("button",{type:"button",className:"link-btn-inline",onClick:i,"data-testid":"verify-back",children:"\u2190 Wrong email?"}),(0,sd.jsx)("button",{type:"button",className:"link-btn-inline",onClick:async()=>{h(""),f(""),y(!0);try{await ad.http.post("/auth/resend-verification",{email:t}),f("A fresh code is on the way to ".concat(t,"."))}catch(e){h((0,ad.K)(e))}finally{y(!1)}},disabled:v,"data-testid":"verify-resend",children:v?"Sending\u2026":"Resend code"})]})]})}),(0,sd.jsx)(xd,{eyebrow:"One last step",headline:(0,sd.jsxs)(sd.Fragment,{children:["A real ",(0,sd.jsx)("em",{children:"inbox"}),",",(0,sd.jsx)("br",{}),"a real ",(0,sd.jsx)("strong",{children:"copilot."})]}),quote:"Verifying your email keeps your shortlist, deadlines, and AI chats tied to a real address you control."})]})}function kd(e){let{initialEmail:t,onBack:n}=e;const[r,i]=(0,a.useState)("request"),[s,o]=(0,a.useState)(t||""),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(""),[h,p]=(0,a.useState)(""),[f,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(!1),y=Fe();return(0,sd.jsxs)("div",{className:"auth-shell","data-testid":"forgot-password-page",children:[(0,sd.jsx)("div",{className:"auth-form-side",children:(0,sd.jsxs)("div",{className:"auth-card",children:[(0,sd.jsx)("div",{className:"brand",style:{borderBottom:"none",paddingBottom:0,marginBottom:24},children:(0,sd.jsx)(Dd,{size:30})}),(0,sd.jsxs)("h2",{children:["Reset your ",(0,sd.jsx)("em",{children:"password"}),"."]}),(0,sd.jsx)("p",{className:"sub",children:"request"===r?"We'll send a 6-digit code to your email to verify it's you.":"Enter the code we sent + your new password."}),f&&(0,sd.jsx)("div",{className:"auth-info","data-testid":"forgot-info",children:f}),h&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"forgot-error",children:h}),"request"===r?(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),p(""),v(!0);try{await ad.http.post("/auth/forgot-password",{email:s}),m("If ".concat(s," is on file, a 6-digit code is on its way.")),i("reset")}catch(t){p((0,ad.K)(t))}finally{v(!1)}},children:[(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"Email"}),(0,sd.jsx)("input",{className:"input",type:"email",value:s,onChange:e=>o(e.target.value),required:!0,autoFocus:!0,"data-testid":"forgot-email-input"})]}),(0,sd.jsx)("button",{type:"submit",className:"btn btn-clay auth-cta",disabled:g,"data-testid":"forgot-submit-btn",children:g?"Sending\u2026":"Send code"})]}):(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),p(""),v(!0);
2try{await ad.http.post("/auth/reset-password",{email:s,code:l,new_password:c}),y("/login",{replace:!0})}catch(t){p((0,ad.K)(t))}finally{v(!1)}},children:[(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"6-digit code"}),(0,sd.jsx)("input",{className:"input code-input",inputMode:"numeric",maxLength:6,value:l,onChange:e=>u(e.target.value.replace(/\D/g,"").slice(0,6)),required:!0,autoFocus:!0,"data-testid":"reset-code-input"})]}),(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"New password (min 6)"}),(0,sd.jsx)(bd,{value:c,onChange:d,testid:"reset-new-password-input",minLength:6})]}),(0,sd.jsx)("button",{type:"submit",className:"btn btn-clay auth-cta",disabled:g||6!==l.length,"data-testid":"reset-submit-btn",children:g?"Resetting\u2026":"Reset password"})]}),(0,sd.jsx)("div",{className:"auth-switch",children:(0,sd.jsx)("button",{type:"button",className:"link-btn-inline",onClick:n,"data-testid":"forgot-back",children:"\u2190 Back to sign in"})})]})}),(0,sd.jsx)(xd,{eyebrow:"Account recovery",headline:(0,sd.jsxs)(sd.Fragment,{children:["A fresh ",(0,sd.jsx)("em",{children:"start"}),",",(0,sd.jsx)("br",{}),"not a lost ",(0,sd.jsx)("strong",{children:"account."})]}),quote:"Your saved shortlist, chats, and deadlines all stay intact \u2014 only the password changes."})]})}const wd=e=>{let{size:t=24,className:n,title:r}=e;return(0,sd.jsxs)("svg",{width:t,height:t,viewBox:"0 0 200 200",className:n,role:"img","aria-label":r||"Vidhya",fill:"none",children:[(0,sd.jsx)("path",{d:"M 60 60 L 76 90 L 89 113 L 97 127 L 100 129",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeDasharray:"0.2 5.2",opacity:"0.92"}),(0,sd.jsx)("path",{d:"M 140 60 L 124 90 L 111 113 L 103 127 L 100 129",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeDasharray:"0.2 5.2",opacity:"0.92"}),(0,sd.jsx)("circle",{cx:"60",cy:"60",r:"4.4",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"76",cy:"90",r:"4.0",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"89",cy:"113",r:"3.6",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"97",cy:"127",r:"3.2",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"140",cy:"60",r:"4.4",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"124",cy:"90",r:"4.0",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"111",cy:"113",r:"3.6",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"103",cy:"127",r:"3.2",fill:"currentColor"}),(0,sd.jsx)("circle",{cx:"100",cy:"138",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"3"}),(0,sd.jsx)("circle",{cx:"100",cy:"138",r:"4.6",fill:"currentColor"})]})},Ed=e=>{let{s:t=18}=e;return(0,sd.jsx)(wd,{size:t})},jd=e=>{let{size:t=60}=e;return(0,sd.jsx)(Dd,{size:t,testId:"landing-logo"})},Ad={arrow:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:(0,sd.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})}),check:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",children:(0,sd.jsx)("path",{d:"M20 6 9 17l-5-5"})}),x:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,sd.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})}),board:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,sd.jsx)("path",{d:"M3 9h18M9 9v11"})]}),shield:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("path",{d:"M12 2 4 6v6c0 5 3.5 8 8 10 4.5-2 8-5 8-10V6z"}),(0,sd.jsx)("path",{d:"m9 12 2 2 4-4"})]}),mail:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("path",{d:"M4 4h16v16H4z"}),(0,sd.jsx)("path",{d:"m4 7 8 5 8-5"})]}),tasks:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("path",{d:"M9 11l3 3 8-8"}),(0,sd.jsx)("path",{d:"M20 12v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9"})]}),award:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("circle",{cx:"12",cy:"8",r:"6"}),(0,sd.jsx)("path",{d:"M8 14l-1 8 5-3 5 3-1-8"})]}),zap:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,sd.jsx)("path",{d:"M13 2 3 14h
27l-1 8 10-12h-7z"})}),chev:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"m6 9 6 6 6-6"})}),calendar:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),(0,sd.jsx)("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),doc:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("path",{d:"M5 3h9l5 5v13H5z"}),(0,sd.jsx)("path",{d:"M14 3v5h5"})]}),alert:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("path",{d:"m10.3 3.9-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3.1l-8-14a2 2 0 0 0-3.4 0z"}),(0,sd.jsx)("path",{d:"M12 9v4M12 17h.01"})]})},Sd=[{icon:"calendar",text:"Different deadlines for every single program"},{icon:"doc",text:"Essays, transcripts, recommendations and funding forms scattered everywhere"},{icon:"mail",text:"Professors who never reply on the first try"},{icon:"award",text:"Scholarships that are hard to find and easy to miss"},{icon:"alert",text:"One small mistake that can cost you a whole year"}],Nd=[{icon:Ad.board,title:"Find programs that fit",body:"Browse live university pages, compare requirements and deadlines, and shortlist programs that match your profile and budget."},{icon:Ad.board,title:"Track every application in one board",body:"Move each school from research to applied to offer. Every card holds the full checklist, deadlines, notes and status."},{icon:Ad.mail,title:"Draft outreach that sounds human",body:"Find the right professor or admissions contact and generate a tailored email based on the program and your interests."},{icon:Ad.tasks,title:"Stay on top of what's next",body:"Get prioritised tasks built from your real deadlines, so you always know what to do first."},{icon:Ad.award,title:"Find funding before it blocks you",body:"Search scholarships and funding filtered by field, location and eligibility \u2014 no more random Google hunts."},{icon:Ad.zap,title:"Autofill the repetitive stuff",body:"Securely reuse your saved details across application portals, so you're not retyping the same info fifteen times."}],Bd=[{t:"Live university data",s:"Pulled from real pages, not a stale database."},{t:"Verified where it counts",s:"Deadlines and requirements confirmed from the source."},{t:"Your data, your control",s:"Documents and personal details stay yours."},{t:"No bluffing your chances",s:"Honest admit odds \u2014 never inflated to keep you happy."}],Td=[{q:"Who is Vidhya for?",a:"Any student applying to university \u2014 doing it solo, with no counselor and no agent. Vidhya keeps every program, deadline, essay prompt, email and scholarship in one workspace."},{q:"Does Vidhya do the application for me?",a:"No. Vidhya helps you research programs, organise deadlines, draft outreach and find funding \u2014 but you stay in control of your application. It guides and structures; the decisions and the writing stay yours."},{q:"How does the funding help work?",a:"Vidhya searches scholarships and funding opportunities filtered by your field, location and eligibility, then helps you track deadlines and close your budget gap \u2014 so cost doesn't stop you."},{q:"Is my personal data safe?",a:"Your documents and personal details stay under your control. We never store passports, national IDs, bank details or portal passwords \u2014 you enter those in the portal yourself."},{q:"Do I need to pay to start?",a:"No. The free plan lets you build a target list, track a limited number of programs and manage tasks. Upgrade when you're ready for unlimited programs, fit & budget analysis, scholarship discovery and autofill."}];function Pd(){const[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)("signup"),[i,s]=(0,a.useState)("annual"),[o,l]=(0,a.useState)(0),u=e=>{r(e),t(!0)};(0,a.useEffect)(()=>{const e=Array.from(document.querySelectorAll(".lp .reveal"));if(!("IntersectionObserver"in window))return void e.forEach(e=>e.classList.add("in"));const t=new IntersectionObserver(e=>
2{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("in"),t.unobserve(e.target))})},{threshold:.14,rootMargin:"0px 0px -8% 0px"});return e.forEach(e=>t.observe(e)),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{const e=e=>{const t=e.target.closest('a[href^="#"]');if(!t)return;const n=t.getAttribute("href").slice(1),r=n&&document.getElementById(n);r&&(e.preventDefault(),r.scrollIntoView({behavior:"smooth",block:"start"}))};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[]);const c="annual"===i?"$11":"$14.99",d="annual"===i?"billed $132 annually \xb7 save $48":"billed monthly \xb7 cancel anytime";return(0,sd.jsxs)("div",{className:"lp","data-testid":"landing-page",children:[(0,sd.jsx)("nav",{"data-testid":"landing-nav",children:(0,sd.jsxs)("div",{className:"nav-inner",children:[(0,sd.jsx)(wt,{to:"/",children:(0,sd.jsx)(jd,{})}),(0,sd.jsxs)("ul",{className:"nav-links",children:[(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#features",children:"Product"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#how",children:"How it works"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#pricing",children:"Pricing"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#faq",children:"FAQ"})})]}),(0,sd.jsxs)("div",{className:"nav-cta",children:[(0,sd.jsx)("button",{type:"button",className:"nav-signin",onClick:()=>u("signin"),"data-testid":"nav-signin-btn",children:"Sign in"}),(0,sd.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>u("signup"),"data-testid":"nav-signup-btn",children:"Start free"})]})]})}),(0,sd.jsx)("header",{className:"hero",children:(0,sd.jsx)("div",{className:"container",children:(0,sd.jsxs)("div",{className:"hero-grid",children:[(0,sd.jsxs)("div",{className:"hero-left",children:[(0,sd.jsxs)("h1",{"data-testid":"hero-headline",children:["Apply to every university ",(0,sd.jsx)("span",{className:"hl",children:"from one workspace."})]}),(0,sd.jsxs)("p",{className:"hero-sub",children:["Vidhya's AI reads real university pages and builds a tracked plan for every school \u2014 fit, requirements, fees, deadlines. Everything you need to ",(0,sd.jsx)("b",{children:"apply yourself and choose a university that's actually right for you"}),"."]}),(0,sd.jsxs)("div",{className:"hero-cta",children:[(0,sd.jsxs)("button",{type:"button",className:"btn btn-primary btn-lg",onClick:()=>u("signup"),"data-testid":"hero-start-btn",children:["Start free ",Ad.arrow]}),(0,sd.jsx)("a",{href:"#how",className:"btn btn-ghost btn-lg","data-testid":"hero-how-btn",children:"See it in action"})]}),(0,sd.jsxs)("div",{className:"microtrust",children:[(0,sd.jsxs)("span",{children:[Ad.check," Never gives fake data"]}),(0,sd.jsxs)("span",{children:[Ad.check," Never stores critical information"]}),(0,sd.jsxs)("span",{children:[Ad.check," Never bluffs your chances"]})]})]}),(0,sd.jsx)("div",{className:"hero-right",children:(0,sd.jsx)(Ld,{})})]})})}),(0,sd.jsx)("section",{className:"problem",children:(0,sd.jsx)("div",{className:"container",children:(0,sd.jsxs)("div",{className:"problem-grid",children:[(0,sd.jsxs)("div",{className:"reveal",children:[(0,sd.jsx)("span",{className:"eyebrow",children:"The wall"}),(0,sd.jsx)("h2",{children:"The wall every applicant hits."}),(0,sd.jsx)("p",{className:"lead",children:"When it's time to apply, the support vanishes. No counselor. No one checking your list. Just you, a dozen portals, and one cycle to get it right."}),(0,sd.jsxs)("div",{className:"problem-kicker",children:["Vidhya turns the chaos into ",(0,sd.jsx)("span",{className:"accent",children:"one workspace."})]})]}),(0,sd.jsx)("ul",{className:"problem-list reveal",children:Sd.map((e,t)=>(0,sd.jsxs)("li",{children:[(0,sd.jsx)("span",{className:"ic",children:Ad[e.icon]}),e.text]},t))})]})})}),(0,sd.jsx)("section",{className:"features",id:"features",children:(0,sd.jsxs)("div",{className:"container",children:[(0,sd.jsxs)("div",{className:"section-head reveal",children:[(0,sd.jsx)("span",{className:"eyebrow",children:"What you get"}),(0,sd.jsxs)("h2",{children:["Everything you need to apply ",(0,sd.jsx)("span",{className:"accent",children:"without dropping the ball."})]}),(0,sd.jsx)("p",{children:"One clear promise \u2014 research, plan, manage, and apply to universities from a single workspace."})]}),(0,sd.jsx)("div",{className:"features-grid",children:Nd.map((e,t)=>(0,sd.jsxs)("div",{className:"feat reveal","data-testid":"feature-card-".concat(t),children:[(0,sd.jsx)("div",{className:"fi",children:e.icon}),(0,sd.jsx)("h4",{children:e.title}),(0,sd.jsx)("p",{children:e.body})]},t))})]})}),(0,sd.jsx)("section",{className:"trust",id:"how",children:(0,sd.jsx)("div",{className:"container",children:(0,sd.jsxs)("div",{className:"trust-card reveal",children:[(0,sd.jsx)("div",{className:"glow"}),(0,sd.jsxs)("div",{className:"inner",children:[(0,sd.jsx)("span",{className:"eyebrow",children:"Built for accuracy. Built for control."}),(0,sd.jsx)("h2",{children:"Honest by design \u2014 because your application is on the line."}),(0,sd.jsx)("div",{className:"trust-grid",children:Bd.map((e,t)=>(0,sd.jsxs)("div",{className:"trust-item",children:[(0,sd.jsx)("span",{className:"ti",children:Ad.shield}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("b",{children:e.t}),(0,sd.jsx)("span",{children:e.s})]})]},t))})]})]})})}),(0,sd.jsx)("section",{className:"pricing",id:"pricing",children:(0,sd.jsxs)("div",{className:"container",children:[(0,sd.jsxs)("div",{className:"section-head reveal",children:[(0,sd.jsx)("span",{className:"eyebrow",children:"Pricing"}),(0,sd.jsx)("h2",{children:"A wasted cycle costs you a year."}),(0,sd.jsx)("p",{children:"Vidhya costs less than one textbook a month."})]}),(0,sd.jsx)("div",{className:"billing-wrap reveal",children:(0,sd.jsxs)("div",{className:"billing-toggle",role:"tablist","aria-label":"Billing cycle",children:[(0,sd.jsx)("button",{type:"button",className:"toggle-btn ".concat("monthly"===i?"active":""),onClick:()=>s("monthly"),"data-testid":"billing-monthly",children:"Monthly"}),(0,sd.jsxs)("button",{type:"button",className:"toggle-btn ".concat("annual"===i?"active":""),onClick:()=>s("annual"),"data-testid":"billing-annual",children:["Annual ",(0,sd.jsx)("span",{className:"save-badge",children:"save $48"})]})]})}),(0,sd.jsxs)("div",{className:"pricing-grid reveal",children:[(0,sd.jsxs)("div",{className:"plan",children:[(0,sd.jsx)("div",{className:"plan-name",children:"Free"}),(0,sd.jsx)("div",{className:"plan-tagline",children:"Start building your target list."}),(0,sd.jsxs)("div",{className:"plan-price",children:[(0,sd.jsx)("span",{className:"plan-amount",children:"$0"}),(0,sd.jsx)("span",{className:"plan-period",children:"forever"})]}),(0,sd.jsx)("div",{className:"plan-billing",children:"No card required"}),(0,sd.jsxs)("ul",{className:"plan-features",children:[(0,sd.jsx)(Rd,{children:"Start building your target list"}),(0,sd.jsx)(Rd,{children:"Track a limited number of programs"}),(0,sd.jsx)(Rd,{children:"Basic task management"}),(0,sd.jsx)(Rd,{locked:!0,children:"Fit & budget gap analysis"}),(0,sd.jsx)(Rd,{locked:!0,children:"Scholarship discovery"}),(0,sd.jsx)(Rd,{locked:!0,children:"Outreach drafting & autofill"})]}),(0,sd.jsx)("button",{type:"button",className:"btn btn-outline btn-lg",onClick:()=>u("signup"),"data-testid":"plan-explorer-btn",children:"Start free"})]}),(0,sd.jsxs)("div",{className:"plan featured",children:[(0,sd.jsx)("div",{className:"plan-badge",children:"For serious applicants"}),(0,sd.jsx)("div",{className:"plan-name",children:"Paid"}),(0,sd.jsx)("div",{className:"plan-tagline",children:"Run your entire application, end to end."}),(0,sd.jsxs)("div",{className:"plan-price",children:[(0,sd.jsx)("span",{className:"plan-amount","data-testid":"plan-amount",children:c}),(0,sd.jsx)("span",{className:"plan-period",children:"/month"})]}),(0,sd.jsx)("div",{className:"plan-billing","data-testid":"plan-billing",children:d}),(0,sd.jsxs)("ul",{className:"plan-features",children:[(0,sd.jsx)(Rd,{children:"Unlimited programs and universities"}),(0,sd.jsx)(Rd,{children:"Fit analysis & budget gap analysis"}),(0,sd.jsx)(Rd,{children:"Full application workspace"}),(0,sd.jsx)(Rd,{children:"Scholarship discovery"}),(0,sd.jsx)(Rd,{children:"Outreach drafting"}),(0,sd.jsx)(Rd,{children:"Autofill repetitive data with the Vidhya extension"})]}),(0,sd.jsx)("button",{type:"button",className:"btn btn-primary btn-lg",onClick:()=>u("signup"),"data-testid":"plan-navigator-btn",children:"Start free"}),(0,sd.jsx)("div",{className:"plan-note",children:"Cancel anytime \xb7 7-day money-back"})]})]}),(0,sd.jsx)("div",{className:"pricing-footer",children:"Prices in USD \xb7 No hidden fees \xb7 Cancel anytime"})]})}),(0,sd.jsx)("section",{className:"faq",id:"faq",children:(0,sd.jsxs)("div",{className:"container",children:[(0,sd.jsxs)("div",{className:"section-head reveal",children:[(0,sd.jsx)("span",{className:"eyebrow",children:"FAQ"}),(0,sd.jsxs)("h2",{children:["Questions, answered ",(0,sd.jsx)("span",{className:"accent",children:"straight."})]})]}),(0,sd.jsx)("div",{className:"faq-list reveal",children:Td.map((e,t)=>(0,sd.jsxs)("div",{className:"faq-item ".concat(o===t?"open":""),"data-testid":"faq-item-".concat(t),children:[(0,sd.jsxs)("button",{type:"button",className:"faq-q",onClick:()=>l(o===t?-1:t),"data-testid":"faq-q-".concat(t),children:[e.q,(0,sd.jsx)("span",{className:"chev",children:Ad.chev})]}),(0,sd.jsx)("div",{className:"faq-a",children:(0,sd.jsx)("p",{children:e.a})})]},t))})]})}),(0,sd.jsx)("section",{className:"cta-section",children:(0,sd.jsx)("div",{className:"container",children:(0,sd.jsxs)("div",{className:"cta-card reveal",children:[(0,sd.jsx)("div",{className:"glow"}),(0,sd.jsx)("div",{className:"cta-dev",children:"\u0935\u093f\u0926\u094d\u092f\u093e"}),(0,sd.jsxs)("div",{className:"inner",children:[(0,sd.jsx)("span",{className:"eyebrow",children:"Research. Plan. Apply. This cycle."}),(0,sd.jsxs)("h2",{children:["Stop applying alone. ",(0,sd.jsx)("span",{className:"accent",children:"Start getting in."})]}),(0,sd.jsx)("p",{children:"Start free and keep every application moving in one place. About 30 seconds to set up \u2014 no card, no catch."}),(0,sd.jsxs)("button",{type:"button",className:"btn btn-lime btn-lg",onClick:()=>u("signup"),"data-testid":"cta-final-btn",children:["Start free ",Ad.arrow]})]})]})})}),(0,sd.jsx)("footer",{children:(0,sd.jsxs)("div",{className:"container",children:[(0,sd.jsxs)("div",{className:"footer-grid",children:[(0,sd.jsxs)("div",{className:"footer-brand",children:[(0,sd.jsx)(wt,{to:"/",children:(0,sd.jsx)(jd,{size:46})}),(0,sd.jsx)("p",{className:"footer-tag",children:"One workspace to research, plan, manage, and apply to universities."}),(0,sd.jsx)("div",{className:"footer-dev",children:"\u0935\u093f\u0926\u094d\u092f\u093e"}),(0,sd.jsx)("div",{className:"footer-dev-tag",children:"\u2014 knowledge"})]}),(0,sd.jsxs)("div",{className:"footer-col",children:[(0,sd.jsx)("h4",{children:"Product"}),(0,sd.jsxs)("ul",{children:[(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#features",children:"Features"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#how",children:"How it works"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#pricing",children:"Pricing"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#faq",children:"FAQ"})})]})]}),(0,sd.jsxs)("div",{className:"footer-col",children:[(0,sd.jsx)("h4",{children:"Company"}),(0,sd.jsxs)("ul",{children:[(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"mailto:[email protected]
2om",children:"Contact"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"https://instagram.com/vidhyahq",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("button",{type:"button",onClick:()=>u("signup"),children:"Start free"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("button",{type:"button",onClick:()=>u("signin"),children:"Sign in"})})]})]}),(0,sd.jsxs)("div",{className:"footer-col",children:[(0,sd.jsx)("h4",{children:"Resources"}),(0,sd.jsxs)("ul",{children:[(0,sd.jsx)("li",{children:(0,sd.jsx)(wt,{to:"/privacy","data-testid":"footer-privacy-link",children:"Privacy"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)(wt,{to:"/terms","data-testid":"footer-terms-link",children:"Terms"})}),(0,sd.jsx)("li",{children:(0,sd.jsx)("a",{href:"#pricing",children:"Plans"})})]})]})]}),(0,sd.jsxs)("div",{className:"footer-bottom",children:[(0,sd.jsxs)("span",{children:["\xa9 ",(new Date).getFullYear()," Vidhya \xb7 All rights reserved."]}),(0,sd.jsxs)("span",{className:"footer-bottom-links",children:[(0,sd.jsx)(wt,{to:"/privacy",children:"Privacy"}),(0,sd.jsx)(wt,{to:"/terms",children:"Terms"})]})]})]})}),e&&(0,sd.jsx)(zd,{initialMode:n,onClose:()=>t(!1)})]})}function Ld(){return(0,sd.jsx)("div",{className:"demo","data-testid":"demo-player",children:(0,sd.jsxs)("div",{className:"demo-window",children:[(0,sd.jsxs)("div",{className:"demo-bar",children:[(0,sd.jsx)("span",{className:"demo-dot"}),(0,sd.jsx)("span",{className:"demo-dot"}),(0,sd.jsx)("span",{className:"demo-dot"}),(0,sd.jsx)("span",{className:"demo-url",children:"app.vidhya.io \xb7 My Universities"})]}),(0,sd.jsxs)("div",{className:"demo-stage",children:[(0,sd.jsxs)("div",{className:"d-board",children:[(0,sd.jsxs)("div",{className:"d-col",children:[(0,sd.jsxs)("div",{className:"d-colh",children:[(0,sd.jsx)("i",{style:{background:"var(--cyan)"}}),"Researching"]}),(0,sd.jsxs)("div",{className:"d-card d-1",children:[(0,sd.jsx)("b",{children:"ETH Z\xfcrich"}),(0,sd.jsx)("span",{children:"MSc Computer Science"}),(0,sd.jsxs)("div",{className:"d-meta",children:[(0,sd.jsx)("div",{className:"d-pg",children:(0,sd.jsx)("i",{style:{width:"20%"}})}),(0,sd.jsx)("span",{className:"d-due",children:"Dec 15"})]})]})]}),(0,sd.jsxs)("div",{className:"d-col",children:[(0,sd.jsxs)("div",{className:"d-colh",children:[(0,sd.jsx)("i",{style:{background:"var(--indigo)"}}),"Applying"]}),(0,sd.jsxs)("div",{className:"d-card d-2",children:[(0,sd.jsx)("b",{children:"NUS"}),(0,sd.jsx)("span",{children:"MComp AI"}),(0,sd.jsxs)("div",{className:"d-meta",children:[(0,sd.jsx)("div",{className:"d-pg",children:(0,sd.jsx)("i",{style:{width:"55%"}})}),(0,sd.jsx)("span",{className:"d-due soon",children:"4d"})]})]})]}),(0,sd.jsxs)("div",{className:"d-col",children:[(0,sd.jsxs)("div",{className:"d-colh",children:[(0,sd.jsx)("i",{style:{background:"var(--verified)"}}),"Offer"]}),(0,sd.jsxs)("div",{className:"d-card d-3",children:[(0,sd.jsx)("b",{children:"U of Toronto"}),(0,sd.jsx)("span",{children:"MSc CS"}),(0,sd.jsxs)("div",{className:"d-meta",children:[(0,sd.jsx)("div",{className:"d-pg",children:(0,sd.jsx)("i",{style:{width:"100%",background:"var(--verified)"}})}),(0,sd.jsx)("span",{className:"d-due",style:{color:"var(--verified)"},children:"Offer"})]})]})]})]}),(0,sd.jsxs)("div",{className:"d-cop",children:[(0,sd.jsx)("div",{className:"glow"}),(0,sd.jsxs)("div",{className:"d-cop-head",children:[(0,sd.jsx)("span",{className:"star",children:(0,sd.jsx)(Ed,{s:14})}),"Ask Vidhya"]}),(0,sd.jsxs)("div",{className:"d-cop-line",children:["NUS tuition is ",(0,sd.jsx)("b",{style:{color:"#fff"},children:"S$17,550/yr"})," and the deadline is ",(0,sd.jsx)("b",{style:{color:"#fff"},children:"Dec 1"}),". You have a S$9,550 funding gap \u2014 I matched 4 scholarships that could close it."]}),(0,sd.jsxs)("span",{className:"d-cop-vbadge",children:[Ad.check," Verified \xb7 nus.edu.sg \xb7 Jun 18"]})]})]})]})})}function Rd(e){let{children:t,locked:n}=e;return(0,sd.jsxs)("li",{className:n?"locked":"",children:[(0,sd.jsx)("span",{className:n?"lock":"check",children:n?(0,sd.jsxs)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,sd.jsx)("rect",{x:"5",y:"11",width:"14",height:"10",rx:"2"}),(0,sd.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]}):(0,sd.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,sd.jsx)("path",{d:"M5 12l5 5L20 7"})})}),t]})}function zd(e){let{onClose:t,initialMode:n="signup"}=e;const[r,i]=(0,a.useState)(n),[s,o]=(0,a.useState)("");return(0,sd.jsx)("div",{className:"lp-modal-shell",onClick:t,"data-testid":"auth-modal",children:(0,sd.jsxs)("div",{className:"lp-modal",onClick:e=>e.stopPropagation(),children:[(0,sd.jsx)("button",{className:"lp-modal-close",onClick:t,"aria-label":"Close","data-testid":"auth-close",children:"\xd7"}),"signin"===r&&(0,sd.jsx)(Md,{switchMode:i,onForgot:e=>{o(e),i("forgot")}}),"signup"===r&&(0,sd.jsx)(Id,{switchMode:i,onAwaitVerification:e=>{o(e),i("verify")}}),"verify"===r&&(0,sd.jsx)(Ud,{email:s,switchMode:i}),"forgot"===r&&(0,sd.jsx)($d,{initialEmail:s,switchMode:i})]})})}function Od(e){let{children:t}=e;return(0,sd.jsx)("div",{className:"lp-mode-footer",children:t})}function Md(e){let{switchMode:t,onForgot:n}=e;const[r,i]=(0,a.useState)(""),[s,o]=(0,a.useState)(""),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(!1);return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Welcome back"}),(0,sd.jsxs)("h3",{className:"lp-modal-h",children:["Sign ",(0,sd.jsx)("em",{children:"in"}),"."]}),(0,sd.jsx)("p",{className:"lp-modal-sub",children:"Continue where you left off."}),(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),u(""),d(!0);try{const{data:e}=await ad.http.post("/auth/login",{email:r,password:s});localStorage.setItem("sa_token",e.token),window.location.href=e.user&&!1===e.user.onboarded?"/onboarding":"/app"}catch(t){u((0,ad.K)(t))}finally{d(!1)}},className:"lp-modal-form",children:[(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"Email"}),(0,sd.jsx)("input",{type:"email",value:r,onChange:e=>i(e.target.value),required:!0,autoFocus:!0,"data-testid":"signin-email"})]}),(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsxs)("div",{className:"lp-row-head",children:[(0,sd.jsx)("label",{children:"Password"}),(0,sd.jsx)("button",{type:"button",className:"lp-link-inline",onClick:()=>n(r),"data-testid":"signin-forgot-link",children:"Forgot?"})]}),(0,sd.jsx)("input",{type:"password",value:s,onChange:e=>o(e.target.value),required:!0,"data-testid":"signin-password"})]}),l&&(0,sd.jsx)("div",{className:"lp-error","data-testid":"signin-error",children:l}),(0,sd.jsx)("button",{type:"submit",className:"lp-modal-submit",disabled:c,"data-testid":"signin-submit",children:c?"Signing in\u2026":"Sign in"})]}),(0,sd.jsxs)(Od,{children:["New here? ",(0,sd.jsx)("button",{type:"button",onClick:()=>t("signup"),"data-testid":"switch-to-signup",children:"Create account"})]})]})}function Id(e){let{switchMode:t,onAwaitVerification:n}=e;const[r,i]=(0,a.useState)(""),[s,o]=(0,a.useState)(""),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(""),[h,p]=(0,a.useState)(!1);return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Free to start"}),(0,sd.jsxs)("h3",{className:"lp-modal-h",children:["Create your ",(0,sd.jsx)("em",{children:"account"}),"."]}),(0,sd.jsx)("p",{className:"lp-modal-sub",children:"Sign up in seconds \u2014 we'll email a 6-digit code to confirm."}),(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),d(""),p(!0);try{await ad.http.post("/auth/register",{email:r,name:s,password:l}),n(r)}catch(t){d((0,ad.K)(t))}finally{p(!1)}},className:"lp-modal-form",children:[(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"Full name"}),(0,sd.jsx)("input",{value:s,onChange:e=>o(e.target.value),required:!0,"data-testid":"signup-name"})]}),(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"Email"}),(0,sd.jsx)("input",{type:"email",value:r,onChange:e=>i(e.target.value),required:!0,"data-testid":"signup-email"})]}),(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"Password (min 6)"}
2),(0,sd.jsx)("input",{type:"password",minLength:6,value:l,onChange:e=>u(e.target.value),required:!0,"data-testid":"signup-password"})]}),c&&(0,sd.jsx)("div",{className:"lp-error","data-testid":"signup-error",children:c}),(0,sd.jsx)("button",{type:"submit",className:"lp-modal-submit",disabled:h,"data-testid":"signup-submit",children:h?"Sending code\u2026":"Create account"}),(0,sd.jsxs)("p",{className:"lp-modal-legal","data-testid":"signup-legal-note",children:["By creating an account you agree to our ",(0,sd.jsx)(wt,{to:"/terms","data-testid":"signup-terms-link",children:"Terms"})," and ",(0,sd.jsx)(wt,{to:"/privacy","data-testid":"signup-privacy-link",children:"Privacy Policy"}),"."]})]}),(0,sd.jsxs)(Od,{children:["Already have an account? ",(0,sd.jsx)("button",{type:"button",onClick:()=>t("signin"),"data-testid":"switch-to-signin-from-signup",children:"Sign in"})]})]})}function Ud(e){let{email:t,switchMode:n}=e;const[r,i]=(0,a.useState)(""),[s,o]=(0,a.useState)(""),[l,u]=(0,a.useState)("We sent a 6-digit code to ".concat(t,". Enter it to finish setting up.")),[c,d]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1);return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"One last step"}),(0,sd.jsxs)("h3",{className:"lp-modal-h",children:["Check your ",(0,sd.jsx)("em",{children:"inbox"}),"."]}),l&&(0,sd.jsx)("p",{className:"lp-modal-sub","data-testid":"verify-info",children:l}),(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),o(""),d(!0);try{const{data:e}=await ad.http.post("/auth/verify-email",{email:t,code:r});localStorage.setItem("sa_token",e.token),window.location.href=e.user&&!1===e.user.onboarded?"/onboarding":"/app"}catch(n){o((0,ad.K)(n))}finally{d(!1)}},className:"lp-modal-form",children:[(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"6-digit code"}),(0,sd.jsx)("input",{inputMode:"numeric",maxLength:6,pattern:"\\d{6}",value:r,onChange:e=>i(e.target.value.replace(/\D/g,"").slice(0,6)),required:!0,autoFocus:!0,"data-testid":"verify-code-input",className:"lp-code-input"})]}),s&&(0,sd.jsx)("div",{className:"lp-error","data-testid":"verify-error",children:s}),(0,sd.jsx)("button",{type:"submit",className:"lp-modal-submit",disabled:c||6!==r.length,"data-testid":"verify-submit",children:c?"Verifying\u2026":"Verify & continue"})]}),(0,sd.jsxs)(Od,{children:[(0,sd.jsx)("button",{type:"button",onClick:()=>n("signup"),"data-testid":"verify-back",children:"\u2190 Wrong email?"}),(0,sd.jsx)("button",{type:"button",className:"lp-mode-footer-spaced",onClick:async()=>{o(""),u(""),p(!0);try{await ad.http.post("/auth/resend-verification",{email:t}),u("A fresh code is on the way to ".concat(t,"."))}catch(e){o((0,ad.K)(e))}finally{p(!1)}},disabled:h,"data-testid":"verify-resend",children:h?"Sending\u2026":"Resend code"})]})]})}function $d(e){let{initialEmail:t,switchMode:n}=e;const[r,i]=(0,a.useState)("request"),[s,o]=(0,a.useState)(t||""),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(""),[h,p]=(0,a.useState)(""),[f,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(!1);return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Forgot your password?"}),(0,sd.jsxs)("h3",{className:"lp-modal-h",children:["Reset your ",(0,sd.jsx)("em",{children:"password"}),"."]}),(0,sd.jsx)("p",{className:"lp-modal-sub",children:"request"===r?"Enter your email \u2014 we'll send a 6-digit reset code.":"Enter the code from your inbox and pick a new password."}),f&&(0,sd.jsx)("div",{className:"lp-info","data-testid":"forgot-info",children:f}),h&&(0,sd.jsx)("div",{className:"lp-error","data-testid":"forgot-error",children:h}),"request"===r?(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),p(""),m(""),v(!0);try{await ad.http.post("/auth/forgot-password",{email:s}),m("If an account exists for ".concat(s,", a reset code is on its way.")),i("reset")}catch(t){p((0,ad.K)(t))}finally{v(!1)}},className:"lp-modal-form",children:[(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"Email"}),(0,sd.jsx)("input",{type:"email",value:s,onChange:e=>o(e.target.value),required:!0,autoFocus:!0,"data-testid":"forgot-email"})]}),(0,sd.jsx)("button",{type:"submit",className:"lp-modal-submit",disabled:g,"data-testid":"forgot-send-btn",children:g?"Sending\u2026":"Send reset code"})]}):(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),p(""),m(""),v(!0);
2try{await ad.http.post("/auth/reset-password",{email:s,code:l,new_password:c}),m("Password updated. You can sign in now."),setTimeout(()=>n("signin"),900)}catch(t){p((0,ad.K)(t))}finally{v(!1)}},className:"lp-modal-form",children:[(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"6-digit code"}),(0,sd.jsx)("input",{inputMode:"numeric",maxLength:6,pattern:"\\d{6}",value:l,onChange:e=>u(e.target.value.replace(/\D/g,"").slice(0,6)),required:!0,autoFocus:!0,"data-testid":"reset-code-input",className:"lp-code-input"})]}),(0,sd.jsxs)("div",{className:"lp-row",children:[(0,sd.jsx)("label",{children:"New password (min 6)"}),(0,sd.jsx)("input",{type:"password",minLength:6,value:c,onChange:e=>d(e.target.value),required:!0,"data-testid":"reset-new-password-input"})]}),(0,sd.jsx)("button",{type:"submit",className:"lp-modal-submit",disabled:g||6!==l.length,"data-testid":"reset-submit-btn",children:g?"Updating\u2026":"Reset password"})]}),(0,sd.jsx)(Od,{children:(0,sd.jsx)("button",{type:"button",onClick:()=>n("signin"),"data-testid":"forgot-back-to-signin",children:"\u2190 Back to sign in"})})]})}const Wd=["Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo (Brazzaville)","Congo (Kinshasa)","Costa Rica","C\xf4te d'Ivoire","Croatia","Cuba","Cyprus","Czechia","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","North Korea","North Macedonia","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"],Hd=e=>{const t=(e||"").toLowerCase();return t.includes("high school")?["Bachelors"]:t.includes("undergrad")?["Bachelors","Masters"]:t.includes("graduate")?["Masters","PhD"]:["Bachelors","Masters","PhD"]},qd=[{key:"academic_stage",label:"Where are you in your education right now?",sub:"We use a global standard so deadlines and requirements line up no matter where you study.",grouped:[{label:"High School",options:["High School - Junior","High School - Senior"]},{label:"Undergraduate",options:["Undergraduate - 1st Year","Undergraduate - 2nd Year","Undergraduate - 3rd Year","Undergraduate - 4th Year"]},{label:"Graduate",options:["Graduate - 1st Year","Graduate - 2nd Year"]}],multi:!1},{key:"intended_degree_level",label:"What degree level are you applying for?",sub:"We only show the levels that make sense for your current stage.",dynamic:e=>Hd(e.academic_stage),multi:!1},{key:"intended_major",label:"What do you want to study?",sub:"A rough direction is fine \u2014 it drives every match. You can change it anytime.",free:!0,placeholder:"e.g. Computer Science, Nursing, Business, Psychology\u2026"},{key:"last_academic_subject_taken",label:"What's the last major subject you studied?",sub:"This sharpens how accurately we match programs and recommend next steps.",free:!0,placeholder:"e.g. AP Calculus, A-Level Physics, Final-year Thesis\u2026"},{key:"stats",label:"Your academic stats",sub:"Approximate is fine \u2014 this is what powers honest fit scores. Add what you have.",type:"stats"},{key:"country_of_citizenship",label:"What's your country of citizenship?",sub:"This drives international vs. domestic fees, visa needs, and scholarship eligibility.",type:"country",placeholder:"Start typing your country\u2026"},{key:"target_countries",label:"Where do you want to study?",sub:"Pick one or more destination countries \u2014 this drives which programs, deadlines, and fees we research.",options:["United States","United Kingdom","Canada","Australia","Germany","Netherlands","Ireland","Singapore","France","New Zealand"],multi:!0},{key:"intake_term",label:"When do you want to start?",sub:"This sets your deadlines, funding window, and which application cycle you're in.",options:["Fall 2026","Spring 2027","Fall 2027","Not sure yet"],multi:!1},{key:"preferences",label:"What matters most to you in a school?",sub:"Pick a few \u2014 Vidhya weighs these when matching colleges and programs.",options:["Top academics & prestige","Affordability & financial aid","Location & city life","Strong career outcomes","Re
2search opportunities","Campus community & clubs"],multi:!0},{key:"budget",label:"What's your budget?",sub:"We'll prioritize schools and scholarships that actually fit.",options:["Need a full ride / maximum aid","Up to $20,000 / year","$20,000 \u2013 $40,000 / year","$40,000 \u2013 $70,000 / year","Budget is not a constraint"],multi:!1}];function Vd(){const{user:e,setUser:t}=ud(),n=Fe(),[r,i]=(0,a.useState)(0),[s,o]=(0,a.useState)({academic_stage:"",intended_degree_level:"",intended_major:"",last_academic_subject_taken:"",gpa:"",sat_score:"",act_score:"",country_of_citizenship:"",target_countries:[],intake_term:"",preferences:[],budget:""}),[l,c]=(0,a.useState)(!1),[d,h]=(0,a.useState)(""),p=qd[r],f=s[p.key],m=p.dynamic?p.dynamic(s):p.options,g="stats"===p.type?!!(s.gpa||s.sat_score||s.act_score):p.multi?Array.isArray(f)&&f.length>0:(f||"").toString().trim().length>0,v=async()=>{if(h(""),p.free&&(e=>{const t=(e||"").trim();if(t.length<2)return!0;if(/(qwert|wert|erty|asdf|sdfg|dfgh|zxcv|xcvb|cvbn|hjkl|jklm)/i.test(t))return!0;if(!/\s/.test(t)&&t.length>=5){const e=t.toLowerCase().replace(/[^a-z]/g,"");if(e.length>=5&&0===(e.match(/[aeiouy]/g)||[]).length)return!0}return!1})(f))h("That doesn't look like a real answer. Try a real value (e.g. \u2018Computer Science\u2019).");else if("country"!==p.type||Wd.includes((f||"").trim()))if(r<qd.length-1)i(r+1);else{c(!0);try{const{data:r}=await ad.http.post("/onboarding/complete",{academic_stage:s.academic_stage,intended_degree_level:s.intended_degree_level,intended_major:s.intended_major,last_academic_subject_taken:s.last_academic_subject_taken,gpa:s.gpa,sat_score:s.sat_score,act_score:s.act_score,intake_term:s.intake_term,preferences:s.preferences,budget:s.budget,country_of_citizenship:s.country_of_citizenship,citizenship:s.country_of_citizenship,student_country:s.country_of_citizenship,target_countries:s.target_countries});return e&&t&&t((0,u.A)((0,u.A)({},e),{},{onboarded:!0})),r&&r.focus_university_id&&sessionStorage.setItem("vidhya_onboard_focus",r.focus_university_id),n("/app/dashboard",{replace:!0}),setTimeout(()=>window.location.reload(),50),r}catch(Lt){h((0,ad.K)(Lt))}finally{c(!1)}}else h("Please pick a country from the list.")},y=(e,t,n)=>(0,sd.jsx)("input",{className:"onb-input",type:"text",value:s[e]||"",placeholder:t,onChange:t=>o((0,u.A)((0,u.A)({},s),{},{[e]:t.target.value})),autoFocus:n,"data-testid":"onboarding-".concat(e.replace(/_/g,"-"),"-input")}),D=e=>{const t=p.multi?(f||[]).includes(e):f===e;return(0,sd.jsxs)("button",{type:"button",className:"onb-option ".concat(t?"selected":""),onClick:()=>(e=>{if(p.multi){const t=Array.isArray(f)?[...f]:[];o((0,u.A)((0,u.A)({},s),{},{[p.key]:t.includes(e)?t.filter(t=>t!==e):[...t,e]}))}else if("academic_stage"===p.key){const t=Hd(e).includes(s.intended_degree_level);o((0,u.A)((0,u.A)({},s),{},{academic_stage:e,intended_degree_level:t?s.intended_degree_level:""}))}else o((0,u.A)((0,u.A)({},s),{},{[p.key]:e}))})(e),"data-testid":"onb-opt-".concat(e.replace(/[^a-z0-9]/gi,"-").toLowerCase()),children:[(0,sd.jsx)("span",{children:e}),t&&(0,sd.jsx)("span",{className:"onb-option-check",children:(0,sd.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,sd.jsx)("path",{d:"M2.5 7.5L5.5 10.5L11.5 4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})]},e)};return(0,sd.jsxs)("div",{className:"onb-shell","data-testid":"onboarding-page",children:[(0,sd.jsxs)("div",{className:"onb-rail",children:[(0,sd.jsx)("div",{className:"onb-brand",children:(0,sd.jsx)(Dd,{size:28,tone:"lime"})}),(0,sd.jsx)("div",{className:"onb-rail-eyebrow",children:"Planning mode \xb7 One-time setup"}),(0,sd.jsxs)("h1",{className:"onb-rail-h",children:["Let's build your",(0,sd.jsx)("br",{}),(0,sd.jsx)("em",{children:"shortlist"}),"."]}),(0,sd.jsx)("p",{className:"onb-rail-sub",children:"A few quick questions about you and your goals. We'll then research live and seed your workspace with a personalized mix of reach, target, and safety schools \u2014 then drop you straight into your first fit report."}),(0,sd.jsx)("div",{className:"onb-step-list",children:qd.map((e,t)=>(0,sd.jsxs)("div",{className:"onb-step-item ".concat(t===r?"active":""," ").concat(t<r?"done":""),children:[(0,sd.jsx)("span",{className:"onb-step-num",children:String(t+1).padStart(2,"0")}),(0,sd.jsx)("span",{className:"onb-step-title",children:e.label})]},e.key))})]}),(0,sd.jsxs)("div",{className:"onb-main",children:[(0,sd.jsx)("div",{className:"onb-progress",children:(0,sd.jsx)("div",{className:"onb-progress-bar",style:{width:"".concat((r+1)/qd.length*100,"%")}})}),l?(0,sd.jsxs)("div",{className:"onb-loading","data-testid":"onboarding-loading",children:[(0,sd.jsx)("div",{className:"onb-loading-mark",children:(0,sd.jsx)("div",{className:"onb-loading-pulse"})}),(0,sd.jsx)("h2",{className:"onb-loading-h",children:"Building your shortlist\u2026"}),(0,sd.jsx)("p",{className:"onb-loading-sub",children:"Matching colleges to your stats, intake term and priorities \u2014 then pulling tuition, deadlines and aid. This takes ~30 seconds."}),(0,sd.jsxs)("div",{className:"onb-loading-steps",children:[(0,sd.jsx)("div",{children:"\u25cf Picking 4 best-fit colleges for your stats"}),(0,sd.jsx)("div",{children:"\u25cf Pulling tuition, deadlines & aid"}),(0,sd.jsx)("div",{children:"\u25cf Preparing your first fit report"})]})]}):(0,sd.jsxs)("div",{className:"onb-step","data-testid":"onboarding-step-".concat(r),children:[(0,sd.jsxs)("div",{className:"onb-step-meta",children:["Step ",r+1," of ",qd.length]}),(0,sd.jsx)("h2",{className:"onb-question",children:p.label}),(0,sd.jsx)("p",{className:"onb-question-sub",children:p.sub}),"stats"===p.type?(0,sd.jsxs)("div",{className:"onb-stats","data-testid":"onboarding-stats",children:[(0,sd.jsxs)("div",{style:{marginBottom:14},children:[(0,sd.jsxs)("label",{className:"onb-field-label",children:["GPA / grade average ",(0,sd.jsx)("span",{children:"(any scale)"})]}),y("gpa","e.g. 3.8 / 85% / AAB",!0)]}),(0,sd.jsxs)("div",{style:{display:"flex",gap:14,flexWrap:"wrap"},children:[(0,sd.jsxs)("div",{style:{flex:1,minWidth:160},children:[(0,sd.jsxs)("label",{className:"onb-field-label",children:["SAT total ",(0,sd.jsx)("span",{children:"(optional)"})]}),y("sat_score","e.g. 1450")]}),(0,sd.jsxs)("div",{style:{flex:1,minWidth:160},children:[(0,sd.jsxs)("label",{className:"onb-field-label",children:["ACT composite ",(0,sd.jsx)("span",{children:"(optional)"})]}),y("act_score","e.g. 32")]})]}),(0,sd.jsx)("p",{className:"onb-stats-hint",children:"Haven't tested yet? Just add your GPA \u2014 you can fill scores in later."})]}):"country"===p.type?(0,sd.jsxs)("div",{"data-testid":"onboarding-country",children:[(0,sd.jsx)("input",{className:"onb-input",type:"text",list:"onb-countries",value:f||"",placeholder:p.placeholder,onChange:e=>o((0,u.A)((0,u.A)({},s),{},{[p.key]:e.target.value})),autoFocus:!0,"data-testid":"onboarding-citizenship-input"}),(0,sd.jsx)("datalist",{id:"onb-countries",children:Wd.map(e=>(0,sd.jsx)("option",{value:e},e))})]}):p.free?(0,sd.jsx)("input",{className:"onb-input",type:"text",value:f||"",placeholder:p.placeholder,onChange:e=>o((0,u.A)((0,u.A)({},s),{},{[p.key]:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&g&&v()},autoFocus:!0,"data-testid":"onboarding-".concat(p.key.replace(/_/g,"-"),"-input")}):p.grouped?(0,sd.jsx)("div",{className:"onb-grouped","data-testid":"onboarding-grouped",children:p.grouped.map(e=>(0,sd.jsxs)("div",{className:"onb-group",children:[(0,sd.jsx)("div",{className:"onb-group-label",children:e.label}),(0,sd.jsx)("div",{className:"onb-options",children:e.options.map(D)})]},e.label))}):(0,sd.jsx)("div",{className:"onb-options",children:(m||[]).map(D)}),d&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:18},"data-testid":"onboarding-error",children:d}),(0,sd.jsxs)("div",{className:"onb-actions",children:[r>0&&(0,sd.jsx)("button",{type:"button",className:"onb-back-btn",onClick:()=>{r>0&&i(r-1)},"data-testid":"onb-back-btn",children:"\u2190 Back"}),(0,sd.jsxs)("button",{type:"button",className:"onb-next-btn",onClick:v,disabled:!g,"data-testid":"onb-next-btn",children:[r===qd.length-1?"Build my shortlist":"Continue",(0,sd.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,sd.jsx)("path",{d:"M3 7h8M8 4l3 3-3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]})]})}function Gd(e){let{view:t,go:n,openCmd:r,open:i,onClose:a}=e;const{user:s,logout:o}=ud(),{universities:l,tasks:u,scholarships:c}=hd(),d=u.filter(e=>!e.done).length,h=((null===s||void 0===s?void 0:s.name)||"U").split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase(),p="navigator"===(null===s||void 0===s?void 0:s.plan)?"Navigator plan \xb7 Billing":"Free plan \xb7 Upgrade",f=e=>{let{id:r,label:i,icon:a,badge:s}=e;const o=pd[a];return(0,sd.jsxs)("div",{className:"vnav-item ".concat(t===r?"active":""),onClick:()=>n(r),"data-testid":"nav-".concat(r),children:[(0,sd.jsx)(o,{size:19}),(0,sd.jsx)("span",{children:i}),null!=s&&(0,sd.jsx)("span",{className:"vnav-badge",children:s})]})};return(0,sd.jsxs)("aside",{className:"vrail ".concat(i?"open":""),"data-testid":"sidebar",children:[(0,sd.jsxs)("div",{className:"vbrand2","data-testid":"brand",children:[(0,sd.jsx)("div",{className:"l",onClick:()=>
2n("dashboard"),children:(0,sd.jsx)(Dd,{size:52})}),(0,sd.jsx)("button",{type:"button",className:"vicon-btn mobile-only",onClick:a,"aria-label":"Close menu","data-testid":"sidebar-close-btn",style:{width:30,height:30},children:(0,sd.jsx)(pd.Close,{size:14})})]}),(0,sd.jsxs)("button",{className:"vask",onClick:()=>n("chat"),"data-testid":"sidebar-ask-vidhya",children:[(0,sd.jsx)("span",{className:"vask-mark",children:(0,sd.jsx)(wd,{size:17})})," Ask Vidhya ",(0,sd.jsx)("span",{className:"kbd",children:"\u2318K"})]}),(0,sd.jsxs)("nav",{className:"vnav",children:[(0,sd.jsx)(f,{id:"dashboard",label:"Home",icon:"Home"}),(0,sd.jsx)(f,{id:"board",label:"My Universities",icon:"Board",badge:l.length||null}),(0,sd.jsx)(f,{id:"tasks",label:"Tasks",icon:"Check",badge:d||null}),(0,sd.jsx)(f,{id:"scholarships",label:"Scholarships",icon:"Trophy",badge:c.length||null}),(0,sd.jsx)(f,{id:"profile",label:"Profile",icon:"User"})]}),l.length>0&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"vnavlabel",children:"Recent"}),(0,sd.jsx)("nav",{className:"vnav",children:l.slice(0,4).map(e=>{var t;return(0,sd.jsxs)("div",{className:"vnav-item",onClick:()=>n("detail",e.id),"data-testid":"recent-uni-".concat(e.id),children:[(0,sd.jsx)("span",{className:"vrail-uni",children:(null===(t=e.short)||void 0===t?void 0:t[0])||e.name[0]}),(0,sd.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.short||e.name.slice(0,14)})]},e.id)})})]}),(0,sd.jsx)("div",{className:"vrail-sp"}),(0,sd.jsx)("div",{className:"vnavlabel",children:"Account"}),(0,sd.jsxs)("nav",{className:"vnav",children:[(0,sd.jsx)(f,{id:"autofill",label:"Autofill",icon:"Bolt"}),(0,sd.jsx)(f,{id:"billing",label:"Billing & plan",icon:"Settings"}),"admin"===(null===s||void 0===s?void 0:s.role)&&(0,sd.jsx)(f,{id:"admin",label:"Admin console",icon:"Shield"})]}),(0,sd.jsxs)("div",{className:"vme","data-testid":"profile-card",onClick:()=>n("billing"),children:[(0,sd.jsx)("div",{className:"vav",children:h}),(0,sd.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,sd.jsx)("b",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:null===s||void 0===s?void 0:s.name}),(0,sd.jsx)("span",{children:p})]}),(0,sd.jsx)("button",{className:"vme-logout",onClick:e=>{e.stopPropagation(),o()},title:"Sign out","data-testid":"logout-btn",children:(0,sd.jsx)(pd.Logout,{size:14})})]})]})}function Kd(e){let{open:t,onClose:n,go:r}=e;const{universities:i}=hd(),[s,o]=(0,a.useState)(""),[l,c]=(0,a.useState)(0),d=(0,a.useMemo)(()=>{const e=[{id:"p-chat",label:"Open AI Advisor",icon:"Chat",action:()=>r("chat"),kbd:"G C"},{id:"p-dash",label:"Go to Dashboard",icon:"Home",action:()=>r("dashboard"),kbd:"G D"},{id:"p-board",label:"Open Application Board",icon:"Board",action:()=>r("board"),kbd:"G B"},{id:"p-tasks",label:"Open Task Center",icon:"Check",action:()=>r("tasks"),kbd:"G T"},{id:"p-schol",label:"Open Scholarships",icon:"Trophy",action:()=>r("scholarships"),kbd:"G S"}],t=i.map(e=>({id:"u-".concat(e.id),label:e.name,icon:"GraduationCap",action:()=>r("detail",e.id),kbd:"Open detail"})),n=[{section:"Pages",items:e},{section:"Universities",items:t},{section:"Actions",items:[{id:"a-add",label:"Add a university to my shortlist",icon:"Plus",action:()=>r("board"),kbd:"+ U"},{id:"a-task",label:"Create a new task",icon:"Check",action:()=>r("tasks"),kbd:"+ T"},{id:"a-ask",label:"Ask the AI advisor",icon:"Sparkle",action:()=>r("chat"),kbd:"?"}]}];return s?n.map(e=>(0,u.A)((0,u.A)({},e),{},{items:e.items.filter(e=>e.label.toLowerCase().includes(s.toLowerCase()))})).filter(e=>e.items.length>0):n},[s,i,r]),h=d.flatMap(e=>e.items);if((0,a.useEffect)(()=>{c(0)},[s]),(0,a.useEffect)(()=>{if(!t)return;const e=e=>{"Escape"===e.key&&n(),"ArrowDown"===e.key&&(e.preventDefault(),c(e=>Math.min(e+1,h.length-1))),"ArrowUp"===e.key&&(e.preventDefault(),c(e=>Math.max(e-1,0))),"Enter"===e.key&&h[l]&&(h[l].action(),n())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,h,l,n]),!t)return null;let p=0;return(0,sd.jsx)("div",{className:"cmd-overlay",onClick:n,"data-testid":"cmd-palette",children:(0,sd.jsxs)("div",{className:"cmd-modal",onClick:e=>e.stopPropagation(),children:[(0,sd.jsxs)("div",{className:"cmd-input-wrap",children:[(0,sd.jsx)(pd.Search,{size:16}),(0,sd.jsx)("input",{className:"cmd-input",placeholder:"Search universities, jump to a page, or run a command\u2026",value:s,onChange:e=>o(e.target.value),autoFocus:!0,"data-testid":"cmd-input"}),(0,sd.jsx)("kbd",{style:{fontFamily:"var(--font-mono)",fontSize:11,background:"var(--bg)",border:"1px solid var(--ink-5)",padding:"1px 6px",borderRadius:4,color:"var(--ink-3)"},children:"esc"})]}),(0,sd.jsxs)("div",{className:"cmd-list",children:[d.map(e=>(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"cmd-section-h",children:e.section}),e.items.map(e=>{const t=p++,r=pd[e.icon];return(0,sd.jsxs)("div",{className:"cmd-item ".concat(l===t?"selected":""),onMouseEnter:()=>c(t),onClick:()=>{e.action(),n()},"data-testid":"cmd-".concat(e.id),children:[(0,sd.jsx)("span",{className:"cmd-item-icon",children:(0,sd.jsx)(r,{size:15})}),(0,sd.jsx)("span",{children:e.label}),(0,sd.jsx)("span",{className:"cmd-item-meta",children:e.kbd})]},e.id)})]},e.section)),0===h.length&&(0,sd.jsxs)("div",{style:{padding:24,textAlign:"center",color:"var(--ink-4)",fontSize:13},children:['No matches for "',s,'"']})]})]})})}const Yd=e=>{let{s:t=11}=e;return(0,sd.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.2",children:(0,sd.jsx)("path",{d:"m5 12 5 5L20 6"})})},Qd=e=>{let{s:t=16}=e;return(0,sd.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",children:(0,sd.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})})},Jd=[{id:"researching",name:"Researching",color:"var(--indigo-300)"},{id:"preparing",name:"Preparing",color:"var(--indigo)"},{id:"applied",name:"Applied",color:"var(--indigo-deep)"},{id:"offer",name:"Got offer",color:"var(--ok)"}];function Xd(e){const t=(e||"").toLowerCase();return/good|target|match/.test(t)?"good":/back|safety/.test(t)?"back":"amb"}function Zd(e){let{go:t}=e;const{universities:n,tasks:r,updateTask:i}=hd(),{user:a}=ud(),s=((null===a||void 0===a?void 0:a.name)||"there").split(" ")[0],o=r.filter(e=>!e.done),l=o.slice(0,4),u=n.find(e=>e.deadlineUrgent)||n.find(e=>"preparing"===e.status)||n[0],c=[...n].filter(e=>e.deadline).sort((e,t)=>
2(t.deadlineUrgent?1:0)-(e.deadlineUrgent?1:0)).slice(0,3);return(0,sd.jsxs)("div",{className:"vwrap","data-testid":"dashboard",children:[(0,sd.jsxs)("div",{className:"vhi",children:[(0,sd.jsxs)("h1",{children:["Namaste, ",(0,sd.jsx)("em",{children:s}),"."]}),(0,sd.jsx)("p",{children:o.length>0?(0,sd.jsxs)(sd.Fragment,{children:["You have ",(0,sd.jsxs)("strong",{children:[o.length," open task",o.length>1?"s":""]})," across ",(0,sd.jsxs)("strong",{children:[n.length," universit",1===n.length?"y":"ies"]}),". Take it one at a time."]}):(0,sd.jsxs)(sd.Fragment,{children:["You're all caught up across ",(0,sd.jsxs)("strong",{children:[n.length," universit",1===n.length?"y":"ies"]}),". Nice work."]})})]}),u?(0,sd.jsxs)("div",{className:"vnext","data-testid":"home-next-card",children:[(0,sd.jsxs)("div",{className:"nl",children:[(0,sd.jsxs)("div",{className:"tagrow",children:[(0,sd.jsx)("span",{className:"tag",children:"Do this next"}),u.deadline&&(0,sd.jsxs)("span",{className:"when",children:["Deadline ",u.deadline]})]}),(0,sd.jsxs)("h2",{children:["Keep moving on ",(0,sd.jsx)("em",{children:u.short||u.name}),u.program?(0,sd.jsxs)(sd.Fragment,{children:[" \u2014 ",u.program]}):null,"."]}),(0,sd.jsx)("div",{className:"s",children:"number"===typeof u.progress?"You're ".concat(u.progress,"% through the checklist. Open it to see what's left."):"Open the university page to see your checklist, costs and professors."})]}),(0,sd.jsxs)("button",{className:"nbtn",onClick:()=>t("detail",u.id),"data-testid":"home-next-open",children:["Open ",u.short||u.name.slice(0,12)," ",(0,sd.jsx)(Qd,{s:16})]})]}):(0,sd.jsxs)("div",{className:"vnext","data-testid":"home-next-empty",children:[(0,sd.jsxs)("div",{className:"nl",children:[(0,sd.jsx)("div",{className:"tagrow",children:(0,sd.jsx)("span",{className:"tag",children:"Get started"})}),(0,sd.jsxs)("h2",{children:["Add your first university to ",(0,sd.jsx)("em",{children:"start your journey"}),"."]}),(0,sd.jsx)("div",{className:"s",children:"Vidhya will research it live and build your tailored checklist."})]}),(0,sd.jsxs)("button",{className:"nbtn",onClick:()=>t("board"),"data-testid":"home-add-first",children:["Add a university ",(0,sd.jsx)(Qd,{s:16})]})]}),(0,sd.jsxs)("div",{className:"vsec-h",children:[(0,sd.jsx)("h3",{children:"Your journey"}),(0,sd.jsx)("span",{className:"lk",onClick:()=>t("board"),"data-testid":"home-open-board",children:"Open the board \u2192"})]}),(0,sd.jsx)("div",{className:"vtrack",children:Jd.map(e=>{const r=n.filter(t=>t.status===e.id).length,i=0===r?8:Math.min(100,28+22*r);return(0,sd.jsxs)("div",{className:"vstage",onClick:()=>t("board"),"data-testid":"home-stage-".concat(e.id),children:[(0,sd.jsx)("span",{className:"tick",style:{background:e.color}}),(0,sd.jsx)("div",{className:"num",style:{color:e.color},children:r}),(0,sd.jsx)("div",{className:"nm",children:e.name}),(0,sd.jsx)("div",{className:"bar",children:(0,sd.jsx)("i",{style:{width:"".concat(i,"%"),background:e.color}})})]},e.id)})}),(0,sd.jsxs)("div",{className:"vcols",children:[(0,sd.jsxs)("div",{className:"vcard","data-testid":"home-deadlines",children:[(0,sd.jsxs)("div",{className:"vcard-h",children:[(0,sd.jsx)("h3",{children:"Closest deadlines"}),(0,sd.jsx)("span",{className:"mt",children:"Tap to open"})]}),0===c.length?(0,sd.jsx)("div",{className:"vempty",children:"No deadlines yet. Add a university to track them."}):c.map(e=>{var n;return(0,sd.jsxs)("div",{className:"vuni",onClick:()=>t("detail",e.id),"data-testid":"home-deadline-".concat(e.id),children:[(0,sd.jsx)("div",{className:"vulogo",children:(null===(n=e.short)||void 0===n?void 0:n[0])||e.name[0]}),(0,sd.jsxs)("div",{className:"vuinfo",children:[(0,sd.jsx)("b",{children:e.name}),(0,sd.jsx)("span",{children:e.program||e.loc||"\u2014"})]}),(0,sd.jsxs)("div",{className:"vuright",children:[e.tier&&(0,sd.jsx)("span",{className:"vtier ".concat(Xd(e.tier)),children:e.tier}),(0,sd.jsx)("div",{className:"vdue ".concat(e.deadlineUrgent?"soon":""),children:e.deadline})]})]},e.id)})]}),(0,sd.jsxs)("div",{className:"vcard","data-testid":"home-today",children:[(0,sd.jsxs)("div",{className:"vcard-h",children:[(0,sd.jsx)("h3",{children:"Today"}),(0,sd.jsxs)("span",{className:"mt",children:[o.length," open"]})]}),0===l.length?(0,sd.jsx)("div",{className:"vempty",children:"Nothing on deck. Enjoy the calm."}):l.map(e=>(0,sd.jsxs)("div",{className:"vtodo ".concat(e.done?"done":""),onClick:()=>(e=>i(e.id,{done:!e.done}))(e),"data-testid":"home-task-".concat(e.id),children:[(0,sd.jsx)("div",{className:"vchk",children:(0,sd.jsx)(Yd,{s:11})}),(0,sd.jsxs)("div",{className:"vtb",children:[(0,sd.jsx)("b",{children:e.title}),(0,sd.jsxs)("span",{children:[e.uni?(0,sd.jsxs)(sd.Fragment,{children:["For ",e.uni]}):"Task",e.due?" \xb7 ".concat(e.due):"","."," ",(0,sd.jsx)("span",{className:"for",onClick:e=>{e.stopPropagation(),t("chat")},children:"Work with Vidhya"})]})]})]},e.id)),(0,sd.jsx)("div",{className:"vsee",children:(0,sd.jsx)("span",{className:"lk",onClick:()=>t("tasks"),"data-testid":"home-see-all-tasks",children:"See all tasks \u2192"})})]})]})]})}const eh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),th=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},nh=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];
2return t.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var rh={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 ih=["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"],ah=(0,a.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:o="",children:c,iconNode:d}=e,h=l(e,ih);return(0,a.createElement)("svg",(0,u.A)((0,u.A)((0,u.A)({ref:t},rh),{},{width:r,height:r,stroke:n,strokeWidth:s?24*Number(i)/Number(r):i,className:nh("lucide",o)},!c&&!(e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(h)&&{"aria-hidden":"true"}),h),[...d.map(e=>{let[t,n]=e;return(0,a.createElement)(t,n)}),...Array.isArray(c)?c:[c]])}),sh=["className"],oh=(e,t)=>{const n=(0,a.forwardRef)((n,r)=>{let{className:i}=n,s=l(n,sh);return(0,a.createElement)(ah,(0,u.A)({ref:r,iconNode:t,className:nh("lucide-".concat(eh(th(e))),"lucide-".concat(e),i)},s))});return n.displayName=th(e),n},lh=oh("triangle-alert",[["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"}]]);function uh(e){let{open:t,onClose:n,feature:r,context:i,headline:s,subhead:o,valueProps:l=[]}=e;const{user:u}=ud(),[c,d]=(0,a.useState)("annual"),[h,p]=(0,a.useState)(!1),[f,m]=(0,a.useState)("");if((0,a.useEffect)(()=>{t&&(d("annual"),p(!1),m(""))},[t]),!t)return null;const g="annual"===c?"$11":"$14.99",v="annual"===c?"billed $132 annually \xb7 save $48":"billed monthly \xb7 cancel anytime";return(0,sd.jsx)("div",{className:"upgrade-modal-overlay","data-testid":"checkout-modal",onClick:()=>n("backdrop"),children:(0,sd.jsxs)("div",{className:"upgrade-modal-card",onClick:e=>e.stopPropagation(),children:[(0,sd.jsx)("button",{className:"upgrade-modal-close",onClick:()=>n("close-btn"),"aria-label":"Close checkout","data-testid":"checkout-modal-close",children:"\xd7"}),(0,sd.jsx)("div",{className:"upgrade-modal-eyebrow",children:"Navigator \xb7 monthly or annual"}),(0,sd.jsx)("h2",{className:"upgrade-modal-headline","data-testid":"checkout-modal-headline",children:s}),(0,sd.jsx)("p",{className:"upgrade-modal-subhead",children:o}),(0,sd.jsx)("ul",{className:"upgrade-modal-perks",children:l.slice(0,4).map((e,t)=>(0,sd.jsxs)("li",{children:[(0,sd.jsx)("span",{className:"upgrade-tick","aria-hidden":!0,children:(0,sd.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,sd.jsx)("path",{d:"M5 12l5 5L20 7"})})}),e]},t))}),(0,sd.jsxs)("div",{className:"upgrade-billing-row",children:[(0,sd.jsxs)("div",{className:"upgrade-billing-toggle",role:"tablist","aria-label":"Billing cycle",children:[(0,sd.jsx)("button",{type:"button",className:"u-toggle ".concat("monthly"===c?"active":""),onClick:()=>d("monthly"),"data-testid":"checkout-billing-monthly",children:"Monthly"}),(0,sd.jsxs)("button",{type:"button",className:"u-toggle ".concat("annual"===c?"active":""),onClick:()=>d("annual"),"data-testid":"checkout-billing-annual",children:["Annual ",(0,sd.jsx)("span",{className:"save-pill",children:"save $48"})]})]}),(0,sd.jsxs)("div",{className:"upgrade-price",children:[(0,sd.jsx)("span",{className:"upgrade-amount","data-testid":"checkout-price-amount",children:g}),(0,sd.jsxs)("span",{className:"upgrade-period",children:["/","annual"===c?"mo":"month"]})]})]}),(0,sd.jsx)("div",{className:"upgrade-billing-note","data-testid":"checkout-billing-note",children:v}),f&&(0,sd.jsx)("div",{className:"upgrade-error","data-testid":"checkout-error",children:f}),(0,sd.jsxs)("div",{className:"upgrade-actions",children:[(0,sd.jsx)("button",{type:"button",className:"btn btn-ghost",onClick:()=>n("maybe-later"),"data-testid":"checkout-maybe-later",children:"Maybe later"}),(0,sd.jsx)("button",{type:"button",className:"btn btn-clay btn-primary",disabled:h,onClick:async()=>{p(!0),m("");try{const{data:e}=await ad.http.post("/stripe/checkout-session",{period:c,origin_url:window.location.origin,feature:r||"",context:i||""});if(null===e||void 0===e||!e.url)throw new Error("No checkout URL returned.");try{ad.http.post("/analytics/event",{event:"upgrade_checkout_clicked",properties:{period:c,feature:r||"",context:i||""}}).catch(()=>{})}catch(Lt){}window.location.href=e.url}catch(e){m((0,ad.K)(e)),p(!1)}},"data-testid":"checkout-continue-btn",children:h?"Redirecting\u2026":"Continue to checkout"})]}),(0,sd.jsx)("p",{className:"upgrade-fineprint",children:"Secure checkout by Stripe \xb7 7-day money-back \xb7 Cancel anytime"}),(0,sd.jsxs)("p",{className:"upgrade-fineprint","data-testid":"checkout-country-disclaimer",style:{marginTop:4},children:["Not in a ",(0,sd.jsx)("a",{href:"https://stripe.com/global",target:"_blank",rel:"noopener noreferrer",children:"Stripe-supported country"}
2),"? Email"," ",(0,sd.jsx)("a",{href:"mailto:[email protected]?subject=Upgrade%20my%20account",children:"[email protected]"})," to upgrade your account."]}),(null===u||void 0===u?void 0:u.email)&&(0,sd.jsxs)("p",{className:"upgrade-fineprint",style:{marginTop:2},children:["Charging ",(0,sd.jsx)("strong",{children:u.email})]})]})})}const ch={GMAIL:"gmail_integration",PROF_EXTRACT:"professor_email_extraction",PROF_DRAFT:"professor_email_draft",FIT_SCORE:"fit_score",ADMIT_PROB:"admission_probability",AID_GAP:"aid_gap_analysis",SCHOL_MATCHING:"scholarship_matching",AI_TODO:"ai_todo_generation",FULL_PROFILE:"full_profile",UNI_BOARD:"university_board",AI_ADVISOR:"ai_advisor"},dh={[ch.GMAIL]:{headline:"Unlock Gmail outreach.",subhead:"Connect Gmail to draft, save, and send professor emails from inside Vidhya \u2014 every reply tracked next to the application."},[ch.PROF_EXTRACT]:{headline:"Find the right professors.",subhead:"Pull faculty emails, labs, and research areas for every university on your board."},[ch.PROF_DRAFT]:{headline:"Draft outreach in seconds.",subhead:"AI writes a personalised cold email to a specific professor, grounded in your background."},[ch.FIT_SCORE]:{headline:"See your fit score.",subhead:"A profile-aware match score for every university \u2014 so you know which schools are realistic."},[ch.ADMIT_PROB]:{headline:"Get honest admission odds.",subhead:"Calibrated against the school's published acceptance rate and your specific profile."},[ch.AID_GAP]:{headline:"Know what you'll actually pay.",subhead:"Tuition + living minus your budget minus likely internal aid \u2014 see exactly what scholarships need to close."},[ch.SCHOL_MATCHING]:{headline:"Personalised scholarship matches.",subhead:"Search across govt, foundation and university funds tuned to your citizenship, field, and profile."},[ch.AI_TODO]:{headline:"Get a prioritised to-do list.",subhead:"Vidhya plans the next 7 days for you, ordered by urgency and deadline."},[ch.FULL_PROFILE]:{headline:"Unlock your full profile.",subhead:"Every advisor reply gets sharper as your profile fills in \u2014 tests, story, leadership, all of it."},[ch.UNI_BOARD]:{headline:"Track every university.",subhead:"Explorer tracks one. Navigator tracks every school you're applying to \u2014 no caps, no compromises."},[ch.AI_ADVISOR]:{headline:"Unlimited advisor.",subhead:"Daily message caps disappear. Brainstorm, draft, plan, and revise \u2014 whenever you need to."}},hh=["Unlimited universities + advisor messages","Fit score, admission odds, aid gap analysis","Gmail outreach + AI scholarship matching"],ph=(0,a.createContext)({open:()=>{},close:()=>{},isOpen:!1});function fh(e){let{children:t}=e;const[n,r]=(0,a.useState)({open:!1,feature:"",context:""}),i=(0,a.useCallback)((e,t)=>{r({open:!0,feature:e||"",context:t||""});try{ad.http.post("/analytics/event",{event:"upgrade_modal_shown",properties:{feature:e||"",context:t||""}}).catch(()=>{})}catch(Lt){}},[]),s=(0,a.useCallback)(e=>{r(t=>{if(t.open)try{ad.http.post("/analytics/event",{event:"upgrade_modal_dismissed",properties:{feature:t.feature,context:t.context,reason:e||"dismiss"}}).catch(()=>{})}catch(Lt){}return{open:!1,feature:"",context:""}})},[]),o=dh[n.feature]||{headline:"Unlock Navigator.",subhead:"Everything you need to actually apply \u2014 no caps, no locks."};return(0,sd.jsxs)(ph.Provider,{value:{open:i,close:s,isOpen:n.open,feature:n.feature,context:n.context},children:[t,(0,sd.jsx)(uh,{open:n.open,onClose:s,feature:n.feature,context:n.context,headline:o.headline,subhead:o.subhead,valueProps:hh})]})}function mh(){return(0,a.useContext)(ph)}function gh(e){var t,n;const r=null===e||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail;return r&&"object"===typeof r&&"plan_required"===r.error?{feature:r.feature||"",context:r.context||"",message:r.message||"",plan:r.plan||"",extra:r}:null}const vh=(0,a.createContext)(null),yh="vidhya_copilot_width_v1",Dh=360;function bh(e){let{children:t}=e;const[n,r]=(0,a.useState)(!1),[i,s]=(0,a.useState)("menu"),[o,l]=(0,a.useState)(null),[u,c]=(0,a.useState)(null),[d,h]=(0,a.useState)(null),[p,f]=(0,a.useState)(0),[m,g]=(0,a.useState)(()=>{try{const e=parseInt(localStorage.getItem(yh)||"",10);if(!isNaN(e)&&e>=Dh&&e<=900)return e}catch(Lt){}return 420}),v=(0,a.useCallback)(e=>{const t="undefined"!==typeof window?window.innerWidth:1440,n=Math.max(Dh,Math.min(900,Math.min(e,t-40),t));g(n);try{localStorage.setItem(yh,String(n))}catch(Lt){}},[]);(0,a.useEffect)(()=>
2{if(!n)return;const e=window.innerWidth;g(t=>Math.max(Dh,Math.min(t,e-40)))},[n]);const y=(0,a.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"menu",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(e||"menu"),l(t||null),c(n.preset||null),h(n.inputPreset||null),r(!0),(e&&"menu"!==e||n.preset||n.inputPreset)&&f(e=>e+1)},[]),D=(0,a.useCallback)(()=>{const e=u;return c(null),e},[u]),b=(0,a.useCallback)(()=>{const e=d;return h(null),e},[d]),x=(0,a.useCallback)(()=>r(!1),[]),C=(0,a.useCallback)((e,t)=>{s(e||"menu"),void 0!==t&&l(t)},[]);return(0,a.useEffect)(()=>{const e=e=>{"Escape"===e.key&&n&&r(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n]),(0,sd.jsx)(vh.Provider,{value:{open:n,mode:i,ctx:o,preset:u,inputPreset:d,actionNonce:p,width:m,openCopilot:y,closeCopilot:x,goMode:C,setWidth:v,consumePreset:D,consumeInputPreset:b,MIN_W:Dh,MAX_W:900},children:t})}function xh(){const e=(0,a.useContext)(vh);if(!e)throw new Error("useCopilot must be used within CopilotProvider");return e}const Ch=["feature","context","label","variant","size","className","fullWidth","iconLeft","testid","onClick"];function Fh(e){let{feature:t,context:n="",label:r="Unlock with Navigator",variant:i="clay",size:a="md",className:s="",fullWidth:o=!1,iconLeft:c=null,testid:d,onClick:h}=e,p=l(e,Ch);const{open:f}=mh(),m="sm"===a?"btn-sm":"lg"===a?"btn-lg":"",g="ghost"===i?"btn-ghost":"outline"===i?"btn-outline":"btn-clay";return(0,sd.jsxs)("button",(0,u.A)((0,u.A)({type:"button",className:"btn ".concat(g," ").concat(m," ").concat(s).trim(),"data-testid":d||"upgrade-btn-".concat(t||"generic"),onClick:e=>{var r;null===e||void 0===e||null===(r=e.stopPropagation)||void 0===r||r.call(e),h&&h(e),f(t,n)},style:o?{width:"100%"}:void 0},p),{},{children:[c,r]}))}const _h=[["Business",/\b(mba|business|management|finance|marketing|accounting|entrepreneur|supply chain|\bhr\b|hospitality|commerce)\b/i],["Computing",/\b(computer science|comp\.? sci|\bcs\b|software|data science|data analytics|artificial intelligence|machine learning|\bai\b|\bml\b|information technology|computing|informatics|cyber\s?security|computer engineering|\bhci\b)\b/i],["Law",/\b(law|ll\.?m|ll\.?b|juris|legal studies)\b/i],["Medicine & Health",/\b(medicine|medical|\bmd\b|nursing|pharmacy|public health|dentistry|dental|veterinary|physiotherapy)\b/i],["Engineering",/\b(mechanical|electrical|civil|aerospace|chemical engineering|biomedical engineering|industrial engineering|materials science|robotics|mechatronics)\b/i],["Arts & Humanities",/\b(liberal arts|history|philosophy|literature|linguistics|fine arts|graphic design|architecture|music|film|media studies|journalism|communications?)\b/i],["Social Science",/\b(psychology|sociology|anthropology|political science|international relations|public policy|social work|economics)\b/i],["Natural Science",/\b(physics|chemistry|biology|mathematics|\bmaths?\b|statistics|neuroscience|environmental science|geology|astronomy|biochemistry)\b/i],["Education",/\b(education|teaching|pedagogy|curriculum)\b/i]];function kh(e){const t=e||"";if(!t.trim())return null;for(const[n,r]of _h)if(r.test(t))return n;return null}function wh(e,t){const n=(e||"").trim();if(!n)return null;const r=function(e){const t=(e||"").toLowerCase();return t.trim()?/phd|doctor|dphil/.test(t)?"doctoral":/under\s?grad|undergraduate|bachelor|\bug\b|high\s?school|freshman|sophomore|junior|senior/.test(t)?"undergraduate":/master|postgrad|mba|\bgraduate\b|\bgrad\b|m\.?s/.test(t)?"graduate":null:null}(null===t||void 0===t?void 0:t.intended_level),i=function(e){const t=e||"";return t.trim()?/\b(ph\.?\s?d|d\.?phil|doctora(l|te)|ed\.?d|d\.?sc)\b/i.test(t)?"doctoral":/\b(m\.?s\.?c?|m\.?a|m\.?b\.?a|m\.?eng|m\.?fa|ll\.?m|m\.?p\.?h|m\.?p\.?a|m\.?s\.?w|mres|master'?s?|post\s?grad(uate)?|graduate)\b/i.test(t)?"graduate":/\b(b\.?s\.?c?|b\.?a|b\.?eng|b\.?tech|bachelor'?s?|under\s?grad(uate)?|associate'?s?|diploma|foundation|hnd)\b/i.test(t)?"undergraduate":null:null}(n);if(r&&i&&r!==i)return{kind:"level",short:"".concat(i," vs your ").concat(r," goal"),reason:"This looks like an ".concat(i,"-level program, but your profile is ").concat(r,"-level.")};const a=kh(null===t||void 0===t?void 0:t.intended_major),s=kh(n);return a&&s&&a!==s?{kind:"field",short:"".concat(s," vs your ").concat(a),reason:"This program looks like ".concat(s,", but your intended major is ").concat(null===t||void 0===t?void 0:t.intended_major," (").concat(a,").")}:null}function Eh(e,t){const n=[],r=wh(e.program,t);r&&n.push({kind:"off-profile",label:"Off-profile",tip:r.reason});const i=function(e){const t=(e||"").trim();if(!t)return{passed:!1,missing:!0};if(/rolling|no deadline|tba|ongoing|open/i.test(t))return{passed:!1};const n=new Date;n.setHours(0,0,0,0);const r=/\b\d{4}\b/.test(t);let i=null;const a=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);
2if(a)i=new Date(+a[1],+a[2]-1,+a[3]);else{let e=new Date(r?t:"".concat(t," ").concat(n.getFullYear()));isNaN(e.getTime())||(i=e)}if(!i||isNaN(i.getTime()))return{passed:!1,unparsed:!0};i.setHours(0,0,0,0),r||(i-n)/864e5>120&&i.setFullYear(i.getFullYear()-1);return{passed:i<n}}(e.deadline);return i.passed&&"offer"!==(e.status||"")&&n.push({kind:"deadline",label:"Deadline passed",tip:"The deadline (".concat(e.deadline,") has already passed.")}),i.missing&&["applied","offer"].includes(e.status||"")&&n.push({kind:"nodata",label:"No deadline",tip:"This application has no deadline on record \u2014 add or verify it."}),n}function jh(e){var t;let{openDetail:n}=e;const{universities:r,updateUniversity:i,deleteUniversity:s,addUniversity:o,profile:l}=hd(),{openCopilot:u}=xh(),{user:c}=ud(),{open:d}=mh(),[h,p]=(0,a.useState)(null),f=(0,a.useRef)(null),[m,g]=(0,a.useState)(null),[v,y]=(0,a.useState)(!1),[D,b]=(0,a.useState)(!1),[x,C]=(0,a.useState)(!1),[F,_]=(0,a.useState)([]),[k,w]=(0,a.useState)("all"),E=(null===c||void 0===c||null===(t=c.plan_summary)||void 0===t?void 0:t.is_navigator)||"navigator"===(null===c||void 0===c?void 0:c.plan),j=!E&&r.length>=1,A=()=>{j?b(!0):y(!0)},S=(e,t)=>{f.current=t,p(t),e.dataTransfer.effectAllowed="move";try{e.dataTransfer.setData("text/plain",String(t))}catch(Qt){}},N=()=>{f.current=null,p(null),g(null)},B=["var(--indigo-300)","var(--indigo)","var(--indigo-deep)","var(--ok)"];return(0,sd.jsxs)("div",{className:"vwrap vboard-view","data-testid":"board-view",children:[(0,sd.jsxs)("div",{className:"vphead",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"ptitle",children:"My Universities"}),(0,sd.jsxs)("div",{className:"psub",children:["Your whole journey, researching to offer \u2014 ",r.length," school",1===r.length?"":"s",". Tap any card to open its page."]})]}),(0,sd.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:[r.length>=2&&(0,sd.jsxs)("button",{className:"addu",style:{padding:"11px 16px",borderStyle:"solid"},onClick:()=>{x||0!==F.length||_(r.slice(0,Math.min(3,r.length)).map(e=>e.id)),C(e=>!e)},"data-testid":"board-compare-btn",children:[(0,sd.jsx)(pd.Sparkle,{size:14})," Compare ",F.length>0?"(".concat(F.length,")"):""]}),(0,sd.jsxs)("button",{className:"vp-cta",onClick:()=>u("suggestUnis"),"data-testid":"board-add-uni-btn",children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.1",children:(0,sd.jsx)("path",{d:"M12 3v18M3 12h18"})}),"Find universities with Vidhya"]})]})]}),!E&&(0,sd.jsxs)("div",{className:"explorer-board-banner","data-testid":"explorer-board-banner",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("strong",{children:"Explorer plan \xb7 1 university tracked"}),(0,sd.jsx)("p",{children:"Upgrade to Navigator to add every school you're applying to \u2014 no caps."})]}),(0,sd.jsx)(Fh,{feature:ch.UNI_BOARD,context:"board_banner",label:"Unlock unlimited",size:"sm",testid:"board-banner-upgrade-btn"})]}),(0,sd.jsx)("div",{className:"filt board-progfilt",style:{marginBottom:16},"data-testid":"board-progress-filter",children:[{id:"all",label:"All"},{id:"notstarted",label:"Not started"},{id:"inprogress",label:"In progress"},{id:"ready",label:"Ready"}].map(e=>{const t="all"===e.id?r.length:r.filter(t=>{const n=t.progress||0;return"notstarted"===e.id?n<=0:"inprogress"===e.id?n>0&&n<100:n>=100}).length;return(0,sd.jsxs)("button",{className:"fbtn ".concat(k===e.id?"on":""),onClick:()=>w(e.id),"data-testid":"board-progfilter-".concat(e.id),children:[e.label," ",(0,sd.jsx)("span",{style:{opacity:.6,fontWeight:700},children:t})]},e.id)})}),x&&r.length>=2&&(0,sd.jsx)(Bh,{universities:r,compareIds:F,onToggle:e=>{_(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=4?t:[...t,e])},onClose:()=>C(!1)}),(0,sd.jsx)("div",{className:"board",children:fd.map((e,t)=>{const a=r.filter(t=>t.status===e.id&&(e=>{if("all"===k)return!0;const t=e.progress||0;return"notstarted"===k?t<=0:"inprogress"===k?t>0&&t<100:"ready"!==k||t>=100})(t));return(0,sd.jsxs)("div",{className:"bcol ".concat(m===e.id?"dragover":""),"data-testid":"column-".concat(e.id),onDragOver:t=>((e,t)=>{e.preventDefault(),g(t)})(t,e.id),onDrop:t=>(async(e,t)=>{e.preventDefault();let n=f.current;try{n=e.dataTransfer.getData("text/plain")||n}catch(Qt){}f.current=null,p(null),g(null),n&&await i(n,{status:t})})(t,e.id),onDragLeave:()=>g(t=>t===e.id?null:t),children:[(0,sd.jsxs)("div",{className:"bch",children:[(0,sd.jsxs)("b",{children:[(0,sd.jsx)("span",{className:"bdot",style:{background:B[t]}}),e.name]}),(0,sd.jsx)("span",{className:"ct",children:a.length})]}),a.map(e=>(0,sd.jsx)(Sh,{u:e,warnings:Eh(e,l),dragging:h===e.id,onDragStart:S,onDragEnd:N,onClick:()=>n(e.id)},e.id)),"researching"===e.id&&(0,sd.jsx)("div",{className:"addu",onClick:A,"data-testid":"board-col-add",children:"+ Add a university"}),0===a.length&&"researching"!==e.id&&(0,sd.jsx)("div",{className:"bempty",children:"Drop a university here"})]},e.id)})}),v&&(0,sd.jsx)(Nh,{onClose:()=>y(!1),addUniversity:o,openDetail:n,onPlanLimit:e=>{y(!1);gh(e)&&b(!0)}}),D&&(0,sd.jsx)(Ah,{existing:r[0],onClose:()=>b(!1),onUpgrade:()=>{b(!1),d(ch.UNI_BOARD,"board_cap_modal")},onReplace:async()=>{r[0]&&(await s(r[0].id),b(!1),y(!0))}})]})}function Ah(e){let{existing:t,onClose:n,onUpgrade:r,onReplace:i}=e;return(0,sd.jsx)("div",{className:"modal-overlay",onClick:n,"data-testid":"uni-cap-modal",children:(0,sd.jsxs)("div",{className:"modal-card",onClick:e=>e.stopPropagation(),style:{maxWidth:460},children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Explorer plan"}),(0,sd.jsx)("h3",{style:{marginTop:6},children:"You're at your 1-university cap."}),(0,sd.jsxs)("p",{style:{color:"var(--ink-3)",fontSize:14,lineHeight:1.55,marginTop:6},children:["Explorer tracks one university so you can try Vidhya end-to-e
2nd. Navigator tracks",(0,sd.jsx)("strong",{children:" every"})," school you're applying to \u2014 no caps, no compromises."]}),t&&(0,sd.jsxs)("div",{className:"cap-modal-existing","data-testid":"cap-modal-existing",children:[(0,sd.jsx)("span",{className:"rail-uni-mark",style:{background:t.color,fontFamily:"var(--font-display)"},children:(t.short||t.name).slice(0,2)}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontWeight:600,fontSize:13},children:t.name}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:11},children:"Currently tracked"})]})]}),(0,sd.jsxs)("div",{style:{display:"flex",gap:8,marginTop:18,flexWrap:"wrap"},children:[(0,sd.jsx)("button",{className:"btn btn-ghost",onClick:i,"data-testid":"cap-modal-replace-btn",children:"Replace existing"}),(0,sd.jsx)("button",{className:"btn btn-clay",onClick:r,style:{flex:1,minWidth:180},"data-testid":"cap-modal-upgrade-btn",children:"Upgrade to Navigator"})]})]})})}function Sh(e){let{u:t,warnings:n=[],dragging:r,onDragStart:i,onDragEnd:a,onClick:s}=e;const o=t.progress||0,l=o>=100;return(0,sd.jsxs)("div",{className:"ucard ".concat(r?"dragging":""),draggable:!0,onDragStart:e=>i(e,t.id),onDragEnd:a,onClick:s,"data-testid":"uni-card-".concat(t.id),children:[(0,sd.jsxs)("div",{className:"uct",children:[(0,sd.jsx)("div",{className:"ulogo",children:(t.short||t.name)[0]}),(0,sd.jsxs)("div",{style:{minWidth:0},children:[(0,sd.jsx)("b",{children:t.name}),(0,sd.jsx)("br",{}),(0,sd.jsx)("span",{children:t.program||t.loc||"\u2014"})]})]}),(0,sd.jsxs)("div",{className:"umeta",children:[(0,sd.jsx)("div",{className:"upg",children:(0,sd.jsx)("i",{style:(0,u.A)({width:"".concat(o,"%")},l?{background:"var(--ok)"}:{})})}),(0,sd.jsx)("span",{className:"udue ".concat(t.deadlineUrgent?"soon":""),children:"applied"===t.status?"Submitted":"offer"===t.status?"Offer":t.deadline||"\u2014"})]}),n.length>0&&(0,sd.jsx)("div",{className:"uwarn-row","data-testid":"uni-warnings-".concat(t.id),children:n.map(e=>(0,sd.jsxs)("span",{className:"uwarn-chip",title:e.tip,"data-testid":"uni-warn-".concat(e.kind,"-").concat(t.id),children:[(0,sd.jsx)(lh,{size:11})," ",e.label]},e.kind))})]})}function Nh(e){let{onClose:t,addUniversity:r,onPlanLimit:i,openDetail:s}=e;const{profile:o}=hd(),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(()=>((null===o||void 0===o?void 0:o.intended_major)||"").trim()),[h,p]=(0,a.useState)(!1),[f,m]=(0,a.useState)(""),[g,v]=(0,a.useState)([]),[y,D]=(0,a.useState)(!1),[b,x]=(0,a.useState)(""),[C,F]=(0,a.useState)(!1),_=()=>{v([]),x(""),F(!1),m("")};return(0,sd.jsx)("div",{className:"modal-overlay",onClick:t,"data-testid":"add-uni-modal",children:(0,sd.jsxs)("div",{className:"modal-card",onClick:e=>e.stopPropagation(),children:[(0,sd.jsx)("h3",{children:"Add a university"}),(0,sd.jsxs)("form",{onSubmit:async e=>{e.preventDefault();if(!l.trim())return;if(!b){if(C)return;if(g.length>0)return;return(async()=>{D(!0),m(""),F(!1);try{const{http:e}=await Promise.resolve().then(n.bind(n,768)),{data:t}=await e.post("/ai/disambiguate-university",{query:l,program:c,student_country:(null===o||void 0===o?void 0:o.student_country)||(null===o||void 0===o?void 0:o.citizenship)||""}),r=(null===t||void 0===t?void 0:t.candidates)||[];if(null!==t&&void 0!==t&&t.no_match||0===r.length)return F(!0),void v([]);if(1===r.length&&"high"===r[0].confidence)return x(r[0].name),void v([]);v(r)}
2catch(e){console.warn("[board] disambiguation failed:",e),m("Couldn't verify that name just now. Try again.")}finally{D(!1)}})()}const a=b,u=wh(c,o);if(u)m("".concat(u.reason," Vidhya keeps your board aligned with your goal. If your plans changed, update your profile first."));else{p(!0),m("");try{const e=md[Math.floor(Math.random()*md.length)],n=await r({name:a,program:c,color:e,status:"researching"});t(),null!==n&&void 0!==n&&n.id&&s&&s(n.id)}catch(f){var d,h;if(gh(f)&&i)return void i(f);m((null===f||void 0===f||null===(d=f.response)||void 0===d||null===(h=d.data)||void 0===h?void 0:h.detail)||(null===f||void 0===f?void 0:f.message)||"Could not add \u2014 try again.")}finally{p(!1)}}},children:[(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"University name"}),(0,sd.jsx)("input",{className:"input",value:l,onChange:e=>{u(e.target.value),_()},placeholder:"Carnegie Mellon University",required:!0,autoFocus:!0,"data-testid":"add-uni-name"}),b&&(0,sd.jsxs)("div",{style:{fontSize:12,color:"var(--ink-3)",marginTop:6},"data-testid":"add-uni-confirmed",children:["Will be added as: ",(0,sd.jsx)("strong",{style:{color:"var(--ink)"},children:b})," ",(0,sd.jsx)("button",{type:"button",className:"btn btn-sm btn-ghost",style:{padding:"1px 8px"},onClick:_,"data-testid":"add-uni-change",children:"change"})]})]}),(0,sd.jsxs)("div",{className:"auth-field",children:[(0,sd.jsx)("label",{children:"Program"}),(0,sd.jsx)("input",{className:"input",value:c,onChange:e=>d(e.target.value),placeholder:null!==o&&void 0!==o&&o.intended_major?"".concat(o.intended_major):"MS in Computer Science","data-testid":"add-uni-program"})]}),(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:13,color:"var(--ink-2)",marginTop:8},children:[(0,sd.jsx)(pd.Sparkle,{size:12})," Vidhya will research this live the moment you add it."]}),C&&(0,sd.jsxs)("div",{style:{marginTop:14,background:"var(--clay-wash)",border:"1px solid var(--clay-soft)",borderRadius:12,padding:12},"data-testid":"add-uni-no-match",children:[(0,sd.jsxs)("div",{style:{fontSize:13,color:"var(--ink)",fontWeight:500},children:['Hmm, "',l.trim(),"\" doesn't match a university I can verify."]}),(0,sd.jsx)("div",{style:{fontSize:12,color:"var(--ink-3)",marginTop:4},children:'Check the spelling or type the full official name (e.g. "University of San Francisco"), then verify again.'})]}),g.length>0&&(0,sd.jsxs)("div",{style:{marginTop:14,background:"var(--bg-sunk)",border:"1px solid var(--ink-5)",borderRadius:12,padding:12},"data-testid":"add-uni-candidates",children:[(0,sd.jsxs)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-4)",marginBottom:8},children:['"',l.trim(),'" matches several universities \u2014 pick one']}),(0,sd.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:g.map((e,t)=>(0,sd.jsx)("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:()=>(e=>{x(e.name),v([]),F(!1)})(e),"data-testid":"add-uni-candidate-".concat(t),style:{justifyContent:"flex-start",textAlign:"left",padding:"8px 10px",borderRadius:8,border:e.is_top_match?"1px solid var(--clay-soft)":"1px solid transparent",background:e.is_top_match?"var(--clay-wash)":"transparent"},children:(0,sd.jsxs)("div",{style:{width:"100%"},children:[(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,sd.jsx)("strong",{style:{fontSize:13,color:"var(--ink)"},children:e.name}),e.is_top_match&&(0,sd.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:9,color:"var(--clay-deep)",letterSpacing:"0.08em",textTransform:"uppercase"},children:"most likely"})]}),(0,sd.jsxs)("div",{style:{fontSize:11,color:"var(--ink-3)",marginTop:2},children:[[e.city,e.country].filter(Boolean).join(", "),e.why?" \u2014 ".concat(e.why):""]})]})},t))})]}),f&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:10},"data-testid":"add-uni-error",children:"string"===typeof f?f:"Could not add \u2014 try again."}),(0,sd.jsxs)("div",{style:{display:"flex",gap:8,marginTop:18,justifyContent:"flex-end"},children:[(0,sd.jsx)("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:t,children:"Cancel"}),(0,sd.jsx)("button",{type:"submit",className:"btn btn-sm btn-clay",disabled:h||y||C||g.length>0&&!b,"data-testid":"add-uni-submit",children:h?"Adding\u2026":y?"Verifying\u2026":b?"Add":"Verify name"})]})]})]})})}function Bh(e){let{universities:t,compareIds:n,onToggle:r,onClose:i}=e;const s=(0,a.useMemo)(()=>n.map(e=>t.find(t=>
2t.id===e)).filter(Boolean),[t,n]),o=[{label:"Program",render:e=>e.program||"\u2014"},{label:"Location",render:e=>e.loc||"\u2014"},{label:"Tier",render:e=>e.tier?e.tier:"\u2014"},{label:"Deadline",render:e=>e.deadline||"\u2014"},{label:"Tuition",render:e=>e.tuition||"\u2014"},{label:"Acceptance",render:e=>e.acceptRate||"\u2014"},{label:"Rank",render:e=>e.rank||"\u2014"},{label:"Intl %",render:e=>e.intlPct||"\u2014"},{label:"GPA req.",render:e=>e.gpa_required||"\u2014"},{label:"English min.",render:e=>e.english_min||"\u2014"},{label:"Program length",render:e=>e.program_length||"\u2014"},{label:"Fit for you",render:e=>e.fit_notes||"\u2014"},{label:"Highlights",render:e=>{const t=Array.isArray(e.highlights)?e.highlights:[];return t.length?(0,sd.jsx)("ul",{style:{margin:0,paddingLeft:16},children:t.slice(0,4).map((e,t)=>(0,sd.jsx)("li",{style:{marginBottom:2},children:e},"h-".concat(t)))}):"\u2014"}},{label:"Gaps",render:e=>{const t=Array.isArray(e.gaps)?e.gaps:[];return t.length?(0,sd.jsx)("ul",{style:{margin:0,paddingLeft:16,color:"var(--warn)"},children:t.slice(0,4).map((e,t)=>(0,sd.jsx)("li",{style:{marginBottom:2},children:e},"g-".concat(t)))}):"\u2014"}},{label:"Checklist",render:e=>{const t=Array.isArray(e.checklist)?e.checklist:[],n=t.filter(e=>e.done).length;return t.length?"".concat(n,"/").concat(t.length," complete"):"\u2014"}}];return(0,sd.jsxs)("div",{className:"compare-sheet","data-testid":"compare-sheet",children:[(0,sd.jsxs)("div",{className:"compare-sheet-head",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)"},children:"Side-by-side comparison"}),(0,sd.jsx)("h3",{style:{margin:"4px 0 0 0",fontSize:18},children:"Compare universities"})]}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:i,"data-testid":"compare-close",children:"Close"})]}),(0,sd.jsxs)("div",{className:"compare-picker",children:[(0,sd.jsx)("span",{style:{fontSize:12,color:"var(--ink-3)",alignSelf:"center",marginRight:4},children:"Pick up to 4 universities:"}),t.map(e=>{const t=n.includes(e.id),i=!t&&n.length>=4;return(0,sd.jsxs)("button",{className:"compare-chip ".concat(t?"on":""),onClick:()=>r(e.id),disabled:i,"data-testid":"compare-chip-".concat(e.id),title:i?"Compare a max of 4 universities at once":"",style:i?{opacity:.35,cursor:"not-allowed"}:{},children:[(0,sd.jsx)("span",{style:{width:8,height:8,borderRadius:999,background:"var(--ink)"}}),e.short||e.name]},e.id)})]}),0===s.length?(0,sd.jsx)("div",{style:{padding:28,textAlign:"center",color:"var(--ink-3)",fontSize:13},children:"Pick at least 2 universities above to see them side-by-side."}):(0,sd.jsx)("div",{className:"compare-grid",children:(0,sd.jsxs)("table",{className:"compare-table","data-testid":"compare-table",children:[(0,sd.jsx)("thead",{children:(0,sd.jsxs)("tr",{children:[(0,sd.jsx)("th",{}),s.map(e=>(0,sd.jsx)("th",{children:(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,sd.jsx)("span",{style:{width:10,height:10,borderRadius:999,background:"var(--ink)"}}),(0,sd.jsx)("span",{children:e.name})]})},e.id))]})}),(0,sd.jsx)("tbody",{children:o.map(e=>(0,sd.jsxs)("tr",{children:[(0,sd.jsx)("td",{children:e.label}),s.map(t=>(0,sd.jsx)("td",{children:e.render(t)},t.id))]},e.label))})]})})]})}const Th=(0,a.createContext)(null);function Ph(e){let{children:t}=e;const[n,r]=(0,a.useState)(null),i=(0,a.useRef)(null),s=(0,a.useCallback)(e=>new Promise(t=>{i.current=t,r({title:(null===e||void 0===e?void 0:e.title)||"Are you sure?",message:(null===e||void 0===e?void 0:e.message)||"",confirmLabel:(null===e||void 0===e?void 0:e.confirmLabel)||"Confirm",cancelLabel:(null===e||void 0===e?void 0:e.cancelLabel)||"Cancel",danger:!(null===e||void 0===e||!e.danger)})}),[]),o=(0,a.useCallback)(e=>{r(null),i.current&&(i.current(e),i.current=null)},[]);return(0,a.useEffect)(()=>{if(!n)return;const e=e=>{"Escape"===e.key?(e.preventDefault(),o(!1)):"Enter"===e.key&&(e.preventDefault(),o(!0))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,o]),(0,sd.jsxs)(Th.Provider,{value:s,children:[t,n&&(0,sd.jsx)("div",{className:"modal-overlay",onClick:()=>o(!1),"data-testid":"confirm-dialog-overlay",style:{zIndex:1100},children:(0,sd.jsxs)("div",{className:"modal-card confirm-card",onClick:e=>e.stopPropagation(),"data-testid":"confirm-dialog",role:"dialog","aria-modal":"true",children:[(0,sd.jsx)("h3",{style:{margin:0,fontSize:18},"data-testid":"confirm-title",children:n.title}),n.message&&(0,sd.jsx)("p",{style:{marginTop:10,marginBottom:0,color:"var(--ink-2)",fontSize:14,lineHeight:1.55},"data-testid":"confirm-message",children:n.message}),(0,sd.jsxs)("div",{style:{display:"flex",gap:8,marginTop:22,justifyContent:"flex-end"},children:[(0,sd.jsx)("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:()=>o(!1),"data-testid":"confirm-cancel",autoFocus:!n.danger,children:n.cancelLabel}),(0,sd.jsx)("button",{type:"button",className:"btn btn-sm ".concat(n.danger?"btn-danger":"btn-clay"),onClick:()=>o(!0),"data-testid":"confirm-ok",autoFocus:n.danger,children:n.confirmLabel})]})]})})]})}function Lh(){const e=(0,a.useContext)(Th);return e||(async e=>window.confirm((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.title)||"Are you sure?"))}
2function Rh(e){let{feature:t,context:n="",title:r,description:i,ctaLabel:a="Unlock with Navigator",children:s,className:o="",badgeLabel:l="NAVIGATOR FEATURE",testid:u}=e;return(0,sd.jsxs)("div",{className:"locked-card ".concat(o).trim(),"data-testid":u||"locked-card-".concat(t||"generic"),children:[(0,sd.jsxs)("div",{className:"locked-card-badge",children:[(0,sd.jsx)(zh,{}),(0,sd.jsx)("span",{children:l})]}),(0,sd.jsx)("div",{className:"locked-card-corner","aria-hidden":!0,children:(0,sd.jsx)(zh,{})}),s&&(0,sd.jsx)("div",{className:"locked-card-blur","aria-hidden":!0,children:s}),(0,sd.jsxs)("div",{className:"locked-card-body",children:[r&&(0,sd.jsx)("h3",{className:"locked-card-title",children:r}),i&&(0,sd.jsx)("p",{className:"locked-card-desc",children:i}),(0,sd.jsx)(Fh,{feature:t,context:n,label:a,variant:"clay",testid:"locked-card-cta-".concat(t||"generic")})]})]})}function zh(){return(0,sd.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,sd.jsx)("rect",{x:"5",y:"11",width:"14",height:"10",rx:"2"}),(0,sd.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}const Oh=oh("shield-check",[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Mh=oh("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);function Ih(e){let{status:t,source:n,checkedAt:r,label:i="",compact:a=!1}=e;const s="verified"===t&&!!n,o=n?function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch(t){return""}}(n):"",l=function(e){if(!e)return"";try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}catch(t){return""}}(r),u=i||"Verified";if(s){const e="".concat(u).concat(o?" on ".concat(o):"").concat(l?" \u2014 ".concat(l):""," (byte-confirmed on the official source)");return(0,sd.jsxs)("span",{className:"vidhya-verified-badge ok","data-testid":"verified-badge",title:e,children:[(0,sd.jsx)(Oh,{size:12,strokeWidth:2.4}),(0,sd.jsxs)("span",{children:[u,o?" \xb7 ".concat(o):"",!a&&l?" \xb7 ".concat(l):""]})]})}const c="found"===t,d=c?"Found \u2014 confirm on official site":"Not verified";return(0,sd.jsxs)("span",{className:"vidhya-verified-badge neutral","data-testid":c?"found-badge":"unverified-badge",title:c?"We located this on a real page but couldn't byte-confirm it. Confirm on the official site before relying on it.":"We couldn't ground this against a live official page.",style:{background:"var(--paper-2, #f3f1e8)",color:"var(--muted, #6b6a64)",border:"1px solid var(--rule, #d9d6c8)"},children:[(0,sd.jsx)(Mh,{size:11,strokeWidth:2.2}),(0,sd.jsx)("span",{children:c&&o?"Found \xb7 ".concat(o):d})]})}const Uh=oh("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function $h(e){let{steps:t=[],active:n,interval:r=2200,testid:i="step-reveal"}=e;const[s,o]=(0,a.useState)(0);return(0,a.useEffect)(()=>{if(!n||t.length<=1)return void o(0);o(0);const e=[];for(let n=1;n<t.length;n++)e.push(setTimeout(()=>o(n),r*n));return()=>e.forEach(clearTimeout)},[n,r,t.length]),n&&t.length?(0,sd.jsx)("div",{className:"compute-steps","data-testid":i,children:t.map((e,t)=>{const n=t<s?"done":t===s?"active":"pending";return(0,sd.jsxs)("div",{className:"compute-step ".concat(n),"data-testid":"".concat(i,"-step-").concat(t),children:[(0,sd.jsx)("span",{className:"cs-ico",children:"done"===n?(0,sd.jsx)(pd.Check,{size:12}):"active"===n?(0,sd.jsx)(Uh,{size:12,className:"vidhya-spin"}):(0,sd.jsx)("span",{className:"cs-dot"})}),(0,sd.jsx)("span",{className:"cs-label",children:e})]},t)})}):null}const Wh=["Finding the official program page","Verifying tuition & fees","Checking the application deadline","Building your requirements checklist","Scoring your fit"];function Hh(e){switch(e){case"browse":return["Finding the official page","Reading admissions & fees","Verifying the facts","Summarizing for you"];case"fit":return["Calculating your profile score","Checking program requirements","Cross-analyzing against admitted averages"];case"email":return["Pulling the professor's recent work","Connecting it to your background","Drafting your email"];case"suggestUnis":return["Understanding your profile","Scanning matching programs","Sorting reach / target / safety"];case"appPlan":return["Reviewing your deadlines","Sequencing the work","Building your plan"];case"todo":return["Reviewing your tasks","Spotting what's urgent","Building your shortlist"];case"advice":case"essay":return["Reading your situation","Thinking it through","Putting it together"];default:return["Working on it","Almost there"]}}function qh(e){const t=(e||"").toLowerCase(),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.some(e=>t.includes(e))};return n("scholarship","funding","financial aid","fund my","afford","grant")?["Reading your question","Scanning funding sources","Checking eligibility for your profile","Writing your answer"]:n("professor","faculty","supervisor","lab","phd advisor","research group")?["Reading your question","
2Locating the right department","Matching faculty to your interests","Writing your answer"]:n("email","draft","outreach","reach out","write to")?["Reading your question","Pulling the professor's recent work","Drafting your email"]:n(" vs ","versus","compare","comparison","better","which one","which of")?["Reading your question","Pulling each program's data","Comparing side by side","Writing your answer"]:n("deadline","tuition","fee","requirement","gpa","ielts","toefl","gre","acceptance","tell me about","research")?["Reading your question","Searching official sources","Verifying the facts","Writing your answer"]:n("task","plan my","what should i do","this week","next step","to-do","todo","organize","organise")?["Reading your question","Reviewing your tasks & deadlines","Building your plan"]:n("chance","odds","admit","get in","fit","shortlist","suggest","recommend")?["Understanding your profile","Weighing your academic signals","Reasoning through your options","Writing your answer"]:["Reading your question","Thinking it through","Writing your answer"]}const Vh=oh("external-link",[["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"}]]),Gh=oh("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Kh=oh("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Yh=oh("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Qh=["open","onClose"],Jh=[{value:"sop",label:"Statement of Purpose"},{value:"resume",label:"Resume"},{value:"cv",label:"CV"},{value:"cover_letter",label:"Cover letter"},{value:"goal_statement",label:"Goal statement"},{value:"lor",label:"Recommendation letter"},{value:"transcript",label:"Transcript"},{value:"essay",label:"Supplemental essay"},{value:"other",label:"Other"}],Xh=e=>{var t;return(null===(t=Jh.find(t=>t.value===e))||void 0===t?void 0:t.label)||"Other"},Zh=e=>e?e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"):"\u2014";function ep(e){var t,n;let{uniId:r,back:i}=e;const s=hd(),{universities:o,updateUniversity:l,deleteUniversity:c,addEmail:d,gmail:h,connectGmail:p,draftToGmail:f,sendViaGmail:m,backfillUniversity:g,computeCostAndAid:v,syncChecklistTasks:y}=s,{user:D}=ud(),b=Lh(),{openCopilot:x}=xh(),C=o.find(e=>e.id===r),[F,_]=(0,a.useState)("overview"),[k,w]=(0,a.useState)([]),[E,j]=(0,a.useState)(!1),[A,S]=(0,a.useState)(""),[N,B]=(0,a.useState)(""),T=(0,a.useRef)(null),P=(null===D||void 0===D||null===(t=D.profile)||void 0===t?void 0:t.intended_major)||"",[L,R]=(0,a.useState)(""),[z,O]=(0,a.useState)(""),[M,I]=(0,a.useState)(!1),[U,$]=(0,a.useState)({to:"",subject:"",body:"",professor_name:""}),[W,H]=(0,a.useState)(""),[q,V]=(0,a.useState)(""),[G,K]=(0,a.useState)(null),[Y,Q]=(0,a.useState)(!1),[J,X]=(0,a.useState)(""),[Z,ee]=(0,a.useState)(!1),[te,ne]=(0,a.useState)(null);(0,a.useEffect)(()=>{C&&(_("overview"),w(Array.isArray(C.professors)?C.professors:[]),S(""),j(!1),R(P?"".concat(P," \u2014 research areas of interest"):"research areas of interest"),O(C.program||P||""),$({to:"",subject:"",body:"",professor_name:""}),I(!1),V(""),K(null),X(C.notes||""))},[null===C||void 0===C?void 0:C.id]);const re=(0,a.useRef)(new Set);if((0,a.useEffect)(()=>{C&&(["ready","pending","failed"].includes(C.research_status)||re.current.has(C.id)||(re.current.add(C.id),g(C.id).catch(e=>console.warn("[detail] background backfill failed:",e))))},[null===C||void 0===C?void 0:C.id,null===C||void 0===C?void 0:C.research_status,null===C||void 0===C?void 0:C.fit_notes,null===C||void 0===C?void 0:C.highlights,g]),(0,a.useEffect)(()=>{if(null===C||void 0===C||!C.id)return;if("pending"!==C.research_status)return;const e=setInterval(()=>{s.refresh().catch(e=>console.debug("[detail] poll refresh:",e))},6e3);return()=>clearInterval(e)},[null===C||void 0===C?void 0:C.id,null===C||void 0===C?void 0:C.research_status]),(0,a.useEffect)(()=>
2{if(null===C||void 0===C||!C.id)return;if((C.notes||"")===J)return;const e=setTimeout(async()=>{ee(!0);try{await l(C.id,{notes:J}),ne(Date.now())}catch(e){console.error("[notepad] autosave failed:",e)}finally{ee(!1)}},900);return()=>clearTimeout(e)},[J,null===C||void 0===C?void 0:C.id]),(0,a.useEffect)(()=>{if(!C)return;const e=["b-ov","b-todo","b-cost","b-prof","b-docs","b-notes"],t={"b-ov":"ov","b-todo":"todo","b-cost":"cost","b-prof":"prof","b-docs":"docs","b-notes":"notes"};let n=0;const r=()=>{n=0;const r=document.querySelector(".app2 .ujourney .jump"),i=(r?r.getBoundingClientRect().bottom:120)+14;let a=e[0],s=!1;for(const t of e){const e=document.getElementById(t);if(!e)continue;const n=e.getBoundingClientRect();if(n.top<=i&&n.bottom>i){a=t,s=!0;break}}if(!s)for(const t of e){const e=document.getElementById(t);e&&e.getBoundingClientRect().top<=i&&(a=t)}const o=t[a];document.querySelectorAll(".app2 .ujourney .jump a").forEach(e=>e.classList.toggle("here",e.dataset.j===o))},i=()=>{n||(n=requestAnimationFrame(r))};r(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i);const a=setTimeout(r,300);return()=>{window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),clearTimeout(a),n&&cancelAnimationFrame(n)}},[null===C||void 0===C?void 0:C.id]),!C)return(0,sd.jsxs)("div",{"data-testid":"detail-not-found",children:[(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:i,children:"\u2190 Back"}),(0,sd.jsx)("div",{className:"empty-state",style:{marginTop:24},children:"University not found."})]});const ie=C.checklist||[],ae=ie.filter(e=>e.done).length,se="pending"===C.research_status,oe=async()=>{j(!0),S(""),B("Pulling official faculty directories\u2026");[{at:8e3,text:"Reading department pages\u2026"},{at:18e3,text:"Matching faculty to your interest\u2026"},{at:28e3,text:"Verifying lab links on the university domain\u2026"},{at:42e3,text:"Still working \u2014 this can take a moment for smaller departments."}].forEach(e=>{const t=setTimeout(()=>B(e.text),e.at);T.current=[...T.current||[],t]});try{const{data:e}=await ad.http.post("/ai/find-professors",{university_name:C.name,research_interest:L,department:z||C.program||P||""},{timeout:75e3}),t=e.data||[];w(t),0===t.length&&S("Vidhya couldn't verify enough faculty on the university's own domain to show them \u2014 try a more specific research interest, or check the department's directory directly."),l(C.id,{professors:t}).catch(e=>console.warn("[profs] persist failed:",e))}catch(Lt){S((0,ad.K)(Lt))}finally{(T.current||[]).forEach(clearTimeout),T.current=[],j(!1),B("")}},le=async e=>{I(!0),Q(!0);try{const n=e||k[0],r=(null===D||void 0===D?void 0:D.profile)||{},i=[];r.grade_level&&i.push(r.grade_level),r.intended_major?i.push("".concat(r.intended_major," applicant")):z&&i.push("".concat(z," applicant")),r.gpa&&i.push("GPA ".concat(r.gpa)),Array.isArray(r.activities)&&r.activities.length&&i.push("Activities/projects: ".concat(r.activities.slice(0,3).join("; "))),r.bio&&i.push(r.bio),i.push("Currently exploring: ".concat(L,"."));const a=i.filter(Boolean).join(". "),s=C.program||(null!==n&&void 0!==n&&n.department?"".concat(n.department):"")||r.intended_major||z||"the program";$({to:(null===n||void 0===n?void 0:n.email)||"",subject:"",body:"",professor_name:(null===n||void 0===n?void 0:n.name)||""});const o=localStorage.getItem("sa_token"),l=await fetch("".concat(ad.n,"/ai/draft-email/stream"),{method:"POST",headers:(0,u.A)({"Content-Type":"application/json"},o?{Authorization:"Bearer ".concat(o)}:{}),body:JSON.stringify({professor_name:(null===n||void 0===n?void 0:n.name)||"the admissions team",professor_email:(null===n||void 0===n?void 0:n.email)||"",professor_research:(null===n||void 0===n?void 0:n.research)||(null===n||void 0===n?void 0:n.notable_work)||"",university:C.name,student_name:(null===D||void 0===D?void 0:D.name)||r.name||"Student",student_background:a,program_applying:s,purpose:"research_inquiry"})});if(!l.ok||!l.body){const e=await l.text().catch(()=>"HTTP ".concat(l.status));throw new Error(e||"HTTP ".concat(l.status))}const c=l.body.getReader(),d=new TextDecoder;let h="";for(;;){const{value:e,done:n}=await c.read();if(n)break;let r;for(h+=d.decode(e,{stream:!0});-1!==(r=h.indexOf("\n\n"));){const e=h.slice(0,r);h=h.slice(r+2);const n=e.split("\n").find(e=>e.startsWith("data:"));if(!n)continue;const i=n.slice(5).trim();if(!i)continue;let a;try{a=JSON.parse(i)}catch(t){continue}if("subject"===a.type&&a.text)$(e=>(0,u.A)((0,u.A)({},e),{},{subject:a.text}));else if("delta"===a.type&&a.text)$(e=>(0,u.A)((0,u.A)({},e),{},{body:(e.body||"")+a.text}));else if("done"===a.type)a.subject&&$(e=>(0,u.A)((0,u.A)({},e),{},{subject:a.subject})),a.body&&$(e=>(0,u.A)((0,u.A)({},e),{},{body:a.body}));else if("error"===a.type)throw new Error(a.detail||"stream error")}}}catch(Lt){$(t=>(0,u.A)((0,u.A)({},t),{},{body:"Error drafting: ".concat((null===Lt||void 0===Lt?void 0:Lt.message)||(0,ad.K)(Lt))}))}finally{I(!1)}},ue=C.progress||0,ce=Math.max(0,157-ue/100*157),de=e=>{var t;return null===(t=document.getElementById(e))||void 0===t?void 0:t.scrollIntoView({behavior:"smooth",block:"start"})}
2,he=!(null===D||void 0===D||null===(n=D.plan_summary)||void 0===n||!n.is_navigator)||"navigator"===(null===D||void 0===D?void 0:D.plan);return(0,sd.jsxs)("div",{className:"vwrap ujourney","data-testid":"detail-view",children:[(0,sd.jsx)("div",{className:"ubackrow",children:(0,sd.jsxs)("span",{className:"uback",onClick:i,"data-testid":"detail-back",children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M19 12H5M11 6l-6 6 6 6"})}),"Back to my universities"]})}),(0,sd.jsxs)("div",{className:"uhead","data-testid":"detail-hero",children:[(0,sd.jsx)("div",{className:"big",children:(C.short||C.name)[0]}),(0,sd.jsxs)("div",{className:"ht",children:[(0,sd.jsxs)("h1",{children:[C.name,C.tier&&(0,sd.jsx)("span",{className:"tier ".concat((e=>{const t=(e||"").toLowerCase();return/good|target|match/.test(t)?"good":/back|safety/.test(t)?"back":"amb"})(C.tier)),children:C.tier}),se&&(0,sd.jsx)("span",{className:"tier amb","data-testid":"research-pending",children:"Researching\u2026"})]}),(0,sd.jsxs)("div",{className:"loc",children:[C.loc&&(0,sd.jsx)("span",{children:C.loc}),C.acceptRate&&(0,sd.jsxs)("span",{children:[(0,sd.jsx)("b",{children:C.acceptRate})," acceptance"]}),C.program&&(0,sd.jsx)("span",{children:C.program}),C.website&&(0,sd.jsx)("a",{href:C.website,target:"_blank",rel:"noreferrer",children:"Official \u2197"})]})]}),(0,sd.jsxs)("div",{className:"ring",title:"".concat(ue,"% ready"),children:[(0,sd.jsxs)("svg",{width:"60",height:"60",viewBox:"0 0 60 60",children:[(0,sd.jsx)("circle",{cx:"30",cy:"30",r:"25",fill:"none",stroke:"var(--indigo-50)",strokeWidth:"7"}),(0,sd.jsx)("circle",{cx:"30",cy:"30",r:"25",fill:"none",stroke:"var(--lemon)",strokeWidth:"7",strokeLinecap:"round",strokeDasharray:"157",strokeDashoffset:ce})]}),(0,sd.jsxs)("span",{className:"pct",children:[ue,"%"]}),(0,sd.jsx)("span",{className:"lab",children:"ready"})]}),C.deadline&&(0,sd.jsxs)("div",{className:"deadchip",children:[(0,sd.jsx)("span",{className:"d ".concat(C.deadlineUrgent?"":"ok"),children:C.deadline}),(0,sd.jsx)("span",{className:"l",children:C.deadlineUrgent?"due soon":"deadline"})]})]}),(0,sd.jsxs)("div",{className:"jump",id:"jump",children:[(0,sd.jsx)("a",{className:"here","data-j":"ov",onClick:()=>de("b-ov"),children:"Overview"}),(0,sd.jsx)("a",{"data-j":"todo",onClick:()=>de("b-todo"),children:"What to do"}),(0,sd.jsx)("a",{"data-j":"cost",onClick:()=>de("b-cost"),children:"Costs & aid"}),(0,sd.jsx)("a",{"data-j":"prof",onClick:()=>de("b-prof"),children:"Professors"}),(0,sd.jsx)("a",{"data-j":"docs",onClick:()=>de("b-docs"),children:"Documents"}),(0,sd.jsx)("a",{"data-j":"notes",onClick:()=>de("b-notes"),children:"Notes"}),(0,sd.jsxs)("button",{className:"jump-research-more",onClick:()=>x("menu",{uni:C.name,uniId:C.id,program:C.program},{preset:"Research more about ".concat(C.name).concat(C.program?" (".concat(C.program,")"):"",". Anything important I should know \u2014 recent news, ranking shifts, admissions trends, professor moves, scholarship changes, student outcomes.")}),"data-testid":"research-more-btn",title:"Open Vidhya and dig deeper",children:[(0,sd.jsx)(pd.Sparkle,{size:13})," Research more"]})]}),(0,sd.jsxs)("div",{className:"block",id:"b-ov","data-testid":"block-overview",children:[(0,sd.jsx)("h3",{children:"The fit, in one look"}),(0,sd.jsx)("div",{className:"bdesc",children:"Vidhya researched this live. Figures it couldn't byte-verify are labelled, never faked."}),!se||C.fit_notes||C.highlights&&C.highlights.length?(0,sd.jsx)("div",{style:{marginTop:6},children:(0,sd.jsx)(fp,{u:C,isResearching:se})}):(0,sd.jsxs)("div",{style:{marginTop:10},"data-testid":"research-progress",children:[(0,sd.jsx)("div",{className:"bdesc",style:{marginBottom:12},children:"Researching this program live \u2014 here's what Vidhya is pulling right now."}),(0,sd.jsx)($h,{steps:Wh,active:!0,interval:7e3,testid:"research-steps"})]})]}),(0,sd.jsxs)("div",{className:"block",id:"b-todo","data-testid":"block-todo",children:[(0,sd.jsxs)("h3",{children:["What you need to do ",(0,sd.jsxs)("span",{className:"connpill",children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M8 12h8M12 8v8"})}),"also in your Tasks"]})]}),(0,sd.jsx)("div",{className:"bdesc",children:"Tailored to this program. Check here and it ticks in your task center too."}),ie.length>0&&(0,sd.jsxs)("div",{className:"pgwrap",children:[(0,sd.jsxs)("span",{className:"pn",children:[ae,"/",ie.length]}),(0,sd.jsx)("div",{className:"pgbar",children:(0,sd.jsx)("i",{style:{width:"".concat(ue,"%")}})}),(0,sd.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:12,color:"var(--slate)",fontWeight:700},children:[ue,"% ready"]})]}),(0,sd.jsx)("div",{className:"clist",children:0===ie.length?(0,sd.jsx)("div",{className:"blockmsg",children:"No checklist items 
2yet for this program."}):ie.map(e=>(0,sd.jsxs)("div",{className:"cl ".concat(e.done?"done":""),onClick:()=>(async e=>{const t=ie.map(t=>t.id===e?(0,u.A)((0,u.A)({},t),{},{done:!t.done}):t),n=t.filter(e=>e.req),r=n.length?Math.round(n.filter(e=>e.done).length/n.length*100):0;await l(C.id,{checklist:t,progress:r})})(e.id),"data-testid":"checklist-item-".concat(e.id),children:[(0,sd.jsx)("div",{className:"chk",children:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",children:(0,sd.jsx)("path",{d:"m5 12 5 5L20 6"})})}),(0,sd.jsxs)("div",{className:"tb",children:[(0,sd.jsx)("b",{children:e.name}),!1===e.req&&(0,sd.jsx)("span",{children:"Optional but recommended"})]})]},e.id))}),(0,sd.jsx)("div",{style:{marginTop:13},children:(0,sd.jsxs)("button",{className:"pill-add",onClick:()=>null===y||void 0===y?void 0:y(C.id),"data-testid":"sync-tasks-btn",children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M12 5v14M5 12h14"})}),"Sync to my tasks"]})})]}),(0,sd.jsx)("div",{id:"b-cost",style:{scrollMarginTop:58},"data-testid":"block-cost",children:(0,sd.jsx)(ip,{u:C,profile:null===D||void 0===D?void 0:D.profile,computeCostAndAid:v,switchTab:_,isNavigator:he})}),(0,sd.jsxs)("div",{className:"block",id:"b-prof","data-testid":"block-prof",children:[(0,sd.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:12,flexWrap:"wrap"},children:[(0,sd.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,sd.jsx)("h3",{children:"Professors worth reaching out to"}),(0,sd.jsx)("div",{className:"bdesc",children:"Found inside this exact department. Verified lab links, match on your interests."})]}),he&&(0,sd.jsxs)("button",{className:"pbtn gho",onClick:()=>Q(!0),"data-testid":"open-outreach-drawer",children:[(0,sd.jsx)(pd.Mail,{size:12})," Open outreach",(s.emails||[]).filter(e=>e.uni_id===C.id||e.uni===C.name).length>0&&(0,sd.jsx)("span",{className:"pill",style:{marginLeft:6},children:(s.emails||[]).filter(e=>e.uni_id===C.id||e.uni===C.name).length})]})]}),A&&(0,sd.jsx)("div",{className:"berr","data-testid":"profs-error",children:A}),0===k.length?(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"blockmsg",children:"No professors yet. Vidhya can find faculty in your area, inside this department."}),(0,sd.jsx)("button",{className:"pbtn fill",onClick:oe,disabled:E,"data-testid":"find-profs-btn",children:E?N||"Searching\u2026":"Find professors with Vidhya"}),E&&(0,sd.jsxs)("div",{className:"muted",style:{fontSize:12,marginTop:8,lineHeight:1.5},"data-testid":"profs-progress",children:[(0,sd.jsx)(Uh,{size:12,className:"vidhya-spin",style:{verticalAlign:-2,marginRight:6}}),N||"Pulling official faculty directories\u2026"]})]}):(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"profrow",children:k.map((e,t)=>(0,sd.jsxs)("div",{className:"profcard","data-testid":"prof-card-".concat(t),children:[(0,sd.jsxs)("div",{className:"pn",children:[e.name,(e.match||e.match_score)&&(0,sd.jsxs)("span",{className:"matchg",children:[e.match||e.match_score,"number"===typeof(e.match||e.match_score)?"% match":""]})]}),(0,sd.jsx)("div",{className:"pr",children:e.title||e.department||""}),(e.research||e.notable_work)&&(0,sd.jsx)("div",{className:"pclip",children:e.research||e.notable_work}),(0,sd.jsxs)("div",{className:"pa",children:[(0,sd.jsxs)("button",{className:"pbtn fill",onClick:()=>le(e),"data-testid":"prof-draft-".concat(t),children:[(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,sd.jsx)("path",{d:"M4 4h16v16H4z"}),(0,sd.jsx)("path",{d:"m4 7 8 5 8-5"})]}),"Draft outreach"]}),(e.lab_url||e.profile_url)&&(0,sd.jsx)("a",{className:"pbtn gho",href:e.lab_url||e.profile_url,target:"_blank",rel:"noreferrer",children:"Lab \u2197"}),e.verified&&(0,sd.jsxs)("span",{className:"vbadge",style:{padding:"3px 8px"},children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"verified"]})]})]},t))}),(0,sd.jsxs)("div",{style:{marginTop:13},children:[(0,sd.jsxs)("button",{className:"pill-add",onClick:oe,disabled:E,"data-testid":"find-more-profs-btn",children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M12 5v14M5 12h14"})}),E?N||"Searching\u2026":"Find more"]}),E&&(0,sd.jsxs)("div",{className:"muted",style:{fontSize:12,marginTop:8,lineHeight:1.5},"data-testid":"profs-progress",children:[(0,sd.jsx)(Uh,{size:12,className:"vidhya-spin",style:{verticalAlign:-2,marginRight:6}}),N||"Pulling official faculty directories\u2026"]})]})]})]}),(0,sd.jsx)("div",{id:"b-docs",style:{scrollMarginTop:58},"data-testid":"block-docs",children:(0,sd.jsx)(tp,{u:C,ws:s,confirm:b})}),(0,sd.jsxs)("div",{className:"block",id:"b-notes","data-testid":"block-notes",children:[(0,sd.jsx)("div",{className:"notes-head",style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",ga
2p:12,flexWrap:"wrap"},children:(0,sd.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,sd.jsx)("h3",{children:"Notes"}),(0,sd.jsx)("div",{className:"bdesc",children:"Your private scratchpad for this university."})]})}),(0,sd.jsx)("textarea",{className:"notearea",value:J,onChange:e=>X(e.target.value),placeholder:"Jot anything about this university \u2014 replies from professors, fee waivers, reminders\u2026","data-testid":"notes-textarea"}),(0,sd.jsx)("div",{className:"notesave","data-testid":"notes-status",children:Z?"Saving\u2026":te?"Saved":""})]}),(0,sd.jsx)("div",{style:{marginTop:18,textAlign:"right"},children:(0,sd.jsxs)("button",{className:"pbtn gho",onClick:async()=>{await b({title:"Remove this university?",message:"".concat(C.name," will be removed from your shortlist along with its checklist progress, notes, and documents."),confirmLabel:"Remove",danger:!0})&&(await c(C.id),i())},"data-testid":"detail-remove-btn",children:[(0,sd.jsx)(pd.Trash,{size:13})," Remove from board"]})}),(0,sd.jsx)("div",{"aria-hidden":"true",style:{height:"58vh"}}),(0,sd.jsx)(up,{open:Y,onClose:()=>Q(!1),u:C,gmail:h,drafting:M,profs:k,emailDraft:U,setEmailDraft:$,gmailBusy:W,gmailMsg:q,draftWithAi:le,saveDraft:async()=>{U.body.trim()&&(await d((0,u.A)((0,u.A)({},U),{},{uni_id:C.id})),V("Saved locally to Vidhya. Connect Gmail to also save it as a real Gmail draft."))},openGmailConsent:async()=>{try{const e=await p(),t=window.open(e.url,"_blank","width=520,height=640"),n=e=>{e.data&&"gmail-connected"===e.data.type&&(window.removeEventListener("message",n),setTimeout(()=>window.location.reload(),800))};window.addEventListener("message",n);const r=setInterval(async()=>{try{const{data:e}=await ad.http.get("/gmail/status");e.connected&&(clearInterval(r),window.removeEventListener("message",n),window.location.reload())}catch(e){console.debug("[gmail] connection poll error:",e)}t&&t.closed&&clearInterval(r)},2e3)}catch(Lt){V((0,ad.K)(Lt))}},saveToGmailDrafts:async()=>{if(U.body.trim()&&U.to.trim()&&U.subject.trim()){H("draft"),V("");try{var e;const t=await f({to:U.to,subject:U.subject,body:U.body,university_id:C.id,professor:U.professor_name});K((null===(e=t.email)||void 0===e?void 0:e.gmail_draft_id)||null),V("\u2713 Saved to your Gmail drafts. Open Gmail to review.")}catch(Lt){V((0,ad.K)(Lt))}finally{H("")}}else V("To, subject, and body are all required to save a Gmail draft.")},sendNow:async()=>{if(!G&&(!U.body.trim()||!U.to.trim()||!U.subject.trim()))return void V("Compose first, then send.");if(await b({title:"Send this email?",message:"Vidhya will send this email to ".concat(U.to," from your connected Gmail account."),confirmLabel:"Send via Gmail"})){H("send"),V("");try{await m(G?{gmail_draft_id:G}:{to:U.to,subject:U.subject,body:U.body}),V("\u2713 Sent. Vidhya will pull replies into your tracker automatically."),$({to:"",subject:"",body:"",professor_name:""}),K(null)}catch(Lt){V((0,ad.K)(Lt))}finally{H("")}}},emailHistory:(s.emails||[]).filter(e=>e.uni_id===C.id||e.uni===C.name),isNavigator:he})]})}function tp(e){let{u:t,ws:n,confirm:r}=e;const{universities:i,listDocuments:s,uploadDocument:o,renameDocument:l,deleteDocument:c,duplicateDocument:d}=n,[h,p]=(0,a.useState)([]),[f,m]=(0,a.useState)(!0),[g,v]=(0,a.useState)(!1),[y,D]=(0,a.useState)(""),b=(0,a.useRef)(null),[x,C]=(0,a.useState)(!1),[F,_]=(0,a.useState)(null),[k,w]=(0,a.useState)(null),E=(0,a.useCallback)(async()=>{m(!0);try{const e=await s(t.id);p(e)}catch(Lt){D((0,ad.K)(Lt))}finally{m(!1)}},[t.id,s]);(0,a.useEffect)(()=>{E()},[E]);const j=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"other";if(e&&e.length){D(""),v(!0);try{for(const r of e)r.size>10485760?D('"'.concat(r.name,'" is over 10 MB. Please upload smaller files.')):await o(t.id,r,{name:r.name,doc_type:n});await E()}catch(Lt){D((0,ad.K)(Lt))}finally{v(!1)}}},A=i.filter(e=>e.id!==t.id);return(0,sd.jsxs)("div",{className:"card","data-testid":"documents-tab",style:{padding:20},children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",marginBottom:8,flexWrap:"wrap",gap:12},children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("h3",{style:{margin:0},children:"Documents"}),(0,sd.jsxs)("div",{className:"muted",style:{fontSize:12,marginTop:4},children:["Upload your SOP, resume, transcripts, recommendations \u2014 anything you need for ",t.short||t.name,". Reuse a document in another application with one click."]})]}),(0,sd.jsxs)("button",{className:"btn btn-sm btn-clay",onClick:()=>{var e;return null===(e=b.current)||void 0===e?void 0:e.click()},disabled:g,"data-testid":"docs-upload-btn",children:[(0,sd.jsx)(pd.Upload,{size:12}
2)," ",g?"Uploading\u2026":"Upload file"]}),(0,sd.jsx)("input",{ref:b,type:"file",multiple:!0,style:{display:"none"},onChange:e=>{j(e.target.files),e.target.value=""},"data-testid":"docs-file-input"})]}),(0,sd.jsxs)("div",{className:"doc-drop ".concat(x?"is-dragging":""),onDragOver:e=>{e.preventDefault(),C(!0)},onDragLeave:()=>C(!1),onDrop:e=>{e.preventDefault(),C(!1),j(e.dataTransfer.files)},"data-testid":"docs-dropzone",children:[(0,sd.jsx)(pd.Upload,{size:18}),(0,sd.jsxs)("div",{style:{marginTop:6,fontSize:13},children:["Drag files here or ",(0,sd.jsx)("button",{className:"link-btn",onClick:()=>{var e;return null===(e=b.current)||void 0===e?void 0:e.click()},children:"browse"})]}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:11,marginTop:4},children:"PDF, DOCX, TXT up to 10 MB"})]}),y&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:12},"data-testid":"docs-error",children:y}),(0,sd.jsxs)("div",{style:{marginTop:14},children:[f&&(0,sd.jsx)("div",{className:"muted",style:{fontSize:12},children:"Loading documents\u2026"}),!f&&0===h.length&&(0,sd.jsx)("div",{className:"empty-state",style:{fontSize:13},children:"No documents uploaded for this university yet. Drop your SOP or resume here to get started."}),!f&&h.length>0&&(0,sd.jsx)("div",{className:"doc-list","data-testid":"docs-list",children:h.map(e=>(0,sd.jsxs)("div",{className:"doc-row","data-testid":"doc-row-".concat(e.id),children:[(0,sd.jsx)("div",{className:"doc-icon",children:(0,sd.jsx)(pd.Doc,{size:18})}),(0,sd.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,sd.jsx)("div",{className:"doc-name",title:e.name,children:e.name}),(0,sd.jsxs)("div",{className:"doc-meta",children:[(0,sd.jsx)("span",{children:Xh(e.doc_type)}),(0,sd.jsx)("span",{children:"\xb7"}),(0,sd.jsx)("span",{children:Zh(e.size)}),(0,sd.jsx)("span",{children:"\xb7"}),(0,sd.jsx)("span",{children:new Date(e.created_at).toLocaleDateString()})]})]}),(0,sd.jsxs)("div",{className:"doc-actions",children:[(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",title:"View / download",onClick:()=>(e=>{const t=localStorage.getItem("sa_token"),n="".concat(ad.n,"/documents/").concat(e.id,"/download?auth=").concat(encodeURIComponent(t||""));window.open(n,"_blank","noopener")})(e),"data-testid":"doc-dl-".concat(e.id),children:(0,sd.jsx)(pd.Download,{size:12})}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",title:"Copy to another university",onClick:()=>_({doc:e}),disabled:0===A.length,"data-testid":"doc-dup-".concat(e.id),children:(0,sd.jsx)(pd.Copy,{size:12})}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",title:"Rename / change type",onClick:()=>w({docId:e.id,name:e.name,doc_type:e.doc_type}),"data-testid":"doc-edit-".concat(e.id),children:(0,sd.jsx)(pd.Settings,{size:12})}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",title:"Delete",onClick:()=>(async e=>{if(await r({title:"Delete this document?",message:'"'.concat(e.name,'" will be removed from this university.'),confirmLabel:"Delete",danger:!0}))try{await c(e.id),await E()}catch(Lt){D((0,ad.K)(Lt))}})(e),"data-testid":"doc-del-".concat(e.id),children:(0,sd.jsx)(pd.Trash,{size:12})})]})]},e.id))})]}),F&&(0,sd.jsx)(hp,{onClose:()=>_(null),title:'Copy "'.concat(F.doc.name,'" to\u2026'),testid:"dup-modal",children:0===A.length?(0,sd.jsx)("div",{className:"muted",children:"Add a second university first."}):(0,sd.jsx)("div",{className:"dup-list",children:A.map(e=>(0,sd.jsxs)("button",{className:"dup-row",onClick:()=>(async e=>{if(F)try{await d(F.doc.id,e),_(null)}catch(Lt){D((0,ad.K)(Lt))}})(e.id),"data-testid":"dup-target-".concat(e.id),children:[(0,sd.jsx)("div",{className:"uni-mark uni-mark-sm",style:{background:e.color},children:(e.short||e.name).slice(0,2)}),(0,sd.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[(0,sd.jsx)("span",{style:{fontWeight:600,fontSize:13.5},children:e.name}),(0,sd.jsx)("span",{className:"muted",style:{fontSize:11},children:e.program})]})]},e.id))})}),k&&(0,sd.jsxs)(hp,{onClose:()=>w(null),title:"Edit document",testid:"edit-modal",children:[(0,sd.jsx)("label",{className:"muted",style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.06em"},children:"Name"}),(0,sd.jsx)("input",{className:"input",value:k.name,onChange:e=>w(t=>(0,u.A)((0,u.A)({},t),{},{name:e.target.value})),style:{marginTop:4,marginBottom:12},"data-testid":"edit-doc-name"}),(0,sd.jsx)("label",{className:"muted",style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.06em"},children:"Type"}
2),(0,sd.jsx)("select",{className:"input",value:k.doc_type,onChange:e=>w(t=>(0,u.A)((0,u.A)({},t),{},{doc_type:e.target.value})),style:{marginTop:4},"data-testid":"edit-doc-type",children:Jh.map(e=>(0,sd.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,sd.jsxs)("div",{className:"row",style:{marginTop:16,justifyContent:"flex-end",gap:8},children:[(0,sd.jsx)("button",{className:"btn btn-sm",onClick:()=>w(null),children:"Cancel"}),(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",onClick:async()=>{if(k)try{await l(k.docId,{name:k.name,doc_type:k.doc_type}),w(null),await E()}catch(Lt){D((0,ad.K)(Lt))}},"data-testid":"edit-doc-save",children:"Save"})]})]})]})}function np(e){let{u:t,factType:n,title:r,cacheKey:i,endpoint:s,autoload:o=!0,transformValue:l=null}=e;const u=t[i]||null,[c,d]=(0,a.useState)(o&&!u),[h,p]=(0,a.useState)(u),[f,m]=(0,a.useState)(!1),[g,v]=(0,a.useState)(""),[y,D]=(0,a.useState)(!1),b=(0,a.useCallback)(async()=>{d(!0);try{var e;const n=await ad.http.post("/universities/".concat(t.id,"/").concat(s),null,{timeout:55e3});p((null===(e=n.data)||void 0===e?void 0:e.data)||null)}catch(Lt){p(null)}finally{d(!1)}},[t.id,s]);(0,a.useEffect)(()=>{o&&!u&&b()},[t.id]);const x=async()=>{const e=(g||"").trim();if(e){D(!0);try{var r;const i=await ad.http.post("/universities/".concat(t.id,"/self-fact"),{fact_type:n,value:e});p((null===(r=i.data)||void 0===r?void 0:r.data)||null),m(!1),v("")}catch(Lt){}finally{D(!1)}}else m(!1)},C=null===h||void 0===h?void 0:h.status,F="verified"===C&&(null===h||void 0===h?void 0:h.value)&&(null===h||void 0===h?void 0:h.source_url),_="found"===C&&(null===h||void 0===h?void 0:h.value),k="self_reported"===C&&(null===h||void 0===h?void 0:h.value),w=(null===h||void 0===h?void 0:h.explore_url)||(null===h||void 0===h?void 0:h.verify_url)||(null===h||void 0===h?void 0:h.source_url)||"",E=w?(0,sd.jsxs)("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"btn btn-sm","data-testid":"".concat(n,"-explore-link"),style:{textDecoration:"none",display:"inline-flex",alignItems:"center",gap:6},children:["Explore official page ",(0,sd.jsx)(Vh,{size:12})]}):null,j=(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:10,flexWrap:"wrap"},children:[(0,sd.jsx)("input",{className:"vd-self-input","data-testid":"".concat(n,"-self-input"),value:g,autoFocus:!0,placeholder:"tuition"===n?"e.g. $58,240 / year":"e.g. December 15, 2026",onChange:e=>v(e.target.value),onKeyDown:e=>{"Enter"===e.key&&x(),"Escape"===e.key&&m(!1)},style:{padding:"7px 10px",border:"1px solid var(--rule)",borderRadius:8,fontSize:14,minWidth:180}}),(0,sd.jsxs)("button",{className:"btn btn-sm",onClick:x,disabled:y,"data-testid":"".concat(n,"-self-save"),children:[y?(0,sd.jsx)(Uh,{size:12,className:"vidhya-spin"}):(0,sd.jsx)(Gh,{size:12})," Save"]}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:()=>m(!1),children:"Cancel"})]});return(0,sd.jsxs)("div",{"data-testid":"".concat(n,"-figure"),style:{border:"1px solid var(--rule)",borderRadius:14,padding:"14px 16px",background:"var(--paper-2)"},children:[(0,sd.jsx)("div",{className:"muted",style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.06em"},children:r}),c&&(0,sd.jsxs)("div",{"data-testid":"".concat(n,"-loading"),style:{display:"flex",alignItems:"center",gap:10,marginTop:8},children:[(0,sd.jsx)(Uh,{size:14,className:"vidhya-spin"}),(0,sd.jsxs)("span",{style:{fontSize:14,color:"var(--ink-2)"},children:["Pulling live ",n," from the official source\u2026"]})]}),!c&&(F||_||k)&&(0,sd.jsxs)("div",{style:{marginTop:6},children:[(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,sd.jsx)("div",{"data-testid":"".concat(n,"-value"),style:{fontWeight:700,fontSize:22},children:l?l(h.value):h.value}),F&&(0,sd.jsx)(Ih,{status:"verified",label:"".concat(r," verified"),source:h.source_url,checkedAt:h.fetched_at}),_&&(0,sd.jsx)(Ih,{status:"found",source:h.source_url}),!F&&(0,sd.jsxs)("button",{className:"vd-edit-btn",onClick:()=>{v(h.value||""),m(!0)},"data-testid":"".concat(n,"-edit-btn"),title:"Edit this value",style:{border:"none",background:"transparent",curs
2or:"pointer",color:"var(--muted)",display:"inline-flex",alignItems:"center",gap:4,fontSize:12},children:[(0,sd.jsx)(Kh,{size:12})," Edit"]})]}),F&&h.snippet&&!/\|[^|]*\|[^|]*\|/.test(h.snippet)&&(0,sd.jsxs)("div",{className:"muted",style:{fontSize:12,marginTop:6,fontStyle:"italic",lineHeight:1.5},children:["\u201c",h.snippet,"\u201d"]}),_&&(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:10,flexWrap:"wrap"},children:[E,(0,sd.jsxs)("button",{className:"btn btn-sm btn-ghost",onClick:b,"data-testid":"".concat(n,"-recheck-btn"),children:[(0,sd.jsx)(Yh,{size:11})," Re-check"]})]}),f&&j]}),!c&&!F&&!_&&!k&&!h&&(0,sd.jsx)("div",{"data-testid":"".concat(n,"-idle"),style:{marginTop:8},children:(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[t.deadline&&"deadline"===n&&(0,sd.jsx)("div",{style:{fontWeight:600,fontSize:16,color:"var(--ink-2)"},children:t.deadline}),(0,sd.jsxs)("button",{className:"btn btn-sm",onClick:b,"data-testid":"".concat(n,"-verify-btn"),children:[(0,sd.jsx)(Yh,{size:11})," Verify ",n," with Vidhya"]})]})}),!c&&!F&&!_&&!k&&h&&(0,sd.jsxs)("div",{"data-testid":"".concat(n,"-notfound"),style:{marginTop:8},children:[(0,sd.jsxs)("div",{style:{fontSize:14,color:"var(--ink-2)",lineHeight:1.5},children:["We couldn't confirm ","tuition"===n?"a tuition figure":"a deadline"," on the official source right now \u2014 explore the page yourself, or add it below."]}),!f&&(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:10,flexWrap:"wrap"},children:[E,(0,sd.jsxs)("button",{className:"btn btn-sm",onClick:()=>{v(""),m(!0)},"data-testid":"".concat(n,"-add-btn"),children:[(0,sd.jsx)(Kh,{size:11})," Add it yourself"]}),(0,sd.jsxs)("button",{className:"btn btn-sm btn-ghost",onClick:b,"data-testid":"".concat(n,"-recheck-btn"),children:[(0,sd.jsx)(Yh,{size:11})," Re-check"]})]}),f&&j]})]})}function rp(e){let{u:t,profile:n}=e;return(0,sd.jsx)(np,{u:t,factType:"tuition",title:"Tuition (official)",cacheKey:"tuition_verification",endpoint:"verify-tuition",transformValue:e=>function(e,t){if(!e)return e;const n=/(?:\b[A-Z][a-zA-Z]+ Resident\b|In-?State|In-?District|\bDomestic\b)/i,r=/(?:Out-?of-?State|Non-?Resident)/i,i=e.search(n),a=e.search(r);if(-1===i||-1===a)return e;const s=e=>(e||"").trim().replace(/^[\s:;,.\u2013-]+/,"").replace(/[\s:;,.]+$/,""),o=s(e.slice(0,Math.min(i,a))),l=(e,t,n)=>{const r=o?"".concat(o," \u2014 ").concat(e):e;return t.test(e.slice(0,20))?r:"".concat(n," \u2014 ").concat(r)};if(t){const t=i>a?i:e.length;return l(s(e.slice(a,t)),r,"Out-of-State")}const u=a>i?a:e.length;return l(s(e.slice(i,u)),n,"In-State")}(e,function(e,t){const n=String((null===e||void 0===e?void 0:e.country)||"United States").toLowerCase(),r=String((null===t||void 0===t?void 0:t.student_country)||(null===t||void 0===t?void 0:t.citizenship)||(null===t||void 0===t?void 0:t.country)||"").toLowerCase(),i=/(united states|usa|u\.s|america)/;return!r||(i.test(n)?!i.test(r):r!==n)}(t,n))})}function ip(e){let{u:t,profile:n,computeCostAndAid:r,switchTab:i,isNavigator:s}=e;const[o,l]=(0,a.useState)(!1),[u,c]=(0,a.useState)(""),[d,h]=(0,a.useState)(null),p=t.cost_aid||null,f=[{label:"Living cost (est.)",v:t.living_cost||"\u2014"},{label:"Total estimate / yr",v:t.total_cost_estimate||"\u2014"},{label:"Application fee",v:t.application_fee||"\u2014"},{label:"Your budget",v:(null===n||void 0===n?void 0:n.budget)||"\u2014"},{label:"Acceptance rate",v:t.acceptRate||"\u2014"}],m=Array.isArray(t.scholarships_at_uni)?t.scholarships_at_uni:[];return(0,sd.jsxs)("div",{className:"col",style:{gap:16},"data-testid":"costs-tab",children:[(0,sd.jsxs)("div",{className:"card",style:{padding:20},children:[(0,sd.jsx)("h3",{style:{marginTop:0},children:"Cost snapshot"}),(0,sd.jsx)(rp,{u:t,profile:n}),(0,sd.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:14,marginTop:16},children:f.map(e=>(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"muted",style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.06em"},children:e.label}),(0,sd.jsx)("div",{style:{fontWeight:600,marginTop:4,fontSize:16},children:e.v})]},e.label))}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:12,marginTop:16,lineHeight:1.55},children:"Tuition is pulled live and verified against the official source. Living cost, totals and fees are estimates that depend on housing, lifestyle, and exchange rates \u2014 confirm them on the official page."})]}),(0,sd.jsx)(op,{ca:p,busy:o,err:u,missing:d,onCompute:async()=>
2{l(!0),c(""),h(null);try{await r(t.id)}catch(Lt){var e,n;const r=null===Lt||void 0===Lt||null===(e=Lt.response)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.detail;r&&"object"===typeof r&&"profile_incomplete"===r.code?h(r):c((0,ad.K)(Lt))}finally{l(!1)}},goFindScholarships:()=>{var e;if(null!==p&&void 0!==p&&null!==(e=p.scholarship_keywords)&&void 0!==e&&e.length)try{sessionStorage.setItem("vidhya_schol_prefill",JSON.stringify({keywords:p.scholarship_keywords.join(", "),notes:p.aid_strategy||""}))}catch(Lt){}window.location.href="/app/scholarships"},budget:null===n||void 0===n?void 0:n.budget,isNavigator:s}),(0,sd.jsxs)("div",{className:"card",style:{padding:20},children:[(0,sd.jsx)("h3",{style:{marginTop:0},children:"Internal scholarships at this university"}),0===m.length?"pending"===t.research_status?(0,sd.jsx)("div",{className:"empty-state",style:{fontSize:13},"data-testid":"schols-internal-pending",children:"We're still pulling internal scholarship data. Check back in a minute."}):(0,sd.jsx)("div",{className:"empty-state",style:{fontSize:13},"data-testid":"schols-internal-none",children:"No university-specific scholarships were found for this program yet. Use \u201cFind scholarships\u201d above to surface external awards you qualify for."}):(0,sd.jsx)("ul",{style:{margin:"8px 0 0",paddingLeft:18,fontSize:13.5,lineHeight:1.6},"data-testid":"schols-internal",children:m.map((e,t)=>(0,sd.jsx)("li",{children:e},t))}),(0,sd.jsxs)("button",{className:"btn btn-sm",style:{marginTop:14},onClick:()=>i&&i("checklist"),"data-testid":"costs-jump-checklist",children:[(0,sd.jsx)(pd.ArrowRight,{size:11})," View application requirements"]})]})]})}const ap=["Calculating your profile score","Checking program requirements","Cross-analyzing your profile against admitted averages"];function sp(e){let{active:t}=e;const[n,r]=(0,a.useState)(0);return(0,a.useEffect)(()=>{if(!t)return void r(0);r(0);const e=[setTimeout(()=>r(1),2600),setTimeout(()=>r(2),6400)];return()=>e.forEach(clearTimeout)},[t]),t?(0,sd.jsx)("div",{className:"compute-steps","data-testid":"compute-steps",children:ap.map((e,t)=>{const r=t<n?"done":t===n?"active":"pending";return(0,sd.jsxs)("div",{className:"compute-step ".concat(r),"data-testid":"compute-step-".concat(t),children:[(0,sd.jsx)("span",{className:"cs-ico",children:"done"===r?(0,sd.jsx)(pd.Check,{size:12}):"active"===r?(0,sd.jsx)(Uh,{size:12,className:"vidhya-spin"}):(0,sd.jsx)("span",{className:"cs-dot"})}),(0,sd.jsx)("span",{className:"cs-label",children:e})]},t)})}):null}function op(e){let{ca:t,busy:n,err:r,missing:i,onCompute:a,goFindScholarships:s,budget:o,isNavigator:l}=e;if(!l)return(0,sd.jsx)(Rh,{feature:ch.AID_GAP,context:"costs_tab_locked",title:"Fit \xb7 admit chance \xb7 aid gap",description:"See your honest admission odds, the funding gap to close, and a tailored aid strategy \u2014 once you upgrade.",ctaLabel:"Unlock with Navigator",testid:"admit-aid-locked-plan",children:(0,sd.jsxs)("div",{style:{padding:18},children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-display)",fontSize:44,fontWeight:600,color:"var(--ink-3)"},children:"\u2500\u2500%"}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:12},children:"Admit chance preview"})]})});if(i&&!t)return(0,sd.jsxs)("div",{className:"card",style:{padding:20},"data-testid":"admit-aid-locked",children:[(0,sd.jsx)("h3",{style:{marginTop:0},children:"Admit chance & aid gap"}),(0,sd.jsx)("p",{style:{fontSize:13.5,lineHeight:1.55,marginTop:4,marginBottom:12,color:"var(--ink-2)"},children:i.message||"We need a few more profile details to estimate this honestly."}),(0,sd.jsxs)("div",{style:{background:"rgba(184,138,58,0.07)",borderRadius:10,padding:"12px 14px",marginBottom:14},children:[(0,sd.jsx)("div",{className:"muted",style:{fontSize:11,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",marginBottom:6},children:"Fill in"}),(0,sd.jsx)("ul",{style:{margin:0,paddingLeft:18,fontSize:13.5,lineHeight:1.6},"data-testid":"admit-aid-missing",children:(i.missing||[]).map((e,t)=>(0,sd.jsx)("li",{children:e},t))})]}),(0,sd.jsxs)("button",{className:"btn btn-clay",onClick:()=>{window.location.href="/app/profile"},"data-testid":"admit-aid-complete-profile-btn",children:[(0,sd.jsx)(pd.ArrowRight,{size:12})," Complete profile to unlock"]})]});if(!t)return(0,sd.jsxs)("div",{className:"card",style:{padding:20},"data-testid":"admit-aid-empty",children:[(0,sd.jsx)("h3",{style:{marginTop:0},children:"Admit chance & aid gap"}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:13.5,lineHeight:1.55,marginTop:4},children:"Get an honest read on your odds and the funding gap to close, based on your profile and this program's numbers."}),r&&(0,sd.jsx)("div",{className:"auth-error",style:{marginBottom:10},"data-testid":"admit-aid-error",children:r}),n?(0,sd.jsx)(sp,{active:n}):(0,sd.jsxs)("button",{className:"btn btn-clay",onClick:a,disabled:n,"data-testid":"admit-aid-compute-btn",children:[(0,sd.jsx)(pd.Sparkle,{size:12})," Calculate admit chance & aid gap"]}
2)]});const u=(t.admit_chance_band||"moderate").toLowerCase(),c={low:{fg:"#8a3c20",bg:"rgba(184,90,61,0.15)",label:"Long shot"},moderate:{fg:"#B8893A",bg:"rgba(184,138,58,0.15)",label:"Realistic"},strong:{fg:"#3a5a36",bg:"rgba(79,122,74,0.15)",label:"Strong match"}},d=c[u]||c.moderate,h=t.admit_chance_pct,p=t.aid_gap_usd||0,f=t.estimated_total_cost_usd||0,m=t.budget_capacity_usd||0,g=t.internal_aid_estimate_usd||0;return(0,sd.jsxs)("div",{className:"card",style:{padding:20},"data-testid":"admit-aid-card",children:[(0,sd.jsx)("div",{className:"row",style:{justifyContent:"space-between",marginBottom:4,flexWrap:"wrap"},children:(0,sd.jsx)("h3",{style:{marginTop:0},children:"Admit chance & aid gap"})}),n&&(0,sd.jsx)(sp,{active:n}),(0,sd.jsxs)("div",{className:"admit-gauge","data-testid":"admit-gauge",children:[(0,sd.jsxs)("div",{className:"admit-gauge-row",children:[(0,sd.jsxs)("div",{className:"admit-gauge-pct",style:{color:d.fg},children:[h,"%"]}),(0,sd.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,flex:1},children:[(0,sd.jsx)("span",{style:{background:d.bg,color:d.fg,fontSize:10.5,fontFamily:"var(--font-mono)",letterSpacing:"0.08em",textTransform:"uppercase",padding:"3px 8px",borderRadius:999,fontWeight:600,alignSelf:"flex-start"},"data-testid":"admit-band-".concat(u),children:d.label}),(0,sd.jsx)("div",{style:{fontSize:13.5,lineHeight:1.5,color:"var(--ink-2)"},"data-testid":"admit-reasoning",children:t.admit_chance_reasoning})]})]}),(0,sd.jsx)("div",{className:"admit-gauge-bar",children:(0,sd.jsx)("div",{className:"admit-gauge-fill",style:{width:"".concat(h,"%"),background:d.fg}})})]}),(0,sd.jsxs)("div",{style:{marginTop:18},children:[(0,sd.jsx)("div",{className:"muted",style:{fontSize:11,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",marginBottom:8},children:"Aid gap to close"}),(0,sd.jsxs)("div",{className:"aid-stack",children:[(0,sd.jsx)(lp,{label:"Estimated total / yr",v:"$".concat(f.toLocaleString())}),(0,sd.jsx)(lp,{label:"Your budget".concat(o?" (".concat(o,")"):""),v:"-$".concat(m.toLocaleString()),dim:!0}),(0,sd.jsx)(lp,{label:"Likely internal aid",v:"-$".concat(g.toLocaleString()),dim:!0}),(0,sd.jsx)(lp,{label:"Gap to close",v:"$".concat(p.toLocaleString()),bold:!0,danger:p>0})]})]}),t.aid_strategy&&(0,sd.jsxs)("div",{style:{marginTop:14,padding:"12px 14px",background:"rgba(184,138,58,0.07)",borderRadius:10,fontSize:13.5,lineHeight:1.55},children:[(0,sd.jsx)("strong",{style:{fontSize:11,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",display:"block",marginBottom:4},children:"Strategy"}),t.aid_strategy]}),p>0&&(0,sd.jsxs)("button",{className:"btn btn-clay",style:{marginTop:14},onClick:s,"data-testid":"find-scholarships-btn",children:[(0,sd.jsx)(pd.Trophy,{size:12})," Find scholarships to close the gap"]}),Array.isArray(t.caveats)&&t.caveats.length>0&&(0,sd.jsx)("ul",{className:"muted",style:{marginTop:14,paddingLeft:18,fontSize:12,lineHeight:1.55},"data-testid":"admit-caveats",children:t.caveats.map((e,t)=>(0,sd.jsx)("li",{children:e},t))})]})}function lp(e){let{label:t,v:n,dim:r,bold:i,danger:a}=e;return(0,sd.jsxs)("div",{className:"aid-row",children:[(0,sd.jsx)("span",{style:{color:r?"var(--ink-3)":"var(--ink-2)",fontSize:13},children:t}),(0,sd.jsx)("span",{style:{fontWeight:i?700:500,fontSize:i?18:14,color:a?"#8a3c20":"var(--ink)"},children:n})]})}function up(e){var t;let{open:n,onClose:r}=e,i=l(e,Qh);return(0,a.useEffect)(()=>{if(!n)return;const e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,r]),(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"email-drawer-scrim ".concat(n?"show":""),onClick:r,"data-testid":"email-drawer-scrim"}),(0,sd.jsxs)("aside",{className:"email-drawer ".concat(n?"show":""),"data-testid":"email-drawer","aria-label":"Outreach drawer","aria-hidden":!n,children:[(0,sd.jsxs)("div",{className:"ed-head",children:[(0,sd.jsxs)("div",{className:"ed-title",children:[(0,sd.jsx)(pd.Mail,{size:14}),(0,sd.jsxs)("div",{children:[(0,sd.jsxs)("b",{children:["Outreach for ",null===(t=i.u)||void 0===t?void 0:t.name]}),(0,sd.jsx)("span",{children:"Saved to this university"})]})]}),(0,sd.jsx)("button",{className:"ed-close",onClick:r,"aria-label":"Close outreach drawer","data-testid":"email-drawer-close",children:(0,sd.jsx)(pd.Close,{size:14})})]}),(0,sd.jsx)("div",{className:"ed-body",children:(0,sd.jsx)(cp,(0,u.A)({},i))})]})]})}function cp(e){let{u:t,gmail:n,drafting:r,profs:i,emailDraft:a,setEmailDraft:s,gmailBusy:o,gmailMsg:l,draftWithAi:c,saveDraft:d,openGmailConsent:h,saveToGmailDrafts:p,sendNow:f,emailHistory:m=[],isNavigator:g}=e;return g?(0,sd.jsxs)("div",{className:"col",style:{gap:16},children:[(0,sd.jsxs)("div",{className:"card composer-card","data-testid":"email-composer",style:{padding:20},children:[(0,sd.jsx)("h3",{children:"Email composer"}),(0,sd.jsxs)("div",{className:"ai-draft-banner",children:[(0,sd.jsx)(pd.Sparkle,{size:14}),(0,sd.jsx)("span",{children:"Drafts are personalized using the professor's research and your background."}),(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",style:{marginLeft:"auto"},onClick:()=>c(),disabled:r||0===i.length,"data-testid":"composer-draft-btn",children:r?"Drafting\u2026":"Draft with AI"})]}),(0,sd.jsxs)("div",{className:"email-form",children:[(0,sd.jsxs)("div",{className:"email-row",children:[(0,sd.jsx)("label",{children:"To"}),(0,sd.jsx)("input",{value:a.to,onChange:e=>s(t=>(0,u.A)((0,u.A)({},t),{},{to:e.target.value})),placeholder:"[email protected]"})]}),(0,sd.jsxs)("div",{className:"email-row",children:[(0,sd.jsx)("label",{children:"Subject"}),(0,sd.jsx)("input",{value:a.subject,onChange:e=>s(t=>(0,u.A)((0,u.A)({},t),{},{subject:e.target.value})),placeholder:"Subject"})]}),(0,sd.jsx)("textarea",{className:"email-body-input",value:a.body,onChange:e=>s(t=>(0,u.A)((0,u.A)({},t),{},{body:e.target.value})),placeholder:"Click 'Draft with AI' or write your message\u2026","data-testid":"email-body-input"}),(0,sd.jsxs)("div",{className:"composer-actions",children:[l&&(0,sd.jsx)("div",{className:"composer-msg","data-testid":"gmail-msg",children:l}),(0,sd.jsxs)("div",{className:"row",style:{paddingTop:8,borderTop:"1px solid var(--ink-5)",flexWrap:"wrap",gap:8},children:[(0,sd.jsx)("div",{className:"muted",style:{fontSize:11.5},children:null!==n&&void 0!==n&&n.connected?(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)(pd.Mail,{size:12})," Gmail connected: ",(0,sd.jsx)("strong",{children:n.email})]}):(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)(pd.Mail,{size:12})," Connect Gmail to save real drafts & send from your inbox"]})}),(0,sd.jsxs)("div",{style:{marginLeft:"auto",display:"flex",gap:8,flexWrap:"wrap"}
2,children:[(0,sd.jsx)(gp,{draft:a}),(0,sd.jsx)("button",{className:"btn btn-sm",onClick:d,disabled:!a.body.trim(),"data-testid":"email-save-btn",children:"Save locally"}),null!==n&&void 0!==n&&n.connected?(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("button",{className:"btn btn-sm",onClick:p,disabled:"draft"===o||!a.body.trim(),"data-testid":"gmail-draft-btn",children:"draft"===o?"Saving\u2026":"Save to Gmail drafts"}),(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",onClick:f,disabled:"send"===o||!a.body.trim(),"data-testid":"gmail-send-btn",children:"send"===o?"Sending\u2026":"Send via Gmail"})]}):(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",onClick:h,"data-testid":"gmail-connect-btn",children:"Connect Gmail"})]})]})]})]})]}),m.length>0&&(0,sd.jsxs)("div",{className:"card","data-testid":"email-history",style:{padding:20},children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",marginBottom:12},children:[(0,sd.jsx)("h3",{style:{margin:0},children:"Past emails"}),(0,sd.jsxs)("span",{className:"pill",children:[m.length," saved"]})]}),(0,sd.jsx)("div",{className:"col",style:{gap:10},children:[...m].sort((e,t)=>(t.created_at||"").localeCompare(e.created_at||"")).map(e=>(0,sd.jsx)(dp,{m:e,onLoadDraft:()=>s({to:e.to||"",subject:e.subject||"",body:e.body||"",professor_name:e.professor_name||e.professor||""})},e.id))})]})]}):(0,sd.jsx)("div",{className:"col",style:{gap:16},children:(0,sd.jsx)(Rh,{feature:ch.GMAIL,context:"detail_emails_tab",title:"Gmail outreach unlocks with Navigator",description:"Connect Gmail to draft personalised professor emails, save them straight to your inbox, and one-click send \u2014 all logged inside Vidhya.",ctaLabel:"Unlock with Navigator",testid:"emails-locked-card",children:(0,sd.jsx)("div",{style:{padding:18},children:(0,sd.jsxs)("div",{className:"email-form",style:{pointerEvents:"none",opacity:.55},children:[(0,sd.jsxs)("div",{className:"email-row",children:[(0,sd.jsx)("label",{children:"To"}),(0,sd.jsx)("input",{value:"prof.\u2588\u2588\u2588\u2588\u2588\u2588\u2588\[email protected]",readOnly:!0})]}),(0,sd.jsxs)("div",{className:"email-row",children:[(0,sd.jsx)("label",{children:"Subject"}),(0,sd.jsx)("input",{value:"\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588",readOnly:!0})]})]})})})})}function dp(e){let{m:t,onLoadDraft:n}=e;const[r,i]=(0,a.useState)(!1),s=t.created_at?new Date(t.created_at).toLocaleString():"";return(0,sd.jsxs)("div",{className:"email-history-row","data-testid":"email-history-".concat(t.id),children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",gap:8},children:[(0,sd.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,sd.jsx)("div",{style:{fontWeight:600,fontSize:13.5,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.subject||"(no subject)"}),(0,sd.jsxs)("div",{className:"muted",style:{fontSize:11.5,marginTop:2},children:["To ",t.to||"\u2014"," ",t.professor_name||t.professor?"\xb7 ".concat(t.professor_name||t.professor):""," \xb7 ",s]})]}),(0,sd.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:()=>i(e=>!e),"data-testid":"email-history-toggle-".concat(t.id),children:r?"Hide":"View"}),(0,sd.jsxs)("button",{className:"btn btn-sm",onClick:n,title:"Load into composer","data-testid":"email-history-reuse-".concat(t.id),children:[(0,sd.jsx)(pd.Copy,{size:11})," Reuse"]})]})]}),r&&(0,sd.jsx)("pre",{style:{whiteSpace:"pre-wrap",fontFamily:"var(--font-body)",fontSize:13,marginTop:10,color:"var(--ink-2)"},children:t.body||"(empty)"})]})}function hp(e){let{children:t,onClose:n,title:r,testid:i}=e;return(0,sd.jsx)("div",{className:"modal-back",onClick:n,"data-testid":i,children:(0,sd.jsxs)("div",{className:"modal-card",onClick:e=>e.stopPropagation(),children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",marginBottom:12},children:[(0,sd.jsx)("h4",{style:{margin:0},children:r}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:n,children:(0,sd.jsx)(pd.Close,{size:14})})]}),t]})})}const pp={reach:{bg:"rgba(184,90,61,0.15)",fg:"#8a3c20",label:"Ambitious"}
2,target:{bg:"rgba(79,122,74,0.15)",fg:"#3a5a36",label:"Good match"},safety:{bg:"rgba(74,111,138,0.15)",fg:"#345469",label:"Backup"}};function fp(e){var t,n,r,i,a,s,o;let{u:l,isResearching:u}=e;const c=(l.tier||"").toLowerCase(),d=pp[c],h=Array.isArray(l.highlights)?l.highlights:[],p=Array.isArray(l.gaps)?l.gaps:[],f=Array.isArray(l.scholarships_at_uni)?l.scholarships_at_uni:[],m=d||l.fit_notes||h.length||p.length||f.length||l.department||l.program_length||l.english_min||l.gpa_required||l.official_url;return!m&&u?(0,sd.jsxs)("div",{className:"card","data-testid":"fit-snapshot-loading",style:{padding:"18px 20px"},children:[(0,sd.jsxs)("div",{className:"row",style:{alignItems:"center",gap:10},children:[(0,sd.jsx)(pd.Sparkle,{size:14}),(0,sd.jsx)("span",{style:{fontSize:13},children:"Researching this program for you \u2014 fit notes, costs, requirements\u2026"})]}),(0,sd.jsx)("div",{className:"skeleton-line",style:{marginTop:14}}),(0,sd.jsx)("div",{className:"skeleton-line",style:{marginTop:8,width:"70%"}})]}):m?(0,sd.jsxs)("div",{className:"card","data-testid":"fit-snapshot",style:{padding:"18px 20px"},children:[(0,sd.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:16,flexWrap:"wrap"},children:[(0,sd.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[(0,sd.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)"},children:"Fit snapshot \u2014 tailored to your profile"}),d&&(0,sd.jsx)("span",{style:{background:d.bg,color:d.fg,fontSize:10.5,fontFamily:"var(--font-mono)",letterSpacing:"0.08em",textTransform:"uppercase",padding:"3px 8px",borderRadius:999,fontWeight:600},"data-testid":"tier-".concat(c),children:d.label})]}),l.fit_notes&&(0,sd.jsx)("p",{style:{margin:0,fontSize:14,lineHeight:1.55,color:"var(--ink)"},"data-testid":"fit-notes",children:l.fit_notes})]}),(0,sd.jsxs)("div",{style:{display:"flex",gap:18,flexWrap:"wrap",fontSize:12.5,color:"var(--ink-2)"},children:[l.department&&(0,sd.jsx)(mp,{label:"Dept",v:l.department}),l.program_length&&(0,sd.jsx)(mp,{label:"Length",v:l.program_length}),l.gpa_required&&(0,sd.jsx)(mp,{label:"GPA",v:l.gpa_required}),l.english_min&&(0,sd.jsx)(mp,{label:"English",v:l.english_min})]})]}),(h.length>0||p.length>0||f.length>0)&&(0,sd.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:14,marginTop:14},children:[h.length>0&&(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontSize:11,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:6},children:"Why this program"}),(0,sd.jsx)("ul",{style:{margin:0,paddingLeft:18,fontSize:13,lineHeight:1.5},"data-testid":"highlights-list",children:h.map((e,t)=>(0,sd.jsx)("li",{style:{marginBottom:3},children:e},"h-".concat(t)))})]}),p.length>0&&(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontSize:11,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",color:"#8a3c20",marginBottom:6},children:"To strengthen for a real shot"}),(0,sd.jsx)("ul",{style:{margin:0,paddingLeft:18,fontSize:13,lineHeight:1.5},"data-testid":"gaps-list",children:p.map((e,t)=>(0,sd.jsx)("li",{style:{marginBottom:3},children:e},"g-".concat(t)))})]}),f.length>0&&(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontSize:11,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:6},children:"Internal scholarships"}),(0,sd.jsx)("ul",{style:{margin:0,paddingLeft:18,fontSize:13,lineHeight:1.5},"data-testid":"schols-list",children:f.map((e,t)=>(0,sd.jsx)("li",{style:{marginBottom:3},children:e},"s-".concat(t)))})]})]}),l.official_url&&(0,sd.jsxs)("div",{style:{marginTop:12,display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,sd.jsx)("a",{href:l.official_url,target:"_blank",rel:"noopener noreferrer",className:"btn btn-sm btn-ghost","data-testid":"official-program-link",style:{textDecoration:"none"},children:"Official program page \u2192"}),(0,sd.jsx)(Ih,{status:"verified"===(null===(t=l.verification)||void 0===t||null===(n=t.official_url)||void 0===n?void 0:n.status)?"verified":"unverified",source:(null===(r=l.verification)||void 0===r||null===(i=r.official_url)||void 0===i?void 0:i.source_url)||l.official_url,checkedAt:(null===(a=l.verification)||void 0===a||null===(s=a.official_url)||void 0===s?void 0:s.fetched_at)||(null===(o=l.verification)||void 0===o?void 0:o.checked_at)}),(0,sd.jsx)("span",{className:"muted",style:{fontSize:11},children:"(link only \u2014 figures verified separately)"})]})]}):null}function mp(e){let{label:t,v:n}=e;return(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontSize:10,fontFamily:"var(--font-mono)",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)"},children:t}),(0,sd.jsx)("div",{style:{fontWeight:600,marginTop:2},children:n})]})}function gp(e){var t,n,r;let{draft:i}=e;const[s,o]=(0,a.useState)(!1),l=!(null!==i&&void 0!==i&&null!==(t=i.body)&&void 0!==t&&t.trim())&&!(null!==i&&void 0!==i&&null!==(n=i.subject)&&void 0!==n&&n.trim())&&!(null!==i&&void 0!==i&&null!==(r=i.to)&&void 0!==r&&r.trim());return(0,sd.jsxs)("button",{type:"button",className:"btn btn-sm copy-btn ".concat(s?"copied":""),onClick:async()=>{const e="To: ".concat(i.to||"","\n")+"Subject: ".concat(i.subject||"","\n")+"\n".concat(i.body||"");try{var t;if(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText)await navigator.clipboard.writeText(e);else{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}o(!0),setTimeout(()=>
2o(!1),1800)}catch(n){console.error("[email] copy failed:",n)}},disabled:l,title:"Copy recipient, subject and body in one go","data-testid":"email-copy-btn",children:[(0,sd.jsx)(pd.Copy,{size:12})," ",s?"Copied":"Copy email"]})}const vp=["Application","Essay/SOP","Test (IELTS/GRE)","Reference","Scholarship","Document"];function yp(e){if(!e)return e;let t=String(e).trim();for(let n=0;n<3;n++){const e=t,n=t.match(/^\[([^]+)\]$/)||t.match(/^\(([^]+)\)$/)||t.match(/^"([^]+)"$/)||t.match(/^'([^]+)'$/)||t.match(/^`([^]+)`$/)||t.match(/^\u201C([^]+)\u201D$/)||t.match(/^\u2018([^]+)\u2019$/);if(n&&(t=n[1].trim()),t===e)break}return t}function Dp(e){if(Array.isArray(e.tags)&&e.tags.length)return e.tags.filter(e=>vp.includes(e));const t="".concat(e.title||""," ").concat(e.src||"").toLowerCase();return e.scholarship_id||/scholarship|chevening|fulbright|aga khan|inlaks|funding|grant|bursary/.test(t)?["Scholarship"]:/\bsop\b|statement of purpose|personal statement|\bessay/.test(t)?["Essay/SOP"]:/ielts|toefl|\bgre\b|gmat|\bsat\b|duolingo|english (test|proficiency)|\btest\b|\bexam\b/.test(t)?["Test (IELTS/GRE)"]:/recommendation|reference|\blor\b|recommender|referee/.test(t)?["Reference"]:/transcript|passport|\bcv\b|resume|portfolio|certificate|upload|financial|bank statement|\bdocument/.test(t)?["Document"]:/appl|submit|deadline|portal|\bform\b|register|enroll|common app/.test(t)?["Application"]:[]}function bp(e){if(!e)return{date:null,label:"",isToday:!1,isUpcoming:!1,isOverdue:!1};const t=String(e).trim(),n=t.toLowerCase(),r=new Date;if(r.setHours(0,0,0,0),"today"===n)return{date:r,label:"Today",isToday:!0,isOverdue:!1};if("tomorrow"===n){const e=new Date(r);return e.setDate(e.getDate()+1),{date:e,label:"Tomorrow",isUpcoming:!0}}let i=null;const a=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(a)i=new Date(Number(a[1]),Number(a[2])-1,Number(a[3]));else{const e=/\b\d{4}\b/.test(t),n=new Date(e?t:"".concat(t," ").concat(r.getFullYear()));isNaN(n.getTime())||(i=n)}if(!i||isNaN(i.getTime()))return{date:null,label:t.length<=16?t:"",isUpcoming:!0,freeform:!0};i.setHours(0,0,0,0);const s=Math.round((i-r)/864e5),o=0===s?"Today":1===s?"Tomorrow":i.toLocaleDateString(void 0,{month:"short",day:"numeric"});return{date:i,label:o,isToday:0===s,isOverdue:s<0,isUpcoming:s>0}}function xp(e){const t=bp(e.due);return t.date?t.date.getTime():t.freeform?Number.MAX_SAFE_INTEGER-1:Number.MAX_SAFE_INTEGER}function Cp(e){const t=bp(e.due);if(t.isOverdue)return"overdue";if(!t.date&&!t.freeform)return"someday";if(t.date){const e=new Date;e.setHours(0,0,0,0);const n=Math.round((t.date-e)/864e5);if(n<=7)return"week";if(n<=14)return"next"}return"later"}const Fp=[{key:"overdue",label:"Overdue",over:!0},{key:"week",label:"This week"},{key:"next",label:"Next week"},{key:"later",label:"Later"},{key:"someday",label:"No date yet"}];function _p(e){let{go:t}=e;const{tasks:n,universities:r,addTask:i,updateTask:s,deleteTask:o}=hd(),l=Lh(),[c,d]=(0,a.useState)(""),[h,p]=(0,a.useState)("all"),[f,m]=(0,a.useState)("all"),[g,v]=(0,a.useState)(!1),y=e=>!(c&&!"".concat(e.title||"").toLowerCase().includes(c.toLowerCase()))&&(("all"===h||e.uni_id===h||e.uni===(e=>{var t;return null===(t=r.find(t=>t.id===e))||void 0===t?void 0:t.name})(h))&&!("all"!==f&&!Dp(e).includes(f))),D=(0,a.useMemo)(()=>n.filter(e=>!e.done&&y(e)).sort((e,t)=>xp(e)-xp(t)),[n,c,h,f]),b=(0,a.useMemo)(()=>n.filter(e=>e.done&&y(e)),[n,c,h,f]),x=(0,a.useMemo)(()=>{const e={};return Fp.forEach(t=>e[t.key]=[]),D.forEach(t=>e[Cp(t)].push(t)),e},[D]),C=e=>{let{t:n}=e;const i=bp(n.due),a=r.find(e=>e.id===n.uni_id||e.name===n.uni),u=Dp(n).includes("Scholarship"),c=(e=>{const n="".concat(e.title||""," ").concat(e.src||"").toLowerCase();if(Dp(e).includes("Scholarship"))return{label:"Open",fn:()=>t&&t("scholarships")};if(e.ai_suggested||/email|reply|outreach|recommend|professor|reach out/.test(n)){const n=r.find(t=>t.id===e.uni_id||t.name===e.uni);return{label:"Draft",fn:()=>t&&t("chat",{mode:"email",ctx:{uni:null===n||void 0===n?void 0:n.name,program:null===n||void 0===n?void 0:n.program}})}}return e.uni_id?{label:"Open",fn:()=>t&&t("detail",e.uni_id)}:null})(n),d=i.isOverdue||i.isToday||"week"===Cp(n);return(0,sd.jsxs)("div",{className:"trow ".concat(n.done?"done":""),"data-testid":"task-row-".concat(n.id),children:[(0,sd.jsx)("div",{className:"chk",onClick:()=>(e=>s(e.id,{done:!e.done}))(n),"data-testid":"task-checkbox-".concat(n.id),children:(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",children:(0,sd.jsx)("path",{d:"m5 12 5 5L20 6"})})}),(0,sd.jsxs)("div",{className:"tt",children:[(0,sd.jsx)("b",{children:y
2p(n.title)}),(0,sd.jsxs)("div",{className:"src",children:[(a||u)&&(0,sd.jsxs)("span",{className:"utag",children:[(0,sd.jsx)("span",{className:"d",style:{background:u&&!a?"var(--ok)":"var(--ink)"}}),a?a.short||a.name:"Scholarship"]}),n.src&&"Manual"!==n.src?(0,sd.jsx)("span",{children:n.src}):null]})]}),i.label&&(0,sd.jsx)("span",{className:"tdue vmono ".concat(d?"soon":""),"data-testid":"task-due-".concat(n.id),children:i.label}),c&&(0,sd.jsx)("span",{className:"tact",onClick:c.fn,"data-testid":"task-action-".concat(n.id),children:c.label}),(0,sd.jsxs)("span",{className:"tact tact-vidhya",title:"Work with Vidhya",onClick:()=>{const e=(Array.isArray(n.subtasks)?n.subtasks:[]).map(e=>"".concat(e.done?"\u2713":"\u2022"," ").concat(yp(e.title))),r='Help me work through my task: "'.concat(yp(n.title),'".')+(e.length?"\n\nHere are the subtasks:\n".concat(e.join("\n")):"")+"\n\nWhat should I tackle first, and how should I approach it?";t&&t("chat",{mode:"menu",ctx:{task_id:n.id,task_title:n.title,uni:null===a||void 0===a?void 0:a.name,program:null===a||void 0===a?void 0:a.program},options:{inputPreset:r}})},"data-testid":"task-vidhya-".concat(n.id),children:[(0,sd.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{marginRight:4},children:(0,sd.jsx)("path",{d:"M12 3v3M12 18v3M5 12H2M22 12h-3M6 6l2 2M16 16l2 2M18 6l-2 2M8 16l-2 2"})}),"Work with Vidhya"]}),(0,sd.jsx)("span",{className:"tdel",onClick:()=>(async e=>{await l({title:"Delete task?",message:'"'.concat(yp(e.title),'" will be removed.'),confirmLabel:"Delete",danger:!0})&&await o(e.id)})(n),title:"Delete","data-testid":"task-delete-".concat(n.id),children:(0,sd.jsx)(pd.Trash,{size:14})})]})},F=D.length;return(0,sd.jsxs)("div",{className:"vwrap vtasks","data-testid":"tasks-view",children:[(0,sd.jsxs)("div",{className:"vphead",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"ptitle",children:"Task command center"}),(0,sd.jsxs)("div",{className:"psub",children:["Everything across all ",r.length," universities, in one place \u2014 what to do, and when."]})]}),(0,sd.jsxs)("button",{className:"vp-cta",onClick:()=>t&&t("chat",{mode:"todo"}),"data-testid":"tasks-ask-vidhya",children:[(0,sd.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M12 3v3M12 18v3M5 12H2M22 12h-3M6 6l2 2M16 16l2 2M18 6l-2 2M8 16l-2 2"})}),"Ask Vidhya what to prioritize"]})]}),(0,sd.jsx)(kp,{universities:r,onAdd:e=>i((0,u.A)((0,u.A)({},e),{},{src:"Manual",priority:"med"}))}),(0,sd.jsxs)("div",{className:"tcfilters",children:[(0,sd.jsxs)("div",{className:"searchbar",children:[(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,sd.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,sd.jsx)("path",{d:"m20 20-3.4-3.4"})]}),(0,sd.jsx)("input",{placeholder:"Search tasks\u2026",value:c,onChange:e=>d(e.target.value),"data-testid":"tasks-search"})]}),(0,sd.jsxs)("select",{className:"tcsel",value:h,onChange:e=>p(e.target.value),"data-testid":"tasks-filter-uni",children:[(0,sd.jsx)("option",{value:"all",children:"All universities"}),r.map(e=>(0,sd.jsx)("option",{value:e.id,children:e.short||e.name},e.id))]}),(0,sd.jsxs)("select",{className:"tcsel",value:f,onChange:e=>m(e.target.value),"data-testid":"tasks-filter-tag",children:[(0,sd.jsx)("option",{value:"all",children:"All types"}),vp.map(e=>(0,sd.jsx)("option",{value:e,children:e},e))]})]}),0===F&&(0,sd.jsx)("div",{className:"vempty",style:{background:"var(--surface)",border:"1px solid var(--line)",borderRadius:"var(--radius-card)",padding:30},"data-testid":"tasks-empty",children:c||"all"!==h||"all"!==f?"No tasks match your filters.":"You're all caught up. Nice."}),Fp.map(e=>x[e.key].length>0&&(0,sd.jsxs)("div",{className:"tgroup","data-testid":"task-group-".concat(e.key),children:[(0,sd.jsxs)("div",{className:"tgh ".concat(e.over?"over":""),children:[(0,sd.jsx)("b",{children:e.label}),(0,sd.jsx)("span",{className:"tc",children:x[e.key].length})]}),x[e.key].map(e=>(0,sd.jsx)(C,{t:e},e.id))]},e.key)),b.length>0&&(0,sd.jsxs)("div",{className:"tgroup","data-testid":"task-group-completed",children:[(0,sd.jsxs)("div",{className:"tgh",style:{cursor:"pointer"},onClick:()=>v(e=>!e),"data-testid":"tasks-toggle-completed",children:[(0,sd.jsx)("b",{style:{color:"var(--slate)"},children:"Completed"}),(0,sd.jsx)("span",{className:"tc",children:b.length}),(0,sd.jsx)("span",{style:{marginLeft:"auto",fontSize:12,color:"var(--indigo)",fontWeight:700},children:g?"Hide":"Show"})]}),g&&b.map(e=>(0,sd.jsx)(C,{t:e},e.id))]})]})}function kp(e){let{universities:t,onAdd:n}=e;const[r,i]=(0,a.useState)(""),[s,o]=(0,a.useState)(""),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(""),[h,p]=(0,a.useState)(!1),f=(0,a.useRef)(null),m=async()=>{const e=r.trim();if(!e||h)return;p(!0);const a=t.find(e=>e.id===c);try{await n({title:e,due:s||"",tags:l?[l]:[],uni:a?a.name:"All applications",uni_id:a?a.id:null}),i(""),o(""),d(""),u(""),f.current&&f.current.focus()}finally{p(!1)}};return(0,sd.jsxs)("div",{className:"tcadd","data-testid":"tc-add-task",children:[(0,sd.jsx)("input",{ref:f,className:"tcadd-input",placeholder:"Add a task\u2026",value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&m()},"data-testid":"tc-add-task-input"}),(0,sd.jsx)("input",{className:"tcadd-date",type:"date",value:s,onChange:e=>o(e.target.value),"data-testid":"tc-add-due"}),(0,sd.jsxs)("select",{className:"tcsel",value:c,onChange:e=>d(e.target.value),"data-testid":"tc-add-uni",children:[(0,sd.jsx)("option",{value:"",children:"No university"}),t.map(e=>(0,sd.jsx)("option",{value:e.id,children:e.short||e.name},e.id))]}
2),(0,sd.jsxs)("select",{className:"tcsel",value:l,onChange:e=>u(e.target.value),"data-testid":"tc-add-tag",children:[(0,sd.jsx)("option",{value:"",children:"No type"}),vp.map(e=>(0,sd.jsx)("option",{value:e,children:e},e))]}),(0,sd.jsxs)("button",{className:"tcadd-btn",onClick:m,disabled:!r.trim()||h,"data-testid":"tc-add-task-submit",children:[(0,sd.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:(0,sd.jsx)("path",{d:"M12 5v14M5 12h14"})}),"Add"]})]})}const wp=e=>{let{s:t=13}=e;return(0,sd.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,sd.jsx)("path",{d:"M20 6 9 17l-5-5"})})},Ep=e=>{let{s:t=13}=e;return(0,sd.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",children:(0,sd.jsx)("path",{d:"M12 1.5l1.9 6.1 6.1 1.9-6.1 1.9L12 17.5l-1.9-6.1L4 9.5l6.1-1.9z"})})};function jp(e){var t;let{go:n}=e;const{scholarships:r,addScholarship:i,updateScholarship:s,deleteScholarship:o,universities:l,profile:c,refresh:d}=hd(),{user:h}=ud(),p=!(null===h||void 0===h||null===(t=h.plan_summary)||void 0===t||!t.is_navigator),f=Lh(),[m,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(""),[D,b]=(0,a.useState)(""),[x,C]=(0,a.useState)(""),[F,_]=(0,a.useState)("all"),[k,w]=(0,a.useState)({citizenship:(null===c||void 0===c?void 0:c.citizenship)||(null===c||void 0===c?void 0:c.student_country)||"",student_country:(null===c||void 0===c?void 0:c.student_country)||(null===c||void 0===c?void 0:c.citizenship)||"",student_level:(null===c||void 0===c?void 0:c.intended_level)||"",program:(null===c||void 0===c?void 0:c.intended_major)||"",intake_term:(null===c||void 0===c?void 0:c.intake_term)||"",budget_need:(null===c||void 0===c?void 0:c.funding_need)||"partial",fields_of_study:((null===c||void 0===c?void 0:c.strongest_subjects)||[]).join(", ")||"",keywords:"",notes:""});(0,a.useEffect)(()=>{try{const e=sessionStorage.getItem("vidhya_schol_prefill");if(e){const{keywords:t,notes:n}=JSON.parse(e);w(e=>(0,u.A)((0,u.A)({},e),{},{keywords:t||e.keywords,notes:n||e.notes})),t&&b(t),sessionStorage.removeItem("vidhya_schol_prefill")}}catch(Lt){}},[]);const E=async()=>{g(!0),y(""),C("researching");try{const e=l.map(e=>e.name),t=(0,u.A)((0,u.A)({},k),{},{keywords:D||k.keywords,fields_of_study:k.fields_of_study?k.fields_of_study.split(",").map(e=>e.trim()).filter(Boolean):[],target_universities:e}),{data:n}=await ad.http.post("/ai/find-scholarships/start",t),r=n.job_id,i=Date.now()+12e4;for(;Date.now()<i;){await new Promise(e=>setTimeout(e,3e3));const{data:e}=await ad.http.get("/ai/find-scholarships/status/".concat(r));if("researching"!==e.status&&"verifying"!==e.status){if("ready"===e.status){await d(),b("");break}if("error"===e.status){y(e.error||"Scholarship search failed");break}}else C(e.status)}}catch(Lt){y((0,ad.K)(Lt))}finally{g(!1),C("")}},j=r.filter(e=>!(D&&!"".concat(e.name||""," ").concat(e.provider||e.uni||"").toLowerCase().includes(D.toLowerCase()))&&("saved"===F?e.saved:"verified"===F?e.verified:!e.saved)),A=r.filter(e=>e.saved).length,S={tuition:"Tuition",stipend:"Stipend",living:"Living",travel:"Travel",books:"Books",insurance:"Insurance",partial:"Partial",full:"Full ride",fees:"Fees"},N=e=>{const t=e.amount||"";return t&&/\d|\$|\xa3|\u20ac|full|ride|varies/i.test(t)?t:"Varies"},B=e=>{let{s:t}=e;const n=(e=>(e.coverage||("string"!==typeof e.amount||/\d|\$|\xa3|\u20ac|varies/i.test(e.amount)?"":e.amount)||"").split(/[+,/]|\band\b|\xb7|\|/i).map(e=>e.trim().toLowerCase()).filter(Boolean).map(e=>S[e]||e.charAt(0).toUpperCase()+e.slice(1)).filter((e,t,n)=>e&&n.indexOf(e)===t).slice(0,4))(t),r=t.confidence||(t.verified?"verified":"found"),i=!0===t.amount_verified,[l,u]=(0,a.useState)(!1),c=t.url||t.explore_url||"https://www.google.com/search?q=".concat(encodeURIComponent("".concat(t.name," ").concat(t.provider||t.uni||""," scholarship")));return(0,sd.jsxs)("div",{className:"schcard","data-testid":"schol-card-".concat(t.id),children:[(0,sd.jsxs)("div",{className:"amt",children:[(0,sd.jsxs)("span",{className:"amt-fig",style:i?{display:"inline-flex",alignItems:"center",gap:4,color:"var(--green, #788c5d)"}:void 0,children:[i&&(0,sd.jsx)(wp,{s:12}),N(t)]}),(0,sd.jsx)("span",{className:"amt-cap",children:i?"Award \xb7 verified":"Est. award"})]}),(0,sd.jsxs)("div",{className:"si",children:[(0,sd.jsx)("b",{children:t.name}),(0,sd.jsxs)("div",{className:"sm",children:[t.match&&(0,sd.jsxs)("span",{className:"matchbar",children:[(0,sd.jsx)(Ep,{s:12}),t.match,"number"===typeof t.match?"% match":""]}),t.deadline&&(0,sd.jsxs)("span",{children:["Deadline ",t.deadline]}),t.provider||t.uni?(0,sd.jsx)("span",{children:t.provider||t.uni}):null,"verified"===r?(0,sd.jsxs)("span",{className:"vbadge","data-testid":"schol-badge-".concat(t.id),children:[(0,sd.jsx)(wp,{s:12}),"verified"]}):(0,sd.jsx)("span",{className:"vbadge unv","data-testid":"schol-badge-".concat(t.id),children:"confirm on site"})]}),n.length>0&&(0,sd.jsx)("div",{className:"covrow","data-testid":"schol-coverage-".concat(t.id),children:n.map(e=>(0,sd.jsxs)("span",{className:"covpill",children:[(0,sd.jsx)("span",{className:"cd"}),e]},e))})]}),(0,sd.jsxs)("div",{className:"sa",children:[(0,sd.jsx)("button",{className:"saveb ".concat(t.saved?"saved":""),onClick:()=>(async e=>{var t;const n=!e.saved;if(await s(e.id,{saved:n}),n&&(null!==(t=e.docs_required)&&void 0!==t&&t.length||e.deadline)&&await f({title:"Add a reminder task?",message:'Add "'.concat(e.name,'" to your Task Center with a deadline reminder?'),confirmLabel:"Add task"}))try{await ad.http.post("/scholarships/".concat(e.id,"/seed-tasks")),await d()}catch(Lt){}})(t),"data-testid":"schol-save-".concat(t.id),children:t.saved?(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)(wp,{s:13}),"Saved"]}):"Save"}),(0,sd.jsx)("a",{className:"schol-open",href:c,target:"_blank",rel:"noreferrer","data-testid":"schol-apply-".concat(t.id),children:"Open \u2197"}),(0,sd.jsx)("button",{className:"schol-del",onClick:async()=>
2{if(await f({title:"Remove scholarship?",message:'Remove "'.concat(t.name,'" from your list?'),confirmLabel:"Remove",danger:!0})){u(!0);try{await o(t.id)}catch(Lt){console.warn("delete scholarship failed",Lt),u(!1)}}},disabled:l,"data-testid":"schol-delete-".concat(t.id),title:"Remove scholarship","aria-label":"Remove ".concat(t.name),children:l?"\u2026":"Delete"})]})]})};return(0,sd.jsxs)("div",{className:"vwrap vschol","data-testid":"scholarships-view",children:[(0,sd.jsx)("div",{className:"ptitle",children:"Scholarships"}),(0,sd.jsx)("div",{className:"psub",style:{marginBottom:18},children:"Search, match to your profile, and save the ones worth chasing."}),r.length>0&&(0,sd.jsxs)("div",{className:"schbanner","data-testid":"schol-banner",children:[(0,sd.jsx)("div",{className:"sbi",children:(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,sd.jsx)("circle",{cx:"12",cy:"8",r:"6"}),(0,sd.jsx)("path",{d:"M8 14l-1 8 5-3 5 3-1-8"})]})}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("b",{children:"Don't let cost stop you."}),(0,sd.jsx)("br",{}),(0,sd.jsxs)("span",{children:["Vidhya found ",r.length," scholarship",1===r.length?"":"s"," tied to your list \u2014 save the ones worth chasing and we'll remind you."]})]})]}),!p&&(0,sd.jsxs)("div",{className:"explorer-board-banner","data-testid":"schol-explorer-banner",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("strong",{children:"Explorer \xb7 basic scholarship search"}),(0,sd.jsx)("p",{children:"Navigator unlocks personalised matching across govt, foundation and university funds, tuned to your profile."})]}),(0,sd.jsx)(Fh,{feature:ch.SCHOLARSHIPS,context:"schol_banner",label:"Unlock matching",size:"sm",testid:"schol-banner-upgrade-btn"})]}),(0,sd.jsxs)("div",{className:"schtop",children:[(0,sd.jsxs)("div",{className:"searchbar",children:[(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,sd.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,sd.jsx)("path",{d:"m20 20-3.4-3.4"})]}),(0,sd.jsx)("input",{placeholder:"Search scholarships \u2014 by country, field, or amount\u2026",value:D,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E()},"data-testid":"schol-search"})]}),(0,sd.jsxs)("button",{className:"vp-cta",onClick:E,disabled:m,"data-testid":"schol-scan-btn",style:{borderRadius:13},children:[(0,sd.jsx)(Ep,{s:15}),m?"verifying"===x?"Verifying sources\u2026":"researching"===x?"Researching funds\u2026":"Searching\u2026":"Find with Vidhya"]})]}),(0,sd.jsxs)("div",{className:"filt",style:{marginBottom:18},children:[(0,sd.jsx)("button",{className:"fbtn ".concat("all"===F?"on":""),onClick:()=>_("all"),"data-testid":"schol-filter-all",children:"All"}),(0,sd.jsxs)("button",{className:"fbtn ".concat("saved"===F?"on":""),onClick:()=>_("saved"),"data-testid":"schol-filter-saved",children:["Saved",A>0?" (".concat(A,")"):""]}),(0,sd.jsx)("button",{className:"fbtn ".concat("verified"===F?"on":""),onClick:()=>_("verified"),"data-testid":"schol-filter-verified",children:"Verified"})]}),v&&(0,sd.jsx)("div",{className:"berr","data-testid":"schol-error",style:{color:"var(--warn)",fontWeight:600,marginBottom:12},children:v}),0===r.length&&!m&&(0,sd.jsx)("div",{className:"vempty",style:{background:"var(--surface)",border:"1px solid var(--line)",borderRadius:"var(--radius-card)",padding:34},"data-testid":"schol-empty",children:"No scholarships yet. Search above and Vidhya will match funding to your profile and university list."}),j.length>0&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"sec-h",children:[(0,sd.jsx)("h3",{children:"saved"===F?"Saved & stored":"verified"===F?"Verified":"Matched for you"}),(0,sd.jsxs)("span",{className:"mt",children:[j.length," result",1===j.length?"":"s","saved"===F?" \xb7 synced to your aid plan":"all"===F?" \xb7 live":""]})]}),j.map(e=>(0,sd.jsx)(B,{s:e},e.id))]}),r.length>0&&0===j.length&&!m&&(0,sd.jsx)("div",{className:"vempty",style:{background:"var(--surface)",border:"1px solid var(--line)",borderRadius:"var(--radius-card)",padding:34},"data-testid":"schol-filter-empty",children:"saved"===F?"No saved scholarships yet. Tap \u201cSave\u201d on any match to keep it here.":"verified"===F?"No verified scholarships yet. Verified awards confirmed against the official source will appear here.":"No scholarships match your search. Try a different keyword or run a new search."})]})}const Ap=[{key:"academic",label:"Academic",eyebrow:"01 \u2014 Academic foun
2dation",fields:[{key:"academic_stage",label:"Academic stage",type:"select",options:["","High School - Junior","High School - Senior","Undergraduate - 1st Year","Undergraduate - 2nd Year","Undergraduate - 3rd Year","Undergraduate - 4th Year","Graduate - 1st Year","Graduate - 2nd Year"]},{key:"board",label:"Board / curriculum",type:"select",options:["","CBSE","ICSE","IB Diploma","A-Levels","SLC + 12","High School Diploma (US)","Other"]},{key:"gpa",label:"GPA / %",type:"text",placeholder:"e.g. 3.8 / 85%"},{key:"predicted_grades",label:"Predicted grades",type:"text",placeholder:"e.g. AAA / 42 points"},{key:"last_academic_subject_taken",label:"Last academic subject taken",type:"text",placeholder:"e.g. AP Calculus, A-Level Physics"},{key:"strongest_subjects",label:"Strongest subjects",type:"tags",placeholder:"e.g. Math, CS, Physics"}]},{key:"target",label:"Target & direction",eyebrow:"02 \u2014 Where you're headed",fields:[{key:"intended_degree_level",label:"Degree level",type:"select",options:["","Bachelors","Masters","PhD"]},{key:"intended_major",label:"Intended major",type:"text",placeholder:"e.g. Computer Science"},{key:"backup_fields",label:"Backup fields",type:"tags",placeholder:"e.g. Data Science, Econ"},{key:"target_countries",label:"Target countries",type:"tags",placeholder:"e.g. United States, Canada"},{key:"intake_term",label:"Target intake",type:"select",options:["","Fall 2026","Spring 2027","Fall 2027","Spring 2028"]}]},{key:"finance",label:"Financial",eyebrow:"03 \u2014 How you'll fund it",fields:[{key:"budget",label:"Budget",type:"select",options:["","Need full scholarship","Up to $20,000 / year","$20,000 \u2013 $40,000 / year","$40,000 \u2013 $70,000 / year","Budget is not a constraint"]},{key:"funding_need",label:"Funding need",type:"select",options:["","self","partial","full","loan"]}]},{key:"tests",label:"Test scores",eyebrow:"04 \u2014 Language & standardized tests",fields:[{key:"english_test",label:"English test",type:"select",options:["","IELTS","TOEFL","Duolingo","PTE","Waived","Not yet taken"]},{key:"english_score",label:"English score",type:"text",placeholder:"e.g. 7.5 / 110"},{key:"english_test_date",label:"English test date",type:"text",placeholder:"e.g. Mar 2026"},{key:"sat_score",label:"SAT",type:"text",placeholder:"e.g. 1480"},{key:"act_score",label:"ACT",type:"text",placeholder:"e.g. 32"},{key:"gre_score",label:"GRE",type:"text",placeholder:"e.g. 325"},{key:"gmat_score",label:"GMAT",type:"text",placeholder:"e.g. 710"}]},{key:"profile_signals",label:"Your story",eyebrow:"05 \u2014 What makes you, you",fields:[{key:"research_experience",label:"Research experience",type:"textarea",placeholder:"Labs, papers, projects\u2026"},{key:"internships",label:"Internships",type:"textarea",placeholder:"Companies, roles, duration"},{key:"extracurriculars",label:"Extracurriculars",type:"textarea",placeholder:"Clubs, volunteering, arts\u2026"},{key:"leadership",label:"Leadership",type:"textarea",placeholder:"Roles, teams led, outcomes"}]},{key:"preferences",label:"Preferences & constraints",eyebrow:"06 \u2014 What Vidhya should keep in mind",fields:[{key:"preferences",label:"Preferences",type:"textarea",placeholder:"e.g. Research-heavy programs, cities, climate\u2026"},{key:"constraints",label:"Constraints",type:"textarea",placeholder:"e.g. Diet, family, single-gender, visa history\u2026"}]},{key:"geo",label:"Geography",eyebrow:"07 \u2014 Where you're coming from",fields:[{key:"student_country",label:"Home country",type:"country",placeholder:"e.g. Nepal"},{key:"country_of_citizenship",label:"Country of citizenship",type:"country",placeholder:"e.g. Nepal"}]}];function Sp(){var e,t;const{user:n}=ud(),{profile:r,completeness:i,gmail:s,updateProfile:o,refresh:l,connectGmail:c,disconnectGmail:d}=hd(),h=Lh(),p=!(null===n||void 0===n||null===(e=n.plan_summary)||void 0===e||!e.is_navigator),[f,m]=(0,a.useState)({}),[g,v]=(0,a.useState)(!1),[y,D]=(0,a.useState)(""),[b,x]=(0,a.useState)(null),[C,F]=(0,a.useState)("");(0,a.useEffect)(()=>{const e=r||{},t=(0,u.A)({name:(null===n||void 0===n?void 0:n.name)||""},e);!t.intended_degree_level&&e.intended_level&&(t.intended_degree_level={undergraduate:"Bachelors",masters:"Masters",phd:"PhD"}[String(e.intended_level).toLowerCase()]||""),!t.academic_stage&&/high school|undergrad|graduate/i.test(e.grade_level||"")&&(t.academic_stage=e.grade_level),m(t)},[r,n]);const _=(e,t)=>
2m(n=>(0,u.A)((0,u.A)({},n),{},{[e]:t})),k=null!==(t=null===i||void 0===i?void 0:i.percent)&&void 0!==t?t:0,w=251-251*k/100,E=[{key:"academic",label:"Academic info",ok:!(!f.gpa&&!f.predicted_grades)},{key:"english",label:"English test",ok:!(!f.english_test||"Not yet taken"===f.english_test)},{key:"major",label:"Intended major",ok:!!f.intended_major},{key:"country",label:"Home country",ok:!!f.student_country},{key:"sat_score",label:"SAT score",ok:!!f.sat_score},{key:"extracurriculars",label:"Extracurriculars",ok:!!f.extracurriculars}];return(0,sd.jsxs)("div",{className:"vwrap vprofile","data-testid":"profile-view",children:[(0,sd.jsx)("div",{className:"ptitle",children:"Your profile"}),(0,sd.jsx)("div",{className:"psub",children:"The more Vidhya knows, the sharper your advice, fit scores, and autofill get."}),y&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"profile-error",style:{marginBottom:14},children:y}),(0,sd.jsxs)("div",{className:"pcols",children:[(0,sd.jsx)("div",{children:(0,sd.jsxs)("div",{className:"pcard2","data-testid":"profile-completeness",children:[(0,sd.jsxs)("div",{className:"pmeter",children:[(0,sd.jsxs)("div",{className:"pring",children:[(0,sd.jsxs)("svg",{width:"96",height:"96",viewBox:"0 0 96 96",children:[(0,sd.jsx)("circle",{cx:"48",cy:"48",r:"40",fill:"none",stroke:"var(--indigo-50)",strokeWidth:"9"}),(0,sd.jsx)("circle",{cx:"48",cy:"48",r:"40",fill:"none",stroke:"var(--lemon)",strokeWidth:"9",strokeLinecap:"round",strokeDasharray:251,strokeDashoffset:w})]}),(0,sd.jsxs)("span",{className:"pp",children:[k,"%"]})]}),(0,sd.jsx)("h4",{children:"Profile strength"}),(0,sd.jsxs)("p",{children:[(null===i||void 0===i?void 0:i.core_filled)||0,"/",(null===i||void 0===i?void 0:i.core_total)||10," core slots filled. ",k<100?"Add the missing pieces to sharpen every match.":"Your profile is in great shape."]})]}),(0,sd.jsx)("div",{className:"pcompl",children:E.map(e=>(0,sd.jsxs)("div",{className:"pc ".concat(e.ok?"ok":"todo"),"data-testid":"profile-core-".concat(e.key),children:[e.ok?(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,sd.jsx)("path",{d:"M20 6 9 17l-5-5"})}):(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("circle",{cx:"12",cy:"12",r:"9"})}),e.label]},e.key))}),(0,sd.jsxs)("p",{className:"muted",style:{fontSize:12.5,lineHeight:1.55,marginTop:14,marginBottom:0},"data-testid":"profile-fill-hint",children:["Fill in your details on the right and hit ",(0,sd.jsx)("strong",{children:"Save profile"})," \u2014 Vidhya uses them to sharpen your advice and matches."]})]})}),(0,sd.jsxs)("div",{className:"profile-grid",style:{display:"block"},children:[(0,sd.jsxs)("div",{className:"profile-identity","data-testid":"profile-identity",style:{marginBottom:16},children:[(0,sd.jsx)("div",{className:"avatar-lg",children:(f.name||(null===n||void 0===n?void 0:n.email)||"?").split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase()}),(0,sd.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,sd.jsx)("label",{className:"p-label",children:"Full name"}),(0,sd.jsx)("input",{className:"input",value:f.name||"",onChange:e=>_("name",e.target.value),placeholder:"Your full name","data-testid":"profile-name-input"}),(0,sd.jsx)("div",{className:"p-email",children:null===n||void 0===n?void 0:n.email})]})]}),Ap.map(e=>!p&&["tests","profile_signals","preferences"].includes(e.key)?(0,sd.jsx)(Rh,{feature:ch.FULL_PROFILE,context:"profile_section_".concat(e.key),title:e.label,description:"Vidhya uses these signals to sharpen every advisor reply, email draft, and match. Unlock with Navigator.",ctaLabel:"Unlock with Navigator",testid:"profile-locked-".concat(e.key),children:(0,sd.jsx)("div",{style:{padding:6},children:(0,sd.jsx)("div",{className:"eyebrow",children:e.eyebrow})})},e.key):(0,sd.jsxs)("div",{className:"profile-section","data-testid":"profile-section-".concat(e.key),style:{marginBottom:16},children:[(0,sd.jsxs)("div",{className:"p-section-head",children:[(0,sd.jsx)("div",{className:"eyebrow",children:e.eyebrow}),(0,sd.jsx)("h3",{className:"p-section-title",children:e.label})]}),(0,sd.jsx)("div",{className:"p-fields",children:e.fields.map(e=>(0,sd.jsx)(Np,{field:e,value:f[e.key],onChange:t=>_(e.key,t)},e.key))})]},e.key)),(0,sd.jsxs)("div",{className:"pcard2","data-testid":"profile-data-honesty",style:{marginBottom:16},children:[(0,sd.jsx)("h3",{className:"p-section-title",style:{marginBottom:14},children:"Your data, the honest version"}),(0,sd.jsxs)("div",{className:"stored",children:[(0,sd.jsxs)("div",{className:"storecol yes",children:[(0,sd.jsxs)("h5",{children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,sd.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Vidhya stores"]}),(0,sd.jsxs)("ul",{children:[(0,sd.jsx)("li",{children:"\u2022 Academic info & test scores"}),(0,sd.jsx)("li",{children:"\u2022 Your documents & essay drafts"}),(0,sd.jsx)("li",{children:"\u2022 Reusable autofill answers"}),(0,sd.jsx)("li",{children:"\u2022 Email drafts (synced to Gmail)"})]})]}),(0,sd.jsxs)("div",{className:"storecol no",children:[(0,sd.jsxs)("h5",{children:[(0,sd.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,sd.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})}),"Never stored"]}),(0,sd.jsxs)("ul",{children:[(0,sd.jsx)("li",{children:"\u2022 Passport & national ID numbers"}),(0,sd.jsx)("li",{children:"\u2022 Bank / proof-of-funds amounts"}),(0,sd.jsx)("li",{children:"\u2022 University portal passwords"}),(0,sd.jsx)("li",{children:"\u2192 You enter these in the portal yourself"})]})]})]})]}),(0,sd.jsxs)("div",{className:"profile-section gmail-card","data-testid":"profile-gmail-card",style:{marginBottom:16},children:[(0,sd.jsxs)("div",{className:"p-section-head",children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Integration \xb7 Gmail"}),(0,sd.jsxs)("h3",{className:"p-section-title",children:["Connect your ",(0,sd.jsx)("em",{children:"Gmail"})]})]}),p?(0,sd.jsxs)("div",{className:"gmail-status",children:[null!==s&&void 0!==s&&s.connected?(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"gmail-row",children:[(0,sd.jsx)("div",{className:"gmail-dot connected"}),(0,sd.jsxs)("div",{style:{flex:1},children:[(0,sd.jsx)("div",{style:{fontWeight:500},children:"Connected"}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:12},children:s.email})]}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:async()=>
2{if(await h({title:"Disconnect Gmail?",message:"Vidhya will stop drafting and sending emails through your Google account. You can reconnect any time.",confirmLabel:"Disconnect",danger:!0}))try{await d(),F("Gmail disconnected.")}catch(Lt){F((0,ad.K)(Lt))}},"data-testid":"gmail-disconnect-btn",children:"Disconnect"})]}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:12.5,lineHeight:1.6,marginTop:12,marginBottom:0},children:"Vidhya can now save AI-drafted outreach as real Gmail drafts, send from your own inbox, and pull professor replies into your tracker."})]}):(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"gmail-row",children:[(0,sd.jsx)("div",{className:"gmail-dot"}),(0,sd.jsxs)("div",{style:{flex:1},children:[(0,sd.jsx)("div",{style:{fontWeight:500},children:"Not connected"}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:12},children:"One-click consent. We only request Gmail send + read scopes."})]}),(0,sd.jsx)("button",{className:"btn btn-clay",onClick:async()=>{try{const e=await c(),t=window.open(e.url,"_blank","width=520,height=640"),n=e=>{e.data&&"gmail-connected"===e.data.type&&(window.removeEventListener("message",n),setTimeout(()=>window.location.reload(),800))};window.addEventListener("message",n);const r=setInterval(async()=>{t&&t.closed&&(clearInterval(r),window.location.reload())},1500)}catch(Lt){F((0,ad.K)(Lt))}},"data-testid":"gmail-connect-btn",children:"Connect Gmail"})]}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:12.5,lineHeight:1.6,marginTop:12,marginBottom:0},children:"Once connected, AI-drafted professor outreach can be saved straight to your Gmail drafts."})]}),C&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:10},children:C})]}):(0,sd.jsxs)("div",{style:{paddingTop:6},children:[(0,sd.jsx)("p",{className:"muted",style:{fontSize:13,lineHeight:1.55,margin:"0 0 12px"},children:"Gmail outreach \u2014 drafting, sending, and tracking professor replies \u2014 unlocks with Navigator."}),(0,sd.jsx)(Fh,{feature:ch.GMAIL,context:"profile_gmail_card",label:"Unlock Gmail with Navigator",testid:"profile-gmail-upgrade-btn"})]})]}),(0,sd.jsxs)("div",{className:"profile-save-bar",children:[(0,sd.jsx)("div",{style:{flex:1,color:"var(--slate)",fontSize:13},children:b?(0,sd.jsxs)("span",{className:"p-saved",children:[(0,sd.jsx)(pd.Check,{size:12})," Saved \xb7 Vidhya will reference this in your next chat."]}):(0,sd.jsx)("span",{children:"Changes are used by the AI advisor for all future chats, emails, and matches."})}),(0,sd.jsx)("button",{className:"btn btn-clay",onClick:async()=>{if(v(!0),D(""),f.academic_stage&&f.intended_degree_level&&!Hd(f.academic_stage).includes(f.intended_degree_level))return D("A ".concat(f.academic_stage," student can't apply directly to a ").concat(f.intended_degree_level," program. Valid next step(s): ").concat(Hd(f.academic_stage).join(", "),".")),void v(!1);try{const e=(0,u.A)({},f);["strongest_subjects","backup_fields","target_countries"].forEach(t=>{void 0!==e[t]&&(e[t]=function(e){return Array.isArray(e)?e:e?String(e).split(",").map(e=>e.trim()).filter(Boolean):[]}(e[t]))}),await o(e),await l(),x(Date.now())}catch(Lt){D((0,ad.K)(Lt))}finally{v(!1)}},disabled:g,"data-testid":"profile-save-btn",children:g?"Saving\u2026":"Save profile"})]}),(0,sd.jsxs)("div",{className:"card","data-testid":"profile-support-card",style:{padding:"16px 18px",marginTop:14,fontSize:13,lineHeight:1.55},children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--slate)",marginBottom:6},children:"Need help?"}),(0,sd.jsxs)("div",{style:{color:"var(--ink-2)"},children:["Email us at ",(0,sd.jsx)("a",{href:"mailto:[email protected]","data-testid":"support-email-link",style:{color:"var(--indigo)"},children:"[email protected]"})," ","or DM ",(0,sd.jsx)("a",{href:"https://instagram.com/vidhyahq",target:"_blank",rel:"noopener noreferrer","data-testid":"support-instagram-link",style:{color:"var(--indigo)"},children:"@vidhyahq"})," on Instagram."]})]})]})]})]})}function Np(e){let{field:t,value:n,onChange:r}=e;return(0,sd.jsxs)("div",{className:"p-field",children:[(0,sd.jsx)("label",{className:"p-label",children:t.label}),(()=>{if("select"===t.type)return(0,sd.jsx)("select",{className:"input",value:n||"",onChange:e=>r(e.target.value),"data-testid":"profile-".concat(t.key),children:t.options.map(e=>(0,sd.jsx)("option",{value:e,children:e||"Select ".concat(t.label.toLowerCase(),"\u2026")},e))});if("country"===t.type)return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("input",{className:"input",list:"profile-countries",value:n||"",placeholder:t.placeholder,onChange:e=>r(e.target.value),"data-testid":"profile-".concat(t.key)}),(0,sd.jsx)("datalist",{id:"profile-countries",children:Wd.map(e=>(0,sd.jsx)("option",{value:e},e))})]});if("textarea"===t.type)return(0,sd.jsx)("textarea",{className:"input",rows:3,value:n||"",placeholder:t.placeholder,onChange:e=>r(e.target.value),"data-testid":"profile-".concat(t.key)});if("tags"===t.type){const e=Array.isArray(n)?n.join(", "):n||"";return(0,sd.jsx)("input",{className:"input",value:e,placeholder:t.placeholder,onChange:e=>r(e.target.value),"data-testid":"profile-".concat(t.key)})}return(0,sd.jsx)("input",{className:"input",value:n||"",placeholder:t.placeholder,onChange:e=>r(e.target.value),"data-testid":"profile-".concat(t.key)})})()]})}const Bp=[["What we collect","Only structured application details you re-type across portals (name, contact, address, family, funding, education, tests). Never essays, statements, or anything a university expects you to write yourself."],["Why","So the Vidhya browser extension can autofill university application forms for you \u2014 and nothing else."],["Where","Encrypted at rest in a store isolated from your AI advisor data. The extension keeps it in memory only and locks when you close your browser."],["Sensitive IDs","We never store passport numbers, national IDs/SSN, or proof-of-funds figures \u2014 you enter those directly on the portal."],["Your control","View, edit, or delete any field anytime. Withdraw consent to erase everything instantly."]];function Tp(e){let{def:t,value:n,onChange:r}=e;const i="af-".concat(t.key);return"bool"===t.type?(0,sd.jsxs)("div",{className:"af-field",children:[(0,sd.jsx)("label",{className:"p-label",htmlFor:i,children:t.label}),(0,sd.jsxs)("select",{id:i,className:"input","data-testid":"autofill-field-".concat(t.key),value:!0===n?"yes":!1===n?"no":"",onChange:e=>r(""===e.target.value?"":"yes"===e.target.value),children:[(0,sd.jsx)("option",{value:"",children:"\u2014"}),(0,sd.jsx)("option",{value:"yes",children:"Yes"}),(0,sd.jsx)("option",{value:"no",children:"No"})]})]}):(0,sd.jsxs)("div",{className:"af-field",children:[(0,sd.jsx)("label",{className:"p-label",htmlFor:i,children:t.label}),(0,sd.jsx)("input",{id:i,className:"input","data-testid":"autofill-field-".concat(t.key),type:"date"===t.type?"date":"email"===t.type?"email":"tel"===t.type?"tel":"text",value:null!==n&&void 0!==n?n:"",onCh
2ange:e=>r(e.target.value)})]})}function Pp(){const e=Lh(),[t,n]=(0,a.useState)(!0),[r,i]=(0,a.useState)(null),[s,o]=(0,a.useState)({status:"none"}),[l,c]=(0,a.useState)(0),[d,h]=(0,a.useState)({}),[p,f]=(0,a.useState)({}),[m,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),[D,b]=(0,a.useState)(""),[x,C]=(0,a.useState)(null),[F,_]=(0,a.useState)({guardian_name:"",guardian_email:""}),k="granted"===(null===s||void 0===s?void 0:s.status),w=function(e){if(!e)return null;const t=new Date(e);if(isNaN(t))return null;const n=new Date;let r=n.getFullYear()-t.getFullYear();const i=n.getMonth()-t.getMonth();return(i<0||0===i&&n.getDate()<t.getDate())&&r--,r}(d.dob),E=null!==w&&w<18,j=E&&!(null!==s&&void 0!==s&&s.guardian_email);(0,a.useEffect)(()=>{(async()=>{try{const[e,t]=await Promise.all([ad.http.get("/autofill/schema"),ad.http.get("/autofill/profile")]);i(e.data),o(t.data.consent||{status:"none"}),c(t.data.version||0),h(t.data.fields||{});const n=(e.data.categories||[])[0];n&&f({[n.key]:!0})}catch(Lt){b((0,ad.K)(Lt))}finally{n(!1)}})()},[]);const A=(0,a.useMemo)(()=>Object.values(d).filter(e=>""!==e&&null!=e).length,[d]);return t?(0,sd.jsx)("div",{className:"full-loader","data-testid":"autofill-loading",children:"Loading\u2026"}):(0,sd.jsxs)("div",{"data-testid":"autofill-view",children:[(0,sd.jsx)("div",{className:"dash-hero",children:(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Apply faster \xb7 Autofill"}),(0,sd.jsxs)("h1",{style:{marginTop:8,fontSize:32},children:["Application ",(0,sd.jsx)("em",{children:"autofill"})]}),(0,sd.jsx)("p",{children:"Save the details you re-type on every portal once. The Vidhya browser extension fills them for you \u2014 you stay in control and we never touch your essays."})]})}),D&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"autofill-error",children:D}),k?(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"af-toolbar","data-testid":"autofill-toolbar",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",marginBottom:14},children:[(0,sd.jsxs)("div",{className:"muted",style:{fontSize:13},children:[(0,sd.jsx)("strong",{children:A})," details saved \xb7 profile v",l,x&&(0,sd.jsx)("span",{style:{color:"#16a34a",marginLeft:8},children:"Saved \u2713"})]}),(0,sd.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,sd.jsxs)("button",{className:"btn-ghost","data-testid":"autofill-withdraw-btn",onClick:async()=>{if(await e({title:"Withdraw consent & erase data?",message:"This permanently deletes every application detail you've saved. The extension will no longer be able to fill forms. You can re-consent later.",confirmLabel:"Erase everything",danger:!0}))try{await ad.http.delete("/autofill/consent"),o({status:"withdrawn"}),h({}),c(e=>e+1)}catch(Lt){b((0,ad.K)(Lt))}},style:{color:"#dc2626"},children:[(0,sd.jsx)(pd.Trash,{size:13})," Withdraw & erase"]}),(0,sd.jsx)("button",{className:"btn-primary","data-testid":"autofill-save-btn",onClick:async()=>{g(!0),b("");try{const e=await ad.http.put("/autofill/profile",{fields:d});c(e.data.version),h(e.data.fields||{}),C(Date.now())}catch(Lt){b((0,ad.K)(Lt))}finally{g(!1)}},disabled:m,children:m?"Saving\u2026":"Save changes"})]})]}),j&&(0,sd.jsxs)("div",{className:"profile-section","data-testid":"autofill-guardian-prompt",style:{background:"#FFF7ED",border:"1px solid #FED7AA",marginBottom:14},children:[(0,sd.jsx)("div",{style:{fontWeight:600,fontSize:13.5,marginBottom:6},children:"Guardian consent needed"}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:12.5,margin:"0 0 10px"},children:"Your date of birth indicates you're under 18. Add a parent/guardian to keep saving."}),(0,sd.jsxs)("div",{className:"af-grid",children:[(0,sd.jsx)(Tp,{def:{key:"guardian_name",label:"Guardian name",type:"text"},value:F.guardian_name,onChange:e=>_(t=>(0,u.A)((0,u.A)({},t),{},{guardian_name:e}))}),(0,sd.jsx)(Tp,{def:{key:"guardian_email",label:"Guardian email",type:"email"},value:F.guardian_email,onChange:e=>_(t=>(0,u.A)((0,u.A)({},t),{},{guardian_email:e}))})]}),(0,sd.jsx)("button",{className:"btn-primary","data-testid":"autofill-guardian-save-btn",style:{marginTop:10},onClick:async()=>{b("");try{const e=await ad.http.post("/autofill/consent",{guardian_name:F.guardian_name||null,guardian_email:F.guardian_email||null});o(e.data.consent)}catch(Lt){b((0,ad.K)(Lt))}},children:"Save guardian consent"})]}),((null===r||void 0===r?void 0:r.categories)||[]).map(e=>{const t=!!p[e.key],n=e.fields.filter(e=>""!==d[e.key]&&null!=d[e.key]).length;return(0,sd.jsxs)("div",{className:"profile-section af-cat","data-testid":"autofill-cat-".concat(e.key),style:{marginBottom:12},children:[(0,sd.jsxs)("div",{className:"af-cat-head",onClick:()=>f(t=>(0,u.A)((0,u.A)({},t),{},{[e.key]:!t[e.key]})),"data-testid":"autofill-cat-toggle-".concat(e.key),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer"},children:[(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[e.sensitive&&(0,sd.jsx)("span",{title:"Sensitive \u2014 strongest protection",style:{color:"#B85A3D"},children:(0,sd.jsx)(pd.Shield,{size:14})}),(0,sd.jsx)("h3",{className:"p-section-title",style:{margin:0,fontSize:16},children:e.label}),(0,sd.jsxs)("span",{className:"muted",style:{fontSize:12},children:[n,"/",e.fields.length]})]}),(0,sd.jsx)("span",{style:{transform:t?"rotate(90deg)":"none",transition:"transform .15s"},children:(0,sd.jsx)(pd.Caret,{size:14})})]}),t&&(0,sd.jsx)("div",{className:"af-grid",style:{marginTop:14},children:e.fields.map(e=>(0,sd.jsx)(Tp,{def:e,value:d[e.key],onChange:t=>((e,t)=>h(n=>(0,u.A)((0,u.A)({},n),{},{[e]:t}
2)))(e.key,t)},e.key))})]},e.key)}),(0,sd.jsxs)("div",{className:"profile-section","data-testid":"autofill-extension-card",style:{marginTop:16},children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Browser extension"}),(0,sd.jsxs)("h3",{className:"p-section-title",style:{fontSize:16},children:["Use it on ",(0,sd.jsx)("em",{children:"university portals"})]}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:13,lineHeight:1.6,marginTop:4},children:'Install the Vidhya Autofill extension, click "Connect", and sign in with this account. It syncs these details (read-only) and fills supported portals \u2014 it never submits for you and never touches essays.'})]})]}):(0,sd.jsxs)("div",{className:"profile-section","data-testid":"autofill-consent-gate",style:{maxWidth:680},children:[(0,sd.jsxs)("div",{className:"p-section-head",children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Before we collect anything"}),(0,sd.jsxs)("h3",{className:"p-section-title",children:["Your consent, ",(0,sd.jsx)("em",{children:"your control"})]})]}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:13.5,lineHeight:1.6,marginTop:4},children:"We only collect these details when you choose to start applying \u2014 never before. Here's exactly what you're agreeing to:"}),(0,sd.jsx)("div",{style:{display:"grid",gap:10,margin:"14px 0"},children:Bp.map(e=>{let[t,n]=e;return(0,sd.jsxs)("div",{style:{display:"flex",gap:10},children:[(0,sd.jsx)("span",{style:{marginTop:2,color:"var(--accent, #B85A3D)"},children:(0,sd.jsx)(pd.Check,{size:15})}),(0,sd.jsxs)("div",{children:[(0,sd.jsxs)("strong",{style:{fontSize:13.5},children:[t,"."]})," ",(0,sd.jsx)("span",{className:"muted",style:{fontSize:13},children:n})]})]},t)})}),E&&(0,sd.jsxs)("div",{className:"af-minor","data-testid":"autofill-minor-consent",style:{background:"#FFF7ED",border:"1px solid #FED7AA",borderRadius:10,padding:14,margin:"10px 0"},children:[(0,sd.jsx)("div",{style:{fontWeight:600,fontSize:13.5,marginBottom:6},children:"You're under 18 \u2014 a parent/guardian must consent"}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:12.5,margin:"0 0 10px"},children:"Required by data-protection law (GDPR / India DPDP). Add your guardian's details to continue."}),(0,sd.jsxs)("div",{className:"af-grid",children:[(0,sd.jsx)(Tp,{def:{key:"guardian_name",label:"Guardian name",type:"text"},value:F.guardian_name,onChange:e=>_(t=>(0,u.A)((0,u.A)({},t),{},{guardian_name:e}))}),(0,sd.jsx)(Tp,{def:{key:"guardian_email",label:"Guardian email",type:"email"},value:F.guardian_email,onChange:e=>_(t=>(0,u.A)((0,u.A)({},t),{},{guardian_email:e}))})]})]}),(0,sd.jsxs)("p",{className:"muted",style:{fontSize:11.5,margin:"6px 0 14px"},children:["See our ",(0,sd.jsx)("a",{href:"/privacy",target:"_blank",rel:"noreferrer",style:{textDecoration:"underline"},children:"privacy policy"}),". This data is used only for autofill and never sold or shared."]}),(0,sd.jsx)("button",{className:"btn-primary","data-testid":"autofill-consent-btn",onClick:async()=>{y(!0),b("");try{const e=E?{guardian_name:F.guardian_name||null,guardian_email:F.guardian_email||null}:{},t=await ad.http.post("/autofill/consent",e);o(t.data.consent),c(t.data.version||1)}catch(Lt){b((0,ad.K)(Lt))}finally{y(!1)}},disabled:v||E&&(!F.guardian_name||!F.guardian_email),children:v?"Saving\u2026":"I consent \u2014 start filling my details"}),"withdrawn"===(null===s||void 0===s?void 0:s.status)&&(0,sd.jsx)("div",{className:"muted",style:{fontSize:12,marginTop:10},children:"Your previous data was erased. Consent again to start fresh."})]})]})}const Lp={pending:{bg:"rgba(184,138,58,0.15)",fg:"#8a6420",label:"Pending"},approved:{bg:"rgba(79,122,74,0.15)",fg:"#3a5a36",label:"Approved"},rejected:{bg:"rgba(184,90,61,0.18)",fg:"#8a3c20",label:"Rejected"},claimed:{bg:"rgba(74,111,138,0.15)",fg:"#345469",label:"Claimed"},active:{bg:"rgba(79,122,74,0.15)",fg:"#3a5a36",label:"Active"},suspended:{bg:"rgba(184,90,61,0.18)",fg:"#8a3c20",label:"Suspended"}};function Rp(e){let{status:t}=e;const n=Lp[t]||Lp.pending;return(0,sd.jsx)("span",{style:{background:n.bg,color:n.fg,fontSize:10.5,fontFamily:"var(--font-mono)",letterSpacing:"0.08em",textTransform:"uppercase",padding:"3px 8px",borderRadius:999,fontWeight:600},"data-testid":"pill-".concat(t),children:n.label})}function zp(e){let{label:t,value:n,hint:r}=e;return(0,sd.jsxs)("div",{className:"card",style:{padding:"16px 18px",minWidth:0},children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:6},children:t}),(0,sd.jsx)("div",{style:{fontFamily:"var(--font-display)",fontSize:32,fontWeight:600,lineHeight:1},children:n}),r&&(0,sd.jsx)("div",{style:{fontSize:11.5,color:"var(--ink-3)",marginTop:4},children:r})]})}function Op(){const{user:e}=ud(),[t,n]=(0,a.useState)("waitlist"),[r,i]=(0,a.useState)(null),[s,o]=(0,a.useState)(""),l=(0,a.useCallback)(async()=>{try{const{data:e}=await ad.http.get("/admin/stats");i(e)}catch(Lt){o((0,ad.K)(Lt))}},[]);return(0,a.useEffect)(()=>
2{l()},[l]),"admin"!==(null===e||void 0===e?void 0:e.role)?(0,sd.jsx)("div",{"data-testid":"admin-forbidden",className:"empty-state",style:{marginTop:40},children:"Admin access required."}):(0,sd.jsxs)("div",{"data-testid":"admin-view",style:{maxWidth:1180,margin:"0 auto"},children:[(0,sd.jsx)("div",{className:"row",style:{justifyContent:"space-between",marginBottom:18},children:(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:11,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:4},children:"Vidhya \xb7 admin console"}),(0,sd.jsx)("h1",{style:{fontFamily:"var(--font-display)",fontSize:30,fontWeight:600,margin:0},children:"Members & access"})]})}),s&&(0,sd.jsx)("div",{className:"auth-error",style:{marginBottom:16},children:s}),r&&(0,sd.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(170px,1fr))",gap:12,marginBottom:22},children:[(0,sd.jsx)(zp,{label:"Pending waitlist",value:r.waitlist.pending,hint:"awaiting your decision"}),(0,sd.jsx)(zp,{label:"Approved",value:r.waitlist.approved,hint:"not yet signed up"}),(0,sd.jsx)(zp,{label:"Active users",value:r.users.active}),(0,sd.jsx)(zp,{label:"Suspended",value:r.users.suspended,hint:"login blocked"})]}),(0,sd.jsxs)("div",{className:"row",style:{gap:6,marginBottom:14},children:[(0,sd.jsxs)("button",{className:"btn btn-sm ".concat("waitlist"===t?"btn-clay":"btn-ghost"),onClick:()=>n("waitlist"),"data-testid":"admin-tab-waitlist",style:"waitlist"===t?{boxShadow:"inset 0 -2px 0 rgba(0,0,0,0.15)"}:{opacity:.65},children:["Waitlist",r&&(0,sd.jsx)("span",{className:"pill",style:{marginLeft:6},children:r.waitlist.pending})]}),(0,sd.jsxs)("button",{className:"btn btn-sm ".concat("users"===t?"btn-clay":"btn-ghost"),onClick:()=>n("users"),"data-testid":"admin-tab-users",style:"users"===t?{boxShadow:"inset 0 -2px 0 rgba(0,0,0,0.15)"}:{opacity:.65},children:["Users",r&&(0,sd.jsx)("span",{className:"pill",style:{marginLeft:6},children:r.users.total})]})]}),"waitlist"===t&&(0,sd.jsx)(Mp,{refreshStats:l}),"users"===t&&(0,sd.jsx)(Ip,{currentUserId:null===e||void 0===e?void 0:e.id,refreshStats:l})]})}function Mp(e){let{refreshStats:t}=e;const[n,r]=(0,a.useState)([]),[i,s]=(0,a.useState)("pending"),[o,l]=(0,a.useState)(""),[u,c]=(0,a.useState)(!1),[d,h]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),m=Lh(),g=(0,a.useCallback)(async()=>{c(!0),f("");try{const e=new URLSearchParams;i&&e.set("status",i),o.trim()&&e.set("q",o.trim());const{data:t}=await ad.http.get("/admin/waitlist?".concat(e.toString()));r(t.items||[])}catch(Lt){f((0,ad.K)(Lt))}finally{c(!1)}},[i,o]);(0,a.useEffect)(()=>{g()},[g]);const v=async(e,n)=>{h(e+":"+n),f("");try{if("approve"===n)await ad.http.post("/admin/waitlist/".concat(e,"/approve"));else if("reject"===n)await ad.http.post("/admin/waitlist/".concat(e,"/reject"));else if("delete"===n){if(!await m({title:"Delete waitlist entry?",message:"This will permanently remove the entry. The person can join the waitlist again later.",confirmLabel:"Delete",danger:!0}))return void h("");await ad.http.delete("/admin/waitlist/".concat(e))}await g(),t()}catch(Lt){f((0,ad.K)(Lt))}finally{h("")}};return(0,sd.jsxs)("div",{className:"card","data-testid":"admin-waitlist-card",style:{padding:0},children:[(0,sd.jsxs)("div",{className:"row",style:{padding:14,gap:8,borderBottom:"1px solid var(--bg-sunk)",flexWrap:"wrap"},children:[(0,sd.jsx)("input",{className:"input",style:{flex:"1 1 220px"},placeholder:"Search email, name, country, major\u2026",value:o,onChange:e=>l(e.target.value),"data-testid":"admin-waitlist-search"}),(0,sd.jsxs)("select",{className:"input",style:{width:160},value:i,onChange:e=>s(e.target.value),"data-testid":"admin-waitlist-filter",children:[(0,sd.jsx)("option",{value:"all",children:"All statuses"}),(0,sd.jsx)("option",{value:"pending",children:"Pending"}),(0,sd.jsx)("option",{value:"approved",children:"Approved"}),(0,sd.jsx)("option",{value:"claimed",children:"Claimed"}),(0,sd.jsx)("option",{value:"rejected",children:"Rejected"})]})]}),p&&(0,sd.jsx)("div",{className:"auth-error",style:{margin:14},children:p}),(0,sd.jsx)("div",{style:{overflowX:"auto"},children:(0,sd.jsxs)("table",{className:"admin-table","data-testid":"admin-waitlist-table",children:[(0,sd.jsx)("thead",{children:(0,sd.jsxs)("tr",{children:[(0,sd.jsx)("th",{children:"Person"}),(0,sd.jsx)("th",{children:"Country / grade"}),(0,sd.jsx)("th",{children:"Intended major"}),(0,sd.jsx)("th",{children:"Joined"}),(0,sd.jsx)("th",{children:"Status"}),(0,sd.jsx)("th",{style:{textAlign:"right"},children:"Actions"})]})}),(0,sd.jsxs)("tbody",{children:[n.map(e=>(0,sd.jsxs)("tr",{"data-testid":"waitlist-row-".concat(e.id),children:[(0,sd.jsxs)("td",{children:[(0,sd.jsx)("div",{style:{fontWeight:600,fontSize:13.5},children:e.name||"\u2014"}),(0,sd.jsx)("div",{style:{color:"var(--ink-3)",fontSize:12},children:e.email})]}),(0,sd.jsxs)("td",{style:{fontSize:12.5},children:[(0,sd.jsx)("div",{children:e.country||"\u2014"}),(0,sd.jsx)("div",{style:{color:"var(--ink-3)"},children:e.grade_level||""})]}),(0,sd.jsx)("td",{style:{fontSize:12.5},children:e.intended_major||"\u2014"}),(0,sd.jsx)("td",{style:{fontSize:12,fontFamily:"var(--font-mono)",color:"var(--ink-3)"},children:e.created_at?new Date(e.created_at).toLocaleDateString():""}),(0,sd.jsx)("td",{children:(0,sd.jsx)(Rp,{status:e.status})}),(0,sd.jsxs)("td",{style:{textAlign:"right",whiteSpace:"nowrap"},children:["pending"===e.status&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",disabled:!!d,onClick:()=>v(e.id,"approve"),"data-testid":"approve-".concat(e.id),children:d===e.id+":approve"?"\u2026":"Approve"}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!d,onClick:()=>v(e.id,"reject"),"data-testid":"reject-".concat(e.id),style:{marginLeft:6},children:"Reject"})]}),"approved"===e.status&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!d,onClick:()=>v(e.id,"reject"),"data-testid":"revoke-".concat(e.id),children:"Revoke approval"}),("rejected"===e.status||"claimed"===e.status)&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!d,onClick:()=>v(e.id,"delete"),"data-testid":"delete-waitlist-".concat(e.id),style:{color:"#8a3c20"},children:"Delete"})]})]},e.id)),0===n.length&&!u&&(0,sd.jsx)("tr",{children:(0,sd.jsx)("td",{colSpan:6,style:{textAlign:"center",padding:28,color:"var(--ink-3)"}
2,children:"No matching waitlist entries."})})]})]})})]})}function Ip(e){let{currentUserId:t,refreshStats:n}=e;const[r,i]=(0,a.useState)([]),[s,o]=(0,a.useState)("all"),[l,u]=(0,a.useState)("all"),[c,d]=(0,a.useState)(""),[h,p]=(0,a.useState)(!1),[f,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(""),[y,D]=(0,a.useState)(""),b=Lh(),x=(0,a.useCallback)(async()=>{p(!0),v("");try{const e=new URLSearchParams;s&&e.set("status",s),l&&e.set("role",l),c.trim()&&e.set("q",c.trim());const{data:t}=await ad.http.get("/admin/users?".concat(e.toString()));i(t.items||[])}catch(Lt){v((0,ad.K)(Lt))}finally{p(!1)}},[s,l,c]);(0,a.useEffect)(()=>{x()},[x]);const C=async(e,t,r)=>{m(e+":"+t),v("");try{if("suspend"===t)await ad.http.post("/admin/users/".concat(e,"/suspend"));else if("reactivate"===t)await ad.http.post("/admin/users/".concat(e,"/reactivate"));else if("promote"===t)await ad.http.post("/admin/users/".concat(e,"/promote"),r);else if("plan"===t)await ad.http.post("/admin/users/".concat(e,"/plan"),r);else if("delete"===t){if(!await b({title:"Permanently delete this user?",message:"Their account, universities, tasks, scholarships and email drafts will all be erased. This cannot be undone.",confirmLabel:"Delete user",danger:!0}))return void m("");await ad.http.delete("/admin/users/".concat(e))}await x(),n()}catch(Lt){v((0,ad.K)(Lt))}finally{m("")}},F=(0,a.useMemo)(()=>r,[r]);return(0,sd.jsxs)("div",{className:"card","data-testid":"admin-users-card",style:{padding:0},children:[(0,sd.jsxs)("div",{className:"row",style:{padding:14,gap:8,borderBottom:"1px solid var(--bg-sunk)",flexWrap:"wrap"},children:[(0,sd.jsx)("input",{className:"input",style:{flex:"1 1 220px"},placeholder:"Search by email or name\u2026",value:c,onChange:e=>d(e.target.value),"data-testid":"admin-users-search"}),(0,sd.jsxs)("select",{className:"input",style:{width:150},value:s,onChange:e=>o(e.target.value),"data-testid":"admin-users-status-filter",children:[(0,sd.jsx)("option",{value:"all",children:"All statuses"}),(0,sd.jsx)("option",{value:"active",children:"Active"}),(0,sd.jsx)("option",{value:"suspended",children:"Suspended"})]}),(0,sd.jsxs)("select",{className:"input",style:{width:130},value:l,onChange:e=>u(e.target.value),"data-testid":"admin-users-role-filter",children:[(0,sd.jsx)("option",{value:"all",children:"All roles"}),(0,sd.jsx)("option",{value:"admin",children:"Admin"}),(0,sd.jsx)("option",{value:"user",children:"User"})]})]}),g&&(0,sd.jsx)("div",{className:"auth-error",style:{margin:14},children:g}),(0,sd.jsx)("div",{style:{overflowX:"auto"},children:(0,sd.jsxs)("table",{className:"admin-table","data-testid":"admin-users-table",children:[(0,sd.jsx)("thead",{children:(0,sd.jsxs)("tr",{children:[(0,sd.jsx)("th",{children:"User"}),(0,sd.jsx)("th",{children:"Role"}),(0,sd.jsx)("th",{children:"Plan"}),(0,sd.jsx)("th",{children:"Status"}),(0,sd.jsx)("th",{children:"Joined"}),(0,sd.jsx)("th",{children:"Last login"}),(0,sd.jsx)("th",{children:"Logins"}),(0,sd.jsx)("th",{style:{textAlign:"right"},children:"Actions"})]})}),(0,sd.jsxs)("tbody",{children:[F.map(e=>{const n=e.id===t;return(0,sd.jsxs)("tr",{"data-testid":"user-row-".concat(e.id),children:[(0,sd.jsxs)("td",{children:[(0,sd.jsxs)("div",{style:{fontWeight:600,fontSize:13.5,cursor:"pointer"},onClick:()=>D(e.id),"data-testid":"user-name-".concat(e.id),children:[e.name,n&&(0,sd.jsx)("span",{style:{marginLeft:6,fontSize:10,color:"var(--ink-3)",fontFamily:"var(--font-mono)",letterSpacing:"0.1em"},children:"\xb7 you"})]}),(0,sd.jsx)("div",{style:{color:"var(--ink-3)",fontSize:12},children:e.email})]}),(0,sd.jsx)("td",{children:(0,sd.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10.5,letterSpacing:"0.08em",textTransform:"uppercase",color:"admin"===e.role?"#8a3c20":"var(--ink-3)",fontWeight:600},children:e.role})}),(0,sd.jsx)("td",{children:(0,sd.jsx)("button",{type:"button",className:"btn btn-sm ".concat("navigator"===e.plan?"btn-clay":"btn-ghost"),disabled:!!f,onClick:()=>C(e.id,"plan",{plan:"navigator"===e.plan?"explorer":"navigator"}),"data-testid":"plan-toggle-".concat(e.id),title:"navigator"===e.plan?"Click to downgrade to Explorer":"Click to upgrade to Navigator",style:{fontFamily:"var(--font-mono)",fontSize:10.5,letterSpacing:"0.08em",textTransform:"uppercase"},children:"navigator"===e.plan?"Navigator":"Explorer"})}),(0,sd.jsx)("td",{children:(0,sd.jsx)(Rp,{status:e.status||"active"})}),(0,sd.jsx)("td",{style:{fontSize:12,fontFamily:"var(--font-mono)",color:"var(--ink-3)"},children:e.created_at?new Date(e.created_at).toLocaleDateString():""}),(0,sd.jsx)("td",{style:{fontSize:12,fontFamily:"var(--font-mono)",color:"var(--ink-3)"}
2,children:e.last_login_at?new Date(e.last_login_at).toLocaleString():"\u2014"}),(0,sd.jsx)("td",{style:{fontSize:12,fontFamily:"var(--font-mono)"},children:e.login_count||0}),(0,sd.jsxs)("td",{style:{textAlign:"right",whiteSpace:"nowrap"},children:[(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:()=>D(e.id),"data-testid":"view-user-".concat(e.id),style:{marginRight:6},children:"View"}),!n&&"suspended"!==e.status&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!f,onClick:()=>C(e.id,"suspend"),"data-testid":"suspend-".concat(e.id),style:{color:"#8a3c20"},children:"Suspend"}),!n&&"suspended"===e.status&&(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",disabled:!!f,onClick:()=>C(e.id,"reactivate"),"data-testid":"reactivate-".concat(e.id),children:"Reactivate"}),!n&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!f,onClick:()=>C(e.id,"promote",{role:"admin"===e.role?"user":"admin"}),"data-testid":"promote-".concat(e.id),style:{marginLeft:6},children:"admin"===e.role?"Demote":"Make admin"}),!n&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!f,onClick:()=>C(e.id,"delete"),"data-testid":"delete-user-".concat(e.id),style:{marginLeft:6,color:"#8a3c20"},children:"Delete"})]})]},e.id)}),0===F.length&&!h&&(0,sd.jsx)("tr",{children:(0,sd.jsx)("td",{colSpan:8,style:{textAlign:"center",padding:28,color:"var(--ink-3)"},children:"No users match the current filters."})})]})]})}),y&&(0,sd.jsx)($p,{uid:y,currentUserId:t,actionId:f,onAction:C,onClose:()=>D("")})]})}function Up(e){let{label:t,value:n}=e;return void 0===n||null===n||""===n||Array.isArray(n)&&0===n.length?null:(0,sd.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:16,padding:"7px 0",borderBottom:"1px solid var(--bg-sunk)"},children:[(0,sd.jsx)("span",{style:{fontSize:12,color:"var(--ink-3)",fontFamily:"var(--font-mono)",letterSpacing:"0.04em"},children:t}),(0,sd.jsx)("span",{style:{fontSize:12.5,fontWeight:500,textAlign:"right"},children:Array.isArray(n)?n.join(", "):String(n)})]})}function $p(e){var t,n,r,i,s;let{uid:o,currentUserId:l,actionId:u,onAction:c,onClose:d}=e;const[h,p]=(0,a.useState)(null),[f,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=!0;return v(!0),m(""),ad.http.get("/admin/users/".concat(o,"/detail")).then(t=>{let{data:n}=t;e&&p(n)}).catch(t=>{e&&m((0,ad.K)(t))}).finally(()=>{e&&v(!1)}),()=>{e=!1}},[o]);const y=(null===h||void 0===h?void 0:h.user)||{},D=(null===h||void 0===h?void 0:h.profile)||{},b=(null===h||void 0===h?void 0:h.counts)||{},x=o===l,C=e=>e?new Date(e).toLocaleString():"\u2014",F=async(e,t)=>{await c(o,e,t),"delete"===e&&d()};return(0,sd.jsx)("div",{onClick:d,"data-testid":"user-detail-overlay",style:{position:"fixed",inset:0,background:"rgba(20,16,12,0.42)",backdropFilter:"blur(4px)",zIndex:1e3,display:"flex",justifyContent:"flex-end"},children:(0,sd.jsxs)("div",{onClick:e=>e.stopPropagation(),"data-testid":"user-detail-drawer",className:"card",style:{width:"min(440px, 92vw)",height:"100%",borderRadius:0,overflowY:"auto",padding:24,boxShadow:"-12px 0 40px rgba(0,0,0,0.16)"},children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",alignItems:"flex-start",marginBottom:18},children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:4},children:"User detail"}),(0,sd.jsx)("div",{style:{fontFamily:"var(--font-display)",fontSize:22,fontWeight:600},children:y.name||"\u2014"}),(0,sd.jsx)("div",{style:{color:"var(--ink-3)",fontSize:12.5},children:y.email})]}),(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",onClick:d,"data-testid":"user-detail-close",children:"\u2715"})]}),g&&(0,sd.jsx)("div",{style:{color:"var(--ink-3)",fontSize:13},children:"Loading\u2026"}),f&&(0,sd.jsx)("div",{className:"auth-error",children:f}),h&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:10,marginBottom:20},children:[(0,sd.jsx)(zp,{label:"Universities",value:null!==(t=b.universities)&&void 0!==t?t:0}),(0,sd.jsx)(zp,{label:"Tasks",value:null!==(n=b.tasks)&&void 0!==n?n:0}),(0,sd.jsx)(zp,{label:"Scholarships",value:null!==(r=b.scholarships)&&void 0!==r?r:0}),(0,sd.jsx)(zp,{label:"Email drafts",value:null!==(i=b.emails)&&void 0!==i?i:0})]}),(0,sd.jsxs)("div",{style:{marginBottom:20},children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:6},children:"Account"}),(0,sd.jsx)(Up,{label:"Role",value:y.role}),(0,sd.jsx)(Up,{label:"Plan",value:y.plan}),(0,sd.jsx)(Up,{label:"Status",value:y.status||"active"}),(0,sd.jsx)(Up,{label:"Joined",value:C(y.created_at)}),(0,sd.jsx)(Up,{label:"Last login",value:C(y.last_login_at)}),(0,sd.jsx)(Up,{label:"Login count",value:null!==(s=y.login_count)&&void 0!==s?s:0}),(0,sd.jsx)(Up,{label:"User ID",value:y.id})]}),(0,sd.jsxs)("div",{style:{marginBottom:22},children:[(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-3)",marginBottom:6},children:"Profile"}),(0,sd.jsx)(Up,{label:"Intake term",value:D.intake_term}),(0,sd.jsx)(Up,{label:"Degree level",value:D.intended_degree_level||D.intended_level}),(0,sd.jsx)(Up,{label:"Intended major",value:D.intended_major}),(0,sd.jsx)(Up,{label:"Grade level",value:D.grade_level}),(0,sd.jsx)(Up,{label:"GPA",value:D.gpa}),(0,sd.jsx)(Up,{label:"Predicted grades",value:D.predicted_grades}),(0,sd.jsx)(Up,{label:"Target countries",value:D.target_countries}),(0,sd.jsx)(Up,{label:"Citizenship",value:D.citizenship||D.country_of_citizenship}),(0,sd.jsx)(Up,{label:"Student country",value:D.student_country}),(0,sd.jsx)(Up,{label:"Budget",value:D.budget}),(0,sd.jsx)(Up,{label:"Funding need",value:D.funding_need}),(0,sd.jsx)(Up,{label:"English test",value:D.english_test}),(0,sd.jsx)(Up,{label:"English score",value:D.english_score}),(0,sd.jsx)(Up,{label:"SAT",value:D.sat_score}),(0,sd.jsx)(Up,{label:"ACT",value:D.act_score}),!D.intake_term&&!D.intended_major&&!D.gpa&&(0,sd.jsx)("div",{style:{fontSize:12.5,color:"var(--ink-3)",padding:"8px 0"},children:"No profile details yet."})]}),(0,sd.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[(0,sd.jsx)("button",{className:"btn btn-sm ".concat("navigator"===y.plan?"btn-clay":"btn-ghost"),disabled:!!u,onClick:()=>F("plan",{plan:"navigator"===y.plan?"explorer":"navigator"}),"data-testid":"detail-plan-toggle",children:"navigator"===y.plan?"Downgrade \u2192 Explorer":"Upgrade \u2192 Navigator"}),!x&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!u,onClick:()=>F("promote",{role:"admin"===y.role?"user":"admin"}),"data-testid":"detail-promote",children:"admin"===y.role?"Demote to user":"Make admin"}),!x&&"suspended"!==y.status&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!u,onClick:()=>F("suspend"),"data-testid":"detail-suspend",style:{color:"#8a3c20"},children:"Suspend"}),!x&&"suspended"===y.status&&(0,sd.jsx)("button",{className:"btn btn-sm btn-clay",disabled:!!u,onClick:()=>F("reactivate"),"data-testid":"detail-reactivate",children:"Reactivate"}),!x&&(0,sd.jsx)("button",{className:"btn btn-sm btn-ghost",disabled:!!u,onClick:()=>F("delete"),"data-testid":"detail-delete",style:{color:"#8a3c20"},children:"Delete user"})]})]})]})})}function Wp(){const{user:e,refreshMe:t}=ud(),n=Lh(),{open:r}=mh(),i=(null===e||void 0===e?void 0:e.plan_summary)||{}
2,s=!!i.is_navigator,o=i.status||(s?"active":"free"),l=i.period||null,u=i.renews_at||null,c=!!i.cancel_at_period_end,d=i.card_brand||null,h=i.card_last4||null,p=i.card_exp||null,[f,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(!1),[y,D]=(0,a.useState)(""),[b,x]=(0,a.useState)(""),[C,F]=(0,a.useState)(!1);(0,a.useEffect)(()=>{const e=new URLSearchParams(window.location.search),n=e.get("upgrade");if("success"===n){m("success");let n=!1,r=0;v(!0);const i=async()=>{r+=1;try{await t()}catch(Lt){}n||(r>=10?v(!1):setTimeout(i,1e3))};i();try{ad.http.post("/analytics/event",{event:"upgrade_checkout_returned_success",properties:{session_id:e.get("session_id")}}).catch(()=>{})}catch(Lt){}return()=>{n=!0}}if("cancel"===n){m("cancel");try{ad.http.post("/analytics/event",{event:"upgrade_checkout_cancelled"}).catch(()=>{})}catch(Lt){}}},[]),(0,a.useEffect)(()=>{s&&g&&v(!1)},[s,g]);const _=async()=>{D("portal"),x("");try{const{data:e}=await ad.http.post("/stripe/customer-portal",{return_url:"".concat(window.location.origin,"/app/billing")});if(null===e||void 0===e||!e.url)throw new Error("No portal URL.");window.location.href=e.url}catch(Lt){x((0,ad.K)(Lt)),D("")}};return(0,sd.jsxs)("div",{"data-testid":"billing-view",style:{maxWidth:880,margin:"0 auto"},children:[(0,sd.jsxs)("div",{style:{marginBottom:24},children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Settings"}),(0,sd.jsxs)("h1",{style:{marginTop:8,fontSize:32},children:["Billing & ",(0,sd.jsx)("em",{children:"plan"})]}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:13,marginTop:4},children:"Manage your subscription and unlock Navigator features."})]}),"success"===f&&(0,sd.jsx)(qp,{polling:g,isNavigator:s}),"cancel"===f&&(0,sd.jsx)(Vp,{onTryAgain:()=>r("","billing_cancel_retry")}),s&&"past_due"===o&&(0,sd.jsxs)("div",{className:"billing-past-due-banner","data-testid":"billing-past-due-banner",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("strong",{children:"Your last payment didn't go through."}),(0,sd.jsx)("p",{children:"We'll keep Navigator unlocked while we retry, but Stripe will eventually cancel if it can't charge a working card. Update your payment method to stay on Navigator."})]}),(0,sd.jsx)("button",{className:"btn btn-clay",onClick:_,disabled:"portal"===y,"data-testid":"billing-past-due-update-btn",children:"portal"===y?"Opening\u2026":"Update payment method"})]}),s&&c&&u&&(0,sd.jsxs)("div",{className:"billing-cancel-banner","data-testid":"billing-cancel-banner",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsxs)("strong",{children:["Navigator ends ",Hp(u),"."]}),(0,sd.jsx)("p",{children:"Your subscription is set to cancel at the end of the current period. Change your mind and you can keep going."})]}),(0,sd.jsx)("button",{className:"btn btn-ghost",onClick:async()=>{D("resume");try{await ad.http.post("/stripe/subscription/resume"),await t()}catch(Lt){x((0,ad.K)(Lt))}finally{D("")}},"data-testid":"billing-resume-btn",children:"resume"===y?"Resuming\u2026":"Keep my plan"})]}),(0,sd.jsx)("div",{className:"card",style:{padding:24,marginBottom:22},"data-testid":"billing-current-card",children:(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",alignItems:"flex-start",flexWrap:"wrap",gap:16},children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Current plan"}),(0,sd.jsx)("div",{style:{fontFamily:"var(--font-display)",fontSize:28,fontWeight:600,marginTop:6},children:s?"Navigator":"Explorer"}),(0,sd.jsxs)("div",{className:"muted",style:{fontSize:13,marginTop:4},children:[!s&&"Track 1 university \xb7 10 AI advisor messages/day \xb7 basic scholarship search.",s&&"monthly"===l&&"$11 / month \xb7 billed monthly \xb7 cancel anytime",s&&"annual"===l&&"$11 / month \xb7 billed $132 annually \xb7 save $48",s&&!l&&"Unlimited universities, advisor, and every feature."]}),s&&u&&!c&&(0,sd.jsxs)("div",{className:"muted",style:{fontSize:12.5,marginTop:6},"data-testid":"billing-renews-at",children:["active"===o&&(0,sd.jsxs)(sd.Fragment,{children:["Renews on ",Hp(u)]}),"past_due"===o&&(0,sd.jsx)(sd.Fragment,{children:"Retry scheduled \u2014 last attempt failed"})]}),s&&h&&(0,sd.jsxs)("div",{className:"muted",style:{fontSize:12.5,marginTop:4},"data-testid":"billing-card",children:[d?d.toUpperCase():"Card"," ending in ",h,p?" \xb7 exp ".concat(p):""]})]}),s?(0,sd.jsxs)("div",{className:"pill",style:{background:"var(--ink)",color:"var(--paper)",padding:"6px 12px"},children:[(0,sd.jsx)("span",{style:{background:"var(--orange)",width:8,height:8,borderRadius:999,display:"inline-block",marginRight:6}}),"past_due"===o?"Past due":c?"Cancels soon":"Active"]}):(0,sd.jsx)(Fh,{feature:"",context:"billing_current_card",label:"Upgrade to Navigator",testid:"billing-upgrade-btn"})]})}),s&&(0,sd.jsxs)("div",{className:"card",style:{padding:24,marginBottom:22},"data-testid":"billing-manage-card",children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Manage subscription"}),(0,sd.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:12,marginTop:12},children:[(0,sd.jsx)("button",{className:"btn btn-ghost",onClick:_,disabled:"portal"===y,"data-testid":"billing-manage-payment-btn",children:"portal"===y?"Opening\u2026":"Manage payment method"}),(0,sd.jsx)("button",{className:"btn btn-ghost",onClick:async()=>{const e="annual"===l?"monthly":"annual",r="annual"===e?"annual ($132/year, save $48)":"monthly ($11/month)";if(await n({title:"Switch to ".concat(r,"?"),message:"Stripe will prorate the change \u2014 you'll get a small credit or charge for the unused portion of your current period.",confirmText:"Switch to ".concat(e)})){D("switch"),x("");try{await ad.http.post("/stripe/subscription/change-period",{period:e}),await t()}catch(Lt){x((0,ad.K)(Lt))}finally{D("")}}},disabled:"switch"===y||c,"data-testid":"billing-switch-period-btn",children:"switch"===y?"Switching\u2026":"Switch to ".concat("annual"===l?"monthly":"annual")}),!c&&(0,sd.jsx)("button",{className:"btn btn-ghost",onClick:()=>F(!0),disabled:"cancel"===y,"data-testid":"billing-cancel-btn",style:{color:"var(--clay-deep)"},children:"Cancel subscription"})]}),b&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:12},"data-testid":"billing-error",children:b}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:11.5,marginTop:14,marginBottom:0},children:"Payment processing and card storage are handled by Stripe. We never see your card details."})]}),!s&&(0,sd.jsx)(Gp,{openUpgrade:r}
2),C&&(0,sd.jsx)(Yp,{onClose:()=>F(!1),renewsAt:u,period:l,onConfirmed:async()=>{F(!1),await t()}})]})}function Hp(e){if(!e)return"";try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}catch(Lt){return e}}function qp(e){let{polling:t,isNavigator:n}=e;return(0,sd.jsxs)("div",{className:"billing-success-banner","data-testid":"billing-success-banner",children:[(0,sd.jsx)("div",{className:"billing-success-tick","aria-hidden":!0,children:(0,sd.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,sd.jsx)("path",{d:"M5 12l5 5L20 7"})})}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("strong",{children:"You're on Navigator."}),(0,sd.jsx)("p",{children:n?"Every gated feature is unlocked. Welcome aboard.":t?"Activating your account\u2026 your plan badge will flip to Navigator in a moment.":"If your account doesn't update in a minute, refresh \u2014 the webhook may have been delayed."})]})]})}function Vp(e){let{onTryAgain:t}=e;return(0,sd.jsxs)("div",{className:"billing-cancel-outcome-banner","data-testid":"billing-cancel-outcome-banner",children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("strong",{children:"No charge \u2014 you didn't complete checkout."}),(0,sd.jsx)("p",{children:"Still on Explorer. Whenever you're ready, the upgrade is one click away."})]}),(0,sd.jsx)("button",{className:"btn btn-clay",onClick:t,"data-testid":"billing-retry-upgrade-btn",children:"Try again"})]})}function Gp(e){let{openUpgrade:t}=e;const[n,r]=(0,a.useState)("annual"),i="annual"===n?"$11":"$14.99",s="annual"===n?"billed $132 annually \xb7 save $48":"billed monthly \xb7 cancel anytime";return(0,sd.jsxs)("div",{className:"card billing-upgrade-card",style:{padding:28},"data-testid":"billing-navigator-card",children:[(0,sd.jsxs)("div",{className:"row",style:{justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:12,marginBottom:12},children:[(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Navigator"}),(0,sd.jsxs)("h2",{style:{margin:"4px 0 0 0",fontFamily:"var(--font-display)"},children:["For students ",(0,sd.jsx)("em",{children:"actually applying"}),"."]})]}),(0,sd.jsxs)("div",{className:"billing-toggle",role:"tablist","aria-label":"Billing cycle",style:{display:"inline-flex",gap:4,padding:4,background:"var(--bg-sunk)",borderRadius:999},children:[(0,sd.jsx)("button",{type:"button",onClick:()=>r("monthly"),className:"u-toggle ".concat("monthly"===n?"active":""),"data-testid":"billing-toggle-monthly",children:"Monthly"}),(0,sd.jsxs)("button",{type:"button",onClick:()=>r("annual"),className:"u-toggle ".concat("annual"===n?"active":""),"data-testid":"billing-toggle-annual",children:["Annual ",(0,sd.jsx)("span",{className:"save-pill",children:"save $48"})]})]})]}),(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginTop:8},children:[(0,sd.jsx)("span",{style:{fontFamily:"var(--font-display)",fontSize:48,fontWeight:600},"data-testid":"billing-price",children:i}),(0,sd.jsx)("span",{className:"muted",style:{fontSize:14},children:"/month"})]}),(0,sd.jsx)("div",{className:"muted",style:{fontSize:12,marginTop:2},"data-testid":"billing-note",children:s}),(0,sd.jsx)("ul",{style:{listStyle:"none",padding:0,margin:"20px 0",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:10},children:["Unlimited universities on your board","Unlimited AI advisor conversations","Full profile unlock","Fit score for every university","Admission probability","Aid gap analysis","Gmail drafting + one-click outreach","Full scholarship database","AI-generated prioritised to-do lists","Priority support"].map((e,t)=>(0,sd.jsxs)("li",{style:{fontSize:14,display:"flex",gap:8,alignItems:"center"},children:[(0,sd.jsx)("span",{style:{color:"var(--orange)",flex:"0 0 14px"},children:(0,sd.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,sd.jsx)("path",{d:"M5 12l5 5L20 7"})})}),e]},t))}),(0,sd.jsx)(Fh,{feature:"",context:"billing_card_".concat(n),label:"Start applying smarter",size:"lg",testid:"billing-start-btn"}),(0,sd.jsx)("p",{className:"muted",style:{fontSize:12,marginTop:10},children:"Cancel anytime \xb7 7-day money-back"}),(0,sd.jsxs)("p",{className:"muted","data-testid":"billing-country-disclaimer",style:{fontSize:12,marginTop:6,lineHeight:1.5},children:["Not in a"," ",(0,sd.jsx)("a",{href:"https://stripe.com/global",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--orange)"},children:"Stripe-supported country"}
2),"? Email"," ",(0,sd.jsx)("a",{href:"mailto:[email protected]?subject=Upgrade%20my%20account",style:{color:"var(--orange)"},children:"[email protected]"})," to upgrade your account."]})]})}const Kp=[{id:"too_expensive",label:"Too expensive"},{id:"not_using_enough",label:"Not using it enough"},{id:"switched_service",label:"Switching to another tool"},{id:"other",label:"Other"}];function Yp(e){let{onClose:t,renewsAt:n,period:r,onConfirmed:i}=e;const[s,o]=(0,a.useState)(""),[l,u]=(0,a.useState)(""),[c,d]=(0,a.useState)(!1),[h,p]=(0,a.useState)("");return(0,sd.jsx)("div",{className:"modal-overlay",onClick:t,"data-testid":"cancel-modal",children:(0,sd.jsxs)("div",{className:"modal-card",onClick:e=>e.stopPropagation(),style:{maxWidth:480},children:[(0,sd.jsx)("div",{className:"eyebrow",children:"Cancel Navigator"}),(0,sd.jsx)("h3",{style:{marginTop:6},children:"Sorry to see you go."}),(0,sd.jsx)("p",{style:{color:"var(--ink-3)",fontSize:14,lineHeight:1.55,marginTop:6},children:n?(0,sd.jsxs)(sd.Fragment,{children:["Your subscription will end on ",(0,sd.jsx)("strong",{children:Hp(n)}),". You keep full access until then."]}):(0,sd.jsx)(sd.Fragment,{children:"Your subscription will cancel at the end of the current period \u2014 full access until then."})}),(0,sd.jsxs)("div",{style:{marginTop:18},children:[(0,sd.jsx)("div",{className:"eyebrow",style:{fontSize:10.5},children:"Why are you leaving?"}),(0,sd.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6,marginTop:8},children:Kp.map(e=>(0,sd.jsxs)("label",{className:"cancel-reason-row","data-testid":"cancel-reason-".concat(e.id),children:[(0,sd.jsx)("input",{type:"radio",name:"cancel_reason",value:e.id,checked:s===e.id,onChange:()=>o(e.id)}),e.label]},e.id))}),(0,sd.jsx)("textarea",{className:"input",placeholder:"(Optional) anything else we should know?",value:l,onChange:e=>u(e.target.value),rows:3,"data-testid":"cancel-text",style:{marginTop:10,width:"100%",resize:"vertical"}})]}),h&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:10},children:h}),(0,sd.jsxs)("div",{style:{display:"flex",gap:8,marginTop:18,justifyContent:"flex-end"},children:[(0,sd.jsx)("button",{className:"btn btn-ghost",onClick:t,disabled:c,"data-testid":"cancel-keep-btn",children:"Keep my plan"}),(0,sd.jsx)("button",{className:"btn",onClick:async()=>{if(s){d(!0),p("");try{await ad.http.post("/stripe/subscription/cancel",{reason:s,text:l});try{ad.http.post("/analytics/event",{event:"subscription_cancelled_ui",properties:{reason:s,period:r||""}}).catch(()=>{})}catch(Lt){}await i()}catch(Lt){p((0,ad.K)(Lt)),d(!1)}}else p("Pick a reason so we can improve.")},disabled:c||!s,style:{background:"var(--clay-deep)",color:"var(--paper)"},"data-testid":"cancel-confirm-btn",children:c?"Cancelling\u2026":"Confirm cancel"})]})]})})}function Qp(){}function Jp(){}const Xp=/^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
20EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE4
20-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088F\u0897-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5C\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDC-\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
2D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF65-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD6D\uDD6F-\uDD85\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEC2-\uDEC7\uDEFA-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD3\uDFE1\uDFE2]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8\uDF60-\uDF67\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF5A\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDCF0-\uDCF9\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDDD0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEF5\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]|\uDB40[\uDD00-\uDDEF])*$/,Zp=/^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
20EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE4
20-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])(?:[\$\x2D0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088F\u0897-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5C\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDC-\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
2D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF65-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD6D\uDD6F-\uDD85\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEC2-\uDEC7\uDEFA-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD3\uDFE1\uDFE2]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8\uDF60-\uDF67\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF5A\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDCF0-\uDCF9\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDDD0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEF5\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]|\uDB40[\uDD00-\uDDEF])*$/,ef={};
vendor: 5,263 bytes, line 2
2function tf(e,t){return((t||ef).jsx?Zp:Xp).test(e)}const nf=/[ \t\n\f\r]/g;function rf(e){return""===e.replace(nf,"")}class af{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function sf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new af(n,r,t)}function of(e){return e.toLowerCase()}af.prototype.normal={},af.prototype.property={},af.prototype.space=void 0;class lf{constructor(e,t){this.attribute=t,this.property=e}}lf.prototype.attribute="",lf.prototype.booleanish=!1,lf.prototype.boolean=!1,lf.prototype.commaOrSpaceSeparated=!1,lf.prototype.commaSeparated=!1,lf.prototype.defined=!1,lf.prototype.mustUseProperty=!1,lf.prototype.number=!1,lf.prototype.overloadedBoolean=!1,lf.prototype.property="",lf.prototype.spaceSeparated=!1,lf.prototype.space=void 0;let uf=0;const cf=vf(),df=vf(),hf=vf(),pf=vf(),ff=vf(),mf=vf(),gf=vf();function vf(){return 2**++uf}const yf=Object.keys(r);class Df extends lf{constructor(e,t,n,i){let a=-1;if(super(e,t),bf(this,"space",i),"number"===typeof n)for(;++a<yf.length;){const e=yf[a];bf(this,yf[a],(n&r[e])===r[e])}}}function bf(e,t,n){n&&(e[t]=n)}function xf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Df(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[of(r)]=r,n[of(a.attribute)]=r}return new af(t,n,e.space)}Df.prototype.defined=!0;const Cf=xf({properties:{ariaActiveDescendant:null,ariaAtomic:df,ariaAutoComplete:null,ariaBusy:df,ariaChecked:df,ariaColCount:pf,ariaColIndex:pf,ariaColSpan:pf,ariaControls:ff,ariaCurrent:null,ariaDescribedBy:ff,ariaDetails:null,ariaDisabled:df,ariaDropEffect:ff,ariaErrorMessage:null,ariaExpanded:df,ariaFlowTo:ff,ariaGrabbed:df,ariaHasPopup:null,ariaHidden:df,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ff,ariaLevel:pf,ariaLive:null,ariaModal:df,ariaMultiLine:df,ariaMultiSelectable:df,ariaOrientation:null,ariaOwns:ff,ariaPlaceholder:null,ariaPosInSet:pf,ariaPressed:df,ariaReadOnly:df,ariaRelevant:null,ariaRequired:df,ariaRoleDescription:ff,ariaRowCount:pf,ariaRowIndex:pf,ariaRowSpan:pf,ariaSelected:df,ariaSetSize:pf,ariaSort:null,ariaValueMax:pf,ariaValueMin:pf,ariaValueNow:pf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ff(e,t){return t in e?e[t]:t}function _f(e,t){return Ff(e,t.toLowerCase())}const kf=xf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mf,acceptCharset:ff,accessKey:ff,action:null,allow:null,allowFullScreen:cf,allowPaymentRequest:cf,allowUserMedia:cf,alt:null,as:null,async:cf,autoCapitalize:null,autoComplete:ff,autoFocus:cf,autoPlay:cf,blocking:ff,capture:null,charSet:null,checked:cf,cite:null,className:ff,cols:pf,colSpan:null,content:null,contentEditable:df,controls:cf,controlsList:ff,coords:pf|mf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:cf,defer:cf,dir:null,dirName:null,disabled:cf,download:hf,draggable:df,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:cf,formTarget:null,headers:ff,height:pf,hidden:hf,high:pf,href:null,hrefLang:null,htmlFor:ff,httpEquiv:ff,id:null,imageSizes:null,imageSrcSet:null,inert:cf,inputMode:null,integrity:null,is:null,isMap:cf,itemId:null,itemProp:ff,itemRef:ff,itemScope:cf,itemType:ff,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:cf,low:pf,manifest:null,max:null,maxLength:pf,media:null,method:null,min:null,minLength:pf,multiple:cf,muted:cf,name:null,nonce:null,noModule:cf,noValidate:cf,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:cf,optimum:pf,pattern:null,ping:ff,placeholder:null,playsInl
2ine:cf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:cf,referrerPolicy:null,rel:ff,required:cf,reversed:cf,rows:pf,rowSpan:pf,sandbox:ff,scope:null,scoped:cf,seamless:cf,selected:cf,shadowRootClonable:cf,shadowRootDelegatesFocus:cf,shadowRootMode:null,shape:null,size:pf,sizes:null,slot:null,span:pf,spellCheck:df,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pf,step:null,style:null,tabIndex:pf,target:null,title:null,translate:null,type:null,typeMustMatch:cf,useMap:null,value:df,width:pf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ff,axis:null,background:null,bgColor:null,border:pf,borderColor:null,bottomMargin:pf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:cf,declare:cf,event:null,face:null,frame:null,frameBorder:null,hSpace:pf,leftMargin:pf,link:null,longDesc:null,lowSrc:null,marginHeight:pf,marginWidth:pf,noResize:cf,noHref:cf,noShade:cf,noWrap:cf,object:null,profile:null,prompt:null,rev:null,rightMargin:pf,rules:null,scheme:null,scrolling:df,standby:null,summary:null,text:null,topMargin:pf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:cf,disableRemotePlayback:cf,prefix:null,property:null,results:pf,security:null,unselectable:null},space:"html",transform:_f}),wf=xf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
2-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gf,accentHeight:pf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pf,amplitude:pf,arabicForm:null,ascent:pf,attributeName:null,attributeType:null,azimuth:pf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pf,by:null,calcMode:null,capHeight:pf,className:ff,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pf,diffuseConstant:pf,direction:null,display:null,dur:null,divisor:pf,dominantBaseline:null,download:cf,dx:null,dy:null,edgeMode:null,editable:null,elevation:pf,enableBackground:null,end:null,event:null,exponent:pf,externalResourcesRequired:null,fill:null,fillOpacity:pf,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:mf,g2:mf,glyphName:mf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pf,horizOriginX:pf,horizOriginY:pf,id:null,ideographic:pf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pf,k:pf,k1:pf,k2:pf,k3:pf,k4:pf,kernelMatrix:gf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pf,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pf,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
2Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pf,overlineThickness:pf,paintOrder:null,panose1:null,path:null,pathLength:pf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ff,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pf,pointsAtY:pf,pointsAtZ:pf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gf,rev:gf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gf,requiredFeatures:gf,requiredFonts:gf,requiredFormats:gf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pf,specularExponent:pf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pf,strikethroughThickness:pf,string:null,stroke:null,strokeDashArray:gf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pf,strokeOpacity:pf,strokeWidth:null,style:null,surfaceScale:pf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gf,tabIndex:pf,tableValues:null,target:null,targetX:pf,targetY:pf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pf,underlineThickness:pf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pf,values:null,vAlphabetic:pf,vMathematical:pf,vectorEffect:null,vHanging:pf,vIdeographic:pf,version:null,vertAdvY:pf,vertOriginX:pf,vertOriginY:pf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ff}),Ef=xf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),jf=xf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_f}),Af=xf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Sf=sf([Cf,kf,Ef,jf,Af],"html"),Nf=sf([Cf,wf,Ef,jf,Af],"svg"),Bf=/[A-Z]/g,Tf=/-[a-z]/g,Pf=/^data[-\w.:]+$/i;function Lf(e){return"-"+e.toLowerCase()}function Rf(e){return e.charAt(1).toUpperCase()}const zf={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Of=n(294);const Mf=Uf("end"),If=Uf("start");function Uf(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"===typeof n.line&&n.line>0&&"number"===typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"===typeof n.offset&&n.offset>-1?n.offset:void 0}}}function $f(e){return e&&"object"===typeof e?"position"in e||"type"in e?Hf(e.position):"start"in e||"end"in e?Hf(e):"line"in e||"column"in e?Wf(e):"":""}function Wf(e){return qf(e&&e.line)+":"+qf(e&&e.column)}function Hf(e){return Wf(e&&e.start)+"-"+Wf(e&&e.end)}function qf(e){return e&&"number"===typeof e?e:1}class Vf extends Error{constructor(e,t,n){super(),"string"===typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:(0,u.A)({},t)),"string"===typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"===typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=$f(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"===typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Vf.prototype.file="",Vf.prototype.name="",Vf.prototype.reason="",Vf.prototype.message="",Vf.prototype.stack="",Vf.prototype.column=void 0,Vf.prototype.line=void 0,Vf.prototype.ancestors=void 0,Vf.prototype.cause=void 0,Vf.prototype.fatal=void 0,Vf.prototype.place=void 0,Vf.prototype.ruleId=void 0,Vf.prototype.source=void 0;const Gf={}.hasOwnProperty,Kf=new Map,Yf=/[A-Z]/g,Qf=new Set(["table","tbody","thead","tfoot","tr"]),Jf=new Set(["td","th"]),Xf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zf(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!==typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,i,a){const s=Array.isArray(i.children),o=If(n);return t(r,i,a,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!==typeof t.jsx)throw new TypeError("Expected `jsx` in production options");
vendor: 9,562 bytes, line 2
2if("function"!==typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,i,a){const s=Array.isArray(i.children)?n:t;return a?s(r,i,a):s(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Nf:Sf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=em(i,e,void 0);return a&&"string"!==typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function em(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=Nf,e.schema=i);e.ancestors.push(t);const a=am(e,t.tagName,!1),s=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&Gf.call(t.properties,i)){const a=im(e,i,t.properties[i]);if(a){const[i,s]=a;e.tableCellAlignToStyle&&"align"===i&&"string"===typeof s&&Jf.has(t.tagName)?r=s:n[i]=s}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let o=rm(e,t);Qf.has(t.tagName)&&(o=o.filter(function(e){return"string"!==typeof e||!("object"===typeof(t=e)?"text"===t.type&&rf(t.value):rf(t));var t}));return tm(e,s,a,t),nm(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}sm(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=Nf,e.schema=i);e.ancestors.push(t);const a=null===t.name?e.Fragment:am(e,t.name,!0),s=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Qp(t.type);const i=t.expression;Qp(i.type);const a=i.properties[0];Qp(a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else sm(e,t.position);else{const i=r.name;let a;if(r.value&&"object"===typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Qp(t.type),a=e.evaluater.evaluateExpression(t.expression)}else sm(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),o=rm(e,t);return tm(e,s,a,t),nm(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sm(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return nm(r,rm(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function tm(e,t,n,r){"string"!==typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function nm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rm(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Kf;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=i.get(e)||0;s=e+"-"+t,i.set(e,t+1)}}const o=em(e,a,s);void 0!==o&&n.push(o)}return n}function im(e,t,n){const r=function(e,t){const n=of(t);let r=t,i=lf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Pf.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Tf,Rf);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Tf.test(e)){let n=e.replace(Bf,Lf);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=Df}return new i(r,t)}(e.schema,t);if(!(null===n||void 0===n||"number"===typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"===typeof n?n:function(e,t){try{return Of(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Vf("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Xf+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Gf.call(e,n)&&(t[om(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?zf[r.property]||r.property:r.attribute,n]}}function am(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=tf(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}r=n}else r=tf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Gf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);sm(e)}function sm(e,t){const n=new Vf("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Xf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function om(e){let t=e.replace(Yf,lm);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function lm(e){return"-"+e.toLowerCase()}const um={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},cm={};function dm(e,t){const n=t||cm;return hm(e,"boolean"!==typeof n.includeImageAlt||n.includeImageAlt,"boolean"!==typeof n.includeHtml||n.includeHtml)}function hm(e,t,n){if(function(e){return Boolean(e&&"object"===typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pm(e.children,t,n)}return Array.isArray(e)?pm(e,t,n):""}function pm(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=hm(e[i],t,n);return r.join("")}function fm(e,t,n,r){const i=e.length;let a,s=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function mm(e,t){return e.length>0?(fm(e,e.length,0,t),e):t}class gm{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null===t||void 0===t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&vm(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),vm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),vm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);vm(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);vm(this.left,t.reverse())}}}function vm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ym(e){const t={};let n,r,i,a,s,o,l,c=-1;const d=new gm(e);for(;++c<d.length;){for(;c in t;)c=t[c];if(n=d.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===d.get(c-1)[1].type&&(o=n[1]._tokenizer.events,i=0,i<o.length&&"lineEndingBlank"===o[i][1].type&&(i+=2),i<o.length&&"content"===o[i][1].type))for(;++i<o.length&&"content"!==o[i][1].type;)"chunkText"===o[i][1].type&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Dm(d,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(a=d.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(d.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end=(0,u.A)({},d.get(r)[1].start),s=d.slice(r,c),s.unshift(n),d.splice(r,c-r+1,s))}}return fm(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function Dm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._c
2ontentTypeTextTrailing=!0));const o=s.events,l=[],u={};let c,d,h=-1,p=n,f=0,m=0;const g=[m];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<o.length;)"exit"===o[h][0]&&"enter"===o[h-1][0]&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=o.slice(g[h],g[h+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),h=-1;++h<l.length;)u[f+l[h][0]]=f+l[h][1],f+=l[h][1]-l[h][0]-1;return u}const bm={}.hasOwnProperty;function xm(e){const t={};let n=-1;for(;++n<e.length;)Cm(t,e[n]);return t}function Cm(e,t){let n;for(n in t){const r=(bm.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){bm.call(r,a)||(r[a]=[]);const e=i[a];Fm(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Fm(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);fm(e,0,0,r)}const _m=Rm(/[A-Za-z]/),km=Rm(/[\dA-Za-z]/),wm=Rm(/[#-'*+\--9=?A-Z^-~]/);function Em(e){return null!==e&&(e<32||127===e)}const jm=Rm(/\d/),Am=Rm(/[\dA-Fa-f]/),Sm=Rm(/[!-/:-@[-`{-~]/);function Nm(e){return null!==e&&e<-2}function Bm(e){return null!==e&&(e<0||32===e)}function Tm(e){return-2===e||-1===e||32===e}const Pm=Rm(/(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F])|(?:[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1F
2BF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/),Lm=Rm(/\s/);function Rm(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function zm(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(Tm(r))return e.enter(n),s(r);return t(r)};function s(r){return Tm(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}const Om={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),zm(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Nm(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}};const Mm={tokenize:function(e){const t=this,n=[];let r,i,a,s=0;return o;function o(r){if(s<n.length){const i=n[s];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&D();const n=t.events.length;let i,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}y(s);let o=n;for(;o<t.events.length;)t.events[o][1].end=(0,u.A)({},i),o++;return fm(t.events,a+1,0,t.events.slice(n)),t.events.length=o,c(e)}return o(e)}
vendor: 5,654 bytes, line 2
2function c(i){if(s===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return m(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Im,d,h)(i)}function d(e){return r&&D(),y(s),p(e)}function h(e){return t.parser.lazy[t.now().line]=s!==n.length,a=t.now().offset,m(e)}function p(n){return t.containerState={},e.attempt(Im,f,m)(n)}function f(e){return s++,n.push([t.currentConstruct,t.containerState]),p(e)}function m(n){return null===n?(r&&D(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),g(n))}function g(n){return null===n?(v(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Nm(n)?(e.consume(n),v(e.exit("chunkFlow")),s=0,t.interrupt=void 0,o):(e.consume(n),g)}function v(e,n){const o=t.sliceStream(e);if(n&&o.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(o),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let i,o,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){o=t.events[l][1].end;break}i=!0}for(y(s),e=n;e<t.events.length;)t.events[e][1].end=(0,u.A)({},o),e++;fm(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function D(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Im={tokenize:function(e,t,n){return zm(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const Um={partial:!0,tokenize:function(e,t,n){return function(t){return Tm(t)?zm(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Nm(e)?t(e):n(e)}}};const $m={resolve:function(e){return ym(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Nm(t)?e.check(Wm,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Wm={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),zm(e,i,"linePrefix")};function i(i){if(null===i||Nm(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};const Hm={tokenize:function(e){const t=this,n=e.attempt(Um,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,zm(e,e.attempt(this.parser.constructs.flow,r,e.attempt($m,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const qm={resolveAll:Ym()},Vm=Km("string"),Gm=Km("text");function Km(e){return{resolveAll:Ym("text"===e?Qm:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,s);return a;function a(e){return l(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),o)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Ym(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Qm(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let a,s=i.length,o=-1,l=0;for(;s--;){const e=i[s];if("string"===typeof e){for(o=e.length;32===e.charCodeAt(o-1);)l++,o--;if(o)break;o=-1}else if(-2===e)a=!0,l++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const i={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:(0,u.A)({},r.end)};r.end=(0,u.A)({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}const Jm={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),s(a)):i>=3&&(null===a||Nm(a))?(e.exit("thematicBreak"),t(a)):n(a)}function s(t){return t===r?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),Tm(t)?zm(e,a,"whitespace")(t):a(t))}}};const Xm={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Um,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,zm(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Tm(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
vendor: 1,328 bytes, line 2
2=void 0,s(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(eg,t,s)(n))}function s(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,zm(e,e.attempt(Xm,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:jm(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Jm,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(t)}return n(t)};function o(t){return jm(t)&&++s<10?(e.consume(t),o):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Um,r.interrupt?n:u,e.attempt(Zm,d,c))}
vendor: 9,631 bytes, line 2
2function u(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function c(t){return Tm(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Zm={partial:!0,tokenize:function(e,t,n){const r=this;return zm(e,function(e){const i=r.events[r.events.length-1];return!Tm(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},eg={partial:!0,tokenize:function(e,t,n){const r=this;return zm(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const tg={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Tm(t))return zm(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(tg,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Tm(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function ng(e,t,n,r,i,a,s,o,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),d;if(null===t||32===t||41===t||Em(t))return n(t);return e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),f(t)};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(o),d(t)):null===t||60===t||Nm(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(i){return c||null!==i&&41!==i&&!Bm(i)?c<u&&40===i?(e.consume(i),c++,f):41===i?(e.consume(i),c--,f):null===i||32===i||40===i||Em(i)?n(i):(e.consume(i),92===i?m:f):(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function rg(e,t,n,r,i,a){const s=this;let o,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u};function u(d){return l>999||null===d||91===d||93===d&&!o||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Nm(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||Nm(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),o||(o=!Tm(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function ig(e,t,n,r,i,a){let s;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,o;return n(t)};function o(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===s?(e.exit(a),o(s)):null===t?n(t):Nm(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),zm(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===s||null===t||Nm(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===s||92===t?(e.consume(t),u):u(t)}}function ag(e,t){let n;return function r(i){if(Nm(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(Tm(i))return zm(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}function sg(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const og={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return rg.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=sg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return Bm(t)?ag(e,o)(t):o(t)}function o(t){return ng(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(lg,u,u)(t)}function u(t){return Tm(t)?zm(e,c,"whitespace")(t):c(t)}function c(a){return null===a||Nm(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},lg={partial:!0,tokenize:function(e,t,n){return function(t){return Bm(t)?ag(e,r)(t):n(t)};function r(t){return ig(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Tm(t)?zm(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Nm(e)?t(e):n(e)}}};const ug={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),zm(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?o(t):Nm(t)?e.attempt(cg,a,o)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||Nm(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),s)}function o(n){return e.exit("codeIndented"),t(n)}}},cg={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Nm(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):zm(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Nm(e)?i(e):n(e)}}};const dg={name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},fm(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Bm(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||Nm(n)?(e.exit("atxHeading"),t(n)):Tm(n)?zm(e,a,"whitespace")(n):(e.enter("atxHeadingText"),o(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),a(t))}function o(t){return null===t||35===t||Bm(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),o)}}};const hg={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const s={type:"setextHeading",start:(0,u.A)({},e[n][1].start),end:(0,u.A)({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=(0,u.A)({},e[i][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let s,o=r.events.length;for(;o--;)if("lineEnding"!==r.events[o][1].type&&"linePrefix"!==r.events[o][1].type&&"content"!==r.events[o][1].type){s="paragraph"===r.events[o][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Tm(t)?zm(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||Nm(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const pg=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fg=["pre","script","style","textarea"],mg={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let i,a,s,o,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u}(t)};function u(o){return 33===o?(e.consume(o),c):47===o?(e.consume(o),a=!0,p):63===o?(e.consume(o),i=3,r.interrupt?t:P):_m(o)?(e.consume(o),s=String.fromCharCode(o),f):n(o)}function c(a){return 45===a?(e.consume(a),i=2,d):91===a?(e.consume(a),i=5,o=0,h):_m(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:P):n(i)}function h(i){const a="CDATA[";
vendor: 4,148 bytes, line 2
2return i===a.charCodeAt(o++)?(e.consume(i),6===o?r.interrupt?t:w:h):n(i)}function p(t){return _m(t)?(e.consume(t),s=String.fromCharCode(t),f):n(t)}function f(o){if(null===o||47===o||62===o||Bm(o)){const l=47===o,u=s.toLowerCase();return l||a||!fg.includes(u)?pg.includes(s.toLowerCase())?(i=6,l?(e.consume(o),m):r.interrupt?t(o):w(o)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(o):a?g(o):v(o)):(i=1,r.interrupt?t(o):w(o))}return 45===o||km(o)?(e.consume(o),s+=String.fromCharCode(o),f):n(o)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:w):n(i)}function g(t){return Tm(t)?(e.consume(t),g):_(t)}function v(t){return 47===t?(e.consume(t),_):58===t||95===t||_m(t)?(e.consume(t),y):Tm(t)?(e.consume(t),v):_(t)}function y(t){return 45===t||46===t||58===t||95===t||km(t)?(e.consume(t),y):D(t)}function D(t){return 61===t?(e.consume(t),b):Tm(t)?(e.consume(t),D):v(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):Tm(t)?(e.consume(t),b):C(t)}function x(t){return t===l?(e.consume(t),l=null,F):null===t||Nm(t)?n(t):(e.consume(t),x)}function C(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Bm(t)?D(t):(e.consume(t),C)}function F(e){return 47===e||62===e||Tm(e)?v(e):n(e)}function _(t){return 62===t?(e.consume(t),k):n(t)}function k(t){return null===t||Nm(t)?w(t):Tm(t)?(e.consume(t),k):n(t)}function w(t){return 45===t&&2===i?(e.consume(t),S):60===t&&1===i?(e.consume(t),N):62===t&&4===i?(e.consume(t),L):63===t&&3===i?(e.consume(t),P):93===t&&5===i?(e.consume(t),T):!Nm(t)||6!==i&&7!==i?null===t||Nm(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),w):(e.exit("htmlFlowData"),e.check(gg,R,E)(t))}function E(t){return e.check(vg,j,R)(t)}function j(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||Nm(t)?E(t):(e.enter("htmlFlowData"),w(t))}function S(t){return 45===t?(e.consume(t),P):w(t)}function N(t){return 47===t?(e.consume(t),s="",B):w(t)}function B(t){if(62===t){const n=s.toLowerCase();return fg.includes(n)?(e.consume(t),L):w(t)}return _m(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),B):w(t)}function T(t){return 93===t?(e.consume(t),P):w(t)}function P(t){return 62===t?(e.consume(t),L):45===t&&2===i?(e.consume(t),P):w(t)}function L(t){return null===t||Nm(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),L)}function R(n){return e.exit("htmlFlow"),t(n)}}},gg={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Um,t,n)}}},vg={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Nm(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const yg={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Dg={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Tm(t)?zm(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=o?(e.exit("codeFencedFenceSequence"),Tm(t)?zm(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Nm(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,s=0,o=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(o++,e.consume(t),l):o<3?n(t):(e.exit("codeFencedFenceSequence"),Tm(t)?zm(e,u,"whitespace")(t):u(t))}function u(n){return null===n||Nm(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(yg,p,y)(n)):(e.enter("co
2deFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Nm(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):Tm(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),zm(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),c)}function d(t){return null===t||Nm(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||Nm(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===a?n(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&Tm(t)?zm(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||Nm(t)?e.check(yg,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||Nm(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(n){return e.exit("codeFenced"),t(n)}}};const bg=document.createElement("i");function xg(e){const t="&"+e+";";bg.innerHTML=t;const n=bg.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const Cg={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,a,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function o(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=km,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Am,u):(e.enter("characterReferenceValue"),i=7,a=jm,u(t))}function u(o){if(59===o&&s){const i=e.exit("characterReferenceValue");return a!==km||xg(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)}return a(o)&&s++<i?(e.consume(o),u):n(o)}}};const Fg={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Sm(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const _g={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),zm(e,t,"linePrefix")}}};function kg(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const wg={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&fm(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,i,a,s=e.length,o=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){o=2;break}}else"labelEnd"===n.type&&(i=s);const l={type:"labelLink"===e[r][1].type?"link":"image",start:(0,u.A)({},e[r][1].start),end:(0,u.A)({},e[e.length-1][1].end)},c={type:"label",start:(0,u.A)({},e[r][1].start),end:(0,u.A)({},e[i][1].end)},d={type:"labelText",start:(0,u.A)({},e[r+o+2][1].end),end:(0,u.A)({},e[i-2][1].start)};return a=[["enter",l,t],["enter",c,t]],a=mm(a,e.slice(r+1,r+o+3)),a=mm(a,[["enter",d,t]]),a=mm(a,kg(t.parser.constructs.insideSpan.null,e.slice(r+o+4,i-3),t)),a=mm(a,[["exit",d,t],e[i-2],e[i-1],["exit",c,t]]),a=mm(a,e.slice(i+1)),a=mm(a,[["exit",l,t]]),fm(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let i,a,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){i=r.events[s][1];break}return function(t){if(!i)return n(t);if(i._inactive)return c(t);return a=r.parser.defined.includes(sg(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o};function o(t){return 40===t?e.attempt(Eg,u,a?u:c)(t):91===t?e.attempt(jg,u,a?l:c)(t):a?u(t):c(t)}function l(t){return e.attempt(Ag,u,c)(t)}function u(e){return t(e)}function c(e){return i._balanced=!0,n(e)}}},Eg={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Bm(t)?ag(e,i)(t):i(t)}function i(t){return 41===t?u(t):ng(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return Bm(t)?ag(e,o)(t):u(t)}function s(e){return n(e)}function o(t){return 34===t||39===t||40===t?ig(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return Bm(t)?ag(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},jg={tokenize:function(e,t,n){const r=this;return function(t){return rg.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(sg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Ag={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Sg={name:"labelStartImage",resolveAll:wg.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};function Ng(e){return null===e||Bm(e)||Lm(e)?1:Pm(e)?2:void 0}const Bg={name:"attention",resolveAll:function(e,t){let n,r,i,a,s,o,l,c,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close)for(n=d;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
vendor: 6,536 bytes, line 2
2n][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;o=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;const h=(0,u.A)({},e[n][1].end),p=(0,u.A)({},e[d][1].start);Tg(h,-o),Tg(p,o),a={type:o>1?"strongSequence":"emphasisSequence",start:h,end:(0,u.A)({},e[n][1].end)},s={type:o>1?"strongSequence":"emphasisSequence",start:(0,u.A)({},e[d][1].start),end:p},i={type:o>1?"strongText":"emphasisText",start:(0,u.A)({},e[n][1].end),end:(0,u.A)({},e[d][1].start)},r={type:o>1?"strong":"emphasis",start:(0,u.A)({},a.start),end:(0,u.A)({},s.end)},e[n][1].end=(0,u.A)({},a.start),e[d][1].start=(0,u.A)({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=mm(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=mm(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=mm(l,kg(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),l=mm(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(c=2,l=mm(l,[["enter",e[d][1],t],["exit",e[d][1],t]])):c=0,fm(e,n-1,d-n+3,l),d=n+l.length-c-2;break}d=-1;for(;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ng(r);let a;return function(t){return a=t,e.enter("attentionSequence"),s(t)};function s(o){if(o===a)return e.consume(o),s;const l=e.exit("attentionSequence"),u=Ng(o),c=!u||2===u&&i||n.includes(o),d=!i||2===i&&u||n.includes(r);return l._open=Boolean(42===a?c:c&&(i||!d)),l._close=Boolean(42===a?d:d&&(u||!c)),t(o)}}};function Tg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Pg={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return _m(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||km(e)?(r=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),r=0,o):(43===t||45===t||46===t||km(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Em(r)?n(r):(e.consume(r),o)}function l(t){return 64===t?(e.consume(t),u):wm(t)?(e.consume(t),l):n(t)}function u(e){return km(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,u):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||km(t))&&r++<63){const n=45===t?d:c;return e.consume(t),n}return n(t)}}};const Lg={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),o};function o(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),b):63===t?(e.consume(t),y):_m(t)?(e.consume(t),F):n(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),a=0,p):_m(t)?(e.consume(t),v):n(t)}function u(t){return 45===t?(e.consume(t),h):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):Nm(t)?(s=c,B(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),h):c(t)}function h(e){return 62===e?N(e):45===e?d(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):Nm(t)?(s=f,B(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):f(t)}function v(t){return null===t||62===t?N(t):Nm(t)?(s=v,B(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),D):Nm(t)?(s=y,B(t)):(e.consume(t),y)}function D(e){return 62===e?N(e):y(e)}function b(t){return _m(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||km(t)?(e.consume(t),x):C(t)}function C(t){return Nm(t)?(s=C,B(t)):Tm(t)?(e.consume(t),C):N(t)}function F(t){return 45===t||km(t)?(e.consume(t),F):47===t||62===t||Bm(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),N):58===t||95===t||_m(t)?(e.consume(t),k):Nm(t)?(s=_,B(t)):Tm(t)?(e.consume(t),_):N(t)}function k(t){return 45===t||46===t||58===t||95===t||km(t)?(e.consume(t),k):w(t)}function w(t){return 61===t?(e.consume(t),E):Nm(t)?(s=w,B(t)):Tm(t)?(e.consume(t),w):_(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,j):Nm(t)?(s=E,B(t)):Tm(t)?(e.consume(t),E):(e.consume(t),A)}function j(t){return t===i?(e.consume(t),i=void 0,S):null===t?n(t):Nm(t)?(s=j,B(t)):(e.consume(t),j)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Bm(t)?_(t):(e.consume(t),A)}function S(e){return 47===e||62===e||Bm(e)?_(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function B(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return Tm(t)?zm(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),s(t)}}};const Rg={name:"labelStartLink",resolveAll:wg.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const zg={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Nm(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Og={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[i][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;
vendor: 10,948 bytes, line 2
2return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),o(t))}function o(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),o):96===t?(i=e.enter("codeTextSequence"),r=0,u(t)):Nm(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Nm(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),l)}function u(n){return 96===n?(e.consume(n),r++,u):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}};const Mg={42:Xm,43:Xm,45:Xm,48:Xm,49:Xm,50:Xm,51:Xm,52:Xm,53:Xm,54:Xm,55:Xm,56:Xm,57:Xm,62:tg},Ig={91:og},Ug={[-2]:ug,[-1]:ug,32:ug},$g={35:dg,42:Jm,45:[hg,Jm],60:mg,61:hg,95:Jm,96:Dg,126:Dg},Wg={38:Cg,92:Fg},Hg={[-5]:_g,[-4]:_g,[-3]:_g,33:Sg,38:Cg,42:Bg,60:[Pg,Lg],91:Rg,92:[zg,Fg],93:wg,95:Bg,96:Og},qg={null:[Bg,qm]},Vg={null:[42,95]},Gg={null:[]};function Kg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],o=[],l=!0;const u={attempt:y(function(e,t){D(e,t.from)}),check:y(v),consume:function(e){Nm(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),o.push(n),n},exit:function(e){const t=o.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:y(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,b()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if("string"===typeof a)s=a;else switch(a){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(a)}i=-2===a,r.push(s)}return r.join("")}(p(e),t)},sliceStream:p,write:function(e){if(s=mm(s,e),m(),null!==s[s.length-1])return[];return D(t,0),c.events=kg(a,c.events,c),c.events}};let d,h=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function p(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const e=s[0];"string"===typeof e?s[0]=e.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}(s,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function m(){let e;for(;r._index<s.length;){const t=s[r._index];if("string"===typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){l=void 0,d=e,h=h(e)}function v(e,t){t.restore()}function y(e,t){return function(n,i,a){let s,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function m(e){return s=e,d=0,0===e.length?a:g(e[d])}function g(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(o);return{from:i,restore:s};function s(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,o=a,b()}}(),h=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y(n);return e.tokenize.call(t?Object.assign(Object.create(c),t):c,u,v,y)(n)}}function v(t){return l=!0,e(h,p),i}function y(e){return l=!0,p.restore(),++d<s.length?g(s[d]):a}}}function D(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&fm(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}const Yg=/[\0\t\n\r]/g;function Qg(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCodePoint(n)}const Jg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xg(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Qg(n.slice(t?2:1),t?16:10)}return xg(n)||e}const Zg={}.hasOwnProperty;function ev(e,t,n){return t&&"object"===typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:k,autolinkEmail:k,atxHeading:a(J),blockQuote:a(V),characterEscape:k,characterReference:k,codeFenced:a(G),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(G,s),codeText:a(K,s),codeTextData:k,data:k,codeFlowValue:k,definition:a(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Q),hardBreakEscape:a(X),hardBreakTrailing:a(X),htmlFlow:a(Z,s),htmlFlowData:k,htmlText:a(Z,s),htmlTextData:k,image:a(ee),label:s,link:a(te),listItem:a(re),listItemValue:h,listOrdered:a(ne,d),listUnordered:a(ne),paragraph:a(ie),reference:M,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(J),strong:a(ae),thematicBreak:a(oe)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:q,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:$,characterReference:W,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:w,codeIndented:l(v),codeText:l(N),codeTextData:w,data:w,definition:l(),definitionDestinationString:b,definitionLabelString:y,definitionTitleString:D,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(A),htmlFlowData:w,htmlText:l(S),htmlTextData:w,image:l(T),label:L,labelText:P,lineEnding:E,link:l(B),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:I,resourceDestinationString:R,resourceTitleString:z,resource:O,setextHeading:l(_),setextHeadingLineSequence:F,setextHeadingText:C,strong:l(),thematicBreak:l()}};nv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:o,exit:u,buffer:s,resume:c,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=i(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Zg.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||iv).call(a,void 0,e[0])}for(r.position={start:tv(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tv(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r,i,a,s,o=t-1,l=-1,u=!1;for(;++o<=n;){const t=e[o];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||a||(a=o),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=o;for(i=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||o,0,["exit",r,t[2]]),o++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(o,0,["enter",i,t[2]]),o++,n++,a=void 0,s=!0}}}return e[t][1]._spread=u,n}function a(e,t){return n;function n(n){o.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tv(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+$f({start:e.start,end:e.end})+"): it\u2019s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||iv).call(this,e,r[0])}n.position.end=tv(e.end)}function c(){return dm(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=sg(this.sliceSerialize(e)).toLowerCase()}function D(){const e=this.resume();this.stack[this.stack.length-1].title=e}function b(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function F(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function k(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=se(),n.position={start:tv(e.start),end:void 0},t.push(n)),this.stack.push(n)}function w(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tv(e.end)}function E(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=tv(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
vendor: 4,539 bytes, line 2
2ype)&&(k.call(this,e),w.call(this,e))}function j(){this.data.atHardBreak=!0}function A(){const e=this.resume();this.stack[this.stack.length-1].value=e}function S(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function B(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Jg,Xg)}(t),n.identifier=sg(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function O(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function I(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=sg(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function U(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Qg(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=xg(t)}this.stack[this.stack.length-1].value+=r}function W(e){this.stack.pop().position.end=tv(e.end)}function H(e){w.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){w.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function G(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Q(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ie(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function oe(){return{type:"thematicBreak"}}}(n)(function(e){for(;!ym(e););return e}(function(e){const t={constructs:xm([i,...(e||{}).extensions||[]]),content:n(Om),defined:[],document:n(Mm),flow:n(Hm),lazy:{},string:n(Vm),text:n(Gm)};return t;function n(e){return function(n){return Kg(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,a,s){const o=[];let l,u,c,d,h;for(i=n+("string"===typeof i?i.toString():new TextDecoder(a||void 0).decode(i)),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c<i.length;){if(Yg.lastIndex=c,l=Yg.exec(i),d=l&&void 0!==l.index?l.index:i.length,h=i.charCodeAt(d),!l){n=i.slice(c);break}if(10===h&&c===d&&e)o.push(-3),e=void 0;else switch(e&&(o.push(-5),e=void 0),c<d&&(o.push(i.slice(c,d)),t+=d-c),h){case 0:o.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),o.push(-2);t++<u;)o.push(-1);break;case 10:o.push(-4),t=1;break;default:e=!0,t=1}c=d+1}return s&&(e&&o.push(-5),n&&o.push(n),o.push(null)),o}}()(e,t,!0))))}function tv(e){return{line:e.line,column:e.column,offset:e.offset}}function nv(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?nv(e,r):rv(e,r)}}function rv(e,t){let n;for(n in t)if(Zg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function iv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$f({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$f({start:t.start,end:t.end}
2)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$f({start:t.start,end:t.end})+") is still open")}function av(e){const t=this;t.parser=function(n){return ev(n,(0,u.A)((0,u.A)((0,u.A)({},t.data("settings")),e),{},{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}const sv="object"===typeof self?self:globalThis,ov=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new sv[e](t)},lv=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case 0:case-1:return n(s,i);case 1:{const e=n([],i);for(const t of s)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),i);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),i)}case 5:{const e=n(new Map,i);for(const[t,n]of s)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,i);for(const t of s)e.add(r(t));return e}case 7:{const{name:e,message:t}=s;return n(ov(e,t),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(ov(a,s),i)};return r})(new Map,e)(0),uv="",{toString:cv}={},{keys:dv}=Object,hv=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=cv.call(e).slice(8,-1);switch(n){case"Array":return[1,uv];case"Object":return[2,uv];case"Date":return[3,uv];case"RegExp":return[4,uv];case"Map":return[5,uv];case"Set":return[6,uv];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},pv=e=>{let[t,n]=e;return 0===t&&("function"===n||"symbol"===n)},fv=function(e){let{json:t,lossy:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[s,o]=hv(r);switch(s){case 0:{let t=r;switch(o){case"bigint":s=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);t=null;break;case"undefined":return i([-1],r)}return i([s,t],r)}case 1:{if(o){let e=r;return"DataView"===o?e=new Uint8Array(r.buffer):"ArrayBuffer"===o&&(e=new Uint8Array(r)),i([o,[...e]],r)}const e=[],t=i([s,e],r);for(const n of r)e.push(a(n));return t}case 2:{if(o)switch(o){case"BigInt":return i([o,r.toString()],r);case"Boolean":case"Number":case"String":return i([o,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],l=i([s,n],r);for(const t of dv(r))!e&&pv(hv(r[t]))||n.push([a(t),a(r[t])]);return l}case 3:return i([s,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([s,{source:e,flags:t}],r)}case 5:{const t=[],n=i([s,t],r);for(const[i,s]of r)(e||!pv(hv(i))&&!pv(hv(s)))&&t.push([a(i),a(s)]);return n}case 6:{const t=[],n=i([s,t],r);for(const i of r)!e&&pv(hv(i))||t.push(a(i));return n}}const{message:l}=r;return i([s,{name:o,message:l}],r)};return a})(!(t||n),!!t,new Map,r)(e),r},mv="function"===typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?lv(fv(e,t)):structuredClone(e):(e,t)=>lv(fv(e,t));function gv(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(37===a&&km(e.charCodeAt(n+1))&&km(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(s=String.fromCharCode(a,t),i=1):s="\ufffd"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function vv(e,t){const n=[{type:"text",value:"\u21a9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function yv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Dv=function(e){if(null===e||void 0===e)return xv;if("function"===typeof e)return bv(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dv(e[n]);return bv(r);function r(){let e=-1;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++e<t.length;)if(t[e].apply(this,r))return!0;return!1}}(e):function(e){const t=e;return bv(n);function n(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0}}(e);if("string"===typeof e)return function(e){return bv(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function bv(e){return function(t,n,r){return Boolean(Cv(t)&&e.call(this,t,"number"===typeof n?n:void 0,r||void 0))}}function xv(){return!0}function Cv(e){return null!==e&&"object"===typeof e&&"type"in e}const Fv=[],_v=!0,kv=!1;function wv(e,t,n,r){let i;"function"===typeof t&&"function"!==typeof n?(r=n,n=t):i=t;const a=Dv(i),s=r?-1:1;!function e(i,o,l){const u=i&&"object"===typeof i?i:{};if("string"===typeof u.type){const e="string"===typeof u.tagName?u.tagName:"string"===typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){let u,c,d,h=Fv;if((!t||a(i,o,l[l.length-1]||void 0))&&(h=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[_v,e];return null===e||void 0===e?Fv:[e]}(n(i,l)),h[0]===kv))return h;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==h[0])for(c=(r?t.children.length:-1)+s,d=l.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(u=e(n,c,d)(),u[0]===kv)return u;c="number"===typeof u[1]?u[1]:c+s}}return h}}(e,void 0,[])()}function Ev(e,t,n,r){let i,a,s;"function"===typeof t&&"function"!==typeof n?(a=void 0,s=t,i=n):(a=t,s=n,i=r),wv(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},i)}function jv(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&"text"===s.type?s.value+=r:i.push({type:"text",value:r}),i}function Av(e){const t=e.spread;return null===t||void 0===t?e.children.length>1:t}function Sv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Nv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Nv(t.slice(i),i>0,!1)),a.join("")}function Nv(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const Bv={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
vendor: 4,404 bytes, line 2
2,footnoteReference:function(e,t){const n="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=gv(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);void 0===o?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jv(e,t);const i={src:gv(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:gv(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jv(e,t);const i={href:gv(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:gv(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Av(n[r])}return t}(n):Av(t),a={},s=[];if("boolean"===typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const e=r[o];(i||0!==o||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?s.push(e):s.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&s.push({type:"text",value:"\n"});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"===typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=If(t.children[1]),s=Mf(t.children[t.children.length-1]);a&&s&&(r.position={start:a,end:s}),i.push(r)}const a={type:"element",tagName:"table",properties:{}
vendor: 4,723 bytes, line 2
2,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,s=a?a.length:t.children.length;let o=-1;const l=[];for(;++o<s;){const n=t.children[o],r={},s=a?a[o]:void 0;s&&(r.align=s);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),l.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const n={type:"text",value:Sv(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Tv,yaml:Tv,definition:Tv,footnoteDefinition:Tv};function Tv(){}const Pv=["children"],Lv={}.hasOwnProperty,Rv={};function zv(e,t){e.position&&(t.position=function(e){const t=If(e),n=Mf(e);if(t&&n)return{start:t,end:n}}(e))}function Ov(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if("string"===typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&i&&Object.assign(n.properties,mv(i)),"children"in n&&n.children&&null!==r&&void 0!==r&&(n.children=r)}return n}function Mv(e,t){const n=t.data||{},r=!("value"in t)||Lv.call(n,"hProperties")||Lv.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Iv(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Uv(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function $v(e,t){const n=function(e,t){const n=t||Rv,r=new Map,i=new Map,a=new Map,s=(0,u.A)((0,u.A)({},Bv),n.handlers),o={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Uv(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Uv(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Ov,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:function(e,t){const n=e.type,r=o.handlers[n];if(Lv.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){const{children:t}=e,n=l(e,Pv),r=mv(n);return r.children=o.all(e),r}return mv(e)}return(o.options.unknownHandler||Mv)(o,e,t)},options:n,patch:zv,wrap:Iv};return Ev(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o}(e,t),r=n.one(e,void 0),i=function(e){const t="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vv,r=e.options.footnoteBackLabel||yv,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const a=e.all(i),s=String(i.identifier).toUpperCase(),u=gv(s.toLowerCase());let c=0;const d=[],h=e.footnoteCounts.get(s);for(;void 0!==h&&++c<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"===typeof n?n:n(l,c);"string"===typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"===typeof r?r:r(l,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=a[a.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else a.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(a,!0)};e.patch(i,f),o.push(f)}if(0!==o.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:(0,u.A)((0,u.A)({},mv(s)),{},{id:"footnote-label"}),children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)}
2,{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function Wv(e,t){return e&&"run"in e?async function(n,r){const i=$v(n,(0,u.A)({file:r},t));await e.run(i,r)}:function(n,r){return $v(n,(0,u.A)({file:r},e||t))}}function Hv(e){if(e)throw e}var qv=n(240);function Vv(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gv(){const e=[],t={run:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=-1;const a=n.pop();if("function"!==typeof a)throw new TypeError("Expected function as last argument, not "+a);!function t(r){const s=e[++i];let o=-1;if(r)a(r);else{for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];for(;++o<n.length;)null!==u[o]&&void 0!==u[o]||(u[o]=n[o]);n=u,s?function(e,t){let n;return i;function i(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];const l=e.length>i.length;let u;l&&i.push(a);try{u=e.apply(this,i)}catch(r){if(l&&n)throw r;return a(r)}l||(u&&u.then&&"function"===typeof u.then?u.then(s,a):u instanceof Error?a(u):s(u))}function a(e){if(!n){n=!0;for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t(e,...i)}}function s(e){a(null,e)}}(s,t)(...u):a(null,...u)}}(null,...n)},use:function(n){if("function"!==typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Kv={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');Yv(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,o=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else s<0&&(n=!0,s=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(i=a):(o=-1,i=s));r===i?i=s:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(Yv(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Yv(e);let t,n=e.length,r=-1,i=0,a=-1,s=0;for(;n--;){const o=e.codePointAt(n);if(47!==o)r<0&&(t=!0,r=n+1),46===o?a<0?a=n:1!==s&&(s=1):a>-1&&(s=-1);else if(t){i=n+1;break}}if(a<0||r<0||0===s||1===s&&a===r-1&&a===i+1)return"";return e.slice(a,r)},join:function(){let e,t=-1;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++t<r.length;)Yv(r[t]),r[t]&&(e=void 0===e?r[t]:e+"/"+r[t]);return void 0===e?".":function(e){Yv(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",a=0,s=-1,o=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===o);else if(s!==l-1&&2===o){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),s=l,o=0;continue}}else if(i.length>0){i="",a=0,s=l,o=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(s+1,l):i=e.slice(s+1,l),a=l-s-1;s=l,o=0}else 46===n&&o>-1?o++:o=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},sep:"/"};function Yv(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qv={cwd:function(){return"/"}};function Jv(e){return Boolean(null!==e&&"object"===typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Xv(e){if("string"===typeof e)e=new URL(e);else if(!Jv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Zv=["history","path","basename","stem","extname","dirname"];class ey{constructor(e){let t;t=e?Jv(e)?{path:e}:"string"===typeof e||function(e){return Boolean(e&&"object"===typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Qv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Zv.length;){const e=Zv[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Zv.includes(n)||(this[n]=t[n])}get basename(){return"string"===typeof this.path?Kv.basename(this.path):void 0}
2set basename(e){ny(e,"basename"),ty(e,"basename"),this.path=Kv.join(this.dirname||"",e)}get dirname(){return"string"===typeof this.path?Kv.dirname(this.path):void 0}set dirname(e){ry(this.basename,"dirname"),this.path=Kv.join(e||"",this.basename)}get extname(){return"string"===typeof this.path?Kv.extname(this.path):void 0}set extname(e){if(ty(e,"extname"),ry(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kv.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Jv(e)&&(e=Xv(e)),ny(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"===typeof this.path?Kv.basename(this.path,this.extname):void 0}set stem(e){ny(e,"stem"),ty(e,"stem"),this.path=Kv.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Vf(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"===typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function ty(e,t){if(e&&e.includes(Kv.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kv.sep+"`")}function ny(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ry(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const iy=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ay={}.hasOwnProperty;class sy extends iy{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Gv()}copy(){const e=new sy;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(qv(!0,{},this.namespace)),e}data(e,t){return"string"===typeof e?2===arguments.length?(cy("data",this.frozen),this.namespace[e]=t,this):ay.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cy("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"===typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=py(e),n=this.parser||this.Parser;return ly("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ly("process",this.parser||this.Parser),uy("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const a=py(e),s=n.parse(a);function o(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(s,a,function(e,t,r){if(e||!t||!r)return o(e);const i=t,a=n.stringify(i,r);var s;"string"===typeof(s=a)||function(e){return Boolean(e&&"object"===typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?r.value=a:r.result=a,o(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ly("processSync",this.parser||this.Parser),uy("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Hv(e),t=r}),hy("processSync","process",n),t}run(e,t,n){dy(e),this.freeze();const r=this.transformers;return n||"function"!==typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){const s=py(t);r.run(e,s,function(t,r,s){const o=r||e;t?a(t):i?i(o):n(void 0,o,s)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Hv(e),n=t,r=!0}),hy("runSync","run",r),n}stringify(e,t){this.freeze();const n=py(t),r=this.compiler||this.Compiler;return uy("stringify",r),dy(e),r(e,n)}use(e){const t=this.attachers,n=this.namespace;if(cy("use",this.frozen),null===e||void 0===e);else if("function"===typeof e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];u(e,i)}else{if("object"!==typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):o(e)}return this;function s(e){if("function"===typeof e)u(e,[]);else{if("object"!==typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;u(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(e.plugins),e.settings&&(n.settings=qv(!0,n.settings,e.settings))}function l(e){let t=-1;if(null===e||void 0===e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function u(e,n){let r=-1,i=-1;for(;++r<t.length;)if(t[r][0]===e){i=r;break}if(-1===i)t.push([e,...n]);else if(n.length>0){let[r,...a]=n;const s=t[i][1];Vv(s)&&Vv(r)&&(r=qv(!0,s,r)),t[i]=[e,r,...a]}}}}const oy=(new sy).freeze();function ly(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function uy(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function cy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dy(e){if(!Vv(e)||"string"!==typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function hy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function py(e){return function(e){return Boolean(e&&"object"===typeof e&&"message"in e&&"messages"in e)}(e)?e:new ey(e)}const fy=[],my={allowDangerousHtml:!0},gy=/^(https?|ircs?|mailto|xmpp)$/i,vy=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yy(e){const t=Dy(e),n=by(e);return xy(t.runSync(t.parse(n),n),e)}function Dy(e){const t=e.rehypePlugins||fy,n=e.remarkPlugins||fy,r=e.remarkRehypeOptions?(0,u.A)((0,u.A)({},e.remarkRehypeOptions),my):my;return oy().use(av).use(n).use(Wv,r).use(t)}function by(e){const t=e.children||"",n=new ey;return"string"===typeof t&&(n.value=t),n}function xy(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||
2Cy;for(const u of vy)Object.hasOwn(t,u.from)&&Jp((u.from,u.to&&u.to,u.id));return Ev(e,function(e,t,i){if("raw"===e.type&&i&&"number"===typeof t)return s?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in um)if(Object.hasOwn(um,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=um[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let s=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!s&&r&&"number"===typeof t&&(s=!r(e,t,i)),s&&i&&"number"===typeof t)return o&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),Zf(e,{Fragment:sd.Fragment,components:i,ignoreInvalidStyle:!0,jsx:sd.jsx,jsxs:sd.jsxs,passKeys:!0,passNode:!0})}function Cy(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||gy.test(e.slice(0,t))?e:""}function Fy(e,t){const n=String(e);if("string"!==typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function _y(e,t,n){const r=Dv((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([ky(e[0]),wy(e[1])])}return t}(t);let a=-1;for(;++a<i.length;)wv(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){const e=t[s],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[a][0],s=i[a][1];let o=0;const l=n.children.indexOf(e);let u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,i={index:d.index,input:d.input,stack:[...t,e]};let a=s(...d,i);if("string"===typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(o!==n&&c.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(a)?c.push(...a):a&&c.push(a),o=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}u?(o<e.value.length&&c.push({type:"text",value:e.value.slice(o)}),n.children.splice(l,1,...c)):c=[e];return l+c.length}(e,t)}}function ky(e){return"string"===typeof e?new RegExp(function(e){if("string"!==typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function wy(e){return"function"===typeof e?e:function(){return e}}const Ey="phrasing",jy=["autolink","link","image","label"];function Ay(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sy(e){this.config.enter.autolinkProtocol.call(this,e)}function Ny(e){this.config.exit.autolinkProtocol.call(this,e)}function By(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ty(e){this.config.exit.autolinkEmail.call(this,e)}function Py(e){this.exit(e)}function Ly(e){_y(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ry],[/(?<=^|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]|(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F])|(?:[\$\+<->
2\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]))([\+\x2D\.0-9A-Z_a-z]+)@([\x2D0-9A-Z_a-z]+(?:\.[\x2D0-9A-Z_a-z]+)+)/g,zy]],{ignore:["link","linkReference"]})}function Ry(e,t,n,r,i){let a="";if(!Oy(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const s=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Fy(e,"(");let a=Fy(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function zy(e,t,n,r){return!(!Oy(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Oy(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Lm(n)||Pm(n))&&(!t||47!==n)}function My(){this.buffer()}function Iy(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Uy(){this.buffer()}function $y(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Wy(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hy(e){this.exit(e)}function qy(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vy(e){this.exit(e)}function Gy(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function Ky(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const a=r.createTracker(i);let s=a.move("[^");const o=r.enter("footnoteDefinition"),l=r.enter("label");s+=a.move(r.safe(r.associationId(e),{before:s,after:"]"})),l(),s+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),s+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?Qy:Yy)));return o(),s},footnoteReference:Gy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}
2function Yy(e,t,n){return 0===t?e:Qy(e,t,n)}function Qy(e,t,n){return(n?"":"    ")+e}Gy.peek=function(){return"["};const Jy=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Xy(e){this.enter({type:"delete",children:[]},e)}function Zy(e){this.exit(e)}function eD(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,(0,u.A)((0,u.A)({},i.current()),{},{before:s,after:"~"})),s+=i.move("~~"),a(),s}function tD(e){return e.length}function nD(e){return null===e||void 0===e?"":String(e)}function rD(e){const t="string"===typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function iD(e,t,n){return">"+(n?"":" ")+e}function aD(e,t){return sD(e,t.inConstruct,!0)&&!sD(e,t.notInConstruct,!1)}function sD(e,t,n){if("string"===typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function oD(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&aD(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function lD(e,t,n){return(n?"":"    ")+e}function uD(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cD(e){return"&#x"+e.toString(16).toUpperCase()+";"}function dD(e,t,n){const r=Ng(e),i=Ng(t);return void 0===r?void 0===i?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function hD(e,t,n,r){const i=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),a=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let l=s.move(n.containerPhrasing(e,(0,u.A)({after:i,before:o},s.current())));const c=l.charCodeAt(0),d=dD(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(l=cD(c)+l.slice(1));const h=l.charCodeAt(l.length-1),p=dD(r.after.charCodeAt(0),h,i);p.inside&&(l=l.slice(0,-1)+cD(h));const f=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+l+f}function pD(e){return e.value||""}function fD(e,t,n,r){const i=uD(n),a='"'===i?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,(0,u.A)({before:c,after:"]"},l.current()))),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,(0,u.A)({before:c,after:">"},l.current()))),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,(0,u.A)({before:c,after:e.title?" ":")"},l.current())))),o(),e.title&&(o=n.enter("title".concat(a)),c+=l.move(" "+i),c+=l.move(n.safe(e.title,(0,u.A)({before:c,after:i},l.current()))),c+=l.move(i),o()),c+=l.move(")"),s(),c}function mD(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const c=n.safe(e.alt,(0,u.A)({before:l,after:"]"},o.current()));l+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),(0,u.A)({before:l,after:"]"},o.current()));return s(),n.stack=d,a(),"full"!==i&&c&&c===h?"shortcut"===i?l=l.slice(0,-1):l+=o.move("]"):l+=o.move(h+"]"),l}function gD(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);let i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function vD(e,t){const n=dm(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function yD(e,t,n,r){const i=uD(n),a='"'===i?"Quote":"Apostrophe",s=n.createTracker(r);let o,l;if(vD(e,n)){const t=n.stack;n.stack=[],o=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,(0,u.A)({before:r,after:">"},s.current()))),r+=s.move(">"),o(),n.stack=t,r}o=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,(0,u.A)({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,(0,u.A)({before:c,after:">"},s.current()))),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,(0,u.A)({before:c,after:e.title?" ":")"},s.current())))),l(),e.title&&(l=n.enter("title".concat(a)),c+=s.move(" "+i),c+=s.move(n.safe(e.title,(0,u.A)({before:c,after:i},s.current()))),c+=s.move(i),l()),c+=s.move(")"),o(),c}function DD(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const c=n.containerPhrasing(e,(0,u.A)({before:l,after:"]"},o.current()));l+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),(0,u.A)({before:l,after:"]"},o.current()));return s(),n.stack=d,a(),"full"!==i&&c&&c===h?"shortcut"===i?l=l.slice(0,-1):l+=o.move("]"):l+=o.move(h+"]"),l}function bD(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function xD(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}eD.peek=function(){return"~"},hD.peek=function(e,t,n){return n.options.emphasis||"*"},pD.peek=function(){return"<"},fD.peek=function(){return"!"},mD.peek=function(){return"!"},gD.peek=function(){return"`"},yD.peek=function(e,t,n){return vD(e,n)?"<":"["},DD.peek=function(){return"["};const CD=Dv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function FD(e,t,n,r){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let l=s.move(n.containerPhrasing(e,(0,u.A)({after:i,before:o},s.current())));const c=l.charCodeAt(0),d=dD(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(l=cD(c)+l.slice(1));const h=l.charCodeAt(l.length-1),p=dD(r.after.charCodeAt(0),h,i);p.inside&&(l=l.slice(0,-1)+cD(h));const f=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+l+f}FD.peek=function(e,t,n){return n.options.strong||"*"};const _D={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),iD);return i(),s},break:oD,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",s="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}
2(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,lD);return e(),t}const o=n.createTracker(r),l=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if("string"!==typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}(a,i)+1,3)),c=n.enter("codeFenced");let d=o.move(l);if(e.lang){const t=n.enter("codeFencedLang".concat(s));d+=o.move(n.safe(e.lang,(0,u.A)({before:d,after:" ",encode:["`"]},o.current()))),t()}if(e.lang&&e.meta){const t=n.enter("codeFencedMeta".concat(s));d+=o.move(" "),d+=o.move(n.safe(e.meta,(0,u.A)({before:d,after:"\n",encode:["`"]},o.current()))),t()}return d+=o.move("\n"),a&&(d+=o.move(a+"\n")),d+=o.move(l),c(),d},definition:function(e,t,n,r){const i=uD(n),a='"'===i?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),(0,u.A)({before:c,after:"]"},l.current()))),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,(0,u.A)({before:c,after:">"},l.current()))),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,(0,u.A)({before:c,after:e.title?" ":"\n"},l.current())))),o(),e.title&&(o=n.enter("title".concat(a)),c+=l.move(" "+i),c+=l.move(n.safe(e.title,(0,u.A)({before:c,after:i},l.current()))),c+=l.move(i),o()),s(),c},emphasis:hD,hardBreak:oD,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return Ev(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,kv}),Boolean((!e.depth||e.depth<3)&&dm(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,(0,u.A)((0,u.A)({},a.current()),{},{before:"\n",after:"\n"}));return r(),t(),s+"\n"+(1===i?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,(0,u.A)({before:"# ",after:"\n"},a.current()));return/^[\t ]/.test(c)&&(c=cD(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),o(),c},html:pD,image:fD,imageReference:mD,inlineCode:gD,link:yD,linkReference:DD,list:function(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):bD(n);const o=e.ordered?"."===s?")":".":function(e){const t=bD(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),xD(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(s=o),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),u},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||bD(n);t&&"list"===t.type&&t.ordered&&(a=("number"===typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let s=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),function(e,t,n){if(t)return(n?"":" ".repeat(s))+e;return(n?a:a+" ".repeat(s-a.length))+e});return l(),u},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s},root:function(e,t,n,r){const i=e.children.some(function(e){return CD(e)});
vendor: 14,218 bytes, line 2
2return(i?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:FD,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(xD(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function kD(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function wD(e){this.exit(e),this.data.inTable=void 0}function ED(e){this.enter({type:"tableRow",children:[]},e)}function jD(e){this.exit(e)}function AD(e){this.enter({type:"tableCell",children:[]},e)}function SD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ND));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ND(e,t){return"|"===t?t:e}function BD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=_D.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return o(function(e,t,n){const r=e.children;let i=-1;const a=[],s=t.enter("table");for(;++i<r.length;)a[i]=l(r[i],t,n);return s(),a}(e,n,r),e.align)},tableCell:s,tableRow:function(e,t,n,r){const i=l(e,n,r),a=o([i]);return a.slice(0,a.indexOf("\n"))}}};function s(e,t,n,r){const i=n.enter("tableCell"),s=n.enter("phrasing"),o=n.containerPhrasing(e,(0,u.A)((0,u.A)({},r),{},{before:a,after:a}));return s(),i(),o}function o(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||tD,a=[],s=[],o=[],l=[];let u=0,c=-1;for(;++c<e.length;){const t=[],r=[];let a=-1;for(e[c].length>u&&(u=e[c].length);++a<e[c].length;){const s=nD(e[c][a]);if(!1!==n.alignDelimiters){const e=i(s);r[a]=e,(void 0===l[a]||e>l[a])&&(l[a]=e)}t.push(s)}s[c]=t,o[c]=r}let d=-1;if("object"===typeof r&&"length"in r)for(;++d<u;)a[d]=rD(r[d]);else{const e=rD(r);for(;++d<u;)a[d]=e}d=-1;const h=[],p=[];for(;++d<u;){const e=a[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const s=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&(i=t.length+i+r.length,i>l[d]&&(l[d]=i),p[d]=i),h[d]=s}s.splice(1,0,h),o.splice(1,0,p),c=-1;const f=[];for(;++c<s.length;){const e=s[c],t=o[c];d=-1;const r=[];for(;++d<u;){const i=e[d]||"";let s="",o="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=a[d];114===n?s=" ".repeat(e):99===n?e%2?(s=" ".repeat(e/2+.5),o=" ".repeat(e/2-.5)):(s=" ".repeat(e/2),o=s):o=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===i||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(s),r.push(i),!1!==n.alignDelimiters&&r.push(o),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===u-1||r.push("|")}f.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return f.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){const r=e.children;let i=-1;const a=[],o=t.enter("tableRow");for(;++i<r.length;)a[i]=s(r[i],0,t,n);return o(),a}}function TD(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function PD(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"===typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"===typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function LD(e,t,n,r){const i=e.children[0],a="boolean"===typeof e.checked&&i&&"paragraph"===i.type,s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let l=_D.listItem(e,t,n,(0,u.A)((0,u.A)({},r),o.current()));return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+s})),l}const RD={tokenize:function(e,t,n){let r=0;return function t(a){if((87===a||119===a)&&r<3)return r++,e.consume(a),t;if(46===a&&3===r)return e.consume(a),i;return n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},zD={tokenize:function(e,t,n){let r,i,a;return s;function s(t){return 46===t||95===t?e.check(MD,l,o)(t):null===t||Bm(t)||Lm(t)||45!==t&&Pm(t)?l(t):(a=!0,e.consume(t),s)}function o(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),s}function l(e){return i||r||!a?n(e):t(e)}},partial:!0},OD={tokenize:function(e,t){let n=0,r=0;return i;function i(s){return 40===s?(n++,e.consume(s),i):41===s&&r<n?a(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(MD,t,a)(s):null===s||Bm(s)||Lm(s)?t(s):(e.consume(s),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},MD={tokenize:function(e,t,n){return r;function r(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),r):38===s?(e.consume(s),a):93===s?(e.consume(s),i):60===s||null===s||Bm(s)||Lm(s)?t(s):n(s)}function i(e){return null===e||40===e||91===e||Bm(e)||Lm(e)?t(e):r(e)}function a(e){return _m(e)?s(e):n(e)}function s(t){return 59===t?(e.consume(t),r):_m(t)?(e.consume(t),s):n(t)}},partial:!0},ID={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return km(e)?n(e):t(e)}},partial:!0},UD={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!VD.call(r,r.previous)||QD(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(RD,e.attempt(zD,e.attempt(OD,i),n),n)(t)};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:VD},$D={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",a=!1;return function(t){if((72===t||104===t)&&GD.call(r,r.previous)&&!QD(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),s;return n(t)};function s(t){if(_m(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),o}return n(t)}function o(t){return 47===t?(e.consume(t),a?l:(a=!0,o)):n(t)}function l(t){return null===t||Em(t)||Bm(t)||Lm(t)||Pm(t)?n(t):e.attempt(zD,e.attempt(OD,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:GD},WD={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,a;return function(t){if(!YD(t)||!KD.call(r,r.previous)||QD(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)};function s(t){return YD(t)?(e.consume(t),s):64===t?(e.consume(t),o):n(t)}function o(t){return 46===t?e.check(ID,u,l)(t):45===t||95===t||km(t)?(a=!0,e.consume(t),o):u(t)}function l(t){return e.consume(t),i=!0,o}function u(s){return a&&i&&_m(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:KD},HD={};let qD=48;for(;qD<123;)HD[qD]=WD,qD++,58===qD?qD=65:91===qD&&(qD=97);function VD(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Bm(e)}function GD(e){return!_m(e)}function KD(e){return!(47===e||YD(e))}function YD(e){return 43===e||45===e||46===e||95===e||km(e)}function QD(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}HD[43]=WD,HD[45]=WD,HD[46]=WD,HD[95]=WD,HD[72]=[WD,$D],HD[104]=[WD,$D],HD[87]=[WD,UD],HD[119]=[WD,UD];const JD={tokenize:function(e,t,n){const r=this;return zm(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function XD(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!s||!s._balanced)return n(i);const o=sg(r.sliceSerialize({start:s.end,end:r.now()}));if(94!==o.codePointAt(0)||!a.includes(o.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function ZD(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...l),e}function eb(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(o){if(s>999||93===o&&!a||null===o||91===o||Bm(o))return n(o);if(93===o){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(sg(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(o)}return Bm(o)||(a=!0),s++,e.consume(o),92===o?u:l}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function tb(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s,o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(o>999||93===t&&!s||null===t||91===t||Bm(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=sg(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Bm(t)||(s=!0),o++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),o++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),zm(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}function nb(e,t,n){return e.check(Um,t,e.attempt(JD,t,n))}function rb(e){e.exit("gfmFootnoteDefinition")}function ib(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,a=this.events;let s=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),o(t)};function o(a){const l=Ng(i);if(126===a)return s>1?r(a):(e.consume(a),s++,o);if(s<2&&!t)return r(a);const u=e.exit("strikethroughSequenceTemporary"),c=Ng(a);return u._open=!c||2===c&&Boolean(l),u._close=!l||2===l&&Boolean(c),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],o=t.parser.constructs.insideSpan.null;o&&fm(s,s.length,0,kg(o,e.slice(r+1,n),t)),fm(s,s.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),fm(e,r-1,n-r+3,s),n=r+s.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null!==t&&void 0!==t||(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class ab{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0===n&&0===r.length)return;for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=n,void e.map[i][2].push(...r);i+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}
vendor: 4,152 bytes, line 2
2function sb(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function ob(e,t,n){const r=this;let i,a=0,s=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?b:o;if(a===b&&r.parser.lazy[r.now().line])return n(e);return a(e)};function o(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return i=!0,s+=1,l(e)}(t)}function l(t){return null===t?n(t):Nm(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Tm(t)?zm(e,l,"whitespace")(t):(s+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),u(t)))}function u(t){return null===t||124===t||Bm(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,Tm(t)?zm(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t))}function h(t){return 45===t||58===t?f(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):D(t)}function p(t){return Tm(t)?zm(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||Nm(t)?y(t):D(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):D(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return Tm(t)?zm(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?h(n):(null===n||Nm(n))&&i&&a===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):D(n)}function D(e){return n(e)}function b(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||Nm(n)?(e.exit("tableRow"),t(n)):Tm(n)?zm(e,x,"whitespace")(n):(e.enter("data"),C(n))}function C(t){return null===t||124===t||Bm(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?F:C)}function F(t){return 92===t||124===t?(e.consume(t),C):C(t)}}function lb(e,t){let n,r,i,a=-1,s=!0,o=0,l=[0,0,0,0],u=[0,0,0,0],c=!1,d=0;const h=new ab;for(;++a<e.length;){const p=e[a],f=p[1];"enter"===p[0]?"tableHead"===f.type?(c=!1,0!==d&&(cb(h,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(a,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(s=!0,i=void 0,l=[0,0,0,0],u=[0,a+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(a,0,[["enter",r,t]])),o="tableDelimiterRow"===f.type?2:r?3:1):!o||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(s?s=!1:(0!==l[1]&&(u[0]=u[1],i=ub(h,t,l,o,void 0,i)),l=u,u=[l[1],a,0,0])):(s=!1,0===u[2]&&(0!==l[1]&&(u[0]=u[1],i=ub(h,t,l,o,void 0,i),l=[0,0,0,0]),u[2]=a)):"tableHead"===f.type?(c=!0,d=a):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=a,0!==l[1]?(u[0]=u[1],i=ub(h,t,l,o,a,i)):0!==u[1]&&(i=ub(h,t,u,o,a,i)),o=0):!o||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(u[3]=a)}for(0!==d&&cb(h,t,d,n,r),h.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=sb(t.events,a))}return e}function ub(e,t,n,r,i,a){const s=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({}
2,db(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=db(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const i=db(t.events,n[2]),a=db(t.events,n[3]),s={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",s,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==i&&(a.end=Object.assign({},db(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function cb(e,t,n,r,i){const a=[],s=db(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function db(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const hb={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Bm(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return Nm(r)?t(r):Tm(r)?e.check({tokenize:pb},t,n)(r):n(r)}}};function pb(e,t,n){return zm(e,function(e){return null===e?n(e):t(e)},"whitespace")}const fb={};function mb(e){const t=e||fb,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return xm([{text:HD},{document:{91:{name:"gfmFootnoteDefinition",tokenize:tb,continuation:{tokenize:nb},exit:rb}},text:{91:{name:"gfmFootnoteCall",tokenize:eb},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XD,resolveTo:ZD}}},ib(e),{flow:{null:{name:"table",tokenize:ob,resolveAll:lb}}},{text:{91:hb}}])}(t)),i.push([{transforms:[Ly],enter:{literalAutolink:Ay,literalAutolinkEmail:Sy,literalAutolinkHttp:Sy,literalAutolinkWww:Sy},exit:{literalAutolink:Py,literalAutolinkEmail:Ty,literalAutolinkHttp:Ny,literalAutolinkWww:By}},{enter:{gfmFootnoteCallString:My,gfmFootnoteCall:Iy,gfmFootnoteDefinitionLabelString:Uy,gfmFootnoteDefinition:$y},exit:{gfmFootnoteCallString:Wy,gfmFootnoteCall:Hy,gfmFootnoteDefinitionLabelString:qy,gfmFootnoteDefinition:Vy}},{canContainEols:["delete"],enter:{strikethrough:Xy},exit:{strikethrough:Zy}},{enter:{table:kD,tableData:AD,tableHeader:AD,tableRow:ED},exit:{codeText:SD,table:wD,tableData:jD,tableHeader:jD,tableRow:jD}},{exit:{taskListCheckValueChecked:TD,taskListCheckValueUnchecked:TD,paragraph:PD}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ey,notInConstruct:jy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ey,notInConstruct:jy},{character:":",before:"[ps]",after:"\\/",inConstruct:Ey,notInConstruct:jy}]},Ky(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Jy}],handlers:{delete:eD}},BD(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:LD}}]}}(t))}const gb={privacy:{title:"Privacy Policy",eyebrow:"Legal \xb7 Privacy",file:"/legal/privacy.md",altPath:"/terms",altLabel:"Read Terms & Conditions \u2192"},terms:{title:"Terms & Conditions",eyebrow:"Legal \xb7 Terms",file:"/legal/terms.md",altPath:"/privacy",altLabel:"Read Privacy Policy \u2192"},extensionPrivacy:{title:"Vidhya Autofill \u2014 Extension Privacy Policy",eyebrow:"Legal \xb7 Browser extension",file:"/legal/extension-privacy.md",altPath:"/privacy",altLabel:"Read main Privacy Policy \u2192"}};function vb(e){let{doc:t}=e;const n=gb[t],r=Fe(),[i,s]=(0,a.useState)(""),[o,l]=(0,a.useState)(!0),[u,c]=(0,a.useState)("");return(0,a.useEffect)(()=>{let e=!1;return l(!0),c(""),fetch(n.file).then(e=>{if(!e.ok)throw new Error("Failed to load document (".concat(e.status,")"));return e.text()}).then(t=>{e||(s(t),l(!1),window.scrollTo({top:0,behavior:"instant"}))}).catch(t=>{e||(c(String(t.message||t)),l(!1))}),()=>{e=!0}},[n.file]),(0,sd.jsxs)("div",{className:"legal-shell","data-testid":"legal-".concat(t,"-page"),children:[(0,sd.jsxs)("header",{className:"legal-topbar",children:[(0,sd.jsx)("button",{type:"button",className:"legal-brand",onClick:()=>r("/"),"aria-label":"Vidhya home","data-testid":"legal-home-link",children:(0,sd.jsx)(Dd,{size:32})}),(0,sd.jsxs)("nav",{className:"legal-topnav",children:[(0,sd.jsx)(wt,{to:"/privacy",className:"legal-topnav-link ".concat("privacy"===t?"active":""),"data-testid":"legal-nav-privacy",children:"Privacy"}),(0,sd.jsx)(wt,{to:"/terms",className:"legal-topnav-link ".concat("terms"===t?"active":""),"data-testid":"legal-nav-terms",children:"Terms"}
2),(0,sd.jsx)("a",{href:"mailto:[email protected]",className:"legal-topnav-link","data-testid":"legal-nav-contact",children:"Contact"})]})]}),(0,sd.jsxs)("main",{className:"legal-main",children:[(0,sd.jsx)("div",{className:"legal-eyebrow",children:n.eyebrow}),(0,sd.jsx)("h1",{className:"legal-h1",children:n.title}),o&&(0,sd.jsx)("p",{className:"legal-muted","data-testid":"legal-loading",children:"Loading\u2026"}),u&&(0,sd.jsxs)("p",{className:"legal-error","data-testid":"legal-error",children:["Couldn't load the document. ",u,(0,sd.jsx)("br",{}),(0,sd.jsx)("a",{href:"mailto:[email protected]",children:"Email us for a copy."})]}),!o&&!u&&(0,sd.jsx)("article",{className:"legal-article","data-testid":"legal-content",children:(0,sd.jsx)(yy,{remarkPlugins:[mb],children:i})}),(0,sd.jsxs)("div",{className:"legal-footer-actions",children:[(0,sd.jsx)(wt,{to:n.altPath,className:"legal-altlink","data-testid":"legal-alt-link",children:n.altLabel}),(0,sd.jsx)(wt,{to:"/",className:"legal-altlink","data-testid":"legal-back-home",children:"\u2190 Back to Vidhya"})]}),(0,sd.jsxs)("p",{className:"legal-contact-block",children:["Questions? Reach us at"," ",(0,sd.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]})]}),(0,sd.jsxs)("footer",{className:"legal-bottom",children:["\xa9 ",(new Date).getFullYear()," Super Apply LLC \xb7 Vidhya \xb7 govidhya.com"]})]})}const yb=()=>(0,sd.jsx)(vb,{doc:"privacy"}),Db=()=>(0,sd.jsx)(vb,{doc:"terms"}),bb=()=>(0,sd.jsx)(vb,{doc:"extensionPrivacy"});var xb=n(722);function Cb(){const e=new URLSearchParams(window.location.search),t=e.get("scope")||"profile.autofill.read",n=e.get("redirect_uri")||"",[r,i]=(0,a.useState)(""),[s,o]=(0,a.useState)(""),[l,u]=(0,a.useState)(!1),[c,d]=(0,a.useState)(""),h=n.endsWith(".chromiumapp.org/")&&e.get("code_challenge")&&e.get("client_id");return(0,sd.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--paper, #faf8f5)",padding:20},"data-testid":"oauth-authorize-page",children:(0,sd.jsxs)("div",{style:{width:420,maxWidth:"100%",background:"#fff",border:"1px solid var(--line, #e7e3dc)",borderRadius:16,padding:28,boxShadow:"0 10px 40px rgba(0,0,0,.06)"},children:[(0,sd.jsx)("div",{style:{marginBottom:18},children:(0,sd.jsx)(Dd,{size:30})}),(0,sd.jsx)("div",{className:"eyebrow",children:"Browser extension"}),(0,sd.jsxs)("h1",{style:{fontSize:22,margin:"6px 0 4px"},children:["Authorize ",(0,sd.jsx)("em",{children:"Vidhya Autofill"})]}),(0,sd.jsxs)("p",{style:{fontSize:13.5,color:"#6b6b6b",lineHeight:1.6,margin:"0 0 18px"},children:["The extension is asking to ",(0,sd.jsx)("strong",{children:"read your saved application details"})," so it can autofill university forms. It can't see your password, can't submit applications, and can't access your essays."]}),h?(0,sd.jsxs)("form",{onSubmit:async i=>{i.preventDefault(),u(!0),d("");try{const i=await xb.A.post("".concat(ad.n,"/oauth/authorize"),{email:r,password:s,client_id:e.get("client_id"),redirect_uri:n,state:e.get("state")||"",code_challenge:e.get("code_challenge"),code_challenge_method:e.get("code_challenge_method")||"S256",scope:t});window.location.assign(i.data.redirect_url)}catch(l){var a,o;d((null===l||void 0===l||null===(a=l.response)||void 0===a||null===(o=a.data)||void 0===o?void 0:o.detail)||"Couldn't sign you in. Check your details and try again."),u(!1)}},children:[c&&(0,sd.jsx)("div",{className:"auth-error","data-testid":"oauth-error",style:{marginBottom:12},children:c}),(0,sd.jsx)("label",{className:"p-label",children:"Email"}),(0,sd.jsx)("input",{className:"input",type:"email",required:!0,value:r,onChange:e=>i(e.target.value),"data-testid":"oauth-email",style:{marginBottom:12}}),(0,sd.jsx)("label",{className:"p-label",children:"Password"}),(0,sd.jsx)("input",{className:"input",type:"password",required:!0,value:s,onChange:e=>o(e.target.value),"data-testid":"oauth-password",style:{marginBottom:16}}),(0,sd.jsxs)("div",{style:{fontSize:12,color:"#6b6b6b",background:"var(--paper-2, #f3efe9)",borderRadius:8,padding:"8px 10px",marginBottom:16},children:["Grants: ",(0,sd.jsx)("strong",{children:t})]}),(0,sd.jsx)("button",{className:"btn-primary",type:"submit",disabled:l,"data-testid":"oauth-approve-btn",style:{width:"100%"},children:l?"Authorizing\u2026":"Sign in & allow access"})]}):(0,sd.jsx)("div",{className:"auth-error","data-testid":"oauth-invalid",children:"This authorization link is invali
2d or incomplete. Please re-launch from the extension."})]})})}function Fb(e){if(!e)return e;const t=e.trim(),n=function(e){if(!e)return e;let t=String(e).trim();for(let n=0;n<3;n++){const e=t,n=t.match(/^\[([^]+)\]$/)||t.match(/^\(([^]+)\)$/)||t.match(/^"([^]+)"$/)||t.match(/^'([^]+)'$/)||t.match(/^`([^]+)`$/)||t.match(/^\u201C([^]+)\u201D$/)||t.match(/^\u2018([^]+)\u2019$/);if(n&&(t=n[1].trim()),t===e)break}return t}(t);if(n!==t){const t=e.match(/^(\s*(?:[-*\u2022]\s+|\d+[.)]\s+))/);return(t?t[1]:"")+n}return e}function _b(e){const t=String(e||"").split("\n").map(Fb),n=[];return t.forEach((e,t)=>{const r=e.trim();if(/^([-*_])\1{2,}$/.test(r))return;const i=r.match(/^(#{1,6})\s+(.*)$/);if(i){const e=i[2].replace(/\*\*/g,"").replace(/[*_#]+$/g,"").trim();return void(e&&n.push((0,sd.jsx)("h4",{className:"ai-memo-h",children:e},t)))}""!==r&&(r.startsWith("- ")||r.startsWith("* ")||r.startsWith("\u2022 ")?n.push((0,sd.jsx)("li",{style:{marginLeft:18},children:r.replace(/^[-*\u2022]\s+/,"").split(/(\*\*[^*]+\*\*)/g).map((e,t)=>e.startsWith("**")?(0,sd.jsx)("strong",{children:e.slice(2,-2)},t):(0,sd.jsx)("span",{children:e},t))},t)):n.push((0,sd.jsx)("p",{children:e.split(/(\*\*[^*]+\*\*)/g).map((e,t)=>e.startsWith("**")?(0,sd.jsx)("strong",{children:e.slice(2,-2)},t):(0,sd.jsx)("span",{children:e},t))},t)))}),n}const kb={web_browse:{icon:(0,sd.jsx)(pd.Globe,{size:13}),label:"Official page",running:"Researching live sources\u2026"},extract:{icon:(0,sd.jsx)(pd.Doc,{size:13}),label:"Official page",running:"Reading the official page\u2026"},research_university:{icon:(0,sd.jsx)(pd.Globe,{size:13}),label:"Program research",running:"Researching the program\u2026"},web_search:{icon:(0,sd.jsx)(pd.Search,{size:13}),label:"Live research",running:"Searching live\u2026"},find_professors:{icon:(0,sd.jsx)(pd.GraduationCap,{size:13}),label:"Faculty",running:"Looking up faculty\u2026"},find_scholarships:{icon:(0,sd.jsx)(pd.Trophy,{size:13}),label:"Scholarships",running:"Finding scholarships\u2026"},add_to_shortlist:{icon:(0,sd.jsx)(pd.Plus,{size:13}),label:"Added to your board",running:"Adding to your board\u2026"},create_task:{icon:(0,sd.jsx)(pd.Check,{size:13}),label:"Suggested task",running:"Thinking of a next step\u2026"},draft_email:{icon:(0,sd.jsx)(pd.Mail,{size:13}),label:"Email draft",running:"Drafting your email\u2026"}};function wb(e){let{tool:t,status:n,children:r}=e;const i=kb[t]||{icon:(0,sd.jsx)(pd.Bolt,{size:13}),label:"Working",running:"Working\u2026"};return"running"===n?(0,sd.jsxs)("div",{className:"tool-chip","data-testid":"tool-chip-".concat(t),children:[(0,sd.jsx)("span",{className:"tool-chip-caret",children:"\u25b8"}),(0,sd.jsx)("span",{className:"tool-chip-ico",children:i.icon}),(0,sd.jsx)("span",{className:"tool-chip-label",children:i.running}),(0,sd.jsxs)("span",{className:"tool-chip-dots",children:[(0,sd.jsx)("i",{}),(0,sd.jsx)("i",{}),(0,sd.jsx)("i",{})]})]}):(0,sd.jsxs)("div",{className:"tool-card","data-testid":"tool-card-".concat(t),children:[(0,sd.jsxs)("div",{className:"tool-card-header",children:[(0,sd.jsx)("div",{className:"tool-icon",children:i.icon}),(0,sd.jsx)("div",{className:"tool-name",children:i.label}),(0,sd.jsx)("div",{className:"tool-status done",children:(0,sd.jsx)(pd.Check,{size:12})})]}),"done"===n&&r&&(0,sd.jsx)("div",{className:"tool-result",children:r})]})}function Eb(e){let{profs:t}=e;return null!==t&&void 0!==t&&t.length?(0,sd.jsx)("div",{className:"prof-list",children:t.slice(0,5).map((e,t)=>(0,sd.jsxs)("div",{className:"prof-row",children:[(0,sd.jsx)("div",{className:"prof-avatar",children:(e.name||"?").split(" ").map(e=>e[0]).slice(0,2).join("")}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"prof-name",children:e.name}),(0,sd.jsx)("div",{className:"prof-research",children:e.research})]}),(0,sd.jsxs)("div",{style:{textAlign:"right"},children:[null!=e.match&&(0,sd.jsxs)("div",{className:"prof-match",children:[e.match,"% match"]}),(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--ink-3)",marginTop:2},children:e.email})]})]},t))}):(0,sd.jsx)("div",{className:"muted",style:{fontSize:12},children:"No professors found."})}function jb(e){let{data:t}=e;if(!t)return null;const n=[["Application deadline",t.deadline],["Tuition",t.tuition],["Acceptance rate",t.acceptRate],["International %",t.intlPct],["GPA",t.gpa_required],["Rank",t.rank],["Application fee",t.application_fee],["Tests",Array.isArray(t.test_requirements)?t.test_requirements.join(" \xb7 "):null]].filter(e=>e[1]);return(0,sd.jsx)("table",{className:"extract-table",children:(0,sd.jsx)("tbody",{children:n.map(e=>{let[t,n]=e;return(0,sd.jsxs)("tr",{children:[(0,sd.jsx)("td",{children:t}),(0,sd.jsx)("td",{children:n})]},t)})})})}function Ab(e){let{items:t}=e;return null!==t&&void 0!==t&&t.length?(0,sd.jsx)("div",{className:"prof-list",children:t.slice(0,5).map((e,t)=>(0,sd.jsxs)("div",{className:"prof-row",children:[(0,sd.jsx)("div",{className:"prof-avatar",style:{background:e.color||"#B85A3D",color:"#FAF8F3"}
2,children:"$"}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"prof-name",children:e.name}),(0,sd.jsxs)("div",{className:"prof-research",children:[e.uni," \xb7 ",e.elig]})]}),(0,sd.jsxs)("div",{style:{textAlign:"right"},children:[(0,sd.jsx)("div",{className:"prof-match",style:{color:"var(--clay-deep)"},children:e.amount}),(0,sd.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--ink-3)",marginTop:2},children:e.deadline})]})]},t))}):(0,sd.jsx)("div",{className:"muted",style:{fontSize:12},children:"No scholarships found."})}function Sb(e){let{proposal:t,onAddTask:n}=e;const[r,i]=a.useState("idle");return(0,sd.jsxs)("div",{className:"task-proposal","data-testid":"task-proposal-card",children:[(0,sd.jsx)("div",{className:"browse-favicon",style:{background:"var(--clay-deep)",color:"#FAF8F3"},children:(0,sd.jsx)(pd.Check,{size:18})}),(0,sd.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,sd.jsx)("div",{className:"browse-title",children:t.title}),(0,sd.jsxs)("div",{className:"browse-url",style:{color:"var(--ink-3)"},children:[t.uni,t.due?" \xb7 due ".concat(t.due):""]})]}),"done"===r?(0,sd.jsxs)("span",{className:"pill pill-clay","data-testid":"task-proposal-added",children:[(0,sd.jsx)(pd.Check,{size:11})," In Task Center"]}):(0,sd.jsx)("button",{className:"btn btn-orange btn-sm task-proposal-btn",onClick:async()=>{if("idle"===r&&n){i("adding");try{await n({title:t.title,uni:t.uni||"All applications",due:t.due||"",urgent:!!t.urgent,src:"AI suggested",ai_suggested:!0}),i("done")}catch(e){i("idle")}}},disabled:"adding"===r,"data-testid":"task-proposal-add-btn",children:"adding"===r?"Adding\u2026":"Add to Task Center"})]})}function Nb(e){let{text:t,initials:n}=e;return(0,sd.jsxs)("div",{className:"msg",style:{alignSelf:"flex-end",flexDirection:"row-reverse"},children:[(0,sd.jsx)("div",{className:"msg-avatar user",children:n}),(0,sd.jsxs)("div",{className:"msg-body",children:[(0,sd.jsx)("div",{className:"msg-role",style:{textAlign:"right"},children:"You"}),(0,sd.jsx)("div",{className:"msg-text",style:{background:"var(--bg-sunk)",padding:"10px 14px",borderRadius:"var(--r-md)",display:"inline-block"},children:t})]})]})}function Bb(e){let{msg:t,go:n,streaming:r,onAddTask:i}=e;const a=!(!t.text||!t.text.trim()),s=(t.tools||[]).length>0,o=r&&!a&&!s;return(0,sd.jsxs)("div",{className:"msg","data-testid":o?"ai-thinking":void 0,children:[(0,sd.jsx)("div",{className:"msg-avatar ai","data-testid":"ai-avatar",children:(0,sd.jsx)(wd,{size:16})}),(0,sd.jsxs)("div",{className:"msg-body",children:[(0,sd.jsx)("div",{className:"msg-role",children:"Vidhya Advisor"}),(0,sd.jsxs)("div",{className:"msg-text",children:[(t.tools||[]).map((e,t)=>{var n,r,a,s,o,l,u,c,d,h,p,f,m,g,v;return(0,sd.jsxs)(wb,{tool:e.tool,status:e.status,children:["profs"===(null===(n=e.result)||void 0===n?void 0:n.kind)&&(0,sd.jsx)(Eb,{profs:e.result.data}),"research"===(null===(r=e.result)||void 0===r?void 0:r.kind)&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"browse-preview",style:{marginBottom:12},children:[(0,sd.jsx)("div",{className:"browse-favicon",style:{background:"#B85A3D",color:"#FAF8F3"},children:(null===(a=e.result.uni)||void 0===a?void 0:a[0])||"U"}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"browse-title",children:e.result.uni}),(0,sd.jsx)("div",{className:"browse-url",children:(null===(s=e.result.data)||void 0===s?void 0:s.official_url)||"(official page)"})]})]}),(0,sd.jsx)(jb,{data:e.result.data})]}),"schols"===(null===(o=e.result)||void 0===o?void 0:o.kind)&&(0,sd.jsx)(Ab,{items:e.result.data}),"shortlisted"===(null===(l=e.result)||void 0===l?void 0:l.kind)&&(0,sd.jsxs)("div",{className:"browse-preview",style:{background:"var(--clay-wash)",borderColor:"transparent"},children:[(0,sd.jsx)("div",{className:"browse-favicon",style:{background:e.result.uni.color,color:"#FAF8F3"},children:(null===(u=e.result.uni.short)||void 0===u?void 0:u[0])||e.result.uni.name[0]}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"browse-title",children:e.result.uni.name}),(0,sd.jsx)("div",{className:"browse-url",style:{color:"var(--clay-deep)"},children:"Added to Researching column"})]}),(0,sd.jsxs)("span",{className:"pill pill-clay",children:[(0,sd.jsx)(pd.Check,{size:11})," Added"]})]}),"task"===(null===(c=e.result)||void 0===c?void 0:c.kind)&&(0,sd.jsxs)("div",{className:"browse-preview",style:{background:"var(--clay-wash)",borderColor:"transparent"},children:[(0,sd.jsx)("div",{className:"browse-favicon",style:{background:"var(--ink)",color:"#FAF8F3"}
2,children:(0,sd.jsx)(pd.Check,{size:20})}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"browse-title",children:e.result.task.title}),(0,sd.jsxs)("div",{className:"browse-url",style:{color:"var(--clay-deep)"},children:[e.result.task.uni," \xb7 due ",e.result.task.due||"no date"]})]}),(0,sd.jsxs)("span",{className:"pill pill-clay",children:[(0,sd.jsx)(pd.Check,{size:11})," Created"]})]}),"task_proposal"===(null===(d=e.result)||void 0===d?void 0:d.kind)&&(0,sd.jsx)(Sb,{proposal:e.result,onAddTask:i}),"email"===(null===(h=e.result)||void 0===h?void 0:h.kind)&&(0,sd.jsxs)("div",{className:"email-preview",children:[(0,sd.jsx)("div",{className:"email-from",children:"Drafted email"}),(0,sd.jsx)("div",{className:"email-subject",children:null===(p=e.result.data)||void 0===p?void 0:p.subject}),(0,sd.jsx)("div",{className:"email-body",style:{whiteSpace:"pre-wrap",maxHeight:220,overflow:"auto"},children:null===(f=e.result.data)||void 0===f?void 0:f.body})]}),"error"===(null===(m=e.result)||void 0===m?void 0:m.kind)&&(0,sd.jsx)("div",{className:"auth-error",style:{marginTop:0},children:e.result.error}),"clarify"===(null===(g=e.result)||void 0===g?void 0:g.kind)&&(0,sd.jsxs)("div",{className:"browse-preview",style:{background:"var(--clay-wash)",borderColor:"transparent"},"data-testid":"tool-clarify-".concat(e.tool),children:[(0,sd.jsx)("div",{className:"browse-favicon",style:{background:"var(--clay-deep)",color:"#FAF8F3"},children:"?"}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"browse-title",children:"Couldn't verify that university"}),(0,sd.jsx)("div",{className:"browse-url",style:{color:"var(--clay-deep)"},children:e.result.message})]})]}),"upgrade"===(null===(v=e.result)||void 0===v?void 0:v.kind)&&(0,sd.jsxs)("div",{className:"tool-upgrade-card","data-testid":"tool-upgrade-".concat(e.tool),children:[(0,sd.jsx)("div",{className:"tool-upgrade-title",children:e.result.title}),(0,sd.jsx)("div",{className:"tool-upgrade-copy",children:e.result.copy}),(0,sd.jsx)(Fh,{feature:e.result.feature,context:e.result.context,label:"Unlock with Navigator",size:"sm",testid:"tool-upgrade-btn-".concat(e.tool)})]})]},t)}),_b(t.text),r&&a&&(0,sd.jsx)("span",{className:"cursor"}),o&&(0,sd.jsx)($h,{steps:qh(t.intentText),active:!0,testid:"chat-steps"})]})]})]})}const Tb=["suggestUnis","essay","appPlan","advice","todo"],Pb={suggestUnis:"Universities that fit you",essay:"Essay strategy",email:"Email draft",fit:"Fit & aid",browse:"Browsing live",todo:"What to do next",appPlan:"Application plan",advice:"Honest read \xb7 your list"},Lb={suggestUnis:"GraduationCap",essay:"Doc",email:"Mail",fit:"Compare",browse:"Globe",todo:"Check",appPlan:"Calendar",advice:"Chat"},Rb={suggestUnis:"Here are some schools that fit your profile \u2014 say the word and I'll add any to your board.",essay:"Let's crack it \u2014 here's what the prompt is really asking and a structure you fill in your own words.",appPlan:"Here's an ordered plan to your deadline.",advice:"Here's my honest read of your whole list \u2014 strengths and gaps, no hype.",todo:"Here's what I'd prioritise across your schools right now.",email:"Here's a draft you can tweak \u2014 personalised from your profile.",fit:"Here's your fit, admit chance and funding gap.",browse:"Pulling this from official sources right now \u2014 nothing from memory."};let zb=0;const Ob=()=>"c-".concat(Date.now(),"-").concat(zb++);function Mb(e){let{go:t}=e;const{open:n,mode:r,ctx:i,actionNonce:s,width:o,closeCopilot:l,setWidth:c,consumePreset:d,consumeInputPreset:h}=xh(),{user:p}=ud(),f=hd(),{universities:m,addUniversity:g,addTask:v,profile:y,gmail:D,refresh:b}=f,{open:x}=mh(),[C,F]=(0,a.useState)([]),[_,k]=(0,a.useState)(""),[w,E]=(0,a.useState)(!1),[j,A]=(0,a.useState)(!1),[S,N]=(0,a.useState)(!1),[B,T]=(0,a.useState)([]),P=(0,a.useRef)(null),L=(0,a.useRef)(null),R=(0,a.useRef)(0),z=(0,a.useRef)(!1),O=(0,a.useRef)(!0),M=(0,a.useRef)(null),I=(0,a.useRef)(!1),U=(0,a.useRef)(C);U.current=C;const $=(0,a.useCallback)((e,n)=>{l(),t&&t(e,n)},[l,t]),W=(e,t)=>F(n=>{const r=[...n],i=r.findIndex(t=>t._k===e);return i>=0&&(r[i]="function"===typeof t?t(r[i]):(0,u.A)((0,u.A)({},r[i]),t)),r}),H=(0,a.useCallback)(async()=>{try{const{data:e}=await ad.http.get("/chats");T(e.items||[])}catch(Lt){console.warn("copilot: failed to load chat threads",Lt)}},[]);(0,a.useEffect)(()=>{H()},[H]),(0,a.useEffect)(()=>
2{if(0===C.length)return;const e=setTimeout(async()=>{var e,t;const n=((null===(e=C.find(e=>"user"===e.role))||void 0===e?void 0:e.text)||Pb[null===(t=C.find(e=>"tool"===e.role))||void 0===t?void 0:t.kind]||"New chat").slice(0,70),r={title:n,messages:C};try{if(M.current)await ad.http.patch("/chats/".concat(M.current),r);else if(!I.current){I.current=!0;const{data:e}=await ad.http.post("/chats",r);M.current=e.id,I.current=!1}H()}catch(Lt){I.current=!1}},700);return()=>clearTimeout(e)},[C,H]);const q=(0,a.useCallback)(async e=>{const t=(e||"").trim();if(!t||w)return;E(!0),O.current=!0;const n=U.current.filter(e=>(e.text||"").trim()).slice(-8).map(e=>({role:"ai"===e.role?"assistant":"user",text:e.text}));F(e=>[...e,{_k:Ob(),role:"user",text:t}]);const r=Ob();F(e=>[...e,{_k:r,role:"ai",text:"",tools:[],intentText:t}]);try{const{tools:e}=await async function(e){let{message:t,history:n,callbacks:r}=e;const i=r||{},a=localStorage.getItem("sa_token"),s=await fetch("".concat(ad.n,"/ai/chat/stream"),{method:"POST",headers:(0,u.A)({"Content-Type":"application/json"},a?{Authorization:"Bearer ".concat(a)}:{}),body:JSON.stringify({message:t,history:n||[]})});if(429===s.status||402===s.status){var o;let e={};try{e=await s.json()}catch(Lt){console.warn("streamChat: could not parse block payload",Lt)}const t=(null===(o=e)||void 0===o?void 0:o.detail)||{};return i.onBlocked&&i.onBlocked(s.status,t),{tools:[],finalText:"",blocked:!0}}if(!s.ok||!s.body){const e=await s.text().catch(()=>"HTTP ".concat(s.status));throw new Error(e||"HTTP ".concat(s.status))}const l=s.body.getReader(),c=new TextDecoder;let d="",h="",p="",f=[];for(;;){const{value:e,done:t}=await l.read();if(t)break;let n;for(d+=c.decode(e,{stream:!0});-1!==(n=d.indexOf("\n\n"));){const e=d.slice(0,n);d=d.slice(n+2);const t=e.split("\n").find(e=>e.startsWith("data:"));if(!t)continue;const r=t.slice(5).trim();if(!r)continue;let a;try{a=JSON.parse(r)}catch(m){continue}if("delta"===a.type&&a.text)h+=a.text,i.onDelta&&i.onDelta(h);else if("quota"===a.type&&a.quota)i.onQuota&&i.onQuota(a.quota);else if("tool_start"===a.type)f=[...f,{tool:a.tool,args:a.args,status:"running"}],i.onTools&&i.onTools(f);else if("tool_result"===a.type){let e=-1;for(let t=f.length-1;t>=0;t--)if(f[t].tool===a.tool&&"running"===f[t].status){e=t;break}f=-1===e?[...f,{tool:a.tool,args:a.args,status:"done",result:a.result}]:f.map((t,n)=>n===e?(0,u.A)((0,u.A)({},t),{},{status:"done",result:a.result}):t),i.onTools&&i.onTools(f)}else if("done"===a.type&&a.text)p=a.text,i.onDone&&i.onDone(p);else if("error"===a.type)throw new Error(a.detail||"stream error")}}return{tools:f,finalText:p,blocked:!1}}({message:t,history:n,callbacks:{onDelta:e=>W(r,{text:e}),onTools:e=>W(r,{tools:e}),onDone:e=>W(r,{text:e}),onBlocked:(e,t)=>{W(r,{text:(null===t||void 0===t?void 0:t.message)||"You've used your free advisor messages for today."}),x((null===t||void 0===t?void 0:t.feature)||ch.AI_ADVISOR,(null===t||void 0===t?void 0:t.context)||"copilot_quota")}}});(e||[]).some(e=>{var t,n;return"shortlisted"===(null===(t=e.result)||void 0===t?void 0:t.kind)||"task"===(null===(n=e.result)||void 0===n?void 0:n.kind)})&&b()}catch(Lt){W(r,{text:"Sorry, I hit an error: ".concat((null===Lt||void 0===Lt?void 0:Lt.message)||"please try again.")})}finally{E(!1)}},[w,x,b]),V=(0,a.useCallback)(async(e,t)=>{const n=Ob(),r=Ob();O.current=!0,F(i=>[...i,{_k:n,role:"ai",text:Rb[e]||""},{_k:r,role:"tool",kind:e,status:"loading",ctx:t}]),E(!0);try{if(Tb.includes(e)){const{data:n}=await ad.http.post("/ai/advisor-tool",{tool:e,context:t||{}});W(r,{status:"done",data:n.data||{}})}else if("email"===e){const e=[null!==y&&void 0!==y&&y.intended_major?"".concat(y.intended_major," applicant"):"applicant",null!==y&&void 0!==y&&y.student_country?"from ".concat(y.student_country):""].filter(Boolean).join(" "),{data:n}=await ad.http.post("/ai/draft-email",{professor_name:(null===t||void 0===t?void 0:t.professor)||"the admissions office",professor_email:(null===t||void 0===t?void 0:t.email)||"",professor_research:(null===t||void 0===t?void 0:t.research)||"",university:(null===t||void 0===t?void 0:t.uni)||"",student_name:(null===p||void 0===p?void 0:p.name)||"Student",student_background:e||"international applicant",program_applying:(null===t||void 0===t?void 0:t.program)||(null===y||void 0===y?void 0:y.intended_major)||"",purpose:null!==t&&void 0!==t&&t.professor?"research_inquiry":"general_inquiry"});W(r,{status:"done",data:n.data||{},uni:null===t||void 0===t?void 0:t.uni,to:null===t||void 0===t?void 0:t.email,professor:null===t||void 0===t?void 0:t.professor,uniId:null===t||void 0===t?void 0:t.uniId})}else if("fit"===e){const e=null===t||void 0===t?void 0:t.uniId,n=null===t||void 0===t?void 0:t.uni;if(!e)return void W(r,{status:"error",err:"Open a university first so I know which one to check."});const{data:i}=await ad.http.post("/universities/".concat(e,"/cost-and-aid"));W(r,{status:"done",data:i.data||{},uni:n,uid:e})}
2else if("browse"===e){const e=null===t||void 0===t?void 0:t.uni;if(!e)return void W(r,{status:"error",err:"Tell me which university to check live."});const{data:n}=await ad.http.post("/ai/research-university",{university_name:e,program:(null===t||void 0===t?void 0:t.program)||(null===y||void 0===y?void 0:y.intended_major)||""});W(r,{status:"done",data:n.data||{},uni:e})}}catch(Lt){var i,a,s;const n=null===Lt||void 0===Lt||null===(i=Lt.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.detail,o=("object"===typeof n?null===n||void 0===n?void 0:n.message:n)||(null===Lt||void 0===Lt?void 0:Lt.message)||"Couldn't load this just now.";402===(null===Lt||void 0===Lt||null===(s=Lt.response)||void 0===s?void 0:s.status)?(W(r,{status:"gated",err:o}),x((null===n||void 0===n?void 0:n.feature)||ch.AI_ADVISOR,(null===n||void 0===n?void 0:n.context)||"copilot_".concat(e))):W(r,{status:"error",err:o})}finally{E(!1)}},[y,p,x]);(0,a.useEffect)(()=>{if(!n)return;if(R.current===s)return;R.current=s;const e=d();if(e&&(e||"").trim())return void q(e);const t=h();if(t&&(t||"").trim())return k(t),void setTimeout(()=>{L.current&&(L.current.focus(),L.current.setSelectionRange(t.length,t.length))},60);"menu"!==r&&V(r,i)},[n,s]),(0,a.useEffect)(()=>{P.current&&O.current&&(P.current.scrollTop=P.current.scrollHeight)},[C]);const G=(0,a.useCallback)(e=>{e.preventDefault(),A(!0);const t=e=>{const t=e.touches?e.touches[0].clientX:e.clientX;c(window.innerWidth-t)},n=()=>{A(!1),z.current=!0,setTimeout(()=>{z.current=!1},250),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchmove",t),window.removeEventListener("touchend",n)};window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),window.addEventListener("touchmove",t),window.addEventListener("touchend",n)},[c]),K=((null===p||void 0===p?void 0:p.name)||"U").split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase(),Y=0===C.length&&!S,Q=()=>{const e=_.trim();e&&(k(""),L.current&&(L.current.style.height="auto"),q(e))};return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"cop-scrim ".concat(n?"show":""),onClick:l,"data-testid":"copilot-scrim"}),(0,sd.jsxs)("aside",{className:"cop ".concat(n?"show":""," ").concat(j?"dragging":""),style:{width:o},"data-testid":"copilot-drawer","aria-label":"Vidhya copilot",children:[(0,sd.jsx)("div",{className:"cop-resize",onMouseDown:G,onTouchStart:G,"data-testid":"copilot-resize"}),(0,sd.jsxs)("div",{className:"coph",children:[(0,sd.jsx)("div",{className:"ci",children:(0,sd.jsx)(wd,{size:17})}),(0,sd.jsxs)("div",{className:"ct",children:[(0,sd.jsx)("b",{children:"Vidhya"}),(0,sd.jsxs)("span",{className:"ctx",children:[(0,sd.jsx)("span",{className:"dot"}),"Your whole plan"]})]}),(0,sd.jsxs)("div",{className:"coph-actions",children:[(0,sd.jsx)("button",{className:"hb",onClick:()=>{M.current=null,I.current=!1,F([]),N(!1)},title:"New chat","data-testid":"copilot-new-chat",children:(0,sd.jsx)(pd.Plus,{size:14})}),(0,sd.jsx)("button",{className:"hb ".concat(S?"on":""),onClick:()=>N(e=>{const t=!e;return t&&H(),t}),title:"History","data-testid":"copilot-history-btn",children:(0,sd.jsx)(pd.Inbox,{size:14})}),(0,sd.jsx)("button",{className:"hb x",onClick:l,"aria-label":"Close","data-testid":"copilot-close",children:(0,sd.jsx)(pd.Close,{size:14})})]})]}),(0,sd.jsx)("div",{className:"copb",ref:P,onScroll:()=>{const e=P.current;e&&(O.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)},"data-testid":"copilot-body",children:S?(0,sd.jsx)(Ub,{threads:B,onOpen:async e=>{try{const{data:t}=await ad.http.get("/chats/".concat(e.id));M.current=e.id,F(t.messages||[])}catch(Lt){console.warn("copilot: failed to open thread",Lt)}finally{N(!1)}},onClear:async()=>{const e=B.map(e=>e.id);T([]),e.includes(M.current)&&(M.current=null,F([])),await Promise.allSettled(e.map(e=>ad.http.delete("/chats/".concat(e))))}}):Y?(0,sd.jsx)(Ib,{user:p,universities:m,onAsk:e=>q(e)}):C.map((e,t)=>{if("user"===e.role)return(0,sd.jsx)(Nb,{text:e.text,initials:K},e._k);if("tool"===e.role)return(0,sd.jsx)($b,{m:e,go:$,onAddUni:g,onAddTask:v,gmail:D},e._k);const n=w&&t===C.length-1;return e.text||(e.tools||[]).length||n?(0,sd.jsx)(Bb,{msg:e,go:$,streaming:n,onAddTask:v},e._k):null})}),(0,sd.jsx)("div",{className:"copf",children:(0,sd.jsxs)("div",{className:"box",children:[(0,sd.jsx)("textarea",{ref:L,rows:1,placeholder:"Ask Vidhya anything\u2026","aria-label":"Ask Vidhya",value:_,onCh
2ange:e=>{k(e.target.value);const t=e.target;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,132)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),Q())},"data-testid":"copilot-input",disabled:w}),(0,sd.jsx)("button",{className:"snd","aria-label":"Send",onClick:Q,disabled:w||!_.trim(),"data-testid":"copilot-send",children:(0,sd.jsx)(pd.ArrowRight,{size:15})})]})})]})]})}function Ib(e){var t;let{user:n,universities:r,onAsk:i}=e;const a=((null===n||void 0===n?void 0:n.name)||"there").split(" ")[0],s=null===(t=r[0])||void 0===t?void 0:t.name,o=[{icon:"Check",q:"What should I focus on this week?"},s?{icon:"Compare",q:"How are my chances at ".concat(s,"?")}:{icon:"GraduationCap",q:"Suggest universities that fit my profile"},{icon:"Coin",q:"Find scholarships I'm eligible for"},{icon:"Chat",q:"Give me an honest read of my shortlist"}];return(0,sd.jsxs)("div",{className:"cop-landing","data-testid":"copilot-landing",children:[(0,sd.jsxs)("div",{className:"cl-hero",children:[(0,sd.jsx)("div",{className:"cl-mark",children:(0,sd.jsx)(wd,{size:22})}),(0,sd.jsxs)("h3",{children:["Hi ",a," \u2014 ask me anything."]}),(0,sd.jsxs)("p",{children:["I can see all ",r.length||"your"," ",1===r.length?"university":r.length?"universities":"plan",", your deadlines and your profile. I'll research live, draft outreach, find funding and keep you on track."]})]}),(0,sd.jsx)("div",{className:"cl-sugg-label",children:"Try asking"}),o.map((e,t)=>{const n=pd[e.icon];return(0,sd.jsxs)("button",{className:"cl-sugg",onClick:()=>i(e.q),"data-testid":"copilot-suggestion-".concat(t),children:[(0,sd.jsx)("span",{className:"ico",children:n?(0,sd.jsx)(n,{size:15}):null}),(0,sd.jsx)("span",{children:e.q}),(0,sd.jsx)(pd.ArrowRight,{size:14})]},t)})]})}function Ub(e){let{threads:t,onOpen:n,onClear:r}=e;return(0,sd.jsxs)("div",{"data-testid":"copilot-history",children:[(0,sd.jsxs)("div",{className:"cop-hist-head",children:[(0,sd.jsx)("b",{children:"Recent chats"}),t.length>0&&(0,sd.jsx)("button",{onClick:r,"data-testid":"copilot-history-clear",children:"Clear"})]}),0===t.length?(0,sd.jsx)("p",{className:"copintro",children:"No chats yet. Ask something and it'll show up here so you can pick up where you left off."}):t.map(e=>(0,sd.jsxs)("button",{className:"cop-hist-item",onClick:()=>n(e),"data-testid":"copilot-history-item",children:[(0,sd.jsx)("b",{children:e.title}),(0,sd.jsxs)("span",{children:[new Date(e.updated_at).toLocaleDateString(void 0,{month:"short",day:"numeric"})," \xb7 ",new Date(e.updated_at).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})]})]},e.id))]})}function $b(e){let{m:t,go:n,onAddUni:r,onAddTask:i,gmail:a}=e;const{kind:s,status:o,data:l={},err:u}=t,c=pd[Lb[s]]||pd.Sparkle;return(0,sd.jsxs)("div",{className:"cop-tool-msg","data-testid":"copilot-toolmsg-".concat(s),children:[(0,sd.jsxs)("div",{className:"cop-tool-head",children:[(0,sd.jsx)("span",{className:"tm-ico",children:(0,sd.jsx)(c,{size:13})}),Pb[s]||"Vidhya"]}),"loading"===o&&(0,sd.jsx)("div",{className:"cop-loading","data-testid":"copilot-loading",children:(0,sd.jsx)($h,{steps:Hh(s),active:!0,interval:2400,testid:"tool-steps-".concat(s)})}),("error"===o||"gated"===o)&&(0,sd.jsx)("div",{className:"rline",style:{color:"var(--urgent)"},children:u}),"done"===o&&(0,sd.jsxs)(sd.Fragment,{children:["suggestUnis"===s&&(0,sd.jsx)(Hb,{data:l,onAddUni:r}),"essay"===s&&(0,sd.jsx)(qb,{data:l}),"appPlan"===s&&(0,sd.jsx)(Vb,{data:l}),"advice"===s&&(0,sd.jsx)(Gb,{data:l}),"todo"===s&&(0,sd.jsx)(Kb,{data:l,onAddTask:i,go:n}),"email"===s&&(0,sd.jsx)(Yb,{data:l,tool:t,gmail:a,go:n}),"fit"===s&&(0,sd.jsx)(Qb,{data:l,uni:t.uni,go:n}),"browse"===s&&(0,sd.jsx)(Jb,{data:l,uni:t.uni})]})]})}const Wb=e=>{let{name:t}=e;return(0,sd.jsx)("div",{className:"ulogo",style:{background:"var(--ink)",width:34,height:34,fontSize:13},children:(t||"?")[0]})};function Hb(e){let{data:t,onAddUni:n}=e;const[r,i]=(0,a.useState)({}),s=t.items||[];return(0,sd.jsxs)(sd.Fragment,{children:[t.intro&&(0,sd.jsx)("div",{className:"rline",children:t.intro}),s.map((e,a)=>{const s=/reach|ambit/i.test(e.tier||"");return(0,sd.jsx)("div",{className:"rcard","data-testid":"sugg-uni-card",children:(0,sd.jsxs)("div",{className:"runi",children:[(0,sd.jsx)(Wb,{name:e.name}),(0,sd.jsxs)("div",{className:"ri2",children:[(0,sd.jsxs)("b",{children:[e.name," ",null!=e.match&&(0,sd.jsxs)("span",{className:"matchg",style:s?{marginLeft:4,background:"var(--indigo-50)",color:"var(--indigo)"}:{marginLeft:4},children:[e.match,"%"]})]}
2),(0,sd.jsxs)("span",{children:[[e.country,e.tier].filter(Boolean).join(" \xb7 "),e.why?" \xb7 ".concat(e.why):""]})]}),(0,sd.jsx)("button",{className:"addmini",disabled:!!r[a],onClick:()=>(async(e,r)=>{i(e=>(0,u.A)((0,u.A)({},e),{},{[r]:"adding"}));try{await n({name:e.name,program:t.program||"",color:"#5645F0",status:"researching"}),i(e=>(0,u.A)((0,u.A)({},e),{},{[r]:"done"}))}catch(a){i(e=>(0,u.A)((0,u.A)({},e),{},{[r]:null}))}})(e,a),"data-testid":"sugg-uni-add",children:"done"===r[a]?"Added \u2713":"adding"===r[a]?"\u2026":"Add"})]})},a)})]})}function qb(e){let{data:t}=e;return(0,sd.jsxs)(sd.Fragment,{children:[t.intro&&(0,sd.jsx)("div",{className:"rline",children:t.intro}),(t.asks||[]).length>0&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"rline",children:(0,sd.jsx)("b",{children:"What the prompt is really asking:"})}),(0,sd.jsx)("div",{className:"rcard",style:{fontSize:12,lineHeight:1.6},children:t.asks.map((e,t)=>(0,sd.jsxs)("div",{children:[t+1,". ",e]},t))})]}),(t.steps||[]).length>0&&(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)("div",{className:"rline",style:{marginTop:6},children:(0,sd.jsx)("b",{children:"A structure to fill with your own words:"})}),(0,sd.jsx)("div",{className:"rcard",children:t.steps.map((e,t)=>(0,sd.jsxs)("div",{className:"outline-step",children:[(0,sd.jsx)("div",{className:"on",children:e.n||t+1}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("b",{children:e.title}),(0,sd.jsx)("span",{children:e.desc})]})]},t))})]})]})}function Vb(e){let{data:t}=e;return(0,sd.jsxs)(sd.Fragment,{children:[t.intro&&(0,sd.jsx)("div",{className:"rline",children:t.intro}),(0,sd.jsx)("div",{className:"rcard",children:(t.steps||[]).map((e,t)=>(0,sd.jsxs)("div",{className:"outline-step",children:[(0,sd.jsx)("div",{className:"on",children:(e.label||"").replace(/[^0-9]/g,"").slice(0,2)||"\u2022"}),(0,sd.jsxs)("div",{children:[(0,sd.jsx)("b",{children:e.label}),(0,sd.jsxs)("span",{children:[e.title,e.desc?" \u2014 ".concat(e.desc):""]})]})]},t))})]})}function Gb(e){let{data:t}=e;const n={strong:{background:"var(--verified-tint)",color:"var(--verified)"},watch:{background:"var(--urgent-tint)",color:"var(--urgent)"},note:{background:"var(--indigo-50)",color:"var(--indigo)"}};return(0,sd.jsxs)(sd.Fragment,{children:[t.intro&&(0,sd.jsx)("div",{className:"rline",children:t.intro}),(0,sd.jsx)("div",{className:"rcard",style:{padding:"4px 13px"},children:(t.rows||[]).map((e,t)=>(0,sd.jsxs)("div",{style:{display:"flex",gap:10,padding:"9px 0",borderBottom:"1px solid var(--line)",alignItems:"flex-start"},children:[(0,sd.jsx)("span",{style:(0,u.A)({fontSize:10,fontWeight:800,textTransform:"uppercase",padding:"3px 8px",borderRadius:6,flexShrink:0,marginTop:1},n[e.kind]||n.note),children:e.kind}),(0,sd.jsx)("p",{style:{fontSize:12,lineHeight:1.5},children:e.text})]},t))}),t.net&&(0,sd.jsxs)("div",{className:"rline",style:{marginTop:8},children:[(0,sd.jsx)("b",{children:"Net:"})," ",t.net]})]})}function Kb(e){let{data:t,onAddTask:n,go:r}=e;const[i,s]=(0,a.useState)({});return(0,sd.jsxs)(sd.Fragment,{children:[t.intro&&(0,sd.jsx)("div",{className:"rline",children:t.intro}),(t.groups||[]).map((e,t)=>(0,sd.jsxs)("div",{children:[(0,sd.jsx)("div",{className:"todo-group",children:e.label}),(e.items||[]).map((e,r)=>{const a="".concat(t,"-").concat(r);return(0,sd.jsx)("div",{className:"rcard","data-testid":"todo-card",children:(0,sd.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,sd.jsxs)("div",{style:{flex:1},children:[(0,sd.jsx)("b",{style:{fontSize:12},children:e.title}),e.uni&&(0,sd.jsx)("div",{style:{marginTop:3},children:(0,sd.jsxs)("span",{className:"utag",children:[(0,sd.jsx)("span",{className:"d",style:{background:"var(--ink)"}}),e.uni]})})]}),(0,sd.jsx)("button",{className:"addmini",disabled:!!i[a],onClick:()=>(async(e,t)=>{s(e=>(0,u.A)((0,u.A)({},e),{},{[t]:"adding"}));try{await n({title:e.title,uni:e.uni||"All applications",src:"AI suggested",ai_suggested:!0}),s(e=>(0,u.A)((0,u.A)({},e),{},{[t]:"done"}))}catch(r){s(e=>(0,u.A)((0,u.A)({},e),{},{[t]:null}))}})(e,a),"data-testid":"todo-add",children:"done"===i[a]?"Added \u2713":"adding"===i[a]?"\u2026":"+ Task"})]})},a)})]},t)),(0,sd.jsx)("div",{className:"rbtns",children:(0,sd.jsx)("button",{className:"rbtn fill",onClick:()=>r("tasks"),"data-testid":"todo-open-tasks",children:"Open my Tasks"})})]})}function Yb(e){let{data:t,tool:n,gmail:r,go:i}=e;return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"emailprev","data-testid":"email-preview",children:[(0,sd.jsxs)("div",{className:"efield",children:[(0,sd.jsx)("span",{className:"ek",children:"To"}),(0,sd.jsx)("span",{className:"ev",children:n.to||n.professor||"\u2014"})]}),(0,sd.jsxs)("div",{className:"efield",children:[(0,sd.jsx)("span",{className:"ek",children:"Subj"}),(0,sd.jsx)("span",{className:"ev",children:t.subject||""})]}),(0,sd.jsx)("div",{className:"emailbody",children:t.body||""})]}),(0,sd.jsxs)("div",{className:"rline",children:["Personalised from your profile, one clear ask. ",null!==r&&void 0!==r&&r.connected?"Sends from your Gmail.":"Connect Gmail to send & track replies."]}),(0,sd.jsxs)("div",{className:"rbtns",children:[n.uniId&&(0,sd.jsx)("button",{className:"rbtn fill",onClick:()=>i("detail",n.uniId),"data-testid":"email-open-outreach",children:"Open in Outreach"}),(0,sd.jsx)("button",{className:"rbtn gho",onClick:()=>navigator.clipboard&&navigator.clipboard.writeText("".concat(t.subject||"","\n\n").concat(t.body||"")),"data-testid":"email-copy",children:"Copy"})]})]})}function Qb(e){let{data:t,uni:n,go:r}=e;const i=null!=t.admit_chance_pct?Math.max(1,Math.min(99,t.admit_chance_pct)):null,a=t.aid_gap_usd,s=t.admit_chance_confidence||"medium",o=t.admit_chance_band||"moderate";return(0,sd.jsxs)(sd.Fragment,{children:[n&&(0,sd.jsx)("div",{className:"rline",children:(0,sd.jsx)("b",{children:n})}),null!=i&&(0,sd.jsxs)("div",{className:"meterbox",children:[(0,sd.jsxs)("div",{className:"mt2",children:[(0,sd.jsxs)("span",{className:"mlabel",children:["Admit chance \xb7 ",s," confidence"]}),(0,sd.jsxs)("span",{className:"mval",style:{color:"var(--indigo)"},children:[o," \xb7 ",i,"%"]})]}),(0,sd.jsx)("div",{className:"mtrack",children:(0,sd.jsx)("i",{style:{width:"".concat(i,"%"),background:"linear-gradient(90deg,var(--indigo),var(--indigo-deep))"}})})]}),null!=a&&(0,sd.jsxs)("div",{className:"meterbox",children:[(0,sd.jsxs)("div",{className:"mt2",children:[(0,sd.jsx)("span",{className:"mlabel",children:"Funding gap"}),(0,sd.jsx)("span",{className:"mval",style:{color:a>
20?"var(--urgent)":"var(--verified)"},children:a>0?"$".concat(a.toLocaleString()):"Covered"})]}),(0,sd.jsx)("div",{className:"mtrack",children:(0,sd.jsx)("i",{style:{width:a>0?"60%":"100%",background:a>0?"var(--urgent)":"var(--verified)"}})})]}),t.admit_chance_reasoning&&(0,sd.jsx)("div",{className:"rline",children:t.admit_chance_reasoning}),(t.caveats||[]).slice(0,2).map((e,t)=>(0,sd.jsxs)("div",{className:"rline",style:{color:"var(--slate)"},children:["\xb7 ",e]},t)),(0,sd.jsx)("div",{className:"rbtns",children:(0,sd.jsx)("button",{className:"rbtn fill",onClick:()=>r("scholarships"),"data-testid":"fit-find-schol",children:"Find scholarships for the gap"})})]})}function Jb(e){let{data:t,uni:n}=e;const r=t.tuition,i=t.deadline;return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsxs)("div",{className:"rline",children:["Pulled ",n?"".concat(n," "):"","facts from official sources \u2014 nothing here comes from memory."]}),(0,sd.jsxs)("div",{className:"browse",children:[(0,sd.jsxs)("div",{className:"bl done",children:[(0,sd.jsx)("span",{className:"bsp"}),"Read official admissions page"]}),(0,sd.jsxs)("div",{className:"bl done",children:[(0,sd.jsx)("span",{className:"bsp"}),"Checked the latest tuition"]}),(0,sd.jsxs)("div",{className:"bl done",children:[(0,sd.jsx)("span",{className:"bsp"}),"Confirmed application deadline"]})]}),r&&(0,sd.jsxs)("div",{className:"vbadge",style:{padding:"6px 11px"},children:[(0,sd.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,sd.jsx)("path",{d:"M12 2 4 6v6c0 5 3.5 8 8 10 4.5-2 8-5 8-10V6z"}),(0,sd.jsx)("path",{d:"m9 12 2 2 4-4"})]}),"Tuition ",r,i?" \xb7 Deadline ".concat(i):""]}),t.official_url&&(0,sd.jsx)("div",{className:"rline",style:{marginTop:8},children:(0,sd.jsx)("a",{href:t.official_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--indigo)",fontWeight:600},children:"Open official source \u2197"})})]})}const Xb={"/app":"dashboard","/app/dashboard":"dashboard","/app/chat":"chat","/app/board":"board","/app/tasks":"tasks","/app/scholarships":"scholarships","/app/profile":"profile","/app/autofill":"autofill","/app/admin":"admin","/app/billing":"billing"},Zb={dashboard:"/app/dashboard",chat:"/app/chat",board:"/app/board",tasks:"/app/tasks",scholarships:"/app/scholarships",profile:"/app/profile",autofill:"/app/autofill",admin:"/app/admin",billing:"/app/billing"};function ex(){const e=be(),t=Fe(),{user:n}=ud(),{openCopilot:r}=xh(),{universities:i,loaded:s}=hd(),o=Xb[e.pathname]||"dashboard",[l,u]=(0,a.useState)(o),[c,d]=(0,a.useState)(null),[h,p]=(0,a.useState)(!1),[f,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{const n=e.pathname;if(n.startsWith("/app/university/")){const e=n.slice(16);return void(e&&(u("detail"),d(e)))}const i=Xb[n];if("chat"===i)return r("menu"),void t("/app/dashboard",{replace:!0});i&&u(i)},[e.pathname]),(0,a.useEffect)(()=>{m(!1)},[e.pathname]),(0,a.useEffect)(()=>{"/app/admin"===e.pathname&&n&&"admin"!==n.role&&t("/app",{replace:!0})},[e.pathname,n,t]),(0,a.useEffect)(()=>{if(!s)return;const e=sessionStorage.getItem("vidhya_onboard_focus");if(!e)return;sessionStorage.removeItem("vidhya_onboard_focus");const n=(i||[]).find(t=>t.id===e)||(i||[])[0];n&&t("/app/university/".concat(n.id))},[s]);const g=(n,i)=>{if(m(!1),"chat"===n)return void r(i&&i.mode?i.mode:"menu",i&&i.ctx?i.ctx:null,i&&i.options?i.options:{});if("detail"===n&&i)return void t("/app/university/".concat(i));u(n);const a=Zb[n];a&&e.pathname!==a&&t(a)};return(0,a.useEffect)(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),p(e=>!e)),"Escape"===e.key&&m(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,sd.jsxs)("div",{className:"app app2","data-testid":"workspace",children:[(0,sd.jsx)("div",{className:"sidebar-overlay ".concat(f?"open":""),onClick:()=>m(!1),"data-testid":"sidebar-overlay"}),(0,sd.jsx)(Gd,{view:l,go:g,openCmd:()=>p(!0),open:f,onClose:()=>m(!1)}),(0,sd.jsxs)("div",{className:"main",children:[(0,sd.jsx)("button",{className:"vmobile-menu",onClick:()=>m(!0),"aria-label":"Open menu","data-testid":"mobile-menu-btn",children:(0,sd.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,sd.jsx)("path",{d:"M3 6h18M3 12h18M3 18h18"})})}),(0,sd.jsxs)("div",{className:"content",children:["dashboard"===l&&(0,sd.jsx)(Zd,{go:g}
2),"board"===l&&(0,sd.jsx)(jh,{openDetail:e=>g("detail",e)}),"detail"===l&&(0,sd.jsx)(ep,{uniId:c,back:()=>{window.history.length>1?t(-1):t("/app/board")}}),"tasks"===l&&(0,sd.jsx)(_p,{go:g}),"scholarships"===l&&(0,sd.jsx)(jp,{go:g}),"profile"===l&&(0,sd.jsx)(Sp,{}),"autofill"===l&&(0,sd.jsx)(Pp,{}),"admin"===l&&(0,sd.jsx)(Op,{}),"billing"===l&&(0,sd.jsx)(Wp,{})]})]}),(0,sd.jsx)(Kd,{open:h,onClose:()=>p(!1),go:g}),(0,sd.jsx)(Mb,{go:g})]})}function tx(e){let{children:t}=e;const{status:n,user:r}=ud();return"loading"===n?(0,sd.jsx)("div",{className:"full-loader",children:"Loading\u2026"}):"guest"===n?(0,sd.jsx)($e,{to:"/",replace:!0}):r&&!1===r.onboarded?(0,sd.jsx)($e,{to:"/onboarding",replace:!0}):(0,sd.jsx)(dd,{children:(0,sd.jsx)(fh,{children:(0,sd.jsx)(bh,{children:t})})})}function nx(){const{status:e,user:t}=ud();return"loading"===e?(0,sd.jsx)("div",{className:"full-loader",children:"Loading\u2026"}):"guest"===e?(0,sd.jsx)($e,{to:"/login",replace:!0}):t&&!0===t.onboarded?(0,sd.jsx)($e,{to:"/app",replace:!0}):(0,sd.jsx)(Vd,{})}function rx(e){let{children:t}=e;const{status:n,user:r}=ud();return"loading"===n?(0,sd.jsx)("div",{className:"full-loader",children:"Loading\u2026"}):"authed"===n?r&&!1===r.onboarded?(0,sd.jsx)($e,{to:"/onboarding",replace:!0}):(0,sd.jsx)($e,{to:"/app",replace:!0}):t}function ix(){const{status:e,user:t}=ud();return"loading"===e?(0,sd.jsx)("div",{className:"full-loader",children:"Loading\u2026"}):"authed"===e?t&&!1===t.onboarded?(0,sd.jsx)($e,{to:"/onboarding",replace:!0}):(0,sd.jsx)($e,{to:"/app",replace:!0}):(0,sd.jsx)(Pd,{})}function ax(){return(0,sd.jsxs)(qe,{children:[(0,sd.jsx)(We,{path:"/",element:(0,sd.jsx)(ix,{})}),(0,sd.jsx)(We,{path:"/login",element:(0,sd.jsx)(rx,{children:(0,sd.jsx)(Cd,{})})}),(0,sd.jsx)(We,{path:"/register",element:(0,sd.jsx)(rx,{children:(0,sd.jsx)(Fd,{})})}),(0,sd.jsx)(We,{path:"/onboarding",element:(0,sd.jsx)(nx,{})}),(0,sd.jsx)(We,{path:"/privacy",element:(0,sd.jsx)(yb,{})}),(0,sd.jsx)(We,{path:"/privacy-policy",element:(0,sd.jsx)($e,{to:"/privacy",replace:!0})}),(0,sd.jsx)(We,{path:"/terms",element:(0,sd.jsx)(Db,{})}),(0,sd.jsx)(We,{path:"/terms-and-conditions",element:(0,sd.jsx)($e,{to:"/terms",replace:!0})}),(0,sd.jsx)(We,{path:"/extension-privacy",element:(0,sd.jsx)(bb,{})}),(0,sd.jsx)(We,{path:"/extension/privacy",element:(0,sd.jsx)($e,{to:"/extension-privacy",replace:!0})}),(0,sd.jsx)(We,{path:"/oauth/authorize",element:(0,sd.jsx)(Cb,{})}),(0,sd.jsx)(We,{path:"/app/*",element:(0,sd.jsx)(tx,{children:(0,sd.jsx)(ex,{})})}),(0,sd.jsx)(We,{path:"*",element:(0,sd.jsx)($e,{to:"/",replace:!0})})]})}o.createRoot(document.getElementById("root")).render((0,sd.jsx)(ed,{apiKey:"phc_wWUo8wsfBjkHUt2JXQepjYJxYsTSwb2EBdwMVecfPfxr",options:{api_host:"https://us.i.posthog.com",defaults:"2025-05-24",capture_exceptions:!0},children:(0,sd.jsx)(_t,{children:(0,sd.jsx)(ld,{children:(0,sd.jsx)(Ph,{children:(0,sd.jsx)(ax,{})})})})}))})();
3//# sourceMappingURL=main.cea5f194.js.map

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.