vendor: 5,140 bytes, lines 1-18
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-3f4bdde3-CVIFT0XA.js","assets/svgDrawCommon-148a3cd9-Bp38qsxO.js","assets/flowDiagram-1629c991-NsVCKrU0.js","assets/flowDb-185abca5-BZfk221l.js","assets/graph-CzmUDC1e.js","assets/layout-BncUrzU1.js","assets/styles-f932cba9-CwPYadZV.js","assets/index-9bae90f3-CVK2eAYg.js","assets/clone-0SH4PbcM.js","assets/edges-b2856ca0-SPqB0efc.js","assets/createText-aed3d8b3-BGJYcmmY.js","assets/line-DZ9NFGy2.js","assets/array-BKyUJesY.js","assets/path-CXeFd1JH.js","assets/channel-BQzWckaW.js","assets/flowDiagram-v2-1d953310-DNx0fwKi.js","assets/erDiagram-5d81789a-DOwXo2jX.js","assets/ganttDiagram-3b0b3873-fR0mnsSy.js","assets/linear-C6B6BStQ.js","assets/init-Gi6I4Gst.js","assets/pieDiagram-c941bede-DCyephyS.js","assets/arc-DmEQSq6b.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-cf8b8fe0-CvWkoeeu.js","assets/xychartDiagram-3f383b91-CJVRQ83o.js","assets/requirementDiagram-53bda41b-DpQQLu_j.js","assets/sequenceDiagram-82a5b84f-CObGbXD8.js","assets/classDiagram-f62afe4f-DH06noKZ.js","assets/styles-fcc2142b-C8FrIfvq.js","assets/classDiagram-v2-604399ef-DTBJzOCE.js","assets/stateDiagram-43e79a5f-scW0f9G_.js","assets/styles-455b33cd-C1EgXaio.js","assets/stateDiagram-v2-2041ed4f-DhKMDLCt.js","assets/journeyDiagram-95396277-yixILir5.js","assets/flowchart-elk-definition-6df44142-Dx5SENeV.js","assets/timeline-definition-7545f45a-LH2wkUZ4.js","assets/mindmap-definition-e4c1d938-B64xgD2A.js","assets/sankeyDiagram-c3ef121a-B80WEm1g.js","assets/Tableau10-B-NsZVaP.js","assets/blockDiagram-868be97b-Cj1auH54.js"])))=>i.map(i=>d[i]); 2var _de=Object.defineProperty;var gL=e=>{throw TypeError(e)};var Tde=(e,t,n)=>t in e?_de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var y_=(e,t,n)=>Tde(e,typeof t!="symbol"?t+"":t,n),b_=(e,t,n)=>t.has(e)||gL("Cannot "+n);var K=(e,t,n)=>(b_(e,t,"read from private field"),n?n.call(e):t.get(e)),_t=(e,t,n)=>t.has(e)?gL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),it=(e,t,n,r)=>(b_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),nn=(e,t,n)=>(b_(e,t,"access private method"),n);var Iw=(e,t,n,r)=>({set _(i){it(e,t,i,n)},get _(){return K(e,t,r)}});function iW(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sW={exports:{}},G5={};/** 3 * @license React 4 * react-jsx-runtime.production.js 5 * 6 * Copyright (c) Meta Platforms, Inc. and affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Ede=Symbol.for("react.transitional.element"),jde=Symbol.for("react.fragment");function aW(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:Ede,type:e,key:r,ref:t!==void 0?t:null,props:n}}G5.Fragment=jde;G5.jsx=aW;G5.jsxs=aW;sW.exports=G5;var l=sW.exports,oW={exports:{}},Zt={};/** 11 * @license React 12 * react.production.js 13 * 14 * Copyright (c) Meta Platforms, Inc. and affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var p8=Symbol.for("react.transitional.element"),Nde=Symbol.for("react.portal"),Ade=Symbol.for("react.fragment"),Mde=Symbol.for("react.strict_mode"),Rde=Symbol.for("react.profiler"),Ode=Symbol.for("react.consumer"),Dde=Symbol.for("react.context"),Lde=Symbol.for("react.forward_ref"),Pde=Symbol.for("react.suspense"),Ide=Symbol.for("react.memo"),lW=Symbol.for("react.lazy"),Fde=Symbol.for("react.activity"),Bde=Symbol.for("react.view_transition"),xL=Symbol.iterator;function zde(e){return e===null||typeof e!="object"?null:(e=xL&&e[xL]||e["@@iterator"],typeof e=="function"?e:null)}var cW={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uW=Object.assign,dW={};
vendor: 5,652 bytes, line 18
18function hx(e,t,n){this.props=e,this.context=t,this.refs=dW,this.updater=n||cW}hx.prototype.isReactComponent={};hx.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hx.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hW(){}hW.prototype=hx.prototype;function g8(e,t,n){this.props=e,this.context=t,this.refs=dW,this.updater=n||cW}var x8=g8.prototype=new hW;x8.constructor=g8;uW(x8,hx.prototype);x8.isPureReactComponent=!0;var yL=Array.isArray;function Hj(){}var Cr={H:null,A:null,T:null,S:null},fW=Object.prototype.hasOwnProperty;function y8(e,t,n){var r=n.ref;return{$$typeof:p8,type:e,key:t,ref:r!==void 0?r:null,props:n}}function $de(e,t){return y8(e.type,t,e.props)}function b8(e){return typeof e=="object"&&e!==null&&e.$$typeof===p8}function Ude(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var bL=/\/+/g;function v_(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ude(""+e.key):t.toString(36)}function Vde(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Hj,Hj):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Kp(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case p8:case Nde:a=!0;break;case lW:return a=e._init,Kp(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+v_(e,0):r,yL(i)?(n="",a!=null&&(n=a.replace(bL,"$&/")+"/"),Kp(i,t,n,"",function(u){return u})):i!=null&&(b8(i)&&(i=$de(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(bL,"$&/")+"/")+a)),t.push(i)),1;a=0;var o=r===""?".":r+":";if(yL(e))for(var c=0;c<e.length;c++)r=e[c],s=o+v_(r,c),a+=Kp(r,t,n,s,i);else if(c=zde(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,s=o+v_(r,c++),a+=Kp(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return Kp(Vde(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function Fw(e,t,n){if(e==null)return e;var r=[],i=0;return Kp(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Hde(e){if(e._status===-1){var t=e._result,n=t();n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var vL=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function mW(e){var t=Cr.T,n={};n.types=t!==null?t.types:null,Cr.T=n;try{var r=e(),i=Cr.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Hj,vL)}catch(s){vL(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),Cr.T=t}}function pW(e){var t=Cr.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else mW(pW.bind(null,e))}var qde={map:Fw,forEach:function(e,t,n){Fw(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fw(e,function(){t++}),t},toArray:function(e){return Fw(e,function(t){return t})||[]},only:function(e){if(!b8(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Zt.Activity=Fde;Zt.Children=qde;Zt.Component=hx;Zt.Fragment=Ade;Zt.Profiler=Rde;Zt.PureComponent=g8;Zt.StrictMode=Mde;Zt.Suspense=Pde;Zt.ViewTransition=Bde;Zt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Cr;Zt.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Cr.H.useMemoCache(e)}};Zt.addTransitionType=pW;Zt.cache=function(e){return function(){return e.apply(null,arguments)}};Zt.cacheSignal=function(){return null};Zt.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=uW({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!fW.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),o=0;o<s;o++)a[o]=arguments[o+2];r.children=a}return y8(e.type,i,r)};Zt.createContext=function(e){return e={$$typeof:Dde,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Ode,_context:e},e};Zt.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)fW.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),c=0;c<a;
vendor: 5,328 bytes, lines 18-26
18c++)o[c]=arguments[c+2];i.children=o}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return y8(e,s,i)};Zt.createRef=function(){return{current:null}};Zt.forwardRef=function(e){return{$$typeof:Lde,render:e}};Zt.isValidElement=b8;Zt.lazy=function(e){return{$$typeof:lW,_payload:{_status:-1,_result:e},_init:Hde}};Zt.memo=function(e,t){return{$$typeof:Ide,type:e,compare:t===void 0?null:t}};Zt.startTransition=mW;Zt.unstable_useCacheRefresh=function(){return Cr.H.useCacheRefresh()};Zt.use=function(e){return Cr.H.use(e)};Zt.useActionState=function(e,t,n){return Cr.H.useActionState(e,t,n)};Zt.useCallback=function(e,t){return Cr.H.useCallback(e,t)};Zt.useContext=function(e){return Cr.H.useContext(e)};Zt.useDebugValue=function(){};Zt.useDeferredValue=function(e,t){return Cr.H.useDeferredValue(e,t)};Zt.useEffect=function(e,t){return Cr.H.useEffect(e,t)};Zt.useEffectEvent=function(e){return Cr.H.useEffectEvent(e)};Zt.useId=function(){return Cr.H.useId()};Zt.useImperativeHandle=function(e,t,n){return Cr.H.useImperativeHandle(e,t,n)};Zt.useInsertionEffect=function(e,t){return Cr.H.useInsertionEffect(e,t)};Zt.useLayoutEffect=function(e,t){return Cr.H.useLayoutEffect(e,t)};Zt.useMemo=function(e,t){return Cr.H.useMemo(e,t)};Zt.useOptimistic=function(e,t){return Cr.H.useOptimistic(e,t)};Zt.useReducer=function(e,t,n){return Cr.H.useReducer(e,t,n)};Zt.useRef=function(e){return Cr.H.useRef(e)};Zt.useState=function(e){return Cr.H.useState(e)};Zt.useSyncExternalStore=function(e,t,n){return Cr.H.useSyncExternalStore(e,t,n)};Zt.useTransition=function(){return Cr.H.useTransition()};Zt.version="19.3.0";oW.exports=Zt;var b=oW.exports;const Y=dx(b),ap=iW({__proto__:null,default:Y},[b]);var gW={exports:{}},W5={},xW={exports:{}},yW={};/** 19 * @license React 20 * scheduler.production.js 21 * 22 * Copyright (c) Meta Platforms, Inc. and affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(O,P){var I=O.length;O.push(P);e:for(;0<I;){var q=I-1>>>1,R=O[q];if(0<i(R,P))O[q]=P,O[I]=R,I=q;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var P=O[0],I=O.pop();if(I!==P){O[0]=I;e:for(var q=0,R=O.length,xe=R>>>1;q<xe;){var me=2*(q+1)-1,U=O[me],ae=me+1,Ce=O[ae];if(0>i(U,I))ae<R&&0>i(Ce,U)?(O[q]=Ce,O[ae]=I,q=ae):(O[q]=U,O[me]=I,q=me);else if(ae<R&&0>i(Ce,I))O[q]=Ce,O[ae]=I,q=ae;else break e}}return P}function i(O,P){var I=O.sortIndex-P.sortIndex;return I!==0?I:O.id-P.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],u=[],d=1,h=null,f=3,m=!1,p=!1,x=!1,v=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function S(O){for(var P=n(u);P!==null;){if(P.callback===null)r(u);else if(P.startTime<=O)r(u),P.sortIndex=P.expirationTime,t(c,P);else break;P=n(u)}}function C(O){if(x=!1,S(O),!p)if(n(c)!==null)p=!0,k||(k=!0,M());else{var P=n(u);P!==null&&z(C,P.startTime-O)}}var k=!1,_=-1,E=5,A=-1;function j(){return v?!0:!(e.unstable_now()-A<E)}function D(){if(v=!1,k){var O=e.unstable_now();A=O;var P=!0;try{e:{p=!1,x&&(x=!1,y(_),_=-1),m=!0;var I=f;try{t:{for(S(O),h=n(c);h!==null&&!(h.expirationTime>O&&j());){var q=h.callback;if(typeof q=="function"){h.callback=null,f=h.priorityLevel;var R=q(h.expirationTime<=O);if(O=e.unstable_now(),typeof R=="function"){h.callback=R,S(O),P=!0;break t}h===n(c)&&r(c),S(O)}else r(c);h=n(c)}if(h!==null)P=!0;else{var xe=n(u);xe!==null&&z(C,xe.startTime-O),P=!1}}break e}finally{h=null,f=I,m=!1}P=void 0}}finally{P?M():k=!1}}}var M;if(typeof w=="function")M=function(){w(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,B=$.port2;$.port1.onmessage=D,M=function(){B.postMessage(null)}}else M=function(){g(D,0)};function z(O,P){_=g(function(){O(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var I=f;f=P;try{return O()}finally{f=I}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(O,P){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var I=f;f=O;try{return P()}finally{f=I}},e.unstable_scheduleCallback=function(O,P,I){var q=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?q+I:q):I=q,O){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=I+R,O={id:d++,callback:P,priorityLevel:O,startTime:I,expirationTime:R,sortIndex:-1},I>q?(O.sortIndex=I,t(u,O),n(c)===null&&O===n(u)&&(x?(y(_),_=-1):x=!0,z(C,I-q))):(O.sortIndex=R,t(c,O),p||m||(p=!0,k||
vendor: 26,593 bytes, lines 26-49
26(k=!0,M()))),O},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(O){var P=f;return function(){var I=f;f=P;try{return O.apply(this,arguments)}finally{f=I}}}})(yW);xW.exports=yW;var Gde=xW.exports,bW={exports:{}},Ds={};/** 27 * @license React 28 * react-dom.production.js 29 * 30 * Copyright (c) Meta Platforms, Inc. and affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var Wde=b;function vW(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 Sd(){}var Xs={d:{f:Sd,r:function(){throw Error(vW(522))},D:Sd,C:Sd,L:Sd,m:Sd,X:Sd,S:Sd,M:Sd},p:0,findDOMNode:null},Yde=Symbol.for("react.portal"),Kde=Symbol.for("react.recoverable"),wL=Symbol.for("react.optimistic_key");function Xde(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yde,key:r==null?null:r===wL?wL:""+r,children:e,containerInfo:t,implementation:n}}var N1=Wde.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Y5(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ds.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Xs;Ds.browser=function(e){return{$$typeof:Kde,_reason:e}};Ds.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(vW(299));return Xde(e,t,null,n)};Ds.flushSync=function(e){var t=N1.T,n=Xs.p;try{if(N1.T=null,Xs.p=2,e)return e()}finally{N1.T=t,Xs.p=n,Xs.d.f()}};Ds.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Xs.d.C(e,t))};Ds.prefetchDNS=function(e){typeof e=="string"&&Xs.d.D(e)};Ds.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Y5(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Xs.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:s}):n==="script"&&Xs.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ds.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Y5(t.as,t.crossOrigin);Xs.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&Xs.d.M(e)};Ds.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Y5(n,t.crossOrigin);Xs.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Ds.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Y5(t.as,t.crossOrigin);Xs.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else Xs.d.m(e)};Ds.requestFormReset=function(e){Xs.d.r(e)};Ds.unstable_batchedUpdates=function(e,t){return e(t)};Ds.useFormState=function(e,t,n){return N1.H.useFormState(e,t,n)};Ds.useFormStatus=function(){return N1.H.useHostTransitionStatus()};Ds.version="19.3.0";function wW(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wW)}catch(e){console.error(e)}}wW(),bW.exports=Ds;var td=bW.exports;const SW=dx(td),Qde=iW({__proto__:null,default:SW},[td]);/** 35 * @license React 36 * react-dom-client.production.js 37 * 38 * Copyright (c) Meta Platforms, Inc. and affiliates. 39 * 40 * This source code is licensed under the MIT license found in the 41 * LICENSE file in the root directory of this source tree. 42 */var Ii=Gde,CW=b,Zde=td;function Ae(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 kW(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jv(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function _W(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function TW(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function SL(e){if(jv(e)!==e)throw Error(Ae(188))}function Jde(e){var t=e.alternate;if(!t){if(t=jv(e),t===null)throw Error(Ae(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return SL(i),e;if(s===r)return SL(i),t;s=s.sibling}throw Error(Ae(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(Ae(189))}}if(n.alternate!==r)throw Error(Ae(190))}if(n.tag!==3)throw Error(Ae(188));return n.stateNode.current===n?e:t}function EW(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=EW(e),t!==null)return t;e=e.sibling}return null}function Ma(e,t,n,r,i,s){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,s)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Ma(e.child,t,n,r,i,s))return!0;e=e.sibling}return!1}function op(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function CL(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function jW(e){var t=[null,null],n=op(e);return n===null||NW(t,e,n.child,{foundSelf:!1}),t}function NW(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&NW(e,t,n.child,r))return!0;n=n.sibling}return!1}function Ri(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(Ae(559))}}var a0=null,qj=null;function ehe(e,t,n){return e===n?!0:e===t?(a0=e,!0):!1}function the(e,t,n){return e===n?(qj=e,!1):e===t?(qj!==null&&(a0=e),!0):!1}function kL(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Gj(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var s=t;s;s=n(s))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var gr=Object.assign,nhe=Symbol.for("react.element"),Bw=Symbol.for("react.transitional.element"),i1=Symbol.for("react.portal"),o0=Symbol.for("react.fragment"),AW=Symbol.for("react.strict_mode"),Wj=Symbol.for("react.profiler"),MW=Symbol.for("react.consumer"),Xl=Symbol.for("react.context"),v8=Symbol.for("react.forward_ref"),Yj=Symbol.for("react.suspense"),Kj=Symbol.for("react.suspense_list"),w8=Symbol.for("react.memo"),qd=Symbol.for("react.lazy"),Xj=Symbol.for("react.activity"),rhe=Symbol.for("react.legacy_hidden"),ihe=Symbol.for("react.memo_cache_sentinel"),Qj=Symbol.for("react.view_transition"),she=Symbol.for("react.recoverable"),_L=Symbol.iterator;function gy(e){return e===null||typeof e!="object"?null:(e=_L&&e[_L]||e["@@iterator"],typeof e=="function"?e:null)}var ahe=Symbol.for("react.client.reference");function Zj(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ahe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o0:return"Fragment";case Wj:return"Profiler";case AW:return"StrictMode";case Yj:return"Suspense";case Kj:return"SuspenseList";case Xj:return"Activity";case Qj:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case i1:return"Portal";case Xl:return e.displayName||"Context";case MW:return(e._context.displayName||"Context")+".Consumer";case v8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w8:return t=e.displayName||null,t!==null?t:Zj(e.type)||"Memo";case qd:t=e._payload,e=e._init;try{return Zj(e(t))}catch{}}return null}var s1=Array.isArray,Ht=CW.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Wn=Zde.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,mm={pending:!1,data:null,method:null,action:null},Jj=[],l0=-1;function kc(e){return{current:e}}function us(e){0>l0||(e.current=Jj[l0],Jj[l0]=null,l0--)}function kr(e,t){l0++,Jj[l0]=e.current,e.current=t}var lc=kc(null),mb=kc(null),yh=kc(null),MC=kc(null);function RC(e,t){switch(kr(yh,t),kr(mb,e),kr(lc,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?FP(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=FP(t),e=JK(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}us(lc),kr(lc,e)}function xg(){us(lc),us(mb),us(yh)}function eN(e){var t=e.memoizedState;t!==null&&(Eg._currentValue=t.memoizedState,kr(MC,e)),t=lc.current;var n=JK(t,e.type);t!==n&&(kr(mb,e),kr(lc,n))}function OC(e){mb.current===e&&(us(lc),us(mb)),MC.current===e&&(us(MC),Eg._currentValue=mm)}var w_,TL;function Pd(e){if(w_===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);w_=t&&t[1]||"",TL=-1<n.stack.indexOf(` 43 at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return` 44`+w_+e+TL}var S_=!1;function C_(e,t){if(!e||S_)return"";S_=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(p){var f=p}Reflect.construct(e,[],h)}else{try{h.call()}catch(p){f=p}h=!1;try{var m=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),h=!0,new e}finally{h&&(m!==void 0?Object.defineProperty(e.prototype,"props",m):delete e.prototype.props)}}}else{try{throw Error()}catch(p){f=p}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.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 s=r.DetermineComponentFrameRoot(),a=s[0],o=s[1];if(a&&o){var c=a.split(` 45`),u=o.split(` 46`);for(i=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===c.length||i===u.length)for(r=c.length-1,i=u.length-1;1<=r&&0<=i&&c[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==u[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==u[i]){var d=` 47`+c[r].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=r&&0<=i);break}}}finally{S_=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Pd(n):""}function ohe(e,t){switch(e.tag){case 26:case 27:case 5:return Pd(e.type);case 16:return Pd("Lazy");case 13:return e.child!==t&&t!==null?Pd("Suspense Fallback"):Pd("Suspense");case 19:return Pd("SuspenseList");case 0:case 15:return C_(e.type,!1);case 11:return C_(e.type.render,!1);case 1:return C_(e.type,!0);case 31:return Pd("Activity");case 30:return Pd("ViewTransition");default:return""}}function EL(e){try{var t="",n=null;do t+=ohe(e,n),n=e,e=e.return;while(e);return t}catch(r){return` 48Error generating stack: `+r.message+` 49`+r.stack}}var tN=Object.prototype.hasOwnProperty,S8=Ii.unstable_scheduleCallback,k_=Ii.unstable_cancelCallback,lhe=Ii.unstable_shouldYield,che=Ii.unstable_requestPaint,Za=Ii.unstable_now,uhe=Ii.unstable_getCurrentPriorityLevel,RW=Ii.unstable_ImmediatePriority,OW=Ii.unstable_UserBlockingPriority,DC=Ii.unstable_NormalPriority,dhe=Ii.unstable_LowPriority,DW=Ii.unstable_IdlePriority,hhe=Ii.log,fhe=Ii.unstable_setDisableYieldValue,Nv=null,Ja=null;function ah(e){if(typeof hhe=="function"&&fhe(e),Ja&&typeof Ja.setStrictMode=="function")try{Ja.setStrictMode(Nv,e)}catch{}}var eo=Math.clz32?Math.clz32:ghe,mhe=Math.log,phe=Math.LN2;function ghe(e){return e>>>=0,e===0?32:31-(mhe(e)/phe|0)|0}var zw=256,$w=262144,Uw=4194304;function Mf(e){var t=e&42;if(t!==0)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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function K5(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~s,r!==0?i=Mf(r):(a&=o,a!==0?i=Mf(a):n||(n=o&~e,n!==0&&(i=Mf(n))))):(o=r&~s,o!==0?i=Mf(o):a!==0?i=Mf(a):n||(n=r&~e,n!==0&&(i=Mf(n)))),i===0?0:t!==0&&t!==i&&!(t&s)&&(s=i&-i,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:i}function Av(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function LW(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-eo(n),i=1<<r;t|=e[r],n&=~i}return t}function xhe(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;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function PW(){var e=Uw;return Uw<<=1,!(Uw&62914560)&&(Uw=4194304),e}function __(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mv(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yhe(e,t,n,r,i,s){var a=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,c=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var d=31-eo(n),h=1<<d;o[d]=0,c[d]=-1;var f=u[d];if(f!==null)for(u[d]=null,d=0;d<f.length;d++){var m=f[d];m!==null&&(m.lane&=-536870913)}n&=~h}r!==0&&IW(e,r,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(a&~t))}function IW(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-eo(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function FW(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-eo(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function BW(e,t){var n=t&-t;return n=n&42?1:C8(n),n&(e.suspendedLanes|t)?0:n}function C8(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 k8(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function zW(){var e=Wn.p;return e!==0?e:(e=window.event,e===void 0?32:vX(e.type))}function jL(e,t){var n=Wn.p;try{return Wn.p=e,t()}finally{Wn.p=n}}var nd=Math.random().toString(36).slice(2),os="__reactFiber$"+nd,Ra="__reactProps$"+nd,fx="__reactContainer$"+nd,NL="__reactEvents$"+nd,bhe="__reactListeners$"+nd,vhe="__reactHandles$"+nd,AL="__reactResources$"+nd,Rv="__reactMarker$"+nd,LC="__reactLoad$"+nd;function X5(e){delete e[os],delete e[Ra],delete e[bhe],delete e[vhe]}function Wf(e){var t;if(t=e[os])return t;for(var n=e.parentNode;n;){if(t=n[fx]||n[os]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=GP(e);e!==null;){if(n=e[os])return n;e=GP(e)}return t}e=n,n=e.parentNode}return null}function mx(e){if(e=e[os]||e[fx]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function a1(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(Ae(33))}function M0(e){var t=e[AL];return t||(t=e[AL]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Qi(e){e[Rv]=!0}function $W(e){e[LC]=void 0}var UW=new Set,VW={};function lp(e,t){yg(e,t),yg(e+"Capture",t)}function yg(e,t){for(VW[e]=t,e=0;e<t.length;e++)UW.add(t[e])}var whe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ML={},RL={};function She(e){return tN.call(RL,e)?!0:tN.call(ML,e)?!1:whe.test(e)?RL[e]=!0:(ML[e]=!0,!1)}var Un=!1;function OL(){var e=Un;return Un=!1,e}function RS(e,t,n){if(She(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Vw(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function $c(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Ha(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function HW(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Che(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nN(e){if(!e._valueTracker){var t=HW(e)?"checked":"value";e._valueTracker=Che(e,t,""+e[t])}}function qW(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=HW(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}var khe=/[\n"\\]/g;function Mo(e){return e.replace(khe,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function rN(e,t,n,r,i,s,a,o){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ha(t)):e.value!==""+Ha(t)&&(e.value=""+Ha(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?a==="number"&&e.value==t?T_(e,Ha(e.value)):T_(e,Ha(t)):n!=null?T_(e,Ha(n)):r!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Ha(o):e.removeAttribute("name")}function GW(e,t,n,r,i,s,a,o){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){nN(e);return}n=n!=null?""+Ha(n):"",t=t!=null?""+Ha(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),nN(e)}function T_(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function R0(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=""+Ha(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function WW(e,t,n){if(t!=null&&(t=""+Ha(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ha(n):""}function YW(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(Ae(92));if(s1(r)){if(1<r.length)throw Error(Ae(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Ha(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),nN(e)}function bg(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _he=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 DL(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||_he.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function KW(e,t,n){if(t!=null&&typeof t!="object")throw Error(Ae(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="",Un=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(DL(e,i,r),Un=!0)}else for(var s in t)t.hasOwnProperty(s)&&DL(e,s,t[s])}function _8(e){if(e.indexOf("-")===-1)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 The=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"],["maskType","mask-type"],["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
49-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"]]),Ehe=/^[\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 OS(e){return Ehe.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ql(){}var iN=null;function T8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var c0=null,O0=null;function LL(e){var t=mx(e);if(t&&(e=t.stateNode)){var n=e[Ra]||null;e:switch(e=t.stateNode,t.type){case"input":if(rN(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Mo(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Ra]||null;if(!i)throw Error(Ae(90));rN(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],r.form===e.form&&qW(r)}break e;case"textarea":WW(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&R0(e,!!n.multiple,t,!1)}}}var E_=!1;function XW(e,t,n){if(E_)return e(t,n);E_=!0;try{var r=e(t);return r}finally{if(E_=!1,(c0!==null||O0!==null)&&(uk(),c0&&(t=c0,e=O0,O0=c0=null,LL(t),e)))for(t=0;t<e.length;t++)LL(e[t])}}function pb(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ra]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ae(231,t,typeof n));return n}var Ru=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sN=!1;if(Ru)try{var xy={};Object.defineProperty(xy,"passive",{get:function(){sN=!0}}),window.addEventListener("test",xy,xy),window.removeEventListener("test",xy,xy)}catch{sN=!1}var oh=null,E8=null,DS=null;function QW(){if(DS)return DS;var e,t=E8,n=t.length,r,i="value"in oh?oh.value:oh.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return DS=i.slice(e,1<r?1-r:void 0)}function LS(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hw(){return!0}function PL(){return!1}function ia(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Hw:PL,this.isPropagationStopped=PL,this}return gr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Hw)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hw)},persist:function(){},isPersistent:Hw}),t}var rf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Q5=ia(rf),Ov=gr({},rf,{view:0,detail:0}),jhe=ia(Ov),j_,N_,yy,Z5=gr({},Ov,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:j8,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yy&&(yy&&e.type==="mousemove"?(j_=e.screenX-yy.screenX,N_=e.screenY-yy.screenY):N_=j_=0,yy=e),j_)},movementY:function(e){return"movementY"in e?e.movementY:N_}}),IL=ia(Z5),Nhe=gr({},Z5,{dataTransfer:0}),Ahe=ia(Nhe),Mhe=gr({},Ov,{relatedTarget:0}),A_=ia(Mhe),Rhe=gr({},rf,{animationName:0,elapsedTime:0,pseudoElement:0}),Ohe=ia(Rhe),Dhe=gr({},rf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lhe=ia(Dhe),Phe=gr({},rf,{data:0}),FL=ia(Phe),Ihe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fhe={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"},Bhe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zhe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bhe[e])?!!t[e]:!1}function j8(){return zhe}var $he=gr({},Ov,{key:function(e){if(e.key){var t=Ihe[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 5,095 bytes, line 49
49return e.type==="keypress"?(e=LS(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fhe[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:j8,charCode:function(e){return e.type==="keypress"?LS(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?LS(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uhe=ia($he),Vhe=gr({},Z5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),BL=ia(Vhe),Hhe=gr({},rf,{submitter:0}),qhe=ia(Hhe),Ghe=gr({},Ov,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:j8}),Whe=ia(Ghe),Yhe=gr({},rf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Khe=ia(Yhe),Xhe=gr({},Z5,{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}),Qhe=ia(Xhe),Zhe=gr({},rf,{newState:0,oldState:0,source:0}),Jhe=ia(Zhe),efe=[9,13,27,32],N8=Ru&&"CompositionEvent"in window,A1=null;Ru&&"documentMode"in document&&(A1=document.documentMode);var tfe=Ru&&"TextEvent"in window&&!A1,ZW=Ru&&(!N8||A1&&8<A1&&11>=A1),zL=" ",$L=!1;function JW(e,t){switch(e){case"keyup":return efe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eY(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var u0=!1;function nfe(e,t){switch(e){case"compositionend":return eY(t);case"keypress":return t.which!==32?null:($L=!0,zL);case"textInput":return e=t.data,e===zL&&$L?null:e;default:return null}}function rfe(e,t){if(u0)return e==="compositionend"||!N8&&JW(e,t)?(e=QW(),DS=E8=oh=null,u0=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ZW&&t.locale!=="ko"?null:t.data;default:return null}}var ife={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 UL(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ife[e.type]:t==="textarea"}function tY(e,t,n,r){c0?O0?O0.push(r):O0=[r]:c0=r,t=r4(t,"onChange"),0<t.length&&(n=new Q5("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var M1=null,gb=null;function sfe(e){XK(e,0)}function J5(e){var t=a1(e);if(qW(t))return e}function VL(e,t){if(e==="change")return t}var nY=!1;if(Ru){var M_;if(Ru){var R_="oninput"in document;if(!R_){var HL=document.createElement("div");HL.setAttribute("oninput","return;"),R_=typeof HL.oninput=="function"}M_=R_}else M_=!1;nY=M_&&(!document.documentMode||9<document.documentMode)}function qL(){M1&&(M1.detachEvent("onpropertychange",rY),gb=M1=null)}function rY(e){if(e.propertyName==="value"&&J5(gb)){var t=[];tY(t,gb,e,T8(e)),XW(sfe,t)}}function afe(e,t,n){e==="focusin"?(qL(),M1=t,gb=n,M1.attachEvent("onpropertychange",rY)):e==="focusout"&&qL()}function ofe(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return J5(gb)}function lfe(e,t){if(e==="click")return J5(t)}function cfe(e,t){if(e==="input"||e==="change")return J5(t)}function ufe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var so=typeof Object.is=="function"?Object.is:ufe;function xb(e,t){if(so(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!tN.call(t,i)||!so(e[i],t[i]))return!1}return!0}function aN(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function GL(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function WL(e,t){var n=GL(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GL(n)}}function iY(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iY(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sY(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=aN(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=aN(e.document)}return t}function A8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var dfe=Ru&&"documentMode"in document&&11>=document.documentMode,d0=null,oN=null,R1=null,lN=!1;
vendor: 37,762 bytes, line 49
49function YL(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lN||d0==null||d0!==aN(r)||(r=d0,"selectionStart"in r&&A8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),R1&&xb(R1,r)||(R1=r,r=r4(oN,"onSelect"),0<r.length&&(t=new Q5("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=d0)))}function Sf(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var h0={animationend:Sf("Animation","AnimationEnd"),animationiteration:Sf("Animation","AnimationIteration"),animationstart:Sf("Animation","AnimationStart"),transitionrun:Sf("Transition","TransitionRun"),transitionstart:Sf("Transition","TransitionStart"),transitioncancel:Sf("Transition","TransitionCancel"),transitionend:Sf("Transition","TransitionEnd")},O_={},aY={};Ru&&(aY=document.createElement("div").style,"AnimationEvent"in window||(delete h0.animationend.animation,delete h0.animationiteration.animation,delete h0.animationstart.animation),"TransitionEvent"in window||delete h0.transitionend.transition);function cp(e){if(O_[e])return O_[e];if(!h0[e])return e;var t=h0[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in aY)return O_[e]=t[n];return e}var oY=cp("animationend"),lY=cp("animationiteration"),cY=cp("animationstart"),hfe=cp("transitionrun"),ffe=cp("transitionstart"),mfe=cp("transitioncancel"),uY=cp("transitionend"),dY=new Map,cN="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");cN.push("scrollEnd");function Nl(e,t){dY.set(e,t),lp(t,[e])}var pfe=0;function Ou(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=wl.identifierPrefix;var n=pfe++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function KL(e){if(e==null||typeof e=="string")return e;var t=null,n=z0;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i==="none")return"none";t=t==null?i:t+(" "+i)}}return t??e.default}function rd(e,t){return e=KL(e),t=KL(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var PC=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ko=[],f0=0,M8=0;function ek(){for(var e=f0,t=M8=f0=0;t<e;){var n=ko[t];ko[t++]=null;var r=ko[t];ko[t++]=null;var i=ko[t];ko[t++]=null;var s=ko[t];if(ko[t++]=null,r!==null&&i!==null){var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}s!==0&&hY(n,i,s)}}function tk(e,t,n,r){ko[f0++]=e,ko[f0++]=t,ko[f0++]=n,ko[f0++]=r,M8|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function R8(e,t,n,r){return tk(e,t,n,r),IC(e)}function up(e,t){return tk(e,null,null,t),IC(e)}function hY(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,s=e.return;s!==null;)s.childLanes|=n,r=s.alternate,r!==null&&(r.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(i=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,i&&t!==null&&(i=31-eo(n),e=s.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),s):null}function IC(e){if(50<U1)throw U1=0,qS=null,Error(Ae(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var m0={};function gfe(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 ba(e,t,n,r){return new gfe(e,t,n,r)}function O8(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gu(e,t){var n=e.alternate;return n===null?(n=ba(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fY(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function PS(e,t,n,r,i,s){var a=0;if(r=e,typeof r=="function")O8(r)&&(a=1);else if(typeof r=="string")a=Hme(e,n,lc.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case Xj:return e=ba(31,n,t,i),e.elementType=Xj,e.lanes=s,e;case o0:return pm(n.children,i,s,t);case AW:a=8,i|=24;break;case Wj:return e=ba(12,n,t,i|2),e.elementType=Wj,e.lanes=s,e;case Yj:return e=ba(13,n,t,i),e.elementType=Yj,e.lanes=s,e;case Kj:return e=ba(19,n,t,i),e.elementType=Kj,e.lanes=s,e;case rhe:case Qj:return e=i|32,e=ba(30,n,t,e),e.elementType=Qj,e.lanes=s,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Xl:a=10;break e;case MW:a=9;break e;case v8:a=11;break e;case w8:a=14;break e;case qd:a=16,r=null;break e}a=29,n=Error(Ae(130,e===null?"null":typeof e,"")),r=null}return t=ba(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function pm(e,t,n,r){return e=ba(7,e,r,t),e.lanes=n,e}function D_(e,t,n){return e=ba(6,e,null,t),e.lanes=n,e}function mY(e){var t=ba(18,null,null,0);return t.stateNode=e,t}function L_(e,t,n){return t=ba(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var XL=new WeakMap;function Ro(e,t){if(typeof e=="object"&&e!==null){var n=XL.get(e);return n!==void 0?n:(t={value:e,source:t,stack:EL(t)},XL.set(e,t),t)}return{value:e,source:t,stack:EL(t)}}var p0=[],g0=0,FC=null,yb=0,To=[],Eo=0,Mh=null,Zl=1,Jl="";function tu(e,t){p0[g0++]=yb,p0[g0++]=FC,FC=e,yb=t}function pY(e,t,n){To[Eo++]=Zl,To[Eo++]=Jl,To[Eo++]=Mh,Mh=e;var r=Zl;e=Jl;var i=32-eo(r)-1;r&=~(1<<i),n+=1;var s=32-eo(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Zl=1<<32-eo(t)+i|n<<i|r,Jl=s+e}else Zl=1<<s|n<<i|r,Jl=e}function nk(e){e.return!==null&&(tu(e,1),pY(e,1,0))}function D8(e){for(;e===FC;)FC=p0[--g0],p0[g0]=null,yb=p0[--g0],p0[g0]=null;for(;e===Mh;)Mh=To[--Eo],To[Eo]=null,Jl=To[--Eo],To[Eo]=null,Zl=To[--Eo],To[Eo]=null}function gY(e,t){To[Eo++]=Zl,To[Eo++]=Jl,To[Eo++]=Mh,Zl=t.id,Jl=t.overflow,Mh=e}var Ji=null,vr=null,hn=!1,bh=null,Oo=!1,uN=Error(Ae(519));function Rh(e){var t=Error(Ae(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bb(Ro(t,e)),uN}function QL(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[os]=e,t[Ra]=r,n){case"dialog":vn("cancel",t),vn("close",t);break;case"iframe":case"object":case"embed":vn("load",t);break;case"video":case"audio":for(n=0;n<Cb.length;n++)vn(Cb[n],t);break;case"source":vn("error",t);break;case"img":case"image":case"link":vn("error",t),vn("load",t);break;case"details":vn("toggle",t);break;case"input":vn("invalid",t),GW(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":vn("invalid",t);break;case"textarea":vn("invalid",t),YW(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||ZK(t.textContent,n)?(r.popover!=null&&(vn("beforetoggle",t),vn("toggle",t)),r.onScroll!=null&&vn("scroll",t),r.onScrollEnd!=null&&vn("scrollend",t),r.onClick!=null&&(t.onclick=Ql),t=!0):t=!1,t||Rh(e,!0)}function BC(e){for(Ji=e.return;Ji;)switch(Ji.tag){case 5:case 31:case 13:Oo=!1;return;case 27:case 3:Oo=!0;return;default:Ji=Ji.return}}function Ap(e){if(e!==Ji)return!1;if(!hn)return BC(e),hn=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||YN(e.type,e.memoizedProps)),n=!n),n&&vr&&Rh(e),BC(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ae(317));vr=qP(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ae(317));vr=qP(e)}else t===27?(t=vr,sf(e.type)?(e=ZN,ZN=null,vr=e):vr=t):vr=Ji?Bo(e.stateNode.nextSibling):null;return!0}function Nm(){vr=Ji=null,hn=!1}function P_(){var e=bh;return e!==null&&(da===null?da=e:da.push.apply(da,e),bh=null),e}function bb(e){bh===null?bh=[e]:bh.push(e)}var dN=kc(null),dp=null,hu=null;function lh(e,t,n){kr(dN,t._currentValue),t._currentValue=n}function xu(e){e._currentValue=dN.current,us(dN)}function IS(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function hN(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null){var a=i.child;s=s.firstContext;e:for(;s!==null;){var o=s;s=i;for(var c=0;c<t.length;c++)if(o.context===t[c]){s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),IS(s.return,n,e),r||(a=null);break e}s=o.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(Ae(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),IS(a,n,e),a=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),IS(i.return,n,e),a=i.child,a=a!==null?a.sibling:null):a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function Am(e,t,n,r){e=null;for(var i=t,s=!1;i!==null;){if(!s){if(i.flags&524288)s=!0;else if(i.flags&262144)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(Ae(387));if(a=a.memoizedProps,a!==null){var o=i.type;so(i.pendingProps.value,a.value)||(e!==null?e.push(o):e=[o])}}else if(i===MC.current){if(a=i.alternate,a===null)throw Error(Ae(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Eg):e=[Eg])}i=i.return}return e!==null&&hN(t,e,n,r),t.flags|=262144,e!==null}function zC(e){for(e=e.firstContext;e!==null;){if(!so(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Mm(e){dp=e,hu=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ls(e){return xY(dp,e)}function qw(e,t){return dp===null&&Mm(e),xY(e,t)}function xY(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},hu===null){if(e===null)throw Error(Ae(308));hu=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hu=hu.next=t;return n}var xfe=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},yfe=Ii.unstable_scheduleCallback,bfe=Ii.unstable_NormalPriority,mi={$$typeof:Xl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function L8(){return{controller:new xfe,data:new Map,refCount:0}}function Dv(e){e.refCount--,e.refCount===0&&yfe(bfe,function(){e.controller.abort()})}function ZL(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var o1=null;function vfe(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var O1=null,fN=0,Rm=0,D0=null;function wfe(e,t){if(O1===null){var n=O1=[];fN=0,Rm=cM(),D0={status:"pending",value:void 0,then:function(r){n.push(r)}}}return fN++,t.then(JL,JL),t}function JL(){if(--fN===0&&(o1=null,O1!==null)){D0!==null&&(D0.status="fulfilled");var e=O1;O1=null,Rm=0,D0=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sfe(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var eP=Ht.S;Ht.S=function(e,t){if(LK=Za(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wfe(e,t),o1!==null)for(var n=kg;n!==null;)ZL(n,o1),n=n.next;if(n=e.types,n!==null){for(var r=kg;r!==null;)ZL(r,n),r=r.next;if(Rm!==0){r=o1,r===null&&(r=o1=[]);for(var i=0;i<n.length;i++){var s=n[i];r.indexOf(s)===-1&&r.push(s)}}}eP!==null&&eP(e,t)};var gm=kc(null);function P8(){var e=gm.current;return e!==null?e:hr.pooledCache}function FS(e,t){t===null?kr(gm,gm.current):kr(gm,t.pool)}function yY(){var e=P8();return e===null?null:{parent:mi._currentValue,pool:e}}var px=Error(Ae(460)),I8=Error(Ae(474)),rk=Error(Ae(542)),$C={then:function(){}};function tP(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bY(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ql,Ql),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rP(e),e===void 0&&!("reason"in t)?Error(Ae(600)):e;default:if(typeof t.status=="string")t.then(Ql,Ql);else{if(e=hr,e!==null&&100<e.shellSuspendCounter)throw Error(Ae(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rP(e),e}throw xm=t,px}}function Rf(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xm=n,px):n}}var xm=null;function nP(){if(xm===null)throw Error(Ae(459));var e=xm;return xm=null,e}function rP(e){if(e===px||e===rk)throw Error(Ae(483))}var L0=null,vb=0;function Gw(e){var t=vb;return vb+=1,L0===null&&(L0=[]),bY(L0,e,t)}function Cd(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ww(e,t){throw t.$$typeof===nhe?Error(Ae(525)):(e=Object.prototype.toString.call(t),Error(Ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vY(e){function t(g,y){if(e){var w=g.deletions;w===null?(g.deletions=[y],g.flags|=16):w.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g){for(var y=new Map;g!==null;)g.key===null?y.set(g.index,g):y.set(g.key,g),g=g.sibling;return y}function i(g,y){return g=gu(g,y),g.index=0,g.sibling=null,g}function s(g,y,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<y?(g.flags|=2,y):w):(g.flags|=134217730,y)):(g.flags|=1048576,y)}function a(g){return e&&g.alternate===null&&(g.flags|=134217730),g}function o(g,y,w,S){return y===null||y.tag!==6?(y=D_(w,g.mode,S),y.return=g,y):(y=i(y,w),y.return=g,y)}function c(g,y,w,S){var C=w.type;return C===o0?(g=d(g,y,w.props.children,S,w.key),Cd(g,w),g):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===qd&&Rf(C)===y.type)?(y=i(y,w.props),Cd(y,w),y.return=g,y):(y=PS(w.type,w.key,w.props,null,g.mode,S),Cd(y,w),y.return=g,y)}function u(g,y,w,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=L_(w,g.mode,S),y.return=g,y):(y=i(y,w.children||[]),y.return=g,y)}function d(g,y,w,S,C){return y===null||y.tag!==7?(y=pm(w,g.mode,S,C),y.return=g,y):(y=i(y,w),y.return=g,y)}function h(g,y,w){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=D_(""+y,g.mode,w),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Bw:return w=PS(y.type,y.key,y.props,null,g.mode,w),Cd(w,y),w.return=g,w;case i1:return y=L_(y,g.mode,w),y.return=g,y;case qd:return y=Rf(y),h(g,y,w)}if(s1(y)||gy(y))return y=pm(y,g.mode,w,null),y.return=g,y;if(typeof y.then=="function")return h(g,Gw(y),w);if(y.$$typeof===Xl)return h(g,qw(g,y),w);Ww(g,y)}return null}function f(g,y,w,S){var C=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return C!==null?null:o(g,y,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Bw:return w.key===C?c(g,y,w,S):null;case i1:return w.key===C?u(g,y,w,S):null;case qd:return w=Rf(w),f(g,y,w,S)}if(s1(w)||gy(w))return C!==null?null:d(g,y,w,S,null);if(typeof w.then=="function")return f(g,y,Gw(w),S);if(w.$$typeof===Xl)return f(g,y,qw(g,w),S);Ww(g,w)}return null}function m(g,y,w,S,C){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return g=g.get(w)||null,o(y,g,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Bw:return g=g.get(S.key===null?w:S.key)||null,c(y,g,S,C);case i1:return g=g.get(S.key===null?w:S.key)||null,u(y,g,S,C);case qd:return S=Rf(S),m(g,y,w,S,C)}if(s1(S)||gy(S))return g=g.get(w)||null,d(y,g,S,C,null);if(typeof S.then=="function")return m(g,y,w,Gw(S),C);if(S.$$typeof===Xl)return m(g,y,w,qw(y,S),C);Ww(y,S)}return null}function p(g,y,w,S){for(var C=null,k=null,_=y,E=y=0,A=null;_!==null&&E<w.length;E++){_.index>E?(A=_,_=null):A=_.sibling;var j=f(g,_,w[E],S);if(j===null){_===null&&(_=A);break}e&&_&&j.alternate===null&&t(g,_),y=s(j,y,E),k===null?C=j:k.sibling=j,k=j,_=A}if(E===w.length)return n(g,_),hn&&tu(g,E),C;if(_===null){for(;E<w.length;E++)_=h(g,w[E],S),_!==null&&(y=s(_,y,E),k===null?C=_:k.sibling=_,k=_);return hn&&tu(g,E),C}for(_=r(_);E<w.length;E++)A=m(_,g,E,w[E],S),A!==null&&(e&&(j=A.alternate,j!==null&&_.delete(j.key===null?E:j.key)),y=s(A,y,E),k===null?C=A:k.sibling=A,k=A);return e&&_.forEach(function(D){return t(g,D)}),hn&&tu(g,E),C}function x(g,y,w,S){if(w==null)throw Error(Ae(151));for(var C=null,k=null,_=y,E=y=0,A=null,j=w.next();_!==null&&!j.done;E++,j=w.next()){_.index>E?(A=_,_=null):A=_.sibling;var D=f(g,_,j.value,S);if(D===null){_===null&&(_=A);break}e&&_&&D.alternate===null&&t(g,_),y=s(D,y,E),k===null?C=D:k.sibling=D,k=D,_=A}if(j.done)return n(g,_),hn&&tu(g,E),C;if(_===null){for(;!j.done;E++,j=w.next())j=h(g,j.value,S),j!==null&&(y=s(j,y,E),k===null?C=j:k.sibling=j,k=j);return hn&&tu(g,E),C}for(_=r(_);!j.done;E++,j=w.next())j=m(_,g,E,j.value,S),j!==null&&(e&&(A=j.alternate,A!==null&&_.delete(A.key===null?E:A.key)),y=s(j,y,E),k===null?C=j:k.sibling=j,k=j);return e&&_.forEach(function(M){return t(g,M)}),hn&&tu(g,E),C}function v(g,y,w,S){if(typeof w=="object"&&w!==null&&w.type===o0&&w.key===null&&w.props.ref===void 0&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Bw:e:{for(var C=w.key;y!==null;){if(y.key===C){if(C=w.type,C===o0){if(y.tag===7){n(g,y.sibling),S=i(y,w.props.children),Cd(S,w),S.return=g,g=S;break e}}else if(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===qd&&Rf(C)===y.type){n(g,y.sibling),S=i(y,w.props),Cd(S,w),S.return=g,g=S;break e}n(g,y);break}else t(g,y);y=y.sibling}w.type===o0?(S=pm(w.props.children,g.mode,S,w.key),Cd(S,w),S.return=g,g=S):(S=PS(w.type,w.key,w.props,null,g.mode,S),Cd(S,w),S.return=g,g=S)}return a(g);case i1:e:{for(C=w.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),S=i(y,w.children||[]),S.return=g,g=S;break e}else{n(g,y);break}else t(g,y);y=y.sibling}S=L_(w,g.mode,S),S.return=g,g=S}return a(g);case qd:return w=Rf(w),v(g,y,w,S)}if(s1(w))return p(g,y,w,S);if(gy(w)){if(C=gy(w),typeof C!="function")throw Error(Ae(150));return w=C.call(w),x(g,y,w,S)}if(typeof w.then=="function")return v(g,y,Gw(w),S);if(w.$$typeof===Xl)return v(g,y,qw(g,w),S);Ww(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),S=i(y,w),S.return=g,g=S):(n(g,y),S=D_(w,g.mode,S),S.return=g,g=S),a(g)):n(g,y)}return function(g,y,w,S){try{vb=0;var C=v(g,y,w,S);return L0=null,C}catch(_){if(_===px||_===rk)throw _;var k=ba(29,_,null,g.mode);return k.lanes=S,k.return=g,k}finally{}}}var Om=vY(!0),wY=vY(!1),Gd=!1;function F8(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mN(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 vh(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wh(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Hn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=IC(e),hY(e,null,n),t}return tk(e,r,t,n),IC(e)}function D1(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,FW(e,n)}}function I_(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var pN=!1;function L1(){if(pN){var e=D0;if(e!==null)throw e}}function P1(e,t,n,r){pN=!1;var i=e.updateQueue;Gd=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var c=o,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==a&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(s!==null){var h=i.baseState;a=0,d=u=c=null,o=s;do{var f=o.lane&-536870913,m=f!==o.lane;if(m?(Cn&f)===f:(r&f)===f){f!==0&&f===Rm&&(pN=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var p=e,x=o;f=t;var v=n;switch(x.tag){case 1:if(p=x.payload,typeof p=="function"){h=p.call(v,h,f);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=x.payload,f=typeof p=="function"?p.call(v,h,f):p,f==null)break e;h=gr({},h,f);break e;case 2:Gd=!0}}f=o.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=m,c=h):d=d.next=m,a|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;m=o,o=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);d===null&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,s===null&&(i.shared.lanes=0),Lh|=a,e.lanes=a,e.memoizedState=h}}function SY(e,t){if(typeof e!="function")throw Error(Ae(191,e));e.call(t)}function CY(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)SY(n[e],t)}var Oh=kc(null),UC=kc(0);function iP(e,t){e=Iu,kr(UC,e),kr(Oh,t),Iu=e|t.baseLanes}function gN(){kr(UC,Iu),kr(Oh,Oh.current)}function B8(){Iu=UC.current,us(Oh),us(UC)}var fs=kc(null),Ns=null;function Sh(e){var t=e.alternate;kr(ds,ds.current&1),kr(fs,e),Ns===null&&(t===null||Oh.current!==null||t.memoizedState!==null)&&(Ns=e)}function xN(e){kr(ds,ds.current),kr(fs,e),Ns===null&&(Ns=e)}function kY(e){e.tag===22?(kr(ds,ds.current),kr(fs,e),Ns===null&&(Ns=e)):Ch()}function Ch(){kr(ds,ds.current),kr(fs,fs.current)}function Ga(e){us(fs),Ns===e&&(Ns=null),us(ds)}var ds=kc(0);function wb(e,t){kr(fs,fs.current),kr(ds,t)}function z8(e){us(ds),us(fs),Ns===e&&(Ns=null)}function VC(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||QN(n)||fM(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Du=0,rn=null,cr=null,fi=null,HC=!1,P0=!1,Dm=!1,qC=0,Sb=0,I0=null,Cfe=0;function Xr(){throw Error(Ae(321))}function $8(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!so(e[n],t[n]))return!1;return!0}function U8(e,t,n,r,i,s){return Du=s,rn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ht.H=e===null||e.memoizedState===null?tK:nK,Dm=!1,s=n(r,i),Dm=!1,P0&&(s=TY(t,n,r,i)),_Y(e),s}function _Y(e){Ht.H=GC;var t=cr!==null&&cr.next!==null;if(Du=0,fi=cr=rn=null,HC=!1,Sb=0,I0=null,t)throw Error(Ae(300));e===null||yi||(e=e.dependencies,e!==null&&zC(e)&&(yi=!0))}function TY(e,t,n,r){rn=e;var i=0;do{if(P0&&(I0=null),Sb=0,P0=!1,25<=i)throw Error(Ae(301));if(i+=1,fi=cr=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}Ht.H=Mfe,s=t(n,r)}while(P0);return s}function kfe(){var e=Ht.H,t=e.useState()[0];return t=typeof t.then=="function"?Lv(t):t,e=e.useState()[0],(cr!==null?cr.memoizedState:null)!==e&&(rn.flags|=1024),t}function V8(){var e=qC!==0;return qC=0,e}function H8(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function q8(e){if(HC){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}HC=!1}Du=0,fi=cr=rn=null,P0=!1,Sb=qC=0,I0=null}function Vs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fi===null?rn.memoizedState=fi=e:fi=fi.next=e,fi}function oi(){if(cr===null){var e=rn.alternate;e=e!==null?e.memoizedState:null}else e=cr.next;var t=fi===null?rn.memoizedState:fi.next;if(t!==null)fi=t,cr=e;else{if(e===null)throw rn.alternate===null?Error(Ae(467)):Error(Ae(310));cr=e,e={memoizedState:cr.memoizedState,baseState:cr.baseState,baseQueue:cr.baseQueue,queue:cr.queue,next:null},fi===null?rn.memoizedState=fi=e:fi=fi.next=e}return fi}function ik(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lv(e){var t=Sb;return Sb+=1,I0===null&&(I0=[]),e=bY(I0,e,t),t=rn,(fi===null?t.memoizedState:fi.next)===null&&(t=t.alternate,Ht.H=t===null||t.memoizedState===null?tK:nK),e}function sk(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Lv(e);if(e.$$typeof===she)return;if(e.$$typeof===Xl)return ls(e)}throw Error(Ae(438,String(e)))}function G8(e){var t=null,n=rn.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=rn.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ik(),rn.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ihe;return t.index++,n}function Lu(e,t){return typeof t=="function"?t(e):t}function BS(e){var t=oi();return W8(t,cr,e)}function W8(e,t,n){var r=e.queue;if(r===null)throw Error(Ae(311));r.lastRenderedReducer=n;var i=e.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}t.baseQueue=i=s,r.pending=null}if(s=e.baseState,i===null)e.memoizedState=s;else{t=i.next;var o=a=null,c=null,u=t,d=!1;do{var h=u.lane&-536870913;if(h!==u.lane?(Cn&h)===h:(Du&h)===h){var f=u.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Rm&&(d=!0);else if((Du&f)===f){u=u.next,f===Rm&&(d=!0);continue}else h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=h,a=s):c=c.next=h,rn.lanes|=f,Lh|=f;h=u.action,Dm&&n(s,h),s=u.hasEagerState?u.eagerState:n(s,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=f,a=s):c=c.next=f,rn.lanes|=h,Lh|=h;u=u.next}while(u!==null&&u!==t);if(c===null?a=s:c.next=o,!so(s,e.memoizedState)&&(yi=!0,d&&(n=D0,n!==null)))throw n;e.memoizedState=s,e.baseState=a,e.baseQueue=c,r.lastRenderedState=s}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function F_(e){var t=oi(),n=t.queue;if(n===null)throw Error(Ae(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);so(s,t.memoizedState)||(yi=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function EY(e,t,n){var r=rn,i=oi(),s=hn;if(s){if(n===void 0)throw Error(Ae(407));n=n()}else n=t();var a=!so((cr||i).memoizedState,n);if(a&&(i.memoizedState=n,yi=!0),i=i.queue,Y8(AY.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||a||fi!==null&&(fi.memoizedState.tag&1)!==0,vg(e?9:8,{destroy:void 0},NY.bind(null,r,i,n,t),null),e){if(r.flags|=2048,hr===null)throw Error(Ae(349));s||Du&127||jY(r,t,n)}return n}function jY(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=rn.updateQueue,t===null?(t=ik(),rn.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function NY(e,t,n,r){t.value=n,t.getSnapshot=r,MY(t)&&RY(e)}function AY(e,t,n){return n(function(){MY(t)&&RY(e)})}function MY(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!so(e,n)}catch{return!0}}function RY(e){var t=up(e,2);t!==null&&_a(t,e,2)}function yN(e){var t=Vs();if(typeof e=="function"){var n=e;if(e=n(),Dm){ah(!0);try{n()}finally{ah(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:e},t}function OY(e,t,n,r){return e.baseState=n,W8(e,cr,typeof r=="function"?r:Lu)}function _fe(e,t,n,r,i){if(ok(e))throw Error(Ae(485));if(e=t.action,e!==null){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){s.listeners.push(a)}};Ht.T!==null?n(!0):s.isTransition=!1,r(s),n=t.pending,n===null?(s.next=t.pending=s,DY(t,s)):(s.next=n.next,t.pending=n.next=s)}}function DY(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var s=Ht.T,a={};a.types=s!==null?s.types:null,Ht.T=a;try{var o=n(i,r),c=Ht.S;c!==null&&c(a,o),sP(e,t,o)}catch(u){bN(e,t,u)}finally{s!==null&&a.types!==null&&(s.types=a.types),Ht.T=s}}else try{s=n(i,r),sP(e,t,s)}catch(u){bN(e,t,u)}}function sP(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){aP(e,t,r)},function(r){return bN(e,t,r)}):aP(e,t,n)}function aP(e,t,n){t.status="fulfilled",t.value=n,LY(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,DY(e,n)))}function bN(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,LY(t),t=t.next;while(t!==r)}e.action=null}function LY(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function PY(e,t){return t}function oP(e,t){if(hn){var n=hr.formState;if(n!==null){e:{var r=rn;if(hn){if(vr){t:{for(var i=vr,s=Oo;i.nodeType!==8;){if(!s){i=null;break t}if(i=Bo(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){vr=Bo(i.nextSibling),r=i.data==="F!";break e}}Rh(r)}r=!1}r&&(t=n[0])}}return n=Vs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:PY,lastRenderedState:t},n.queue=r,n=ZY.bind(null,rn,r),r.dispatch=n,r=yN(!1),s=Z8.bind(null,rn,!1,r.queue),r=Vs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=_fe.bind(null,rn,i,s,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function lP(e){var t=oi();return IY(t,cr,e)}function IY(e,t,n){if(t=W8(e,t,PY)[0],e=BS(Lu)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Lv(t)}catch(a){throw a===px?rk:a}else r=t;t=oi();var i=t.queue,s=i.dispatch;return n!==t.memoizedState&&(rn.flags|=2048,vg(9,{destroy:void 0},Tfe.bind(null,i,n),null)),[r,s,e]}function Tfe(e,t){e.action=t}function cP(e){var t=oi(),n=cr;if(n!==null)return IY(t,n,e);oi(),t=t.memoizedState,n=oi();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function vg(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=rn.updateQueue,t===null&&(t=ik(),rn.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function FY(){return oi().memoizedState}function zS(e,t,n,r){var i=Vs();rn.flags|=e,i.memoizedState=vg(1|t,{destroy:void 0},n,r===void 0?null:r)}function ak(e,t,n,r){var i=oi();r=r===void 0?null:r;var s=i.memoizedState.inst;cr!==null&&r!==null&&$8(r,cr.memoizedState.deps)?i.memoizedState=vg(t,s,n,r):(rn.flags|=e,i.memoizedState=vg(1|t,s,n,r))}function uP(e,t){zS(8390656,8,e,t)}function Y8(e,t){ak(2048,8,e,t)}function Efe(e){rn.flags|=4;var t=rn.updateQueue;if(t===null)t=ik(),rn.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function BY(e){var t=oi().memoizedState;return Efe({ref:t,nextImpl:e}),function(){if(Hn&2)throw Error(Ae(440));return t.impl.apply(void 0,arguments)}}function zY(e,t){return ak(4,2,e,t)}function $Y(e,t){return ak(4,4,e,t)}function UY(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function VY(e,t,n){n=n!=null?n.concat([e]):null,ak(4,4,UY.bind(null,t,e),n)}function K8(){}function HY(e,t){var n=oi();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&$8(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qY(e,t){var n=oi();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&$8(t,r[1]))return r[0];if(r=e(),Dm){ah(!0);try{e()}finally{ah(!1)}}return n.memoizedState=[r,t],r}function X8(e,t,n){return n===void 0||Du&1073741824&&!(Cn&261930)?e.memoizedState=t:(e.memoizedState=n,e=IK(),rn.lanes|=e,Lh|=e,n)}function GY(e,t,n,r){return so(n,t)?n:Oh.current!==null?(e=X8(e,n,r),so(e,t)||(yi=!0),e):!(Du&106)||Du&1073741824&&!(Cn&261930)?(yi=!0,e.memoizedState=n):(e=IK(),rn.lanes|=e,Lh|=e,t)}function WY(e,t,n,r,i){var s=Wn.p;Wn.p=s!==0&&8>s?s:8;var a=Ht.T,o={};o.types=a!==null?a.types:null,Ht.T=o,Z8(e,!1,t,n);try{var c=i(),u=Ht.S;if(u!==null&&u(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=Sfe(c,r);I1(e,t,d,to(e))}else I1(e,t,r,to(e))}catch(h){I1(e,t,{then:function(){},status:"rejected",reason:h},to())}finally{Wn.p=s,a!==null&&o.types!==null&&(a.types=o.types),Ht.T=a}}function jfe(){}function vN(e,t,n,r){if(e.tag!==5)throw Error(Ae(476));var i=YY(e).queue;WY(e,i,t,mm,n===null?jfe:function(){return KY(e),n(r)})}function YY(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:mm,baseState:mm,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:mm},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function KY(e){var t=YY(e);t.next===null&&(t=e.alternate.memoizedState),I1(e,t.next.queue,{},to())}function Q8(){return ls(Eg)}function XY(){return oi().memoizedState}function QY(){return oi().memoizedState}function Nfe(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=to();e=vh(n);var r=wh(t,e,n);r!==null&&(_a(r,t,n),D1(r,t,n)),t={cache:L8()},e.payload=t;return}t=t.return}}function Afe(e,t,n){var r=to();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ok(e)?JY(t,n):(n=R8(e,t,n,r),n!==null&&(_a(n,e,r),eK(n,t,r)))}function ZY(e,t,n){var r=to();I1(e,t,n,r)}function I1(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ok(e))JY(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,so(o,a))return tk(e,t,i,0),hr===null&&ek(),!1}catch{}finally{}if(n=R8(e,t,i,r),n!==null)return _a(n,e,r),eK(n,t,r),!0}return!1}function Z8(e,t,n,r){if(r={lane:2,revertLane:cM(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ok(e)){if(t)throw Error(Ae(479))}else t=R8(e,n,r,2),t!==null&&_a(t,e,2)}function ok(e){var t=e.alternate;return e===rn||t!==null&&t===rn}function JY(e,t){P0=HC=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eK(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,FW(e,n)}}var GC={readContext:ls,use:sk,useCallback:Xr,useContext:Xr,useEffect:Xr,useImperativeHandle:Xr,useLayoutEffect:Xr,useInsertionEffect:Xr,useMemo:Xr,useReducer:Xr,useRef:Xr,useState:Xr,useDebugValue:Xr,useDeferredValue:Xr,useTransition:Xr,useSyncExternalStore:Xr,useId:Xr,useHostTransitionStatus:Xr,useFormState:Xr,useActionState:Xr,useOptimistic:Xr,useMemoCache:Xr,useCacheRefresh:Xr,useEffectEvent:Xr},tK={readContext:ls,use:sk,useCallback:function(e,t){return Vs().memoizedState=[e,t===void 0?null:t],e},useContext:ls,useEffect:uP,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,zS(4194308,4,UY.b
vendor: 5,803 bytes, line 49
49ind(null,t,e),n)},useLayoutEffect:function(e,t){return zS(4194308,4,e,t)},useInsertionEffect:function(e,t){zS(4,2,e,t)},useMemo:function(e,t){var n=Vs();t=t===void 0?null:t;var r=e();if(Dm){ah(!0);try{e()}finally{ah(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Vs();if(n!==void 0){var i=n(t);if(Dm){ah(!0);try{n(t)}finally{ah(!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=Afe.bind(null,rn,e),[r.memoizedState,e]},useRef:function(e){var t=Vs();return e={current:e},t.memoizedState=e},useState:function(e){e=yN(e);var t=e.queue,n=ZY.bind(null,rn,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:K8,useDeferredValue:function(e,t){var n=Vs();return X8(n,e,t)},useTransition:function(){var e=yN(!1);return e=WY.bind(null,rn,e.queue,!0,!1),Vs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=rn,i=Vs();if(hn){if(n===void 0)throw Error(Ae(407));n=n()}else{if(n=t(),hr===null)throw Error(Ae(349));Cn&127||jY(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,uP(AY.bind(null,r,s,e),[e]),r.flags|=2048,vg(9,{destroy:void 0},NY.bind(null,r,s,n,t),null),n},useId:function(){var e=Vs(),t=hr.identifierPrefix;if(hn){var n=Jl,r=Zl;n=(r&~(1<<32-eo(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=qC++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Cfe++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Q8,useFormState:oP,useActionState:oP,useOptimistic:function(e){var t=Vs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Z8.bind(null,rn,!0,n),n.dispatch=t,[e,t]},useMemoCache:G8,useCacheRefresh:function(){return Vs().memoizedState=Nfe.bind(null,rn)},useEffectEvent:function(e){var t=Vs(),n={impl:e};return t.memoizedState=n,function(){if(Hn&2)throw Error(Ae(440));return n.impl.apply(void 0,arguments)}}},nK={readContext:ls,use:sk,useCallback:HY,useContext:ls,useEffect:Y8,useImperativeHandle:VY,useInsertionEffect:zY,useLayoutEffect:$Y,useMemo:qY,useReducer:BS,useRef:FY,useState:function(){return BS(Lu)},useDebugValue:K8,useDeferredValue:function(e,t){var n=oi();return GY(n,cr.memoizedState,e,t)},useTransition:function(){var e=BS(Lu)[0],t=oi().memoizedState;return[typeof e=="boolean"?e:Lv(e),t]},useSyncExternalStore:EY,useId:XY,useHostTransitionStatus:Q8,useFormState:lP,useActionState:lP,useOptimistic:function(e,t){var n=oi();return OY(n,cr,e,t)},useMemoCache:G8,useCacheRefresh:QY,useEffectEvent:BY},Mfe={readContext:ls,use:sk,useCallback:HY,useContext:ls,useEffect:Y8,useImperativeHandle:VY,useInsertionEffect:zY,useLayoutEffect:$Y,useMemo:qY,useReducer:F_,useRef:FY,useState:function(){return F_(Lu)},useDebugValue:K8,useDeferredValue:function(e,t){var n=oi();return cr===null?X8(n,e,t):GY(n,cr.memoizedState,e,t)},useTransition:function(){var e=F_(Lu)[0],t=oi().memoizedState;return[typeof e=="boolean"?e:Lv(e),t]},useSyncExternalStore:EY,useId:XY,useHostTransitionStatus:Q8,useFormState:cP,useActionState:cP,useOptimistic:function(e,t){var n=oi();return cr!==null?OY(n,cr,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:G8,useCacheRefresh:QY,useEffectEvent:BY};function B_(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:gr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wN={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=to(),i=vh(r);i.payload=t,n!=null&&(i.callback=n),t=wh(e,i,r),t!==null&&(_a(t,e,r),D1(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=to(),i=vh(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wh(e,i,r),t!==null&&(_a(t,e,r),D1(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=to(),r=vh(n);r.tag=2,t!=null&&(r.callback=t),t=wh(e,r,n),t!==null&&(_a(t,e,n),D1(t,e,n))}};function dP(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!xb(n,r)||!xb(i,s):!0}function hP(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wN.enqueueReplaceState(t,t.state,null)}function Lm(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=gr({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function rK(e){PC(e)}function iK(e){console.error(e)}function sK(e){PC(e)}function WC(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function fP(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function SN(e,t,n){return n=vh(n),n.tag=3,n.payload={element:null},n.callback=function(){WC(e,t)},n}function aK(e){return e=vh(e),e.tag=3,e}function oK(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var s=r.value;e.payload=function(){return i(s)},e.callback=function(){fP(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){fP(t,n,r),typeof i!="function"&&(kh===null?kh=new Set([this]):kh.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function Rfe(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Am(t,n,i,!0),n=fs.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ns===null?t4():n.alternate===null&&ti===0&&(ti=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===$C?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),G_(e,r,i)),!1;
vendor: 71,324 bytes, line 49
49case 22:return n.flags|=65536,r===$C?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),G_(e,r,i)),!1}throw Error(Ae(435,n.tag))}return G_(e,r,i),t4(),!1}if(hn)return t=fs.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==uN&&(e=Error(Ae(422),{cause:r}),bb(Ro(e,n)))):(r!==uN&&(t=Error(Ae(423),{cause:r}),bb(Ro(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Ro(r,n),i=SN(e.stateNode,r,i),I_(e,i),ti!==4&&(ti=2)),!1;var s=Error(Ae(520),{cause:r});if(s=Ro(s,n),$1===null?$1=[s]:$1.push(s),ti!==4&&(ti=2),t===null)return!0;r=Ro(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=SN(n.stateNode,r,e),I_(n,e),!1;case 1:if(t=n.type,s=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(kh===null||!kh.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,i=aK(i),oK(i,e,n,r),I_(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var J8=Error(Ae(461)),yi=!1;function Ai(e,t,n,r){t.child=e===null?wY(t,null,n,r):Om(t,e.child,n,r)}function mP(e,t,n,r,i){n=n.render;var s=t.ref;if("ref"in r){var a={};for(var o in r)o!=="ref"&&(a[o]=r[o])}else a=r;return Mm(t),r=U8(e,t,n,a,s,i),o=V8(),e!==null&&!yi?(H8(e,t,i),Pu(e,t,i)):(hn&&o&&nk(t),t.flags|=1,Ai(e,t,r,i),t.child)}function pP(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!O8(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,lK(e,t,s,r,i)):(e=PS(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!tM(e,i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:xb,n(a,r)&&e.ref===t.ref)return Pu(e,t,i)}return t.flags|=1,e=gu(s,r),e.ref=t.ref,e.return=t,t.child=e}function lK(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(xb(s,r)&&e.ref===t.ref)if(yi=!1,t.pendingProps=r=s,tM(e,i))e.flags&131072&&(yi=!0);else return t.lanes=e.lanes,Pu(e,t,i)}return CN(e,t,n,r,i)}function cK(e,t,n,r){var i=r.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(s=s!==null?s.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~s}else r=0,t.child=null;return gP(e,t,s,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&FS(t,s!==null?s.cachePool:null),s!==null?iP(t,s):gN(),kY(t);else return r=t.lanes=536870912,gP(e,t,s!==null?s.baseLanes|n:n,n,r)}else s!==null?(FS(t,s.cachePool),iP(t,s),Ch(),t.memoizedState=null):(e!==null&&FS(t,null),gN(),Ch());return Ai(e,t,i,n),t.child}function F1(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gP(e,t,n,r,i){var s=P8();return s=s===null?null:{parent:mi._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&FS(t,null),gN(),kY(t),e!==null&&Am(e,t,r,!0),t.childLanes=i,null}function $S(e,t){return t=lk({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xP(e,t,n){return Om(t,e.child,null,n),e=$S(t,t.pendingProps),e.flags|=2,Ga(t),t.memoizedState=null,e}function Ofe(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(hn){if(r.mode==="hidden")return e=$S(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},F1(null,e);if(xN(t),(e=vr)?(e=lX(e,Oo),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mh!==null?{id:Zl,overflow:Jl}:null,retryLane:536870912,hydrationErrors:null},n=mY(e),n.return=t,t.child=n,Ji=t,vr=null)):e=null,e===null)throw Rh(t);return t.lanes=536870912,null}return $S(t,r)}var s=e.memoizedState;if(s!==null){var a=s.dehydrated;if(xN(t),i)if(t.flags&256)t.flags&=-257,t=xP(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(Ae(558));else if(yi||Am(e,t,n,!1),i=(n&e.childLanes)!==0,yi||i){if(Oh.current===null){if(r=hr,r!==null&&(a=BW(r,n),a!==0&&a!==s.retryLane))throw s.retryLane=a,up(e,a),_a(r,e,a),J8;t4()}t=xP(e,t,n)}else e=s.treeContext,vr=Bo(a.nextSibling),Ji=t,hn=!0,bh=null,Oo=!1,e!==null&&gY(t,e),t=$S(t,r),t.flags|=134221824;return t}return e=gu(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xp(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(Ae(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function CN(e,t,n,r,i){return Mm(t),n=U8(e,t,n,r,void 0,i),r=V8(),e!==null&&!yi?(H8(e,t,i),Pu(e,t,i)):(hn&&r&&nk(t),t.flags|=1,Ai(e,t,n,i),t.child)}function yP(e,t,n,r,i,s){return Mm(t),t.updateQueue=null,n=TY(t,r,n,i),_Y(e),r=V8(),e!==null&&!yi?(H8(e,t,s),Pu(e,t,s)):(hn&&r&&nk(t),t.flags|=1,Ai(e,t,n,s),t.child)}function bP(e,t,n,r,i){if(Mm(t),t.stateNode===null){var s=m0,a=n.contextType;typeof a=="object"&&a!==null&&(s=ls(a)),s=new n(r,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=wN,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=r,s.state=t.memoizedState,s.refs={},F8(t),a=n.contextType,s.context=typeof a=="object"&&a!==null?ls(a):m0,s.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(B_(t,n,a,r),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(a=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),a!==s.state&&wN.enqueueReplaceState(s,s.state,null),P1(t,r,s,i),L1(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){s=t.stateNode;var o=t.memoizedProps,c=Lm(n,o);s.props=c;var u=s.context,d=n.contextType;a=m0,typeof d=="object"&&d!==null&&(a=ls(d));var h=n.getDerivedStateFromProps;d=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||u!==a)&&hP(t,s,r,a),Gd=!1;var f=t.memoizedState;s.state=f,P1(t,r,s,i),L1(),u=t.memoizedState,o||f!==u||Gd?(typeof h=="function"&&(B_(t,n,h,r),u=t.memoizedState),(c=Gd||dP(t,n,c,r,f,u,a))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=a,r=c):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,mN(e,t),a=t.memoizedProps,d=Lm(n,a),s.props=d,h=t.pendingProps,f=s.context,u=n.contextType,c=m0,typeof u=="object"&&u!==null&&(c=ls(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==h||f!==c)&&hP(t,s,r,c),Gd=!1,f=t.memoizedState,s.state=f,P1(t,r,s,i),L1();var m=t.memoizedState;a!==h||f!==m||Gd||e!==null&&e.dependencies!==null&&zC(e.dependencies)?(typeof o=="function"&&(B_(t,n,o,r),m=t.memoizedState),(d=Gd||dP(t,n,d,r,f,m,c)||e!==null&&e.dependencies!==null&&zC(e.dependencies))?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=c,r=d):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return s=r,Xp(e,t),r=(t.flags&128)!==0,s||r?(s=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&r?(t.child=Om(t,e.child,null,i),t.child=Om(t,null,n,i)):Ai(e,t,n,i),t.memoizedState=s.state,e=t.child):e=Pu(e,t,i),e}function vP(e,t,n,r){return Nm(),t.flags|=256,Ai(e,t,n,r),t.child}var kN={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _N(e){return{baseLanes:e,cachePool:yY()}}function TN(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Xa),e}function uK(e,t,n){var r=t.pendingProps,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(ds.current&2)!==0),a&&(i=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(hn){if(i?Sh(t):Ch(),(e=vr)?(e=lX(e,Oo),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mh!==null?{id:Zl,overflow:Jl}:null,retryLane:536870912,hydrationErrors:null},n=mY(e),n.return=t,t.child=n,Ji=t,vr=null)):e=null,e===null)throw Rh(t);return fM(e)?t.lanes=32:t.lanes=536870912,null}return s=r.children,r=r.fallback,i?(Ch(),i=t.mode,s=lk({mode:"hidden",children:s},i),r=pm(r,i,n,null),s.return=t,r.return=t,s.sibling=r,t.child=s,r=t.child,r.memoizedState=_N(n),r.childLanes=TN(e,a,n),t.memoizedState=kN,F1(null,r)):(Sh(t),eM(t,s))}var o=e.memoizedState;if(o!==null){var c=o.dehydrated;if(c!==null)return Dfe(e,t,s,a,r,c,o,n)}return i?(Ch(),i=r.fallback,s=t.mode,o=e.child,c=o.sibling,r=gu(o,{mode:"hidden",children:r.children}),r.subtreeFlags=o.subtreeFlags&1206910976,c!==null?i=gu(c,i):(i=pm(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,F1(null,r),r=t.child,i=e.child.memoizedState,i===null?i=_N(n):(s=i.cachePool,s!==null?(o=mi._currentValue,s=s.parent!==o?{parent:o,pool:o}:s):s=yY(),i={baseLanes:i.baseLanes|n,cachePool:s}),r.memoizedState=i,r.childLanes=TN(e,a,n),t.memoizedState=kN,F1(e.child,r)):(Sh(t),n=e.child,e=n.sibling,n=gu(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function eM(e,t){return t=lk({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function lk(e,t){return e=ba(22,e,null,t),e.lanes=0,e}function Yw(e,t,n){return Om(t,e.child,null,n),e=eM(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dfe(e,t,n,r,i,s,a,o){if(n)return t.flags&256?(Sh(t),t.flags&=-257,Yw(e,t,o)):t.memoizedState!==null?(Ch(),t.child=e.child,t.flags|=128,null):(Ch(),s=i.fallback,a=t.mode,i=lk({mode:"visible",children:i.children},a),s=pm(s,a,o,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,Om(t,e.child,null,o),i=t.child,i.memoizedState=_N(o),i.childLanes=TN(e,r,o),t.memoizedState=kN,F1(null,i));if(Sh(t),fM(s)){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;return r=c,r!==""&&(i=Error(Ae(419)),i.stack="",i.digest=r,bb({value:i,source:null,stack:null})),Yw(e,t,o)}if(yi||Am(e,t,o,!1),r=(o&e.childLanes)!==0,yi||r){if(Oh.current!==null)return Yw(e,t,o);if(r=hr,r!==null&&(i=BW(r,o),i!==0&&i!==a.retryLane))throw a.retryLane=i,up(e,i),_a(r,e,i),J8;return QN(s)||t4(),Yw(e,t,o)}return QN(s)?(t.flags|=192,t.child=e.child,null):(e=a.treeContext,vr=Bo(s.nextSibling),Ji=t,hn=!0,bh=null,Oo=!1,e!==null&&gY(t,e),t=eM(t,i.children),t.flags|=134221824,t)}function wP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),IS(e.return,t,n)}function SP(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&VC(n)===null&&(t=e),e=e.sibling}return t}function Kw(e,t,n,r,i,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=s)}function z_(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function EN(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;r=r.children;var a=ds.current;if(t.flags&128)return wb(t,a),null;var o=(a&2)!==0;if(o?(a=a&1|2,t.flags|=128):a&=1,wb(t,a),i==="backwards"&&e!==null?(z_(e),Ai(e,t,r,n),z_(e)):Ai(e,t,r,n),r=hn?yb:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wP(e,n,t);else if(e.tag===19)wP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"backwards":n=SP(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,z_(t)),Kw(t,!0,i,null,s,r);break;case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&VC(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Kw(t,!0,n,null,s,r);break;case"together":Kw(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:n=SP(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Kw(t,!1,i,n,s,r)}return t.child}function CP(e,t,n){var r=t.pendingProps;return lh(t,t.type,r.value),Ai(e,t,r.children,n),t.child}function Pu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Lh|=t.lanes,!(n&t.childLanes))if(e!==null){if(Am(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(Ae(153));if(t.child!==null){for(e=t.child,n=gu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function tM(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&zC(e)))}function Lfe(e,t,n){switch(t.tag){case 3:RC(t,t.stateNode.containerInfo),lh(t,mi,e.memoizedState.cache),Nm();break;case 27:case 5:eN(t);break;case 4:RC(t,t.stateNode.containerInfo);break;case 10:lh(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xN(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Sh(t),t.flags|=128,null;r=Am(e,t,n,!1);var i=t.child.childLanes;return r||n&i?uK(e,t,n):(Sh(t),e=Pu(e,t,n),e!==null?e.sibling:null)}Sh(t);break;case 19:if(t.flags&128)return EN(e,t,n);if(i=(e.flags&128)!==0,r=(n&t.childLanes)!==0,r||(Am(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return EN(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),wb(t,ds.current),r)break;return null;case 22:return t.lanes=0,cK(e,t,n,t.pendingProps);case 24:lh(t,mi,e.memoizedState.cache)}return Pu(e,t,n)}function dK(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yi=!0;else{if(!tM(e,n)&&!(t.flags&128))return yi=!1,Lfe(e,t,n);yi=!!(e.flags&131072)}else yi=!1,hn&&t.flags&1048576&&pY(t,yb,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Rf(t.elementType),t.type=e,typeof e=="function")O8(e)?(r=Lm(e,r),t.tag=1,t=bP(null,t,e,r,n)):(t.tag=0,t=CN(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===v8){t.tag=11,t=mP(null,t,e,r,n);break e}else if(i===w8){t.tag=14,t=pP(null,t,e,r,n);break e}else if(i===Xl){t.tag=10,t.type=e,t=CP(null,t,n);break e}}throw t=Zj(e)||e,Error(Ae(306,t,""))}}return t;case 0:return CN(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Lm(r,t.pendingProps),bP(e,t,r,i,n);case 3:e:{if(RC(t,t.stateNode.containerInfo),e===null)throw Error(Ae(387));r=t.pendingProps;var s=t.memoizedState;i=s.element,mN(e,t),P1(t,r,null,n);var a=t.memoizedState;if(r=a.cache,lh(t,mi,r),r!==s.cache&&hN(t,[mi],n,!0),L1(),r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=vP(e,t,r,n);break e}else if(r!==i){i=Ro(Error(Ae(424)),t),bb(i),t=vP(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(vr=Bo(e.firstChild),Ji=t,hn=!0,bh=null,Oo=!0,n=wY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Nm(),r===i){t=Pu(e,t,n);break e}Ai(e,t,r,n)}t=t.child}return t;case 26:return Xp(e,t),e===null?(n=YP(t.type,null,t.pendingProps,null))?t.memoizedState=n:hn||(t.stateNode=eX(t.type,t.pendingProps,yh.current,t)):t.memoizedState=YP(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return eN(t),e===null&&hn&&(r=t.stateNode=cX(t.type,t.pendingProps,yh.current),Ji=t,Oo=!0,i=vr,sf(t.type)?(ZN=i,vr=Bo(r.firstChild)):vr=i),Ai(e,t,t.pendingProps.children,n),Xp(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&hn&&((i=r=vr)&&(r=Nme(r,t.type,t.pendingProps,Oo),r!==null?(t.stateNode=r,Ji=t,vr=Bo(r.firstChild),Oo=!1,i=!0):i=!1),i||Rh(t)),eN(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,r=s.children,YN(i,s)?r=null:a!==null&&YN(i,a)&&(t.flags|=32),t.memoizedState!==null&&(i=U8(e,t,kfe,null,null,n),Eg._currentValue=i),Xp(e,t),Ai(e,t,r,n),t.child;case 6:return e===null&&hn&&((e=n=vr)&&(n=Ame(n,t.pendingProps,Oo),n!==null?(t.stateNode=n,Ji=t,vr=null,e=!0):e=!1),e||Rh(t)),null;case 13:return uK(e,t,n);case 4:return RC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Om(t,null,r,n):Ai(e,t,r,n),t.child;case 11:return mP(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Xp(e,t),Ai(e,t,r,n),t.child;case 8:return Ai(e,t,t.pendingProps.children,n),t.child;case 12:return Ai(e,t,t.pendingProps.children,n),t.child;case 10:return CP(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,Mm(t),i=ls(i),r=r(i),t.flags|=1,Ai(e,t,r,n),t.child;case 14:return pP(e,t,t.type,t.pendingProps,n);case 15:return lK(e,t,t.type,t.pendingProps,n);case 19:return EN(e,t,n);case 31:return Ofe(e,t,n);case 22:return cK(e,t,n,t.pendingProps);case 24:return Mm(t),r=ls(mi),e===null?(i=P8(),i===null&&(i=hr,s=L8(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:r,cache:i},F8(t),lh(t,mi,i)):(e.lanes&n&&(mN(e,t),P1(t,null,null,n),L1()),i=e.memoizedState,s=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),lh(t,mi,r)):(r=s.cache,lh(t,mi,r),r!==i.cache&&hN(t,[mi],n,!0))),Ai(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:hn&&nk(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Xp(e,t),Ai(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(Ae(156,t.tag))}function Uc(e){e.flags|=4}function $_(e,t,n,r,i){var s;if((s=(e.mode&32)!==0)&&(s=n===null?QP(t,r):QP(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),s){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(zK())e.flags|=8192;else throw xm=$C,I8}else e.flags&=-16777217}function kP(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!fX(t))if(zK())e.flags|=8192;else throw xm=$C,I8}function Xw(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?PW():536870912,e.lanes|=t,wg|=t)}function by(e,t){if(!hn)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function yr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)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 Pfe(e,t,n){var r=t.pendingProps;switch(D8(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yr(t),null;case 1:return yr(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xu(mi),xg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ap(t)?Uc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,P_())),yr(t),null;case 26:var i=t.type,s=t.memoizedState;return e===null?(Uc(t),s!==null?(yr(t),kP(t,s)):(yr(t),$_(t,i,null,r,n))):s?s!==e.memoizedState?(Uc(t),yr(t),kP(t,s)):(yr(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Uc(t),yr(t),$_(t,i,e,r,n)),null;case 27:if(OC(t),n=yh.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Uc(t);else{if(!r){if(t.stateNode===null)throw Error(Ae(166));return yr(t),t.subtreeFlags&=-33554433,null}e=lc.current,Ap(t)?QL(t):(e=cX(i,r,n),t.stateNode=e,Uc(t))}return yr(t),t.subtreeFlags&=-33554433,null;case 5:if(OC(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Uc(t);else{if(!r){if(t.stateNode===null)throw Error(Ae(166));return yr(t),t.subtreeFlags&=-33554433,null}if(s=lc.current,Ap(t))QL(t);else{var a=_b(yh.current);switch(s){case 1:s=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:s=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":s=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":s=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":s=a.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?s.multiple=!0:r.size&&(s.size=r.size);break;default:s=typeof r.is=="string"?a.createElement(i,{is:r.is}):a.createElement(i)}}s[os]=t,s[Ra]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=s;e:switch(hs(s,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&&Uc(t)}}return yr(t),t.subtreeFlags&=-33554433,$_(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Uc(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ae(166));if(e=yh.current,Ap(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ji,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[os]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||ZK(e.nodeValue,n)),e||Rh(t,!0)}else e=_b(e).createTextNode(r),e[os]=t,t.stateNode=e}return yr(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ap(t),n!==null){if(e===null){if(!r)throw Error(Ae(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ae(557));e[os]=t}else Nm(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yr(t),e=!1}else n=P_(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ga(t),t):(Ga(t),null);if(t.flags&128)throw Error(Ae(558))}return yr(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ap(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(Ae(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ae(317));i[os]=t}else Nm(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yr(t),i=!1}else i=P_(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Ga(t),t):(Ga(t),null)}return Ga(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Xw(t,t.updateQueue),yr(t),null);case 4:return xg(),e===null&&uM(t.stateNode.containerInfo),t.flags|=67108864,yr(t),null;case 10:return xu(t.type),yr(t),null;case 19:if(z8(t),r=t.memoizedState,r===null)return yr(t),null;if(i=(t.flags&128)!==0,s=r.rendering,s===null)if(i)by(r,!1);else{if(ti!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=VC(e),s!==null){for(t.flags|=128,by(r,!1),e=s.updateQueue,t.updateQueue=e,Xw(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fY(n,e),n=n.sibling;return wb(t,ds.current&1|2),hn&&tu(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Za()>JC&&(t.flags|=128,i=!0,by(r,!1),t.lanes=4194304)}else{if(!i)if(e=VC(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xw(t,e),by(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!s.alternate&&!hn)return yr(t),null}else 2*Za()-r.renderingStartTime>JC&&n!==536870912&&(t.flags|=128,i=!0,by(r,!1),t.lanes=4194304);r.isBackwards?(s.sibling=t.child,t.child=s):(e=r.last,e!==null?e.sibling=s:t.child=s,r.last=s)}if(r.tail!==null){e=r.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Za(),e.sibling=null,s=ds.current,s=i?s&1|2:s&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!n||hn?wb(t,s):(n=s,kr(fs,t),kr(ds,n),Ns===null&&(Ns=t)),hn&&tu(t,r.treeForkCount),e}return yr(t),null;case 22:case 23:return Ga(t),B8(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(yr(t),t.subtreeFlags&6&&(t.flags|=8192)):yr(t),n=t.updateQueue,n!==null&&Xw(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&us(gm),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xu(mi),yr(t),null;case 25:return null;case 30:return t.flags|=33554432,yr(t),null}throw Error(Ae(156,t.tag))}function Ife(e,t){switch(D8(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xu(mi),xg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return OC(t),null;case 31:if(t.memoizedState!==null){if(Ga(t),t.alternate===null)throw Error(Ae(340));Nm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ga(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ae(340));Nm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z8(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return xg(),null;case 10:return xu(t.type),null;case 22:case 23:return Ga(t),B8(),e!==null&&us(gm),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xu(mi),null;case 25:return null;default:return null}}function hK(e,t){switch(D8(t),t.tag){case 3:xu(mi),xg();break;case 26:case 27:case 5:OC(t);break;case 4:xg();break;case 31:t.memoizedState!==null&&Ga(t);break;case 13:Ga(t);break;case 19:z8(t);break;case 10:xu(t.type);break;case 22:case 23:Ga(t),B8(),e!==null&&us(gm);break;case 24:xu(mi)}}function Pv(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var s=n.create,a=n.inst;r=s(),a.destroy=r}n=n.next}while(n!==i)}}catch(o){sr(t,t.return,o)}}function Dh(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var s=i.next;r=s;do{if((r.tag&e)===e){var a=r.inst,o=a.destroy;if(o!==void 0){a.destroy=void 0,i=t;var c=n,u=o;try{u()}catch(d){sr(i,c,d)}}}r=r.next}while(r!==s)}}catch(d){sr(t,t.return,d)}}function fK(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{CY(t,n)}catch(r){sr(e,e.return,r)}}}function mK(e,t,n){n.props=Lm(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){sr(e,t,r)}}function ql(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,s=Ou(e.memoizedProps,i);(i.ref===null||i.ref.name!==s)&&(i.ref=rX(s)),r=i.ref;break;case 7:if(e.stateNode===null){var a=new ho(e);Ma(e.child,!1,Eme,a,void 0,void 0),e.stateNode=a}r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(o){sr(e,t,o)}}function ss(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){sr(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){sr(e,t,i)}else n.current=null}function YC(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)oX(e.stateNode,t[n])}function _P(e){for(var t=e.return;t!==null&&(rM(t)&&oX(e.stateNode,t.stateNode),!nM(t));)t=t.return}function B1(e){for(var t=e.return;t!==null&&(rM(t)&&jme(e.stateNode,t.stateNode),!nM(t));)t=t.return}function nM(e){return e.tag===5||e.tag===3||e.tag===27}function rM(e){return e&&e.tag===7&&e.stateNode!==null}function jN(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){sr(e,e.return,i)}}function U_(e,t,n){try{var r=e.stateNode;cme(r,e.type,n,t),r[Ra]=t}catch(i){sr(e,e.return,i)}}function pK(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function V_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pK(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function NN(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ql)),YC(e,r),Un=!0;else if(i!==4&&(i===27&&(YC(e,r),r=null,sf(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(NN(e,t,n,r),e=e.sibling;e!==null;)NN(e,t,n,r),e=e.sibling}function KC(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),YC(e,r),Un=!0;else if(i!==4&&(i===27&&(YC(e,r),r=null,sf(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(KC(e,t,n,r),e=e.sibling;e!==null;)KC(e,t,n,r),e=e.sibling}function gK(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);hs(t,r,n),t[os]=e,t[Ra]=n}catch(s){sr(e,e.return,s)}}var XC=!1,Ka=null;function TP(e){(e.tag===30||e.subtreeFlags&33554432)&&(XC=!0)}var Wl=null;function EP(){var e=Wl;return Wl=null,e}var ma=0;function gx(e,t,n,r,i){return ma=0,xK(e.child,t,n,r,i)}function xK(e,t,n,r,i){for(var s=!1;e!==null;){if(e.tag===5){var a=e.stateNode;if(r!==null){var o=KN(a);r.push(o),o.view&&(s=!0)}else s||KN(a).view&&(s=!0);XC=!0,tX(a,ma===0?t:t+"_"+ma,n),ma++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||xK(e.child,t,n,r,i)&&(s=!0));e=e.sibling}return s}function pc(e,t){for(;e!==null;)e.tag===5?nX(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||pc(e.child,t)),e=e.sibling}function US(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(US(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(Ae(544));var n=t.name;t=rd(t.default,t.share),t!=="none"&&(gx(e,n,t,null,!1)||pc(e.child,!1))}e=e.sibling}}function AN(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=Ou(r,n),s=rd(r.default,n.paired?r.share:r.enter);s!=="none"?gx(e,i,s,null,!1)?(US(e),n.paired||t||Sg(e,r.onEnter)):pc(e.child,!1):US(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)AN(e,t),e=e.sibling;else US(e)}function MN(e){if(Ka!==null&&Ka.size!==0){var t=Ka;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!=="auto"){var i=t.get(r);if(i!==void 0){var s=rd(n.default,n.share);if(s!=="none"&&(gx(e,r,s,null,!1)?(s=e.stateNode,i.paired=s,s.paired=i,Sg(e,n.onShare)):pc(e.child,!1)),t.delete(r),t.size===0)break}}}MN(e)}e=e.sibling}}}function RN(e){if(e.tag===30){var t=e.memoizedProps,n=Ou(t,e.stateNode),r=Ka!==null?Ka.get(n):void 0,i=rd(t.default,r!==void 0?t.share:t.exit);i!=="none"&&(gx(e,n,i,null,!1)?r!==void 0?(i=e.stateNode,r.paired=i,i.paired=r,Ka.delete(n),Sg(e,t.onShare)):Sg(e,t.onExit):pc(e.child,!1)),Ka!==null&&MN(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)RN(e),e=e.sibling;else Ka!==null&&MN(e)}function yK(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Ou(t,e.stateNode);t=rd(t.default,t.update),e.flags&=-5,t!=="none"&&gx(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&yK(e);e=e.sibling}}function ON(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,pc(e.child,!1))}ON(e)}e=e.sibling}}function VS(e){if(e.tag===30)e.stateNode.paired=null,pc(e.child,!1),ON(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)VS(e),e=e.sibling;else ON(e)}function bK(e){for(e=e.child;e!==null;)e.tag===30?pc(e.child,!1):e.subtreeFlags&33554432&&bK(e),e=e.sibling}function iM(e,t,n,r,i,s,a){for(var o=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(s!==null&&ma<s.length){var u=s[ma],d=KN(c);(u.view||d.view)&&(o=!0);var h;if(h=(e.flags&4)===0)if(d.clip)h=!0;else{h=u.rect;var f=d.rect;h=h.y!==f.y||h.x!==f.x||h.height!==f.height||h.width!==f.width}h&&(e.flags|=4),d.abs?d=!u.abs:(u=u.rect,d=d.rect,d=u.height!==d.height||u.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;e.flags&4&&tX(c,ma===0?n:n+"_"+ma,i),o&&e.flags&4||(Wl===null&&(Wl=[]),Wl.push(c,ma===0?r:r+"_"+ma,t.memoizedProps)),ma++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a?e.flags|=t.flags&32:iM(e,t.child,n,r,i,s,a)&&(o=!0));t=t.sibling}return o}function vK(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=Ou(n,r),s=rd(n.default,n.update),a;a=e.memoizedState,e.memoizedState=null,r=e;var o=e.child;ma=0,i=iM(r,o,i,i,s,a,!1),e.flags&4&&i&&Sg(e,n.onUpdate)}else e.subtreeFlags&33554432&&vK(e);e=e.sibling}}var Vi=!1,Qn=!1,Dl=!1,H_=!1,jP=typeof WeakSet=="function"?WeakSet:Set,Wi=null,Ll=!1,l1=!1,QC=!1,DN=!1;function Ffe(e,t,n){if(e=e.containerInfo,GN=jg,e=sY(e),A8(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var s=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,c=-1,u=-1,d=0,h=0,f=e,m=null;t:for(;;){for(var p;f!==r||s!==0&&f.nodeType!==3||(c=o+s),f!==a||i!==0&&f.nodeType!==3||(u=o+i),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)m=f,f=p;for(;;){if(f===e)break t;if(m===r&&++d===s&&(c=o),m===a&&++h===i&&(u=o),(p=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=p}r=c===-1||u===-1?null:{start:c,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(WN={focusedElem:e,selectionRange:r},jg=!1,n=(n&335544064)===n,Wi=t,t=n?9270:1024;Wi!==null;){if(e=Wi,n&&(r=e.deletions,r!==null))for(s=0;s<r.length;s++)n&&RN(r[s]);if(e.alternate===null&&e.flags&2)n&&TP(e),Qw(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&RN(r),Qw(n);continue}else if(r!==null&&r.memoizedState!==null){n&&TP(e),Qw(n);continue}}r=e.child,e.subtreeFlags&t&&r!==null?(r.return=e,Wi=r):(n&&yK(e),Qw(n))}}Ka=null}function Qw(e){for(;Wi!==null;){var t=Wi,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var s=t.stateNode;try{var a=Lm(t.type,i);n=s.getSnapshotBeforeUpdate(a,r),s.__reactInternalSnapshotBeforeUpdate=n}catch(o){sr(t,t.return,o)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)XN(r);else if(n===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":XN(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=Ou(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=rd(i.default,i.update),i!=="none"&&gx(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(Ae(163))}if(r=t.sibling,r!==null){r.return=t.return,Wi=r;break}Wi=t.return}}function wK(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Pl(e,n),r&4&&Pv(5,n);break;case 1:if(Pl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){sr(n,n.return,a)}else{var i=Lm(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){sr(n,n.return,a)}}r&64&&fK(n),r&512&&ql(n,n.return);break;case 3:if(Pl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{CY(e,t)}catch(a){sr(n,n.return,a)}}break;case 27:t===null&&r&4&&gK(n);case 26:case 5:Pl(e,n),t===null&&r&4&&jN(n),r&512&&ql(n,n.return);break;case 12:Pl(e,n);break;case 31:Pl(e,n),r&4&&_K(e,n);break;case 13:Pl(e,n),r&4&&TK(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xfe.bind(null,n),Mme(e,n))));break;case 22:if(r=n.memoizedState!==null||Vi,!r){var s=t!==null&&t.memoizedState!==null||Qn;t=Vi,i=Qn,Vi=r,(Qn=s)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),sl(e,n,r)):Pl(e,n),Vi=t,Qn=i}break;case 30:Pl(e,n),r&512&&ql(n,n.return);break;case 7:r&512&&ql(n,n.return);default:Pl(e,n)}}function LN(e,t){for(e=e.child;e!==null;)SK(e,t),e=e.sibling}function SK(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var i=e.stateNode,s=e.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null;i.style.display=a==null||typeof a=="boolean"?"":(""+a).trim()}}catch(c){sr(e,e.return,c)}PN(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Un=!0}catch(c){sr(e,e.return,c)}break;case 18:try{var o=e.stateNode;t?UP(o,!0):UP(e.stateNode,!1)}catch(c){sr(e,e.return,c)}break;case 22:case 23:e.memoizedState===null&&LN(e,t);break;default:LN(e,t)}}function PN(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,r=t;switch(n.tag){case 4:SK(n,r);break e;case 22:n.memoizedState===null&&PN(n,r);break e;default:PN(n,r)}}e=e.sibling}}function CK(e){var t=e.alternate;t!==null&&(e.alternate=null,CK(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&X5(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 Lr=null,la=!1;function rl(e,t,n){for(n=n.child;n!==null;)kK(e,t,n),n=n.sibling}function kK(e,t,n){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount(Nv,n)}catch{}switch(n.tag){case 26:Qn||ss(n,t),rl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Qn&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qn||ss(n,t),B1(n);var r=Lr,i=la;sf(n.type)&&(Lr=n.stateNode,la=!1),rl(e,t,n),uX(n.stateNode,n.type,n.memoizedProps),Lr=r,la=i;break;case 5:Qn||ss(n,t),B1(n);case 6:if(n.tag===6&&B1(n),r=Lr,i=la,Lr=null,rl(e,t,n),Lr=r,la=i,Lr!==null)if(la)try{(Lr.nodeType===9?Lr.body:Lr.nodeName==="HTML"?Lr.ownerDocument.body:Lr).removeChild(n.stateNode),Un=!0}catch(s){sr(n,t,s)}else try{Lr.removeChild(n.stateNode),Un=!0}catch(s){sr(n,t,s)}break;case 18:Lr!==null&&(la?(e=Lr,$P(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ng(e)):$P(Lr,n.stateNode));break;case 4:r=Lr,i=la,Lr=n.stateNode.containerInfo,la=!0,rl(e,t,n),Lr=r,la=i;break;case 0:case 11:case 14:case 15:Dh(2,n,t),Qn||Dh(4,n,t),rl(e,t,n);break;case 1:Qn||(ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&mK(n,t,r)),rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:Qn=(r=Qn)||n.memoizedState!==null,rl(e,t,n),Qn=r;break;case 30:ss(n,t),rl(e,t,n);break;case 7:Qn||ss(n,t),rl(e,t,n);break;default:rl(e,t,n)}}function _K(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ng(e)}catch(n){sr(t,t.return,n)}}}function TK(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ng(e)}catch(n){sr(t,t.return,n)}}function Bfe(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jP),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jP),t;default:throw Error(Ae(435,e.tag))}}function Zw(e,t){var n=Bfe(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=Qfe.bind(null,e,r);r.then(i,i)}})}function Fs(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var s=r[i],a=e,o=t,c=o;e:for(;c!==null;){switch(c.tag){case 27:if(sf(c.type)){Lr=c.stateNode,la=!1;break e}break;case 5:Lr=c.stateNode,la=!1;break e;case 3:case 4:Lr=c.stateNode.containerInfo,la=!0;break e}c=c.return}if(Lr===null)throw Error(Ae(160));kK(a,o,s),Lr=null,la=!1,a=s.alternate,a!==null&&(a.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)EK(t,e,n),t=t.sibling}var dl=null;function EK(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var s=0;s<r.length;s++){var a=r[s];a.ref.impl=a.nextImpl}Fs(t,e,n),Bs(e),i&4&&(Dh(3,e,e.return),Pv(3,e),Dh(5,e,e.return));break;case 1:Fs(t,e,n),Bs(e),i&512&&(Qn||r===null||ss(r,r.return)),i&64&&Vi&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(s=dl,Fs(t,e,n),Bs(e),i&512&&(Qn||r===null||ss(r,r.return)),i&4)if(i=r!==null?r.memoizedState:null,n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null)if(Vi)e.stateNode=eX(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,i=s.ownerDocument||s;t:switch(t){case"title":r=i.getElementsByTagName("title")[0],(!r||r[Rv]||r[os]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector("head > title"))),hs(r,t,n),r[os]=e,Qi(r),t=r;break e;case"link":if(s=XP("link","href",i).get(t+(n.href||""))){for(a=0;a<s.length;a++)if(r=s[a],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(a,1);break t}}r=i.createElement(t),hs(r,t,n),i.head.appendChild(r);break;case"meta":if(s=XP("meta","content",i).get(t+(n.content||""))){for(a=0;a<s.length;a++)if(r=s[a],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(a,1);break t}}r=i.createElement(t),hs(r,t,n),i.head.appendChild(r);break;default:throw Error(Ae(468,t))}r[os]=e,Qi(r),t=r}e.stateNode=t}else Vi||JN(s,e.type,e.stateNode);else e.stateNode=KP(s,n,e.memoizedProps);else i!==n?(i===null?(t=r.stateNode,t===null||Qn||t.parentNode.removeChild(t)):i.count--,n===null?Vi||JN(s,e.type,e.stateNode):KP(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&U_(e,e.memoizedProps,r.memoizedProps);break;case 27:Fs(t,e,n),Bs(e),i&512&&(Qn||r===null||ss(r,r.return)),r!==null&&i&4&&U_(e,e.memoizedProps,r.memoizedProps);break;case 5:if(s=Dl,Dl=!1,Fs(t,e,n),Dl=s,Bs(e),i&512&&(Qn||r===null||ss(r,r.return)),e.flags&32){t=e.stateNode;try{bg(t,""),Un=!0}catch(d){sr(e,e.return,d)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,U_(e,t,r!==null?r.memoizedProps:t)),i&1024&&(H_=!0);break;case 6:if(Fs(t,e,n),Bs(e),i&4){if(e.stateNode===null)throw Error(Ae(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Un=!0}catch(d){sr(e,e.return,d)}}break;case 3:if(Un=!1,WS=null,s=dl,dl=Tb(t.containerInfo),Fs(t,e,n),dl=s,Bs(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Ng(t.containerInfo)}catch(d){sr(e,e.return,d)}H_&&(H_=!1,jK(e)),Un=!1;break;case 4:i=Dl,Dl=Vi,r=OL(),s=dl,dl=Tb(e.stateNode.containerInfo),Fs(t,e,n),Bs(e),dl=s,Un&&l1&&(QC=!0),Un=r,Dl=i;break;case 12:Fs(t,e,n),Bs(e);break;case 31:Fs(t,e,n),Bs(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Zw(e,t)));break;case 13:Fs(t,e,n),Bs(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ck=Za()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Zw(e,t)));break;case 22:s=e.memoizedState!==null,a=r!==null&&r.memoizedState!==null;var o=Vi,c=Qn,u=Dl;Vi=o||s,Dl=u||s,Qn=c||a,Fs(t,e,n),Qn=c,Dl=u,Vi=o,Bs(e),i&8192&&(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,!s||r===null||a||Vi||Qn||(t=a||Qn,n=Vi,r=Qn,Vi=s||Vi,Qn=t,Id(e,2),Vi=n,Qn=r),!s&&Dl||LN(e,s)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Zw(e,n))));break;case 19:Fs(t,e,n),Bs(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Zw(e,t)));break;case 30:i&512&&(Qn||r===null||ss(r,r.return)),i=OL(),s=l1,a=(n&335544064)===n,o=e.memoizedProps,l1=a&&rd(o.default,o.update)!=="none",Fs(t,e,n),Bs(e),a&&r!==null&&Un&&(e.flags|=4),l1=s,Un=i;break;case 21:break;case 7:i&512&&(Qn||r===null||ss(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Fs(t,e,n),Bs(e)}}function Bs(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(pK(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(rM(i)){var s=i.stateNode;r===null?r=[s]:r.push(s)}if(nM(i))break;i=i.return}var a=r;if(n==null)throw Error(Ae(160));switch(n.tag){case 27:var o=n.stateNode,c=V_(e);KC(e,c,o,a);break;case 5:var u=n.stateNode;n.flags&32&&(bg(u,""),n.flags&=-33);var d=V_(e);KC(e,d,u,a);break;case 3:case 4:var h=n.stateNode.containerInfo,f=V_(e);NN(e,f,h,a);break;default:throw Error(Ae(161))}}catch(m){sr(e,e.return,m)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jK(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jK(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,jg=!0,t.reset(),jg=!1),e=e.sibling}}function Mp(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)NK(t,e),t=t.sibling;else vK(t)}function NK(e,t){var n=e.alternate;if(n===null)AN(e,!1);else switch(e.tag){case 3:if(DN=Ll=!1,EP(),Mp(t,e),!Ll&&!QC){if(e=Wl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];nX(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+i+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),DN=!0}Wl=null;break;case 5:Mp(t,e);break;case 4:r=Ll,Ll=!1,Mp(t,e),Ll&&(QC=!0),Ll=r;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?AN(e,!1):Mp(t,e));break;case 30:r=Ll,i=EP(),Ll=!1,Mp(t,e),Ll&&(e.flags|=4);var s=e.memoizedProps,a=e.stateNode;t=Ou(s,a),a=Ou(n.memoizedProps,a);var o=rd(s.default,s.update);o==="none"?t=!1:(s=n.memoizedState,n.memoizedState=null,n=e.child,ma=0,t=iM(e,n,t,a,o,s,!0),ma!==(s===null?0:s.length)&&(e.flags|=32)),e.flags&4&&t?(Sg(e,e.memoizedProps.onUpdate),Wl=i):i!==null&&(i.push.apply(i,Wl),Wl=i),Ll=e.flags&32?!0:r;break;default:Mp(t,e)}}function Pl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wK(e,t.alternate,t),t=t.sibling}function Id(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Dh(4,n,n.return),Id(n,r);break;case 1:ss(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&mK(n,n.return,i),Id(n,r);break;case 27:r&2&&uX(n.stateNode,n.type,n.memoizedProps);case 5:ss(n,n.return),n.tag!==5&&n.tag!==27||B1(n),Id(n,r);break;case 6:B1(n);break;case 26:ss(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Qn||i.parentNode.removeChild(i),Id(n,r);break;case 22:n.memoizedState===null&&Id(n,r);break;case 30:ss(n,n.return),Id(n,r);break;case 7:ss(n,n.return);default:Id(n,r)}e=e.sibling}}function sl(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,s=t,a=s.flags,o=(n&1)!==0;switch(s.tag){case 0:case 11:case 15:sl(i,s,n),Pv(4,s);break;case 1:if(sl(i,s,n),r=s,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(d){sr(r,r.return,d)}if(r=s,i=r.updateQueue,i!==null){var c=r.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)SY(u[i],c)}catch(d){sr(r,r.return,d)}}o&&a&64&&fK(s),ql(s,s.return);break;case 27:n&2&&gK(s);case 5:s.tag!==5&&s.tag!==27||_P(s),sl(i,s,n),o&&r===null&&a&4&&jN(s),ql(s,s.return);break;case 6:_P(s);break;case 26:c=s.stateNode,s.memoizedState!==null||c===null||Vi||JN(Tb(c.ownerDocument),s.type,c),sl(i,s,n),o&&r===null&&a&4&&jN(s),ql(s,s.return);break;case 12:sl(i,s,n);break;case 31:sl(i,s,n),o&&a&4&&_K(i,s);break;case 13:sl(i,s,n),o&&a&4&&TK(i,s);break;case 22:s.memoizedState===null&&sl(i,s,n),ql(s,s.return);break;case 30:sl(i,s,n),ql(s,s.return);break;case 7:ql(s,s.return);default:sl(i,s,n)}t=t.sibling}}function sM(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Dv(n))}function aM(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Dv(e))}function xo(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)AK(e,t,n,r),t=t.sibling;else i&&bK(t)}function AK(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&VS(t);var s=t.flags;switch(t.tag){case 0:case 11:case 15:xo(e,t,n,r),s&2048&&Pv(9,t);break;case 1:xo(e,t,n,r);break;case 3:xo(e,t,n,r),i&&DN&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),s&2048&&(s=null,t.alternate!==null&&(s=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==s&&(t.refCount++,s!=null&&Dv(s)));break;case 12:if(s&2048){xo(e,t,n,r),s=t.stateNode;try{var a=t.memoizedProps,o=a.id,c=a.onPostCommit;typeof c=="function"&&c(o,t.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(u){sr(t,t.return,u)}}else xo(e,t,n,r);break;case 31:xo(e,t,n,r);break;case 13:xo(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState!==null?(i&&o!==null&&o.memoizedState===null&&VS(o),a._visibility&2?xo(e,t,n,r):z1(e,t)):(i&&o!==null&&o.memoizedState!==null&&VS(t),a._visibility&2?xo(e,t,n,r):(a._visibility|=2,Qp(e,t,n,r,(t.subtreeFlags&10256)!==0||!1))),s&2048&&sM(o,t);break;case 24:xo(e,t,n,r),s&2048&&aM(t.alternate,t);break;case 30:i&&(s=t.alternate,s!==null&&(pc(s.child,!0),pc(t.child,!0))),xo(e,t,n,r);break;default:xo(e,t,n,r)}}function Qp(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,a=t,o=n,c=r,u=a.flags;switch(a.tag){case 0:case 11:case 15:Qp(s,a,o,c,i),Pv(8,a);break;case 23:break;case 22:var d=a.stateNode;a.memoizedState!==null?d._visibility&2?Qp(s,a,o,c,i):z1(s,a):(d._visibility|=2,Qp(s,a,o,c,i)),i&&u&2048&&sM(a.alternate,a);break;case 24:Qp(s,a,o,c,i),i&&u&2048&&aM(a.alternate,a);break;default:Qp(s,a,o,c,i)}t=t.sibling}}function z1(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:z1(n,r),i&2048&&sM(r.alternate,r);break;case 24:z1(n,r),i&2048&&aM(r.alternate,r);break;default:z1(n,r)}t=t.sibling}}var Of=8192;function Cf(e,t,n){if(e.subtreeFlags&Of)for(e=e.child;e!==null;)MK(e,t,n),e=e.sibling}function MK(e,t,n){switch(e.tag){case 26:Cf(e,t,n),e.flags&Of&&(e.memoizedState!==null?qme(n,dl,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&ZP(n,e)));break;case 5:Cf(e,t,n),e.flags&Of&&(e=e.stateNode,(t&335544128)===t&&ZP(n,e));break;case 3:case 4:var r=dl;dl=Tb(e.stateNode.containerInfo),Cf(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Of,Of=16777216,Cf(e,t,n),Of=r):Cf(e,t,n));break;case 30:if(e.flags&Of&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var i=e.stateNode;i.paired=null,Ka===null&&(Ka=new Map),Ka.set(r,i)}Cf(e,t,n);break;default:Cf(e,t,n)}}function RK(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function vy(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Wi=r,DK(r,e)}RK(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)OK(e),e=e.sibling}function OK(e){switch(e.tag){case 0:case 11:case 15:vy(e),e.flags&2048&&Dh(9,e,e.return);break;case 3:vy(e);break;case 12:vy(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,HS(e)):vy(e);break;default:vy(e)}}function HS(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Wi=r,DK(r,e)}RK(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dh(8,t,t.return),HS(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,HS(t));break;default:HS(t)}e=e.sibling}}function DK(e,t){for(;Wi!==null;){var n=Wi;switch(n.tag){case 0:case 11:case 15:Dh(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Dv(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Wi=r;else e:for(n=e;Wi!==null;){r=Wi;var i=r.sibling,s=r.return;if(CK(r),r===n){Wi=null;break e}if(i!==null){i.return=s,Wi=i;break e}Wi=s}}}var zfe={getCacheForType:function(e){var t=ls(mi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ls(mi).controller.signal}},$fe=typeof WeakMap=="function"?WeakMap:Map,Hn=0,hr=null,wn=null,Cn=0,tr=0,Ua=null,ch=!1,xx=!1,oM=!1,Iu=0,ti=0,Lh=0,ym=0,ZC=0,Xa=0,wg=0,$1=null,da=null,IN=!1,ck=0,LK=0,JC=1/0,e4=null,kh=null,Gr=0,wl=null,Pm=null,cc=0,FN=0,BN=null,PK=null,F0=null,B0=null,z0=null,U1=0,qS=null;function to(){return Hn&2&&Cn!==0?Cn&-Cn:Ht.T!==null?cM():zW()}function IK(){if(Xa===0)if(!(Cn&536870912)||hn){var e=$w;$w<<=1,!($w&3932160)&&($w=262144),Xa=e}else Xa=536870912;return e=fs.current,e!==null&&(e.flags|=32),Xa}function Sg(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=rX(Ou(e.memoizedProps,n))),B0===null&&(B0=[]),B0.push(t.bind(null,r))}}function _a(e,t,n){(e===hr&&(tr===2||tr===9)||e.cancelPendingCommit!==null)&&(Cg(e,0),uh(e,Cn,Xa,!1)),Mv(e,n),(!(Hn&2)||e!==hr)&&(e===hr&&(!(Hn&2)&&(ym|=n),ti===4&&uh(e,Cn,Xa,!1)),_c(e))}function FK(e,t,n){if(Hn&6)throw Error(Ae(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Av(e,t),i=r?Hfe(e,t):q_(e,t,!0),s=r;do{if(i===0){xx&&!r&&uh(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Ufe(n)){i=q_(e,t,!1),s=!1;continue}if(i===2){if(s=t,e.errorRecoveryDisabledLanes&s)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var o=e;i=$1;var c=o.current.memoizedState.isDehydrated;if(c&&(Cg(o,a).flags|=256),a=q_(o,a,!1),a!==2&&a!==6){if(oM&&!c){o.errorRecoveryDisabledLanes|=s,ym|=s,i=4;break e}s=da,da=i,s!==null&&(da===null?da=s:da.push.apply(da,s))}i=a}if(s=!1,i!==2)continue}}if(i===1){Cg(e,0),uh(e,t,0,!0);break}e:{switch(r=e,s=i,s){case 0:case 1:throw Error(Ae(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:uh(r,t,Xa,!ch);break e;case 2:da=null;break;case 3:case 5:break;default:throw Error(Ae(329))}if((t&62914560)===t&&(i=ck+300-Za(),10<i)){if(uh(r,t,Xa,!ch),K5(r,0,!0)!==0)break e;cc=t,r.timeoutHandle=dM(NP.bind(null,r,n,da,e4,IN,t,Xa,ym,wg,ch,s,"Throttled",-0,0),i);break e}NP(r,n,da,e4,IN,t,Xa,ym,wg,ch,s,null,-0,0)}}break}while(!0);_c(e)}function NP(e,t,n,r,i,s,a,o,c,u,d,h,f,m){e.timeoutHandle=-1;var p=t.subtreeFlags,x=(s&335544064)===s;if(h=null,(x||p&8192||(p&16785408)===16785408)&&(h={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ql},Ka=null,MK(t,s,h),x&&(p=h,x=e.containerInfo,x=(x.nodeType===9?x:x.ownerDocument).__reactViewTransition,x!=null&&(p.count++,p.waitingForViewTransition=!0,p=Eb.bind(p),x.finished.then(p,p))),p=(s&62914560)===s?ck-Za():(s&4194048)===s?LK-Za():0,p=Gme(h,p),p!==null)){cc=s,e.cancelPendingCommit=p(MP.bind(null,e,t,s,n,r,i,a,o,c,u,d,h,null,f,m)),uh(e,s,a,!u);return}MP(e,t,s,n,r,i,a,o,c,u,d,h)}function Ufe(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!so(s(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function uh(e,t,n,r){t=LW(e,t),t&=~ZC,t&=~ym,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var s=31-eo(i),a=1<<s;r[s]=-1,i&=~a}n!==0&&IW(e,n,t)}function uk(){return Hn&6?!0:(Iv(0),!1)}function lM(){if(wn!==null){if(tr===0)var e=wn.return;else e=wn,hu=dp=null,q8(e),L0=null,vb=0,e=wn;for(;e!==null;)hK(e.alternate,e),e=e.return;wn=null}}function Cg(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,hme(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cc=0,lM(),hr=e,wn=n=gu(e.current,null),Cn=t,tr=0,Ua=null,ch=!1,xx=Av(e,t),oM=!1,wg=Xa=ZC=ym=Lh=ti=0,da=$1=null,IN=!1,Iu=LW(e,t),ek(),n}function BK(e,t){rn=null,Ht.H=GC,t===px||t===rk?(t=nP(),tr=3):t===I8?(t=nP(),tr=4):tr=t===J8?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ua=t,wn===null&&(ti=1,WC(e,Ro(t,e.current)))}function zK(){var e=fs.current;return e===null?!0:(Cn&4194048)===Cn?Ns===null:(Cn&62914560)===Cn||Cn&536870912?e===Ns:!1}function $K(){var e=Ht.H;return Ht.H=GC,e===null?GC:e}function UK(){var e=Ht.A;return Ht.A=zfe,e}function t4(){ti=4,ch||(Cn&4194048)!==Cn&&fs.current!==null||(xx=!0),!(Lh&134217727)&&!(ym&134217727)||hr===null||uh(hr,Cn,Xa,!1)}function q_(e,t,n){var r=Hn;Hn|=2;var i=$K(),s=UK();(hr!==e||Cn!==t)&&(e4=null,Cg(e,t)),t=!1;var a=ti;e:do try{if(tr!==0&&wn!==null){var o=wn,c=Ua;switch(tr){case 8:lM(),a=6;break e;case 3:case 2:case 9:case 6:fs.current===null&&(t=!0);var u=tr;if(tr=0,Ua=null,x0(e,o,c,u),n&&xx){a=0;break e}break;default:u=tr,tr=0,Ua=null,x0(e,o,c,u)}}Vfe(),a=ti;break}catch(d){BK(e,d)}while(!0);return t&&e.shellSuspendCounter++,hu=dp=null,Hn=r,Ht.H=i,Ht.A=s,wn===null&&(hr=null,Cn=0,ek()),a}function Vfe(){for(;wn!==null;)VK(wn)}function Hfe(e,t){var n=Hn;Hn|=2;var r=$K(),i=UK();hr!==e||Cn!==t?(e4=null,JC=Za()+500,Cg(e,t)):xx=Av(e,t);e:do try{if(tr!==0&&wn!==null){t=wn;var s=Ua;t:switch(tr){case 1:tr=0,Ua=null,x0(e,t,s,1);break;case 2:case 9:if(tP(s)){tr=0,Ua=null,AP(t);break}t=function(){tr!==2&&tr!==9||hr!==e||(tr=7),_c(e)},s.then(t,t);break e;case 3:tr=7;break e;case 4:tr=5;break e;case 7:tP(s)?(tr=0,Ua=null,AP(t)):(tr=0,Ua=null,x0(e,t,s,7));break;case 5:var a=null;switch(wn.tag){case 26:a=wn.memoizedState;case 5:case 27:var o=wn;if(a?fX(a):o.stateNode.complete){tr=0,Ua=null;var c=o.sibling;if(c!==null)wn=c;else{var u=o.return;u!==null?(wn=u,dk(u)):wn=null}break t}}tr=0,Ua=null,x0(e,t,s,5);break;case 6:tr=0,Ua=null,x0(e,t,s,6);break;case 8:lM(),ti=6;break e;default:throw Error(Ae(462))}}qfe();break}catch(d){BK(e,d)}while(!0);return hu=dp=null,Ht.H=r,Ht.A=i,Hn=n,wn!==null?0:(hr=null,Cn=0,ek(),ti)}function qfe(){for(;wn!==null&&!lhe();)VK(wn)}function VK(e){var t=dK(e.alternate,e,Iu);e.memoizedProps=e.pendingProps,t===null?dk(e):wn=t}function AP(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yP(n,t,t.pendingProps,t.type,void 0,Cn);break;case 11:t=yP(n,t,t.pendingProps,t.type.render,t.ref,Cn);break;case 5:q8(t);var r=t;r===Ji&&(hn?(BC(r),r.tag===5&&r.stateNode!=null&&(vr=r.stateNode)):(BC(r),hn=!0));default:hK(n,t),t=wn=fY(t,Iu),t=dK(n,t,Iu)}e.memoizedProps=e.pendingProps,t===null?dk(e):wn=t}function x0(e,t,n,r){hu=dp=null,q8(t),L0=null,vb=0;var i=t.return;try{if(Rfe(e,i,t,n,Cn)){ti=1,WC(e,Ro(n,e.current)),wn=null;return}}catch(s){if(i!==null)throw wn=i,s;ti=1,WC(e,Ro(n,e.current)),wn=null;return}t.flags&32768?(hn||r===1?e=!0:xx||Cn&536870912?e=!1:(ch=e=!0,(r===2||r===9||r===3||r===6)&&(r=fs.current,r!==null&&r.tag===13&&(r.flags|=16384))),HK(t,e)):dk(t)}function dk(e){var t=e;do{if(t.flags&32768){HK(t,ch);return}e=t.return;var n=Pfe(t.alternate,t,Iu);if(n!==null){wn=n;return}if(t=t.sibling,t!==null){wn=t;return}wn=t=e}while(t!==null);ti===0&&(ti=5)}function HK(e,t){do{var n=Ife(e.alternate,e);if(n!==null){n.flags&=32767,wn=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){wn=e;return}wn=e=n}while(e!==null);ti=6,wn=null}function MP(e,t,n,r,i,s,a,o,c,u,d,h){e.cancelPendingCommit=null;do hk();while(Gr!==0);if(Hn&6)throw Error(Ae(327));if(t!==null){if(t===e.current)throw Error(Ae(177));e===hr&&(wn=hr=null,Cn=0),Pm=t,wl=e,cc=n,BN=i,PK=r,Gfe(e,t,n,a,o,c,h)}}function Gfe(e,t,n,r,i,s,a){var o=t.lanes|t.childLanes;if(FN=o,o|=M8,yhe(e,n,o,r,i,s),B0=null,(n&335544064)===n?(z0=vfe(e),r=10262):(z0=null,r=10256),t.subtreeFlags&r||t.flags&r?(e.callbackNode=null,e.callbackPriority=0,Zfe(DC,function(){return VN(),null})):(e.callbackNode=null,e.callbackPriority=0),XC=!1,r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=Ht.T,Ht.T=null,i=Wn.p,Wn.p=2,s=Hn,Hn|=4;try{Ffe(e,t,n)}finally{Hn=s,Wn.p=i,Ht.T=r}}Gr=1,XC?F0=yme(a,e.containerInfo,z0,zN,$N,Yfe,UN,VN,Wfe):(zN(),$N(),UN())}function Wfe(e){if(Gr!==0){var t=wl.onRecoverableError;t(e,{componentStack:null})}}function Yfe(){Gr===3&&(Gr=0,NK(Pm,wl),Gr=4)}function zN(){if(Gr===1){Gr=0;var e=wl,t=Pm,n=cc,r=(t.flags&13878)!==0;if(t.subtreeFlags&13878||r){r=Ht.T,Ht.T=null;var i=Wn.p;Wn.p=2;var s=Hn;Hn|=4;try{l1=QC=!1,EK(t,e,n),n=WN;var a=sY(e.containerInfo),o=n.focusedElem,c=n.selectionRange;if(a!==o&&o&&o.ownerDocument&&iY(o.ownerDocument.documentElement,o)){if(c!==null&&A8(o)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(d,o.value.length);else{var h=o.ownerDocument||document,f=h&&h.defaultView||window;if(f.getSelection){var m=f.getSelection(),p=o.textContent.length,x=Math.min(c.start,p),v=c.end===void 0?x:Math.min(c.end,p);!m.extend&&x>v&&(a=v,v=x,x=a);var g=WL(o,x),y=WL(o,v);if(g&&y&&(m.rangeCount!==1||m.anchorNode!==g.node||m.anchorOffset!==g.offset||m.focusNode!==y.node||m.focusOffset!==y.offset)){var w=h.createRange();w.setStart(g.node,g.offset),m.removeAllRanges(),x>v?(m.addRange(w),m.extend(y.node,y.offset)):(w.setEnd(y.node,y.offset),m.addRange(w))}}}}for(h=[],m=o;m=m.parentNode;)m.nodeType===1&&h.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<h.length;o++){var S=h[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}jg=!!GN,WN=GN=null}finally{Hn=s,Wn.p=i,Ht.T=r}}e.current=t,Gr=2}}function $N(){if(Gr===2){Gr=0;var e=wl,t=Pm,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=Ht.T,Ht.T=null;var r=Wn.p;Wn.p=2;var i=Hn;Hn|=4;try{wK(e,t.alternate,t)}finally{Hn=i,Wn.p=r,Ht.T=n}}Gr=3}}function UN(){if(Gr===4||Gr===3){Gr=0;var e=F0;F0=null,che();var t=wl,n=Pm,r=cc,i=PK,s=(r&335544064)===r?10262:10256;if(n.subtreeFlags&s||n.flags&s?Gr=5:(Gr=0,Pm=wl=null,qK(t,t.pendingLanes)),s=t.pendingLanes,s===0&&(kh=null),k8(r),n=n.stateNode,Ja&&typeof Ja.onCommitFiberRoot=="function")try{Ja.onCommitFiberRoot(Nv,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=Ht.T,s=Wn.p,Wn.p=2,Ht.T=null;try{for(var a=t.onRecoverableError,o=0;o<i.length;o++){var c=i[o];a(c.value,{componentStack:c.stack})}}finally{Ht.T=n,Wn.p=s}}if(i=B0,a=z0,z0=null,i!==null&&(B0=null,a===null&&(a=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(a),n!==void 0&&e.finished.finally(n);cc&3&&hk(),_c(t),s=t.pendingLanes,r&261930&&s&42?t===qS?U1++:(U1=0,qS=t):(U1=0,qS=null),Iv(0)}}function qK(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Dv(t)))}function hk(){return F0!==null&&(F0.skipTransition(),F0=null),zN(),$N(),UN(),VN()}function VN(){if(Gr!==5)return!1;var e=wl,t=FN;FN=0;var n=k8(cc),r=Ht.T,i=Wn.p;try{Wn.p=32>n?32:n,Ht.T=null,n=BN,BN=null;var s=wl,a=cc;if(Gr=0,Pm=wl=null,cc=0,Hn&6)throw Error(Ae(331));var o=Hn;if(Hn|=4,OK(s.current),AK(s,s.current,a,n),Hn=o,Iv(0,!1),Ja&&typeof Ja.onPostCommitFiberRoot=="function")try{Ja.onPostCommitFiberRoot(Nv,s)}catch{}return!0}finally{Wn.p=i,Ht.T=r,qK(e,t)}}function RP(e,t,n){t=Ro(n,t),t=SN(e.stateNode,t,2),e=wh(e,t,2),e!==null&&(Mv(e,2),_c(e))}function sr(e,t,n){if(e.tag===3)RP(e,e,n);else for(;t!==null;){if(t.tag===3){RP(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(kh===null||!kh.has(r))){e=Ro(n,e),n=aK(2),r=wh(t,n,2),r!==null&&(oK(n,r,t,e),Mv(r,2),_c(r));break}}t=t.return}}function G_(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $fe;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(oM=!0,i.add(n),e=Kfe.bind(null,e,t,n),t.then(e,e))}function Kfe(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hr===e&&(Cn&n)===n&&(ti===4||ti===3&&(Cn&62914560)===Cn&&300>Za()-ck?Hn&2?ZC|=n:Cg(e,0):ZC|=n,wg===Cn&&(wg=0)),_c(e)}function GK(e,t){t===0&&(t=PW()),e=up(e,t),e!==null&&(Mv(e,t),_c(e))}function Xfe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),GK(e,n)}function Qfe(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(Ae(314))}r!==null&&r.delete(t),GK(e,n)}function Zfe(e,t){return S8(e,t)}var kg=null,Zp=null,HN=!1,n4=!1,W_=!1,dh=0;function _c(e){e!==Zp&&e.next===null&&(Zp===null?kg=Zp=e:Zp=Zp.next=e),n4=!0,HN||(HN=!0,eme())}function Iv(e,t){if(!W_&&n4){W_=!0;do for(var n=!1,r=kg;r!==null;){if(e!==0){var i=r.pendingLanes;if(i===0)var s=0;else{var a=r.suspendedLanes,o=r.pingedLanes;s=(1<<31-eo(42|e)+1)-1,s&=i&~(a&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,OP(r,s))}else s=Cn,s=K5(r,r===hr?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(s&3)||Av(r,s)||(n=!0,OP(r,s));r=r.next}while(n);W_=!1}}function Jfe(){WK()}function WK(){n4=HN=!1;var e=0;dh!==0&&dme()&&(e=dh);for(var t=Za(),n=null,r=kg;r!==null;){var i=r.next,s=YK(r,t);s===0?(r.next=null,n===null?kg=i:n.next=i,i===null&&(Zp=n)):(n=r,(e!==0||s&3)&&(n4=!0)),r=i}Gr!==0&&Gr!==5||Iv(e),dh!==0&&(dh=0)}function YK(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var a=31-eo(s),o=1<<a,c=i[a];c===-1?(!(o&n)||o&r)&&(i[a]=xhe(o,t)):c<=t&&(e.expiredLanes|=o),s&=~o}if(t=hr,n=Cn,n=K5(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(tr===2||tr===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&k_(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Av(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&k_(r),k8(n)){case 2:case 8:n=OW;break;case 32:n=DC;break;case 268435456:n=DW;break;default:n=DC}return r=KK.bind(null,e),n=S8(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&k_(r),e.callbackPriority=2,e.callbackNode=null,2}function KK(e,t){if(Gr!==0&&Gr!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hk()&&e.callbackNode!==n)return null;var r=Cn;return r=K5(e,e===hr?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(FK(e,r,t),YK(e,Za()),e.callbackNode!=null&&e.callbackNode===n?KK.bind(null,e):null)}function OP(e,t){if(hk())return null;FK(e,t,!0)}function eme(){fme(function(){Hn&6?S8(RW,Jfe):WK()})}function cM(){if(dh===0){var e=Rm;e===0&&(e=zw,zw<<=1,!(zw&261888)&&(zw=256)),dh=e}return dh}function DP(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:OS(e)}function tme(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var s=DP((i[Ra]||null).action),a=r.submitter;a&&(t=(t=a[Ra]||null)?DP(t.formAction):a.getAttribute("formAction"),t!==null&&(s=t,a=null));var o=new Q5("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dh!==0){var c=new FormData(i,a);vN(n,{pending:!0,data:c,method:i.method,action:s},null,c)}}else typeof s=="function"&&(o.preventDefault(),c=new FormData(i,a),vN(n,{pending:!0,data:c,method:i.method,action:s},s,c))},currentTarget:i}]})}}for(var Y_=0;Y_<cN.length;Y_++){var K_=cN[Y_],nme=K_.toLowerCase(),rme=K_[0].toUpperCase()+K_.slice(1);Nl(nme,"on"+rme)}Nl(oY,"onAnimationEnd");Nl(lY,"onAnimationIteration");Nl(cY,"onAnimationStart");Nl("dblclick","onDoubleClick");Nl("focusin","onFocus");Nl("focusout","onBlur");Nl(hfe,"onTransitionRun");Nl(ffe,"onTransitionStart");Nl(mfe,"onTransitionCancel");Nl(uY,"onTransitionEnd");yg("onMouseEnter",["mouseout","mouseover"]);yg("onMouseLeave",["mouseout","mouseover"]);yg("onPointerEnter",["pointerout","pointerover"]);yg("onPointerLeave",["pointerout","pointerover"]);lp("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));lp("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));lp("onBeforeInput",["compositionend","keypress","textInput","paste"]);lp("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));lp("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));lp("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));
vendor: 3,334 bytes, line 49
49var Cb="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(" "),ime=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cb));function XK(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==s&&i.isPropagationStopped())break e;s=o,i.currentTarget=u;try{s(i)}catch(d){PC(d)}i.currentTarget=null,s=c}else for(a=0;a<r.length;a++){if(o=r[a],c=o.instance,u=o.currentTarget,o=o.listener,c!==s&&i.isPropagationStopped())break e;s=o,i.currentTarget=u;try{s(i)}catch(d){PC(d)}i.currentTarget=null,s=c}}}}function vn(e,t){var n=t[NL];n===void 0&&(n=t[NL]=new Set);var r=e+"__bubble";n.has(r)||(QK(t,e,2,!1),n.add(r))}function X_(e,t,n){var r=0;t&&(r|=4),QK(n,e,r,t)}var Jw="_reactListening"+Math.random().toString(36).slice(2);function uM(e){if(!e[Jw]){e[Jw]=!0,UW.forEach(function(n){n!=="selectionchange"&&(ime.has(n)||X_(n,!1,e),X_(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jw]||(t[Jw]=!0,X_("selectionchange",!1,t))}}function QK(e,t,n,r){switch(vX(t)){case 2:var i=Xme;break;case 8:i=Qme;break;default:i=xM}n=i.bind(null,t,n,e),i=void 0,!sN||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Q_(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===i)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;o!==null;){if(a=Wf(o),a===null)return;if(c=a.tag,c===5||c===6||c===26||c===27){r=s=a;continue e}o=o.parentNode}}r=r.return}XW(function(){var u=s,d=T8(n),h=[];e:{var f=dY.get(e);if(f!==void 0){var m=Q5,p=e;switch(e){case"keypress":if(LS(n)===0)break e;case"keydown":case"keyup":m=Uhe;break;case"focusin":p="focus",m=A_;break;case"focusout":p="blur",m=A_;break;case"beforeblur":case"afterblur":m=A_;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=IL;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Ahe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Whe;break;case oY:case lY:case cY:m=Ohe;break;case uY:m=Khe;break;case"scroll":case"scrollend":m=jhe;break;case"wheel":m=Qhe;break;case"copy":case"cut":case"paste":m=Lhe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=BL;break;case"submit":m=qhe;break;case"toggle":case"beforetoggle":m=Jhe}var x=(t&4)!==0,v=!x&&(e==="scroll"||e==="scrollend"),g=x?f!==null?f+"Capture":null:f;x=[];for(var y=u,w;y!==null;){var S=y;if(w=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||w===null||g===null||(S=pb(y,g),S!=null&&x.push(kb(y,S,w))),v)break;y=y.return}
vendor: 5,989 bytes, lines 49-50
490<x.length&&(f=new m(f,p,null,n,d),h.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",m&&n!==iN&&(p=n.relatedTarget||n.fromElement)&&(Wf(p)||p[fx]))break e;(f||m)&&(p=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,f?(m=n.relatedTarget||n.toElement,f=u,m=m?Wf(m):null,m!==null&&(v=jv(m),x=m.tag,m!==v||x!==5&&x!==27&&x!==6)&&(m=null)):(f=null,m=u),f!==m&&(x=IL,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=BL,S="onPointerLeave",g="onPointerEnter",y="pointer"),v=f==null?p:a1(f),w=m==null?p:a1(m),p=new x(S,y+"leave",f,n,d),p.target=v,p.relatedTarget=w,S=null,Wf(d)===u&&(x=new x(g,y+"enter",m,n,d),x.target=w,x.relatedTarget=v,S=x),v=S,x=f&&m?Gj(f,m,sme):null,f!==null&&LP(h,p,f,x,!1),m!==null&&v!==null&&LP(h,v,m,x,!0)))}e:{if(f=u?a1(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var C=VL;else if(UL(f))if(nY)C=cfe;else{C=ofe;var k=afe}else m=f.nodeName,!m||m.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&_8(u.elementType)&&(C=VL):C=lfe;if(C&&(C=C(e,u))){tY(h,C,n,d);break e}k&&k(e,f,u)}switch(k=u?a1(u):window,e){case"focusin":(UL(k)||k.contentEditable==="true")&&(d0=k,oN=u,R1=null);break;case"focusout":R1=oN=d0=null;break;case"mousedown":lN=!0;break;case"contextmenu":case"mouseup":case"dragend":lN=!1,YL(h,n,d);break;case"selectionchange":if(dfe)break;case"keydown":case"keyup":YL(h,n,d)}var _;if(N8)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else u0?JW(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(ZW&&n.locale!=="ko"&&(u0||E!=="onCompositionStart"?E==="onCompositionEnd"&&u0&&(_=QW()):(oh=d,E8="value"in oh?oh.value:oh.textContent,u0=!0)),k=r4(u,E),0<k.length&&(E=new FL(E,e,null,n,d),h.push({event:E,listeners:k}),_?E.data=_:(_=eY(n),_!==null&&(E.data=_)))),(_=tfe?nfe(e,n):rfe(e,n))&&(E=r4(u,"onBeforeInput"),0<E.length&&(k=new FL("onBeforeInput","beforeinput",null,n,d),h.push({event:k,listeners:E}),k.data=_)),tme(h,e,u,n,d)}XK(h,t)})}function kb(e,t,n){return{instance:e,listener:t,currentTarget:n}}function r4(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=pb(e,n),i!=null&&r.unshift(kb(e,i,s)),i=pb(e,t),i!=null&&r.push(kb(e,i,s))),e.tag===3)return r;e=e.return}return[]}function sme(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function LP(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var o=n,c=o.alternate,u=o.stateNode;if(o=o.tag,c!==null&&c===r)break;o!==5&&o!==26&&o!==27||u===null||(c=u,i?(u=pb(n,s),u!=null&&a.unshift(kb(n,u,c))):i||(u=pb(n,s),u!=null&&a.push(kb(n,u,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var ame=/\r\n?/g,ome=/\u0000|\uFFFD/g;function PP(e){return(typeof e=="string"?e:""+e).replace(ame,` 50`).replace(ome,"")}function ZK(e,t){return t=PP(t),PP(e)===t}function nr(e,t,n,r,i,s){switch(n){case"children":if(typeof r=="string")t==="body"||t==="textarea"&&r===""||bg(e,r);else if(typeof r=="number"||typeof r=="bigint")t!=="body"&&bg(e,""+r);else return;break;case"className":Vw(e,"class",r);break;case"tabIndex":Vw(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Vw(e,n,r);break;case"style":KW(e,r,s);return;case"data":if(t!=="object"){Vw(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=OS(r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){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}else typeof s=="function"&&(n==="formAction"?(t!=="input"&&nr(e,t,"name",i.name,i,null),nr(e,t,"formEncType",i.formEncType,i,null),nr(e,t,"formMethod",i.formMethod,i,null),nr(e,t,"formTarget",i.formTarget,i,null)):(nr(e,t,"encType",i.encType,i,null),nr(e,t,"method",i.method,i,null),nr(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=OS(r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Ql);return;case"onScroll":r!=null&&vn("scroll",e);return;case"onScrollEnd":r!=null&&vn("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(Ae(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(Ae(60));(s!=null?s.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=OS(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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
50ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":vn("beforetoggle",e),vn("toggle",e),RS(e,"popover",r);break;case"xlinkActuate":$c(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":$c(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":$c(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":$c(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":$c(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":$c(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":$c(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":$c(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":$c(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":RS(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=The.get(n)||n,RS(e,n,r);else return}Un=!0}function qN(e,t,n,r,i,s){switch(n){case"style":KW(e,r,s);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(Ae(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(Ae(60));(s!=null?s.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof r=="string")bg(e,r);else if(typeof r=="number"||typeof r=="bigint")bg(e,""+r);else return;break;case"onScroll":r!=null&&vn("scroll",e);return;case"onScrollEnd":r!=null&&vn("scrollend",e);return;case"onClick":r!=null&&(e.onclick=Ql);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!VW.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),s=n.slice(2,i?n.length-7:void 0),t=e[Ra]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(s,t,i),typeof r=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(s,r,i);break e}Un=!0,n in e?e[n]=r:r===!0?e.setAttribute(n,""):RS(e,n,r)}return}Un=!0}function hs(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vn("error",e),vn("load",e);var r=!1,i=!1,s;for(s in n)if(n.hasOwnProperty(s)){var a=n[s];if(a!=null)switch(s){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Ae(137,t));default:nr(e,t,s,a,n,null)}}i&&nr(e,t,"srcSet",n.srcSet,n,null),r&&nr(e,t,"src",n.src,n,null);return;case"input":vn("invalid",e);var o=s=a=i=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case"name":i=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":s=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(Ae(137,t));break;default:nr(e,t,r,d,n,null)}}GW(e,s,o,c,u,a,i,!1);return;case"select":vn("invalid",e),r=a=s=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":s=o;break;case"defaultValue":a=o;break;case"multiple":r=o;default:nr(e,t,i,o,n,null)}t=s,n=a,e.multiple=!!r,t!=null?R0(e,!!r,t,!1):n!=null&&R0(e,!!r,n,!0);return;case"textarea":vn("invalid",e),s=i=r=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":r=o;break;case"defaultValue":i=o;break;case"children":s=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(Ae(91));break;default:nr(e,t,a,o,n,null)}YW(e,r,i,s);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:nr(e,t,c,r,n,null)}return;case"dialog":vn("beforetoggle",e),vn("toggle",e),vn("cancel",e),vn("close",e);break;case"iframe":case"object":vn("load",e);break;case"video":case"audio":for(r=0;r<Cb.length;r++)vn(Cb[r],e);break;case"image":vn("error",e),vn("load",e);break;case"details":vn("toggle",e);break;case"embed":case"source":case"link":vn("error",e),vn("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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(Ae(137,t));default:nr(e,t,u,r,n,null)}return;default:if(_8(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qN(e,t,d,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&nr(e,t,o,r,n,null))}var lme={};function cme(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,s=null,a=null,o=null,c=null,u=null,d=null;for(m in n){var h=n[m];if(n.hasOwnProperty(m)&&h!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":c=h;default:r.hasOwnProperty(m)||nr(e,t,m,null,r,h)}}for(var f in r){var m=r[f];if(h=n[f],r.hasOwnProperty(f)&&(m!=null||h!=null))switch(f){case"type":m!==h&&(Un=!0),s=m;break;case"name":m!==h&&(Un=!0),i=m;break;case"checked":m!==h&&(Un=!0),u=m;break;case"defaultChecked":m!==h&&(Un=!0),d=m;break;case"value":m!==h&&(Un=!0),a=m;break;case"defaultValue":m!==h&&(Un=!0),o=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(Ae(137,t));break;default:m!==h&&nr(e,t,f,m,r,h)}}rN(e,a,o,c,u,d,s,i);return;case"select":m=a=o=f=null;for(s in n)if(c=n[s],n.hasOwnProperty(s)&&c!=null)switch(s){case"value":break;case"multiple":m=c;default:r.hasOwnProperty(s)||nr(e,t,s,null,r,c)}for(i in r)if(s=r[i],c=n[i],r.hasOwnProperty(i)&&(s!=null||c!=null))switch(i){case"value":s!==c&&(Un=!0),f=s;break;case"defaultValue":s!==c&&(Un=!0),o=s;break;case"multiple":s!==c&&(Un=!0),a=s;default:s!==c&&nr(e,t,i,s,r,c)}t=o,n=a,r=m,f!=null?R0(e,!!n,f,!1):!!r!=!!n&&(t!=null?R0(e,!!n,t,!0):R0(e,!!n,n?[]:"",!1));return;case"textarea":m=f=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:nr(e,t,o,null,r,i)}for(a in r)if(i=r[a],s=n[a],r.hasOwnProperty(a)&&(i!=null||s!=null))switch(a){case"value":i!==s&&(Un=!0),f=i;break;case"defaultValue":i!==s&&(Un=!0),m=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(Ae(91));break;default:i!==s&&nr(e,t,a,i,r,s)}WW(e,f,m);return;case"option":for(var p in n)if(f=n[p],n.hasOwnProperty(p)&&f!=null&&!r.hasOwnProperty(p))switch(p){case"selected":e.selected=!1;break;default:nr(e,t,p,null,r,f)}for(c in r)if(f=r[c],m=n[c],r.hasOwnProperty(c)&&f!==m&&(f!=null||m!=null))switch(c){case"selected":f!==m&&(Un=!0),e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:nr(e,t,c,f,r,m)}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 x in n)f=n[x],n.hasOwnProperty(x)&&f!=null&&!r.hasOwnProperty(x)&&nr(e,t,x,null,r,f);for(u in r)if(f=r[u],m=n[u],r.hasOwnProperty(u)&&f!==m&&(f!=null||m!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(Ae(137,t));break;default:nr(e,t,u,f,r,m)}return;default:if(_8(t)){for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!==void 0&&!r.hasOwnProperty(v)&&qN(e,t,v,void 0,r,f);for(d in r)f=r[d],m=n[d],!r.hasOwnProperty(d)||f===m||f===void 0&&m===void 0||qN(e,t,d,f,r,m);return}}for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g)&&nr(e,t,g,null,r,f);for(h in r)f=r[h],m=n[h],!r.hasOwnProperty(h)||f===m||f==null&&m==null||nr(e,t,h,f,r,m)}function IP(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ume(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],s=i.transferSize,a=i.initiatorType,o=i.duration;if(s&&o&&IP(a)){for(a=0,o=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],u=c.startTime;if(u>o)break;var d=c.transferSize,h=c.initiatorType;d&&IP(h)&&(c=c.responseEnd,a+=d*(c<o?1:(o-u)/(c-u)))}if(--r,t+=8*(s+a)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var GN=null,WN=null;
vendor: 26,970 bytes, line 50
50function _b(e){return e.nodeType===9?e:e.ownerDocument}function FP(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 JK(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function eX(e,t,n,r){return n=_b(n).createElement(e),n[os]=r,n[Ra]=t,hs(n,e,t),Qi(n),n}function YN(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Z_=null;function dme(){var e=window.event;return e&&e.type==="popstate"?e===Z_?!1:(Z_=e,!0):(Z_=null,!1)}var dM=typeof setTimeout=="function"?setTimeout:void 0,hme=typeof clearTimeout=="function"?clearTimeout:void 0,BP=typeof Promise=="function"?Promise:void 0,zP=typeof requestAnimationFrame=="function"?requestAnimationFrame:dM,fme=typeof queueMicrotask=="function"?queueMicrotask:typeof BP<"u"?function(e){return BP.resolve(null).then(e).catch(mme)}:dM;function mme(e){setTimeout(function(){throw e})}function sf(e){return e==="head"}function $P(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(i),Ng(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")eT(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,eT(n);for(var s=n.firstChild;s;){var a=s.nextSibling,o=s.nodeName;s[Rv]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=a}}else n==="body"&&eT(e.ownerDocument.body);n=i}while(n);Ng(t)}function UP(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function tX(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var s=t[i];0<s.width&&0<s.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function nX(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function pme(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function KN(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return pme(t,n,e)}function gme(e){return e.documentElement.clientHeight}function xme(e){this.addEventListener("load",e),this.addEventListener("error",e)}function yme(e,t,n,r,i,s,a,o,c){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var f=u.defaultView,m=f.navigation&&f.navigation.transition,p=u.fonts.status;r();var x=[];if(p==="loaded"&&(gme(u),u.fonts.status==="loading"&&x.push(u.fonts.ready)),p=x.length,e!==null)for(var v=e.suspenseyImages,g=0,y=0;y<v.length;y++){var w=v[y];if(!w.complete){var S=w.getBoundingClientRect();if(0<S.bottom&&0<S.right&&S.top<f.innerHeight&&S.left<f.innerWidth){if(g+=mX(w),g>YS){x.length=p;break}w=new Promise(xme.bind(w)),x.push(w)}}}if(0<x.length)return f=Promise.race([Promise.all(x),new Promise(function(C){return setTimeout(C,500)})]).then(i,i),(m?Promise.allSettled([m.finished,f]):f).then(s,s);if(i(),m)return m.finished.then(s,s);s()},types:n});u.__reactViewTransition=d;var h=[];return d.ready.then(function(){for(var f=u.documentElement.getAnimations({subtree:!0}),m=0;m<f.length;m++){var p=f[m],x=p.effect,v=x.pseudoElement;if(v!=null&&v.startsWith("::view-transition")){h.push(p),p=x.getKeyframes();for(var g=v=void 0,y=!0,w=0;w<p.length;w++){var S=p[w],C=S.width;if(v===void 0)v=C;else if(v!==C){y=!1;break}if(C=S.height,g===void 0)g=C;else if(g!==C){y=!1;break}delete S.width,delete S.height,S.transform==="none"&&delete S.transform}y&&v!==void 0&&g!==void 0&&(x.setKeyframes(p),y=getComputedStyle(x.target,x.pseudoElement),y.width!==v||y.height!==g)&&(y=p[0],y.width=v,y.height=g,y=p[p.length-1],y.width=v,y.height=g,x.setKeyframes(p))}}a()},function(f){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{if(typeof f=="object"&&f!==null)switch(f.name){case"InvalidStateError":(f.message==="View transition was skipped because document visibility state is hidden."||f.message==="Skipping view transition because document visibility state has become hidden."||f.message==="Skipping view transition because viewport size changed."||f.message==="Transition was aborted because of invalid state")&&(f=null)}f!==null&&c(f)}finally{r(),i(),a()}}),d.finished.finally(function(){for(var f=0;f<h.length;f++)h[f].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),o()}),d}catch{return r(),i(),a(),null}}function Yf(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Yf.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:gr({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Yf.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var s=n[i].effect;s!==null&&s.target===e&&s.pseudoElement===t&&r.push(n[i])}return r};Yf.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function rX(e){return{name:e,group:new Yf("group",e),imagePair:new Yf("image-pair",e),old:new Yf("old",e),new:new Yf("new",e)}}function ho(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ho.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!="boolean"&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var s=this._eventListeners;if(iX(s,e,t,n)===-1){var a=this,o=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(o=function(c){a.removeEventListener(e,t,n),typeof t=="function"?t.call(this,c):t.handleEvent(c)}),r!==null&&(i=a.removeEventListener.bind(a,e,t,n),r.addEventListener("abort",i,{once:!0}),i=r.removeEventListener.bind(r,"abort",i)),r=_g(n),s.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:o,cleanup:i}),Ma(this._fragmentFiber.child,!1,bme,e,o,r)}this._eventListeners=s}};function bme(e,t,n,r){return Ri(e).addEventListener(t,n,r),!1}ho.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=iX(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var s=i.cleanup;i=_g(i.optionsOrUseCapture),Ma(this._fragmentFiber.child,!1,vme,e,n,i),r.splice(t,1),s!==null&&s()}};function vme(e,t,n,r){return Ri(e).removeEventListener(t,n,r),!1}function _g(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function VP(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function iX(e,t,n,r){if(e.length===0)return-1;r=VP(r);for(var i=0;i<e.length;i++){var s=e[i];if(s.type===t&&s.listener===n&&VP(s.optionsOrUseCapture)===r)return i}return-1}ho.prototype.dispatchEvent=function(e){var t=op(this._fragmentFiber);if(t===null)return!0;t=Ri(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var i=0;i<n.length;i++){var s=n[i];r.addEventListener(s.type,s.attachedListener,_g(s.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)s=n[i],r.removeEventListener(s.type,s.attachedListener,_g(s.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)};ho.prototype.focus=function(e){Ma(this._fragmentFiber.child,!0,sX,e,void 0,void 0)};function sX(e,t){return e.tag===6?!1:(e=Ri(e),Rme(e,t))}ho.prototype.focusLast=function(e){var t=[];Ma(this._fragmentFiber.child,!0,hM,t,void 0,void 0);for(var n=t.length-1;0<=n&&!sX(t[n],e);n--);};function hM(e,t){return t.push(e),!1}ho.prototype.blur=function(){var e=op(this._fragmentFiber);e!==null&&(e=Ri(e),e=_b(e).activeElement,e!==null&&Ma(this._fragmentFiber.child,!1,wme,e,void 0,void 0))};function wme(e,t){return e.tag===6?!1:(e=Ri(e),e===t||e.contains(t)?(t.blur(),!0):!1)}ho.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Ma(this._fragmentFiber.child,!1,Sme,e,void 0,void 0)};function Sme(e,t){return e.tag===6||(e=Ri(e),t.observe(e)),!1}ho.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Ma(this._fragmentFiber.child,!1,Cme,e,void 0,void 0);for(var n=t=0;n<yl.length;n++){var r=yl[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):yl[t++]=r}yl.length=t}};function Cme(e,t){return e.tag===6||(e=Ri(e),t.unobserve(e)),!1}var yl=[],J_=!1;function kme(e,t,n){yl.push({fragmentInstance:e,observer:t,instance:n}),J_||(J_=!0,Ome(function(){J_=!1;var r=yl;yl=[];for(var i=0;i<r.length;i++){var s=r[i];s.observer.unobserve(s.instance)}}))}ho.prototype.getClientRects=function(){var e=[];return Ma(this._fragmentFiber.child,!1,_me,e,void 0,void 0),e};function _me(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=Ri(e),t.push.apply(t,e.getClientRects());return!1}ho.prototype.getRootNode=function(e){var t=op(this._fragmentFiber);return t===null?this:Ri(t).getRootNode(e)};ho.prototype.compareDocumentPosition=function(e){var t=op(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];Ma(this._fragmentFiber.child,!1,hM,n,void 0,void 0);var r=Ri(t);if(n.length===0){if(n=r,CL(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=jW(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=Ri(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=Ri(n[0]),i=Ri(n[n.length-1]);var s=CL(this._fragmentFiber)?t.parentElement:r;if(s==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=s.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,s=s.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var a=t.compareDocumentPosition(e),o=i.compareDocumentPosition(e),c=a&Node.DOCUMENT_POSITION_CONTAINED_BY||o&Node.DOCUMENT_POSITION_CONTAINED_BY;return o=r&&s&&a&Node.DOCUMENT_POSITION_FOLLOWING&&o&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||s&&i===e||c||o?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!s&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:a,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Tme(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Tme(e,t,n,r,i){var s=Wf(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!s)e:{for(;s!==null;){if(s.tag===7&&(s===t||s.alternate===t)){n=!0;break e}s=s.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(s===null)return s=i.ownerDocument,i===s||i===s.documentElement||i===s.body;e:{for(s=t,t=op(t);s!==null;){if(!(s.tag!==5&&s.tag!==3&&s.tag!==27||s!==t&&s.alternate!==t)){s=!0;break e}s=s.return}s=!1}return s}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!s)&&!(t=s===n)&&(t=Gj(n,s,kL),t===null?t=!1:(Ma(t,!0,ehe,s,n),s=a0,a0=null,t=s!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!s)&&!(t=s===r)&&(t=Gj(r,s,kL),t===null?t=!1:(Ma(t,!0,the,s,r),s=a0,qj=a0=null,t=s!==null)),t):!1}function HP(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ho.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(Ae(566));var t=[];Ma(this._fragmentFiber.child,!1,hM,t,void 0,void 0);var n=e!==!1;if(t.length===0){var r=jW(this._fragmentFiber);if(r=n?r[1]||r[0]||op(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=Ri(r),HP(e,n);return}if(r=Ri(r),r.nodeType!==9){if(r.nodeType===11){n="host"in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=Ri(i),HP(i,n)):Ri(i).scrollIntoView(e),r+=n?-1:1}};function Eme(e,t){return e=Ri(e),aX(e,t),!1}function aX(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function oX(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,_g(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(s){for(var a=0,o=0;o<yl.length;o++){var c=yl[o];(c.fragmentInstance!==t||c.observer!==s||c.instance!==e)&&(yl[a++]=c)}yl.length=a,s.observe(e)}),aX(e,t))}function jme(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,_g(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(s){typeof s.rootMargin=="string"?kme(t,s,e):s.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function XN(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":XN(n),X5(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Nme(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Rv])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Bo(e.nextSibling),e===null)break}return null}function Ame(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Bo(e.nextSibling),e===null))return null;return e}function lX(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bo(e.nextSibling),e===null))return null;return e}function QN(e){return e.data==="$?"||e.data==="$~"}function fM(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Mme(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Bo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ZN=null;function qP(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Bo(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function GP(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Rme(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return r}function Ome(e){zP(function(){zP(function(t){return e(t)})})}function cX(e,t,n){switch(t=_b(n),e){case"html":if(e=t.documentElement,!e)throw Error(Ae(452));return e;case"head":if(e=t.head,!e)throw Error(Ae(453));return e;case"body":if(e=t.body,!e)throw Error(Ae(454));return e;default:throw Error(Ae(451))}}function uX(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&nr(e,t,r,null,lme,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Ql&&(e.onclick=null),X5(e)}function eT(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);X5(e)}var zo=new Map,WP=new Set;function Tb(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var id=Wn.d;Wn.d={f:Dme,r:Lme,D:Pme,C:Ime,L:Fme,m:Bme,X:$me,S:zme,M:Ume};function Dme(){var e=id.f(),t=uk();return e||t}function Lme(e){var t=mx(e);t!==null&&t.tag===5&&t.type==="form"?KY(t):id.r(e)}var yx=typeof document>"u"?null:document;function dX(e,t,n){var r=yx;if(r&&typeof t=="string"&&t){var i=Mo(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),WP.has(i)||(WP.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),hs(t,"link",e),Qi(t),r.head.appendChild(t)))}}function Pme(e){id.D(e),dX("dns-prefetch",e,null)}function Ime(e,t){id.C(e,t),dX("preconnect",e,t)}function Fme(e,t,n){id.L(e,t,n);var r=yx;if(r&&e&&t){var i='link[rel="preload"][as="'+Mo(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Mo(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Mo(n.imageSizes)+'"]')):i+='[href="'+Mo(e)+'"]';var s=i;switch(t){case"style":s=Tg(e);break;case"script":s=bx(e)}if(!(zo.has(s)||(e=gr({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zo.set(s,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(Fv(s))||t==="script"&&r.querySelector(Bv(s))))){var a=r.createElement("link");hs(a,"link",e),t==="style"&&(a[LC]=!0,a.onload=a.onerror=function(){$W(a)}),Qi(a),r.head.appendChild(a)}}}function Bme(e,t){id.m(e,t);var n=yx;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Mo(r)+'"][href="'+Mo(e)+'"]',s=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=bx(e)}if(!zo.has(s)&&(e=gr({rel:"modulepreload",href:e},t),zo.set(s,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Bv(s)))return}r=n.createElement("link"),hs(r,"link",e),Qi(r),n.head.appendChild(r)}}}function zme(e,t,n){id.S(e,t,n);var r=yx;if(r&&e){var i=M0(r).hoistableStyles,s=Tg(e);t=t||"default";var a=i.get(s);if(!a){var o={loading:0,preload:null};if(a=r.querySelector(Fv(s)))o.loading=5;else{e=gr({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zo.get(s))&&mM(e,n);var c=a=r.createElement("link");Qi(c),hs(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,GS(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:o},i.set(s,a)}}}function $me(e,t){id.X(e,t);var n=yx;if(n&&e){var r=M0(n).hoistableScripts,i=bx(e),s=r.get(i);s||(s=n.querySelector(Bv(i)),s||(e=gr({src:e,async:!0},t),(t=zo.get(i))&&pM(e,t),s=n.createElement("script"),Qi(s),hs(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function Ume(e,t){id.M(e,t);var n=yx;if(n&&e){var r=M0(n).hoistableScripts,i=bx(e),s=r.get(i);s||(s=n.querySelector(Bv(i)),s||(e=gr({src:e,async:!0,type:"module"},t),(t=zo.get(i))&&pM(e,t),s=n.createElement("script"),Qi(s),hs(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function YP(e,t,n,r){var i=(i=yh.current)?Tb(i):null;if(!i)throw Error(Ae(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Tg(n.href),t=M0(i).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Tg(n.href);var s=M0(i).hoistableStyles,a=s.get(e);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,a),(s=i.querySelector(Fv(e)))?s._p||(a.instance=s,a.state.loading=5):(s=zo.get(e),s||(s={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zo.set(e,s)),Vme(i,e,s,a.state))),t&&r===null)throw Error(Ae(528,""));return a}if(t&&r!==null)throw Error(Ae(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=bx(n),t=M0(i).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(Ae(444,e))}}function Tg(e){return'href="'+Mo(e)+'"'}function Fv(e){return'link[rel="stylesheet"]['+e+"]"}function hX(e){return gr({},e,{"data-precedence":e.precedence,precedence:null})}function Vme(e,t,n,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[LC]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[LC]=!0,t.onload=t.onerror=$W.bind(null,t),hs(t,"link",n),Qi(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function bx(e){return'[src="'+Mo(e)+'"]'}function Bv(e){return"script[async]"+e}function KP(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Mo(n.href)+'"]');if(r)return t.instance=r,Qi(r),r;var i=gr({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Qi(r),hs(r,"style",i),GS(r,n.precedence,e),t.instance=r;case"stylesheet":i=Tg(n.href);var s=e.querySelector(Fv(i));if(s)return t.state.loading|=4,t.instance=s,Qi(s),s;r=hX(n),(i=zo.get(i))&&mM(r,i),s=(e.ownerDocument||e).createElement("link"),Qi(s);var a=s;return a._p=new Promise(function(o,c){a.onload=o,a.onerror=c}),hs(s,"link",r),t.state.loading|=4,GS(s,n.precedence,e),t.instance=s;case"script":return s=bx(n.src),(i=e.querySelector(Bv(s)))?(t.instance=i,Qi(i),i):(r=n,(i=zo.get(s))&&(r=gr({},n),pM(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),Qi(i),hs(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(Ae(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,GS(r,n.precedence,e));return t.instance}function GS(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,s=i,a=0;a<r.length;a++){var o=r[a];if(o.dataset.precedence===t)s=o;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function mM(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pM(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var WS=null;function XP(e,t,n){if(WS===null){var r=new Map,i=WS=new Map;i.set(n,r)}else i=WS,r=i.get(n),r||(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 s=n[i];if(!(s[Rv]||s[os]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var a=s.getAttribute(t)||"";a=e+a;var o=r.get(a);o?o.push(s):r.set(a,[s])}}return r}function JN(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Hme(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function QP(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function fX(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function mX(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function ZP(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=mX(t),e.suspenseyImages.push(t)),e=Wme.bind(e),t.decode().then(e,e))}function qme(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="str
50ing"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var i=Tg(r.href),s=t.querySelector(Fv(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Eb.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Qi(s);return}s=t.ownerDocument||t,r=hX(r),(i=zo.get(i))&&mM(r,i),s=s.createElement("link"),Qi(s);var a=s;a._p=new Promise(function(o,c){a.onload=o,a.onerror=c}),hs(s,"link",r),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Eb.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var YS=0;function Gme(e,t){return e.stylesheets&&e.count===0&&KS(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&KS(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&YS===0&&(YS=62500*ume());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&KS(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>YS?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function pX(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)KS(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Eb(){this.count--,pX(this)}function Wme(){this.imgCount--,pX(this)}var i4=null;function KS(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,i4=new Map,t.forEach(Yme,e),i4=null,Eb.call(e))}function Yme(e,t){if(!(t.state.loading&4)){var n=i4.get(e);if(n)var r=n.get(null);else{n=new Map,i4.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var a=i[s];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}i=t.instance,a=i.getAttribute("data-precedence"),s=n.get(a)||r,s===r&&n.set(null,i),n.set(a,i),this.count++,r=Eb.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),s?s.parentNode.insertBefore(i,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Eg={$$typeof:Xl,Provider:null,Consumer:null,_currentValue:mm,_currentValue2:mm,_threadCount:0};function Kme(e,t,n,r,i,s,a,o,c){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=__(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=__(0),this.hiddenUpdates=__(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function gX(e,t,n,r,i,s,a,o,c,u,d,h){return e=new Kme(e,t,n,a,c,u,d,h,o),t=1,s===!0&&(t|=24),s=ba(3,null,null,t),e.current=s,s.stateNode=e,t=L8(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:t},F8(s),e}function xX(e){return e?(e=m0,e):m0}function yX(e,t,n,r,i,s){i=xX(i),r.context===null?r.context=i:r.pendingContext=i,r=vh(t),r.payload={element:n},s=s===void 0?null:s,s!==null&&(r.callback=s),n=wh(e,r,t),n!==null&&(_a(n,e,t),D1(n,e,t))}function JP(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gM(e,t){JP(e,t),(e=e.alternate)&&JP(e,t)}function bX(e){if(e.tag===13||e.tag===31){var t=up(e,67108864);t!==null&&_a(t,e,67108864),gM(e,67108864)}}function eI(e){if(e.tag===13||e.tag===31){var t=to();t=C8(t);var n=up(e,t);n!==null&&_a(n,e,t),gM(e,t)}}var jg=!0;function Xme(e,t,n,r){var i=Ht.T;Ht.T=null;var s=Wn.p;try{Wn.p=2,xM(e,t,n,r)}finally{Wn.p=s,Ht.T=i}}function Qme(e,t,n,r){var i=Ht.T;Ht.T=null;var s=Wn.p;try{Wn.p=8,xM(e,t,n,r)}finally{Wn.p=s,Ht.T=i}}function xM(e,t,n,r){if(jg){var i=e6(r);if(i===null)Q_(e,t,r,s4,n),tI(e,r);else if(Jme(i,e,t,n,r))r.stopPropagation();else if(tI(e,r),t&4&&-1<Zme.indexOf(e)){for(;i!==null;){var s=mx(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var a=Mf(s.pendingLanes);if(a!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var c=1<<31-eo(a);o.entanglements[1]|=c,a&=~c}_c(s),!(Hn&6)&&(JC=Za()+500,Iv(0))}}break;case 31:case 13:o=up(s,2),o!==null&&_a(o,s,2),uk(),gM(s,2)}if(s=e6(r),s===null&&Q_(e,t,r,s4,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Q_(e,t,r,null,n)}}
vendor: 4,926 bytes, line 50
50function e6(e){return e=T8(e),yM(e)}var s4=null;function yM(e){if(s4=null,e=Wf(e),e!==null){var t=jv(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=_W(t),e!==null)return e;e=null}else if(n===31){if(e=TW(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return s4=e,null}function vX(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(uhe()){case RW:return 2;case OW:return 8;case DC:case dhe:return 32;case DW:return 268435456;default:return 32}default:return 32}}var t6=!1,_h=null,Th=null,Eh=null,jb=new Map,Nb=new Map,Qd=[],Zme="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 tI(e,t){switch(e){case"focusin":case"focusout":_h=null;break;case"dragenter":case"dragleave":Th=null;break;case"mouseover":case"mouseout":Eh=null;break;case"pointerover":case"pointerout":jb.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nb.delete(t.pointerId)}}function wy(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=mx(t),t!==null&&bX(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Jme(e,t,n,r,i){switch(t){case"focusin":return _h=wy(_h,e,t,n,r,i),!0;case"dragenter":return Th=wy(Th,e,t,n,r,i),!0;case"mouseover":return Eh=wy(Eh,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return jb.set(s,wy(jb.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Nb.set(s,wy(Nb.get(s)||null,e,t,n,r,i)),!0}return!1}function wX(e){var t=Wf(e.target);if(t!==null){var n=jv(t);if(n!==null){if(t=n.tag,t===13){if(t=_W(n),t!==null){e.blockedOn=t,jL(e.priority,function(){eI(n)});return}}else if(t===31){if(t=TW(n),t!==null){e.blockedOn=t,jL(e.priority,function(){eI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function XS(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=e6(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);iN=r,n.target.dispatchEvent(r),iN=null}else return t=mx(n),t!==null&&bX(t),e.blockedOn=n,!1;t.shift()}return!0}function nI(e,t,n){XS(e)&&n.delete(t)}function epe(){t6=!1,_h!==null&&XS(_h)&&(_h=null),Th!==null&&XS(Th)&&(Th=null),Eh!==null&&XS(Eh)&&(Eh=null),jb.forEach(nI),Nb.forEach(nI)}function e2(e,t){e.blockedOn===t&&(e.blockedOn=null,t6||(t6=!0,Ii.unstable_scheduleCallback(Ii.unstable_NormalPriority,epe)))}var t2=null;function rI(e){t2!==e&&(t2=e,Ii.unstable_scheduleCallback(Ii.unstable_NormalPriority,function(){t2===e&&(t2=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if(yM(r||n)===null)continue;break}var s=mx(n);s!==null&&(e.splice(t,3),t-=3,vN(s,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ng(e){function t(c){return e2(c,e)}_h!==null&&e2(_h,e),Th!==null&&e2(Th,e),Eh!==null&&e2(Eh,e),jb.forEach(t),Nb.forEach(t);for(var n=0;n<Qd.length;n++){var r=Qd[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Qd.length&&(n=Qd[0],n.blockedOn===null);)wX(n),n.blockedOn===null&&Qd.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],s=n[r+1],a=i[Ra]||null;if(typeof s=="function")a||rI(n);else if(a){var o=null;if(s&&s.hasAttribute("formAction")){if(i=s,a=s[Ra]||null)o=a.formAction;else if(yM(i)!==null)continue}else o=a.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),rI(n)}}}
vendor: 5,166 bytes, line 50
50function SX(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(a){return i=a})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){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),i!==null&&(i(),i=null)}}}function bM(e){this._internalRoot=e}fk.prototype.render=bM.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ae(409));var n=t.current,r=to();yX(n,r,e,t,null,null)};fk.prototype.unmount=bM.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yX(e.current,2,null,e,null,null),uk(),t[fx]=null}};function fk(e){this._internalRoot=e}fk.prototype.unstable_scheduleHydration=function(e){if(e){var t=zW();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qd.length&&t!==0&&t<Qd[n].priority;n++);Qd.splice(n,0,e),n===0&&wX(e)}};var iI=CW.version;if(iI!=="19.3.0")throw Error(Ae(527,iI,"19.3.0"));Wn.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ae(188)):(e=Object.keys(e).join(","),Error(Ae(268,e)));return e=Jde(t),e=e!==null?EW(e):null,e=e===null?null:e.stateNode,e};var tpe={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:Ht,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var n2=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n2.isDisabled&&n2.supportsFiber)try{Nv=n2.inject(tpe),Ja=n2}catch{}}W5.createRoot=function(e,t){if(!kW(e))throw Error(Ae(299));var n=!1,r="",i=rK,s=iK,a=sK;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=gX(e,1,!1,null,null,n,r,null,i,s,a,SX),e[fx]=t.current,uM(e),new bM(t)};W5.hydrateRoot=function(e,t,n){if(!kW(e))throw Error(Ae(299));var r=!1,i="",s=rK,a=iK,o=sK,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=gX(e,1,!0,t,n??null,r,i,c,s,a,o,SX),t.context=xX(null),n=t.current,r=to(),r=C8(r),i=vh(r),i.callback=null,wh(n,i,r),n=r,t.current.lanes=n,Mv(t,n),_c(t),e[fx]=t.current,uM(e),new fk(t)};W5.version="19.3.0";function CX(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(CX)}catch(e){console.error(e)}}CX(),gW.exports=W5;var npe=gW.exports;const rpe=dx(npe),kX=b.createContext(void 0),Tt=e=>{const t=b.useContext(kX);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ipe=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(kX.Provider,{value:e,children:t})),spe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var Zd,m8,WG,ape=(WG=class{constructor(){_t(this,Zd,spe);_t(this,m8,!1)}setTimeoutProvider(e){it(this,Zd,e)}setTimeout(e,t){return K(this,Zd).setTimeout(e,t)}clearTimeout(e){K(this,Zd).clearTimeout(e)}setInterval(e,t){return K(this,Zd).setInterval(e,t)}clearInterval(e){K(this,Zd).clearInterval(e)}},Zd=new WeakMap,m8=new WeakMap,WG);const Kf=new ape;function ope(e){setTimeout(e,0)}const lpe=typeof window>"u"||"Deno"in globalThis;function Hs(){}function cpe(e,t){return typeof e=="function"?e(t):e}function _X(e){return typeof e=="number"&&e>=0&&e!==1/0}function TX(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pr(e,t){return typeof e=="function"?e(t):e}function sI(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==vM(a,t.options))return!1}else if(!Ag(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||s&&!s(t))}function aI(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Im(t.options.mutationKey)!==Im(s))return!1}else if(!Ag(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function vM(e,t){return((t==null?void 0:t.queryKeyHashFn)||Im)(e)}function Im(e){return JSON.stringify(e,(t,n)=>n6(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ag(e,t){if(e===t)return!0;
50if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let r=0;r<t.length;r++)if(!Ag(e[r],t[r]))return!1;return!0}const n=Object.keys(t);for(const r of n)if(!Ag(e[r],t[r]))return!1;return!0}return!1}const upe=Object.prototype.hasOwnProperty;function EX(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=oI(e)&&oI(t);if(!r&&!(n6(e)&&n6(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),a=s.length,o=r?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=r?u:s[u],h=e[d],f=t[d];if(h===f){o[d]=h,(r?u<i:upe.call(e,d))&&c++;continue}if(h===null||f===null||typeof h!="object"||typeof f!="object"){o[d]=f;continue}const m=EX(h,f,n+1);o[d]=m,m===h&&c++}return i===a&&c===i?e:o}function QS(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function oI(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function n6(e){if(!lI(e))return!1;const t=Object.getPrototypeOf(e),n=t==null?void 0:t.constructor;if(n===void 0)return!0;if(typeof n!="function")return!1;const r=n.prototype;return!(!lI(r)||!r.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function lI(e){return Object.prototype.toString.call(e)==="[object Object]"}function dpe(e){return new Promise(t=>{Kf.setTimeout(t,e)})}function r6(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?EX(e,t):t}function hpe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function fpe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}const wM=Symbol();function jX(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wM?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function SM(e,t){return typeof e=="function"?e(...t):!!e}function mpe(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}let ppe=()=>lpe;const CM=()=>ppe();var vx=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sm,Jd,ig,YG,gpe=(YG=class extends vx{constructor(){super();_t(this,sm);_t(this,Jd);_t(this,ig);it(this,ig,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,Jd)||this.setEventListener(K(this,ig))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Jd))==null||t.call(this),it(this,Jd,void 0))}setEventListener(t){var n;it(this,ig,t),(n=K(this,Jd))==null||n.call(this),it(this,Jd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,sm)!==t&&(it(this,sm,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,sm)=="boolean"?K(this,sm):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},sm=new WeakMap,Jd=new WeakMap,ig=new WeakMap,YG);const kM=new gpe,xpe=ope;function ype(){let e=[],t=0,n=o=>{o()},r=o=>{o()},i=xpe;const s=o=>{t?e.push(o):i(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||a()}return c},batchCalls:o=>(...c)=>{s(()=>{o(...c)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}const Mi=ype();var sg,eh,ag,KG,bpe=(KG=class extends vx{constructor(){super();_t(this,sg,!0);_t(this,eh);_t(this,ag);it(this,ag,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){K(this,eh)||this.setEventListener(K(this,ag))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,eh))==null||t.call(this),it(this,eh,void 0))}setEventListener(t){var n;it(this,ag,t),(n=K(this,eh))==null||n.call(this),it(this,eh,t(this.setOnline.bind(this)))}setOnline(t){K(this,sg)!==t&&(it(this,sg,t),this.listeners.forEac
50h(n=>{n(t)}))}isOnline(){return K(this,sg)}},sg=new WeakMap,eh=new WeakMap,ag=new WeakMap,KG);const a4=new bpe;function vpe(e){return Math.min(1e3*2**e,3e4)}function NX(e){return(e??"online")==="online"?a4.isOnline():!0}var i6=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function AX(e){let t=!1,n=0,r,i="pending",s,a;const o=new Promise((y,w)=>{s=y,a=w});o.catch(Hs);const c=()=>i!=="pending",u=y=>{var w;if(!c()){const S=new i6(y);x(S),(w=e.onCancel)==null||w.call(e,S)}},d=()=>{t=!0},h=()=>{t=!1},f=()=>kM.isFocused()&&(e.networkMode==="always"||a4.isOnline())&&e.canRun(),m=()=>NX(e.networkMode)&&e.canRun(),p=y=>{c()||(r==null||r(),i="resolved",s(y))},x=y=>{c()||(r==null||r(),i="rejected",a(y))},v=()=>new Promise(y=>{var w;r=S=>{(c()||f())&&y(S)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;r=void 0,c()||(y=e.onContinue)==null||y.call(e)}),g=()=>{if(c())return;let y;const w=n===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(S){y=Promise.reject(S)}Promise.resolve(y).then(p).catch(S=>{var A;if(c())return;const C=e.retry??(CM()?0:3),k=e.retryDelay??vpe,_=typeof k=="function"?k(n,S):k,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,S);if(t||!E){x(S);return}n++,(A=e.onFail)==null||A.call(e,n,S),dpe(_).then(()=>f()?void 0:v()).then(()=>{t?x(S):g()})})};return{promise:o,status:()=>i,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:d,continueRetry:h,canStart:m,start:()=>(m()?g():v().then(g),o)}}var am,XG,MX=(XG=class{constructor(){_t(this,am)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_X(this.gcTime)&&it(this,am,Kf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(CM()?1/0:3e5))}clearGcTimeout(){K(this,am)!==void 0&&(Kf.clearTimeout(K(this,am)),it(this,am,void 0))}},am=new WeakMap,XG);function wpe(e){return{onFetch:(t,n)=>{var d,h,f,m,p;const r=t.options,i=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],a=((p=t.state.data)==null?void 0:p.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let x=!1;const v=w=>{mpe(w,()=>t.signal,()=>x=!0)},g=jX(t.options,t.fetchOptions),y=async(w,S,C)=>{if(x)return Promise.reject(t.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return v(D),D})(),E=await g(_),{maxPages:A}=t.options,j=C?fpe:hpe;return{pages:j(w.pages,E,A),pageParams:j(w.pageParams,S,A)}};if(i&&s.length){const w=i==="backward",S=w?RX:s6,C={pages:s,pageParams:a};o=await y(C,S(r,C),w)}else{const w=e??s.length;do{const S=c===0?a[0]??r.initialPageParam:s6(r,o);if(c>0&&S==null)break;o=await y(o,S),c++}while(c<w)}return o};t.options.persister?t.fetchFn=()=>{var x,v;return(v=(x=t.options).persister)==null?void 0:v.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function s6(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function RX(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function Spe(e,t){return t?s6(e,t)!=null:!1}function Cpe(e,t){return!t||!e.getPreviousPageParam?!1:RX(e,t)!=null}var og,om,lg,Co,lm,ji,Cv,cm,cl,Kc,QG,kpe=(QG=class extends MX{constructor(t){super();_t(this,cl);_t(this,og);_t(this,om);_t(this,lg);_t(this,Co);_t(this,lm);_t(this,ji);_t(this,Cv);_t(this,cm);it(this,cm,!1),it(this,Cv,t.defaultOptions),this.setOptions(t.options),this.observers=[],it(this,lm,t.client),it(this,Co,K(this,lm).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,it(this,om,uI(this.options)),this.state=t.state??K(this,om),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return K(this,og)}get promise(){var t;return(t=K(this,ji))==null?void 0:t.promise}setOptions(t){if(this.options={...K(this,Cv),...t},t!=null&&t._type&&it(this,og,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=uI(this.options);n.data!==void 0&&(this.setState(cI(n.data,n.dataUpdatedAt)),it(this,om,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,C
50o).remove(this)}setData(t,n){const r=r6(this.state.data,t,this.options);return nn(this,cl,Kc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){nn(this,cl,Kc).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=K(this,ji))==null?void 0:r.promise;return(i=K(this,ji))==null||i.cancel(t),n?n.then(Hs).catch(Hs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return K(this,om)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Pr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wM||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Pr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!TX(this.state.dataUpdatedAt,t)}onFocus(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(n=K(this,ji))==null||n.continue()}onOnline(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(n=K(this,ji))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,Co).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&(this.observers.splice(n,1),this.observers.length||(K(this,ji)&&(K(this,cm)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?K(this,ji).cancel({revert:!0}):K(this,ji).cancelRetry()),this.scheduleGc()),K(this,Co).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nn(this,cl,Kc).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,h,f,m,p,x,v,g,y,w,S;if(this.state.fetchStatus!=="idle"&&((u=K(this,ji))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,ji))return K(this,ji).continueRetry(),K(this,ji).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(k=>k.options.queryFn);C&&this.setOptions(C.options)}const r=new AbortController,i=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(it(this,cm,!0),r.signal)})},s=()=>{const C=jX(this.options,n),_=(()=>{const E={client:K(this,lm),queryKey:this.queryKey,meta:this.meta};return i(E),E})();return it(this,cm,!1),this.options.persister?this.options.persister(C,_,this):C(_)},o=(()=>{const C={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:K(this,lm),state:this.state,fetchFn:s};return i(C),C})();(d=K(this,og)==="infinite"?wpe(this.options.pages):this.options.behavior)==null||d.onFetch(o,this),it(this,lg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&nn(this,cl,Kc).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const c=it(this,ji,AX({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:C=>{C instanceof i6&&C.revert&&this.setState({...K(this,lg),fetchStatus:"idle"}),r.abort()},onFail:(C,k)=>{nn(this,cl,Kc).call(this,{type:"failed",failureCount:C,error:k})},onPause:()=>{nn(this,cl,Kc).call(this,{type:"pause"})},onContinue:()=>{nn(this,cl,Kc).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const C=await c.start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(p=(m=K(this,Co).config).onSuccess)==null||p.call(m,C,this),(v=(x=K(this,Co).config).onSettled)==null||v.call(x,C,this.state.error,this),C}catch(C){if(C instanceof i6){if(C.silent)return K(this,ji).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw nn(this,cl,Kc).call(this,{type:"error",error:C}),(y=(g=K(this,Co).config).onError)==null||y.call(g,C,this),(S=(w=K(this,Co).config).onSettled)==null||S.call(w,this.state.data,C,this),C}finally{K(this,ji)===c&&it(this,ji,void 0),this.scheduleGc()}}},og=new WeakMap,om=new WeakMap,lg=new WeakMap,Co=new WeakMap,lm=new WeakMap,ji=new WeakMap,Cv=new WeakMap,cm=new WeakMap,cl=new WeakSet,Kc=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...OX(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...cI(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return it(this,lg,t.manual?i:void 0),i;case"error":const s=t.error;
50return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Mi.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),K(this,Co).notify({query:this,type:"updated",action:t})})},QG);function OX(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:NX(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cI(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uI(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $s,En,kv,Us,um,cg,au,_v,ug,dg,dm,hm,th,hg,Gn,c1,a6,o6,l6,c6,u6,d6,h6,f6,ZG,DX=(ZG=class extends vx{constructor(t,n){super();_t(this,Gn);_t(this,$s);_t(this,En);_t(this,kv);_t(this,Us);_t(this,um);_t(this,cg);_t(this,au);_t(this,_v);_t(this,ug);_t(this,dg);_t(this,dm);_t(this,hm);_t(this,th);_t(this,hg,new Set);this.options=n,it(this,$s,t),it(this,au,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,En).addObserver(this),dI(K(this,En),this.options)?nn(this,Gn,c1).call(this):this.updateResult(),nn(this,Gn,u6).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return m6(K(this,En),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return m6(K(this,En),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,nn(this,Gn,d6).call(this),nn(this,Gn,h6).call(this),K(this,En).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,En);if(this.options=K(this,$s).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pr(this.options.enabled,K(this,En))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");nn(this,Gn,f6).call(this),K(this,En).setOptions(this.options),n._defaulted&&!QS(this.options,n)&&K(this,$s).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,En),observer:this});const i=this.hasListeners();i&&hI(K(this,En),r,this.options,n)&&nn(this,Gn,c1).call(this),this.updateResult(),i&&(K(this,En)!==r||Pr(this.options.enabled,K(this,En))!==Pr(n.enabled,K(this,En))||Pr(this.options.staleTime,K(this,En))!==Pr(n.staleTime,K(this,En)))&&nn(this,Gn,o6).call(this);const s=nn(this,Gn,l6).call(this);i&&(K(this,En)!==r||Pr(this.options.enabled,K(this,En))!==Pr(n.enabled,K(this,En))||s!==K(this,th))&&nn(this,Gn,c6).call(this,s)}getOptimisticResult(t){const n=K(this,$s).getQueryCache().build(K(this,$s),t),r=this.createResult(n,t);return QS(this.getCurrentResult(),r)||(it(this,Us,r),it(this,cg,this.options),it(this,um,K(this,En).state)),r}getCurrentResult(){return K(this,Us)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){K(this,hg).add(t)}getCurrentQuery(){return K(this,En)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,$s).defaultQueryOptions(t),r=K(this,$s).getQueryCache().build(K(this,$s),n);let i=()=>{},s;const a=new Promise(o=>{s=o,i=K(this,$s).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===r.queryHash&&r.state.data!==void 0&&(i(),o(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{const o=this.createResult(r,n);return s==null||s(o),o}).finally(()=>{i()}),a])}fetch(t){return nn(this,Gn,c1).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,Us)))}createResult(t,n){var k;const r=K(this,En),i=this.options,s=K(this,Us),a=K(this,um),o=K(this,cg),c=t!==r?t.state:K(this,kv),{state:u}=t;let d={...u},h=!1,f;if(n._optimisticResults){const _=this.hasListeners(),E=!_&&dI(t,n),A=_&&hI(t,r,n,i);(E||A)&&(d={...d,...OX(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:x}=d;f=d.data;let v=!1;if(n.placeholderData!==void 0&&f===void 0&&x==="pending"){let _;s!=null&&s.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(_=s.data,v=!0):_=typeof n.placeholderData=="function"?n.placeholderData((k=K(this,dg))==null?void 0:k.state.data,K(this,dg)):n.placeholderData,_!==void 0&&(x="success",f=r6(s==null?void 0:s.data,_,n),h=!0)}if(n.select&&f!==void 0&&!v)if(s&&f===(a==null?void 0:a.data)&&n.select===K(this,_v))f=K(this,ug);else try{it(this,_v,n.select),f=n.select(f),f=r6(s==null?void 0:s.data,f,n),it(this,ug,f),it(this,au,null)}catch(_){it(this,au,_)}else f===void 0&&it(this,au,null);K(this,au)&&(m=K(this,au),f=K(this,ug),p=Date.now(),x="error",h=!1);const g=d.fetchStatus==="fetching",y=x==="pending",w=x==="error",S=y&&g,C=f!==void 0;return{status:x,fetchStatus:d.fetchStatus,isPending:y,isSuccess:x==="success",isError:w,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdate
50Count:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:w&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&C,isStale:_M(t,n),refetch:this.refetch,isEnabled:Pr(n.enabled,t)!==!1}}updateResult(){const t=K(this,Us),n=this.createResult(K(this,En),this.options);if(it(this,um,K(this,En).state),it(this,cg,this.options),K(this,um).data!==void 0&&it(this,dg,K(this,En)),QS(n,t))return;it(this,Us,n);const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!K(this,hg).size)return!0;const o=new Set(a??K(this,hg));return this.options.throwOnError&&o.add("error"),Object.keys(K(this,Us)).some(c=>{const u=c;return K(this,Us)[u]!==t[u]&&o.has(u)})})();Mi.batch(()=>{i&&this.listeners.forEach(s=>{s(K(this,Us))}),K(this,$s).getQueryCache().notify({query:K(this,En),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&nn(this,Gn,u6).call(this)}},$s=new WeakMap,En=new WeakMap,kv=new WeakMap,Us=new WeakMap,um=new WeakMap,cg=new WeakMap,au=new WeakMap,_v=new WeakMap,ug=new WeakMap,dg=new WeakMap,dm=new WeakMap,hm=new WeakMap,th=new WeakMap,hg=new WeakMap,Gn=new WeakSet,c1=function(t){nn(this,Gn,f6).call(this);let n=K(this,En).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Hs)),n},a6=function(t){return!CM()&&Pr(this.options.enabled,K(this,En))!==!1&&_X(t)},o6=function(){nn(this,Gn,d6).call(this);const t=Pr(this.options.staleTime,K(this,En));if(K(this,Us).isStale||!nn(this,Gn,a6).call(this,t))return;const n=TX(K(this,Us).dataUpdatedAt,t)+1;it(this,dm,Kf.setTimeout(()=>{K(this,Us).isStale||this.updateResult()},n))},l6=function(){return Pr(this.options.refetchInterval,K(this,En))??!1},c6=function(t){nn(this,Gn,h6).call(this),it(this,th,t),!(K(this,th)===0||!nn(this,Gn,a6).call(this,K(this,th)))&&it(this,hm,Kf.setInterval(()=>{(this.options.refetchIntervalInBackground||kM.isFocused())&&nn(this,Gn,c1).call(this)},K(this,th)))},u6=function(){nn(this,Gn,o6).call(this),nn(this,Gn,c6).call(this,nn(this,Gn,l6).call(this))},d6=function(){K(this,dm)!==void 0&&(Kf.clearTimeout(K(this,dm)),it(this,dm,void 0))},h6=function(){K(this,hm)!==void 0&&(Kf.clearInterval(K(this,hm)),it(this,hm,void 0))},f6=function(){const t=K(this,$s).getQueryCache().build(K(this,$s),this.options);if(t===K(this,En))return;const n=K(this,En);it(this,En,t),it(this,kv,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ZG);function _pe(e,t){return Pr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pr(t.retryOnMount,e)===!1)}function dI(e,t){return _pe(e,t)||e.state.data!==void 0&&m6(e,t,t.refetchOnMount)}function m6(e,t,n){if(Pr(t.enabled,e)!==!1&&Pr(t.staleTime,e)!=="static"){const r=Pr(n,e);return r==="always"||r!==!1&&_M(e,t)}return!1}function hI(e,t,n,r){return(e!==t||Pr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&_M(e,n)}function _M(e,t){return Pr(t.enabled,e)!==!1&&e.isStaleByTime(Pr(t.staleTime,e))}var Tpe=class extends DX{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var m,p;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:s,isError:a,isRefetchError:o}=r,c=(p=(m=n.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:p.direction,u=a&&c==="forward",d=i&&c==="forward",h=a&&c==="backward",f=i&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Spe(t,n.data),hasPreviousPage:Cpe(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:f,isRefetchError:o&&!u&&!h,isRefetching:s&&!d&&!f}}},Tv,Ul,Ss,fm,Vl,Fd,JG,Epe=(JG=class extends MX{constructor(t){super();_t(this,Vl);_t(this,Tv);_t(this,Ul);_t(this,Ss);_t(this,fm);it(this,Tv,t.client),this.mutationId=t.mutationId,it(this,Ss,t.mutationCache),it(this,Ul,[]),this.state=t.state||LX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,Ul).includes(t)||(K(this,Ul).push(t),this.clearGcTimeout(),K(this,Ss).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){it(this,Ul,K(this,Ul).filter(n=>n!==t)),this.scheduleGc(),K(this,Ss).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,Ul).length||(this.state.status==="pending"?this.scheduleGc():K(this,Ss).remove(this))}continue(){var t;return((t=K(this,fm))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var o,c,u,d,h,f,m,p,x,v,g,y,w,S,C,k,_,E;const n=()=>{nn(this,Vl,Fd).call(this,{type:"continue"})},r={client:K(this,Tv),meta:this.options.meta,mutationKey:this.options.mutationKey}
50,i=it(this,fm,AX({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,j)=>{nn(this,Vl,Fd).call(this,{type:"failed",failureCount:A,error:j})},onPause:()=>{nn(this,Vl,Fd).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,Ss).canRun(this)})),s=this.state.status==="pending",a=!i.canStart();try{if(s)n();else{nn(this,Vl,Fd).call(this,{type:"pending",variables:t,isPaused:a}),K(this,Ss).config.onMutate&&await K(this,Ss).config.onMutate(t,this,r);const j=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t,r));j!==this.state.context&&nn(this,Vl,Fd).call(this,{type:"pending",context:j,variables:t,isPaused:a})}const A=await i.start();return await((d=(u=K(this,Ss).config).onSuccess)==null?void 0:d.call(u,A,t,this.state.context,this,r)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,A,t,this.state.context,r)),await((p=(m=K(this,Ss).config).onSettled)==null?void 0:p.call(m,A,null,this.state.variables,this.state.context,this,r)),await((v=(x=this.options).onSettled)==null?void 0:v.call(x,A,null,t,this.state.context,r)),nn(this,Vl,Fd).call(this,{type:"success",data:A}),A}catch(A){try{await((y=(g=K(this,Ss).config).onError)==null?void 0:y.call(g,A,t,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context,r))}catch(j){Promise.reject(j)}try{await((k=(C=K(this,Ss).config).onSettled)==null?void 0:k.call(C,void 0,A,this.state.variables,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((E=(_=this.options).onSettled)==null?void 0:E.call(_,void 0,A,t,this.state.context,r))}catch(j){Promise.reject(j)}throw nn(this,Vl,Fd).call(this,{type:"error",error:A}),A}finally{K(this,fm)===i&&it(this,fm,void 0),K(this,Ss).runNext(this)}}},Tv=new WeakMap,Ul=new WeakMap,Ss=new WeakMap,fm=new WeakMap,Vl=new WeakSet,Fd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Mi.batch(()=>{K(this,Ul).forEach(r=>{r.onMutationUpdate(t)}),K(this,Ss).notify({mutation:this,type:"updated",action:t})})},JG);function LX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ou,ul,Ev,eW,jpe=(eW=class extends vx{constructor(t={}){super();_t(this,ou);_t(this,ul);_t(this,Ev);this.config=t,it(this,ou,new Set),it(this,ul,new Map),it(this,Ev,0)}build(t,n,r){const i=new Epe({client:t,mutationCache:this,mutationId:++Iw(this,Ev)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){K(this,ou).add(t);const n=r2(t);if(typeof n=="string"){const r=K(this,ul).get(n);r?r.push(t):K(this,ul).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,ou).delete(t)){const n=r2(t);if(typeof n=="string"){const r=K(this,ul).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&K(this,ul).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=r2(t);if(typeof n=="string"){const i=(r=K(this,ul).get(n))==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=r2(t);return typeof n=="string"?((i=(r=K(this,ul).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused))==null?void 0:i.continue())??Promise.resolve():Promise.resolve()}clear(){Mi.batch(()=>{K(this,ou).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,ou).clear(),K(this,ul).clear()})}getAll(){return Array.from(K(this,ou))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>aI(n,r))}findAll(t={}){return this.getAll().filter(n=>aI(t,n))}notify(t){Mi.batch(()=>
vendor: 5,305 bytes, line 50
50{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Mi.batch(()=>Promise.all(t.map(n=>n.continue().catch(Hs))))}},ou=new WeakMap,ul=new WeakMap,Ev=new WeakMap,eW);function r2(e){var t;return(t=e.options.scope)==null?void 0:t.id}var lu,nh,Cs,cu,oc,u1,p6,tW,Npe=(tW=class extends vx{constructor(n,r){super();_t(this,oc);_t(this,lu);_t(this,nh);_t(this,Cs);_t(this,cu);it(this,lu,n),this.setOptions(r),this.bindMethods(),nn(this,oc,u1).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=K(this,lu).defaultMutationOptions(n),QS(this.options,r)||K(this,lu).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,Cs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Im(r.mutationKey)!==Im(this.options.mutationKey)?this.reset():((i=K(this,Cs))==null?void 0:i.state.status)==="pending"&&K(this,Cs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&K(this,Cs)&&(K(this,Cs).addObserver(this),nn(this,oc,u1).call(this))}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,Cs))==null||n.removeObserver(this)}onMutationUpdate(n){nn(this,oc,u1).call(this),nn(this,oc,p6).call(this,n)}getCurrentResult(){return K(this,nh)}reset(){var n;(n=K(this,Cs))==null||n.removeObserver(this),it(this,Cs,void 0),nn(this,oc,u1).call(this),nn(this,oc,p6).call(this)}mutate(n,r){var i;return it(this,cu,r),(i=K(this,Cs))==null||i.removeObserver(this),it(this,Cs,K(this,lu).getMutationCache().build(K(this,lu),this.options)),K(this,Cs).addObserver(this),K(this,Cs).execute(n)}},lu=new WeakMap,nh=new WeakMap,Cs=new WeakMap,cu=new WeakMap,oc=new WeakSet,u1=function(){var r;const n=((r=K(this,Cs))==null?void 0:r.state)??LX();it(this,nh,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},p6=function(n){Mi.batch(()=>{var r,i,s,a,o,c,u,d;if(K(this,cu)&&this.hasListeners()){const h=K(this,nh).variables,f=K(this,nh).context,m={client:K(this,lu),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=K(this,cu)).onSuccess)==null||i.call(r,n.data,h,f,m)}catch(p){Promise.reject(p)}try{(a=(s=K(this,cu)).onSettled)==null||a.call(s,n.data,null,h,f,m)}catch(p){Promise.reject(p)}}else if((n==null?void 0:n.type)==="error"){try{(c=(o=K(this,cu)).onError)==null||c.call(o,n.error,h,f,m)}catch(p){Promise.reject(p)}try{(d=(u=K(this,cu)).onSettled)==null||d.call(u,void 0,n.error,h,f,m)}catch(p){Promise.reject(p)}}}this.listeners.forEach(h=>{h(K(this,nh))})})},tW),Hl,nW,Ape=(nW=class extends vx{constructor(t={}){super();_t(this,Hl);this.config=t,it(this,Hl,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??vM(i,n);let a=this.get(s);return a||(a=new kpe({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){K(this,Hl).has(t.queryHash)||(K(this,Hl).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){K(this,Hl).get(t.queryHash)===t&&(t.destroy(),K(this,Hl).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Mi.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,Hl).get(t)}getAll(){return[...K(this,Hl).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>sI(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>sI(t,r)):n}notify(t){Mi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Mi.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Mi.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Hl=new WeakMap,nW),$r,rh,ih,fg,mg,sh,pg,gg,rW,Mpe=(rW=class{constructor(e={}){_t(this,$r);_t(this,rh);_t(this,ih);_t(this,fg);_t(this,mg);_t(this,sh);_t(this,pg);_t(this,gg);it(this,$r,e.queryCache||new Ape),it(this,rh,e.mutationCache||new jpe),it(this,ih,e.defaultOptions||{}),it(this,fg,new Map),it(this,mg,new Map),it(this,sh,0)}mount(){Iw(this,sh)._++,K(this,sh)===1&&(it(this,pg,kM.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,$r).onFocus())})),it(this,gg,a4.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,$r).onOnline())})))}unmount(){var e,t;Iw(this,sh)._--,K(this,sh)===0&&((e=K(this,pg))==null||e.call(this),it(this,pg,void 0),(t=K(this,gg))==null||t.call(this),it(this,gg,void 0))}isFetching(e){return K(this,$r).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,rh).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,$r).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,$r).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return K(this,$r).findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){var a;const r=this.defaultQueryOptions({queryKey:e}),i=(a=K(this,$r).get(r.queryHash))==null?void 0:a.state.data,s=cpe(t,i);if(s!==void 0)return K(this,$r).build(this,r).setData(s,{...n,manual:!0})}
50setQueriesData(e,t,n){return Mi.batch(()=>K(this,$r).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,$r).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,$r);Mi.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,$r);return Mi.batch(()=>{const r=n.findAll(e),i=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:s=>i.has(s)},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=Mi.batch(()=>K(this,$r).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Hs).catch(Hs)}invalidateQueries(e,t={}){return Mi.batch(()=>(K(this,$r).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Mi.batch(()=>K(this,$r).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Hs)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Hs)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,$r).build(this,t),r=n.isStaleByTime(Pr(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,$r).build(this,t);return n.isStaleByTime(Pr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Hs).catch(Hs)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Hs).catch(Hs)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return a4.isOnline()?K(this,rh).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,$r)}getMutationCache(){return K(this,rh)}getDefaultOptions(){return K(this,ih)}setDefaultOptions(e){it(this,ih,e)}setQueryDefaults(e,t){K(this,fg).set(Im(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,fg).values()],n={};return t.forEach(r=>{Ag(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,mg).set(Im(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,mg).values()],n={};return t.forEach(r=>{Ag(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,ih).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vM(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===wM&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,ih).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,$r).clear(),K(this,rh).clear()}},$r=new WeakMap,rh=new WeakMap,ih=new WeakMap,fg=new WeakMap,mg=new WeakMap,sh=new WeakMap,pg=new WeakMap,gg=new WeakMap,rW);const PX=b.createContext(!1),Rpe=()=>b.useContext(PX);PX.Provider;function Ope(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Dpe=b.createContext(Ope()),Lpe=()=>b.useContext(Dpe),Ppe=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?SM(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ipe=e=>{b.useEffect(()=>{e.clearReset()},[e])},Fpe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||SM(n,[e.error,r])),Bpe=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zpe=(e,t)=>
50(e==null?void 0:e.suspense)&&t.isPending,$pe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function IX(e,t,n){const r=Rpe(),i=Lpe(),s=Tt(),a=s.defaultQueryOptions(e),o=s.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,Bpe(a),Ppe(a,i,o),Ipe(i);const[u]=b.useState(()=>new t(s,a)),d=u.getOptimisticResult(a),h=!r&&c;if(b.useSyncExternalStore(b.useCallback(f=>{const m=h?u.subscribe(Mi.batchCalls(f)):Hs;return u.updateResult(),m},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(a)},[a,u]),zpe(a,d))throw $pe(a,u,i);if(Fpe({result:d,errorResetBoundary:i,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function At(e,t){return IX(e,DX)}function rt(e,t){const n=Tt(),[r]=b.useState(()=>new Npe(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const i=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(Mi.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=b.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Hs)},[r]);if(i.error&&SM(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function TM(e,t){return IX(e,Tpe)}/** 51 * @remix-run/router v1.23.4 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function jr(){return jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jr.apply(null,arguments)}var di;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(di||(di={}));const fI="popstate";function Upe(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:a,hash:o}=r.location;return Ab("",{pathname:s,search:a,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Fm(i)}return Hpe(t,n,null,e)}function dn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Mg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Vpe(){return Math.random().toString(36).substr(2,8)}function mI(e,t){return{usr:e.state,key:e.key,idx:t}}function Ab(e,t,n,r){return n===void 0&&(n=null),jr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?af(t):t,{state:n,key:t&&t.key||r||Vpe()})}function Fm(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 af(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Hpe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,o=di.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(jr({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){o=di.Pop;let v=d(),g=v==null?null:v-u;u=v,c&&c({action:o,location:x.location,delta:g})}function f(v,g){o=di.Push;let y=Ab(x.location,v,g);u=d()+1;let w=mI(y,u),S=x.createHref(y);try{a.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&c&&c({action:o,location:x.location,delta:1})}function m(v,g){o=di.Replace;let y=Ab(x.location,v,g);u=d();let w=mI(y,u),S=x.createHref(y);a.replaceState(w,"",S),s&&c&&c({action:o,location:x.location,delta:0})}function p(v){let g=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof v=="string"?v:Fm(v);return y=y.replace(/ $/,"%20"),dn(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let x={get action(){return o},get location(){return e(i,a)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(fI,h),c=v,()=>{i.removeEventListener(fI,h),c=null}},createHref(v){return t(i,v)},createURL:p,encodeLocation(v){let g=p(v);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:m,go(v){return a.go(v)}};return x}var rr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rr||(rr={}));
vendor: 60,252 bytes, lines 59-78
59const qpe=new Set(["lazy","caseSensitive","path","id","index","children"]);function Gpe(e){return e.index===!0}function o4(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,s)=>{let a=[...n,String(s)],o=typeof i.id=="string"?i.id:a.join("-");if(dn(i.index!==!0||!i.children,"Cannot specify children on an index route"),dn(!r[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),Gpe(i)){let c=jr({},i,t(i),{id:o});return r[o]=c,c}else{let c=jr({},i,t(i),{id:o,children:void 0});return r[o]=c,i.children&&(c.children=o4(i.children,t,a,r)),c}})}function zf(e,t,n){return n===void 0&&(n="/"),ZS(e,t,n,!1)}function ZS(e,t,n,r){let i=typeof t=="string"?af(t):t,s=Fu(i.pathname||"/",n);if(s==null)return null;let a=FX(e);Ype(a);let o=null,c=s0e(s);for(let u=0;o==null&&u<a.length;++u)o=r0e(a[u],c,r);return o}function Wpe(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function FX(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,a,o)=>{let c={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(dn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=yu([r,c.relativePath]),d=n.concat(c);s.children&&s.children.length>0&&(dn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),FX(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:t0e(u,s.index),routesMeta:d})};return e.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let c of BX(s.path))i(s,a,c)}),t}function BX(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=BX(r.join("/")),o=[];return o.push(...a.map(c=>c===""?s:[s,c].join("/"))),i&&o.push(...a),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function Ype(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:n0e(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Kpe=/^:[\w-]+$/,Xpe=3,Qpe=2,Zpe=1,Jpe=10,e0e=-2,pI=e=>e==="*";function t0e(e,t){let n=e.split("/"),r=n.length;return n.some(pI)&&(r+=e0e),t&&(r+=Qpe),n.filter(i=>!pI(i)).reduce((i,s)=>i+(Kpe.test(s)?Xpe:s===""?Zpe:Jpe),r)}function n0e(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function r0e(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},s="/",a=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",h=l4({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=l4({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;Object.assign(i,h.params),a.push({params:i,pathname:yu([s,h.pathname]),pathnameBase:o0e(yu([s,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(s=yu([s,h.pathnameBase]))}return a}function l4(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=i0e(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let x=o[h]||"";a=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const p=o[h];return m&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function i0e(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Mg(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function s0e(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Mg(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Fu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function a0e(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?af(e):e,s;return n?(n=EM(n),n.startsWith("/")?s=gI(n.substring(1),"/"):s=gI(n,t)):s=t,{pathname:s,search:l0e(r),hash:c0e(i)}}function gI(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function tT(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function zX(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mk(e,t){let n=zX(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function pk(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=af(e):(i=jr({},e),dn(!i.pathname||!i.pathname.includes("?"),tT("?","pathname","search",i)),dn(!i.pathname||!i.pathname.includes("#"),tT("#","pathname","hash",i)),dn(!i.search||!i.search.includes("#"),tT("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}o=h>=0?t[h]:"/"}let c=a0e(i,o),u=a&&a!=="/"&&a.endsWith("/"),d=(s||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const EM=e=>e.replace(/\/\/+/g,"/"),yu=e=>EM(e.join("/")),o0e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),l0e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,c0e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,c4=function(t,n){n===void 0&&(n=302);let r=n;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let i=new Headers(r.headers);return i.set("Location",t),new Response(null,jr({},r,{headers:i}))};class u4{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Rg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $X=["post","put","patch","delete"],u0e=new Set($X),d0e=["get",...$X],h0e=new Set(d0e),f0e=new Set([301,302,303,307,308]),m0e=new Set([307,308]),nT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},p0e={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sy={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,g0e=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),UX="remix-router-transitions";function x0e(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;dn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let Z=e.detectErrorBoundary;i=oe=>({hasErrorBoundary:Z(oe)})}else i=g0e;let s={},a=o4(e.routes,i,void 0,s),o,c=e.basename||"/",u=e.dataStrategy||w0e,d=e.patchRoutesOnNavigation,h=jr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,m=new Set,p=null,x=null,v=null,g=e.hydrationData!=null,y=zf(a,e.history.location,c),w=!1,S=null;if(y==null&&!d){let Z=ca(404,{pathname:e.history.location.pathname}),{matches:oe,route:pe}=EI(a);y=oe,S={[pe.id]:Z}}y&&!e.hydrationData&&Lt(y,a,e.history.location.pathname).active&&(y=null);let C;if(y)if(y.some(Z=>Z.route.lazy))C=!1;else if(!y.some(Z=>Z.route.loader))C=!0;else if(h.v7_partialHydration){let Z=e.hydrationData?e.hydrationData.loaderData:null,oe=e.hydrationData?e.hydrationData.errors:null;if(oe){let pe=y.findIndex(Le=>oe[Le.route.id]!==void 0);C=y.slice(0,pe+1).every(Le=>!x6(Le.route,Z,oe))}else C=y.every(pe=>!x6(pe.route,Z,oe))}else C=e.hydrationData!=null;else if(C=!1,y=[],h.v7_partialHydration){let Z=Lt(null,a,e.history.location.pathname);Z.active&&Z.matches&&(w=!0,y=Z.matches)}let k,_={historyAction:e.history.action,location:e.history.location,matches:y,initialized:C,navigation:nT,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},E=di.Pop,A=!1,j,D=!1,M=new Map,$=null,B=!1,z=!1,O=[],P=new Set,I=new Map,q=0,R=-1,xe=new Map,me=new Set,U=new Map,ae=new Map,Ce=new Set,je=new Map,ve=new Map,Te;function Se(){if(f=e.history.listen(Z=>{let{action:oe,location:pe,delta:Le}=Z;if(Te){Te(),Te=void 0;return}Mg(ve.size===0||Le!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let qe=ye({currentLocation:_.location,nextLocation:pe,historyAction:oe});if(qe&&Le!=null){let xt=new Promise(Bt=>{Te=Bt});e.history.go(Le*-1),W(qe,{state:"blocked",location:pe,proceed(){W(qe,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),xt.then(()=>e.history.go(Le))},reset(){let Bt=new Map(_.blockers);Bt.set(qe,Sy),we({blockers:Bt})}});return}return mt(oe,pe)}),n){L0e(t,M);let Z=()=>P0e(t,M);t.addEventListener("pagehide",Z),$=()=>t.removeEventListener("pagehide",Z)}return _.initialized||mt(di.Pop,_.location,{initialHydration:!0}),k}function He(){f&&f(),$&&$(),m.clear(),j&&j.abort(),_.fetchers.forEach((Z,oe)=>yn(oe)),_.blockers.forEach((Z,oe)=>te(oe))}function tt(Z){return m.add(Z),()=>m.delete(Z)}function we(Z,oe){oe===void 0&&(oe={}),_=jr({},_,Z);let pe=[],Le=[];h.v7_fetcherPersist&&_.fetchers.forEach((qe,xt)=>{qe.state==="idle"&&(Ce.has(xt)?Le.push(xt):pe.push(xt))}),Ce.forEach(qe=>{!_.fetchers.has(qe)&&!I.has(qe)&&Le.push(qe)}),[...m].forEach(qe=>qe(_,{deletedFetchers:Le,viewTransitionOpts:oe.viewTransitionOpts,flushSync:oe.flushSync===!0})),h.v7_fetcherPersist?(pe.forEach(qe=>_.fetchers.delete(qe)),Le.forEach(qe=>yn(qe))):Le.forEach(qe=>Ce.delete(qe))}function Oe(Z,oe,pe){var Le,qe;let{flushSync:xt}=pe===void 0?{}:pe,Bt=_.actionData!=null&&_.navigation.formMethod!=null&&hl(_.navigation.formMethod)&&_.navigation.state==="loading"&&((Le=Z.state)==null?void 0:Le._isRedirect)!==!0,pt;oe.actionData?Object.keys(oe.actionData).length>0?pt=oe.actionData:pt=null:Bt?pt=_.actionData:pt=null;let yt=oe.loaderData?_I(_.loaderData,oe.loaderData,oe.matches||[],oe.errors):_.loaderData,dt=_.blockers;dt.size>0&&(dt=new Map(dt),dt.forEach((Et,Or)=>dt.set(Or,Sy)));let wt=A===!0||_.navigation.formMethod!=null&&hl(_.navigation.formMethod)&&((qe=Z.state)==null?void 0:qe._isRedirect)!==!0;o&&(a=o,o=void 0),B||E===di.Pop||(E===di.Push?e.history.push(Z,Z.state):E===di.Replace&&e.history.replace(Z,Z.state));let tn;if(E===di.Pop){let Et=M.get(_.location.pathname);Et&&Et.has(Z.pathname)?tn={currentLocation:_.location,nextLocation:Z}:M.has(Z.pathname)&&(tn={currentLocation:Z,nextLocation:_.location})}else if(D){let Et=M.get(_.location.pathname);Et?Et.add(Z.pathname):(Et=new Set([Z.pathname]),M.set(_.location.pathname,Et)),tn={currentLocation:_.location,nextLocation:Z}}we(jr({},oe,{actionData:pt,loaderData:yt,historyAction:E,location:Z,initialized:!0,navigation:nT,revalidation:"idle",restoreScrollPosition:Fe(Z,oe.matches||_.matches),preventScrollReset:wt,blockers:dt}),{viewTransitionOpts:tn,flushSync:xt===!0}),E=di.Pop,A=!1,D=!1,B=!1,z=!1,O=[]}async function Je(Z,oe){if(typeof Z=="number"){e.history.go(Z);return}let pe=g6(_.location,_.matches,c,h.v7_prependBasename,Z,h.v7_relativeSplatPath,oe==null?void 0:oe.fromRouteId,oe==null?void 0:oe.relative),{path:Le,submission:qe,error:xt}=xI(h.v7_normalizeFormMethod,!1,pe,oe),Bt=_.location,pt=Ab(_.location,Le,oe&&oe.state);pt=jr({},pt,e.history.encodeLocation(pt));let yt=oe&&oe.replace!=null?oe.replace:void 0,dt=di.Push;yt===!0?dt=di.Replace:yt===!1||qe!=null&&hl(qe.formMethod)&&qe.formAction===_.location.pathname+_.location.search&&(dt=di.Replace);let wt=oe&&"preventScrollReset"in oe?oe.preventScrollReset===!0:void 0,tn=(oe&&oe.flushSync)===!0,Et=ye({currentLocation:Bt,nextLocation:pt,historyAction:dt});if(Et){W(Et,{state:"blocked",location:pt,proceed(){W(Et,{state:"proceeding",proceed:void 0,reset:void 0,location:pt}),Je(Z,oe)},reset(){let Or=new Map(_.blockers);Or.set(Et,Sy),we({blockers:Or})}});return}return await mt(dt,pt,{submission:qe,pendingError:xt,preventScrollReset:wt,replace:oe&&oe.replace,enableViewTransition:oe&&oe.viewTransition,flushSync:tn})}function It(){if(ge(),we({revalidation:"loading"}),_.navigation.state!=="submitting"){if(_.navigation.state==="idle"){mt(_.historyAction,_.location,{startUninterruptedRevalidation:!0});return}mt(E||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:D===!0})}}async function mt(Z,oe,pe){j&&j.abort(),j=null,E=Z,B=(pe&&pe.startUninterruptedRevalidation)===!0,et(_.location,_.matches),A=(pe&&pe.preventScrollReset)===!0,D=(pe&&pe.enableViewTransition)===!0;let Le=o||a,qe=pe&&pe.overrideNavigation,xt=pe!=null&&pe.initialHydration&&_.matches&&_.matches.length>0&&!w?_.matches:zf(Le,oe,c),Bt=(pe&&pe.flushSync)===!0;if(xt&&_.initialized&&!z&&E0e(_.location,oe)&&!(pe&&pe.submission&&hl(pe.submission.formMethod))){Oe(oe,{matches:xt},{flushSync:Bt});return}let pt=Lt(xt,Le,oe.pathname);if(pt.active&&pt.matches&&(xt=pt.matches),!xt){let{error:lr,notFoundMatches:An,route:xr}=fe(oe.pathname);Oe(oe,{matches:An,loaderData:{},errors:{[xr.id]:lr}},{flushSync:Bt});return}j=new AbortController;let yt=Rp(e.history,oe,j.signal,pe&&pe.submission),dt;if(pe&&pe.pendingError)dt=[$f(xt).route.id,{type:rr.error,error:pe.pendingError}];else if(pe&&pe.submission&&hl(pe.submission.formMethod)){let lr=await De(yt,oe,pe.submission,xt,pt.active,{replace:pe.replace,flushSync:Bt});if(lr.shortCircuited)return;if(lr.pendingActionResult){let[An,xr]=lr.pendingActionResult;if(qa(xr)&&Rg(xr.error)&&xr.error.status===404){j=null,Oe(oe,{matches:lr.matches,loaderData:{},errors:{[An]:xr.error}});return}}xt=lr.matches||xt,dt=lr.pendingActionResult,qe=rT(oe,pe.submission),Bt=!1,pt.active=!1,yt=Rp(e.history,yt.url,yt.signal)}let{shortCircuited:wt,matches:tn,loaderData:Et,errors:Or}=await Pe(yt,oe,xt,pt.active,qe,pe&&pe.submission,pe&&pe.fetcherSubmission,pe&&pe.replace,pe&&pe.initialHydration===!0,Bt,dt);wt||(j=null,Oe(oe,jr({matches:tn||xt},TI(dt),{loaderData:Et,errors:Or})))}async function De(Z,oe,pe,Le,qe,xt){xt===void 0&&(xt={}),ge();let Bt=O0e(oe,pe);if(we({navigation:Bt},{flushSync:xt.flushSync===!0}),qe){let dt=await Ft(Le,oe.pathname,Z.signal);if(dt.type==="aborted")return{shortCircuited:!0};if(dt.type==="error"){let wt=$f(dt.partialMatches).route.id;return{matches:dt.partialMatches,pendingActionResult:[wt,{type:rr.error,error:dt.error}]}}else if(dt.matches)Le=dt.matches;else{let{notFoundMatches:wt,error:tn,route:Et}=fe(oe.pathname);return{matches:wt,pendingActionResult:[Et.id,{type:rr.error,error:tn}]}}}let pt,yt=d1(Le,oe);if(!yt.route.action&&!yt.route.lazy)pt={type:rr.error,error:ca(405,{method:Z.method,pathname:oe.pathname,routeId:yt.route.id})};else if(pt=(await zr("action",_,Z,[yt],Le,null))[yt.route.id],Z.signal.aborted)return{shortCircuited:!0};if(Xf(pt)){let dt;return xt&&xt.replace!=null?dt=xt.replace:dt=SI(pt.response.headers.get("Location"),new URL(Z.url),c,e.history)===_.location.pathname+_.location.search,await Sn(Z,pt,!0,{submission:pe,replace:dt}),{shortCircuited:!0}}if(hh(pt))throw ca(400,{type:"defer-action"});if(qa(pt)){let dt=$f(Le,yt.route.id);return(xt&&xt.replace)!==!0&&(E=di.Push),{matches:Le,pendingActionResult:[dt.route.id,pt]}}return{matches:Le,pendingActionResult:[yt.route.id,pt]}}async function Pe(Z,oe,pe,Le,qe,xt,Bt,pt,yt,dt,wt){let tn=qe||rT(oe,xt),Et=xt||Bt||NI(tn),Or=!B&&(!h.v7_partialHydration||!yt);if(Le){if(Or){let Dr=ct(wt);we(jr({navigation:tn},Dr!==void 0?{actionData:Dr}:{}),{flushSync:dt})}let cn=await Ft(pe,oe.pathname,Z.signal);if(cn.type==="aborted")return{shortCircuited:!0};if(cn.type==="error"){let Dr=$f(cn.partialMatches).route.id;return{matches:cn.partialMatches,loaderData:{},errors:{[Dr]:cn.error}}}else if(cn.matches)pe=cn.matches;else{let{error:Dr,notFoundMatches:nl,route:wd}=fe(oe.pathname);return{matches:nl,loaderData:{},errors:{[wd.id]:Dr}}}}let lr=o||a,[An,xr]=bI(e.history,_,pe,Et,oe,h.v7_partialHydration&&yt===!0,h.v7_skipActionErrorRevalidation,z,O,P,Ce,U,me,lr,c,wt);if(Ne(cn=>!(pe&&pe.some(Dr=>Dr.route.id===cn))||An&&An.some(Dr=>Dr.route.id===cn)),R=++q,An.length===0&&xr.length===0){let cn=Ei();return Oe(oe,jr({matches:pe,loaderData:{},errors:wt&&qa(wt[1])?{[wt[0]]:wt[1].error}:null},TI(wt),cn?{fetchers:new Map(_.fetchers)}:{}),{flushSync:dt}),{shortCircuited:!0}}if(Or){let cn={};if(!Le){cn.navigation=tn;let Dr=ct(wt);Dr!==void 0&&(cn.actionData=Dr)}xr.length>0&&(cn.fetchers=Tn(xr)),we(cn,{flushSync:dt})}xr.forEach(cn=>{en(cn.key),cn.controller&&I.set(cn.key,cn.controller)});let Fc=()=>xr.forEach(cn=>en(cn.key));j&&j.signal.addEventListener("abort",Fc);let{loaderResults:vd,fetcherResults:tl}=await or(_,pe,An,xr,Z);if(Z.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",Fc),xr.forEach(cn=>I.delete(cn.key));let po=i2(vd);if(po)return await Sn(Z,po.result,!0,{replace:pt}),{shortCircuited:!0};if(po=i2(tl),po)return me.add(po.key),await Sn(Z,po.result,!0,{replace:pt}),{shortCircuited:!0};let{loaderData:fy,errors:vf}=kI(_,pe,vd,wt,xr,tl,je);je.forEach((cn,Dr)=>{cn.subscribe(nl=>{(nl||cn.done)&&je.delete(Dr)})}),h.v7_partialHydration&&yt&&_.errors&&(vf=jr({},_.errors,vf));let xs=Ei(),wf=li(R),Bc=xs||wf||xr.length>0;return jr({matches:pe,loaderData:fy,errors:vf},Bc?{fetchers:new Map(_.fetchers)}:{})}function ct(Z){if(Z&&!qa(Z[1]))return{[Z[0]]:Z[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function Tn(Z){return Z.forEach(oe=>{let pe=_.fetchers.get(oe.key),Le=Cy(void 0,pe?pe.data:void 0);_.fetchers.set(oe.key,Le)}),new Map(_.fetchers)}function Nn(Z,oe,pe,Le){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");en(Z);let qe=(Le&&Le.flushSync)===!0,xt=o||a,Bt=g6(_.location,_.matches,c,h.v7_prependBasename,pe,h.v7_relativeSplatPath,oe,Le==null?void 0:Le.relative),pt=zf(xt,Bt,c),yt=Lt(pt,xt,Bt);if(yt.active&&yt.matches&&(pt=yt.matches),!pt){ut(Z,oe,ca(404,{pathname:Bt}),{flushSync:qe});return}let{path:dt,submission:wt,error:tn}=xI(h.v7_normalizeFormMethod,!0,Bt,Le);if(tn){ut(Z,oe,tn,{flushSync:qe});return}let Et=d1(pt,dt),Or=(Le&&Le.preventScrollReset)===!0;if(wt&&hl(wt.formMethod)){ln(Z,oe,dt,Et,pt,yt.active,qe,Or,wt);return}U.set(Z,{routeId:oe,path:dt}),Bn(Z,oe,dt,Et,pt,yt.active,qe,Or,wt)}async function ln(Z,oe,pe,Le,qe,xt,Bt,pt,yt){ge(),U.delete(Z);function dt(Yr){if(!Yr.route.action&&!Yr.route.lazy){let zc=ca(405,{method:yt.formMethod,pathname:pe,routeId:oe});return ut(Z,oe,zc,{flushSync:Bt}),!0}return!1}if(!xt&&dt(Le))return;let wt=_.fetchers.get(Z);Me(Z,D0e(yt,wt),{flushSync:Bt});let tn=new AbortController,Et=Rp(e.history,pe,tn.signal,yt);if(xt){let Yr=await Ft(qe,new URL(Et.url).pathname,Et.signal,Z);if(Yr.type==="aborted")return;if(Yr.type==="error"){ut(Z,oe,Yr.error,{flushSync:Bt});return}else if(Yr.matches){if(qe=Yr.matches,Le=d1(qe,pe),dt(Le))return}else{ut(Z,oe,ca(404,{pathname:pe}),{flushSync:Bt});return}}I.set(Z,tn);let Or=q,An=(await zr("action",_,Et,[Le],qe,Z))[Le.route.id];if(Et.signal.aborted){I.get(Z)===tn&&I.delete(Z);return}if(h.v7_fetcherPersist&&Ce.has(Z)){if(Xf(An)||qa(An)){Me(Z,Bd(void 0));return}}else{if(Xf(An))if(I.delete(Z),R>Or){Me(Z,Bd(void 0));return}else return me.add(Z),Me(Z,Cy(yt)),Sn(Et,An,!1,{fetcherSubmission:yt,preventScrollReset:pt});if(qa(An)){ut(Z,oe,An.error);return}}if(hh(An))throw ca(400,{type:"defer-action"});let xr=_.navigation.location||_.location,Fc=Rp(e.history,xr,tn.signal),vd=o||a,tl=_.navigation.state!=="idle"?zf(vd,_.navigation.location,c):_.matches;dn(tl,"Didn't find any matches after fetcher action");let po=++q;xe.set(Z,po);let fy=Cy(yt,An.data);_.fetchers.set(Z,fy);let[vf,xs]=bI(e.history,_,tl,yt,xr,!1,h.v7_skipActionErrorRevalidation,z,O,P,Ce,U,me,vd,c,[Le.route.id,An]);xs.filter(Yr=>Yr.key!==Z).forEach(Yr=>{let zc=Yr.key,my=_.fetchers.get(zc),Tp=Cy(void 0,my?my.data:void 0);_.fetchers.set(zc,Tp),en(zc),Yr.controller&&I.set(zc,Yr.controller)}),we({fetchers:new Map(_.fetchers)});let wf=()=>xs.forEach(Yr=>en(Yr.key));tn.signal.addEventListener("abort",wf);let{loaderResults:Bc,fetcherResults:cn}=await or(_,tl,vf,xs,Fc);if(tn.signal.aborted)return;tn.signal.removeEventListener("abort",wf),xe.delete(Z),I.delete(Z),xs.forEach(Yr=>I.delete(Yr.key));let Dr=i2(Bc);if(Dr)return Sn(Fc,Dr.result,!1,{preventScrollReset:pt});if(Dr=i2(cn),Dr)return me.add(Dr.key),Sn(Fc,Dr.result,!1,{preventScrollReset:pt});let{loaderData:nl,errors:wd}=kI(_,tl,Bc,void 0,xs,cn,je);if(_.fetchers.has(Z)){let Yr=Bd(An.data);_.fetchers.set(Z,Yr)}li(po),_.navigation.state==="loading"&&po>R?(dn(E,"Expected pending action"),j&&j.abort(),Oe(_.navigation.location,{matches:tl,loaderData:nl,errors:wd,fetchers:new Map(_.fetchers)})):(we({errors:wd,loaderData:_I(_.loaderData,nl,tl,wd),fetchers:new Map(_.fetchers)}),z=!1)}async function Bn(Z,oe,pe,Le,qe,xt,Bt,pt,yt){let dt=_.fetchers.get(Z);Me(Z,Cy(yt,dt?dt.data:void 0),{flushSync:Bt});let wt=new AbortController,tn=Rp(e.history,pe,wt.signal);if(xt){let An=await Ft(qe,new URL(tn.url).pathname,tn.signal,Z);if(An.type==="aborted")return;if(An.type==="error"){ut(Z,oe,An.error,{flushSync:Bt});return}else if(An.matches)qe=An.matches,Le=d1(qe,pe);else{ut(Z,oe,ca(404,{pathname:pe}),{flushSync:Bt});return}}I.set(Z,wt);let Et=q,lr=(await zr("loader",_,tn,[Le],qe,Z))[Le.route.id];if(hh(lr)&&(lr=await NM(lr,tn.signal,!0)||lr),I.get(Z)===wt&&I.delete(Z),!tn.signal.aborted){if(Ce.has(Z)){Me(Z,Bd(void 0));return}if(Xf(lr))if(R>Et){Me(Z,Bd(void 0));return}else{me.add(Z),await Sn(tn,lr,!1,{preventScrollReset:pt});return}if(qa(lr)){ut(Z,oe,lr.error);return}dn(!hh(lr),"Unhandled fetcher deferred data"),Me(Z,Bd(lr.data))}}async function Sn(Z,oe,pe,Le){let{submission:qe,fetcherSubmission:xt,preventScrollReset:Bt,replace:pt}=Le===void 0?{}:Le;oe.response.headers.has("X-Remix-Revalidate")&&(z=!0);let yt=oe.response.headers.get("Location");dn(yt,"Expected a Location header on the redirect Response"),yt=SI(yt,new URL(Z.url),c,e.history);let dt=Ab(_.location,yt,{_isRedirect:!0});if(n){let An=!1;if(oe.response.headers.has("X-Remix-Reload-Document"))An=!0;else if(jM.test(yt)){const xr=e.history.createURL(yt);An=xr.origin!==t.location.origin||Fu(xr.pathname,c)==null}if(An){pt?t.location.replace(yt):t.location.assign(yt);return}}j=null;let wt=pt===!0||oe.response.headers.has("X-Remix-Replace")?di.Replace:di.Push,{formMethod:tn,formAction:Et,formEncType:Or}=_.navigation;!qe&&!xt&&tn&&Et&&Or&&(qe=NI(_.navigation));let lr=qe||xt;if(m0e.has(oe.response.status)&&lr&&hl(lr.formMethod))await mt(wt,dt,{submission:jr({},lr,{formAction:yt}),preventScrollReset:Bt||A,enableViewTransition:pe?D:void 0});else{let An=rT(dt,qe);await mt(wt,dt,{overrideNavigation:An,fetcherSubmission:xt,preventScrollReset:Bt||A,enableViewTransition:pe?D:void 0})}}async function zr(Z,oe,pe,Le,qe,xt){let Bt,pt={};try{Bt=await S0e(u,Z,oe,pe,Le,qe,xt,s,i)}catch(yt){return Le.forEach(dt=>{pt[dt.route.id]={type:rr.error,error:yt}}),pt}for(let[yt,dt]of Object.entries(Bt))if(j0e(dt)){let wt=dt.result;pt[yt]={type:rr.redirect,response:_0e(wt,pe,yt,qe,c,h.v7_relativeSplatPath)}}else pt[yt]=await k0e(dt);return pt}async function or(Z,oe,pe,Le,qe){let xt=Z.matches,Bt=zr("loader",Z,qe,pe,oe,null),pt=Promise.all(Le.map(async wt=>{if(wt.matches&&wt.match&&wt.controller){let Et=(await zr("loader",Z,Rp(e.history,wt.path,wt.controller.signal),[wt.match],wt.matches,wt.key))[wt.match.route.id];return{[wt.key]:Et}}else return Promise.resolve({[wt.key]:{type:rr.error,error:ca(404,{pathname:wt.path})}})})),yt=await Bt,dt=(await pt).reduce((wt,tn)=>Object.assign(wt,tn),{});return await Promise.all([M0e(oe,yt,qe.signal,xt,Z.loaderData),R0e(oe,dt,Le)]),{loaderResults:yt,fetcherResults:dt}}function ge(){z=!0,O.push(...Ne()),U.forEach((Z,oe)=>{I.has(oe)&&P.add(oe),en(oe)})}function Me(Z,oe,pe){pe===void 0&&(pe={}),_.fetchers.set(Z,oe),we({fetchers:new Map(_.fetchers)},{flushSync:(pe&&pe.flushSync)===!0})}function ut(Z,oe,pe,Le){Le===void 0&&(Le={});let qe=$f(_.matches,oe);yn(Z),we({errors:{[qe.route.id]:pe},fetchers:new Map(_.fetchers)},{flushSync:(Le&&Le.flushSync)===!0})}function Ct(Z){return ae.set(Z,(ae.get(Z)||0)+1),Ce.has(Z)&&Ce.delete(Z),_.fetchers.get(Z)||p0e}function yn(Z){let oe=_.fetchers.get(Z);I.has(Z)&&!(oe&&oe.state==="loading"&&xe.has(Z))&&en(Z),U.delete(Z),xe.delete(Z),me.delete(Z),h.v7_fetcherPersist&&Ce.delete(Z),P.delete(Z),_.fetchers.delete(Z)}function un(Z){let oe=(ae.get(Z)||0)-1;oe<=0?(ae.delete(Z),Ce.add(Z),h.v7_fetcherPersist||yn(Z)):ae.set(Z,oe),we({fetchers:new Map(_.fetchers)})}function en(Z){let oe=I.get(Z);oe&&(oe.abort(),I.delete(Z))}function Rr(Z){for(let oe of Z){let pe=Ct(oe),Le=Bd(pe.data);_.fetchers.set(oe,Le)}}function Ei(){let Z=[],oe=!1;for(let pe of me){let Le=_.fetchers.get(pe);dn(Le,"Expected fetcher: "+pe),Le.state==="loading"&&(me.delete(pe),Z.push(pe),oe=!0)}return Rr(Z),oe}function li(Z){let oe=[];for(let[pe,Le]of xe)if(Le<Z){let qe=_.fetchers.get(pe);dn(qe,"Expected fetcher: "+pe),qe.state==="loading"&&(en(pe),xe.delete(pe),oe.push(pe))}return Rr(oe),oe.length>0}function V(Z,oe){let pe=_.blockers.get(Z)||Sy;return ve.get(Z)!==oe&&ve.set(Z,oe),pe}function te(Z){_.blockers.delete(Z),ve.delete(Z)}function W(Z,oe){let pe=_.blockers.get(Z)||Sy;dn(pe.state==="unblocked"&&oe.state==="blocked"||pe.state==="blocked"&&oe.state==="blocked"||pe.state==="blocked"&&oe.state==="proceeding"||pe.state==="blocked"&&oe.state==="unblocked"||pe.state==="proceeding"&&oe.state==="unblocked","Invalid blocker state transition: "+pe.state+" -> "+oe.state);let Le=new Map(_.blockers);Le.set(Z,oe),we({blockers:Le})}function ye(Z){let{currentLocation:oe,nextLocation:pe,historyAction:Le}=Z;if(ve.size===0)return;ve.size>1&&Mg(!1,"A router only supports one blocker at a time");let qe=Array.from(ve.entries()),[xt,Bt]=qe[qe.length-1],pt=_.blockers.get(xt);if(!(pt&&pt.state==="proceeding")&&Bt({currentLocation:oe,nextLocation:pe,historyAction:Le}))return xt}function fe(Z){let oe=ca(404,{pathname:Z}),pe=o||a,{matches:Le,route:qe}=EI(pe);return Ne(),{notFoundMatches:Le,route:qe,error:oe}}function Ne(Z){let oe=[];return je.forEach((pe,Le)=>{(!Z||Z(Le))&&(pe.cancel(),oe.push(Le),je.delete(Le))}),oe}function ke(Z,oe,pe){if(p=Z,v=oe,x=pe||null,!g&&_.navigation===nT){g=!0;let Le=Fe(_.location,_.matches);Le!=null&&we({restoreScrollPosition:Le})}return()=>{p=null,v=null,x=null}}function ze(Z,oe){return x&&x(Z,oe.map(Le=>Wpe(Le,_.loaderData)))||Z.key}function et(Z,oe){if(p&&v){let pe=ze(Z,oe);p[pe]=v()}}function Fe(Z,oe){if(p){let pe=ze(Z,oe),Le=p[pe];if(typeof Le=="number")return Le}return null}function Lt(Z,oe,pe){if(d)if(Z){if(Object.keys(Z[0].params).length>0)return{active:!0,matches:ZS(oe,pe,c,!0)}}else return{active:!0,matches:ZS(oe,pe,c,!0)||[]};return{active:!1,matches:null}}async function Ft(Z,oe,pe,Le){if(!d)return{type:"success",matches:Z};let qe=Z;for(;;){let xt=o==null,Bt=o||a,pt=s;try{await d({signal:pe,path:oe,matches:qe,fetcherKey:Le,patch:(wt,tn)=>{pe.aborted||wI(wt,tn,Bt,pt,i)}})}catch(wt){return{type:"error",error:wt,partialMatches:qe}}finally{xt&&!pe.aborted&&(a=[...a])}if(pe.aborted)return{type:"aborted"};let yt=zf(Bt,oe,c);if(yt)return{type:"success",matches:yt};let dt=ZS(Bt,oe,c,!0);if(!dt||qe.length===dt.length&&qe.every((wt,tn)=>wt.route.id===dt[tn].route.id))return{type:"success",matches:null};qe=dt}}function Dn(Z){s={},o=o4(Z,i,void 0,s)}function Xn(Z,oe){let pe=o==null;wI(Z,oe,o||a,s,i),pe&&(a=[...a],we({}))}return k={get basename(){return c},get future(){return h},get state(){return _},get routes(){return a},get window(){return t},initialize:Se,subscribe:tt,enableScrollRestoration:ke,navigate:Je,fetch:Nn,revalidate:It,createHref:Z=>e.history.createHref(Z),encodeLocation:Z=>e.history.encodeLocation(Z),getFetcher:Ct,deleteFetcher:un,dispose:He,getBlocker:V,deleteBlocker:te,patchRoutes:Xn,_internalFetchControllers:I,_internalActiveDeferreds:je,_internalSetRoutes:Dn},k}function y0e(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function g6(e,t,n,r,i,s,a,o){let c,u;if(a){c=[];for(let h of t)if(c.push(h),h.route.id===a){u=h;break}}else c=t,u=t[t.length-1];let d=pk(i||".",mk(c,s),Fu(e.pathname,n)||e.pathname,o==="path");if(i==null&&(d.search=e.search,d.hash=e.hash),(i==null||i===""||i===".")&&u){let h=AM(d.search);if(u.route.index&&!h)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&h){let f=new URLSearchParams(d.search),m=f.getAll("index");f.delete("index"),m.filter(x=>x).forEach(x=>f.append("index",x));let p=f.toString();d.search=p?"?"+p:""}}return r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:yu([n,d.pathname])),Fm(d)}function xI(e,t,n,r){if(!r||!y0e(r))return{path:n};if(r.formMethod&&!A0e(r.formMethod))return{path:n,error:ca(405,{method:r.formMethod})};let i=()=>({path:n,error:ca(400,{type:"invalid-body"})}),s=r.formMethod||"get",a=e?s.toUpperCase():s.toLowerCase(),o=qX(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!hl(a))return i();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,p)=>{let[x,v]=p;return""+m+x+"="+v+` 60`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!hl(a))return i();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}dn(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=y6(r.formData),u=r.formData;else if(r.body instanceof FormData)c=y6(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=CI(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=CI(c)}catch{return i()}let d={formMethod:a,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(hl(d.formMethod))return{path:n,submission:d};let h=af(n);return t&&h.search&&AM(h.search)&&c.append("index",""),h.search="?"+c,{path:Fm(h),submission:d}}function yI(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function bI(e,t,n,r,i,s,a,o,c,u,d,h,f,m,p,x){let v=x?qa(x[1])?x[1].error:x[1].data:void 0,g=e.createURL(t.location),y=e.createURL(i),w=n;s&&t.errors?w=yI(n,Object.keys(t.errors)[0],!0):x&&qa(x[1])&&(w=yI(n,x[0]));let S=x?x[1].statusCode:void 0,C=a&&S&&S>=400,k=w.filter((E,A)=>{let{route:j}=E;if(j.lazy)return!0;if(j.loader==null)return!1;if(s)return x6(j,t.loaderData,t.errors);if(b0e(t.loaderData,t.matches[A],E)||c.some($=>$===E.route.id))return!0;let D=t.matches[A],M=E;return vI(E,jr({currentUrl:g,currentParams:D.params,nextUrl:y,nextParams:M.params},r,{actionResult:v,actionStatus:S,defaultShouldRevalidate:C?!1:o||g.pathname+g.search===y.pathname+y.search||g.search!==y.search||VX(D,M)}))}),_=[];return h.forEach((E,A)=>{if(s||!n.some(B=>B.route.id===E.routeId)||d.has(A))return;let j=zf(m,E.path,p);if(!j){_.push({key:A,routeId:E.routeId,path:E.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(A),M=d1(j,E.path),$=!1;f.has(A)?$=!1:u.has(A)?(u.delete(A),$=!0):D&&D.state!=="idle"&&D.data===void 0?$=o:$=vI(M,jr({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:S,defaultShouldRevalidate:C?!1:o})),$&&_.push({key:A,routeId:E.routeId,path:E.path,matches:j,match:M,controller:new AbortController})}),[k,_]}function x6(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function b0e(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function VX(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function vI(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function wI(e,t,n,r,i){var s;let a;if(e){let u=r[e];dn(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),a=u.children}else a=n;let o=t.filter(u=>!a.some(d=>HX(u,d))),c=o4(o,i,[e||"_","patch",String(((s=a)==null?void 0:s.length)||"0")],r);a.push(...c)}function HX(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(s=>HX(n,s))}):!1}async function v0e(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];dn(i,"No route found in manifest");let s={};for(let a in r){let c=i[a]!==void 0&&a!=="hasErrorBoundary";Mg(!c,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!qpe.has(a)&&(s[a]=r[a])}Object.assign(i,s),Object.assign(i,jr({},t(i),{lazy:void 0}))}async function w0e(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,s,a)=>Object.assign(i,{[n[a].route.id]:s}),{})}async function S0e(e,t,n,r,i,s,a,o,c,u){let d=s.map(m=>m.route.lazy?v0e(m.route,c,o):void 0),h=s.map((m,p)=>{let x=d[p],v=i.some(y=>y.route.id===m.route.id);return jr({},m,{shouldLoad:v,resolve:async y=>(y&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(v=!0),v?C0e(t,r,m,x,y,u):Promise.resolve({type:rr.data,result:void 0}))})}),f=await e({matches:h,request:r,params:s[0].params,fetcherKey:a,context:u});try{await Promise.all(d)}catch{}return f}async function C0e(e,t,n,r,i,s){let a,o,c=u=>{let d,h=new Promise((p,x)=>d=x);o=()=>d(),t.signal.addEventListener("abort",o);let f=p=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:s},...p!==void 0?[p]:[]),m=(async()=>{try{return{type:"data",result:await(i?i(x=>f(x)):f())}}catch(p){return{type:"error",result:p}}})();return Promise.race([m,h])};try{let u=n.route[e];if(r)if(u){let d,[h]=await Promise.all([c(u).catch(f=>{d=f}),r]);if(d!==void 0)throw d;a=h}else if(await r,u=n.route[e],u)a=await c(u);else if(e==="action"){let d=new URL(t.url),h=d.pathname+d.search;throw ca(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:rr.data,result:void 0};else if(u)a=await c(u);else{let d=new URL(t.url),h=d.pathname+d.search;throw ca(404,{pathname:h})}dn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:rr.error,result:u}}finally{o&&t.signal.removeEventListener("abort",o)}return a}async function k0e(e){let{result:t,type:n}=e;if(GX(t)){let h;try{let f=t.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?t.body==null?h=null:h=await t.json():h=await t.text()}catch(f){return{type:rr.error,error:f}}return n===rr.error?{type:rr.error,error:new u4(t.status,t.statusText,h),statusCode:t.status,headers:t.headers}:{type:rr.data,data:h,statusCode:t.status,headers:t.headers}}if(n===rr.error){if(jI(t)){var r,i;if(t.data instanceof Error){var s,a;return{type:rr.error,error:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:rr.error,error:new u4(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Rg(t)?t.status:void 0,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:rr.error,error:t,statusCode:Rg(t)?t.status:void 0}}if(N0e(t)){var o,c;return{type:rr.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((c=t.init)==null?void 0:c.headers)&&new Headers(t.init.headers)}}if(jI(t)){var u,d;return{type:rr.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:rr.data,data:t}}function _0e(e,t,n,r,i,s){let a=e.headers.get("Location");if(dn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!jM.test(a)){let o=r.slice(0,r.findIndex(c=>c.route.id===n)+1);a=g6(new URL(t.url),o,i,!0,a,s),e.headers.set("Location",a)}return e}function SI(e,t,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(jM.test(e)){let s=e,a=s.startsWith("//")?new URL(t.protocol+s):new URL(s);if(i.includes(a.protocol))throw new Error("Invalid redirect location");let o=Fu(a.pathname,n)!=null;if(a.origin===t.origin&&o)return EM(a.pathname)+a.search+a.hash}try{let s=r.createURL(e);if(i.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Rp(e,t,n,r){let i=e.createURL(qX(t)).toString(),s={signal:n};if(r&&hl(r.formMethod)){let{formMethod:a,formEncType:o}=r;s.method=a.toUpperCase(),o==="application/json"?(s.headers=new Headers({"Content-Type":o}),s.body=JSON.stringify(r.json)):o==="text/plain"?s.body=r.text:o==="application/x-www-form-urlencoded"&&r.formData?s.body=y6(r.formData):s.body=r.formData}return new Request(i,s)}function y6(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function CI(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function T0e(e,t,n,r,i){let s={},a=null,o,c=!1,u={},d=n&&qa(n[1])?n[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let f=h.route.id,m=t[f];if(dn(!Xf(m),"Cannot handle redirect results in processLoaderData"),qa(m)){let p=m.error;d!==void 0&&(p=d,d=void 0),a=a||{};{let x=$f(e,f);a[x.route.id]==null&&(a[x.route.id]=p)}s[f]=void 0,c||(c=!0,o=Rg(m.error)?m.error.status:500),m.headers&&(u[f]=m.headers)}else hh(m)?(r.set(f,m.deferredData),s[f]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!c&&(o=m.statusCode),m.headers&&(u[f]=m.headers)):(s[f]=m.data,m.statusCode&&m.statusCode!==200&&!c&&(o=m.statusCode),m.headers&&(u[f]=m.headers))}),d!==void 0&&n&&(a={[n[0]]:d},s[n[0]]=void 0),{loaderData:s,errors:a,statusCode:o||200,loaderHeaders:u}}function kI(e,t,n,r,i,s,a){let{loaderData:o,errors:c}=T0e(t,n,r,a);return i.forEach(u=>{let{key:d,match:h,controller:f}=u,m=s[d];if(dn(m,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(qa(m)){let p=$f(e.matches,h==null?void 0:h.route.id);c&&c[p.route.id]||(c=jr({},c,{[p.route.id]:m.error})),e.fetchers.delete(d)}else if(Xf(m))dn(!1,"Unhandled fetcher revalidation redirect");else if(hh(m))dn(!1,"Unhandled fetcher deferred data");else{let p=Bd(m.data);e.fetchers.set(d,p)}}),{loaderData:o,errors:c}}function _I(e,t,n,r){let i=jr({},t);for(let s of n){let a=s.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&s.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function TI(e){return e?qa(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function $f(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function EI(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ca(e,t){let{pathname:n,routeId:r,method:i,type:s,message:a}=t===void 0?{}:t,o="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(o="Bad Request",i&&n&&r?c="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?c="defer() is not supported in actions":s==="invalid-body"&&(c="Unable to encode submission body")):e===403?(o="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(o="Not Found",c='No route matches URL "'+n+'"'):e===405&&(o="Method Not Allowed",i&&n&&r?c="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new u4(e||500,o,new Error(c),!0)}function i2(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(Xf(i))return{key:r,result:i}}}function qX(e){let t=typeof e=="string"?af(e):e;return Fm(jr({},t,{hash:""}))}function E0e(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function j0e(e){return GX(e.result)&&f0e.has(e.result.status)}function hh(e){return e.type===rr.deferred}function qa(e){return e.type===rr.error}function Xf(e){return(e&&e.type)===rr.redirect}function jI(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function N0e(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function GX(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function A0e(e){return h0e.has(e.toLowerCase())}function hl(e){return u0e.has(e.toLowerCase())}async function M0e(e,t,n,r,i){let s=Object.entries(t);for(let a=0;a<s.length;a++){let[o,c]=s[a],u=e.find(f=>(f==null?void 0:f.route.id)===o);if(!u)continue;let d=r.find(f=>f.route.id===u.route.id),h=d!=null&&!VX(d,u)&&(i&&i[u.route.id])!==void 0;hh(c)&&h&&await NM(c,n,!1).then(f=>{f&&(t[o]=f)})}}async function R0e(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:s,controller:a}=n[r],o=t[i];e.find(u=>(u==null?void 0:u.route.id)===s)&&hh(o)&&(dn(a,"Expected an AbortController for revalidating fetcher deferred result"),await NM(o,a.signal,!0).then(u=>{u&&(t[i]=u)}))}}async function NM(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:rr.data,data:e.deferredData.unwrappedData}}catch(i){return{type:rr.error,error:i}}return{type:rr.data,data:e.deferredData.data}}}function AM(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function d1(e,t){let n=typeof t=="string"?af(t).search:t.search;if(e[e.length-1].route.index&&AM(n||""))return e[e.length-1];let r=zX(e);return r[r.length-1]}function NI(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:s,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function rT(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function O0e(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Cy(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function D0e(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Bd(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function L0e(e,t){try{let n=e.sessionStorage.getItem(UX);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function P0e(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(UX,JSON.stringify(n))}catch(r){Mg(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** 61 * React Router v6.30.6 62 * 63 * Copyright (c) Remix Software Inc. 64 * 65 * This source code is licensed under the MIT license found in the 66 * LICENSE.md file in the root directory of this source tree. 67 * 68 * @license MIT 69 */function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d4.apply(null,arguments)}const zv=b.createContext(null),MM=b.createContext(null),sd=b.createContext(null),gk=b.createContext(null),Tc=b.createContext({outlet:null,matches:[],isDataRoute:!1}),WX=b.createContext(null);function I0e(e,t){let{relative:n}=t===void 0?{}:t;wx()||dn(!1);let{basename:r,navigator:i}=b.useContext(sd),{hash:s,pathname:a,search:o}=xk(e,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:yu([r,a])),i.createHref({pathname:c,search:o,hash:s})}function wx(){return b.useContext(gk)!=null}function is(){return wx()||dn(!1),b.useContext(gk).location}function F0e(){return b.useContext(gk).navigationType}function YX(e){b.useContext(sd).static||b.useLayoutEffect(e)}function St(){let{isDataRoute:e}=b.useContext(Tc);return e?Q0e():B0e()}function B0e(){wx()||dn(!1);let e=b.useContext(zv),{basename:t,future:n,navigator:r}=b.useContext(sd),{matches:i}=b.useContext(Tc),{pathname:s}=is(),a=JSON.stringify(mk(i,n.v7_relativeSplatPath)),o=b.useRef(!1);return YX(()=>{o.current=!0}),b.useCallback(function(u,d){if(d===void 0&&(d={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let h=pk(u,JSON.parse(a),s,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:yu([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,a,s,e])}const z0e=b.createContext(null);function $0e(e){let t=b.useContext(Tc).outlet;return t&&b.createElement(z0e.Provider,{value:e},t)}function Ec(){let{matches:e}=b.useContext(Tc),t=e[e.length-1];return t?t.params:{}}function xk(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(sd),{matches:i}=b.useContext(Tc),{pathname:s}=is(),a=JSON.stringify(mk(i,r.v7_relativeSplatPath));return b.useMemo(()=>pk(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function U0e(e,t,n,r){wx()||dn(!1);let{navigator:i}=b.useContext(sd),{matches:s}=b.useContext(Tc),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=is(),d;d=u;let h=d.pathname||"/",f=h;if(c!=="/"){let x=c.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=zf(e,{pathname:f});return W0e(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},o,x.params),pathname:yu([c,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:yu([c,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r)}function V0e(){let e=ZX(),t=Rg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const H0e=b.createElement(V0e,null);class q0e extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(Tc.Provider,{value:this.props.routeContext},b.createElement(WX.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function G0e(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(zv);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Tc.Provider,{value:t},r)}function W0e(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let d=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);d>=0||dn(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:m}=n,p=h.route.loader&&f[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||p){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,f)=>{let m,p=!1,x=null,v=null;n&&(m=o&&h.route.id?o[h.route.id]:void 0,x=h.route.errorElement||H0e,c&&(u<0&&f===0?(Z0e("route-fallback"),p=!0,v=null):u===f&&(p=!0,v=h.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,f+1)),y=()=>{let w;return m?w=x:p?w=v:h.route.Component?w=b.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,b.createElement(G0e,{match:h,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?b.createElement(q0e,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var KX=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(KX||{}),XX=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(XX||{});function Y0e(e){let t=b.useContext(zv);return t||dn(!1),t}function K0e(e){let t=b.useContext(MM);return t||dn(!1),t}function X0e(e){let t=b.useContext(Tc);return t||dn(!1),t}function QX(e){let t=X0e(),n=t.matches[t.matches.length-1];return n.route.id||dn(!1),n.route.id}function ZX(){var e;let t=b.useContext(WX),n=K0e(),r=QX();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Q0e(){let{router:e}=Y0e(KX.UseNavigateStable),t=QX(XX.UseNavigateStable),n=b.useRef(!1);return YX(()=>{n.current=!0}),b.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,d4({fromRouteId:t},s)))},[e,t])}const AI={};function Z0e(e,t,n){AI[e]||(AI[e]=!0)}function J0e(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function jo(e){let{to:t,replace:n,state:r,relative:i}=e;wx()||dn(!1);let{future:s,static:a}=b.useContext(sd),{matches:o}=b.useContext(Tc),{pathname:c}=is(),u=St(),d=pk(t,mk(o,s.v7_relativeSplatPath),c,i==="path"),h=JSON.stringify(d);return b.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:i}),[u,h,i,n,r]),null}function $v(e){return $0e(e.context)}function ege(e){let{basename:t="/",children:n=null,location:r,navigationType:i=di.Pop,navigator:s,static:a=!1,future:o}=e;wx()&&dn(!1);let c=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:c,navigator:s,static:a,future:d4({v7_relativeSplatPath:!1},o)}),[c,o,s,a]);typeof r=="string"&&(r=af(r));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:p="default"}=r,x=b.useMemo(()=>{let v=Fu(d,c);return v==null?null:{location:{pathname:v,search:h,hash:f,state:m,key:p},navigationType:i}},[c,d,h,f,m,p,i]);return x==null?null:b.createElement(sd.Provider,{value:u},b.createElement(gk.Provider,{children:n,value:x}))}new Promise(()=>{});function tge(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:b.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** 70 * React Router DOM v6.30.6 71 * 72 * Copyright (c) Remix Software Inc. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE.md file in the root directory of this source tree. 76 * 77 * @license MIT 78 */function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.apply(null,arguments)}function JX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function nge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rge(e,t){return e.button===0&&(!t||t==="_self")&&!nge(e)}function b6(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function ige(e,t){let n=b6(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const sge=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],age=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],oge="6";try{window.__reactRouterVersion=oge}catch{}function lge(e,t){return x0e({basename:void 0,future:Og({},void 0,{v7_prependBasename:!0}),history:Upe({window:void 0}),hydrationData:cge(),routes:e,mapRouteProperties:tge,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function cge(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Og({},t,{errors:uge(t.errors)})),t}function uge(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new u4(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let a=new s(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}const eQ=b.createContext({isTransitioning:!1}),dge=b.createContext(new Map),hge="startTransition",MI=ap[hge],fge="flushSync",RI=Qde[fge];function mge(e){MI?MI(e):e()}function ky(e){RI?RI(e):e()}class pge{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function gge(e){let{fallbackElement:t,router:n,future:r}=e,[i,s]=b.useState(n.state),[a,o]=b.useState(),[c,u]=b.useState({isTransitioning:!1}),[d,h]=b.useState(),[f,m]=b.useState(),[p,x]=b.useState(),v=b.useRef(new Map),{v7_startTransition:g}=r||{},y=b.useCallback(E=>{g?mge(E):E()},[g]),w=b.useCallback((E,A)=>{let{deletedFetchers:j,flushSync:D,viewTransitionOpts:M}=A;E.fetchers.forEach((B,z)=>{B.data!==void 0&&v.current.set(z,B.data)}),j.forEach(B=>v.current.delete(B));let $=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!M||$){D?ky(()=>s(E)):y(()=>s(E));return}if(D){ky(()=>{f&&(d&&d.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let B=n.window.document.startViewTransition(()=>{ky(()=>s(E))});B.finished.finally(()=>{ky(()=>{h(void 0),m(void 0),o(void 0),u({isTransitioning:!1})})}),ky(()=>m(B));return}f?(d&&d.resolve(),f.skipTransition(),x({state:E,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(o(E),u({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[n.window,f,d,v,y]);b.useLayoutEffect(()=>n.subscribe(w),[n,w]),b.useEffect(()=>{c.isTransitioning&&!c.flushSync&&h(new pge)},[c]),b.useEffect(()=>{if(d&&a&&n.window){let E=a,A=d.promise,j=n.window.document.startViewTransition(async()=>{y(()=>s(E)),await A});j.finished.finally(()=>{h(void 0),m(void 0),o(void 0),u({isTransitioning:!1})}),m(j)}},[y,a,d,n.window]),b.useEffect(()=>{d&&a&&i.location.key===a.location.key&&d.resolve()},[d,f,i.location,a]),b.useEffect(()=>{!c.isTransitioning&&p&&(o(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),x(void 0))},[c.isTransitioning,p]),b.useEffect(()=>{},[]);let S=b.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:E=>n.navigate(E),push:(E,A,j)=>n.navigate(E,{state:A,preventScrollReset:j==null?void 0:j.preventScrollReset}),replace:(E,A,j)=>n.navigate(E,{replace:!0,state:A,preventScrollReset:j==null?void 0:j.preventScrollReset})}),[n]),C=n.basename||"/",k=b.useMemo(()=>({router:n,navigator:S,static:!1,basename:C}),[n,S,C]),_=b.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return b.useEffect(()=>J0e(r,n.future),[r,n.future]),b.createElement(b.Fragment,null,b.createElement(zv.Provider,{value:k},b.createElement(MM.Provider,{value:i},b.createElement(dge.Provider,{value:v.current},b.createElement(eQ.Provider,{value:c},b.createElement(ege,{basename:C,location:i.location,navigationType:i.historyAction,navigator:S,future:_},i.initialized||n.future.v7_partialHydration?b.createElement(xge,{routes:n.routes,future:n.future,state:i}):t))))),null)}const xge=b.memo(yge);function yge(e){let{routes:t,future:n,state:r}=e;
78return U0e(t,void 0,r,n)}const bge=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ir=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:a,state:o,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=JX(t,sge),{basename:m}=b.useContext(sd),p,x=!1;if(typeof u=="string"&&vge.test(u)&&(p=u,bge))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=Fu(S.pathname,m);S.origin===w.origin&&C!=null?u=C+S.search+S.hash:x=!0}catch{}let v=I0e(u,{relative:i}),g=Sge(u,{replace:a,state:o,target:c,preventScrollReset:d,relative:i,viewTransition:h});function y(w){r&&r(w),w.defaultPrevented||g(w)}return b.createElement("a",Og({},f,{href:p||v,onClick:x||s?r:y,ref:n,target:c}))}),yk=b.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:a=!1,style:o,to:c,viewTransition:u,children:d}=t,h=JX(t,age),f=xk(c,{relative:h.relative}),m=is(),p=b.useContext(MM),{navigator:x,basename:v}=b.useContext(sd),g=p!=null&&Cge(f)&&u===!0,y=x.encodeLocation?x.encodeLocation(f).pathname:f.pathname,w=m.pathname,S=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,y=y.toLowerCase()),S&&v&&(S=Fu(S,v)||S);const C=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let k=w===y||!a&&w.startsWith(y)&&w.charAt(C)==="/",_=S!=null&&(S===y||!a&&S.startsWith(y)&&S.charAt(y.length)==="/"),E={isActive:k,isPending:_,isTransitioning:g},A=k?r:void 0,j;typeof s=="function"?j=s(E):j=[s,k?"active":null,_?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(E):o;return b.createElement(ir,Og({},h,{"aria-current":A,className:j,ref:n,style:D,to:c,viewTransition:u}),typeof d=="function"?d(E):d)});var v6;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(v6||(v6={}));var OI;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(OI||(OI={}));function wge(e){let t=b.useContext(zv);return t||dn(!1),t}function Sge(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,viewTransition:o}=t===void 0?{}:t,c=St(),u=is(),d=xk(e,{relative:a});return b.useCallback(h=>{if(rge(h,n)){h.preventDefault();let f=r!==void 0?r:Fm(u)===Fm(d);c(e,{replace:f,state:i,preventScrollReset:s,relative:a,viewTransition:o})}},[u,c,d,r,i,n,e,s,a,o])}function ps(e){let t=b.useRef(b6(e)),n=b.useRef(!1),r=is(),i=b.useMemo(()=>ige(r.search,n.current?null:t.current),[r.search]),s=St(),a=b.useCallback((o,c)=>{const u=b6(typeof o=="function"?o(i):o);n.current=!0,s("?"+u,c)},[s,i]);return[i,a]}function Cge(e,t){t===void 0&&(t={});let n=b.useContext(eQ);n==null&&dn(!1);let{basename:r}=wge(v6.useViewTransitionState),i=xk(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Fu(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Fu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return l4(i.pathname,a)!=null||l4(i.pathname,s)!=null}function tQ(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tQ(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nQ(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tQ(e))&&(r&&(r+=" "),r+=t);return r}const RM="-",kge=e=>{const t=Tge(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(RM);return o[0]===""&&o.length!==1&&o.shift(),rQ(o,t)||_ge(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&r[a]?[...c,...r[a]]:c}}},rQ=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?rQ(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(RM);return(a=t.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},DI=/^\[(.+)\]$/,_ge=e=>{if(DI.test(e)){const t=DI.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Tge=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 6,765 bytes, line 78
78return jge(Object.entries(e.classGroups),n).forEach(([s,a])=>{w6(a,r,s,t)}),r},w6=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:LI(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Ege(i)){w6(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{w6(a,LI(t,s),n,r)})})},LI=(e,t)=>{let n=e;return t.split(RM).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ege=e=>e.isThemeGetter,jge=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[t+a,o])):s);return[n,i]}):e,Nge=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},iQ="!",Age=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,a=o=>{const c=[];let u=0,d=0,h;for(let v=0;v<o.length;v++){let g=o[v];if(u===0){if(g===i&&(r||o.slice(v,v+s)===t)){c.push(o.slice(d,v)),d=v+s;continue}if(g==="/"){h=v;continue}}g==="["?u++:g==="]"&&u--}const f=c.length===0?o:o.substring(d),m=f.startsWith(iQ),p=m?f.substring(1):f,x=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:x}};return n?o=>n({className:o,parseClassName:a}):a},Mge=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Rge=e=>({cache:Nge(e.cacheSize),parseClassName:Age(e),...kge(e)}),Oge=/\s+/,Dge=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],a=e.trim().split(Oge);let o="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let p=!!m,x=r(p?f.substring(0,m):f);if(!x){if(!p){o=u+(o.length>0?" "+o:o);continue}if(x=r(f),!x){o=u+(o.length>0?" "+o:o);continue}p=!1}const v=Mge(d).join(":"),g=h?v+iQ:v,y=g+x;if(s.includes(y))continue;s.push(y);const w=i(x,p);for(let S=0;S<w.length;++S){const C=w[S];s.push(g+C)}o=u+(o.length>0?" "+o:o)}return o};function Lge(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sQ(t))&&(r&&(r+=" "),r+=n);return r}const sQ=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sQ(e[r]))&&(n&&(n+=" "),n+=t);return n};function Pge(e,...t){let n,r,i,s=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return n=Rge(u),r=n.cache.get,i=n.cache.set,s=o,o(c)}function o(c){const u=r(c);if(u)return u;const d=Dge(c,n);return i(c,d),d}return function(){return s(Lge.apply(null,arguments))}}const Tr=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},aQ=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ige=/^\d+\/\d+$/,Fge=new Set(["px","full","screen"]),Bge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zge=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$ge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vc=e=>$0(e)||Fge.has(e)||Ige.test(e),kd=e=>Sx(e,"length",Qge),$0=e=>!!e&&!Number.isNaN(Number(e)),iT=e=>Sx(e,"number",$0),_y=e=>!!e&&Number.isInteger(Number(e)),Hge=e=>e.endsWith("%")&&$0(e.slice(0,-1)),sn=e=>aQ.test(e),_d=e=>Bge.test(e),qge=new Set(["length","size","percentage"]),Gge=e=>Sx(e,qge,oQ),Wge=e=>Sx(e,"position",oQ),Yge=new Set(["image","url"]),Kge=e=>Sx(e,Yge,Jge),Xge=e=>Sx(e,"",Zge),Ty=()=>!0,Sx=(e,t,n)=>{const r=aQ.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Qge=e=>zge.test(e)&&!$ge.test(e),oQ=()=>!1,Zge=e=>Uge.test(e),Jge=e=>Vge.test(e),exe=()=>{const e=Tr("colors"),t=Tr("spacing"),n=Tr("blur"),r=Tr("brightness"),i=Tr("borderColor"),s=Tr("borderRadius"),a=Tr("borderSpacing"),o=Tr("borderWidth"),c=Tr("contrast"),u=Tr("grayscale"),d=Tr("hueRotate"),h=Tr("invert"),f=Tr("gap"),m=Tr("gradientColorStops"),p=Tr("gradientColorStopPositions"),x=Tr("inset"),v=Tr("margin"),g=Tr("opacity"),y=Tr("padding"),w=Tr("saturate"),S=Tr("scale"),C=Tr("sepia"),k=Tr("skew"),_=Tr("space"),E=Tr("translate"),A=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",sn,t],M=()=>[sn,t],$=()=>["",Vc,kd],B=()=>["auto",$0,sn],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],P=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",sn],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],xe=()=>[$0,sn];return{cacheSize:500,separator:":",theme:{colors:[Ty],spacing:[Vc,kd],blur:["none","",_d,sn],brightness:xe(),borderColor:[e],borderRadius:["none","","full",_d,sn],borderSpacing:M(),borderWidth:$(),contrast:xe(),grayscale:q(),hueRotate:xe(),invert:q(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Hge,kd],inset:D(),margin:D(),opacity:xe(),padding:M(),saturate:xe(),scale:xe(),sepia:q(),skew:xe(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",sn]}],container:["container"],columns:[{columns:[_d]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),sn]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}
vendor: 9,953 bytes, line 78
78],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_y,sn]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",sn]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",_y,sn]}],"grid-cols":[{"grid-cols":[Ty]}],"col-start-end":[{col:["auto",{span:["full",_y,sn]},sn]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Ty]}],"row-start-end":[{row:["auto",{span:[_y,sn]},sn]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",sn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",sn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",sn,t]}],"min-w":[{"min-w":[sn,t,"min","max","fit"]}],"max-w":[{"max-w":[sn,t,"none","full","min","max","fit","prose",{screen:[_d]},_d]}],h:[{h:[sn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[sn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_d,kd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",iT]}],"font-family":[{font:[Ty]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",sn]}],"line-clamp":[{"line-clamp":["none",$0,iT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vc,sn]}],"list-image":[{"list-image":["none",sn]}],"list-style-type":[{list:["none","disc","decimal",sn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vc,kd]}],"underline-offset":[{"underline-offset":["auto",Vc,sn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",sn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",sn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),Wge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gge]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Kge]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[Vc,sn]}],"outline-w":[{outline:[Vc,kd]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Vc,kd]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_d,Xge]}],"shadow-color":[{shadow:[Ty]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...P(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":P()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",_d,sn]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",sn]}],duration:[{duration:xe()}],ease:[{ease:["linear","in","out","in-out",sn]}],delay:[{delay:xe()}],animate:[{animate:["none","spin","ping","pulse","bounce",sn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[_y,sn]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",sn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",sn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
78],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",sn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vc,kd,iT]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},txe=Pge(exe);function re(...e){return txe(nQ(e))}const nxe=[[/\\leftrightarrow(?![a-zA-Z])/g,"â"],[/\\Rightarrow(?![a-zA-Z])/g,"â"],[/\\Leftarrow(?![a-zA-Z])/g,"â"],[/\\rightarrow(?![a-zA-Z])/g,"â"],[/\\leftarrow(?![a-zA-Z])/g,"â"],[/\\to(?![a-zA-Z])/g,"â"],[/\\times(?![a-zA-Z])/g,"Ã"],[/\\div(?![a-zA-Z])/g,"÷"],[/\\pm(?![a-zA-Z])/g,"±"],[/\\cdot(?![a-zA-Z])/g,"·"],[/\\leq(?![a-zA-Z])/g,"â¤"],[/\\geq(?![a-zA-Z])/g,"â¥"],[/\\le(?![a-zA-Z])/g,"â¤"],[/\\ge(?![a-zA-Z])/g,"â¥"],[/\\neq(?![a-zA-Z])/g,"â "],[/\\approx(?![a-zA-Z])/g,"â"],[/\\infty(?![a-zA-Z])/g,"â"],[/\\deg(?![a-zA-Z])/g,"°"],[/\\bullet(?![a-zA-Z])/g,"â¢"],[/\\ldots(?![a-zA-Z])/g,"â¦"],[/\\dots(?![a-zA-Z])/g,"â¦"]];function sT(e,t,n){let r="",i=0;for(const s of e.matchAll(t)){const a=s.index??0;r+=n(e.slice(i,a)),r+=s[0],i=a+s[0].length}return r+=n(e.slice(i)),r}const rxe=/(```[\s\S]*?```|`[^`\n]*`)/g,ixe=new RegExp("(\\$\\$[\\s\\S]*?\\$\\$|(?<!\\\\)\\$[^$\\n]*?(?<!\\\\)\\$)","g"),sxe=/(\\\[[\s\S]+?\\\]|\\\([\s\S]+?\\\)|\$\$[\s\S]*?\$\$)/g;function axe(e){if(!e.includes("$"))return e;const t=s=>s===void 0||/\s/.test(s),n=new Set;let r=0;for(;r<e.length;){const s=e[r];if(s==="\\"){r+=2;continue}if(s!=="$"){r+=1;continue}let a=-1;if(!t(e[r+1]))for(let o=r+1;o<e.length&&e[o]!==` 79`;o+=1){if(e[o]==="\\"){o+=1;continue}if(e[o]==="$"&&!t(e[o-1])&&!/[0-9]/.test(e[o+1]??"")){a=o;break}}a===-1?(n.add(r),r+=1):r=a+1}if(n.size===0)return e;let i="";for(let s=0;s<e.length;s+=1)i+=n.has(s)?"\\$":e[s];return i}const oxe=/^\s*(?:\\\$\s*[0-9][0-9,]*(?:\.[0-9]+)?|[0-9][0-9,]*(?:\.[0-9]+)?\s*\\\$)\s*$/;function lQ(e){return e.replace(/\\\$/g,"\\text{\\textdollar}")}function lxe(e){return oxe.test(e)?e.trim().replace(/\s+/g,"").replace(/^\\\$/,"\\$").replace(/([0-9.,]+)\\\$$/,"\\$$$1"):`$${lQ(e.trim())}$`}function cxe(e){return!e||!e.includes("\\")&&!e.includes("$")?e:sT(e,rxe,t=>{const r=sT(t,sxe,axe).replace(/\\\[([\s\S]+?)\\\]/g,(i,s)=>`$$${lQ(s)}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(i,s)=>lxe(s));return sT(r,ixe,i=>{let s=i;
79for(const[a,o]of nxe)s=s.replace(a,o);return s})})}const cQ=b.createContext(null);function uxe(){const e=b.useContext(cQ);return(e==null?void 0:e.current)??void 0}const PI=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,II=nQ,Xo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return II(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],h=s==null?void 0:s[u];if(d===null)return null;const f=PI(d)||PI(h);return i[u][f]}),o=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...m}=d;return Object.entries(m).every(p=>{let[x,v]=p;return Array.isArray(v)?v.includes({...s,...o}[x]):{...s,...o}[x]===v})?[...u,h,f]:u},[]);return II(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},dxe=Xo("",{variants:{level:{1:"text-4xl font-bold tracking-tight",2:"text-3xl font-bold tracking-tight",3:"text-2xl font-semibold",4:"text-xl font-semibold",5:"text-lg font-medium",6:"text-base font-medium"}}}),hp=Y.forwardRef(({level:e,as:t,className:n,children:r,...i},s)=>{const a=t??`h${e}`;return l.jsx(a,{ref:s,className:re(dxe({level:e}),n),...i,children:r})});hp.displayName="Heading";const hxe=Xo("",{variants:{variant:{body:"text-base",bodySmall:"text-sm",bodyLarge:"text-lg"}},defaultVariants:{variant:"body"}}),xn=Y.forwardRef(({variant:e="body",as:t="p",className:n,children:r,...i},s)=>l.jsx(t,{ref:s,className:re(hxe({variant:e}),n),...i,children:r}));xn.displayName="Text";const Qa=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsx("span",{ref:r,className:re("text-xs text-muted-foreground",e),...n,children:t}));Qa.displayName="Caption";const uQ=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsx("span",{ref:r,className:re("text-sm font-medium",e),...n,children:t}));uQ.displayName="InlineLabel";const dQ=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsx("span",{ref:r,className:re("text-xs font-bold uppercase tracking-widest",e),...n,children:t}));dQ.displayName="Overline";const fxe=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsx("code",{ref:r,className:re("font-mono text-sm bg-muted px-1.5 py-0.5 rounded",e),...n,children:t}));fxe.displayName="Code";const mxe=Xo("inline-flex items-center rounded-full font-medium",{variants:{variant:{default:"bg-primary text-primary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",error:"bg-destructive text-destructive-foreground",info:"bg-info text-info-foreground",outline:"border border-input bg-transparent",active:"bg-success/10 text-success",inactive:"bg-destructive/10 text-destructive",draft:"bg-muted text-muted-foreground",published:"bg-info/10 text-info",archived:"bg-warning/10 text-warning",generating:"bg-primary/10 text-primary",completed:"bg-success/10 text-success",failed:"bg-destructive/10 text-destructive",processing:"bg-info/10 text-info",queued:"bg-muted text-muted-foreground",paid:"bg-success/10 text-success",pending:"bg-warning/10 text-warning",paused:"bg-warning/10 text-warning",cancelled:"bg-destructive/10 text-destructive",credit:"bg-info/10 text-info"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-0.5 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),Oi=Y.forwardRef(({variant:e,size:t,icon:n,className:r,children:i,...s},a)=>l.jsxs("span",{ref:a,className:re(mxe({variant:e,size:t}),n?"gap-1":"",r),...s,children:[n&&l.jsx("span",{className:"shrink-0 [&>svg]:h-3.5 [&>svg]:w-3.5","aria-hidden":"true",children:n}),i]}));Oi.displayName="Badge";const ec=Y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("rounded-xl border border-border bg-card text-card-foreground shadow-soft",e),...t}));ec.displayName="Card";const Qf=Y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));Qf.displayName="CardHeader";const y0=Y.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));
79y0.displayName="CardTitle";const S6=Y.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));S6.displayName="CardDescription";const fu=Y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));fu.displayName="CardContent";const hQ=Y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));hQ.displayName="CardFooter";const bm=Y.forwardRef(({padding:e="p-6",rounded:t="rounded-xl",className:n,style:r,children:i,...s},a)=>l.jsx("div",{ref:a,className:re("bg-white/85 dark:bg-card/85 backdrop-blur-xl border border-black/[0.06] dark:border-white/[0.06] shadow-[0_2px_12px_rgba(0,0,0,0.04)] dark:shadow-none",t,e,n),style:r,...s,children:i}));bm.displayName="GlassCard";const pxe=Xo("w-full bg-secondary rounded-full overflow-hidden",{variants:{size:{sm:"h-1.5",md:"h-2.5",lg:"h-4"}},defaultVariants:{size:"md"}}),Cx=Y.forwardRef(({value:e,label:t,showPercentage:n=!1,size:r="md",color:i="bg-primary",className:s,...a},o)=>{const c=Math.min(100,Math.max(0,e)),u=Y.useId(),{"aria-label":d,"aria-labelledby":h,...f}=a,m=t&&!d&&!h?`progressbar-label-${u}`:void 0,p=h??m;return l.jsxs("div",{ref:o,className:re("w-full",s),...f,children:[(t||n)&&l.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[t&&l.jsx(uQ,{id:m,children:t}),n&&l.jsxs(Qa,{children:[e,"%"]})]}),l.jsx("div",{className:pxe({size:r}),children:l.jsx("div",{className:re(i,"h-full transition-[width] ease-in-out"),style:{width:`${c}%`},role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d,"aria-labelledby":p})})]})});Cx.displayName="ProgressBar";/** 80 * @license lucide-react v0.469.0 - ISC 81 * 82 * This source code is licensed under the ISC license. 83 * See the LICENSE file in the root directory of this source tree. 84 */const gxe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fQ=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 85 * @license lucide-react v0.469.0 - ISC 86 * 87 * This source code is licensed under the ISC license. 88 * See the LICENSE file in the root directory of this source tree. 89 */var xxe={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"};/** 90 * @license lucide-react v0.469.0 - ISC 91 * 92 * This source code is licensed under the ISC license. 93 * See the LICENSE file in the root directory of this source tree. 94 */const yxe=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},c)=>b.createElement("svg",{ref:c,...xxe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fQ("lucide",i),...o},[...a.map(([u,d])=>b.createElement(u,d)),...Array.isArray(s)?s:[s]]));/** 95 * @license lucide-react v0.469.0 - ISC 96 * 97 * This source code is licensed under the ISC license. 98 * See the LICENSE file in the root directory of this source tree. 99 */const Ee=(e,t)=>{const n=b.forwardRef(({className:r,...i},s)=>b.createElement(yxe,{ref:s,iconNode:t,className:fQ(`lucide-${gxe(e)}`,r),...i}));return n.displayName=`${e}`,n};/** 100 * @license lucide-react v0.469.0 - ISC 101 * 102 * This source code is licensed under the ISC license. 103 * See the LICENSE file in the root directory of this source tree. 104 */const mQ=Ee("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/** 105 * @license lucide-react v0.469.0 - ISC 106 * 107 * This source code is licensed under the ISC license. 108 * See the LICENSE file in the root directory of this source tree. 109 */const bxe=Ee("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/** 110 * @license lucide-react v0.469.0 - ISC 111 * 112 * This source code is licensed under the ISC license. 113 * See the LICENSE file in the root directory of this source tree. 114 */const OM=Ee("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** 115 * @license lucide-react v0.469.0 - ISC 116 * 117 * This source code is licensed under the ISC license. 118 * See the LICENSE file in the root directory of this source tree. 119 */const pQ=Ee("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 120 * @license lucide-react v0.469.0 - ISC 121 * 122 * This source code is licensed under the ISC license. 123 * See the LICENSE file in the root directory of this source tree. 124 */const kx=Ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 125 * @license lucide-react v0.469.0 - ISC 126 * 127 * This source code is licensed under the ISC license. 128 * See the LICENSE file in the root directory of this source tree. 129 */const gn=Ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 130 * @license lucide-react v0.469.0 - ISC 131 * 132 * This source code is licensed under the ISC license. 133 * See the LICENSE file in the root directory of this source tree. 134 */const vxe=Ee("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** 135 * @license lucide-react v0.469.0 - ISC 136 * 137 * This source code is licensed under the ISC license. 138 * See the LICENSE file in the root directory of this source tree. 139 */const DM=Ee("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 140 * @license lucide-react v0.469.0 - ISC 141 * 142 * This source code is licensed under the ISC license. 143 * See the LICENSE file in the root directory of this source tree. 144 */const Mb=Ee("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 145 * @license lucide-react v0.469.0 - ISC 146 * 147 * This source code is licensed under the ISC license. 148 * See the LICENSE file in the root directory of this source tree. 149 */const gQ=Ee("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 150 * @license lucide-react v0.469.0 - ISC 151 * 152 * This source code is licensed under the ISC license. 153 * See the LICENSE file in the root directory of this source tree. 154 */const wxe=Ee("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);/** 155 * @license lucide-react v0.469.0 - ISC 156 * 157 * This source code is licensed under the ISC license. 158 * See the LICENSE file in the root directory of this source tree. 159 */const Rb=Ee("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/** 160 * @license lucide-react v0.469.0 - ISC 161 * 162 * This source code is licensed under the ISC license. 163 * See the LICENSE file in the root directory of this source tree.
164 */const LM=Ee("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** 165 * @license lucide-react v0.469.0 - ISC 166 * 167 * This source code is licensed under the ISC license. 168 * See the LICENSE file in the root directory of this source tree. 169 */const Ci=Ee("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 170 * @license lucide-react v0.469.0 - ISC 171 * 172 * This source code is licensed under the ISC license. 173 * See the LICENSE file in the root directory of this source tree. 174 */const xQ=Ee("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** 175 * @license lucide-react v0.469.0 - ISC 176 * 177 * This source code is licensed under the ISC license. 178 * See the LICENSE file in the root directory of this source tree. 179 */const Fi=Ee("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 180 * @license lucide-react v0.469.0 - ISC 181 * 182 * This source code is licensed under the ISC license. 183 * See the LICENSE file in the root directory of this source tree. 184 */const yQ=Ee("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 185 * @license lucide-react v0.469.0 - ISC 186 * 187 * This source code is licensed under the ISC license. 188 * See the LICENSE file in the root directory of this source tree. 189 */const Sxe=Ee("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** 190 * @license lucide-react v0.469.0 - ISC 191 * 192 * This source code is licensed under the ISC license. 193 * See the LICENSE file in the root directory of this source tree. 194 */const FI=Ee("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 195 * @license lucide-react v0.469.0 - ISC 196 * 197 * This source code is licensed under the ISC license. 198 * See the LICENSE file in the root directory of this source tree. 199 */const h4=Ee("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 200 * @license lucide-react v0.469.0 - ISC 201 * 202 * This source code is licensed under the ISC license. 203 * See the LICENSE file in the root directory of this source tree. 204 */const Kn=Ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 205 * @license lucide-react v0.469.0 - ISC 206 * 207 * This source code is licensed under the ISC license. 208 * See the LICENSE file in the root directory of this source tree. 209 */const ad=Ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 210 * @license lucide-react v0.469.0 - ISC 211 * 212 * This source code is licensed under the ISC license. 213 * See the LICENSE file in the root directory of this source tree. 214 */const $o=Ee("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 215 * @license lucide-react v0.469.0 - ISC 216 * 217 * This source code is licensed under the ISC license. 218 * See the LICENSE file in the root directory of this source tree. 219 */const ns=Ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 220 * @license lucide-react v0.469.0 - ISC 221 * 222 * This source code is licensed under the ISC license. 223 * See the LICENSE file in the root directory of this source tree. 224 */const bQ=Ee("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 225 * @license lucide-react v0.469.0 - ISC 226 * 227 * This source code is licensed under the ISC license. 228 * See the LICENSE file in the root directory of this source tree. 229 */const Uv=Ee("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 230 * @license lucide-react v0.469.0 - ISC 231 * 232 * This source code is licensed under the ISC license. 233 * See the LICENSE file in the root directory of this source tree. 234 */const Cxe=Ee("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** 235 * @license lucide-react v0.469.0 - ISC 236 * 237 * This source code is licensed under the ISC license. 238 * See the LICENSE file in the root directory of this source tree. 239 */const vQ=Ee("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 240 * @license lucide-react v0.469.0 - ISC 241 * 242 * This source code is licensed under the ISC license. 243 * See the LICENSE file in the root directory of this source tree. 244 */const jl=Ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 245 * @license lucide-react v0.469.0 - ISC 246 * 247 * This source code is licensed under the ISC license. 248 * See the LICENSE file in the root directory of this source tree. 249 */const kxe=Ee("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/** 250 * @license lucide-react v0.469.0 - ISC 251 * 252 * This source code is licensed under the ISC license. 253 * See the LICENSE file in the root directory of this source tree. 254 */const _xe=Ee("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 255 * @license lucide-react v0.469.0 - ISC 256 * 257 * This source code is licensed under the ISC license. 258 * See the LICENSE file in the root directory of this source tree. 259 */const Ph=Ee("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** 260 * @license lucide-react v0.469.0 - ISC 261 * 262 * This source code is licensed under the ISC license. 263 * See the LICENSE file in the root directory of this source tree. 264 */const PM=Ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 265 * @license lucide-react v0.469.0 - ISC 266 * 267 * This source code is licensed under the ISC license. 268 * See the LICENSE file in the root directory of this source tree. 269 */const Txe=Ee("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 270 * @license lucide-react v0.469.0 - ISC 271 * 272 * This source code is licensed under the ISC license. 273 * See the LICENSE file in the root directory of this source tree. 274 */const od=Ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 275 * @license lucide-react v0.469.0 - ISC 276 * 277 * This source code is licensed under the ISC license. 278 * See the LICENSE file in the root directory of this source tree. 279 */const Bm=Ee("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
279y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 280 * @license lucide-react v0.469.0 - ISC 281 * 282 * This source code is licensed under the ISC license. 283 * See the LICENSE file in the root directory of this source tree. 284 */const wQ=Ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 285 * @license lucide-react v0.469.0 - ISC 286 * 287 * This source code is licensed under the ISC license. 288 * See the LICENSE file in the root directory of this source tree. 289 */const Exe=Ee("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/** 290 * @license lucide-react v0.469.0 - ISC 291 * 292 * This source code is licensed under the ISC license. 293 * See the LICENSE file in the root directory of this source tree. 294 */const C6=Ee("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 295 * @license lucide-react v0.469.0 - ISC 296 * 297 * This source code is licensed under the ISC license. 298 * See the LICENSE file in the root directory of this source tree. 299 */const Dg=Ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 300 * @license lucide-react v0.469.0 - ISC 301 * 302 * This source code is licensed under the ISC license. 303 * See the LICENSE file in the root directory of this source tree. 304 */const f4=Ee("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/** 305 * @license lucide-react v0.469.0 - ISC 306 * 307 * This source code is licensed under the ISC license. 308 * See the LICENSE file in the root directory of this source tree. 309 */const jxe=Ee("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 310 * @license lucide-react v0.469.0 - ISC 311 * 312 * This source code is licensed under the ISC license. 313 * See the LICENSE file in the root directory of this source tree. 314 */const IM=Ee("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 315 * @license lucide-react v0.469.0 - ISC 316 * 317 * This source code is licensed under the ISC license. 318 * See the LICENSE file in the root directory of this source tree. 319 */const bk=Ee("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 320 * @license lucide-react v0.469.0 - ISC 321 * 322 * This source code is licensed under the ISC license. 323 * See the LICENSE file in the root directory of this source tree. 324 */const _x=Ee("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 325 * @license lucide-react v0.469.0 - ISC 326 * 327 * This source code is licensed under the ISC license. 328 * See the LICENSE file in the root directory of this source tree. 329 */const Vv=Ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 330 * @license lucide-react v0.469.0 - ISC 331 * 332 * This source code is licensed under the ISC license. 333 * See the LICENSE file in the root directory of this source tree. 334 */const Nxe=Ee("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 335 * @license lucide-react v0.469.0 - ISC 336 * 337 * This source code is licensed under the ISC license. 338 * See the LICENSE file in the root directory of this source tree. 339 */const Axe=Ee("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** 340 * @license lucide-react v0.469.0 - ISC 341 * 342 * This source code is licensed under the ISC license. 343 * See the LICENSE file in the root directory of this source tree. 344 */const Mxe=Ee("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 345 * @license lucide-react v0.469.0 - ISC 346 * 347 * This source code is licensed under the ISC license. 348 * See the LICENSE file in the root directory of this source tree. 349 */const Rxe=Ee("GitCompare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);/** 350 * @license lucide-react v0.469.0 - ISC 351 * 352 * This source code is licensed under the ISC license. 353 * See the LICENSE file in the root directory of this source tree. 354 */const Oxe=Ee("GitGraph",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v6",key:"158jrl"}],["circle",{cx:"5",cy:"18",r:"3",key:"104gr9"}],["path",{d:"M12 3v18",key:"108xh3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}
354],["path",{d:"M16 15.7A9 9 0 0 0 19 9",key:"1e3vqb"}]]);/** 355 * @license lucide-react v0.469.0 - ISC 356 * 357 * This source code is licensed under the ISC license. 358 * See the LICENSE file in the root directory of this source tree. 359 */const SQ=Ee("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 360 * @license lucide-react v0.469.0 - ISC 361 * 362 * This source code is licensed under the ISC license. 363 * See the LICENSE file in the root directory of this source tree. 364 */const of=Ee("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 365 * @license lucide-react v0.469.0 - ISC 366 * 367 * This source code is licensed under the ISC license. 368 * See the LICENSE file in the root directory of this source tree. 369 */const CQ=Ee("Highlighter",[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]);/** 370 * @license lucide-react v0.469.0 - ISC 371 * 372 * This source code is licensed under the ISC license. 373 * See the LICENSE file in the root directory of this source tree. 374 */const Hv=Ee("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 375 * @license lucide-react v0.469.0 - ISC 376 * 377 * This source code is licensed under the ISC license. 378 * See the LICENSE file in the root directory of this source tree. 379 */const kQ=Ee("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 380 * @license lucide-react v0.469.0 - ISC 381 * 382 * This source code is licensed under the ISC license. 383 * See the LICENSE file in the root directory of this source tree. 384 */const Dxe=Ee("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 385 * @license lucide-react v0.469.0 - ISC 386 * 387 * This source code is licensed under the ISC license. 388 * See the LICENSE file in the root directory of this source tree. 389 */const Lxe=Ee("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);/** 390 * @license lucide-react v0.469.0 - ISC 391 * 392 * This source code is licensed under the ISC license. 393 * See the LICENSE file in the root directory of this source tree. 394 */const zm=Ee("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 395 * @license lucide-react v0.469.0 - ISC 396 * 397 * This source code is licensed under the ISC license. 398 * See the LICENSE file in the root directory of this source tree. 399 */const Ob=Ee("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/** 400 * @license lucide-react v0.469.0 - ISC 401 * 402 * This source code is licensed under the ISC license. 403 * See the LICENSE file in the root directory of this source tree. 404 */const Pxe=Ee("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/** 405 * @license lucide-react v0.469.0 - ISC 406 * 407 * This source code is licensed under the ISC license. 408 * See the LICENSE file in the root directory of this source tree. 409 */const _Q=Ee("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 410 * @license lucide-react v0.469.0 - ISC 411 * 412 * This source code is licensed under the ISC license. 413 * See the LICENSE file in the root directory of this source tree. 414 */const Ixe=Ee("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",ke
414y:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 415 * @license lucide-react v0.469.0 - ISC 416 * 417 * This source code is licensed under the ISC license. 418 * See the LICENSE file in the root directory of this source tree. 419 */const Fxe=Ee("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 420 * @license lucide-react v0.469.0 - ISC 421 * 422 * This source code is licensed under the ISC license. 423 * See the LICENSE file in the root directory of this source tree. 424 */const Qo=Ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 425 * @license lucide-react v0.469.0 - ISC 426 * 427 * This source code is licensed under the ISC license. 428 * See the LICENSE file in the root directory of this source tree. 429 */const Di=Ee("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 430 * @license lucide-react v0.469.0 - ISC 431 * 432 * This source code is licensed under the ISC license. 433 * See the LICENSE file in the root directory of this source tree. 434 */const TQ=Ee("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 435 * @license lucide-react v0.469.0 - ISC 436 * 437 * This source code is licensed under the ISC license. 438 * See the LICENSE file in the root directory of this source tree. 439 */const Bxe=Ee("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 440 * @license lucide-react v0.469.0 - ISC 441 * 442 * This source code is licensed under the ISC license. 443 * See the LICENSE file in the root directory of this source tree. 444 */const zxe=Ee("MailWarning",[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]]);/** 445 * @license lucide-react v0.469.0 - ISC 446 * 447 * This source code is licensed under the ISC license. 448 * See the LICENSE file in the root directory of this source tree. 449 */const Ih=Ee("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 450 * @license lucide-react v0.469.0 - ISC 451 * 452 * This source code is licensed under the ISC license. 453 * See the LICENSE file in the root directory of this source tree. 454 */const $xe=Ee("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 455 * @license lucide-react v0.469.0 - ISC 456 * 457 * This source code is licensed under the ISC license. 458 * See the LICENSE file in the root directory of this source tree. 459 */const FM=Ee("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 460 * @license lucide-react v0.469.0 - ISC 461 * 462 * This source code is licensed under the ISC license. 463 * See the LICENSE file in the root directory of this source tree. 464 */const qv=Ee("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 465 * @license lucide-react v0.469.0 - ISC 466 * 467 * This source code is licensed under the ISC license. 468 * See the LICENSE file in the root directory of this source tree. 469 */const Uxe=Ee("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 470 * @license lucide-react v0.469.0 - ISC 471 * 472 * This source code is licensed under the ISC license. 473 * See the LICENSE file in the root directory of this source tree. 474 */const Vxe=Ee("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 475 * @license lucide-react v0.469.0 - ISC 476 * 477 * This source code is licensed under the ISC license. 478 * See the LICENSE file in the root directory of this source tree. 479 */const Hxe=Ee("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** 480 * @license lucide-react v0.469.0 - ISC 481 * 482 * This source code is licensed under the ISC license. 483 * See the LICENSE file in the root directory of this source tree. 484 */const qxe=Ee("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}
484],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/** 485 * @license lucide-react v0.469.0 - ISC 486 * 487 * This source code is licensed under the ISC license. 488 * See the LICENSE file in the root directory of this source tree. 489 */const EQ=Ee("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** 490 * @license lucide-react v0.469.0 - ISC 491 * 492 * This source code is licensed under the ISC license. 493 * See the LICENSE file in the root directory of this source tree. 494 */const Gxe=Ee("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/** 495 * @license lucide-react v0.469.0 - ISC 496 * 497 * This source code is licensed under the ISC license. 498 * See the LICENSE file in the root directory of this source tree. 499 */const Wxe=Ee("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/** 500 * @license lucide-react v0.469.0 - ISC 501 * 502 * This source code is licensed under the ISC license. 503 * See the LICENSE file in the root directory of this source tree. 504 */const BM=Ee("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 505 * @license lucide-react v0.469.0 - ISC 506 * 507 * This source code is licensed under the ISC license. 508 * See the LICENSE file in the root directory of this source tree. 509 */const Lg=Ee("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"}]]);/** 510 * @license lucide-react v0.469.0 - ISC 511 * 512 * This source code is licensed under the ISC license. 513 * See the LICENSE file in the root directory of this source tree. 514 */const vk=Ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 515 * @license lucide-react v0.469.0 - ISC 516 * 517 * This source code is licensed under the ISC license. 518 * See the LICENSE file in the root directory of this source tree. 519 */const Gv=Ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 520 * @license lucide-react v0.469.0 - ISC 521 * 522 * This source code is licensed under the ISC license. 523 * See the LICENSE file in the root directory of this source tree. 524 */const Yxe=Ee("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/** 525 * @license lucide-react v0.469.0 - ISC 526 * 527 * This source code is licensed under the ISC license. 528 * See the LICENSE file in the root directory of this source tree. 529 */const jQ=Ee("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/** 530 * @license lucide-react v0.469.0 - ISC 531 * 532 * This source code is licensed under the ISC license. 533 * See the LICENSE file in the root directory of this source tree. 534 */const Tx=Ee("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 535 * @license lucide-react v0.469.0 - ISC 536 * 537 * This source code is licensed under the ISC license. 538 * See the LICENSE file in the root directory of this source tree. 539 */const Kxe=Ee("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** 540 * @license lucide-react v0.469.0 - ISC 541 * 542 * This source code is licensed under the ISC license. 543 * See the LICENSE file in the root directory of this source tree. 544 */const zM=Ee("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 545 * @license lucide-react v0.469.0 - ISC 546 * 547 * This source code is licensed under the ISC license. 548 * See the LICENSE file in the root directory of this source tree. 549 */const $M=Ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 550 * @license lucide-react v0.469.0 - ISC 551 * 552 * This source code is licensed under the ISC license. 553 * See the LICENSE file in the root directory of this source tree. 554 */const Xxe=Ee("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/** 555 * @license lucide-react v0.469.0 - ISC 556 * 557 * This source code is licensed under the ISC license. 558 * See the LICENSE file in the root directory of this source tree. 559 */const Pg=Ee("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 560 * @license lucide-react v0.469.0 - ISC 561 * 562 * This source code is licensed under the ISC license. 563 * See the LICENSE file in the root directory of this source tree. 564 */const NQ=Ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 565 * @license lucide-react v0.469.0 - ISC 566 * 567 * This source code is licensed under the ISC license. 568 * See the LICENSE file in the root directory of this source tree. 569 */const UM=Ee("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
569y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 570 * @license lucide-react v0.469.0 - ISC 571 * 572 * This source code is licensed under the ISC license. 573 * See the LICENSE file in the root directory of this source tree. 574 */const jh=Ee("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 575 * @license lucide-react v0.469.0 - ISC 576 * 577 * This source code is licensed under the ISC license. 578 * See the LICENSE file in the root directory of this source tree. 579 */const Qxe=Ee("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 580 * @license lucide-react v0.469.0 - ISC 581 * 582 * This source code is licensed under the ISC license. 583 * See the LICENSE file in the root directory of this source tree. 584 */const Db=Ee("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 585 * @license lucide-react v0.469.0 - ISC 586 * 587 * This source code is licensed under the ISC license. 588 * See the LICENSE file in the root directory of this source tree. 589 */const AQ=Ee("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 590 * @license lucide-react v0.469.0 - ISC 591 * 592 * This source code is licensed under the ISC license. 593 * See the LICENSE file in the root directory of this source tree. 594 */const MQ=Ee("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** 595 * @license lucide-react v0.469.0 - ISC 596 * 597 * This source code is licensed under the ISC license. 598 * See the LICENSE file in the root directory of this source tree. 599 */const Zxe=Ee("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 600 * @license lucide-react v0.469.0 - ISC 601 * 602 * This source code is licensed under the ISC license. 603 * See the LICENSE file in the root directory of this source tree. 604 */const Rn=Ee("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 605 * @license lucide-react v0.469.0 - ISC 606 * 607 * This source code is licensed under the ISC license. 608 * See the LICENSE file in the root directory of this source tree. 609 */const RQ=Ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 610 * @license lucide-react v0.469.0 - ISC 611 * 612 * This source code is licensed under the ISC license. 613 * See the LICENSE file in the root directory of this source tree. 614 */const Ig=Ee("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 615 * @license lucide-react v0.469.0 - ISC 616 * 617 * This source code is licensed under the ISC license. 618 * See the LICENSE file in the root directory of this source tree. 619 */const VM=Ee("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);/** 620 * @license lucide-react v0.469.0 - ISC 621 * 622 * This source code is licensed under the ISC license. 623 * See the LICENSE file in the root directory of this source tree. 624 */const ki=Ee("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 625 * @license lucide-react v0.469.0 - ISC 626 * 627 * This source code is licensed under the ISC license. 628 * See the LICENSE file in the root directory of this source tree. 629 */const Jxe=Ee("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** 630 * @license lucide-react v0.469.0 - ISC 631 * 632 * This source code is licensed under the ISC license. 633 * See the LICENSE file in the root directory of this source tree. 634 */const k6=Ee("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 635 * @license lucide-react v0.469.0 - ISC 636 * 637 * This source code is licensed under the ISC license. 638 * See the LICENSE file in the root directory of this source tree. 639 */const _6=Ee("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** 640 * @license lucide-react v0.469.0 - ISC 641 * 642 * This source code is licensed under the ISC license. 643 * See the LICENSE file in the root directory of this source tree. 644 */const Fg=Ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
644],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 645 * @license lucide-react v0.469.0 - ISC 646 * 647 * This source code is licensed under the ISC license. 648 * See the LICENSE file in the root directory of this source tree. 649 */const V1=Ee("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 650 * @license lucide-react v0.469.0 - ISC 651 * 652 * This source code is licensed under the ISC license. 653 * See the LICENSE file in the root directory of this source tree. 654 */const lf=Ee("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 655 * @license lucide-react v0.469.0 - ISC 656 * 657 * This source code is licensed under the ISC license. 658 * See the LICENSE file in the root directory of this source tree. 659 */const eye=Ee("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 660 * @license lucide-react v0.469.0 - ISC 661 * 662 * This source code is licensed under the ISC license. 663 * See the LICENSE file in the root directory of this source tree. 664 */const Lb=Ee("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 665 * @license lucide-react v0.469.0 - ISC 666 * 667 * This source code is licensed under the ISC license. 668 * See the LICENSE file in the root directory of this source tree. 669 */const OQ=Ee("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 670 * @license lucide-react v0.469.0 - ISC 671 * 672 * This source code is licensed under the ISC license. 673 * See the LICENSE file in the root directory of this source tree. 674 */const DQ=Ee("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** 675 * @license lucide-react v0.469.0 - ISC 676 * 677 * This source code is licensed under the ISC license. 678 * See the LICENSE file in the root directory of this source tree. 679 */const tye=Ee("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** 680 * @license lucide-react v0.469.0 - ISC 681 * 682 * This source code is licensed under the ISC license. 683 * See the LICENSE file in the root directory of this source tree. 684 */const LQ=Ee("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** 685 * @license lucide-react v0.469.0 - ISC 686 * 687 * This source code is licensed under the ISC license. 688 * See the LICENSE file in the root directory of this source tree. 689 */const ar=Ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 690 * @license lucide-react v0.469.0 - ISC 691 * 692 * This source code is licensed under the ISC license. 693 * See the LICENSE file in the root directory of this source tree. 694 */const U0=Ee("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/** 695 * @license lucide-react v0.469.0 - ISC 696 * 697 * This source code is licensed under the ISC license. 698 * See the LICENSE file in the root directory of this source tree. 699 */const nye=Ee("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/** 700 * @license lucide-react v0.469.0 - ISC 701 * 702 * This source code is licensed under the ISC license. 703 * See the LICENSE file in the root directory of this source tree. 704 */const rye=Ee("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),iye=Xo("text-sm rounded-lg px-4 py-3 flex items-center gap-3",{variants:{variant:{destructive:"bg-destructive/10 border border-destructive/20 text-destructive",warning:"bg-warning/10 border border-warning/20 text-warning"}},defaultVariants:{variant:"destructive"}}),sye=Y.forwardRef(({message:e,variant:t="destructive",onDismiss:n,className:r,...i},s)=>e?l.jsxs("div",{ref:s,role:"alert",className:re(iye({variant:t}),r),...i,children:[l.jsx("span",{className:"flex-1",children:e}),n&&l.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 p-1 rounded hover:bg-muted transition-colors",children:l.jsx(ar,{className:"h-4 w-4"})})]}):null);sye.displayName="ErrorBanner";const aye=Y.forwardRef(({title:e,description:t,icon:n,action:r,className:i,...s},a)=>l.jsxs("div",{ref:a,className:re("text-center",i),...s,children:[l.jsx("div",{className:"mx-auto w-14 h-14 bg-success/10 rounded-full flex items-center justify-center mb-4",children:n??l.jsx(jl,{className:"h-7 w-7 text-success"})}),l.jsx(hp,{level:3,className:"mb-2",children:e}),l.jsx(xn,{variant:"bodySmall",className:"text-muted-foreground mb-6",children:t}),r]}));aye.displayName="SuccessState";const Ex=Y.forwardRef(({value:e,onSearch:t,debounceMs:n=300,placeholder:r="Search...",className:i,...s},a)=>{const[o,c]=b.useState(e??""),u=b.useRef(null);b.useEffect(()=>{e!==void 0&&c(e)},[e]);const d=b.useCallback(f=>{const m=f.target.value;c(m),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{t(m)},n)},[t,n]),h=b.useCallback(()=>{c(""),t("")},[t]);return b.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),l.jsxs("div",{className:re("relative",i),children:[l.jsx($M,{className:"absolute start-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400 dark:text-gray-500 pointer-events-none","aria-hidden":"true"}),l.jsx("input",{ref:a,type:"search",role:"searchbox","aria-label":typeof r=="string"?r:"Search",value:o,onChange:d,placeholder:r,className:re("w-full rounded-lg border border-gray-300 bg-white px-3 py-3 ps-10 pe-9 text-base text-gray-900 md:text-sm","dar
704k:bg-card dark:border-border dark:text-foreground","placeholder:text-gray-400 dark:placeholder:text-gray-500","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-transparent","transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50"),...s}),o&&l.jsx("button",{type:"button",onClick:h,"aria-label":"Clear search",className:"absolute end-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:l.jsx(ar,{className:"h-3.5 w-3.5 text-gray-500 dark:text-gray-400"})})]})});Ex.displayName="SearchInput";var oye=Object.defineProperty,lye=(e,t)=>oye(e,"name",{value:t,configurable:!0});function T6(e,[t,n]){return Math.min(n,Math.max(t,e))}lye(T6,"clamp");var cye=Object.defineProperty,jx=(e,t)=>cye(e,"name",{value:t,configurable:!0}),PQ=!!(typeof window<"u"&&window.document&&window.document.createElement);function Xt(e,t,{checkForDefaultPrevented:n=!0}={}){return jx(function(i){if(e==null||e(i),n===!1||!i||!i.defaultPrevented)return t==null?void 0:t(i)},"handleEvent")}jx(Xt,"composeEventHandlers");function uye(e){var t;if(!PQ)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}jx(uye,"getOwnerWindow");function E6(e){if(!PQ)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}jx(E6,"getOwnerDocument");function IQ(e,t=!1){const{activeElement:n}=E6(e);if(!(n!=null&&n.nodeName))return null;if(FQ(n)&&n.contentDocument)return IQ(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=E6(n).getElementById(r);if(i)return i}}return n}jx(IQ,"getActiveElement");function FQ(e){return e.tagName==="IFRAME"}jx(FQ,"isFrame");var dye=Object.defineProperty,Do=(e,t)=>dye(e,"name",{value:t,configurable:!0});function hye(e,t){const n=b.createContext(t);n.displayName=e+"Context";const r=Do(s=>{const{children:a,...o}=s,c=b.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:a})},"Provider");r.displayName=e+"Provider";function i(s,a={}){const{optional:o=!1}=a,c=b.useContext(n);if(c)return c;if(t!==void 0)return t;if(!o)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Do(i,"useContext"),[r,i]}Do(hye,"createContext");function sa(e,t=[]){let n=[];function r(s,a){const o=b.createContext(a);o.displayName=s+"Context";const c=n.length;n=[...n,a];const u=Do(h=>{var g;const{scope:f,children:m,...p}=h,x=((g=f==null?void 0:f[e])==null?void 0:g[c])||o,v=b.useMemo(()=>p,Object.values(p));return l.jsx(x.Provider,{value:v,children:m})},"Provider");u.displayName=s+"Provider";function d(h,f,m={}){var g;const{optional:p=!1}=m,x=((g=f==null?void 0:f[e])==null?void 0:g[c])||o,v=b.useContext(x);if(v)return v;if(a!==void 0)return a;if(!p)throw new Error(`\`${h}\` must be used within \`${s}\``)}return Do(d,"useContext"),[u,d]}Do(r,"createContext");const i=Do(()=>{const s=n.map(a=>b.createContext(a));return Do(function(o){const c=(o==null?void 0:o[e])||s;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])},"useScope")},"createScope");return i.scopeName=e,[r,BQ(i,...t)]}Do(sa,"createContextScope");function BQ(...e){const t=e[0];if(e.length===1)return t;const n=Do(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return Do(function(s){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const h=c(s)[`__scope${u}`];return{...o,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Do(BQ,"composeContextScopes");var fye=Object.defineProperty,HM=(e,t)=>fye(e,"name",{value:t,configurable:!0});function j6(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}HM(j6,"setRef");function zQ(...e){return t=>{let n=!1;const r=e.map(i=>{const s=j6(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():j6(e[i],null)}}}}HM(zQ,"composeRefs");function Vn(...e){return b.useCallback(zQ(...e),e)}HM(Vn,"useComposedRefs");var mye=Object.defineProperty,Al=(e,t)=>
704mye(e,"name",{value:t,configurable:!0});function gc(e){const t=b.forwardRef((n,r)=>{let{children:i,...s}=n,a=null,o=!1;const c=[];N6(i)&&typeof s2=="function"&&(i=s2(i._payload)),b.Children.forEach(i,f=>{var m;if(HQ(f)){o=!0;const p=f;let x="child"in p.props?p.props.child:p.props.children;N6(x)&&typeof s2=="function"&&(x=s2(x._payload)),a=xye(p,x),c.push((m=a==null?void 0:a.props)==null?void 0:m.children)}else c.push(f)}),a?a=b.cloneElement(a,void 0,c):!o&&b.Children.count(i)===1&&b.isValidElement(i)&&(a=i);const u=a?VQ(a):void 0,d=Vn(r,u);if(!a){if(i||i===0)throw new Error(o?vye(e):bye(e));return i}const h=UQ(s,a.props??{});return a.type!==b.Fragment&&(h.ref=r?d:u),b.cloneElement(a,h)});return t.displayName=`${e}.Slot`,t}Al(gc,"createSlot");var pye=gc("Slot"),$Q=Symbol.for("radix.slottable");function gye(e){const t=Al(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=$Q,t}Al(gye,"createSlottable");var xye=Al((e,t)=>{if("child"in e.props){const n=e.props.child;return b.isValidElement(n)?b.cloneElement(n,void 0,e.props.children(n.props.children)):null}return b.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function UQ(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const c=s(...o);return i(...o),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}Al(UQ,"mergeProps");function VQ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Al(VQ,"getElementRef");function HQ(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$Q}Al(HQ,"isSlottable");var yye=Symbol.for("react.lazy");function N6(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yye&&"_payload"in e&&qQ(e._payload)}Al(N6,"isLazyComponent");function qQ(e){return typeof e=="object"&&e!==null&&"then"in e}Al(qQ,"isPromiseLike");var bye=Al(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),vye=Al(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),s2=ap[" use ".trim().toString()],wye=Object.defineProperty,Zi=(e,t)=>wye(e,"name",{value:t,configurable:!0});function wk(e){const t=e+"CollectionProvider",[n,r]=sa(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=Zi(x=>{const{scope:v,children:g}=x,y=b.useRef(null),w=b.useRef(new Map).current;return l.jsx(i,{scope:v,itemMap:w,collectionRef:y,children:g})},"CollectionProvider");a.displayName=t;const o=e+"CollectionSlot",c=gc(o),u=b.forwardRef((x,v)=>{const{scope:g,children:y}=x,w=s(o,g),S=Vn(v,w.collectionRef);return l.jsx(c,{ref:S,children:y})});u.displayName=o;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=gc(d),m=b.forwardRef((x,v)=>{const{scope:g,children:y,...w}=x,S=b.useRef(null),C=Vn(v,S),k=s(d,g);return b.useEffect(()=>(k.itemMap.set(S,{ref:S,...w}),()=>void k.itemMap.delete(S))),l.jsx(f,{[h]:"",ref:C,children:y})});m.displayName=d;function p(x){const v=s(e+"CollectionConsumer",x);return b.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((k,_)=>w.indexOf(k.ref.current)-w.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return Zi(p,"useCollection"),[{Provider:a,Slot:u,ItemSlot:m},p,r]}Zi(wk,"createCollection");var BI=new WeakMap,ci,Va,aT=(Va=class extends Map{constructor(n){super(n);_t(this,ci);it(this,ci,[...super.keys()]),BI.set(this,!0)}set(n,r){return BI.get(this)&&(this.has(n)?K(this,ci)[K(this,ci).indexOf(n)]=n:K(this,ci).push(n)),super.set(n,r),this}insert(n,r,i){const s=this.has(r),a=K(this,ci).length,o=qM(n);let c=o>=0?o:a+o;const u=c<0||c>=a?-1:c;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,i),this;const d=this.size+(s?0:1);o<0&&c++;
704const h=[...K(this,ci)];let f,m=!1;for(let p=c;p<d;p++)if(c===p){let x=h[p];h[p]===r&&(x=h[p+1]),s&&this.delete(r),f=this.get(x),this.set(r,i)}else{!m&&h[p-1]===r&&(m=!0);const x=h[m?p:p-1],v=f;f=this.get(x),this.delete(x),this.set(x,v)}return this}with(n,r,i){const s=new Va(this);return s.insert(n,r,i),s}before(n){const r=K(this,ci).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,i){const s=K(this,ci).indexOf(n);return s===-1?this:this.insert(s,r,i)}after(n){let r=K(this,ci).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,i){const s=K(this,ci).indexOf(n);return s===-1?this:this.insert(s+1,r,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return it(this,ci,[]),super.clear()}delete(n){const r=super.delete(n);return r&&K(this,ci).splice(K(this,ci).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=JS(K(this,ci),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=JS(K(this,ci),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return K(this,ci).indexOf(n)}keyAt(n){return JS(K(this,ci),n)}from(n,r){const i=this.indexOf(n);if(i===-1)return;let s=i+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,r){const i=this.indexOf(n);if(i===-1)return;let s=i+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,r){let i=0;for(const s of this){if(Reflect.apply(n,r,[s,i,this]))return s;i++}}findIndex(n,r){let i=0;for(const s of this){if(Reflect.apply(n,r,[s,i,this]))return i;i++}return-1}filter(n,r){const i=[];let s=0;for(const a of this)Reflect.apply(n,r,[a,s,this])&&i.push(a),s++;return new Va(i)}map(n,r){const i=[];let s=0;for(const a of this)i.push([a[0],Reflect.apply(n,r,[a,s,this])]),s++;return new Va(i)}reduce(...n){const[r,i]=n;let s=0,a=i??this.at(0);for(const o of this)s===0&&n.length===1?a=o:a=Reflect.apply(r,this,[a,o,s,this]),s++;return a}reduceRight(...n){const[r,i]=n;let s=i??this.at(-1);for(let a=this.size-1;a>=0;a--){const o=this.at(a);a===this.size-1&&n.length===1?s=o:s=Reflect.apply(r,this,[s,o,a,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new Va(r)}toReversed(){const n=new Va;for(let r=this.size-1;r>=0;r--){const i=this.keyAt(r),s=this.get(i);n.set(i,s)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new Va(r)}slice(n,r){const i=new Va;let s=this.size-1;if(n===void 0)return i;n<0&&(n=n+this.size),r!==void 0&&r>0&&(s=r-1);for(let a=n;a<=s;a++){const o=this.keyAt(a),c=this.get(o);i.set(o,c)}return i}every(n,r){let i=0;for(const s of this){if(!Reflect.apply(n,r,[s,i,this]))return!1;i++}return!0}some(n,r){let i=0;for(const s of this){if(Reflect.apply(n,r,[s,i,this]))return!0;i++}return!1}},ci=new WeakMap,Zi(Va,"OrderedDict"),Va);function JS(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=GQ(e,t);return n===-1?void 0:e[n]}Zi(JS,"at");function GQ(e,t){const n=e.length,r=qM(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Zi(GQ,"toSafeIndex");function qM(e){return e!==e||e===0?0:Math.trunc(e)}Zi(qM,"toSafeInteger");function Sye(e){const t=e+"CollectionProvider",[n,r]=sa(t),[i,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new aT,setItemMap:Zi(()=>{},"setItemMap")}),a=Zi(({state:w,...S})=>w?l.jsx(c,{...S,state:w}):l.jsx(o,{...S}),"CollectionProvider");a.displayName=t;const o=Zi(w=>{const S=v();return l.jsx(c,{...w,state:S})},"CollectionInit");o.displayName=t+"Init";const c=Zi(w=>{const{scope:S,children:C,state:k}=w,_=b.useRef(null),[E,A]=b.useState(null),j=Vn(_,A),[D,M]=k;return b.useEffect(()=>{if(!E)return;const $=KQ(()=>{});return $.observe(E,{childList:!0,subtree:!0}),()=>{$.disconnect()}},[E]),l.jsx(i,{scope:S,itemMap:D,setItemMap:M,collectionRef:j,collectionRefObject:_,collectionElement:E,children:C})},"CollectionProviderImpl");c.displayName=t+"Impl";const u=e+"CollectionSlot",d=gc(u),h=b.forwardRef((w,S)=>{const{scope:C,children:k}=w,_=s(u,C),E=Vn(S,_.collectionRef);return l.jsx(d,{ref:E,children:k})});h.displayName=u;const f=e+"CollectionItemSlot",m="data-radix-collection-item",p=gc(f),x=b.forwardRef((w,S)=>{const{scope:C,children:k,..._}=w,E=b.useRef(null),[A,j]=b.useState(null),D=Vn(S,E,j),M=s(f,C),{setItemMap:$}=M,B=b.useRef(_);WQ(B.current,_)||(B.current=_);const z=B.current;return b.useEffect(()=>{const O=z;return $(P=>A?P.has(A)?P.set(A,{...O,element:A}).toSorted(A6):(P.set(A,{...O,element:A}),P.toSorted(A6)):P),()=>{$(P=>!A||!P.has(A)?P:(P.delete(A),new aT(P)))}},[A,z,$]),l.jsx(p,{[m]:"",ref:D,children:k})});x.displayName=f;function v(){return b.useState(new aT)}Zi(v,"useInitCollection");function g(w){const{itemMap:S}=s(e+"CollectionConsumer",w);return S}return Zi(g,"useCollection"),[{Provider:a,Slot:h,ItemSlot:x},{createCollectionScope:r,useCollection:g,useInitCollection:v}]}Zi(Sye,"createCollection");function WQ(e,t){if(e===t)return!0;
704if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||e[i]!==t[i])return!1;return!0}Zi(WQ,"shallowEqual");function YQ(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Zi(YQ,"isElementPreceding");function A6(e,t){return!e[1].element||!t[1].element?0:YQ(e[1].element,t[1].element)?-1:1}Zi(A6,"sortByDocumentPosition");function KQ(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}Zi(KQ,"getChildListObserver");var Cye=Object.defineProperty,kye=(e,t)=>Cye(e,"name",{value:t,configurable:!0}),_ye=b.createContext(void 0);function Wv(e){const t=b.useContext(_ye);return e||t||"ltr"}kye(Wv,"useDirection");var Tye=Object.defineProperty,Eye=(e,t)=>Tye(e,"name",{value:t,configurable:!0}),jye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jt=jye.reduce((e,t)=>{const n=gc(`Primitive.${t}`),r=b.forwardRef((i,s)=>{const{asChild:a,...o}=i,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function XQ(e,t){e&&td.flushSync(()=>e.dispatchEvent(t))}Eye(XQ,"dispatchDiscreteCustomEvent");var Nye=Object.defineProperty,Aye=(e,t)=>Nye(e,"name",{value:t,configurable:!0});function Uo(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}Aye(Uo,"useCallbackRef");var Mye=Object.defineProperty,Ki=(e,t)=>Mye(e,"name",{value:t,configurable:!0}),M6="dismissableLayer.update",Rye="dismissableLayer.pointerDownOutside",Oye="dismissableLayer.focusOutside",zI,QQ=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),GM=b.forwardRef(Ki(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:c,onDismiss:u,...d}=t,h=b.useContext(QQ),[f,m]=b.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=b.useState({}),v=Vn(n,m),g=Array.from(h.layers),[y]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),w=y?g.indexOf(y):-1,S=f?g.indexOf(f):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,k=S>=w,_=b.useRef(!1),E=JQ(M=>{a==null||a(M),c==null||c(M),M.defaultPrevented||u==null||u()},{ownerDocument:p,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:_,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(M=>{if(!(M instanceof Node))return!1;const $=[...h.branches].some(B=>B.contains(M));return k&&!$},[h.branches,k])}),A=eZ(M=>{if(i&&_.current)return;const $=M.target;[...h.branches].some(z=>z.contains($))||(o==null||o(M),c==null||c(M),M.defaultPrevented||u==null||u())},p),j=f?S===g.length-1:!1,D=Uo(M=>{M.key==="Escape"&&(s==null||s(M),!M.defaultPrevented&&u&&(M.preventDefault(),u()))});return b.useEffect(()=>{if(j)return p.addEventListener("keydown",D,{capture:!0}),()=>p.removeEventListener("keydown",D,{capture:!0})},[p,j,D]),b.useEffect(()=>{if(f)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(zI=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(f)),h.layers.add(f),R6(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(f),h.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=zI))}},[f,p,r,h]),b.useEffect(()=>()=>{f&&(h.layers.delete(f),h.layersWithOutsidePointerEventsDisabled.delete(f),R6())},[f,h]),b.useEffect(()=>{const M=Ki(()=>x({}),"handleUpdate");return document.addEventListener(M6,M),()=>document.removeEventListener(M6,M)},[]),l.jsx(Jt.div,{...d,ref:v,style:{pointerEvents:C?k?"auto":"none":void 0,...t.style},onFocusCapture:Xt(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Xt(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Xt(t.onPointerDownCapture,E.onPointerDownCapture)})},"DismissableLayer"));function ZQ(){const e=b.useContext(QQ),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ki(ZQ,"useDismissableLayerSurface");var Dye=Ki(()=>!0,"IS_TRUE");function JQ(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:s,shouldHandlePointerDownOutside:a=Dye}=t,o=Uo(e),c=b.useRef(!1),u=b.useRef(!1),d=b.useRef(new Map),h=b.useRef(()=>{});return b.useEffect(()=>{function f(){u.current=!1,i.current=!1,d.current.clear()}Ki(f,"resetOutsideInteraction");function m(){return Array.from(d.current.values()).some(Boolean)}Ki(m,"isOutsideInteractionIntercepted");function p(w){if(!u.current)return;const S=w.target;S instanceof Node&&[...s].some(k=>k.contains(S))||d.current.set(w.type,!0),w.type==="click"&&window.setTimeout(()=>{u.current&&h.current()},0)}Ki(p,"handleInteractionCapture");function x(w){u.current&&d.current.set(w.type,!1)}Ki(x,"handleInteractionBubble");const v=Ki(w=>{if(w.target&&!c.current){let S=function(){n.removeEventListener("click",h.current);const k=m();f(),k||WM(Rye,o,C,{discrete:!0})};if(Ki(S,"handleAndDispatchPointerDownOutsideEvent"),!a(w.target)){n.removeEventListener("click",h.current),f(),c.current=!1;return}const C={originalEvent:w};u.current=!0,i.current=r&&w.button===0,d.current.clear(),!r||w.button!==0?S():(n.removeEventListener("click",h.current),h.current=S,n.addEventListener("click",h.current,{once:!0}))}else n.removeEventListener("click",h.current),f();c.current=!1},"handlePointerDown"),g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const w of g)n.addEventListener(w,p,!0),n.addEventListener(w,x);const y=window.setTimeout(()=>{n.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(y),n.removeEventListener("pointerdown",v),n.removeEventListener("click",h.current);for(const w of g)n.removeEventListener(w,p,!0),n.removeEventListener(w,x)}},[n,o,r,i,s,a]),{onPointerDownCapture:Ki(()=>c.current=!0,"onPointerDownCapture")}}Ki(JQ,"usePointerDownOutside");function eZ(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),r=b.useRef(!1);return b.useEffect(()=>{const i=Ki(s=>{s.target&&!r.current&&WM(Oye,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:Ki(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ki(()=>r.current=!1,"onBlurCapture")}}Ki(eZ,"useFocusOutside");function R6(){const e=new CustomEvent(M6);document.dispatchEvent(e)}
704Ki(R6,"dispatchUpdate");function WM(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?XQ(i,s):i.dispatchEvent(s)}Ki(WM,"handleAndDispatchCustomEvent");var Lye=Object.defineProperty,YM=(e,t)=>Lye(e,"name",{value:t,configurable:!0}),a2=0,Il=null;function Pye(e){return Yv(),e.children}YM(Pye,"FocusGuards");function Yv(){b.useEffect(()=>{Il||(Il={start:O6(),end:O6()});const{start:e,end:t}=Il;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),a2++,()=>{a2===1&&(Il==null||Il.start.remove(),Il==null||Il.end.remove(),Il=null),a2=Math.max(0,a2-1)}},[])}YM(Yv,"useFocusGuards");function O6(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}YM(O6,"createFocusGuard");var Iye=Object.defineProperty,Qs=(e,t)=>Iye(e,"name",{value:t,configurable:!0}),oT="focusScope.autoFocusOnMount",lT="focusScope.autoFocusOnUnmount",$I={bubbles:!1,cancelable:!0},KM=b.forwardRef(Qs(function(t,n){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...o}=t,[c,u]=b.useState(null),d=Uo(s),h=Uo(a),f=b.useRef(null),m=Vn(n,u),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let v=function(S){if(p.paused||!c)return;const C=S.target;c.contains(C)?f.current=C:Jc(f.current,{select:!0})},g=function(S){if(p.paused||!c)return;const C=S.relatedTarget;C!==null&&(c.contains(C)||Jc(f.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const k of S)k.removedNodes.length>0&&Jc(c)};Qs(v,"handleFocusIn"),Qs(g,"handleFocusOut"),Qs(y,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",g);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),w.disconnect()}}},[i,c,p.paused]),b.useEffect(()=>{if(c){UI.add(p);const v=document.activeElement;if(!c.contains(v)){const y=new CustomEvent(oT,$I);c.addEventListener(oT,d),c.dispatchEvent(y),y.defaultPrevented||(tZ(aZ(XM(c)),{select:!0}),document.activeElement===v&&Jc(c))}return()=>{c.removeEventListener(oT,d),setTimeout(()=>{const y=new CustomEvent(lT,$I);c.addEventListener(lT,h),c.dispatchEvent(y),y.defaultPrevented||Jc(v??document.body,{select:!0}),c.removeEventListener(lT,h),UI.remove(p)},0)}}},[c,d,h,p]);const x=b.useCallback(v=>{if(!r&&!i||p.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(g&&y){const w=v.currentTarget,[S,C]=nZ(w);S&&C?!v.shiftKey&&y===C?(v.preventDefault(),r&&Jc(S,{select:!0})):v.shiftKey&&y===S&&(v.preventDefault(),r&&Jc(C,{select:!0})):y===w&&v.preventDefault()}},[r,i,p.paused]);return l.jsx(Jt.div,{tabIndex:-1,...o,ref:m,onKeyDown:x})},"FocusScope"));function tZ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Jc(r,{select:t}),document.activeElement!==n)return}Qs(tZ,"focusFirst");function nZ(e){const t=XM(e),n=D6(t,e),r=D6(t.reverse(),e);return[n,r]}Qs(nZ,"getTabbableEdges");function XM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Qs(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Qs(XM,"getTabbableCandidates");function D6(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):rZ(r,{upTo:t})))return r}Qs(D6,"findVisible");function rZ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Qs(rZ,"isHidden");function iZ(e){return e instanceof HTMLInputElement&&"select"in e}Qs(iZ,"isSelectableInput");
704function Jc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&iZ(e)&&t&&e.select()}}Qs(Jc,"focus");var UI=sZ();function sZ(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=L6(e,t),e.unshift(t)},remove(t){var n;e=L6(e,t),(n=e[0])==null||n.resume()}}}Qs(sZ,"createFocusScopesStack");function L6(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Qs(L6,"arrayRemove");function aZ(e){return e.filter(t=>t.tagName!=="A")}Qs(aZ,"removeLinks");var Ir=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Fye=Object.defineProperty,Bye=(e,t)=>Fye(e,"name",{value:t,configurable:!0}),zye=ap[" useId ".trim().toString()]||(()=>{}),$ye=0;function Sl(e){const[t,n]=b.useState(zye());return Ir(()=>{e||n(r=>r??String($ye++))},[e]),e||(t?`radix-${t}`:"")}Bye(Sl,"useId");const Uye=["top","right","bottom","left"],Fh=Math.min,bu=Math.max,m4=Math.round,o2=Math.floor,vu=e=>({x:e,y:e}),Vye={left:"right",right:"left",bottom:"top",top:"bottom"};function oZ(e,t,n){return bu(e,Fh(t,n))}function Bu(e,t){return typeof e=="function"?e(t):e}function Bh(e){return e.split("-")[0]}function Nx(e){return e.split("-")[1]}function QM(e){return e==="x"?"y":"x"}function ZM(e){return e==="y"?"height":"width"}function tc(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function JM(e){return QM(tc(e))}function Hye(e,t,n){n===void 0&&(n=!1);const r=Nx(e),i=JM(e),s=ZM(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=p4(a)),[a,p4(a)]}function qye(e){const t=p4(e);return[P6(e),t,P6(t)]}function P6(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const VI=["left","right"],HI=["right","left"],Gye=["top","bottom"],Wye=["bottom","top"];function Yye(e,t,n){switch(e){case"top":case"bottom":return n?t?HI:VI:t?VI:HI;case"left":case"right":return t?Gye:Wye;default:return[]}}function Kye(e,t,n,r){const i=Nx(e);let s=Yye(Bh(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(P6)))),s}function p4(e){const t=Bh(e);return Vye[t]+e.slice(t.length)}function Xye(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function lZ(e){return typeof e!="number"?Xye(e):{top:e,right:e,bottom:e,left:e}}function g4(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function qI(e,t,n){let{reference:r,floating:i}=e;const s=tc(t),a=JM(t),o=ZM(a),c=Bh(t),u=s==="y",d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let m;switch(c){case"top":m={x:d,y:r.y-i.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-i.width,y:h};break;default:m={x:r.x,y:r.y}}const p=Nx(t);return p&&(m[a]+=f*(p==="end"?1:-1)*(n&&u?-1:1)),m}async function Qye(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Bu(t,e),p=lZ(m),v=o[f?h==="floating"?"reference":"floating":h],g=g4(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:c})),y=h==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(w))&&await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1},C=g4(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:w,strategy:c}):y);return{top:(g.top-C.top+p.top)/S.y,bottom:(C.bottom-g.bottom+p.bottom)/S.y,left:(g.left-C.left+p.left)/S.x,right:(C.right-g.right+p.right)/S.x}}const Zye=50,Jye=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=a.detectOverflow?a:{...a,detectOverflow:Qye},c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}
vendor: 7,253 bytes, line 704
704),{x:d,y:h}=qI(u,r,c),f=r,m=0;const p={};for(let x=0;x<s.length;x++){const v=s[x];if(!v)continue;const{name:g,fn:y}=v,{x:w,y:S,data:C,reset:k}=await y({x:d,y:h,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=w??d,h=S??h,p[g]={...p[g],...C},k&&m<Zye&&(m++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:d,y:h}=qI(u,f,c)),x=-1)}return{x:d,y:h,placement:f,strategy:i,middlewareData:p}},e1e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:c}=t,{element:u,padding:d=0}=Bu(e,t)||{};if(u==null)return{};const h=lZ(d),f={x:n,y:r},m=JM(i),p=ZM(m),x=await a.getDimensions(u),v=m==="y",g=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[m]-f[m]-s.floating[p],C=f[m]-s.reference[m],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let _=k?k[w]:0;(!_||!await(a.isElement==null?void 0:a.isElement(k)))&&(_=o.floating[w]||s.floating[p]);const E=S/2-C/2,A=_/2-x[p]/2-1,j=Fh(h[g],A),D=Fh(h[y],A),M=_-x[p]-D,$=_/2-x[p]/2+E,B=oZ(j,$,M),z=!c.arrow&&Nx(i)!=null&&$!==B&&s.reference[p]/2-($<j?j:D)-x[p]/2<0,O=z?$<j?$-j:$-M:0;return{[m]:f[m]+O,data:{[m]:B,centerOffset:$-B-O,...z&&{alignmentOffset:O}},reset:z}}}),t1e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...v}=Bu(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Bh(i),y=tc(o),w=Bh(o)===o,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=f||(w||!x?[p4(o)]:qye(o)),k=p!=="none";!f&&k&&C.push(...Kye(o,x,p,S));const _=[o,...C],E=await c.detectOverflow(t,v),A=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(E[g]),h){const B=Hye(i,a,S);A.push(E[B[0]],E[B[1]])}if(j=[...j,{placement:i,overflows:A}],!A.every(B=>B<=0)){var D,M;const B=(((D=s.flip)==null?void 0:D.index)||0)+1,z=_[B];if(z&&(!(h==="alignment"?y!==tc(z):!1)||j.every(I=>tc(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:B,overflows:j},reset:{placement:z}};let O=(M=j.filter(P=>P.overflows[0]<=0).sort((P,I)=>P.overflows[1]-I.overflows[1])[0])==null?void 0:M.placement;if(!O)switch(m){case"bestFit":{var $;const P=($=j.filter(I=>{if(k){const q=tc(I.placement);return q===y||q==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(q=>q>0).reduce((q,R)=>q+R,0)]).sort((I,q)=>I[1]-q[1])[0])==null?void 0:$[0];P&&(O=P);break}case"initialPlacement":O=o;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function GI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WI(e){return Uye.some(t=>e[t]>=0)}const n1e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=Bu(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),o=GI(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:WI(o)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),o=GI(a,n.floating);return{data:{escapedOffsets:o,escaped:WI(o)}}}default:return{}}}}},cZ=new Set(["left","top"]);async function r1e(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Bh(n),o=Nx(n),c=tc(n)==="y",u=cZ.has(a)?-1:1,d=s&&c?-1:1,h=Bu(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof p=="number"&&(m=o==="end"?p*-1:p),c?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const i1e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,c=await r1e(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},s1e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:c={fn:y=>{let{x:w,y:S}=y;return{x:w,y:S}}},...u}=Bu(e,t),d={x:n,y:r},h=await s.detectOverflow(t,u),f=tc(i),m=QM(f);let p=d[m],x=d[f];const v=(y,w)=>oZ(w+h[y==="y"?"top":"left"],w,w-h[y==="y"?"bottom":"right"]);a&&(p=v(m,p)),o&&(x=v(f,x));const g=c.fn({...t,[m]:p,[f]:x});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:a,[f]:o}}}}}},a1e=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:s,placement:a,rects:o,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=Bu(e,t),f={x:i,y:s},m=tc(a),p=QM(m);let x=f[p],v=f[m];const g=Bu(u,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(r=g.crossAxis)!=null?r:0};if(d){const C=p==="y"?"height":"width",k=o.reference[p]-o.floating[C]+y.mainAxis,_=o.reference[p]+o.reference[C]-y.mainAxis;x<k?x=k:x>_&&(x=_)}if(h){var w,S;const C=p==="y"?"width":"height",k=cZ.has(Bh(a)),_=o.reference[m]-o.floating[C]+(k&&((w=c.offset)==null?void 0:w[m])||0)+(k?0:y.crossAxis),E=o.reference[m]+o.reference[C]+(k?0:((S=c.offset)==null?void 0:S[m])||0)-(k?y.crossAxis:0);v<_?v=_:v>E&&(v=E)}return{[p]:x,[m]:v}}}},o1e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:a=()=>{},...o}=Bu(e,t),c=await i.detectOverflow(t,o),u=Bh(n),d=Nx(n),h=tc(n)==="y",{width:f,height:m}=r.floating;let p,x;u==="top"||u==="bottom"?(p=u,x=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=u,p=d==="end"?"top":"bottom");const v=m-c.top-c.bottom,g=f-c.left-c.right,y=Fh(m-c[p],v),w=Fh(f-c[x],g),S=t.middlewareData.shift,C=!S;let k=y,_=w;S!=null&&S.enabled.x&&(_=g),S!=null&&S.enabled.y&&(k=v),C&&!d&&(h?_=f-2*bu(c.left,c.right):k=m-2*bu(c.top,c.bottom)),await a({...t,availableWidth:_,availableHeight:k});const E=await i.getDimensions(s.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function Sk(){return typeof window<"u"}function Ax(e){return uZ(e)?(e.nodeName||"").toLowerCase():"#document"}function Ta(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ld(e){var t;return(t=(uZ(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uZ(e){return Sk()?e instanceof Node||e instanceof Ta(e).Node:!1}function xc(e){return Sk()?e instanceof Element||e instanceof Ta(e).Element:!1}function cf(e){return Sk()?e instanceof HTMLElement||e instanceof Ta(e).HTMLElement:!1}function YI(e){return!Sk()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ta(e).ShadowRoot}function Ck(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=yc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function l1e(e){return/^(table|td|th)$/.test(Ax(e))}function kk(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}
704const c1e=/transform|translate|scale|rotate|perspective|filter/,u1e=/paint|layout|strict|content/,kf=e=>!!e&&e!=="none";let cT;function eR(e){const t=xc(e)?yc(e):e;return kf(t.transform)||kf(t.translate)||kf(t.scale)||kf(t.rotate)||kf(t.perspective)||!tR()&&(kf(t.backdropFilter)||kf(t.filter))||c1e.test(t.willChange||"")||u1e.test(t.contain||"")}function d1e(e){let t=$m(e);for(;cf(t)&&!Pb(t);){if(eR(t))return t;if(kk(t))return null;t=$m(t)}return null}function tR(){return cT==null&&(cT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cT}function Pb(e){return/^(html|body|#document)$/.test(Ax(e))}function yc(e){return Ta(e).getComputedStyle(e)}function _k(e){return xc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $m(e){if(Ax(e)==="html")return e;const t=e.assignedSlot||e.parentNode||YI(e)&&e.host||ld(e);return YI(t)?t.host:t}function dZ(e){const t=$m(e);return Pb(t)?(e.ownerDocument||e).body:cf(t)&&Ck(t)?t:dZ(t)}function Ib(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=dZ(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ta(i);if(s){const o=I6(a);return t.concat(a,a.visualViewport||[],Ck(i)?i:[],o&&n?Ib(o):[])}else return t.concat(i,Ib(i,[],n))}function I6(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hZ(e){const t=yc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=cf(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=m4(n)!==s||m4(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function nR(e){return xc(e)?e:e.contextElement}function V0(e){const t=nR(e);if(!cf(t))return vu(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=hZ(t);let a=(s?m4(n.width):n.width)/r,o=(s?m4(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const h1e=vu(0);function fZ(e){const t=Ta(e);return!tR()||!t.visualViewport?h1e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f1e(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ta(e)}function Um(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=nR(e);let a=vu(1);t&&(r?xc(r)&&(a=V0(r)):a=V0(e));const o=f1e(s,n,r)?fZ(s):vu(0);let c=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,d=i.width/a.x,h=i.height/a.y;if(s&&r){const f=Ta(s),m=xc(r)?Ta(r):r;let p=f,x=I6(p);for(;x&&m!==p;){const v=V0(x),g=x.getBoundingClientRect(),y=yc(x),w=g.left+(x.clientLeft+parseFloat(y.paddingLeft))*v.x,S=g.top+(x.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,h*=v.y,c+=w,u+=S,p=Ta(x),x=I6(p)}}return g4({width:d,height:h,x:c,y:u})}function Tk(e,t){const n=_k(e).scrollLeft;return t?t.left+n:Um(ld(e)).left+n}function mZ(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tk(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function m1e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=ld(r),o=t?kk(t.floating):!1;if(r===a||o&&s)return n;let c={scrollLeft:0,scrollTop:0},u=vu(1);const d=vu(0),h=cf(r);if((h||!s)&&((Ax(r)!=="body"||Ck(a))&&(c=_k(r)),h)){const m=Um(r);u=V0(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=a&&!h&&!s?mZ(a,c):vu(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function p1e(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function g1e(e){const t=_k(e),n=e.ownerDocument.body,r=bu(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=bu(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Tk(e);const a=-t.scrollTop;return yc(n).direction==="rtl"&&(s+=bu(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:s,y:a}}const x1e=25;function y1e(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",i=Ta(e),s=ld(e),a=i.visualViewport;let o=s.clientWidth,c=s.clientHeight,u=0,d=0;if(a){const f=!tR()||t==="fixed";r?f||(u=-a.offsetLeft,d=-a.offsetTop):(o=a.width,c=a.height,f&&(u=a.offsetLeft,d=a.offsetTop))}if(Tk(s)<=0){const f=s.ownerDocument,m=f.body,p=getComputedStyle(m),x=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(s.clientWidth-m.clientWidth-x),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;g<=x1e&&(o-=g)}return{width:o,height:c,x:u,y:d}}function b1e(e,t){const n=Um(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=V0(e),a=e.clientWidth*s.x,o=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:a,height:o,x:c,y:u}}function KI(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=y1e(e,n,t);else if(t==="document")r=g1e(ld(e));else if(xc(t))r=b1e(t,n);else{const i=fZ(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return g4(r)}function v1e(e,t){const n=t.get(e);if(n)return n;let r=Ib(e,[],!1).filter(o=>xc(o)&&Ax(o)!=="body"),i=null;const s=yc(e).position==="fixed";let a=s?$m(e):e;for(;xc(a)&&!Pb(a);){const o=yc(a),c=eR(a),u=i?i.position:s?"fixed":"";!c&&(u==="fixed"||u==="absolute"&&o.position==="static")?r=r.filter(h=>h!==a):i=o,a=$m(a)}return t.set(e,r),r}function w1e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?kk(t)?[]:v1e(t,this._c):[].concat(n),r],o=KI(t,a[0],i);let c=o.top,u=o.right,d=o.bottom,h=o.left;for(let f=1;f<a.length;f++){const m=KI(t,a[f],i);c=bu(m.top,c),u=Fh(m.right,u),d=Fh(m.bottom,d),h=bu(m.left,h)}return{width:u-h,height:d-c,x:h,y:c}}function S1e(e){const{width:t,height:n}=hZ(e);return{width:t,height:n}}function C1e(e,t,n){const r=cf(t),i=ld(t),s=n==="fixed",a=Um(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const c=vu(0);if((r||!s)&&((Ax(t)!=="body"||Ck(i))&&(o=_k(t)),r)){const f=Um(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}!r&&i&&(c.x=Tk(i));const u=i&&!r&&!s?mZ(i,o):vu(0),d=a.left+o.scrollLeft-c.x-u.x,h=a.top+o.scrollTop-c.y-u.y;return{x:d,y:h,width:a.width,height:a.height}}function uT(e){return yc(e).position==="static"}function XI(e,t){if(!cf(e)||yc(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ld(e)===n&&(n=n.ownerDocument.body),n}function pZ(e,t){const n=Ta(e);if(kk(e))return n;if(!cf(e)){let i=$m(e);for(;i&&!Pb(i);){if(xc(i)&&!uT(i))return i;i=$m(i)}return n}let r=XI(e,t);for(;r&&l1e(r)&&uT(r);)r=XI(r,t);return r&&Pb(r)&&uT(r)&&!eR(r)?n:r||d1e(e)||n}const k1e=async function(e){const t=this.getOffsetParent||pZ,n=this.getDimensions,r=await n(e.floating);return{reference:C1e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _1e(e){return yc(e).direction==="rtl"}const T1e={convertOffsetParentRelativeRectToViewportRelativeRect:m1e,getDocumentElement:ld,getClippingRect:w1e,getOffsetParent:pZ,getElementRects:k1e,getClientRects:p1e,getDimensions:S1e,getScale:V0,isElement:xc,isRTL:_1e};function gZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function E1e(e,t,n){let r=null,i;const s=ld(e);function a(){var d;clearTimeout(i),(d=r)==null||d.disconnect(),r=null}function o(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),a();const f=e.getBoundingClientRect(),{left:m,top:p,width:x,height:v}=f;if(d||t(),!x||!v)return;const g=o2(p),y=o2(s.clientWidth-(m+x)),w=o2(s.clientHeight-(p+v)),S=o2(m),k={rootMargin:-g+"px "+-y+"px "+-w+"px "+-S+"px",threshold:bu(0,Fh(1,h))||1};let _=!0;function E(A){const j=A[0].intersectionRatio;if(!gZ(f,e.getBoundingClientRect()))return o();if(j!==h){if(!_)return o();j?o(!1,j):i=setTimeout(()=>{o(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(E,{...k,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,k)}r.observe(e)}const c=Ta(e),u=()=>o(n);return c.addEventListener("resize",u),o(!0),()=>{c.removeEventListener("resize",u),a()}}function j1e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=nR(e),d=i||s?[...u?Ib(u):[],...t?Ib(t):[]]:[];d.forEach(g=>{i&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const h=u&&o?E1e(u,n,s):null;let f=-1,m=null;a&&(m=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),t&&m.observe(t));let p,x=c?Um(e):null;c&&v();function v(){const g=Um(e);x&&!gZ(x,g)&&n(),x=g,p=requestAnimationFrame(v)}return n(),()=>{var g;d.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const N1e=i1e,A1e=s1e,M1e=t1e,R1e=o1e,O1e=n1e,QI=e1e,D1e=a1e,L1e=(e,t,n)=>{const r=new Map,i=n??{},s={...T1e,...i.platform,_c:r};return Jye(e,t,{...i,platform:s})};var P1e=typeof document<"u",I1e=function(){},eC=P1e?b.useLayoutEffect:I1e;function x4(e,t){if(e===t)return!0;
vendor: 5,329 bytes, line 704
704if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!x4(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!x4(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function xZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ZI(e,t){const n=xZ(e);return Math.round(t*n)/n}function dT(e){const t=b.useRef(e);return eC(()=>{t.current=e}),t}function F1e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=e,[d,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=b.useState(r);x4(f,r)||m(r);const[p,x]=b.useState(null),[v,g]=b.useState(null),y=b.useCallback(I=>{I!==k.current&&(k.current=I,x(I))},[]),w=b.useCallback(I=>{I!==_.current&&(_.current=I,g(I))},[]),S=s||p,C=a||v,k=b.useRef(null),_=b.useRef(null),E=b.useRef(d),A=c!=null,j=dT(c),D=dT(i),M=dT(u),$=b.useCallback(()=>{if(!k.current||!_.current)return;const I={placement:t,strategy:n,middleware:f};D.current&&(I.platform=D.current),L1e(k.current,_.current,I).then(q=>{const R={...q,isPositioned:M.current!==!1};B.current&&!x4(E.current,R)&&(E.current=R,td.flushSync(()=>{h(R)}))})},[f,t,n,D,M]);eC(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,h(I=>({...I,isPositioned:!1})))},[u]);const B=b.useRef(!1);eC(()=>(B.current=!0,()=>{B.current=!1}),[]),eC(()=>{if(S&&(k.current=S),C&&(_.current=C),S&&C){if(j.current)return j.current(S,C,$);$()}},[S,C,$,j,A]);const z=b.useMemo(()=>({reference:k,floating:_,setReference:y,setFloating:w}),[y,w]),O=b.useMemo(()=>({reference:S,floating:C}),[S,C]),P=b.useMemo(()=>{const I={position:n,left:0,top:0};if(!O.floating)return I;const q=ZI(O.floating,d.x),R=ZI(O.floating,d.y);return o?{...I,transform:"translate("+q+"px, "+R+"px)",...xZ(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:R}},[n,o,O.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:$,refs:z,elements:O,floatingStyles:P}),[d,$,z,O,P])}const B1e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?QI({element:r.current,padding:i}).fn(n):{}:r?QI({element:r,padding:i}).fn(n):{}}}},z1e=(e,t)=>{const n=N1e(e);return{name:n.name,fn:n.fn,options:[e,t]}},$1e=(e,t)=>{const n=A1e(e);return{name:n.name,fn:n.fn,options:[e,t]}},U1e=(e,t)=>({fn:D1e(e).fn,options:[e,t]}),V1e=(e,t)=>{const n=M1e(e);return{name:n.name,fn:n.fn,options:[e,t]}},H1e=(e,t)=>{const n=R1e(e);return{name:n.name,fn:n.fn,options:[e,t]}},q1e=(e,t)=>{const n=O1e(e);return{name:n.name,fn:n.fn,options:[e,t]}},G1e=(e,t)=>{const n=B1e(e);return{name:n.name,fn:n.fn,options:[e,t]}};var W1e=Object.defineProperty,Y1e=(e,t)=>W1e(e,"name",{value:t,configurable:!0}),K1e=b.forwardRef(Y1e(function(t,n){const{children:r,width:i=10,height:s=5,...a}=t;return l.jsx(Jt.svg,{...a,ref:n,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),X1e=K1e,Q1e=Object.defineProperty,Z1e=(e,t)=>Q1e(e,"name",{value:t,configurable:!0});function Ek(e){const[t,n]=b.useState(void 0);return Ir(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}Z1e(Ek,"useSize");var J1e=Object.defineProperty,wu=(e,t)=>J1e(e,"name",{value:t,configurable:!0}),yZ="Popper",[bZ,Mx]=sa(yZ),[ebe,vZ]=bZ(yZ),tbe=wu(e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[s,a]=b.useState(void 0);return l.jsx(ebe,{scope:t,anchor:r,onAnchorChange:i,placementState:s,setPlacementState:a,children:n})},"Popper"),nbe="PopperAnchor",rbe=b.forwardRef(wu(function(t,n){const{__scopePopper:r,virtualRef:i,...s}=t,a=vZ(nbe,r),o=b.useRef(null),c=a.onAnchorChange,u=b.useCallback(x=>{o.current=x,x&&c(x)},[c]),d=Vn(n,u),h=b.useRef(null);b.useEffect(()=>{if(!i)return;const x=h.current;h.current=i.current,x!==h.current&&c(h.current)});const f=a.placementState&&jk(a.placementState),m=f==null?void 0:f[0],p=f==null?void 0:f[1];return i?null:l.jsx(Jt.div,{"data-radix-popper-side":m,"data-radix-popper-align":p,...s,ref:d})},"PopperAnchor")),wZ="PopperContent",[ibe,sbe]=bZ(wZ),abe=b.forwardRef(wu(function(t,n){var Se,He,tt,we,Oe,Je,It;const{__scopePopper:r,side:i="bottom",sideOffset:s=0,align:a="center",alignOffset:o=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:x,...v}=t,g=vZ(wZ,r),[y,w]=b.useState(null),S=Vn(n,w),[C,k]=b.useState(null),_=Ek(C),E=(_==null?void 0:_.width)??0,A=(_==null?void 0:_.he
704ight)??0,j=i+(a!=="center"?"-"+a:""),D=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},M=Array.isArray(d)?d:[d],$=M.length>0,B={padding:D,boundary:M.filter(SZ),altBoundary:$},{refs:z,floatingStyles:O,placement:P,isPositioned:I,middlewareData:q}=F1e({strategy:"fixed",placement:j,whileElementsMounted:wu((...mt)=>j1e(...mt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[z1e({mainAxis:s+A,alignmentAxis:o}),u&&$1e({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?U1e():void 0,...B}),u&&V1e({...B}),H1e({...B,apply:wu(({elements:mt,rects:De,availableWidth:Pe,availableHeight:ct})=>{const{width:Tn,height:Nn}=De.reference,ln=mt.floating.style;ln.setProperty("--radix-popper-available-width",`${Pe}px`),ln.setProperty("--radix-popper-available-height",`${ct}px`),ln.setProperty("--radix-popper-anchor-width",`${Tn}px`),ln.setProperty("--radix-popper-anchor-height",`${Nn}px`)},"apply")}),C&&G1e({element:C,padding:c}),ube({arrowWidth:E,arrowHeight:A}),m&&q1e({strategy:"referenceHidden",...B,boundary:$?B.boundary:void 0})]}),R=g.setPlacementState;Ir(()=>(R(P),()=>{R(void 0)}),[P,R]);const[xe,me]=jk(P),U=Uo(x);Ir(()=>{I&&(U==null||U())},[I,U]);const ae=(Se=q.arrow)==null?void 0:Se.x,Ce=(He=q.arrow)==null?void 0:He.y,je=((tt=q.arrow)==null?void 0:tt.centerOffset)!==0,[ve,Te]=b.useState();return Ir(()=>{y&&Te(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:I?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(we=q.transformOrigin)==null?void 0:we.x,(Oe=q.transformOrigin)==null?void 0:Oe.y].join(" "),...((Je=q.hide)==null?void 0:Je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(ibe,{scope:r,placedSide:xe,placedAlign:me,onArrowChange:k,arrowX:ae,arrowY:Ce,shouldHideArrow:je,children:l.jsx(Jt.div,{"data-side":xe,"data-align":me,...v,ref:S,style:{...v.style,animation:I?(It=v.style)==null?void 0:It.animation:"none"}})})})},"PopperContent")),obe="PopperArrow",lbe={top:"bottom",right:"left",bottom:"top",left:"right"},cbe=b.forwardRef(wu(function(t,n){const{__scopePopper:r,...i}=t,s=sbe(obe,r),a=lbe[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(X1e,{...i,ref:n,style:{...i.style,display:"block"}})})},"PopperArrow"));function SZ(e){return e!==null}wu(SZ,"isNotNull");var ube=wu(e=>({name:"transformOrigin",options:e,fn(t){var v,g,y;const{placement:n,rects:r,middlewareData:i}=t,a=((v=i.arrow)==null?void 0:v.centerOffset)!==0,o=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=jk(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((g=i.arrow)==null?void 0:g.x)??0)+o/2,m=(((y=i.arrow)==null?void 0:y.y)??0)+c/2;let p="",x="";return u==="bottom"?(p=a?h:`${f}px`,x=`${-c}px`):u==="top"?(p=a?h:`${f}px`,x=`${r.floating.height+c}px`):u==="right"?(p=`${-c}px`,x=a?h:`${m}px`):u==="left"&&(p=`${r.floating.width+c}px`,x=a?h:`${m}px`),{data:{x:p,y:x}}}}),"transformOrigin");function jk(e){const[t,n="center"]=e.split("-");return[t,n]}wu(jk,"getSideAndAlignFromPlacement");var CZ=tbe,kZ=rbe,_Z=abe,dbe=cbe,hbe=Object.defineProperty,fbe=(e,t)=>hbe(e,"name",{value:t,configurable:!0}),rR=b.forwardRef(fbe(function(t,n){var c;const{container:r,...i}=t,[s,a]=b.useState(!1);Ir(()=>a(!0),[]);const o=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return o?td.createPortal(l.jsx(Jt.div,{...i,ref:n}),o):null},"Portal")),mbe=Object.defineProperty,zu=(e,t)=>mbe(e,"name",{value:t,configurable:!0});function TZ(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}zu(TZ,"useStateMachine");var cd=zu(e=>{const{present:t,children:n}=e,r=EZ(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),s=jZ(r.ref,NZ(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:s}):null},"Presence");function EZ(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),s=b.useRef("none"),a=b.useRef(void 0),o=e?"mounted":"unmounted",[c,u]=TZ(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{c==="mounted"?(s.current=a.current??Jp(r.current),a.current=void 0):s.current="none"},[c]),Ir(()=>{const d=r.current,h=i.current;if(h!==e){const m=s.current,p=Jp(d);e?(a.current=p,u("MOUNT")):p==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(h&&m!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Ir(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,f=zu(p=>{const v=Jp(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},"handleAnimationEnd"),m=zu(p=>{p.target===t&&(s.current=Jp(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(d=>
704{if(d){const h=getComputedStyle(d);r.current=h,a.current=Jp(h)}else r.current=null;n(d)},[])}}zu(EZ,"usePresence");function F6(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}zu(F6,"setRef");function jZ(...e){const t=b.useRef(e);return t.current=e,b.useCallback(n=>{const r=t.current;let i=!1;const s=r.map(a=>{const o=F6(a,n);return!i&&typeof o=="function"&&(i=!0),o});if(i)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():F6(r[a],null)}}},[])}zu(jZ,"useStableComposedRefs");function Jp(e){return(e==null?void 0:e.animationName)||"none"}zu(Jp,"getAnimationName");function NZ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}zu(NZ,"getElementRef");var pbe=Object.defineProperty,gbe=(e,t)=>pbe(e,"name",{value:t,configurable:!0}),JI=ap[" useEffectEvent ".trim().toString()],eF=ap[" useInsertionEffect ".trim().toString()];function AZ(e){if(typeof JI=="function")return JI(e);const t=b.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof eF=="function"?eF(()=>{t.current=e}):Ir(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}gbe(AZ,"useEffectEvent");var xbe=Object.defineProperty,Kv=(e,t)=>xbe(e,"name",{value:t,configurable:!0}),ybe=ap[" useInsertionEffect ".trim().toString()]||Ir;function Vo({prop:e,defaultProp:t,onChange:n=Kv(()=>{},"onChange"),caller:r}){const[i,s,a]=MZ({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:i,u=b.useCallback(d=>{var h;if(o){const f=RZ(d)?d(e):d;f!==e&&((h=a.current)==null||h.call(a,f))}else s(d)},[o,e,s,a]);return[c,u]}Kv(Vo,"useControllableState");function MZ({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),s=b.useRef(t);return ybe(()=>{s.current=t},[t]),b.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}Kv(MZ,"useUncontrolledState");function RZ(e){return typeof e=="function"}Kv(RZ,"isFunction");var tF=Symbol("RADIX:SYNC_STATE");function bbe(e,t,n,r){const{prop:i,defaultProp:s,onChange:a,caller:o}=t,c=i!==void 0,u=AZ(a),d=[{...n,state:s}];r&&d.push(r);const[h,f]=b.useReducer((v,g)=>{if(g.type===tF)return{...v,state:g.state};const y=e(v,g);return c&&!Object.is(y.state,v.state)&&u(y.state),y},...d),m=h.state,p=b.useRef(m);b.useEffect(()=>{p.current!==m&&(p.current=m,c||u(m))},[m,p,c]);const x=b.useMemo(()=>i!==void 0?{...h,state:i}:h,[h,i]);return b.useEffect(()=>{c&&!Object.is(i,h.state)&&f({type:tF,state:i})},[i,h.state,c]),[x,f]}Kv(bbe,"useControllableStateReducer");var vbe=Object.defineProperty,wbe=(e,t)=>vbe(e,"name",{value:t,configurable:!0});function OZ(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}wbe(OZ,"usePrevious");var Sbe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Cbe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Op=new WeakMap,l2=new WeakMap,c2={},hT=0,DZ=function(e){return e&&(e.host||DZ(e.parentNode))},kbe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=DZ(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_be=function(e,t,n,r){var i=kbe(t,Array.isArray(e)?e:[e]);c2[n]||(c2[n]=new WeakMap);var s=c2[n],a=[],o=new Set,c=new Set(i),u=function(h){!h||o.has(h)||(o.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(o.has(f))d(f);else try{var m=f.getAttribute(r),p=m!==null&&m!=="false",x=(Op.get(f)||0)+1,v=(s.get(f)||0)+1;Op.set(f,x),s.set(f,v),a.push(f),x===1&&p&&l2.set(f,!0),v===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return d(t),o.clear(),hT++,function(){a.forEach(function(h){var f=Op.get(h)-1,m=s.get(h)-1;Op.set(h,f),s.set(h,m),f||(l2.has(h)||h.removeAttribute(r),l2.delete(h)),m||h.removeAttribute(n)}),hT--,hT||(Op=new WeakMap,Op=new WeakMap,l2=new WeakMap,c2={})}},iR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Cbe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),_be(r,i,n,"aria-hidden")):function(){return null}},Yl=function(){return Yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Yl.apply(this,arguments)};function LZ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Tbe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var tC="right-scroll-bar-position",nC="width-before-scroll-bar",Ebe="with-scroll-bars-hidden",jbe="--removed-body-scroll-bar-size";function fT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nbe(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Abe=typeof window<"u"?b.useLayoutEffect:b.useEffect,nF=new WeakMap;function Mbe(e,t){var n=Nbe(null,function(r){return e.forEach(function(i){return fT(i,r)})});return Abe(function(){var r=nF.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;
vendor: 4,224 bytes, lines 704-719
704i.forEach(function(o){s.has(o)||fT(o,null)}),s.forEach(function(o){i.has(o)||fT(o,a)})}nF.set(n,e)},[e]),n}function Rbe(e){return e}function Obe(e,t){t===void 0&&(t=Rbe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(s),a=n}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function Dbe(e){e===void 0&&(e={});var t=Obe(null);return t.options=Yl({async:!0,ssr:!1},e),t}var PZ=function(e){var t=e.sideCar,n=LZ(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,Yl({},n))};PZ.isSideCarExport=!0;function Lbe(e,t){return e.useMedium(t),PZ}var IZ=Dbe(),mT=function(){},Nk=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:mT,onWheelCapture:mT,onTouchMoveCapture:mT}),i=r[0],s=r[1],a=e.forwardProps,o=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,x=e.inert,v=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,w=e.gapMode,S=LZ(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,k=Mbe([n,t]),_=Yl(Yl({},S),i);return b.createElement(b.Fragment,null,d&&b.createElement(C,{sideCar:IZ,removeScrollBar:u,shards:h,noRelative:m,noIsolation:p,inert:x,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:w}),a?b.cloneElement(b.Children.only(o),Yl(Yl({},_),{ref:k})):b.createElement(y,Yl({},_,{className:c,ref:k}),o))});Nk.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Nk.classNames={fullWidth:nC,zeroRight:tC};var Pbe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ibe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pbe();return t&&e.setAttribute("nonce",t),e}function Fbe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bbe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zbe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ibe())&&(Fbe(t,n),Bbe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$be=function(){var e=zbe();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},FZ=function(){var e=$be(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Ube={left:0,top:0,right:0,gap:0},pT=function(e){return parseInt(e||"",10)||0},Vbe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[pT(n),pT(r),pT(i)]},Hbe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ube;var t=Vbe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qbe=FZ(),H0="data-scroll-locked",Gbe=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),` 705 .`.concat(Ebe,` { 706 overflow: hidden `).concat(r,`; 707 padding-right: `).concat(o,"px ").concat(r,`; 708 } 709 body[`).concat(H0,`] { 710 overflow: hidden `).concat(r,`; 711 overscroll-behavior: contain; 712 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 713 padding-left: `.concat(i,`px; 714 padding-top: `).concat(s,`px; 715 padding-right: `).concat(a,`px; 716 margin-left:0; 717 margin-top:0; 718 margin-right: `).concat(o,"px ").concat(r,`; 719 `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";
719")].filter(Boolean).join(""),` 720 } 721 722 .`).concat(tC,` { 723 right: `).concat(o,"px ").concat(r,`; 724 } 725 726 .`).concat(nC,` { 727 margin-right: `).concat(o,"px ").concat(r,`; 728 } 729 730 .`).concat(tC," .").concat(tC,` { 731 right: 0 `).concat(r,`; 732 } 733 734 .`).concat(nC," .").concat(nC,` { 735 margin-right: 0 `).concat(r,`; 736 } 737 738 body[`).concat(H0,`] { 739 `).concat(jbe,": ").concat(o,`px; 740 } 741`)},rF=function(){var e=parseInt(document.body.getAttribute(H0)||"0",10);return isFinite(e)?e:0},Wbe=function(){b.useEffect(function(){return document.body.setAttribute(H0,(rF()+1).toString()),function(){var e=rF()-1;e<=0?document.body.removeAttribute(H0):document.body.setAttribute(H0,e.toString())}},[])},Ybe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Wbe();var s=b.useMemo(function(){return Hbe(i)},[i]);return b.createElement(qbe,{styles:Gbe(s,!t,i,n?"":"!important")})},B6=!1;if(typeof window<"u")try{var u2=Object.defineProperty({},"passive",{get:function(){return B6=!0,!0}});window.addEventListener("test",u2,u2),window.removeEventListener("test",u2,u2)}catch{B6=!1}var Dp=B6?{passive:!1}:!1,Kbe=function(e){return e.tagName==="TEXTAREA"},BZ=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Kbe(e)&&n[t]==="visible")},Xbe=function(e){return BZ(e,"overflowY")},Qbe=function(e){return BZ(e,"overflowX")},iF=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=zZ(e,r);if(i){var s=$Z(e,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Jbe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zZ=function(e,t){return e==="v"?Xbe(t):Qbe(t)},$Z=function(e,t){return e==="v"?Zbe(t):Jbe(t)},eve=function(e,t){return e==="h"&&t==="rtl"?-1:1},tve=function(e,t,n,r,i){var s=eve(e,window.getComputedStyle(t).direction),a=s*r,o=n.target,c=t.contains(o),u=!1,d=a>0,h=0,f=0;do{if(!o)break;var m=$Z(e,o),p=m[0],x=m[1],v=m[2],g=x-v-s*p;(p||g)&&zZ(e,o)&&(h+=g,f+=p);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(d&&Math.abs(h)<1||!d&&Math.abs(f)<1)&&(u=!0),u},d2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sF=function(e){return[e.deltaX,e.deltaY]},aF=function(e){return e&&"current"in e?e.current:e},nve=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rve=function(e){return` 742 .block-interactivity-`.concat(e,` {pointer-events: none;} 743 .allow-interactivity-`).concat(e,` {pointer-events: all;} 744`)},ive=0,Lp=[];function sve(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(ive++)[0],s=b.useState(FZ)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=Tbe([e.lockRef.current],(e.shards||[]).map(aF),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=b.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;
vendor: 5,034 bytes, line 744
744var g=d2(x),y=n.current,w="deltaX"in x?x.deltaX:y[0]-g[0],S="deltaY"in x?x.deltaY:y[1]-g[1],C,k=x.target,_=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in x&&_==="h"&&k.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,j=A?A===k||A.contains(k):!1;if(j)return!1;var D=iF(_,k);if(!D)return!0;if(D?C=_:(C=_==="v"?"h":"v",D=iF(_,k)),!D)return!1;if(!r.current&&"changedTouches"in x&&(w||S)&&(r.current=C),!C)return!0;var M=r.current||C;return tve(M,v,x,M==="h"?w:S)},[]),c=b.useCallback(function(x){var v=x;if(!(!Lp.length||Lp[Lp.length-1]!==s)){var g="deltaY"in v?sF(v):d2(v),y=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&nve(C.delta,g)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var w=(a.current.shards||[]).map(aF).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=w.length>0?o(v,w[0]):!a.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=b.useCallback(function(x,v,g,y){var w={name:x,delta:v,target:g,should:y,shadowParent:ave(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=b.useCallback(function(x){n.current=d2(x),r.current=void 0},[]),h=b.useCallback(function(x){u(x.type,sF(x),x.target,o(x,e.lockRef.current))},[]),f=b.useCallback(function(x){u(x.type,d2(x),x.target,o(x,e.lockRef.current))},[]);b.useEffect(function(){return Lp.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Dp),document.addEventListener("touchmove",c,Dp),document.addEventListener("touchstart",d,Dp),function(){Lp=Lp.filter(function(x){return x!==s}),document.removeEventListener("wheel",c,Dp),document.removeEventListener("touchmove",c,Dp),document.removeEventListener("touchstart",d,Dp)}},[]);var m=e.removeScrollBar,p=e.inert;return b.createElement(b.Fragment,null,p?b.createElement(s,{styles:rve(i)}):null,m?b.createElement(Ybe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ave(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ove=Lbe(IZ,sve);var Ak=b.forwardRef(function(e,t){return b.createElement(Nk,Yl({},e,{ref:t,sideCar:ove}))});Ak.classNames=Nk.classNames;var lve=Object.defineProperty,jn=(e,t)=>lve(e,"name",{value:t,configurable:!0}),cve=[" ","Enter","ArrowUp","ArrowDown"],uve=[" ","Enter"],Bg="Select",[Mk,Rk,dve]=wk(Bg),[fp,Ppt]=sa(Bg,[dve,Mx]),sR=Mx(),[hve,uf]=fp(Bg),[fve,mve]=fp(Bg);function UZ(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:f,required:m,form:p,internal_do_not_use_render:x}=e,v=sR(t),[g,y]=b.useState(null),[w,S]=b.useState(null),[C,k]=b.useState(!1),_=Wv(u),[E,A]=Vo({prop:r,defaultProp:i??!1,onChange:s,caller:Bg}),[j,D]=Vo({prop:a,defaultProp:o,onChange:c,caller:Bg}),M=b.useRef(null),$=b.useRef(j);b.useEffect(()=>{const me=p?g==null?void 0:g.ownerDocument.getElementById(p):g==null?void 0:g.form;if(me instanceof HTMLFormElement){const U=jn(()=>D($.current),"reset");return me.addEventListener("reset",U),()=>me.removeEventListener("reset",U)}},[p,g,D]);const B=g?!!p||!!g.closest("form"):!0,[z,O]=b.useState(new Set),P=Sl(),I=Array.from(z).map(me=>me.props.value).join(";"),q=b.useCallback(me=>{O(U=>new Set(U).add(me))},[]),R=b.useCallback(me=>{O(U=>{const ae=new Set(U);return ae.delete(me),ae})},[]),xe={required:m,trigger:g,onTriggerChange:y,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:k,contentId:P,value:j,onValueChange:D,open:E,onOpenChange:A,dir:_,triggerPointerDownPosRef:M,disabled:f,name:d,autoComplete:h,form:p,nativeOptions:z,nativeSelectKey:I,isFormControl:B};return l.jsx(CZ,{...v,children:l.jsx(hve,{scope:t,...xe,children:l.jsx(Mk.Provider,{scope:t,children:l.jsx(fve,{scope:t,onNativeOptionAdd:q,onNativeOptionRemove:R,children:nJ(x)?x(xe):n})})})})}jn(UZ,"SelectProvider");var VZ=jn(e=>{const{__scopeSelect:t,children:n,...r}=e;return l.jsx(UZ,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:i})=>l.jsxs(l.Fragment,{children:[n,i?l.jsx(Lve,{__scopeSelect:t}):null]})})},"Select"),pve="SelectTrigger",HZ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,disabled:i=!1,...s}=t,a=sR(r),o=uf(pve,r),c=o.disabled||i,u=Vn(n,o.onTriggerChange),d=Rk(r),h=b.useRef("touch"),[f,m,p]=oR(v=>{const g=d().filter(S=>!S.disabled),y=g.find(S=>S.value===o.value),w=lR(g,v,y);w!==void 0&&o.onValueChange(w.value)}),x=jn(v=>{c||(o.onOpenChange(!0),p()),v&&(o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})},"handleOpen");return l.jsx(kZ,{asChild:!0,...a,children:l.jsx(Jt.button,{type:"button",role:"combobox","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Xv(o.value)?"":void 0,...s,ref:u,onClick:Xt(s.onClick,v=>
744{v.currentTarget.focus(),h.current!=="mouse"&&x(v)}),onPointerDown:Xt(s.onPointerDown,v=>{h.current=v.pointerType;const g=v.target;g.hasPointerCapture(v.pointerId)&&g.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(x(v),v.preventDefault())}),onKeyDown:Xt(s.onKeyDown,v=>{const g=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(g&&v.key===" ")&&cve.includes(v.key)&&(x(),v.preventDefault())})})})},"SelectTrigger")),gve="SelectValue",qZ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,className:i,style:s,children:a,placeholder:o="",...c}=t,u=uf(gve,r),{onValueNodeHasChildrenChange:d}=u,h=a!==void 0,f=Vn(n,u.onValueNodeChange);Ir(()=>{d(h)},[d,h]);const m=Xv(u.value);return l.jsx(Jt.span,{...c,asChild:m?!1:c.asChild,ref:f,style:{pointerEvents:"none"},children:l.jsx(b.Fragment,{children:m?o:a},m?"placeholder":"value")})},"SelectValue")),GZ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,children:i,...s}=t;return l.jsx(Jt.span,{"aria-hidden":!0,...s,ref:n,children:i||"â¼"})},"SelectIcon")),xve="SelectPortal",[yve,bve]=fp(xve,{forceMount:void 0}),WZ=jn(e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return l.jsx(yve,{scope:e.__scopeSelect,forceMount:n,children:l.jsx(rR,{asChild:!0,...r})})},"SelectPortal"),Vm="SelectContent",YZ=b.forwardRef(jn(function(t,n){const r=bve(Vm,t.__scopeSelect),{forceMount:i=r.forceMount,...s}=t,a=uf(Vm,t.__scopeSelect),[o,c]=b.useState();return Ir(()=>{c(new DocumentFragment)},[]),l.jsx(cd,{present:i||a.open,children:({present:u})=>u?l.jsx(Sve,{...s,ref:n}):l.jsx(vve,{...s,fragment:o})})},"SelectContent")),vve=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,children:i,fragment:s}=t;return s?td.createPortal(l.jsx(KZ,{scope:r,children:l.jsx(Mk.Slot,{scope:r,children:l.jsx("div",{ref:n,children:i})})}),s):null},"SelectContentFragment")),al=10,[KZ,mp]=fp(Vm),wve=gc("SelectContent.RemoveScroll"),Sve=b.forwardRef(jn(function(t,n){const{__scopeSelect:r}=t,{position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:a,onPointerDownOutside:o,side:c,sideOffset:u,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:x,hideWhenDetached:v,avoidCollisions:g,...y}=t,w=uf(Vm,r),[S,C]=b.useState(null),[k,_]=b.useState(null),E=Vn(n,C),[A,j]=b.useState(null),[D,M]=b.useState(null),$=Rk(r),[B,z]=b.useState(!1),O=b.useRef(!1);b.useEffect(()=>{if(S)return iR(S)},[S]),Yv();const P=b.useCallback(Te=>{const[Se,...He]=$().map(Oe=>Oe.ref.current),[tt]=He.slice(-1),we=document.activeElement;for(const Oe of Te)if(Oe===we||(Oe==null||Oe.scrollIntoView({block:"nearest"}),Oe===Se&&k&&(k.scrollTop=0),Oe===tt&&k&&(k.scrollTop=k.scrollHeight),Oe==null||Oe.focus(),document.activeElement!==we))return},[$,k]),I=b.useCallback(()=>P([A,S]),[P,A,S]);b.useEffect(()=>{B&&I()},[B,I]);const{onOpenChange:q,triggerPointerDownPosRef:R}=w;b.useEffect(()=>{if(S){let Te={x:0,y:0};const Se=jn(tt=>{var we,Oe;Te={x:Math.abs(Math.round(tt.pageX)-(((we=R.current)==null?void 0:we.x)??0)),y:Math.abs(Math.round(tt.pageY)-(((Oe=R.current)==null?void 0:Oe.y)??0))}},"handlePointerMove"),He=jn(tt=>{Te.x<=10&&Te.y<=10?tt.preventDefault():tt.composedPath().includes(S)||q(!1),document.removeEventListener("pointermove",Se),R.current=null},"handlePointerUp");return R.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",He,{capture:!0})}}},[S,q,R]),b.useEffect(()=>{const Te=jn(()=>q(!1),"close");return window.addEventListener("blur",Te),window.addEventListener("resize",Te),()=>{window.removeEventListener("blur",Te),window.removeEventListener("resize",Te)}},[q]);const[xe,me]=oR(Te=>{const Se=$().filter(we=>!we.disabled),He=Se.find(we=>we.ref.current===document.activeElement),tt=lR(Se,Te,He);tt&&setTimeout(()=>{var we;return(we=tt.ref.current)==null?void 0:we.focus()})}),U=b.useCallback((Te,Se,He)=>{const tt=!O.current&&!He;(w.value!==void 0&&w.value===Se||tt)&&(j(Te),tt&&(O.current=!0))},[w.value]),ae=b.useCallback(()=>S==null?void 0:S.focus(),[S]),Ce=b.useCallback((Te,Se,He)=>{const tt=!O.current&&!He;(w.value!==void 0&&w.value===Se||tt)&&M(Te)},[w.value]),je=i==="popper"?oF:Cve,ve=je===oF?{side:c,sideOffset:u,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:x,hideWhenDetached:v,avoidCollisions:g}:{};return l.jsx(KZ,{scope:r,content:S,viewport:k,onViewportChange:_,itemRefCallback:U,selectedItem:A,onItemLeave:ae,itemTextRefCallback:Ce,focusSelectedItem:I,selectedItemText:D,position:i,isPositioned:B,searchRef:xe,children:l.jsx(Ak,{as:wve,allowPinchZoom:!0,children:l.jsx(KM,{asChild:!0,trapped:w.open,onMountAutoFocus:Te=>{Te.preventDefault()},onUnmountAutoFocus:Xt(s,Te=>{var Se;
vendor: 6,509 bytes, line 744
744(Se=w.trigger)==null||Se.focus({preventScroll:!0}),Te.preventDefault()}),children:l.jsx(GM,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Te=>Te.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(je,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:Te=>Te.preventDefault(),...y,...ve,onPlaced:()=>z(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Xt(y.onKeyDown,Te=>{const Se=Te.ctrlKey||Te.altKey||Te.metaKey;if(Te.key==="Tab"&&Te.preventDefault(),!Se&&Te.key.length===1&&me(Te.key),["ArrowUp","ArrowDown","Home","End"].includes(Te.key)){let tt=$().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(Te.key)&&(tt=tt.slice().reverse()),["ArrowUp","ArrowDown"].includes(Te.key)){const we=Te.target,Oe=tt.indexOf(we);tt=tt.slice(Oe+1)}setTimeout(()=>P(tt)),Te.preventDefault()}})})})})})})},"SelectContentImpl")),Cve=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,onPlaced:i,...s}=t,a=uf(Vm,r),o=mp(Vm,r),[c,u]=b.useState(null),[d,h]=b.useState(null),f=Vn(n,h),m=Rk(r),p=b.useRef(!1),x=b.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:y,focusSelectedItem:w}=o,S=b.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&v&&g&&y){const E=a.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(a.dir!=="rtl"){const we=D.left-A.left,Oe=j.left-we,Je=E.left-Oe,It=E.width+Je,mt=Math.max(It,A.width),De=window.innerWidth-al,Pe=T6(Oe,[al,Math.max(al,De-mt)]);c.style.minWidth=It+"px",c.style.left=Pe+"px"}else{const we=A.right-D.right,Oe=window.innerWidth-j.right-we,Je=window.innerWidth-E.right-Oe,It=E.width+Je,mt=Math.max(It,A.width),De=window.innerWidth-al,Pe=T6(Oe,[al,Math.max(al,De-mt)]);c.style.minWidth=It+"px",c.style.right=Pe+"px"}const M=m(),$=window.innerHeight-al*2,B=v.scrollHeight,z=window.getComputedStyle(d),O=parseInt(z.borderTopWidth,10),P=parseInt(z.paddingTop,10),I=parseInt(z.borderBottomWidth,10),q=parseInt(z.paddingBottom,10),R=O+P+B+q+I,xe=Math.min(g.offsetHeight*5,R),me=window.getComputedStyle(v),U=parseInt(me.paddingTop,10),ae=parseInt(me.paddingBottom,10),Ce=E.top+E.height/2-al,je=$-Ce,ve=g.offsetHeight/2,Te=g.offsetTop+ve,Se=O+P+Te,He=R-Se;if(Se<=Ce){const we=M.length>0&&g===M[M.length-1].ref.current;c.style.bottom="0px";const Oe=d.clientHeight-v.offsetTop-v.offsetHeight,Je=Math.max(je,ve+(we?ae:0)+Oe+I),It=Se+Je;c.style.height=It+"px"}else{const we=M.length>0&&g===M[0].ref.current;c.style.top="0px";const Je=Math.max(Ce,O+v.offsetTop+(we?U:0)+ve)+He;c.style.height=Je+"px",v.scrollTop=Se-Ce+v.offsetTop}c.style.margin=`${al}px 0`,c.style.minHeight=xe+"px",c.style.maxHeight=$+"px",i==null||i(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,c,d,v,g,y,a.dir,i]);Ir(()=>S(),[S]);const[C,k]=b.useState();Ir(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const _=b.useCallback(E=>{E&&x.current===!0&&(S(),w==null||w(),x.current=!1)},[S,w]);return l.jsx(kve,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:p,onScrollButtonChange:_,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:l.jsx(Jt.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})},"SelectItemAlignedPosition")),oF=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,align:i="start",collisionPadding:s=al,...a}=t,o=sR(r);return l.jsx(_Z,{...o,...a,ref:n,align:i,collisionPadding:s,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[kve,aR]=fp(Vm,{}),lF="SelectViewport",XZ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,nonce:i,...s}=t,a=mp(lF,r),o=aR(lF,r),c=Vn(n,a.onViewportChange),u=b.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),l.jsx(Mk.Slot,{scope:r,children:l.jsx(Jt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Xt(s.onScroll,d=>{const h=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&f){const p=Math.abs(u.current-h.scrollTop);if(p>0){const x=window.innerHeight-al*2,v=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(v,g);if(y<x){const w=y+p,S=Math.min(x,w),C=w-S;f.style.height=S+"px",f.style.bottom==="0px"&&(h.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})},"SelectViewport")),_ve="SelectGroup",[Ipt,Tve]=fp(_ve),Eve="SelectLabel",jve=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,...i}=t,s=Tve(Eve,r);return l.jsx(Jt.div,{id:s.id,...i,ref:n})},"SelectLabel")),z6="SelectItem",[Nve,QZ]=fp(z6),ZZ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,value:i,disabled:s=!1,textValue:a,...o}=t,c=uf(z6,r),u=mp(z6,r),d=c.value===i,[h,f]=b.useState(a??""),[m,p]=b.useState(!1),x=Uo(S=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,S,i,s)}),v=Vn(n,x),g=Sl(),y=b.useRef("touch"),w=jn(()=>{s||(c.onValueChange(i),c.onOpenChange(!1))},"handleSelect");return l.jsx(Nve,{scope:r,value:i,disabled:s,textId:g,isSelected:d,onItemTextChange:b.useCallback(S=>{f(C=>C||((S==null?void 0:S.textContent)??"").trim())},[]),children:l.jsx(Mk.ItemSlot,{scope:r,value:i,disabled:s,textValue:h,children:l.jsx(Jt.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:v,onFocus:Xt(o.onFocus,()=>p(!0)),onBlur:Xt(o.onBlur,()=>p(!1)),onClick:Xt(o.onClick,()=>{y.current!=="mouse"&&w()}),onPointerUp:Xt(o.onPointerUp,()=>{y.current==="mouse"&&w()}),onPointerDown:Xt(o.onPointerDown,S=>{y.current=S.pointerType}),onPointerMove:Xt(o.onPointerMove,S=>{var C;y.current=S.pointerType,s?(C=u.onItemLeave)==null||C.call(u):y.current==="mouse"&&S.currentTarget.focu
744s({preventScroll:!0})}),onPointerLeave:Xt(o.onPointerLeave,S=>{var C;S.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:Xt(o.onKeyDown,S=>{var k;s||S.target!==S.currentTarget||((k=u.searchRef)==null?void 0:k.current)!==""&&S.key===" "||(uve.includes(S.key)&&w(),S.key===" "&&S.preventDefault())})})})})},"SelectItem")),h2="SelectItemText",JZ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,className:i,style:s,...a}=t,o=uf(h2,r),c=mp(h2,r),u=QZ(h2,r),d=mve(h2,r),[h,f]=b.useState(null),m=Uo(w=>{var S;return(S=c.itemTextRefCallback)==null?void 0:S.call(c,w,u.value,u.disabled)}),p=Vn(n,f,u.onItemTextChange,m),x=h==null?void 0:h.textContent,v=b.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:x},u.value),[u.disabled,u.value,x]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d;return Ir(()=>(g(v),()=>y(v)),[g,y,v]),l.jsxs(l.Fragment,{children:[l.jsx(Jt.span,{id:u.textId,...a,ref:p}),u.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Xv(o.value)?td.createPortal(a.children,o.valueNode):null]})},"SelectItemText")),Ave="SelectItemIndicator",eJ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,...i}=t;return QZ(Ave,r).isSelected?l.jsx(Jt.span,{"aria-hidden":!0,...i,ref:n}):null},"SelectItemIndicator")),cF="SelectScrollUpButton",Mve=b.forwardRef(jn(function(t,n){const r=mp(cF,t.__scopeSelect),i=aR(cF,t.__scopeSelect),[s,a]=b.useState(!1),o=Vn(n,i.onScrollButtonChange);return Ir(()=>{if(r.viewport&&r.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};jn(c,"handleScroll");const u=r.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),s?l.jsx(tJ,{...t,ref:o,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=r;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null},"SelectScrollUpButton")),uF="SelectScrollDownButton",Rve=b.forwardRef(jn(function(t,n){const r=mp(uF,t.__scopeSelect),i=aR(uF,t.__scopeSelect),[s,a]=b.useState(!1),o=Vn(n,i.onScrollButtonChange);return Ir(()=>{if(r.viewport&&r.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,h=Math.ceil(u.scrollTop)<d;a(h)};jn(c,"handleScroll");const u=r.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),s?l.jsx(tJ,{...t,ref:o,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=r;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null},"SelectScrollDownButton")),tJ=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,onAutoScroll:i,...s}=t,a=mp("SelectScrollButton",r),o=b.useRef(null),c=Rk(r),u=b.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return b.useEffect(()=>()=>u(),[u]),Ir(()=>{var h;const d=c().find(f=>f.ref.current===document.activeElement);(h=d==null?void 0:d.ref.current)==null||h.scrollIntoView({block:"nearest"})},[c]),l.jsx(Jt.div,{"aria-hidden":!0,...s,ref:n,style:{flexShrink:0,...s.style},onPointerDown:Xt(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(i,50))}),onPointerMove:Xt(s.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),o.current===null&&(o.current=window.setInterval(i,50))}),onPointerLeave:Xt(s.onPointerLeave,()=>{u()})})},"SelectScrollButtonImpl")),Ove=b.forwardRef(jn(function(t,n){const{__scopeSelect:r,...i}=t;return l.jsx(Jt.div,{"aria-hidden":!0,...i,ref:n})},"SelectSeparator")),Dve="SelectBubbleInput",Lve=b.forwardRef(jn(function({__scopeSelect:t,...n},r){const i=uf(Dve,t),{value:s,onValueChange:a,required:o,disabled:c,name:u,autoComplete:d,form:h}=i,{nativeOptions:f,nativeSelectKey:m}=i,p=b.useRef(null),x=Vn(r,p),v=s??"",g=OZ(v),y=Array.from(f).some(w=>(w.props.value??"")==="");return b.useEffect(()=>{const w=p.current;if(!w)return;const S=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(S,"value").set;if(g!==v&&k){const _=new Event("change",{bubbles:!0});k.call(w,v),w.dispatchEvent(_)}},[g,v]),l.jsxs(Jt.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:u,autoComplete:d,disabled:c,form:h,onChange:w=>a(w.target.value),...n,style:{...Sbe,...n.style},ref:x,defaultValue:v,children:[Xv(s)&&!y?l.jsx("option",{value:""}):null,Array.from(f)]},m)},"SelectBubbleInput"));function nJ(e){return typeof e=="function"}jn(nJ,"isFunction");function Xv(e){return e===""||e===void 0}jn(Xv,"shouldShowPlaceholder");function oR(e){const t=Uo(e),n=b.useRef(""),r=b.useRef(0),i=b.useCallback(a=>
744{const o=n.current+a;t(o),jn(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))},"updateSearch")(o)},[t]),s=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}jn(oR,"useTypeaheadSearch");function lR(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=rJ(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}jn(lR,"findNextItem");function rJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}jn(rJ,"wrapArray");const Ok=Y.forwardRef(({label:e,options:t,value:n,onChange:r,className:i,disabled:s},a)=>l.jsxs("div",{className:re("flex items-center gap-2 min-w-0",i),children:[e&&l.jsx("label",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:e}),l.jsxs(VZ,{value:n,onValueChange:r,disabled:s,children:[l.jsxs(HZ,{ref:a,"aria-label":e??"Filter",className:re("relative flex w-full items-center justify-between rounded-xl border-2 border-input bg-background","px-4 py-3 pe-10 text-sm text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-transparent","disabled:cursor-not-allowed disabled:opacity-50","hover:border-muted-foreground/50 transition-all duration-200 cursor-pointer"),children:[l.jsx(qZ,{}),l.jsx(GZ,{asChild:!0,children:l.jsx(ad,{className:"absolute end-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground transition-transform duration-200 data-[state=open]:rotate-180","aria-hidden":"true"})})]}),l.jsx(WZ,{children:l.jsx(YZ,{position:"popper",sideOffset:4,className:re("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"),children:l.jsx(XZ,{className:"p-1 h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",children:t.map(o=>l.jsxs(ZZ,{value:o.value,className:re("relative flex w-full cursor-pointer select-none items-center rounded-lg py-2 ps-8 pe-3 text-sm outline-none","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),children:[l.jsx("span",{className:"absolute start-2 flex h-4 w-4 items-center justify-center",children:l.jsx(eJ,{children:l.jsx(Kn,{className:"h-4 w-4"})})}),l.jsx(JZ,{children:o.label})]},o.value))})})})]})]}));Ok.displayName="FilterDropdown";const Pve=Xo(["ds-touch-target","inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium","transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-60"].join(" "),{variants:{variant:{primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95",default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",gradient:"text-white shadow-soft hover:shadow-elevated hover:brightness-110 active:brightness-100",outline:"border border-border bg-card text-foreground hover:bg-muted hover:border-border/80",ghost:"text-foreground hover:bg-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 text-sm",lg:"h-10 px-6 text-sm",icon:"h-10 w-10"}},defaultVariants:{variant:"primary",size:"md"}}),ce=Y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:i=!1,leftIcon:s,rightIcon:a,disabled:o,children:c,style:u,...d},h)=>{const f=r?pye:"button",m=t==="gradient"?{background:"var(--primary-gradient)",...u}:u;return l.jsx(f,{className:re(Pve({variant:t,size:n,className:e})),ref:h,disabled:o||i,type:r?void 0:"button",style:m,...d,children:r?c:l.jsxs(l.Fragment,{children:[i?l.jsx(Qo,{className:"h-4 w-4 animate-spin"}):s,c,!i&&a]})})});ce.displayName="Button";const Ive=Xo(["ds-touch-target","inline-flex items-center justify-center rounded-md","transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",destructive:"text-destructive hover:bg-destructive/10"},size:{sm:"h-8 w-8",md:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}}),Pn=Y.forwardRef(({className:e,variant:t,size:n,...r},i)=>l.jsx("button",{type:"button",className:re(Ive({variant:t,size:n,className:e})),ref:i,...r}));Pn.displayName="IconButton";const dF=["ds-touch-target","flex h-10 w-full rounded-lg border border-input bg-card text-foreground px-3 py-2 text-base md:text-sm","transition-[border-color,box-shadow] placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--card))] autofill:[-webkit-text-fill-color:hsl(var(--foreground))]","file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground"].join(" "),fn=Y.forwardRef(({className:e,error:t,leftIcon:n,rightIcon:r,type:i="text",...s},a)=>n||r?l.jsxs("div",{className:"relative",children:[n&&l.jsx("span",{className:"pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:n}),l.jsx("input",{type:i,className:re(dF,t&&"border-destructive focus-visible:ring-destructive/40 focus-visible:border-destructive",n&&"ps-10",r&&"pe-10",e),ref:a,"aria-invalid":t||void 0,...s}),r&&l.jsx("span",{className:"pointer-events-none absolute end-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:r})]}):l.jsx("input",{type:i,className:re(dF,t&&"border-destructive focus-visible:ring-destructive/40 focus-visible:border-destructive",e),ref:a,"aria-invalid":t||void 0,...s}));fn.displayName="Input";const Io=Y.forwardRef(({className:e,error:t,...n},r)=>l.jsx("textarea",{className:re("flex min-h-[80px] w-full rounded-xl border border-input bg-background px-4 py-3 text-base shadow-sm","transition-colors placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",t&&"border-destructive focus-visible:ring-destructive",e),ref:r,"aria-invalid":t||void 0,...n}));Io.displayName="Textarea";const Fve=Xo("animate-spin text-muted-foreground",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),Rx=({size:e,className:t})=>l.jsx(Qo,{className:re(Fve({size:e}),t),"aria-hidden":"true"});Rx.displayName="Spinner";var Bve=Object.defineProperty,iJ=(e,t)=>Bve(e,"name",{value:t,configurable:!0}),hF="horizontal",zve=["horizontal","vertical"],$ve=b.forwardRef(iJ(function(t,n){const{decorative:r,orientation:i=hF,...s}=t,a=sJ(i)?i:hF,c=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx(Jt.div,{"data-orientation":a,...c,...s,ref:n})},"Separator"));function sJ(e){return zve.includes(e)}iJ(sJ,"isValidOrientation");var Uve=$ve;const Vve=Y.forwardRef(({orientation:e="horizontal",label:t,className:n,...r},i)=>t&&e==="horizontal"?l.jsxs("div",{role:"separator","aria-orientation":"horizontal",className:re("flex items-center gap-3",n),children:[l.jsx("div",{className:"flex-1 h-[1px] bg-border"}),l.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:t}),l.jsx("div",{className:"flex-1 h-[1px] bg-border"})]}):l.jsx(Uve,{ref:i,orientation:e,decorative:!0,className:re("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"w-[1px] h-full",n),...r}));Vve.displayName="Divider";const fF=Xo("inline-flex items-center transition-colors",{variants:{variant:{default:["text-primary underline-offset-4","hover:underline","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"].join(" "),muted:["text-muted-foreground underline-offset-4","hover:text-foreground hover:underline","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"].join(" ")}},defaultVariants:{variant:"default"}}),Hve=Y.forwardRef((e,t)=>
744{if(e.external){const{href:c,variant:u,className:d,children:h,...f}=e,{external:m,...p}=f;return l.jsxs("a",{ref:t,href:c,target:"_blank",rel:"noopener noreferrer",className:re(fF({variant:u}),d),...p,children:[h,l.jsx(IM,{className:"ms-1 inline h-3 w-3","aria-hidden":"true"})]})}const{variant:n,className:r,children:i,...s}=e,{external:a,...o}=s;return l.jsx(ir,{ref:t,className:re(fF({variant:n}),r),...o,children:i})});Hve.displayName="AppLink";var qve=Object.defineProperty,$u=(e,t)=>qve(e,"name",{value:t,configurable:!0}),aJ="Avatar",[Gve,Fpt]=sa(aJ),Wve=[0,()=>{}],[Yve,oJ]=Gve(aJ),Kve=b.forwardRef($u(function(t,n){const{__scopeAvatar:r,...i}=t,[s,a]=b.useState("idle"),[o,c]=cJ();return l.jsx(Yve,{scope:r,imageLoadingStatus:s,setImageLoadingStatus:a,imageCount:o,setImageCount:c,children:l.jsx(Jt.span,{...i,ref:n})})},"Avatar")),Xve="AvatarImage",Qve=b.forwardRef($u(function(t,n){const{__scopeAvatar:r,src:i,onLoadingStatusChange:s,...a}=t,o=oJ(Xve,r);o.setImageCount;const c=lJ(i,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:o.imageLoadingStatus,setLoadingStatus:o.setImageLoadingStatus}),u=Uo(h=>{s==null||s(h)}),d=b.useRef(c);return Ir(()=>{const h=d.current;d.current=c,c!==h&&u(c)},[c,u]),c==="loaded"?l.jsx(Jt.img,{...a,ref:n,src:i}):null},"AvatarImage")),Zve="AvatarFallback",Jve=b.forwardRef($u(function(t,n){const{__scopeAvatar:r,delayMs:i,...s}=t,a=oJ(Zve,r),[o,c]=b.useState(i===void 0);return b.useEffect(()=>{if(i!==void 0){const u=window.setTimeout(()=>c(!0),i);return()=>window.clearTimeout(u)}},[i]),o&&a.imageLoadingStatus!=="loaded"?l.jsx(Jt.span,{...s,ref:n}):null},"AvatarFallback"));function lJ(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return Ir(()=>{if(!e){n("error");return}const s=new window.Image,a=$u(c=>{const u=c.currentTarget;n($6(u))},"handleLoad"),o=$u(()=>n("error"),"handleError");return s.addEventListener("load",a),s.addEventListener("error",o),r&&(s.referrerPolicy=r),s.crossOrigin=i??null,s.src=e,n($6(s)),()=>{s.removeEventListener("load",a),s.removeEventListener("error",o),n("idle")}},[e,i,r,n]),t}$u(lJ,"useImageLoadingStatus");function $6(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}$u($6,"getImageLoadingStatus");function cJ(){return Wve}$u(cJ,"useImageCount");function ewe(e){}$u(ewe,"useUpdateImageCount");const twe=Xo("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"h-6 w-6 text-[10px]",sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base",xl:"h-16 w-16 text-lg"}},defaultVariants:{size:"md"}}),cR=Y.forwardRef(({src:e,alt:t,fallback:n,size:r,className:i,style:s,...a},o)=>l.jsxs(Kve,{ref:o,className:re(twe({size:r,className:i})),style:s,...a,children:[l.jsx(Qve,{src:e,alt:t,className:"aspect-square h-full w-full object-cover"}),l.jsx(Jve,{className:"flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",style:s,delayMs:e?600:0,children:n})]}));cR.displayName="Avatar";const nwe=VZ,rwe=qZ,uJ=Y.forwardRef(({className:e,error:t,children:n,...r},i)=>l.jsxs(HZ,{ref:i,className:re("ds-touch-target","flex h-10 w-full items-center justify-between gap-2 rounded-lg border border-input bg-card px-3 py-2 text-base text-foreground md:text-sm","transition-[border-color,box-shadow] ring-offset-background placeholder:text-muted-foreground","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground",t&&"border-destructive focus-visible:ring-destructive/40 focus-visible:border-destructive",e),"aria-invalid":t||void 0,...r,children:[n,l.jsx(GZ,{asChild:!0,children:l.jsx(ad,{className:"h-4 w-4 text-muted-foreground"})})]}));uJ.displayName="SelectTrigger";const dJ=Y.forwardRef(({className:e,...t},n)=>l.jsx(Mve,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(bQ,{className:"h-4 w-4"})}));dJ.displayName="SelectScrollUpButton";const hJ=Y.forwardRef(({className:e,...t},n)=>l.jsx(Rve,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(ad,{
744className:"h-4 w-4"})}));hJ.displayName="SelectScrollDownButton";const fJ=Y.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>l.jsx(WZ,{children:l.jsxs(YZ,{ref:i,className:re("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-elevated","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(dJ,{}),l.jsx(XZ,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(hJ,{})]})}));fJ.displayName="SelectContent";const iwe=Y.forwardRef(({className:e,...t},n)=>l.jsx(jve,{ref:n,className:re("py-1.5 ps-8 pe-2 text-sm font-semibold",e),...t}));iwe.displayName="SelectLabel";const mJ=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(ZZ,{ref:r,className:re("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute start-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(eJ,{children:l.jsx(Kn,{className:"h-4 w-4"})})}),l.jsx(JZ,{children:t})]}));mJ.displayName="SelectItem";const swe=Y.forwardRef(({className:e,...t},n)=>l.jsx(Ove,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));swe.displayName="SelectSeparator";const Ho=Y.forwardRef(({options:e,value:t,onChange:n,placeholder:r,error:i,disabled:s,className:a,ariaLabel:o},c)=>l.jsxs(nwe,{value:t,onValueChange:n,disabled:s,children:[l.jsx(uJ,{ref:c,error:i,className:a,"aria-label":o,children:l.jsx(rwe,{placeholder:r})}),l.jsx(fJ,{children:e.map(u=>l.jsx(mJ,{value:u.value,children:u.label},u.value))})]}));Ho.displayName="SimpleSelect";var awe=Object.defineProperty,Uu=(e,t)=>awe(e,"name",{value:t,configurable:!0}),uR="Checkbox",[owe,Bpt]=sa(uR),[lwe,dR]=owe(uR);function pJ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:a,name:o,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,m]=Vo({prop:n,defaultProp:i??!1,onChange:c,caller:uR}),[p,x]=b.useState(null),[v,g]=b.useState(null),y=b.useRef(!1),[w,S]=b.useReducer(_=>_+1,0),C=p?!!a||!!p.closest("form"):!0,k={checked:f,disabled:s,setChecked:m,control:p,setControl:x,name:o,form:a,value:d,hasConsumerStoppedPropagationRef:y,userInteractionCount:w,onUserInteraction:S,required:u,defaultChecked:Su(i)?!1:i,isFormControl:C,bubbleInput:v,setBubbleInput:g};return l.jsx(lwe,{scope:t,...k,children:gJ(h)?h(k):r})}Uu(pJ,"CheckboxProvider");var cwe="CheckboxTrigger",uwe=b.forwardRef(Uu(function({__scopeCheckbox:t,onKeyDown:n,onClick:r,...i},s){const{control:a,value:o,disabled:c,checked:u,required:d,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:m,onUserInteraction:p,isFormControl:x,bubbleInput:v}=dR(cwe,t),g=Vn(s,h),y=b.useRef(u);return b.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const S=Uu(()=>f(y.current),"reset");return w.addEventListener("reset",S),()=>w.removeEventListener("reset",S)}},[a,f]),l.jsx(Jt.button,{type:"button",role:"checkbox","aria-checked":Su(u)?"mixed":u,"aria-required":d,"data-state":hR(u),"data-disabled":c?"":void 0,disabled:c,value:o,...i,ref:g,onKeyDown:Xt(n,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Xt(r,w=>{p(),f(S=>Su(S)?!0:!S),v&&x&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})},"CheckboxTrigger")),dwe=b.forwardRef(Uu(function(t,n){const{__scopeCheckbox:r,name:i,checked:s,defaultChecked:a,required:o,disabled:c,value:u,onCheckedChange:d,form:h,...f}=t;return l.jsx(pJ,{__scopeCheckbox:r,checked:s,defaultChecked:a,disabled:c,required:o,onCheckedChange:d,name:i,form:h,value:u,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(uwe,{...f,ref:n,__scopeCheckbox:r}),m&&l.jsx(pwe,{__scopeCheckbox:r})]})})},"Checkbox")),hwe="CheckboxIndicator",fwe=b.forwardRef(Uu(function(t,n){const{__scopeCheckbox:r,forceMount:i,...s}=t,a=dR(hwe,r);return l.jsx(cd,{present:i||Su(a.checked)||a.checked===!0,children:l.jsx(Jt.span,{"data-state":hR(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),mwe="CheckboxBubbleInput",pwe=b.forwardRef(Uu(function({__scopeCheckbox:t,onClick:n,...r},i){const{control:s,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:c,defaultChecked:u,required:d,disabled:h,name:f,value:m,form:p,bubbleInput:x,setBubbleInput:v}=dR(mwe,t),g=Vn(i,v),y=Ek(s),w=b.useRef(!1),S=b.useRef(c),C=b.useRef(o);b.useEffect(()=>{const _=x;if(!_)return;const E=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(E,"checked").set,D=o!==C.current;C.current=o;const M=S.current!==c;S.current=c;const $=!(D&&a.current);if(M&&j){w.current=!D;const B=new Event("click",{bubbles:$});_.indeterminate=Su(c),j.call(_,Su(c)?!1:c),_.dispatchEvent(B),w.current=!1}},[x,c,a,o]);const k=b.useRef(Su(c)?!1:c);return l.jsx(Jt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??k.current,required:d,disabled:h,name:f,value:m,form:p,...r,tabIndex:-1,ref:g,onClick:Xt(n,_=>{w.current&&_.stopPropagation()}),style:{...r.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function gJ(e){return typeof e=="function"}
744Uu(gJ,"isFunction");function Su(e){return e==="indeterminate"}Uu(Su,"isIndeterminate");function hR(e){return Su(e)?"indeterminate":e?"checked":"unchecked"}Uu(hR,"getState");const xJ=Y.forwardRef(({className:e,label:t,description:n,id:r,...i},s)=>{const a=r??Y.useId(),o=l.jsx(dwe,{ref:s,id:a,className:re("peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary","data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary",e),...i,children:l.jsx(fwe,{className:"flex items-center justify-center text-current",children:i.checked==="indeterminate"?l.jsx(Uxe,{className:"h-3 w-3"}):l.jsx(Kn,{className:"h-3 w-3"})})});return t?l.jsxs("div",{className:"flex items-start",children:[o,l.jsxs("div",{className:"ms-2 grid gap-0.5 leading-none",children:[l.jsx("label",{htmlFor:a,className:"text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),n&&l.jsx("p",{className:"text-xs text-muted-foreground",children:n})]})]}):o});xJ.displayName="Checkbox";var gwe=Object.defineProperty,zh=(e,t)=>gwe(e,"name",{value:t,configurable:!0}),fR="Switch",[xwe,zpt]=sa(fR),[ywe,mR]=xwe(fR);function yJ(e){const{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:s,form:a,name:o,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,m]=Vo({prop:n,defaultProp:i??!1,onChange:c,caller:fR}),[p,x]=b.useState(null),[v,g]=b.useState(null),y=b.useRef(!1),[w,S]=b.useReducer(_=>_+1,0),C=p?!!a||!!p.closest("form"):!0,k={checked:f,setChecked:m,disabled:s,control:p,setControl:x,name:o,form:a,value:d,hasConsumerStoppedPropagationRef:y,userInteractionCount:w,onUserInteraction:S,required:u,defaultChecked:i,isFormControl:C,bubbleInput:v,setBubbleInput:g};return l.jsx(ywe,{scope:t,...k,children:bJ(h)?h(k):r})}zh(yJ,"SwitchProvider");var bwe="SwitchTrigger",vwe=b.forwardRef(zh(function({__scopeSwitch:t,onClick:n,...r},i){const{control:s,form:a,value:o,disabled:c,checked:u,required:d,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:m,onUserInteraction:p,isFormControl:x,bubbleInput:v}=mR(bwe,t),g=Vn(i,h),y=b.useRef(u);return b.useEffect(()=>{const w=a?s==null?void 0:s.ownerDocument.getElementById(a):s==null?void 0:s.form;if(w instanceof HTMLFormElement){const S=zh(()=>f(y.current),"reset");return w.addEventListener("reset",S),()=>w.removeEventListener("reset",S)}},[s,a,f]),l.jsx(Jt.button,{type:"button",role:"switch","aria-checked":u,"aria-required":d,"data-state":pR(u),"data-disabled":c?"":void 0,disabled:c,value:o,...r,ref:g,onClick:Xt(n,w=>{p(),f(S=>!S),v&&x&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})},"SwitchTrigger")),wwe=b.forwardRef(zh(function(t,n){const{__scopeSwitch:r,name:i,checked:s,defaultChecked:a,required:o,disabled:c,value:u,onCheckedChange:d,form:h,...f}=t;return l.jsx(yJ,{__scopeSwitch:r,checked:s,defaultChecked:a,disabled:c,required:o,onCheckedChange:d,name:i,form:h,value:u,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(vwe,{...f,ref:n,__scopeSwitch:r}),m&&l.jsx(_we,{__scopeSwitch:r})]})})},"Switch")),Swe="SwitchThumb",Cwe=b.forwardRef(zh(function(t,n){const{__scopeSwitch:r,...i}=t,s=mR(Swe,r);return l.jsx(Jt.span,{"data-state":pR(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n})},"SwitchThumb")),kwe="SwitchBubbleInput",_we=b.forwardRef(zh(function({__scopeSwitch:t,onClick:n,...r},i){const{control:s,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:c,defaultChecked:u,required:d,disabled:h,name:f,value:m,form:p,bubbleInput:x,setBubbleInput:v}=mR(kwe,t),g=Vn(i,v),y=Ek(s),w=b.useRef(!1),S=b.useRef(c),C=b.useRef(o);b.useEffect(()=>{const _=x;if(!_)return;const E=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(E,"checked").set,D=o!==C.current;C.current=o;const M=S.current!==c;S.current=c;const $=!(D&&a.current);if(M&&j){w.current=!D;const B=new Event("click",{bubbles:$});j.call(_,c),_.dispatchEvent(B),w.current=!1}},[x,c,a,o]);const k=b.useRef(c);return l.jsx(Jt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??k.current,required:d,disabled:h,name:f,value:m,form:p,...r,tabIndex:-1,ref:g,onClick:Xt(n,_=>{w.current&&_.stopPropagation()}),style:{...r.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}
744,"SwitchBubbleInput"));function bJ(e){return typeof e=="function"}zh(bJ,"isFunction");function pR(e){return e?"checked":"unchecked"}zh(pR,"getState");const Twe={sm:"h-4 w-7",md:"h-5 w-9"},Ewe={sm:"h-3 w-3 data-[state=checked]:translate-x-3 rtl:data-[state=checked]:-translate-x-3",md:"h-4 w-4 data-[state=checked]:translate-x-4 rtl:data-[state=checked]:-translate-x-4"},vJ=Y.forwardRef(({className:e,label:t,size:n="md",id:r,...i},s)=>{const a=r??Y.useId(),o=l.jsx(wwe,{id:a,ref:s,className:re("ds-touch-expand","peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent","transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",Twe[n],e),...i,children:l.jsx(Cwe,{className:re("pointer-events-none block rounded-full bg-background shadow-lg ring-0","transition-transform data-[state=unchecked]:translate-x-0",Ewe[n])})});return t?l.jsxs("div",{className:"flex items-center",children:[o,l.jsx("label",{htmlFor:a,className:"ms-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t})]}):o});vJ.displayName="Switch";const ei=Y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("animate-pulse rounded-md bg-muted",e),...t}));ei.displayName="Skeleton";var jwe=Object.defineProperty,pp=(e,t)=>jwe(e,"name",{value:t,configurable:!0}),[gR,$pt]=sa("Tooltip",[Mx]);Mx();var Nwe="TooltipProvider",Awe=700,[Mwe,Upt]=gR(Nwe),Rwe=pp(e=>{const{__scopeTooltip:t,delayDuration:n=Awe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,a=b.useRef(!0),o=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(Mwe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),a.current=!1)},[r]),onClose:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r))},[r]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:s})},"TooltipProvider"),Owe="Tooltip",[Vpt,Hpt]=gR(Owe),Dwe="TooltipPortal",[qpt,Gpt]=gR(Dwe,{forceMount:void 0});function Lwe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}pp(Lwe,"getExitSideFromRect");function Pwe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}pp(Pwe,"getPaddedExitPoints");function Iwe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}pp(Iwe,"getPointsFromRect");function Fwe(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],c=t[a],u=o.x,d=o.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(i=!i)}return i}pp(Fwe,"isPointInPolygon");function Bwe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),wJ(t)}pp(Bwe,"getHull");function wJ(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}pp(wJ,"getHullPresorted");var zwe=Rwe;const $we=zwe;var Ox=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["Andorra","ad","376"],["Angola","ao","244"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54",{default:"(..) .... ....","/^11/":"(..) .... ....","/^15/":"(..) ... ....","/^(2|3|4|5)/":"(.) .... ....","/^9/":"(.) .... ....."},0],["Armenia","am","374",".. ......"],["Aruba","aw","297"],["Australia","au","61",{default:". .... ....","/^4/":"... ... ...","/^5(?!50)/":"... ... ...","/^1(3|8)00/":".... ... ...","/^13/":".. .. ..","/^180/":"... ...."}
vendor: 5,809 bytes, line 744
744,0,[]],["Austria","at","43"],["Azerbaijan","az","994","(..) ... .. .."],["Bahamas","bs","1242"],["Bahrain","bh","973",".... ...."],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375","(..) ... .. .."],["Belgium","be","32","... .. .. .."],["Belize","bz","501"],["Benin","bj","229"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55","(..) .....-...."],["British Indian Ocean Territory","io","246"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599","",1],["Cayman Islands","ky","1","... ... ....",4,["345"]],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86","... .... ...."],["Colombia","co","57","... ... ...."],["Comoros","km","269"],["Congo","cd","243"],["Congo","cg","242"],["Costa Rica","cr","506","....-...."],["Côte d'Ivoire","ci","225",".. .. .. .. .."],["Croatia","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599","",0],["Cyprus","cy","357",".. ......"],["Czech Republic","cz","420","... ... ..."],["Denmark","dk","45",".. .. .. .."],["Djibouti","dj","253",".. .. ...."],["Dominica","dm","1767"],["Dominican Republic","do","1","(...) ...-....",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503","....-...."],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372",".... ......"],["Ethiopia","et","251",".. ... ...."],["Faroe Islands","fo","298",".. .. .."],["Fiji","fj","679"],["Finland","fi","358",".. ... .. .."],["France","fr","33",". .. .. .. .."],["French Guiana","gf","594","... .. .. .."],["French Polynesia","pf","689",{"/^44/":".. .. ..","/^80[0-5]/":"... .. .. ..",default:".. .. .. .."}],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49","... ........."],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299",".. .. .."],["Grenada","gd","1473"],["Guadeloupe","gp","590","... .. .. ..",0],["Guam","gu","1671"],["Guatemala","gt","502","....-...."],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509","....-...."],["Honduras","hn","504"],["Hong Kong","hk","852",".... ...."],["Hungary","hu","36"],["Iceland","is","354","... ...."],["India","in","91",".....-....."],["Indonesia","id","62"],["Iran","ir","98","... ... ...."],["Iraq","iq","964"],["Ireland","ie","353",".. ......."],["Israel","il","972","... ... ...."],["Italy","it","39","... .......",0],["Jamaica","jm","1876"],["Japan","jp","81",".. .... ...."],["Jordan","jo","962"],["Kazakhstan","kz","7","... ...-..-..",0],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965",".... ...."],["Kyrgyzstan","kg","996","... ... ..."],["Laos","la","856"],["Latvia","lv","371",".. ... ..."],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60","..-....-...."],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596","... .. .. .."],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262","... .. .. ..",1,["269","639"]],["Mexico","mx","52","... ... ....",0],["Micronesia","fm","691"],["Moldova","md","373","(..) ..-..-.."],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Morocco","ma","212"],["Mozambique","mz","258"],["Myanmar","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands","nl","31",{"/^06/":"(.). .........","/^6/":". .........","/^0(10|13|14|15|20|23|24|26|30|33|35|36|38|40|43|44|45|46|50|53|55|58|70|71|72|73|74|75|76|77|78|79|82|84|85|87|88|91)/":"(.).. ........","/^(10|13|14|15|20|23|24|26|30|33|35|36|38|40|43|44|45|46|50|53|55|58|70|71|72|73|74|75|76|77|78|79|82|84|85|87|88|91)/":".. ........","/^0/":"(.)... .......",default:"... ......."}],["New Caledonia","nc","687"],["New Zealand","nz","64","...-...-...."],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["North Korea","kp","850"],["Norway","no","47","... .. ..."],["Oman","om","968",".... ...."],["Pakistan","pk","92","...-......."],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63","... ... ...."],["Poland","pl","48","...-...-..."],["Portugal","pt","351"],["Puerto Rico","pr","1","(...) ...-....",3,["787","939"]],["Qatar","qa","974",".... ...."],["Réunion","re","262","... .. .. ..",0],["Romania","ro","40"],["Russia","ru","7","(...) ...-..-..",1],["Rwanda","rw","250"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Pierre & Miquelon","pm","508",{"/^708/":"... ... ...","/^8/":"... .. .. ..",default:".. .. .."}],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and PrÃncipe","st","239"],["Saudi Arabia","sa","966",".. ... ...."],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65","....-...."],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["S
744omalia","so","252"],["South Africa","za","27"],["South Korea","kr","82","... .... ...."],["South Sudan","ss","211"],["Spain","es","34","... ... ..."],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Swaziland","sz","268"],["Sweden","se","46","... ... ..."],["Switzerland","ch","41",".. ... .. .."],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90","... ... .. .."],["Turkmenistan","tm","993"],["Tuvalu","tv","688"],["Uganda","ug","256"],["Ukraine","ua","380","(..) ... .. .."],["United Arab Emirates","ae","971",{default:".. ... ....","/^5[024568]/":".. ... ....","/^[234679]/":". ... ...."}],["United Kingdom","gb","44",".... ......"],["United States","us","1","(...) ...-....",0],["Uruguay","uy","598"],["Uzbekistan","uz","998",".. ... .. .."],["Vanuatu","vu","678"],["Vatican City","va","39",".. .... ....",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis & Futuna","wf","681",".. .. .."],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"]],Uwe="react-international-phone-",SJ=(...e)=>e.filter(t=>!!t).join(" ").trim(),Vwe=(...e)=>SJ(...e).split(" ").map(t=>`${Uwe}${t}`).join(" "),_s=({addPrefix:e,rawClassNames:t})=>SJ(Vwe(...e),...t),Hwe=({value:e,mask:t,maskSymbol:n,offset:r=0,trimNonMaskCharsLeftover:i=!1,allowMaskOverflow:s=!1})=>{if(e.length<r)return e;let a=e.slice(0,r),o=e.slice(r),c=t.split("").filter(m=>m===n).length,u=o.slice(0,c),d=s?o.slice(c):"",h=a,f=0;for(let m of t.split("")){if(f>=u.length){if(!i&&m!==n){h+=m;continue}break}m===n?(h+=u[f],f+=1):h+=m}return h+d},e0=e=>e?/^\d+$/.test(e):!1,Dk=e=>e.replace(/\D/g,""),qwe=(e,t)=>{let n=e.style.display;n!=="block"&&(e.style.display="block");let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.top-r.top,a=r.bottom-i.bottom;s>=0&&a>=0||(Math.abs(s)<Math.abs(a)?e.scrollTop+=s:e.scrollTop-=a),e.style.display=n},Gwe=()=>typeof window>"u"?!1:window.navigator.userAgent.toLowerCase().includes("macintosh"),Wwe=(e,t)=>{let n=t.disableDialCodeAndPrefix?!1:t.forceDialCode,r=t.disableDialCodeAndPrefix?!1:t.insertDialCodeOnEmpty,i=e,s=u=>t.trimNonDigitsEnd?u.trim():u;if(!i)return r&&!i.length||n?s(`${t.prefix}${t.dialCode}${t.charAfterDialCode}`):s(i);if(i=Dk(i),i===t.dialCode&&!t.disableDialCodeAndPrefix)return s(`${t.prefix}${t.dialCode}${t.charAfterDialCode}`);if(t.dialCode.startsWith(i)&&!t.disableDialCodeAndPrefix)return s(n?`${t.prefix}${t.dialCode}${t.charAfterDialCode}`:`${t.prefix}${i}`);if(!i.startsWith(t.dialCode)&&!t.disableDialCodeAndPrefix){if(n)return s(`${t.prefix}${t.dialCode}${t.charAfterDialCode}`);if(i.length<t.dialCode.length)return s(`${t.prefix}${i}`)}let a=()=>{let u=t.dialCode.length,d=i.slice(0,u),h=i.slice(u);return{phoneLeftSide:d,phoneRightSide:h}},{phoneLeftSide:o,phoneRightSide:c}=a();return o=`${t.prefix}${o}${t.charAfterDialCode}`,c=Hwe({value:c,mask:t.mask,maskSymbol:t.maskChar,trimNonMaskCharsLeftover:t.trimNonDigitsEnd||t.disableDialCodeAndPrefix&&c.length===0,allowMaskOverflow:t.allowMaskOverflow}),t.disableDialCodeAndPrefix&&(o=""),s(`${o}${c}`)},Ywe=({phoneBeforeInput:e,phoneAfterInput:t,phoneAfterFormatted:n,cursorPositionAfterInput:r,leftOffset:i=0,deletion:s})=>{if(r<i)return i;if(!e)return n.length;let a=null;for(let d=r-1;d>=0;d-=1)if(e0(t[d])){a=d;break}if(a===null){for(let d=0;d<t.length;d+=1)if(e0(n[d]))return d;return t.length}let o=0;for(let d=0;d<a;d+=1)e0(t[d])&&(o+=1);let c=0,u=0;for(let d=0;d<n.length&&(c+=1,e0(n[d])&&(u+=1),!(u>=o+1));d+=1);if(s!=="backward")for(;!e0(n[c])&&c<n.length;)c+=1;return c},rC=({phone:e,prefix:t})=>e?`${t}${Dk(e)}`:"";function U6({value:e,country:t,insertDialCodeOnEmpty:n,trimNonDigitsEnd:r,countries:i,prefix:s,charAfterDialCode:a,forceDialCode:o,disableDialCodeAndPrefix:c,defaultMask:u,countryGuessingEnabled:d,disableFormatting:h,allowMaskOverflow:f}){let m=e;c&&(m=m.startsWith(`${s}`)?m:`${s}${t.dialCode}${m}`);let p=d?i2e({phone:m,countries:i,currentCountryIso2:t==null?void 0:t.iso2}):void 0,x=(p==null?void 0:p.country)??t,v=Wwe(m,{prefix:s,mask:n2e({phone:m,country:x,defaultMask:u,disableFormatting:h}),maskChar:CJ,dialCode:x.dialCode,trimNonDigitsEnd:r,charAfterDialCode:a,forceDialCode:o,insertDialCodeOnEmpty:n,disableDialCodeAndPrefix:c,allowMaskOverflow:f}),g=d&&!(p!=null&&p.fullDialCodeMatch)?t:x;return{phone:rC({phone:c?`${g.dialCode}${v}`:v,prefix:s}),inputValue:v,country:g}}var Kwe=e=>{if((e==null?void 0:e.toLocaleLowerCase().includes("delete"))??!1)return e!=null&&e.toLocaleLowerCase().includes("forward")?"forward":"backward"}
744,Xwe=(e,{country:t,insertDialCodeOnEmpty:n,phoneBeforeInput:r,prefix:i,charAfterDialCode:s,forceDialCode:a,disableDialCodeAndPrefix:o,countryGuessingEnabled:c,defaultMask:u,disableFormatting:d,countries:h,allowMaskOverflow:f})=>{let m=e.nativeEvent,p=m.inputType,x=Kwe(p),v=!!(p!=null&&p.startsWith("insertFrom")),g=p==="insertText",y=(m==null?void 0:m.data)||void 0,w=e.target.value,S=e.target.selectionStart??0;if(p!=null&&p.includes("history"))return{inputValue:r,phone:rC({phone:r,prefix:i}),cursorPosition:r.length,country:t};if(g&&!e0(y)&&w!==i)return{inputValue:r,phone:rC({phone:o?`${t.dialCode}${r}`:r,prefix:i}),cursorPosition:S-((y==null?void 0:y.length)??0),country:t};if(a&&!w.startsWith(`${i}${t.dialCode}`)&&!v){let A=w?r:`${i}${t.dialCode}${s}`;return{inputValue:A,phone:rC({phone:A,prefix:i}),cursorPosition:i.length+t.dialCode.length+s.length,country:t}}let{phone:C,inputValue:k,country:_}=U6({value:w,country:t,trimNonDigitsEnd:x==="backward",insertDialCodeOnEmpty:n,countryGuessingEnabled:c,countries:h,prefix:i,charAfterDialCode:s,forceDialCode:a,disableDialCodeAndPrefix:o,disableFormatting:d,defaultMask:u,allowMaskOverflow:f}),E=Ywe({cursorPositionAfterInput:S,phoneBeforeInput:r,phoneAfterInput:w,phoneAfterFormatted:k,leftOffset:a?i.length+t.dialCode.length+s.length:0,deletion:x});return{phone:C,inputValue:k,cursorPosition:E,country:_}},Qwe=(e,t)=>{let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(e[i]!==t[i])return!1;return!0},Zwe=()=>{let e=b.useRef(),t=b.useRef(Date.now()),n=b.useCallback(()=>{let r=Date.now(),i=e.current?r-t.current:void 0;return e.current=t.current,t.current=r,i},[]);return b.useMemo(()=>({check:n}),[n])},Jwe={size:20,overrideLastItemDebounceMS:-1};function e2e(e,t){let{size:n,overrideLastItemDebounceMS:r,onChange:i}={...Jwe,...t},[s,a]=b.useState(e),o=b.useRef([s]),c=b.useRef(0),u=Zwe(),d=b.useCallback((m,p)=>{let x=o.current[c.current];if(m===x||typeof m=="object"&&typeof x=="object"&&Qwe(m,x))return;let v=r>0,g=u.check(),y=v&&g!==void 0?g>r:!0;if((p==null?void 0:p.overrideLastItem)!==void 0?p.overrideLastItem:!y)o.current=[...o.current.slice(0,c.current),m];else{let w=o.current.length>=n;o.current=[...o.current.slice(w?1:0,c.current+1),m],w||(c.current+=1)}a(m),i==null||i(m)},[i,r,n,u]),h=b.useCallback(()=>{if(c.current<=0)return{success:!1};let m=o.current[c.current-1];return a(m),c.current-=1,i==null||i(m),{success:!0,value:m}},[i]),f=b.useCallback(()=>{if(c.current+1>=o.current.length)return{success:!1};let m=o.current[c.current+1];return a(m),c.current+=1,i==null||i(m),{success:!0,value:m}},[i]);return[s,d,h,f]}var CJ=".",Pa={defaultCountry:"us",value:"",prefix:"+",defaultMask:"............",charAfterDialCode:" ",historySaveDebounceMS:200,disableCountryGuess:!1,disableDialCodePrefill:!1,forceDialCode:!1,disableDialCodeAndPrefix:!1,disableFormatting:!1,allowMaskOverflow:!1,countries:Ox},t2e=({defaultCountry:e=Pa.defaultCountry,value:t=Pa.value,countries:n=Pa.countries,prefix:r=Pa.prefix,defaultMask:i=Pa.defaultMask,charAfterDialCode:s=Pa.charAfterDialCode,historySaveDebounceMS:a=Pa.historySaveDebounceMS,disableCountryGuess:o=Pa.disableCountryGuess,disableDialCodePrefill:c=Pa.disableDialCodePrefill,forceDialCode:u=Pa.forceDialCode,disableDialCodeAndPrefix:d=Pa.disableDialCodeAndPrefix,disableFormatting:h=Pa.disableFormatting,allowMaskOverflow:f=Pa.allowMaskOverflow,onChange:m,inputRef:p})=>{let x={countries:n,prefix:r,charAfterDialCode:s,forceDialCode:d?!1:u,disableDialCodeAndPrefix:d,defaultMask:i,countryGuessingEnabled:!o,disableFormatting:h,allowMaskOverflow:f},v=b.useRef(null),g=p||v,y=O=>{Promise.resolve().then(()=>{var P;typeof window>"u"||g.current!==(document==null?void 0:document.activeElement)||((P=g.current)==null||P.setSelectionRange(O,O))})},w=b.useCallback(O=>b0({value:O,field:"iso2",countries:n}),[n]),S=b.useCallback(({inputValue:O,phone:P,country:I})=>{if(!m)return;let q=w(I);m({phone:P,inputValue:O,country:q})},[w,m]),[{phone:C,inputValue:k,country:_},E,A,j]=e2e(()=>{let O=b0({value:e,field:"iso2",countries:n});O||console.error(`[react-international-phone]: can not find a country with "${e}" iso2 code`);let P=O||b0({value:"us",field:"iso2",countries:n}),{phone:I,inputValue:q,country:R}=U6({value:t,country:P,insertDialCodeOnEmpty:!c,...x});return y(q.length),{phone:I,inputValue:q,country:R.iso2}},{overrideLastItemDebounceMS:a,onChange:S}),D=b.useMemo(()=>w(_),[_,w]);b.useEffect(()=>{let O=g.current;if(!O)return;let P=I=>{if(!I.key)return;
vendor: 4,217 bytes, line 744
744let q=I.ctrlKey,R=I.metaKey,xe=I.shiftKey;if(I.key.toLowerCase()==="z"){if(Gwe()){if(!R)return}else if(!q)return;xe?j():A()}};return O.addEventListener("keydown",P),()=>{O.removeEventListener("keydown",P)}},[g,A,j]);let M=O=>{O.preventDefault();let{phone:P,inputValue:I,country:q,cursorPosition:R}=Xwe(O,{country:D,phoneBeforeInput:k,insertDialCodeOnEmpty:!1,...x});return E({inputValue:I,phone:P,country:q.iso2}),y(R),t},$=b.useCallback((O,P={focusOnInput:!1})=>{let I=b0({value:O,field:"iso2",countries:n});if(!I){console.error(`[react-international-phone]: can not find a country with "${O}" iso2 code`);return}let q=d?"":`${r}${I.dialCode}${s}`;E({inputValue:q,phone:`${r}${I.dialCode}`,country:I.iso2}),P.focusOnInput&&Promise.resolve().then(()=>{var R;(R=g.current)==null||R.focus()})},[n,d,r,s,E,g]),[B,z]=b.useState(!1);return b.useEffect(()=>{if(!B){z(!0),t!==C&&(m==null||m({inputValue:k,phone:C,country:D}));return}if(t===C)return;let{phone:O,inputValue:P,country:I}=U6({value:t,country:D,insertDialCodeOnEmpty:!c,...x});E({phone:O,inputValue:P,country:I.iso2})},[t]),{phone:C,inputValue:k,country:D,setCountry:$,handlePhoneValueChange:M,inputRef:g}},n2e=({phone:e,country:t,defaultMask:n="............",disableFormatting:r=!1})=>{let i=t.format,s=o=>r?o.replace(new RegExp(`[^${CJ}]`,"g"),""):o;if(!i)return s(n);if(typeof i=="string")return s(i);if(!i.default)return console.error(`[react-international-phone]: default mask for ${t.iso2} is not provided`),s(n);let a=Object.keys(i).find(o=>{if(o==="default")return!1;if(!(o.charAt(0)==="/"&&o.charAt(o.length-1)==="/"))return console.error(`[react-international-phone]: format regex "${o}" for ${t.iso2} is not valid`),!1;let c=new RegExp(o.substring(1,o.length-1)),u=e.replace(t.dialCode,"");return c.test(Dk(u))});return s(a?i[a]:i.default)},zl=e=>{let[t,n,r,i,s,a]=e;return{name:t,iso2:n,dialCode:r,format:i,priority:s,areaCodes:a}},r2e=e=>`Field "${e}" is not supported`,b0=({field:e,value:t,countries:n=Ox})=>{if(["priority"].includes(e))throw new Error(r2e(e));let r=n.find(i=>{let s=zl(i);return t===s[e]});if(r)return zl(r)},i2e=({phone:e,countries:t=Ox,currentCountryIso2:n})=>{var o;let r={country:void 0,fullDialCodeMatch:!1};if(!e)return r;let i=Dk(e);if(!i)return r;let s=r,a=({country:c,fullDialCodeMatch:u})=>{var f,m;let d=c.dialCode===((f=s.country)==null?void 0:f.dialCode),h=(c.priority??0)<(((m=s.country)==null?void 0:m.priority)??0);(!d||h)&&(s={country:c,fullDialCodeMatch:u})};for(let c of t){let u=zl(c),{dialCode:d,areaCodes:h}=u;if(i.startsWith(d)){let f=s.country?Number(d)>=Number(s.country.dialCode):!0;if(h){let m=i.substring(d.length);for(let p of h)if(m.startsWith(p))return{country:u,fullDialCodeMatch:!0}}(f||d===i||!s.fullDialCodeMatch)&&a({country:u,fullDialCodeMatch:!0})}s.fullDialCodeMatch||i.length<d.length&&d.startsWith(i)&&(!s.country||Number(d)<=Number(s.country.dialCode))&&a({country:u,fullDialCodeMatch:!1})}if(n){let c=b0({value:n,field:"iso2",countries:t});if(!c)return s;let u=c?(d=>{if(!(d!=null&&d.areaCodes))return!1;let h=i.substring(d.dialCode.length);return d.areaCodes.some(f=>f.startsWith(h))})(c):!1;s&&((o=s.country)==null?void 0:o.dialCode)===c.dialCode&&s.country!==c&&s.fullDialCodeMatch&&(!c.areaCodes||u)&&(s={country:c,fullDialCodeMatch:!0})}return s},s2e=(e,t)=>{let n=parseInt(e,16);return Number(n+t).toString(16)},a2e="abcdefghijklmnopqrstuvwxyz",o2e="1f1e6",mF=a2e.split("").reduce((e,t,n)=>({...e,[t]:s2e(o2e,n)}),{}),l2e=e=>[mF[e[0]],mF[e[1]]].join("-"),kJ=({iso2:e,size:t,src:n,protocol:r="https",disableLazyLoading:i,className:s,style:a,...o})=>{if(!e)return Y.createElement("img",{className:_s({addPrefix:["flag-emoji"],rawClassNames:[s]}),width:t,height:t,...o});let c=()=>{if(n)return n;let u=l2e(e);return`${r}://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${u}.svg`};return Y.createElement("img",{className:_s({addPrefix:["flag-emoji"],rawClassNames:[s]}),src:c(),width:t,height:t,draggable:!1,"data-country":e,loading:i?void 0:"lazy",style:{width:t,height:t,...a},alt:"",...o})},c2e=1e3,u2e=({show:e,dialCodePrefix:t="+",selectedCountry:n,countries:r=Ox,preferredCountries:i=[],flags:s,onSelect:a,onClose:o,...c})=>{let u=b.useRef(null),d=b.useRef(),h=b.useMemo(()=>
744{if(!i||!i.length)return r;let k=[],_=[...r];for(let E of i){let A=_.findIndex(j=>zl(j).iso2===E);if(A!==-1){let j=_.splice(A,1)[0];k.push(j)}}return k.concat(_)},[r,i]),f=b.useRef({updatedAt:void 0,value:""}),m=k=>{let _=f.current.updatedAt&&new Date().getTime()-f.current.updatedAt.getTime()>c2e;f.current={value:_?k:`${f.current.value}${k}`,updatedAt:new Date};let E=h.findIndex(A=>zl(A).name.toLowerCase().startsWith(f.current.value));E!==-1&&v(E)},p=b.useCallback(k=>h.findIndex(_=>zl(_).iso2===k),[h]),[x,v]=b.useState(p(n)),g=()=>{d.current!==n&&v(p(n))},y=b.useCallback(k=>{v(p(k.iso2)),a==null||a(k)},[a,p]),w=k=>{let _=h.length-1,E=A=>k==="prev"?A-1:k==="next"?A+1:k==="last"?_:0;v(A=>{let j=E(A);return j<0?0:j>_?_:j})},S=k=>{if(k.stopPropagation(),k.key==="Enter"){k.preventDefault();let _=zl(h[x]);y(_);return}if(k.key==="Escape"){o==null||o();return}if(k.key==="ArrowUp"){k.preventDefault(),w("prev");return}if(k.key==="ArrowDown"){k.preventDefault(),w("next");return}if(k.key==="PageUp"){k.preventDefault(),w("first");return}if(k.key==="PageDown"){k.preventDefault(),w("last");return}k.key===" "&&k.preventDefault(),k.key.length===1&&!k.altKey&&!k.ctrlKey&&!k.metaKey&&m(k.key.toLocaleLowerCase())},C=b.useCallback(()=>{if(!u.current||x===void 0)return;let k=zl(h[x]).iso2;if(k===d.current)return;let _=u.current.querySelector(`[data-country="${k}"]`);_&&(qwe(u.current,_),d.current=k)},[x,h]);return b.useEffect(()=>{C()},[x,C]),b.useEffect(()=>{u.current&&(e?u.current.focus():g())},[e]),b.useEffect(()=>{g()},[n]),Y.createElement("ul",{ref:u,role:"listbox",className:_s({addPrefix:["country-selector-dropdown"],rawClassNames:[c.className]}),style:{display:e?"block":"none",...c.style},onKeyDown:S,onBlur:o,tabIndex:-1,"aria-activedescendant":`react-international-phone__${zl(h[x]).iso2}-option`},h.map((k,_)=>{let E=zl(k),A=E.iso2===n,j=_===x,D=i.includes(E.iso2),M=_===i.length-1,$=s==null?void 0:s.find(B=>B.iso2===E.iso2);return Y.createElement(Y.Fragment,{key:E.iso2},Y.createElement("li",{"data-country":E.iso2,role:"option","aria-selected":A,"aria-label":`${E.name} ${t}${E.dialCode}`,id:`react-international-phone__${E.iso2}-option`,className:_s({addPrefix:["country-selector-dropdown__list-item",D&&"country-selector-dropdown__list-item--preferred",A&&"country-selector-dropdown__list-item--selected",j&&"country-selector-dropdown__list-item--focused"],rawClassNames:[c.listItemClassName,D&&c.listItemPreferredClassName,A&&c.listItemSelectedClassName,j&&c.listItemFocusedClassName]}),onClick:()=>y(E),style:c.listItemStyle,title:E.name},Y.createElement(kJ,{iso2:E.iso2,src:$==null?void 0:$.src,className:_s({addPrefix:["country-selector-dropdown__list-item-flag-emoji"],rawClassNames:[c.listItemFlagClassName]}),style:c.listItemFlagStyle}),Y.createElement("span",{className:_s({addPrefix:["country-selector-dropdown__list-item-country-name"],rawClassNames:[c.listItemCountryNameClassName]}),style:c.listItemCountryNameStyle},E.name),Y.createElement("span",{className:_s({addPrefix:["country-selector-dropdown__list-item-dial-code"],rawClassNames:[c.listItemDialCodeClassName]}),style:c.listItemDialCodeStyle},t,E.dialCode)),M?Y.createElement("hr",{className:_s({addPrefix:["country-selector-dropdown__preferred-list-divider"],rawClassNames:[c.preferredListDividerClassName]}),style:c.preferredListDividerStyle}):null)}))},d2e=Y.memo(({selectedCountry:e,onSelect:t,disabled:n,hideDropdown:r,countries:i=Ox,preferredCountries:s=[],flags:a,renderButtonWrapper:o,...c})=>{let[u,d]=b.useState(!1),h=b.useMemo(()=>{if(e)return b0({value:e,field:"iso2",countries:i})},[i,e]),f=b.useRef(null),m=x=>{x.key&&["ArrowUp","ArrowDown"].includes(x.key)&&(x.preventDefault(),d(!0))},p=()=>{var g;let x={title:h==null?void 0:h.name,onClick:()=>d(y=>!y),onMouseDown:y=>y.preventDefault(),onKeyDown:m,disabled:r||n,role:"combobox","aria-label":"Country selector","aria-haspopup":"listbox","aria-expanded":u},v=Y.createElement("div",{className:_s({addPrefix:["country-selector-button__button-content"],rawClassNames:[c.buttonContentWrapperClassName]}),style:c.buttonContentWrapperStyle},Y.createElement(kJ,{iso2:e,src:(g=a==null?void 0:a.find(y=>y.iso2===e))==null?void 0:g.src,className:_s({addPrefix:["country-selector-button__flag-emoji",n&&"country-selector-button__flag-emoji--disabled"],rawClassNames:[c.flagClassName]}),style:{visibility:e?"visible":"hidden",...c.flagStyle}}),!r&&Y.createElement("div",{className:_s({addPrefix:["country-selector-button__dropdown-arrow",n&&"country-selector-button__dropdown-arrow--disabled",u&&"country-selector-button__dropdown-arrow--active"],rawClassNames:[c.dropdownArrowClassName]}),style:c.dropdownArrowStyle}));return o?o({children:v,rootProps:x}):Y.createElement("button",{...x,type:"button",className:_s({addPrefix:["country-selector-button",u&&"country-selector-button--active",n&&"country-selector-button--disabled",r&&"country-selector-button--hide-dropdown"],rawClassNames:[c.buttonClassName]}),"data-country":e,style:c.buttonStyle},v)};return Y.createElement("div",{className:_s({addPrefix:["country-selector"],rawClassNames:[c.className]}),style:c.style,ref:f},p(),Y.createElement(u2e,{show:u,countries:i,preferredCountries:s,flags:a,onSelect:x=>{d(!1),t==null||t(x)},selectedCountry:e,onClose:()=>{d(!1)},...c.dropdownStyleProps}))}),h2e=({dialCode:e,prefix:t,disabled:n,style:r,className:i})=>Y.createElement("div",{className:_s({addPrefix:["dial-code-preview",n&&"dial-code-preview--disabled"],rawClassNames:[i]}),style:r},`${t}${e}`);
744b.forwardRef(({value:e,onChange:t,countries:n=Ox,preferredCountries:r,hideDropdown:i,showDisabledDialCodeAndPrefix:s,disableFocusAfterCountrySelect:a,flags:o,style:c,className:u,inputStyle:d,inputClassName:h,countrySelectorStyleProps:f,dialCodePreviewStyleProps:m,inputProps:p,placeholder:x,disabled:v,name:g,onFocus:y,onBlur:w,required:S,autoFocus:C,...k},_)=>{let E=b.useCallback(P=>{t==null||t(P.phone,{country:P.country,inputValue:P.inputValue})},[t]),{phone:A,inputValue:j,inputRef:D,country:M,setCountry:$,handlePhoneValueChange:B}=t2e({value:e,countries:n,...k,onChange:E}),z=k.disableDialCodeAndPrefix&&s&&(M==null?void 0:M.dialCode),O=b.useCallback(P=>{$(P.iso2,{focusOnInput:!a})},[$,a]);return b.useImperativeHandle(_,()=>D.current?Object.assign(D.current,{setCountry:$,state:{phone:A,inputValue:j,country:M}}):null,[D,$,A,j,M]),Y.createElement("div",{ref:_,className:_s({addPrefix:["input-container"],rawClassNames:[u]}),style:c},Y.createElement(d2e,{onSelect:O,flags:o,selectedCountry:M==null?void 0:M.iso2,countries:n,preferredCountries:r,disabled:v,hideDropdown:i,...f}),z&&Y.createElement(h2e,{dialCode:M.dialCode,prefix:k.prefix??"+",disabled:v,...m}),Y.createElement("input",{onChange:B,value:j,type:"tel",ref:D,className:_s({addPrefix:["input",v&&"input--disabled"],rawClassNames:[h]}),placeholder:x,disabled:v,style:d,name:g,onFocus:y,onBlur:w,autoFocus:C,required:S,...p}))});var f2e=Object.defineProperty,Qv=(e,t)=>f2e(e,"name",{value:t,configurable:!0}),xR="Collapsible",[m2e,_J]=sa(xR),[p2e,yR]=m2e(xR),g2e=b.forwardRef(Qv(function(t,n){const{__scopeCollapsible:r,open:i,defaultOpen:s,disabled:a,onOpenChange:o,...c}=t,[u,d]=Vo({prop:i,defaultProp:s??!1,onChange:o,caller:xR});return l.jsx(p2e,{scope:r,disabled:a,contentId:Sl(),open:u,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),children:l.jsx(Jt.div,{"data-state":Lk(u),"data-disabled":a?"":void 0,...c,ref:n})})},"Collapsible")),x2e="CollapsibleTrigger",y2e=b.forwardRef(Qv(function(t,n){const{__scopeCollapsible:r,...i}=t,s=yR(x2e,r);return l.jsx(Jt.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":Lk(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...i,ref:n,onClick:Xt(t.onClick,s.onOpenToggle)})},"CollapsibleTrigger")),TJ="CollapsibleContent",b2e=b.forwardRef(Qv(function(t,n){const{forceMount:r,...i}=t,s=yR(TJ,t.__scopeCollapsible);return l.jsx(cd,{present:r||s.open,children:({present:a})=>l.jsx(v2e,{...i,ref:n,present:a})})},"CollapsibleContent")),v2e=b.forwardRef(Qv(function(t,n){const{__scopeCollapsible:r,present:i,children:s,...a}=t,o=yR(TJ,r),[c,u]=b.useState(i),d=b.useRef(null),h=Vn(n,d),f=b.useRef(0),m=f.current,p=b.useRef(0),x=p.current,v=o.open||c,g=b.useRef(v),y=b.useRef(void 0);return b.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Ir(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const S=w.getBoundingClientRect();f.current=S.height,p.current=S.width,g.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(i)}},[o.open,i]),l.jsx(Jt.div,{"data-state":Lk(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!v,...a,ref:h,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style},children:v&&s})},"CollapsibleContentImpl"));function Lk(e){return e?"open":"closed"}Qv(Lk,"getState");var w2e=g2e,S2e=y2e,C2e=b2e,k2e=Object.defineProperty,no=(e,t)=>k2e(e,"name",{value:t,configurable:!0}),jc="Accordion",_2e=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[bR,T2e,E2e]=wk(jc),[Pk,Wpt]=sa(jc,[E2e,_J]),vR=_J(),j2e=b.forwardRef(no(function(t,n){const{type:r,...i}=t,s=i,a=i;return l.jsx(bR.Provider,{scope:t.__scopeAccordion,children:r==="multiple"?l.jsx(R2e,{...a,ref:n}):l.jsx(M2e,{...s,ref:n})})},"Accordion")),[EJ,N2e]=Pk(jc),[jJ,A2e]=Pk(jc,{collapsible:!1}),M2e=b.forwardRef(no(function(t,n){const{value:r,defaultValue:i,onValueChange:s=no(()=>{},"onValueChange"),collapsible:a=!1,...o}=t,[c,u]=Vo({prop:r,defaultProp:i??"",onChange:s,caller:jc});return l.jsx(EJ,{scope:t.__scopeAccordion,value:b.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:b.useCallback(()=>a&&u(""),[a,u]),children:l.jsx(jJ,{scope:t.__scopeAccordion,collapsible:a,children:l.jsx(NJ,{...o,ref:n})})})},"AccordionImplSingle")),R2e=b.forwardRef(no(function(t,n){const{value:r,defaultValue:i,onValueChange:s=no(()=>{},"onValueChange"),...a}=t,[o,c]=Vo({prop:r,defaultProp:i??[],onChange:s,caller:jc}),u=b.useCallback(h=>c((f=[])=>[...f,h]),[c]),d=b.useCallback(h=>c((f=[])=>f.filter(m=>m!==h)),[c]);return l.jsx(EJ,{scope:t.__scopeAccordion,value:o,onItemOpen:u,onItemClose:d,children:l.jsx(jJ,{scope:t.__scopeAccordion,collapsible:!0,children:l.jsx(NJ,{...a,ref:n})})})},"AccordionImplMultiple")),[O2e,Ik]=Pk(jc),NJ=b.forwardRef(no(function(t,n){const{__scopeAccordion:r,disabled:i,dir:s,orientation:a="vertical",...o}=t,c=b.useRef(null),u=Vn(c,n),d=T2e(r),f=Wv(s)==="ltr",m=Xt(t.onKeyDown,p=>{var A;if(!_2e.includes(p.key))return;const x=p.target,v=d().filter(j=>{var D;return!((D=j.ref.current)!=null&&D.disabled)}),g=v.findIndex(j=>j.ref.current===x),y=v.length;if(g===-1)return;p.preventDefault();let w=g;const S=0,C=y-1,k=no(()=>{w=g+1,w>C&&(w=S)},"moveNext"),_=no(()=>{w=g-1,w<S&&(w=C)},"movePrev");switch(p.key){case"Home":w=S;break;case"End":w=C;break;case"ArrowRight":a==="horizontal"&&(f?k():_());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(f?_():k());break;case"ArrowUp":a==="vertical"&&_();break}const E=w%y;(A=v[E].ref.current)==null||A.focus()});return l.jsx(O2e,{scope:r,disabled:i,direction:s,orientation:a,children:l.jsx(bR.Slot,{scope:r,children:l.jsx(Jt.div,{...o,"data-orientation":a,ref:u,onKeyDown:i?void 0:m})})})},"AccordionImpl")),V6="AccordionItem",[D2e,wR]=Pk(V6),L2e=b.forwardRef(no(function(t,n){const{__scopeAccordion:r,value:i,...s}=t,a=Ik(V6,r),o=N2e(V6,r),c=vR(r),u=Sl(),d=i&&o.value.includes(i)||!1,h=a.disabled||t.disabled;return l.jsx(D2e,{scope:r,open:d,disabled:h,triggerId:u,children:l.jsx(w2e,{"data-orientation":a.orientation,"data-state":SR(d),...c,...s,ref:n,disabled:h,open:d,onOpenChange:f=>{f?o.onItemOpen(i):o.onItemClose(i)}})})},"AccordionItem")),P2e="AccordionHeader",I2e=b.forwardRef(no(function(t,n){const{__scopeAccordion:r,...i}=t,s=Ik(jc,r),a=wR(P2e,r);return l.jsx(Jt.h3,{"data-orientation":s.orientation,"data-state":SR(a.open),"data-disabled":a.disabled?"":void 0,...i,ref:n})},"AccordionHeader")),pF="AccordionTrigger",F2e=b.forwardRef(no(function(t,n){const{__scopeAccordion:r,...i}=t,s=Ik(jc,r),a=wR(pF,r),o=A2e(pF,r),c=vR(r);return l.jsx(bR.ItemSlot,{scope:r,children:l.jsx(S2e,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:a.triggerId,...c,...i,ref:n})})},"AccordionTrigger")),B2e="AccordionContent",z2e=b.forwardRef(no(function(t,n){const{__scopeAccordion:r,...i}=t,s=Ik(jc,r),a=wR(B2e,r),o=vR(r);return l.jsx(C2e,{role:"region","aria-labelledby":a.triggerId,"data-orientation":s.orientation,...o,...i,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})},"AccordionContent"));function SR(e){return e?"open":"closed"}no(SR,"getState");var $2e=j2e,U2e=L2e,V2e=I2e,H2e=F2e,q2e=z2e;const y4=Y.forwardRef(({className:e,...t},n)=>l.jsx($2e,{ref:n,className:re("w-full",e),...t}));y4.displayName="Accordion";const CR=Y.forwardRef(({className:e,...t},n)=>l.jsx(U2e,{ref:n,className:re("border-b border-border",e),...t}));CR.displayName="AccordionItem";const kR=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsx(V2e,{className:"flex",children:l.jsxs(H2e,{ref:r,className:re("flex w-full items-center justify-between py-3 text-sm font-medium transition-all","text-foreground hover:text-foreground
744/80","[&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(ad,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));kR.displayName="AccordionTrigger";const _R=Y.forwardRef(({className:e,children:t,...n},r)=>l.jsx(q2e,{ref:r,className:re("overflow-hidden text-sm","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:l.jsx("div",{className:"pb-4",children:t})}));_R.displayName="AccordionContent";const G2e=["M","T","W","T","F","S","S"],gT=16,gF=3,W2e=Y.forwardRef(({data:e,weeks:t=4,colorVar:n="--arthur-primary-rgb",className:r,...i},s)=>{const a=Math.max(1,...e.map(u=>u.count)),o=t*7,c=[];for(let u=0;u<o;u++){const d=e[u],h=(d==null?void 0:d.count)??0,f=h===0?.08:.15+h/a*.85;c.push({opacity:f})}return l.jsxs("div",{ref:s,className:re("flex flex-col gap-1.5",r),...i,children:[l.jsxs("div",{className:"flex gap-1",children:[l.jsx("div",{className:"flex flex-col",style:{gap:gF},children:G2e.map((u,d)=>l.jsx("div",{className:"text-[0.6rem] text-muted-foreground flex items-center justify-end pe-1",style:{height:gT,width:16},children:u},d))}),Array.from({length:t}).map((u,d)=>l.jsx("div",{className:"flex flex-col",style:{gap:gF},children:Array.from({length:7}).map((h,f)=>{const m=d*7+f,p=c[m];return l.jsx("div",{className:"rounded-[3px]",style:{width:gT,height:gT,backgroundColor:`rgba(var(${n}), ${(p==null?void 0:p.opacity)??.08})`}},f)})},d))]}),l.jsxs("div",{className:"flex items-center gap-1 ps-5",children:[l.jsx("span",{className:"text-[0.6rem] text-muted-foreground me-0.5",children:"Less"}),[.08,.3,.55,.8,1].map(u=>l.jsx("div",{className:"rounded-[2px]",style:{width:10,height:10,backgroundColor:`rgba(var(${n}), ${u})`}},u)),l.jsx("span",{className:"text-[0.6rem] text-muted-foreground ms-0.5",children:"More"})]})]})});W2e.displayName="HeatmapGrid";const Y2e=Y.forwardRef(({data:e,labels:t,highlightLast:n=!0,colorVar:r="--arthur-primary-rgb",height:i=48,className:s,...a},o)=>{const c=Math.max(1,...e);return l.jsxs("div",{ref:o,className:re("flex flex-col gap-1",s),...a,children:[l.jsx("div",{className:"flex items-end gap-[3px]",style:{height:i},children:e.map((u,d)=>{const h=n&&d===e.length-1,f=u/c,m=Math.max(2,f*i),p=h?1:.35+f*.25;return l.jsx("div",{className:re("flex-1 rounded-t-sm transition-all duration-300"),style:{height:m,backgroundColor:`rgba(var(${r}), ${p})`,...h?{boxShadow:`0 0 8px 1px rgba(var(${r}), 0.4)`}:void 0}},d)})}),t&&t.length>0&&l.jsx("div",{className:"flex gap-[3px]",children:t.map((u,d)=>l.jsx("span",{className:"flex-1 text-center text-[0.6rem] text-muted-foreground truncate",children:u},d))})]})});Y2e.displayName="SparklineBar";const K2e={danger:{card:"bg-destructive/10 border-destructive/30 text-destructive",button:"bg-destructive/15 hover:bg-destructive/25 text-destructive border-destructive/30"},warning:{card:"bg-warning/10 border-warning/30 text-warning",button:"bg-warning/15 hover:bg-warning/25 text-warning border-warning/30"},success:{card:"bg-success/10 border-success/30 text-success",button:"bg-success/15 hover:bg-success/25 text-success border-success/30"},info:{card:"bg-info/10 border-info/30 text-info",button:"bg-info/15 hover:bg-info/25 text-info border-info/30"}},X2e=Y.forwardRef(({variant:e,icon:t,title:n,subtitle:r,action:i,className:s,...a},o)=>{const c=K2e[e];return l.jsxs("div",{ref:o,className:re("flex items-start gap-3 rounded-lg border p-3",c.card,s),...a,children:[t&&l.jsx("span",{className:"shrink-0 mt-0.5 [&>svg]:h-5 [&>svg]:w-5","aria-hidden":"true",children:t}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium leading-snug",children:n}),r&&l.jsx("p",{className:"text-xs opacity-80 mt-0.5 leading-snug",children:r})]}),i&&l.jsx("button",{type:"button",onClick:i.onClick,className:re("shrink-0 rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",c.button),children:i.label})]})});X2e.displayName="NudgeCard";function Q2e(e){return e.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/\[(.*?)\]\(.*?\)/g,"$1").replace(/#{1,6}\s/g,"").replace(/\n{2,}/g,". ").replace(/\n/g," ").trim().split(new RegExp("(?<=[.!?])\\s+")).filter(t=>t.trim().length>0)}function AJ({text:e,sentences:t,activeSentenceIndex:n,activeWordIndex:r=null,autoScroll:i=!1,className:s}){const a=t??(e?Q2e(e):[]),o=Y.useRef(null);return Y.useEffect(()=>{!i||!o.current||o.current.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},[n,r,i]),l.jsx("span",{className:re("leading-relaxed",s),children:a.map((c,u)=>
744{if(u===n){const h=c.split(/\s+/).filter(Boolean);return l.jsxs("span",{children:[u>0?" ":"",h.map((f,m)=>{const p=r!==null&&m===r?"text-primary font-semibold":"",x=m===r;return l.jsxs("span",{ref:x?v=>{o.current=v}:void 0,className:re("transition-colors duration-150 ease-out",p),children:[m>0?" ":"",f]},m)})]},u)}return l.jsxs("span",{children:[u>0?" ":"",c]},u)})})}var Z2e=Object.defineProperty,J2e=(e,t)=>Z2e(e,"name",{value:t,configurable:!0}),eSe=b.forwardRef(J2e(function(t,n){return l.jsx(Jt.label,{...t,ref:n,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),tSe=eSe;const nSe=Xo("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rSe=Y.forwardRef(({className:e,...t},n)=>l.jsx(tSe,{ref:n,className:re(nSe(),e),...t}));rSe.displayName="Label";const TR=Y.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:re("w-full caption-bottom text-sm",e),...t})}));TR.displayName="Table";const ER=Y.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:re("[&_tr]:border-b",e),...t}));ER.displayName="TableHeader";const jR=Y.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:re("[&_tr:last-child]:border-0",e),...t}));jR.displayName="TableBody";const iSe=Y.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:re("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));iSe.displayName="TableFooter";const b4=Y.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:re("border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));b4.displayName="TableRow";const NR=Y.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:re("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));NR.displayName="TableHead";const AR=Y.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:re("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));AR.displayName="TableCell";const sSe=Y.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:re("mt-4 text-sm text-muted-foreground",e),...t}));sSe.displayName="TableCaption";const aSe=Xo(["relative flex w-full cursor-pointer items-start gap-3 rounded-xl border-2 p-4 text-left","transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-60"].join(" "),{variants:{state:{idle:"border-border bg-card hover:border-primary/40 hover:bg-accent/50",selected:"border-primary bg-primary/5",correct:"border-green-500 bg-green-50 dark:bg-green-950/30",incorrect:"border-red-500 bg-red-50 dark:bg-red-950/30"}},defaultVariants:{state:"idle"}}),Fk=Y.forwardRef(({className:e,state:t="idle",optionLabel:n,children:r,multiSelect:i=!1,disabled:s,...a},o)=>{const c=t==="correct",u=t==="incorrect";return l.jsxs("button",{ref:o,type:"button",role:i?"checkbox":"radio","aria-checked":t==="selected"||t==="correct",disabled:s,className:re(aSe({state:t,className:e})),...a,children:[l.jsx("span",{className:re("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold",t==="idle"&&"border-muted-foreground/40 text-muted-foreground",t==="selected"&&"border-primary bg-primary text-primary-foreground",t==="correct"&&"border-green-500 bg-green-500 text-white",t==="incorrect"&&"border-red-500 bg-red-500 text-white"),children:c?l.jsx(Kn,{className:"h-4 w-4"}):u?l.jsx(ar,{className:"h-4 w-4"}):n}),l.jsx("span",{className:"flex-1 pt-1 text-sm",children:r})]})});Fk.displayName="QuizOption";const MR=b.createContext({});function Bk(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const zk=b.createContext(null),Zv=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class oSe extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function lSe({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),i=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(Zv);return b.useInsertionEffect(()=>{const{width:a,height:o,top:c,left:u}=i.current;if(t||!r.current||!a||!o)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return s&&(d.nonce=s),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` 745 [data-motion-pop-id="${n}"] { 746 position: absolute !important; 747 width: ${a}px !important; 748 height: ${o}px !important; 749 top: ${c}px !important; 750 left: ${u}px !important; 751 } 752 `),()=>{document.head.removeChild(d)}},[t]),l.jsx(oSe,{isPresent:t,childRef:r,sizeRef:i,children:b.cloneElement(e,{ref:r})})}const cSe=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:a})=>{const o=Bk(uSe),c=b.useId(),u=b.useCallback(h=>{o.set(h,!0);for(const f of o.values())if(!f)return;r&&r()},[o,r]),d=b.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:u,register:h=>(o.set(h,!1),()=>o.delete(h))}),s?[Math.random(),u]:[n,u]);return b.useMemo(()=>{o.forEach((h,f)=>o.set(f,!1))},[n]),b.useEffect(()=>{!n&&!o.size&&r&&r()},[n]),a==="popLayout"&&(e=l.jsx(lSe,{isPresent:n,children:e})),l.jsx(zk.Provider,{value:d,children:e})};function uSe(){return new Map}function MJ(e=!0){const t=b.useContext(zk);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=b.useId();b.useEffect(()=>{e&&i(s)},[e]);const a=b.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const f2=e=>e.key||"";function xF(e){const t=[];
vendor: 33,768 bytes, line 752
752return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const RR=typeof window<"u",$k=RR?b.useLayoutEffect:b.useEffect,H6=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1})=>{const[o,c]=MJ(a),u=b.useMemo(()=>xF(e),[e]),d=a&&!o?[]:u.map(f2),h=b.useRef(!0),f=b.useRef(u),m=Bk(()=>new Map),[p,x]=b.useState(u),[v,g]=b.useState(u);$k(()=>{h.current=!1,f.current=u;for(let S=0;S<v.length;S++){const C=f2(v[S]);d.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[v,d.length,d.join("-")]);const y=[];if(u!==p){let S=[...u];for(let C=0;C<v.length;C++){const k=v[C],_=f2(k);d.includes(_)||(S.splice(C,0,k),y.push(k))}s==="wait"&&y.length&&(S=y),g(xF(S)),x(u);return}const{forceRender:w}=b.useContext(MR);return l.jsx(l.Fragment,{children:v.map(S=>{const C=f2(S),k=a&&!o?!1:u===v||d.includes(C),_=()=>{if(m.has(C))m.set(C,!0);else return;let E=!0;m.forEach(A=>{A||(E=!1)}),E&&(w==null||w(),g(f.current),a&&(c==null||c()),r&&r())};return l.jsx(cSe,{isPresent:k,initial:!h.current||n?void 0:!1,custom:k?void 0:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:_,children:S},C)})})},ro=e=>e;let RJ=ro;function OR(e){let t;return()=>(t===void 0&&(t=e()),t)}const zg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cu=e=>e*1e3,ku=e=>e/1e3,dSe={useManualTiming:!1};function hSe(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,h=!1)=>{const m=h&&r?t:n;return d&&s.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,i&&(i=!1,c.process(u))}};return c}const m2=["read","resolveKeyframes","update","preRender","render","postRender"],fSe=40;function OJ(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=m2.reduce((g,y)=>(g[y]=hSe(s),g),{}),{read:o,resolveKeyframes:c,update:u,preRender:d,render:h,postRender:f}=a,m=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,fSe),1),i.timestamp=g,i.isProcessing=!0,o.process(i),c.process(i),u.process(i),d.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},p=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:m2.reduce((g,y)=>{const w=a[y];return g[y]=(S,C=!1,k=!1)=>(n||p(),w.schedule(S,C,k)),g},{}),cancel:g=>{for(let y=0;y<m2.length;y++)a[m2[y]].cancel(g)},state:i,steps:a}}const{schedule:fr,cancel:Vu,state:Hi,steps:xT}=OJ(typeof requestAnimationFrame<"u"?requestAnimationFrame:ro,!0),DJ=b.createContext({strict:!1}),yF={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$g={};for(const e in yF)$g[e]={isEnabled:t=>yF[e].some(n=>!!t[n])};function mSe(e){for(const t in e)$g[t]={...$g[t],...e[t]}}const pSe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function v4(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pSe.has(e)}let LJ=e=>!v4(e);function gSe(e){e&&(LJ=t=>t.startsWith("on")?!v4(t):e(t))}try{gSe(require("@emotion/is-prop-valid").default)}catch{}function xSe(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(LJ(i)||n===!0&&v4(i)||!t&&!v4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function ySe(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Uk=b.createContext({});function Fb(e){return typeof e=="string"||Array.isArray(e)}function Vk(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const DR=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],LR=["initial",...DR];function Hk(e){return Vk(e.animate)||LR.some(t=>Fb(e[t]))}function PJ(e){return!!(Hk(e)||e.variants)}function bSe(e,t){if(Hk(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fb(n)?n:void 0,animate:Fb(r)?r:void 0}}return e.inherit!==!1?t:{}}function vSe(e){const{initial:t,animate:n}=bSe(e,b.useContext(Uk));return b.useMemo(()=>({initial:t,animate:n}),[bF(t),bF(n)])}function bF(e){return Array.isArray(e)?e.join(" "):e}const wSe=Symbol.for("motionComponentSymbol");function v0(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function SSe(e,t,n){return b.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):v0(n)&&(n.current=r))},[t])}const PR=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),CSe="framerAppearId",IJ="data-"+PR(CSe),{schedule:IR}=OJ(queueMicrotask,!1),FJ=b.createContext({});function kSe(e,t,n,r,i){var s,a;const{visualElement:o}=b.useContext(Uk),c=b.useContext(DJ),u=b.useContext(zk),d=b.useContext(Zv).reducedMotion,h=b.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=h.current,m=b.useContext(FJ);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&_Se(h.current,n,i,m);const p=b.useRef(!1);b.useInsertionEffect(()=>{f&&p.current&&f.update(n,u)});const x=n[IJ],v=b.useRef(!!x&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,x))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,x)));return $k(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),IR.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),b.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,x)}),v.current=!1))}),f}function _Se(e,t,n,r){const{layoutId:i,layout:s,drag:a,dragConstraints:o,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:BJ(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||o&&v0(o),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function BJ(e){if(e)return e.options.allowProjection!==!1?e.projection:BJ(e.parent)}function TSe({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var s,a;e&&mSe(e);function o(u,d){let h;const f={...b.useContext(Zv),...u,layoutId:ESe(u)},{isStatic:m}=f,p=vSe(u),x=r(u,m);if(!m&&RR){jSe();const v=NSe(f);h=v.MeasureLayout,p.visualElement=kSe(i,x,f,t,v.ProjectionNode)}return l.jsxs(Uk.Provider,{value:p,children:[h&&p.visualElement?l.jsx(h,{visualElement:p.visualElement,...f}):null,n(i,u,SSe(x,p.visualElement,d),x,m,p.visualElement)]})}o.displayName=`motion.${typeof i=="string"?i:`create(${(a=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&a!==void 0?a:""})`}`;const c=b.forwardRef(o);return c[wSe]=i,c}function ESe({layoutId:e}){const t=b.useContext(MR).id;return t&&e!==void 0?t+"-"+e:e}function jSe(e,t){b.useContext(DJ).strict}function NSe(e){const{drag:t,layout:n}=$g;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ASe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function FR(e){return typeof e!="string"||e.includes("-")?!1:!!(ASe.indexOf(e)>-1||/[A-Z]/u.test(e))}function vF(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function BR(e,t,n,r){if(typeof t=="function"){const[i,s]=vF(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=vF(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const q6=e=>Array.isArray(e),MSe=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),RSe=e=>q6(e)?e[e.length-1]||0:e,bi=e=>!!(e&&e.getVelocity);function iC(e){const t=bi(e)?e.get():e;return MSe(t)?t.toValue():t}function OSe({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const a={latestValues:DSe(r,i,s,e),renderState:t()};return n&&(a.onMount=o=>n({props:r,current:o,...a}),a.onUpdate=o=>n(o)),a}const zJ=e=>(t,n)=>{const r=b.useContext(Uk),i=b.useContext(zk),s=()=>OSe(e,t,r,i);return n?s():Bk(s)};function DSe(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=iC(s[f]);let{initial:a,animate:o}=e;const c=Hk(e),u=PJ(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?o:a;if(h&&typeof h!="boolean"&&!Vk(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const p=BR(e,f[m]);if(p){const{transitionEnd:x,transition:v,...g}=p;for(const y in g){let w=g[y];if(Array.isArray(w)){const S=d?w.length-1:0;w=w[S]}w!==null&&(i[y]=w)}for(const y in x)i[y]=x[y]}}}return i}const Dx=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gp=new Set(Dx),$J=e=>t=>typeof t=="string"&&t.startsWith(e),UJ=$J("--"),LSe=$J("var(--"),zR=e=>LSe(e)?PSe.test(e.split("/*")[0].trim()):!1,PSe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,VJ=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hu=(e,t,n)=>n>t?t:n<e?e:n,Lx={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Bb={...Lx,transform:e=>Hu(0,1,e)},p2={...Lx,default:1},Jv=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zd=Jv("deg"),uc=Jv("%"),Pt=Jv("px"),ISe=Jv("vh"),FSe=Jv("vw"),wF={...uc,parse:e=>uc.parse(e)/100,transform:e=>uc.transform(e*100)},BSe={borderWidth:Pt,borderTopWidth:Pt,borderRightWidth:Pt,borderBottomWidth:Pt,borderLeftWidth:Pt,borderRadius:Pt,radius:Pt,borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomRightRadius:Pt,borderBottomLeftRadius:Pt,width:Pt,maxWidth:Pt,height:Pt,maxHeight:Pt,top:Pt,right:Pt,bottom:Pt,left:Pt,padding:Pt,paddingTop:Pt,paddingRight:Pt,paddingBottom:Pt,paddingLeft:Pt,margin:Pt,marginTop:Pt,marginRight:Pt,marginBottom:Pt,marginLeft:Pt,backgroundPositionX:Pt,backgroundPositionY:Pt},zSe={rotate:zd,rotateX:zd,rotateY:zd,rotateZ:zd,scale:p2,scaleX:p2,scaleY:p2,scaleZ:p2,skew:zd,skewX:zd,skewY:zd,distance:Pt,translateX:Pt,translateY:Pt,translateZ:Pt,x:Pt,y:Pt,z:Pt,perspective:Pt,transformPerspective:Pt,opacity:Bb,originX:wF,originY:wF,originZ:Pt},SF={...Lx,transform:Math.round},$R={...BSe,...zSe,zIndex:SF,size:Pt,fillOpacity:Bb,strokeOpacity:Bb,numOctaves:SF},$Se={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},USe=Dx.length;function VSe(e,t,n){let r="",i=!0;for(let s=0;s<USe;s++){const a=Dx[s],o=e[a];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(a.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||n){const u=VJ(o,$R[a]);if(!c){i=!1;const d=$Se[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function UR(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let a=!1,o=!1;for(const c in t){const u=t[c];if(gp.has(c)){a=!0;continue}else if(UJ(c)){i[c]=u;continue}else{const d=VJ(u,$R[c]);c.startsWith("origin")?(o=!0,s[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=VSe(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${c} ${u} ${d}`}}const HSe={offset:"stroke-dashoffset",array:"stroke-dasharray"},qSe={offset:"strokeDashoffset",array:"strokeDasharray"};function GSe(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?HSe:qSe;e[s.offset]=Pt.transform(-r);const a=Pt.transform(t),o=Pt.transform(n);e[s.array]=`${a} ${o}`}function CF(e,t,n){return typeof e=="string"?e:Pt.transform(t+n*e)}function WSe(e,t,n){const r=CF(t,e.x,e.width),i=CF(n,e.y,e.height);return`${r} ${i}`}function VR(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:a,pathSpacing:o=1,pathOffset:c=0,...u},d,h){if(UR(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:p}=e;f.transform&&(p&&(m.transform=f.transform),delete f.transform),p&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=WSe(p,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&GSe(f,a,o,c,!1)}const HR=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),HJ=()=>({...HR(),attrs:{}}),qR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qJ(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const GJ=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function WJ(e,t,n,r){qJ(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(GJ.has(i)?i:PR(i),t.attrs[i])}const w4={};function YSe(e){Object.assign(w4,e)}function YJ(e,{layout:t,layoutId:n}){return gp.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}function GR(e,t,n){var r;const{style:i}=e,s={};for(const a in i)(bi(i[a])||t.style&&bi(t.style[a])||YJ(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[a]=i[a]);return s}function KJ(e,t,n){const r=GR(e,t,n);for(const i in e)if(bi(e[i])||bi(t[i])){const s=Dx.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function KSe(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const kF=["x","y","width","height","cx","cy","r"],XSe={useVisualState:zJ({scrapeMotionValuesFromProps:KJ,createRenderState:HJ,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const o in i)if(gp.has(o)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let o=0;o<kF.length;o++){const c=kF[o];e[c]!==t[c]&&(a=!0)}a&&fr.read(()=>{KSe(n,r),fr.render(()=>{VR(r,i,qR(n.tagName),e.transformTemplate),WJ(n,r)})})}})},QSe={useVisualState:zJ({scrapeMotionValuesFromProps:GR,createRenderState:HR})};function XJ(e,t,n){for(const r in t)!bi(t[r])&&!YJ(r,n)&&(e[r]=t[r])}function ZSe({transformTemplate:e},t){return b.useMemo(()=>{const n=HR();return UR(n,t,e),Object.assign({},n.vars,n.style)},[t])}function JSe(e,t){const n=e.style||{},r={};return XJ(r,n,e),Object.assign(r,ZSe(e,t)),r}function eCe(e,t){const n={},r=JSe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function tCe(e,t,n,r){const i=b.useMemo(()=>{const s=HJ();return VR(s,t,qR(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};XJ(s,e.style,e),i.style={...s,...i.style}}return i}function nCe(e=!1){return(n,r,i,{latestValues:s},a)=>{const c=(FR(n)?tCe:eCe)(r,s,a,n),u=xSe(r,typeof n=="string",e),d=n!==b.Fragment?{...u,...c,ref:i}:{},{children:h}=r,f=b.useMemo(()=>bi(h)?h.get():h,[h]);return b.createElement(n,{...d,children:f})}}function rCe(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...FR(r)?XSe:QSe,preloadedFeatures:e,useRender:nCe(i),createVisualElement:t,Component:r};return TSe(a)}}function QJ(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function qk(e,t,n){const r=e.getProps();return BR(r,t,n!==void 0?n:r.custom,e)}const iCe=OR(()=>window.ScrollTimeline!==void 0);class sCe{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(iCe()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class aCe extends sCe{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function WR(e,t){return e?e[t]||e.default||e:void 0}const G6=2e4;function ZJ(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<G6;)t+=n,r=e.next(t);return t>=G6?1/0:t}function YR(e){return typeof e=="function"}function _F(e,t){e.timeline=t,e.onfinish=null}const KR=e=>Array.isArray(e)&&typeof e[0]=="number",oCe={linearEasing:void 0};function lCe(e,t){const n=OR(e);return()=>{var r;return(r=oCe[t])!==null&&r!==void 0?r:n()}}const S4=lCe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),JJ=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(zg(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function eee(e){return!!(typeof e=="function"&&S4()||!e||typeof e=="string"&&(e in W6||S4())||KR(e)||Array.isArray(e)&&e.every(eee))}const h1=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,W6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:h1([0,.65,.55,1]),circOut:h1([.55,0,1,.45]),backIn:h1([.31,.01,.66,-.59]),backOut:h1([.33,1.53,.69,.99])};function tee(e,t){if(e)return typeof e=="function"&&S4()?JJ(e,t):KR(e)?h1(e):Array.isArray(e)?e.map(n=>tee(n,t)||W6.easeOut):W6[e]}const ol={x:!1,y:!1};function nee(){return ol.x||ol.y}function cCe(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function ree(e,t){const n=cCe(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function TF(e){return t=>{t.pointerType==="touch"||nee()||e(t)}}function uCe(e,t,n={}){const[r,i,s]=ree(e,n),a=TF(o=>{const{target:c}=o,u=t(o);if(typeof u!="function"||!c)return;const d=TF(h=>{u(h),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,i)});return r.forEach(o=>{o.addEventListener("pointerenter",a,i)}),s}const iee=(e,t)=>t?e===t?!0:iee(e,t.parentElement):!1,XR=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dCe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hCe(e){return dCe.has(e.tagName)||e.tabIndex!==-1}const f1=new WeakSet;function EF(e){return t=>{t.key==="Enter"&&e(t)}}function yT(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fCe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=EF(()=>{if(f1.has(n))return;yT(n,"down");const i=EF(()=>{yT(n,"up")}),s=()=>yT(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function jF(e){return XR(e)&&!nee()}function mCe(e,t,n={}){const[r,i,s]=ree(e,n),a=o=>{const c=o.currentTarget;if(!jF(o)||f1.has(c))return;f1.add(c);const u=t(o),d=(m,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!jF(m)||!f1.has(c))&&(f1.delete(c),typeof u=="function"&&u(m,{success:p}))},h=m=>{d(m,n.useGlobalTarget||iee(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return r.forEach(o=>{!hCe(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,i),o.addEventListener("focus",u=>fCe(u,i),i)}),s}function pCe(e){return e==="x"||e==="y"?ol[e]?null:(ol[e]=!0,()=>{ol[e]=!1}):ol.x||ol.y?null:(ol.x=ol.y=!0,()=>{ol.x=ol.y=!1})}const see=new Set(["width","height","top","left","right","bottom",...Dx]);let sC;function gCe(){sC=void 0}const dc={now:()=>(sC===void 0&&dc.set(Hi.isProcessing||dSe.useManualTiming?Hi.timestamp:performance.now()),sC),set:e=>{sC=e,queueMicrotask(gCe)}};function QR(e,t){e.indexOf(t)===-1&&e.push(t)}function ZR(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class JR{constructor(){this.subscriptions=[]}add(t){return QR(this.subscriptions,t),()=>ZR(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function aee(e,t){return t?e*(1e3/t):0}const NF=30,xCe=e=>!isNaN(parseFloat(e));class yCe{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=dc.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=dc.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xCe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new JR);const r=this.events[t].add(n);return t==="change"?()=>{r(),fr.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=dc.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>NF)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,NF);return aee(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ug(e,t){return new yCe(e,t)}function bCe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ug(n))}function vCe(e,t){const n=qk(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const a in s){const o=RSe(s[a]);bCe(e,a,o)}}function wCe(e){return!!(bi(e)&&e.add)}function Y6(e,t){const n=e.getValue("willChange");if(wCe(n))return n.add(t)}function oee(e){return e.props[IJ]}const lee=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,SCe=1e-7,CCe=12;function kCe(e,t,n,r,i){let s,a,o=0;do a=t+(n-t)/2,s=lee(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>SCe&&++o<CCe);return a}function ew(e,t,n,r){if(e===t&&n===r)return ro;const i=s=>kCe(s,0,1,e,n);return s=>s===0||s===1?s:lee(i(s),t,r)}const cee=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uee=e=>t=>1-e(1-t),dee=ew(.33,1.53,.69,.99),eO=uee(dee),hee=cee(eO),fee=e=>(e*=2)<1?.5*eO(e):.5*(2-Math.pow(2,-10*(e-1))),tO=e=>1-Math.sin(Math.acos(e)),mee=uee(tO),pee=cee(tO),gee=e=>/^0[^.\s]+$/u.test(e);function _Ce(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gee(e):!0}const H1=e=>Math.round(e*1e5)/1e5,nO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function TCe(e){return e==null}const ECe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rO=(e,t)=>n=>!!(typeof n=="string"&&ECe.test(n)&&n.startsWith(e)||t&&!TCe(n)&&Object.prototype.hasOwnProperty.call(n,t)),xee=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,a,o]=r.match(nO);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},jCe=e=>Hu(0,255,e),bT={...Lx,transform:e=>Math.round(jCe(e))},Zf={test:rO("rgb","red"),parse:xee("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+bT.transform(e)+", "+bT.transform(t)+", "+bT.transform(n)+", "+H1(Bb.transform(r))+")"};function NCe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const K6={test:rO("#"),parse:NCe,transform:Zf.transform},w0={test:rO("hsl","hue"),parse:xee("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+uc.transform(H1(t))+", "+uc.transform(H1(n))+", "+H1(Bb.transform(r))+")"},ks={test:e=>Zf.test(e)||K6.test(e)||w0.test(e),parse:e=>Zf.test(e)?Zf.parse(e):w0.test(e)?w0.parse(e):K6.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Zf.transform(e):w0.transform(e)},ACe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function MCe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nO))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(ACe))===null||n===void 0?void 0:n.length)||0)>0}const yee="number",bee="color",RCe="var",OCe="var(",AF="${}",DCe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function zb(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const o=t.replace(DCe,c=>(ks.test(c)?(r.color.push(s),i.push(bee),n.push(ks.parse(c))):c.startsWith(OCe)?(r.var.push(s),i.push(RCe),n.push(c)):(r.number.push(s),i.push(yee),n.push(parseFloat(c))),++s,AF)).split(AF);return{values:n,split:o,indexes:r,types:i}}function vee(e){return zb(e).values}function wee(e){const{split:t,types:n}=zb(e),r=t.length;return i=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],i[a]!==void 0){const o=n[a];o===yee?s+=H1(i[a]):o===bee?s+=ks.transform(i[a]):s+=i[a]}return s}}const LCe=e=>typeof e=="number"?0:e;function PCe(e){const t=vee(e);return wee(e)(t.map(LCe))}const $h={test:MCe,parse:vee,createTransformer:wee,getAnimatableNone:PCe},ICe=new Set(["brightness","contrast","saturate","opacity"]);function FCe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nO)||[];if(!r)return e;const i=n.replace(r,"");let s=ICe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const BCe=/\b([a-z-]*)\(.*?\)/gu,X6={...$h,getAnimatableNone:e=>{const t=e.match(BCe);return t?t.map(FCe).join(" "):e}},zCe={...$R,color:ks,backgroundColor:ks,outlineColor:ks,fill:ks,stroke:ks,borderColor:ks,borderTopColor:ks,borderRightColor:ks,borderBottomColor:ks,borderLeftColor:ks,filter:X6,WebkitFilter:X6},iO=e=>zCe[e];function See(e,t){let n=iO(e);return n!==X6&&(n=$h),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $Ce=new Set(["auto","none","0"]);function UCe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!$Ce.has(s)&&zb(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=See(n,i)}const MF=e=>e===Lx||e===Pt,RF=(e,t)=>parseFloat(e.split(", ")[t]),OF=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return RF(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?RF(s[1],e):0}},VCe=new Set(["x","y","z"]),HCe=Dx.filter(e=>!VCe.has(e));function qCe(e){const t=[];return HCe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Vg={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:OF(4,13),y:OF(5,14)};Vg.translateX=Vg.x;Vg.translateY=Vg.y;const vm=new Set;let Q6=!1,Z6=!1;function Cee(){if(Z6){const e=Array.from(vm).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=qCe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,a])=>{var o;(o=r.getValue(s))===null||o===void 0||o.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Z6=!1,Q6=!1,vm.forEach(e=>e.complete()),vm.clear()}function kee(){vm.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Z6=!0)})}function GCe(){kee(),Cee()}class sO{constructor(t,n,r,i,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vm.add(this),Q6||(Q6=!0,fr.read(kee),fr.resolveKeyframes(Cee))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,o);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vm.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vm.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const _ee=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),WCe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YCe(e){const t=WCe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Tee(e,t,n=1){const[r,i]=YCe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return _ee(a)?parseFloat(a):a}return zR(i)?Tee(i,t,n+1):i}const Eee=e=>t=>t.test(e),KCe={test:e=>e==="auto",parse:e=>e},jee=[Lx,Pt,uc,zd,FSe,ISe,KCe],DF=e=>jee.find(Eee(e));class Nee extends sO{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),zR(u))){const d=Tee(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!see.has(r)||t.length!==2)return;const[i,s]=t,a=DF(i),o=DF(s);if(a!==o)if(MF(a)&&MF(o))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)_Ce(t[i])&&r.push(i);r.length&&UCe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vg[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const a=i.length-1,o=i[a];i[a]=Vg[r](n.measureViewportBox(),window.getComputedStyle(n.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEac
vendor: 11,953 bytes, line 752
752h(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const LF=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($h.test(e)||e==="0")&&!e.startsWith("url("));function XCe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function QCe(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=LF(i,t),o=LF(s,t);return!a||!o?!1:XCe(e)||(n==="spring"||YR(n))&&r}const ZCe=e=>e!==null;function Gk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(ZCe),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const JCe=40;class Aee{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=dc.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>JCe?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&GCe(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=dc.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:a,onComplete:o,onUpdate:c,isGenerator:u}=this.options;if(!u&&!QCe(t,r,i,s))if(a)this.options.duration=0;else{c&&c(Gk(t,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Wr=(e,t,n)=>e+(t-e)*n;function vT(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function e4e({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,c=2*n-o;i=vT(c,o,e+1/3),s=vT(c,o,e),a=vT(c,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function C4(e,t){return n=>n>0?t:e}const wT=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},t4e=[K6,Zf,w0],n4e=e=>t4e.find(t=>t.test(e));function PF(e){const t=n4e(e);if(!t)return!1;let n=t.parse(e);return t===w0&&(n=e4e(n)),n}const IF=(e,t)=>{const n=PF(e),r=PF(t);if(!n||!r)return C4(e,t);const i={...n};return s=>(i.red=wT(n.red,r.red,s),i.green=wT(n.green,r.green,s),i.blue=wT(n.blue,r.blue,s),i.alpha=Wr(n.alpha,r.alpha,s),Zf.transform(i))},r4e=(e,t)=>n=>t(e(n)),tw=(...e)=>e.reduce(r4e),J6=new Set(["none","hidden"]);function i4e(e,t){return J6.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function s4e(e,t){return n=>Wr(e,t,n)}function aO(e){return typeof e=="number"?s4e:typeof e=="string"?zR(e)?C4:ks.test(e)?IF:l4e:Array.isArray(e)?Mee:typeof e=="object"?ks.test(e)?IF:a4e:C4}function Mee(e,t){const n=[...e],r=n.length,i=e.map((s,a)=>aO(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}}function a4e(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=aO(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function o4e(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],o=e.indexes[a][i[a]],c=(n=e.values[o])!==null&&n!==void 0?n:0;r[s]=c,i[a]++}return r}const l4e=(e,t)=>{const n=$h.createTransformer(t),r=zb(e),i=zb(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?J6.has(e)&&!i.values.length||J6.has(t)&&!r.values.length?i4e(e,t):tw(Mee(o4e(r,i),i.values),n):C4(e,t)};function Ree(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Wr(e,t,n):aO(e)(e,t)}const c4e=5;function Oee(e,t,n){const r=Math.max(t-c4e,0);return aee(n-e(r),t-r)}const Jr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ST=.001;function u4e({duration:e=Jr.duration,bounce:t=Jr.bounce,velocity:n=Jr.velocity,mass:r=Jr.mass}){let i,s,a=1-t;a=Hu(Jr.minDamping,Jr.maxDamping,a),e=Hu(Jr.minDuration,Jr.maxDuration,ku(e)),a<1?(i=u=>{const d=u*a,h=d*e,f=d-n,m=eA(u,a),p=Math.exp(-h);return ST-f/m*p},s=u=>{const h=u*a*e,f=h*n+n,m=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-h),x=eA(Math.pow(u,2),a);return(-i(u)+ST>0?-1:1)*((f-m)*p)/x}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-ST+d*h},s=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const o=5/e,c=h4e(i,s,o);if(e=Cu(e),isNaN(c))return{stiffness:Jr.stiffness,damping:Jr.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const d4e=12;function h4e(e,t,n){let r=n;for(let i=1;i<d4e;i++)r=r-e(r)/t(r);return r}function eA(e,t){return e*Math.sqrt(1-t*t)}const f4e=["duration","bounce"],m4e=["stiffness","damping","mass"];function FF(e,t){return t.some(n=>e[n]!==void 0)}function p4e(e){let t={velocity:Jr.velocity,stiffness:Jr.stiffness,damping:Jr.damping,mass:Jr.mass,isResolvedFromDuration:!1,...e};if(!FF(e,m4e)&&FF(e,f4e))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Hu(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Jr.mass,stiffness:i,damping:s}}else{const n=u4e(e);t={...t,...n,mass:Jr.mass},t.isResolvedFromDuration=!0}return t}function Dee(e=Jr.visualDuration,t=Jr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:m}=p4e({...n,velocity:-ku(n.velocity||0)}),p=f||0,x=u/(2*Math.sqrt(c*d)),v=a-s,g=ku(Math.sqrt(c/d)),y=Math.abs(v)<5;r||(r=y?Jr.restSpeed.granular:Jr.restSpeed.default),i||(i=y?Jr.restDelta.granular:Jr.restDelta.default);let w;if(x<1){const C=eA(g,x);w=k=>{const _=Math.exp(-x*g*k);return a-_*((p+x*g*v)/C*Math.sin(C*k)+v*Math.cos(C*k))}}else if(x===1)w=C=>a-Math.exp(-g*C)*(v+(p+g*v)*C);else{const C=g*Math.sqrt(x*x-1);w=k=>{const _=Math.exp(-x*g*k),E=Math.min(C*k,300);return a-_*((p+x*g*v)*Math.sinh(E)+C*v*Math.cosh(E))/C}}const S={calculatedDuration:m&&h||null,next:C=>{const k=w(C);if(m)o.done=C>=h;else{let _=0;x<1&&(_=C===0?Cu(p):Oee(w,C,k));const E=Math.abs(_)<=r,A=Math.abs(a-k)<=i;o.done=E&&A}return o.value=o.done?a:k,o},toString:()=>{const C=Math.min(ZJ(S),G6),k=JJ(_=>S.next(C*_).value,C,30);return C+"ms "+k}};return S}function BF({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},m=E=>o!==void 0&&E<o||c!==void 0&&E>c,p=E=>o===void 0?c:c===void 0||Math.abs(o-E)<Math.abs(c-E)?o:c;let x=n*t;const v=h+x,g=a===void 0?v:a(v);g!==v&&(x=g-h);const y=E=>-x*Math.exp(-E/r),w=E=>g+y(E),S=E=>{const A=y(E),j=w(E);f.done=Math.abs(A)<=u,f.value=f.done?g:j};let C,k;const _=E=>{m(f.value)&&(C=E,k=Dee({keyframes:[f.value,p(f.value)],velocity:Oee(w,E,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:E=>{let A=!1;return!k&&C===void 0&&(A=!0,S(E),_(E)),C!==void 0&&E>=C?k.next(E-C):(!A&&S(E),f)}}}const g4e=ew(.42,0,1,1),x4e=ew(0,0,.58,1),Lee=ew(.42,0,.58,1),y4e=e=>Array.isArray(e)&&typeof e[0]!="number",b4e={linear:ro,easeIn:g4e,easeInOut:Lee,easeOut:x4e,circIn:tO,circInOut:pee,circOut:mee,backIn:eO,backInOut:hee,backOut:dee,anticipate:fee},zF=e=>{if(KR(e)){RJ(e.length===4);const[t,n,r,i]=e;return ew(t,n,r,i)}else if(typeof e=="string")return b4e[e];return e};function v4e(e,t,n){const r=[],i=n||Ree,s=e.length-1;for(let a=0;a<s;a++){let o=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||ro:t;o=tw(c,o)}r.push(o)}return r}function w4e(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(RJ(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=v4e(t,r,i),c=o.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=zg(e[h],e[h+1],d);return o[h](f)};return n?d=>u(Hu(e[0],e[s-1],d)):u}function S4e(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=zg(0,t,r);e.push(Wr(n,1,i))}}function C4e(e){const t=[0];return S4e(t,e.length-1),t}function k4e(e,t){return e.map(n=>n*t)}function _4e(e,t){return e.map(()=>t||Lee).splice(0,e.length-1)}function k4({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=y4e(r)?r.map(zF):zF(r),s={done:!1,value:t[0]},a=k4e(n&&n.length===t.length?n:C4e(t),e),o=w4e(a,t,{ease:Array.isArray(i)?i:_4e(t,i)});return{calculatedDuration:e,next:c=>(s.value=o(c),s.done=c>=e,s)}}const T4e=e=>{const t=({timestamp:n})=>e(n);return{start:()=>fr.update(t,!0),stop:()=>Vu(t),now:()=>Hi.isProcessing?Hi.timestamp:dc.now()}},E4e={decay:BF,inertia:BF,tween:k4,keyframes:k4,spring:Dee},j4e=e=>e/100;class Wk extends Aee{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,a=(i==null?void 0:i.KeyframeResolver)||sO,o=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,o,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=this.options,o=YR(n)?n:E4e[n]||k4;let c,u;o!==k4&&typeof t[0]!="number"&&(c=tw(j4e,Ree(t[0],t[1])),t=[0,100]);const d=o({...this.options,keyframes:t});s==="mirror"&&(u=o({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=ZJ(d));const{calculatedDuration:h}=d,f=h+i,m=f*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:h,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:h}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:p,repeatDelay:x,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,S=s;if(m){const E=Math.min(this.currentTime,d)/h;let A=Math.floor(E),j=E%1;!j&&E>=1&&(j=1),j===1&&A--,A=Math.min(A,m+1),!!(A%2)&&(p==="reverse"?(j=1-j,x&&(j-=x/h)):p==="mirror"&&(S=a)),w=Hu(0,1,j)*h}const C=y?{done:!1,value:c[0]}:S.next(w);o&&(C.value=o(C.value));let{done:k}=C;!y&&u!==null&&(k=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return _&&i!==void 0&&(C.value=Gk(c,this.options,i)),v&&v(C.value),_&&this.finish(),C}get duration(){const{resolved:t}=this;return t?ku(t.calculatedDuration):0}
vendor: 54,673 bytes, line 752
752get time(){return ku(this.currentTime)}set time(t){t=Cu(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ku(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=T4e,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function N4e(e){return new Wk(e)}const A4e=new Set(["opacity","clipPath","filter","transform"]);function M4e(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:o="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=tee(o,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const R4e=OR(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),_4=10,O4e=2e4;function D4e(e){return YR(e.type)||e.type==="spring"||!eee(e.ease)}function L4e(e,t){const n=new Wk({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<O4e;)r=n.sample(s),i.push(r.value),s+=_4;return{times:void 0,keyframes:i,duration:s-_4,ease:"linear"}}const Pee={anticipate:fee,backInOut:hee,circInOut:pee};function P4e(e){return e in Pee}class $F extends Aee{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Nee(s,(a,o)=>this.onKeyframesResolved(a,o),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:a,motionValue:o,name:c,startTime:u}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof s=="string"&&S4()&&P4e(s)&&(s=Pee[s]),D4e(this.options)){const{onComplete:h,onUpdate:f,motionValue:m,element:p,...x}=this.options,v=L4e(t,x);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,i=v.times,s=v.ease,a="keyframes"}const d=M4e(o.owner.current,c,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(_F(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;o.set(Gk(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ku(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ku(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Cu(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ro;const{animation:r}=n;_F(r,t)}return ro}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:a,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:h,element:f,...m}=this.options,p=new Wk({...m,keyframes:r,duration:i,type:s,ease:a,times:o,isGenerator:!0}),x=Cu(this.time);u.setWithVelocity(p.sample(x-_4).value,p.sample(x).value,_4)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:a,type:o}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return R4e()&&r&&A4e.has(r)&&!c&&!u&&!i&&s!=="mirror"&&a!==0&&o!=="inertia"}}const I4e={type:"spring",stiffness:500,damping:25,restSpeed:10},F4e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),B4e={type:"keyframes",duration:.8},z4e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$4e=(e,{keyframes:t})=>t.length>2?B4e:gp.has(e)?e.startsWith("scale")?F4e(t[1]):I4e:z4e;function U4e({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:o,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const oO=(e,t,n,r={},i,s)=>a=>{const o=WR(r,e)||{},c=o.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Cu(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:s?void 0:i};U4e(o)||(d={...d,...$4e(e,d)}),d.duration&&(d.duration=Cu(d.duration)),d.repeatDelay&&(d.repeatDelay=Cu(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const f=Gk(d.keyframes,o);if(f!==void 0)return fr.update(()=>{d.onUpdate(f),d.onComplete()}),new aCe([])}return!s&&$F.supports(d)?new $F(d):new Wk(d)};function V4e({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Iee(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:o,...c}=t;r&&(a=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const h in c){const f=e.getValue(h,(s=e.latestValues[h])!==null&&s!==void 0?s:null),m=c[h];if(m===void 0||d&&V4e(d,h))continue;const p={delay:n,...WR(a||{},h)};let x=!1;if(window.MotionHandoffAnimation){const g=oee(e);if(g){const y=window.MotionHandoffAnimation(g,h,fr);y!==null&&(p.startTime=y,x=!0)}}Y6(e,h),f.start(oO(h,f,m,e.shouldReduceMotion&&see.has(h)?{type:!1}:p,e,x));const v=f.animation;v&&u.push(v)}return o&&Promise.all(u).then(()=>{fr.update(()=>{o&&vCe(e,o)})}),u}function tA(e,t,n={}){var r;const i=qk(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const a=i?()=>Promise.all(Iee(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return H4e(e,t,d+u,h,f,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[a,o]:[o,a];return u().then(()=>d())}else return Promise.all([a(),o(n.delay)])}function H4e(e,t,n=0,r=0,i=1,s){const a=[],o=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>o-u*r;return Array.from(e.variantChildren).sort(q4e).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(tA(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function q4e(e,t){return e.sortNodePosition(t)}function G4e(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>tA(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=tA(e,t,n);else{const i=typeof t=="function"?qk(e,t,n.custom):t;r=Promise.all(Iee(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const W4e=LR.length;function Fee(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Fee(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<W4e;n++){const r=LR[n],i=e.props[r];(Fb(i)||i===!1)&&(t[r]=i)}return t}const Y4e=[...DR].reverse(),K4e=DR.length;function X4e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>G4e(e,n,r)))}function Q4e(e){let t=X4e(e),n=UF(),r=!0;const i=c=>(u,d)=>{var h;const f=qk(e,d,c==="exit"?(h=e.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:m,transitionEnd:p,...x}=f;u={...u,...x,...p}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=Fee(e.parent)||{},h=[],f=new Set;let m={},p=1/0;for(let v=0;v<K4e;v++){const g=Y4e[v],y=n[g],w=u[g]!==void 0?u[g]:d[g],S=Fb(w),C=g===c?y.isActive:null;C===!1&&(p=v);let k=w===d[g]&&w!==u[g]&&S;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),y.protectedKeys={...m},!y.isActive&&C===null||!w&&!y.prevProp||Vk(w)||typeof w=="boolean")continue;const _=Z4e(y.prevProp,w);let E=_||g===c&&y.isActive&&!k&&S||v>p&&S,A=!1;const j=Array.isArray(w)?w:[w];let D=j.reduce(i(g),{});C===!1&&(D={});const{prevResolvedValues:M={}}=y,$={...M,...D},B=P=>{E=!0,f.has(P)&&(A=!0,f.delete(P)),y.needsAnimating[P]=!0;const I=e.getValue(P);I&&(I.liveStyle=!1)};for(const P in $){const I=D[P],q=M[P];if(m.hasOwnProperty(P))continue;let R=!1;q6(I)&&q6(q)?R=!QJ(I,q):R=I!==q,R?I!=null?B(P):f.add(P):I!==void 0&&f.has(P)?B(P):y.protectedKeys[P]=!0}y.prevProp=w,y.prevResolvedValues=D,y.isActive&&(m={...m,...D}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(k&&_)||A)&&h.push(...j.map(P=>({animation:P,options:{type:g}})))}if(f.size){const v={};f.forEach(g=>{const y=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),v[g]=y??null}),h.push({animation:v})}let x=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(h):Promise.resolve()}function o(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:o,setAnimateFunction:s,getState:()=>n,reset:()=>{n=UF(),r=!0}}}function Z4e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!QJ(t,e):!1}function _f(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function UF(){return{animate:_f(!0),whileInView:_f(),whileHover:_f(),whileTap:_f(),whileDrag:_f(),whileFocus:_f(),exit:_f()}}class df{constructor(t){this.isMounted=!1,this.node=t}update(){}}class J4e extends df{constructor(t){super(t),t.animationState||(t.animationState=Q4e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vk(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let e5e=0;class t5e extends df{constructor(){super(...arguments),this.id=e5e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const n5e={animation:{Feature:J4e},exit:{Feature:t5e}};function $b(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nw(e){return{point:{x:e.pageX,y:e.pageY}}}const r5e=e=>t=>XR(t)&&e(t,nw(t));function q1(e,t,n,r){return $b(e,t,r5e(n),r)}const VF=(e,t)=>Math.abs(e-t);function i5e(e,t){const n=VF(e.x,t.x),r=VF(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bee{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=kT(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=i5e(h.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:p}=h,{timestamp:x}=Hi;this.history.push({...p,timestamp:x});const{onStart:v,onMove:g}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=CT(f,this.transformPagePoint),fr.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=kT(h.type==="pointercancel"?this.lastMoveEventInfo:CT(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),p&&p(h,v)},!XR(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=nw(t),o=CT(a,this.transformPagePoint),{point:c}=o,{timestamp:u}=Hi;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,kT(o,this.history)),this.removeListeners=tw(q1(this.contextWindow,"pointermove",this.handlePointerMove),q1(this.contextWindow,"pointerup",this.handlePointerUp),q1(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Vu(this.updatePoint)}}function CT(e,t){return t?{point:t(e.point)}:e}function HF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kT({point:e},t){return{point:e,delta:HF(e,zee(t)),offset:HF(e,s5e(t)),velocity:a5e(t,.1)}}function s5e(e){return e[0]}function zee(e){return e[e.length-1]}function a5e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=zee(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Cu(t)));)n--;if(!r)return{x:0,y:0};const s=ku(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const $ee=1e-4,o5e=1-$ee,l5e=1+$ee,Uee=.01,c5e=0-Uee,u5e=0+Uee;function ao(e){return e.max-e.min}function d5e(e,t,n){return Math.abs(e-t)<=n}function qF(e,t,n,r=.5){e.origin=r,e.originPoint=Wr(t.min,t.max,e.origin),e.scale=ao(n)/ao(t),e.translate=Wr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=o5e&&e.scale<=l5e||isNaN(e.scale))&&(e.scale=1),(e.translate>=c5e&&e.translate<=u5e||isNaN(e.translate))&&(e.translate=0)}function G1(e,t,n,r){qF(e.x,t.x,n.x,r?r.originX:void 0),qF(e.y,t.y,n.y,r?r.originY:void 0)}function GF(e,t,n){e.min=n.min+t.min,e.max=e.min+ao(t)}function h5e(e,t,n){GF(e.x,t.x,n.x),GF(e.y,t.y,n.y)}function WF(e,t,n){e.min=t.min-n.min,e.max=e.min+ao(t)}function W1(e,t,n){WF(e.x,t.x,n.x),WF(e.y,t.y,n.y)}function f5e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Wr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Wr(n,e,r.max):Math.min(e,n)),e}function YF(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function m5e(e,{top:t,left:n,bottom:r,right:i}){return{x:YF(e.x,n,i),y:YF(e.y,t,r)}}function KF(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function p5e(e,t){return{x:KF(e.x,t.x),y:KF(e.y,t.y)}}function g5e(e,t){let n=.5;const r=ao(e),i=ao(t);return i>r?n=zg(t.min,t.max-r,e.min):r>i&&(n=zg(e.min,e.max-i,t.min)),Hu(0,1,n)}function x5e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nA=.35;function y5e(e=nA){return e===!1?e=0:e===!0&&(e=nA),{x:XF(e,"left","right"),y:XF(e,"top","bottom")}}function XF(e,t,n){return{min:QF(e,t),max:QF(e,n)}}function QF(e,t){return typeof e=="number"?e:e[t]||0}const ZF=()=>({translate:0,scale:1,origin:0,originPoint:0}),S0=()=>({x:ZF(),y:ZF()}),JF=()=>({min:0,max:0}),ii=()=>({x:JF(),y:JF()});function So(e){return[e("x"),e("y")]}function Vee({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function b5e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function v5e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function _T(e){return e===void 0||e===1}function rA({scale:e,scaleX:t,scaleY:n}){return!_T(e)||!_T(t)||!_T(n)}function Df(e){return rA(e)||Hee(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Hee(e){return eB(e.x)||eB(e.y)}function eB(e){return e&&e!=="0%"}function T4(e,t,n){const r=e-n,i=t*r;return n+i}function tB(e,t,n,r,i){return i!==void 0&&(e=T4(e,i,r)),T4(e,n,r)+t}function iA(e,t=0,n=1,r,i){e.min=tB(e.min,t,n,r,i),e.max=tB(e.max,t,n,r,i)}function qee(e,{x:t,y:n}){iA(e.x,t.translate,t.scale,t.originPoint),iA(e.y,n.translate,n.scale,n.originPoint)}const nB=.999999999999,rB=1.0000000000001;function w5e(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let o=0;o<i;o++){s=n[o],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&k0(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,qee(e,a)),r&&Df(s.latestValues)&&k0(e,s.latestValues))}t.x<rB&&t.x>nB&&(t.x=1),t.y<rB&&t.y>nB&&(t.y=1)}function C0(e,t){e.min=e.min+t,e.max=e.max+t}function iB(e,t,n,r,i=.5){const s=Wr(e.min,e.max,i);iA(e,t,n,s,r)}function k0(e,t){iB(e.x,t.x,t.scaleX,t.scale,t.originX),iB(e.y,t.y,t.scaleY,t.scale,t.originY)}function Gee(e,t){return Vee(v5e(e.getBoundingClientRect(),t))}function S5e(e,t,n){const r=Gee(e,n),{scroll:i}=t;return i&&(C0(r.x,i.offset.x),C0(r.y,i.offset.y)),r}const Wee=({current:e})=>e?e.ownerDocument.defaultView:null,C5e=new WeakMap;class k5e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ii(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nw(d).point)},s=(d,h)=>{const{drag:f,dragPropagation:m,onDragStart:p}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pCe(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),So(v=>{let g=this.getAxisMotionValue(v).get()||0;if(uc.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[v];w&&(g=ao(w)*(parseFloat(g)/100))}}this.originPoint[v]=g}),p&&fr.postRender(()=>p(d,h)),Y6(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:p,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(m&&this.currentDirection===null){this.currentDirection=_5e(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&x(d,h)},o=(d,h)=>this.stop(d,h),c=()=>So(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Bee(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:o,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Wee(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&fr.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!g2(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=f5e(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&v0(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=m5e(i.layoutBox,n):this.constraints=!1,this.elastic=y5e(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&So(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=x5e(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!v0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=S5e(r,i.root,this.visualElement.getTransformPagePoint());let a=p5e(i.layout.layoutBox,s);if(n){const o=n(b5e(a));this.hasMutatedConstraints=!!o,o&&(a=Vee(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=So(d=>{if(!g2(d,n,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(d,p)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Y6(this.visualElement,t),r.start(oO(t,r,0,n,this.visualElement,!1))}stopAnimation(){So(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){So(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){So(n=>{const{drag:r}=this.getProps();if(!g2(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:o}=i.layout.layoutBox[n];s.set(t[n]-Wr(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!v0(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};So(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const c=o.get();i[a]=g5e({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),So(a=>{if(!g2(a,t,null))return;const o=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];o.set(Wr(c,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;C5e.set(this.visualElement,this);const t=this.visualElement.current,n=q1(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();v0(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),fr.read(r);const a=$b(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(So(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=nA,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function g2(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _5e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class T5e extends df{constructor(t){super(t),this.removeGroupControls=ro,this.removeListeners=ro,this.controls=new k5e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ro}unmount(){this.removeGroupControls(),this.removeListeners()}}const sB=e=>(t,n)=>{e&&fr.postRender(()=>e(t,n))};class E5e extends df{constructor(){super(...arguments),this.removePointerDownListener=ro}onPointerDown(t){this.session=new Bee(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wee(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:sB(t),onStart:sB(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&fr.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=q1(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const aC={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function aB(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ey={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Pt.test(e))e=parseFloat(e);else return e;const n=aB(e,t.target.x),r=aB(e,t.target.y);return`${n}% ${r}%`}},j5e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=$h.parse(e);if(i.length>5)return r;const s=$h.createTransformer(e),a=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=o,i[1+a]/=c;const u=Wr(o,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),s(i)}};class N5e extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;YSe(A5e),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),aC.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,a=r.projection;return a&&(a.isPresent=s,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||fr.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),IR.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yee(e){const[t,n]=MJ(),r=b.useContext(MR);return l.jsx(N5e,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(FJ),isPresent:t,safeToRemove:n})}const A5e={borderRadius:{...Ey,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ey,borderTopRightRadius:Ey,borderBottomLeftRadius:Ey,borderBottomRightRadius:Ey,boxShadow:j5e};function M5e(e,t,n){const r=bi(e)?e:Ug(e);return r.start(oO("",r,t,n)),r.animation}function R5e(e){return e instanceof SVGElement&&e.tagName!=="svg"}const O5e=(e,t)=>e.depth-t.depth;class D5e{constructor(){this.children=[],this.isDirty=!1}add(t){QR(this.children,t),this.isDirty=!0}remove(t){ZR(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(O5e),this.isDirty=!1,this.children.forEach(t)}}function L5e(e,t){const n=dc.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Vu(r),e(s-t))};return fr.read(r,!0),()=>Vu(r)}const Kee=["TopLeft","TopRight","BottomLeft","BottomRight"],P5e=Kee.length,oB=e=>typeof e=="string"?parseFloat(e):e,lB=e=>typeof e=="number"||Pt.test(e);function I5e(e,t,n,r,i,s){i?(e.opacity=Wr(0,n.opacity!==void 0?n.opacity:1,F5e(r)),e.opacityExit=Wr(t.opacity!==void 0?t.opacity:1,0,B5e(r))):s&&(e.opacity=Wr(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<P5e;a++){const o=`border${Kee[a]}Radius`;let c=cB(t,o),u=cB(n,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||lB(c)===lB(u)?(e[o]=Math.max(Wr(oB(c),oB(u),r),0),(uc.test(u)||uc.test(c))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=Wr(t.rotate||0,n.rotate||0,r))}function cB(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const F5e=Xee(0,.5,mee),B5e=Xee(.5,.95,ro);function Xee(e,t,n){return r=>r<e?0:r>t?1:n(zg(e,t,r))}function uB(e,t){e.min=t.min,e.max=t.max}function yo(e,t){uB(e.x,t.x),uB(e.y,t.y)}function dB(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hB(e,t,n,r,i){return e-=t,e=T4(e,1/n,r),i!==void 0&&(e=T4(e,1/i,r)),e}function z5e(e,t=0,n=1,r=.5,i,s=e,a=e){if(uc.test(t)&&(t=parseFloat(t),t=Wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=Wr(s.min,s.max,r);e===s&&(o-=t),e.min=hB(e.min,t,n,o,i),e.max=hB(e.max,t,n,o,i)}function fB(e,t,[n,r,i],s,a){z5e(e,t[n],t[r],t[i],t.scale,s,a)}const $5e=["x","scaleX","originX"],U5e=["y","scaleY","originY"];function mB(e,t,n,r){fB(e.x,t,$5e,n?n.x:void 0,r?r.x:void 0),fB(e.y,t,U5e,n?n.y:void 0,r?r.y:void 0)}function pB(e){return e.translate===0&&e.scale===1}function Qee(e){return pB(e.x)&&pB(e.y)}function gB(e,t){return e.min===t.min&&e.max===t.max}function V5e(e,t){return gB(e.x,t.x)&&gB(e.y,t.y)}function xB(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zee(e,t){return xB(e.x,t.x)&&xB(e.y,t.y)}function yB(e){return ao(e.x)/ao(e.y)}function bB(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class H5e{constructor(){this.members=[]}add(t){QR(this.members,t),t.scheduleRender()}remove(t){if(ZR(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function q5e(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||s||a)&&(r=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:m,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),p&&(r+=`skewY(${p}deg) `)}const o=e.x.scale*t.x,c=e.y.scale*t.y;return(o!==1||c!==1)&&(r+=`scale(${o}, ${c})`),r||"none"}const Lf={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},m1=typeof window<"u"&&window.MotionDebug!==void 0,TT=["","X","Y","Z"],G5e={visibility:"hidden"},vB=1e3;let W5e=0;function ET(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Jee(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=oee(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",fr,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Jee(r)}function ete({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},o=t==null?void 0:t()){this.id=W5e++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,m1&&(Lf.totalNodes=Lf.resolvedTargetDeltas=Lf.recalculatedProjection=0),this.nodes.forEach(X5e),this.nodes.forEach(tke),this.nodes.forEach(nke),this.nodes.forEach(Q5e),m1&&window.MotionDebug.record(Lf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new D5e)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new JR),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=R5e(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(u||c)&&(this.isLayoutDirty=!0),e){let h;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=L5e(f,250),aC.hasAnimatedSinceResize&&(aC.hasAnimatedSinceResize=!1,this.nodes.forEach(SB))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||oke,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=d.getProps(),y=!this.targetLayout||!Zee(this.targetLayout,p)||m,w=!f&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,w);const S={...WR(x,"layout"),onPlay:v,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||SB(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Vu(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rke),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Jee(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(wB);return}this.isUpdating||this.nodes.forEach(J5e),this.isUpdating=!1,this.nodes.forEach(eke),this.nodes.forEach(Y5e),this.nodes.forEach(K5e),this.clearAllSnapshots();const o=dc.now();Hi.delta=Hu(0,1e3/60,o-Hi.timestamp),Hi.timestamp=o,Hi.isProcessing=!0,xT.update.process(Hi),xT.preRender.process(Hi),xT.render.process(Hi),Hi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,IR.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Z5e),this.sharedNodes.forEach(ike)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ii(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Qee(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(o||Df(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),lke(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:o}=this.options;if(!o)return ii();const c=o.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(cke))){const{scroll:d}=this.root;d&&(C0(c.x,d.offset.x),C0(c.y,d.offset.y))}return c}removeElementScroll(a){var o;const c=ii();if(yo(c,a),!((o=this.scroll)===null||o===void 0)&&o.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&yo(c,a),C0(c.x,h.offset.x),C0(c.y,h.offset.y))}return c}applyTransform(a,o=!1){const c=ii();yo(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&k0(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Df(d.latestValues)&&k0(c,d.latestValues)}return Df(this.latestValues)&&k0(c,this.latestValues),c}removeTransform(a){const o=ii();yo(o,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Df(u.latestValues))continue;rA(u.latestValues)&&u.updateSnapshot();const d=ii(),h=u.measurePageBox();yo(d,h),mB(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Df(this.latestValues)&&mB(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var o;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=Hi.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ii(),this.relativeTargetOrigin=ii(),W1(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),yo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ii(),this.targetWithTransforms=ii()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),h5e(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):yo(this.target,this.layout.layoutBox),qee(this.target,this.targetDelta)):yo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ii(),this.relativeTargetOrigin=ii(),W1(this.relativeTargetOrigin,this.target,m.target),yo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}m1&&Lf.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||rA(this.parent.latestValues)||Hee(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Hi.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;yo(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;w5e(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ii());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(dB(this.prevProjectionDelta.x,this.projectionDelta.x),dB(this.prevProjectionDelta.y,this.projectionDelta.y)),G1(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!bB(this.projectionDelta.x,this.prevProjectionDelta.x)||!bB(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),m1&&Lf.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)===null||o===void 0||o.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=S0(),this.projectionDelta=S0(),this.projectionDeltaWithTransform=S0()}setAnimationOrigin(a,o=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=S0();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=ii(),m=c?c.source:void 0,p=this.layout?this.layout.source:void 0,x=m!==p,v=this.getStack(),g=!v||v.members.length<=1,y=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(ake));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const C=S/1e3;CB(h.x,a.x,C),CB(h.y,a.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(W1(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ske(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&V5e(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ii()),yo(w,this.relativeTarget)),x&&(this.animationValues=d,I5e(d,u,this.latestValues,C,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Vu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fr.update(()=>{aC.hasAnimatedSinceResize=!0,this.currentAnimation=M5e(0,vB,{...a,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:d}=a;if(!(!o||!c||!u)){if(this!==a&&this.layout&&u&&tte(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||ii();const h=ao(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const f=ao(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}yo(o,c),k0(o,d),G1(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new H5e),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const u={};c.z&&ET("z",a,u,this.animationValues);for(let d=0;d<TT.length;d++)ET(`rotate${TT[d]}`,a,u,this.animationValues),ET(`skew${TT[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var o,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return G5e;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=iC(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=iC(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Df(this.latestValues)&&(x.transform=d?d({},""):"none",this.hasProjected=!1),x}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=q5e(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:m,y:p}=this.projectionDelta;u.transformOrigin=`${m.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(c=(o=f.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const x in w4){if(f[x]===void 0)continue;const{correct:v,applyTo:g}=w4[x],y=u.transform==="none"?f[x]:v(f[x],h);if(g){const w=g.length;for(let S=0;S<w;S++)u[g[S]]=y}else u[x]=y}return this.options.layoutId&&(u.pointerEvents=h===this?iC(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(wB),this.root.sharedNodes.clear()}}}function Y5e(e){e.updateLayout()}function K5e(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?So(h=>{const f=a?n.measuredBox[h]:n.layoutBox[h],m=ao(f);f.min=r[h].min,f.max=f.min+m}):tte(s,n.layoutBox,r)&&So(h=>{const f=a?n.measuredBox[h]:n.layoutBox[h],m=ao(r[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const o=S0();G1(o,r,n.layoutBox);const c=S0();a?G1(c,e.applyTransform(i,!0),n.measuredBox):G1(c,r,n.layoutBox);const u=!Qee(o);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const p=ii();W1(p,n.layoutBox,f.layoutBox);const x=ii();W1(x,r,m.layoutBox),Zee(p,x)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=p,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X5e(e){m1&&Lf.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Q5e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Z5e(e){e.clearSnapshot()}function wB(e){e.clearMeasurements()}function J5e(e){e.isLayoutDirty=!1}function eke(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function SB(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tke(e){e.resolveTargetDelta()}function nke(e){e.calcProjection()}
vendor: 6,648 bytes, line 752
752function rke(e){e.resetSkewAndRotation()}function ike(e){e.removeLeadSnapshot()}function CB(e,t,n){e.translate=Wr(t.translate,0,n),e.scale=Wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kB(e,t,n,r){e.min=Wr(t.min,n.min,r),e.max=Wr(t.max,n.max,r)}function ske(e,t,n,r){kB(e.x,t.x,n.x,r),kB(e.y,t.y,n.y,r)}function ake(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oke={duration:.45,ease:[.4,0,.1,1]},_B=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),TB=_B("applewebkit/")&&!_B("chrome/")?Math.round:ro;function EB(e){e.min=TB(e.min),e.max=TB(e.max)}function lke(e){EB(e.x),EB(e.y)}function tte(e,t,n){return e==="position"||e==="preserve-aspect"&&!d5e(yB(t),yB(n),.2)}function cke(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uke=ete({attachResizeListener:(e,t)=>$b(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),jT={current:void 0},nte=ete({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!jT.current){const e=new uke({});e.mount(window),e.setOptions({layoutScroll:!0}),jT.current=e}return jT.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dke={pan:{Feature:E5e},drag:{Feature:T5e,ProjectionNode:nte,MeasureLayout:Yee}};function jB(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&fr.postRender(()=>s(t,nw(t)))}class hke extends df{mount(){const{current:t}=this.node;t&&(this.unmount=uCe(t,n=>(jB(this.node,n,"Start"),r=>jB(this.node,r,"End"))))}unmount(){}}class fke extends df{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tw($b(this.node.current,"focus",()=>this.onFocus()),$b(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function NB(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&fr.postRender(()=>s(t,nw(t)))}class mke extends df{mount(){const{current:t}=this.node;t&&(this.unmount=mCe(t,n=>(NB(this.node,n,"Start"),(r,{success:i})=>NB(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sA=new WeakMap,NT=new WeakMap,pke=e=>{const t=sA.get(e.target);t&&t(e)},gke=e=>{e.forEach(pke)};function xke({root:e,...t}){const n=e||document;NT.has(n)||NT.set(n,{});const r=NT.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gke,{root:e,...t})),r[i]}function yke(e,t,n){const r=xke(t);return sA.set(e,n),r.observe(e),()=>{sA.delete(e),r.unobserve(e)}}const bke={some:0,all:1};class vke extends df{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:bke[i]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return yke(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(wke(t,n))&&this.startObserver()}unmount(){}}function wke({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ske={inView:{Feature:vke},tap:{Feature:mke},focus:{Feature:fke},hover:{Feature:hke}},Cke={layout:{ProjectionNode:nte,MeasureLayout:Yee}},E4={current:null},lO={current:!1};function rte(){if(lO.current=!0,!!RR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>E4.current=e.matches;e.addListener(t),t()}else E4.current=!1}const kke=[...jee,ks,$h],_ke=e=>kke.find(Eee(e)),AB=new WeakMap;function Tke(e,t,n){for(const r in t){const i=t[r],s=n[r];if(bi(i))e.addValue(r,i);else if(bi(s))e.addValue(r,Ug(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Ug(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const MB=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Eke{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=dc.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,fr.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!s,this.isControllingVariants=Hk(n),this.isVariantNode=PJ(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const p=f[m];c[m]!==void 0&&bi(p)&&p.set(c[m],!1)}}mount(t){this.current=t,AB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 4,441 bytes, line 752
752h((n,r)=>this.bindToMotionValue(r,n)),lO.current||rte(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:E4.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){AB.delete(this.current),this.projection&&this.projection.unmount(),Vu(this.notifyUpdate),Vu(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=gp.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&fr.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in $g){const n=$g[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ii()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<MB.length;r++){const i=MB[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,a=t[s];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Tke(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ug(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(_ee(i)||gee(i))?i=parseFloat(i):!_ke(i)&&$h.test(n)&&(i=See(t,n)),this.setBaseTarget(t,bi(i)?i.get():i)),bi(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=BR(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!bi(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new JR),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}
752class ite extends Eke{constructor(){super(...arguments),this.KeyframeResolver=Nee}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;bi(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jke(e){return window.getComputedStyle(e)}class Nke extends ite{constructor(){super(...arguments),this.type="html",this.renderInstance=qJ}readValueFromInstance(t,n){if(gp.has(n)){const r=iO(n);return r&&r.default||0}else{const r=jke(t),i=(UJ(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Gee(t,n)}build(t,n,r){UR(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return GR(t,n,r)}}class Ake extends ite{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ii}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(gp.has(n)){const r=iO(n);return r&&r.default||0}return n=GJ.has(n)?n:PR(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return KJ(t,n,r)}build(t,n,r){VR(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){WJ(t,n,r,i)}mount(t){this.isSVGTag=qR(t.tagName),super.mount(t)}}const Mke=(e,t)=>FR(e)?new Ake(t):new Nke(t,{allowProjection:e!==b.Fragment}),Rke=rCe({...n5e,...Ske,...dke,...Cke},Mke),nc=ySe(Rke);function j4(e){const t=Bk(()=>Ug(e)),{isStatic:n}=b.useContext(Zv);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}function Oke(e,t){const n=j4(t()),r=()=>n.set(t());return r(),$k(()=>{const i=()=>fr.preRender(r,!1,!0),s=e.map(a=>a.on("change",i));return()=>{s.forEach(a=>a()),Vu(r)}}),n}function Dke(e,...t){const n=e.length;function r(){let i="";for(let s=0;s<n;s++){i+=e[s];const a=t[s];a&&(i+=bi(a)?a.get():a)}return i}return Oke(t.filter(bi),r)}function RB(e){return typeof e=="number"?e:parseFloat(e)}function OB(e,t={}){const{isStatic:n}=b.useContext(Zv),r=b.useRef(null),i=j4(bi(e)?RB(e.get()):e),s=b.useRef(i.get()),a=b.useRef(()=>{}),o=()=>{const u=r.current;u&&u.time===0&&u.sample(Hi.delta),c(),r.current=N4e({keyframes:[i.get(),s.current],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:a.current})},c=()=>{r.current&&r.current.stop()};return b.useInsertionEffect(()=>i.attach((u,d)=>n?d(u):(s.current=u,a.current=d,fr.update(o),i.get()),c),[JSON.stringify(t)]),$k(()=>{if(bi(e))return e.on("change",u=>i.set(RB(u)))},[i]),i}function rw(){!lO.current&&rte();const[e]=b.useState(E4.current);return e}const Lke={up:"text-emerald-700 bg-emerald-500/10 dark:text-emerald-300 dark:bg-emerald-500/15",down:"text-red-700 bg-red-500/10 dark:text-red-300 dark:bg-red-500/15",neutral:"text-muted-foreground bg-muted dark:bg-muted/40"},iw=Y.forwardRef(({direction:e,label:t,icon:n,className:r,ariaLabel:i},s)=>l.jsxs("span",{ref:s,role:"status","aria-label":i??t,"data-direction":e,className:re("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-bold leading-none whitespace-nowrap",Lke[e],r),children:[n&&l.jsx("span",{"aria-hidden":"true",className:"inline-flex items-center [&>svg]:h-3 [&>svg]:w-3",children:n}),l.jsx("span",{children:t})]}));iw.displayName="TrendChip";const dr=({label:e,htmlFor:t,error:n,required:r,hint:i,hintPlacement:s="inline",children:a,className:o})=>{const c=s==="inline"&&i&&!n,u=s==="below"&&i&&!n;return l.jsxs("div",{className:re("space-y-1.5",o),children:[l.jsxs("div",{className:re("flex items-baseline",s==="inline"?"justify-between gap-2":""),children:[l.jsxs("label",{htmlFor:t,className:"text-sm font-semibold leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:[e,r&&l.jsx("span",{className:"text-destructive ms-0.5",children:"*"})]}),c&&l.jsx(Qa,{id:`${t}-hint`,className:"text-xs text-muted-foreground",children:i})]}),u&&l.jsx(Qa,{id:`${t}
752-hint`,className:"text-xs text-muted-foreground",children:i}),a,n&&l.jsx(Qa,{id:`${t}-error`,className:"text-destructive",role:"alert",children:n})]})},Pke=Y.forwardRef(({label:e="Password",error:t,required:n,hint:r,className:i,id:s,...a},o)=>{const[c,u]=Y.useState(!1),d=s??"password-field";return l.jsx(dr,{label:e,htmlFor:d,error:t,required:n,hint:r,className:i,children:l.jsxs("div",{className:"relative",children:[l.jsx("input",{ref:o,id:d,type:c?"text":"password",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pe-10 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","aria-invalid":!!t,"aria-describedby":t?`${d}-error`:r?`${d}-hint`:void 0,...a}),l.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute end-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors","aria-label":c?"Hide password":"Show password",tabIndex:-1,children:c?l.jsx(bk,{className:"h-4 w-4"}):l.jsx(_x,{className:"h-4 w-4"})})]})})});Pke.displayName="PasswordField";const ste=Y.forwardRef(({value:e,max:t=100,size:n=120,strokeWidth:r=8,label:i,sublabel:s,iconCenter:a,color:o="var(--arthur-primary, hsl(var(--primary)))",gradient:c,variant:u="circle",ariaLabel:d,className:h,...f},m)=>{const x=`cp-gradient-${b.useId().replace(/[:]/g,"")}`,v=(n-r)/2,g=Math.min(t,Math.max(0,e)),y=u==="semicircle",w=2*Math.PI*v,S=y?Math.PI*v:w,C=S-g/t*S,k=c?`url(#${x})`:o,_=d??`${g} of ${t}`,E=y?{width:n,height:n/2+r/2}:{width:n,height:n},A=y?`M ${r/2} ${n/2} A ${v} ${v} 0 0 1 ${n-r/2} ${n/2}`:null;return l.jsxs("div",{ref:m,className:re("relative inline-flex items-center justify-center",h),style:E,role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":g,"aria-label":_,...f,children:[l.jsxs("svg",{width:E.width,height:E.height,viewBox:`0 0 ${n} ${y?n/2+r/2:n}`,className:y?"":"-rotate-90","aria-hidden":"true",children:[c&&l.jsx("defs",{children:l.jsxs("linearGradient",{id:x,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[l.jsx("stop",{offset:"0%",stopColor:c.from}),l.jsx("stop",{offset:"100%",stopColor:c.to})]})}),y?l.jsxs(l.Fragment,{children:[l.jsx("path",{d:A??"",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:r,strokeLinecap:"round"}),l.jsx("path",{d:A??"",fill:"none",stroke:k,strokeWidth:r,strokeLinecap:"round",strokeDasharray:S,strokeDashoffset:C,className:"transition-[stroke-dashoffset] duration-500 ease-in-out"})]}):l.jsxs(l.Fragment,{children:[l.jsx("circle",{cx:n/2,cy:n/2,r:v,fill:"none",stroke:"hsl(var(--muted))",strokeWidth:r}),l.jsx("circle",{cx:n/2,cy:n/2,r:v,fill:"none",stroke:k,strokeWidth:r,strokeLinecap:"round",strokeDasharray:w,strokeDashoffset:C,className:"transition-[stroke-dashoffset] duration-500 ease-in-out"})]})]}),(a||i||s)&&l.jsx("div",{className:re("absolute inset-0 flex flex-col items-center justify-center",y&&"pb-1"),children:a||l.jsxs(l.Fragment,{children:[i&&l.jsx("span",{className:"text-lg font-semibold leading-tight text-foreground",children:i}),s&&l.jsx("span",{className:"mt-0.5 text-[0.65rem] leading-tight text-muted-foreground",children:s})]})})]})});ste.displayName="CircularProgress";const Ike=Y.forwardRef(({className:e,variant:t="standard",delay:n=0,noHover:r,style:i,onClick:s,children:a,...o},c)=>{const u=j4(0),d=j4(0),h=rw(),f=OB(u,{stiffness:500,damping:50}),m=OB(d,{stiffness:500,damping:50}),p=g=>{const{left:y,top:w}=g.currentTarget.getBoundingClientRect();u.set(g.clientX-y),d.set(g.clientY-w)},x=t==="hero",v=Dke`radial-gradient(300px at ${f}px ${m}px, white, transparent)`;return l.jsxs(nc.div,{ref:c,initial:h?{opacity:1,y:0}:{opacity:0,y:20},whileInView:h?void 0:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:h?{duration:0}:{duration:.5,delay:n,ease:"easeOut"},whileHover:!r&&!h?{y:-2}:void 0,onMouseMove:p,onClick:s,className:re("group relative overflow-hidden rounded-xl bg-card text-card-foreground","border border-border shadow-soft transition-all duration-300",!r&&"cursor-pointer hover:shadow-elevated hover:border-border/80",x&&"shadow-elevated",e),style:i,...o,children:[x&&!h&&l.jsx(nc.div,{className:"pointer-events-none absolute inset-0 z-10 opacity-0 mix-blend-overlay transition-opacity duration-500 group-hover:opacity-100",style:{background:"radial-gradient(circle at center, rgba(255,255,255, 0.8), transparent 50%)",maskImage:v,WebkitMaskImage:v}}),l.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-primary/[0.03] via-trans
752parent to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100"}),l.jsx("div",{className:"relative z-20 h-full",children:a})]})});Ike.displayName="FancyCard";/** 753 * table-core 754 * 755 * Copyright (c) TanStack 756 * 757 * This source code is licensed under the MIT license found in the 758 * LICENSE.md file in the root directory of this source tree. 759 * 760 * @license MIT 761 */function fh(e,t){return typeof e=="function"?e(t):e}function oo(e,t){return n=>{t.setState(r=>({...r,[e]:fh(n,r[e])}))}}function Yk(e){return e instanceof Function}function Fke(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Bke(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const a=t(s);a!=null&&a.length&&r(a)})};return r(e),n}function $t(e,t,n){let r=[],i;return s=>{let a;n.key&&n.debug&&(a=Date.now());const o=e(s);if(!(o.length!==r.length||o.some((d,h)=>r[h]!==d)))return i;r=o;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...o),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,h=Math.round((Date.now()-u)*100)/100,f=h/16,m=(p,x)=>{for(p=String(p);p.length<x;)p=" "+p;return p};console.info(`%câ± ${m(h,5)} /${m(d,5)} ms`,` 762 font-size: .6rem; 763 font-weight: bold; 764 color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Ut(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function zke(e,t,n,r){const i=()=>{var a;return(a=s.getValue())!=null?a:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:$t(()=>[e,n,t,s],(a,o,c,u)=>({table:a,column:o,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Ut(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(s,n,t,e)},{}),s}function $ke(e,t,n,r){var i,s;const o={...e._getDefaultColumnDef(),...t}
vendor: 50,233 bytes, lines 764-773
764,c=o.accessorKey;let u=(i=(s=o.id)!=null?s:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?i:typeof o.header=="string"?o.header:void 0,d;if(o.accessorFn?d=o.accessorFn:c&&(c.includes(".")?d=f=>{let m=f;for(const x of c.split(".")){var p;m=(p=m)==null?void 0:p[x]}return m}:d=f=>f[o.accessorKey]),!u)throw new Error;let h={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:o,columns:[],getFlatColumns:$t(()=>[!0],()=>{var f;return[h,...(f=h.columns)==null?void 0:f.flatMap(m=>m.getFlatColumns())]},Ut(e.options,"debugColumns")),getLeafColumns:$t(()=>[e._getOrderColumnsFn()],f=>{var m;if((m=h.columns)!=null&&m.length){let p=h.columns.flatMap(x=>x.getLeafColumns());return f(p)}return[h]},Ut(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(h,e);return h}const ys="debugHeaders";function DB(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],o=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(o),a.push(c)};return o(s),a},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(s,e)}),s}const Uke={createTable:e=>{e.getHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,a;const o=(s=r==null?void 0:r.map(h=>n.find(f=>f.id===h)).filter(Boolean))!=null?s:[],c=(a=i==null?void 0:i.map(h=>n.find(f=>f.id===h)).filter(Boolean))!=null?a:[],u=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(i!=null&&i.includes(h.id)));return x2(t,[...o,...u,...c],e)},Ut(e.options,ys)),e.getCenterHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),x2(t,n,e,"center")),Ut(e.options,ys)),e.getLeftHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(a=>n.find(o=>o.id===a)).filter(Boolean))!=null?i:[];return x2(t,s,e,"left")},Ut(e.options,ys)),e.getRightHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(a=>n.find(o=>o.id===a)).filter(Boolean))!=null?i:[];return x2(t,s,e,"right")},Ut(e.options,ys)),e.getFooterGroups=$t(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ut(e.options,ys)),e.getLeftFooterGroups=$t(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ut(e.options,ys)),e.getCenterFooterGroups=$t(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ut(e.options,ys)),e.getRightFooterGroups=$t(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ut(e.options,ys)),e.getFlatHeaders=$t(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ut(e.options,ys)),e.getLeftFlatHeaders=$t(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ut(e.options,ys)),e.getCenterFlatHeaders=$t(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ut(e.options,ys)),e.getRightFlatHeaders=$t(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ut(e.options,ys)),e.getCenterLeafHeaders=$t(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ut(e.options,ys)),e.getLeftLeafHeaders=$t(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ut(e.options,ys)),e.getRightLeafHeaders=$t(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ut(e.options,ys)),e.getLeafHeaders=$t(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,a,o,c,u;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(a=(o=n[0])==null?void 0:o.headers)!=null?a:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},Ut(e.options,ys))}};function x2(e,t,n,r){var i,s;let a=0;const o=function(f,m){m===void 0&&(m=1),a=Math.max(a,m),f.filter(p=>p.getIsVisible()).forEach(p=>{var x;(x=p.columns)!=null&&x.length&&o(p.columns,m+1)},0)};o(e);let c=[];const u=(f,m)=>{const p={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},x=[];f.forEach(v=>{const g=[...x].reverse()[0],y=v.column.depth===p.depth;let w,S=!1;if(y&&v.column.parent?w=v.column.parent:(w=v.column,S=!0),g&&(g==null?void 0:g.column)===w)g.subHeaders.push(v);else{const C=DB(n,w,{id:[r,m,w.id,v==null?void 0:v.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${x.filter(k=>k.column===w).length}`:void 0,depth:m,index:x.length});C.subHeaders.push(v),x.push(C)}p.headers.push(v),v.headerGroup=p}),c.push(p),m>0&&u(x,m-1)},d=t.map((f,m)=>DB(n,f,{depth:a,index:m}));u(d,a-1),c.reverse();const h=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let x=0,v=0,g=[0];p.subHeaders&&p.subHeaders.length?(g=[],h(p.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:C}=w;x+=S,g.push(C)})):x=1;const y=Math.min(...g);return v=v+y,p.colSpan=x,p.rowSpan=v,{colSpan:x,rowSpan:v}});return h((i=(s=c[0])==null?void 0:s.headers)!=null?i:[]),c}const Vke=(e,t,n,r,i,s,a)=>{let o={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(o._valuesCache.hasOwnProperty(c))return o._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return o._valuesCache[c]=u.accessorFn(o.original,r),o._valuesCache[c]},getUniqueValues:c=>{if(o._uniqueValuesCache.hasOwnProperty(c))return o._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(o._uniqueValuesCache[c]=u.columnDef.getUniqueValues(o.original,r),o._uniqueValuesCache[c]):(o._uniqueValuesCache[c]=[o.getValue(c)],o._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=o.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Bke(o.subRows,c=>c.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let c=[],u=o;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:$t(()=>[e.getAllLeafColumns()],c=>c.map(u=>zke(e,o,u,u.id)),Ut(e.options,"debugRows")),_getAllCellsByColumnId:$t(()=>[o.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),Ut(e.options,"debugRows"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(o,e)}return o},Hke={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ate=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};ate.autoRemove=e=>Cl(e);const ote=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};ote.autoRemove=e=>Cl(e);const lte=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};lte.autoRemove=e=>Cl(e);const cte=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};cte.autoRemove=e=>Cl(e);const ute=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});ute.autoRemove=e=>Cl(e)||!(e!=null&&e.length);const dte=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});dte.autoRemove=e=>Cl(e)||!(e!=null&&e.length);const hte=(e,t,n)=>e.getValue(t)===n;hte.autoRemove=e=>Cl(e);const fte=(e,t,n)=>e.getValue(t)==n;fte.autoRemove=e=>Cl(e);const cO=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};cO.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(s>a){const o=s;s=a,a=o}return[s,a]};cO.autoRemove=e=>Cl(e)||Cl(e[0])&&Cl(e[1]);const eu={includesString:ate,includesStringSensitive:ote,equalsString:lte,arrIncludes:cte,arrIncludesAll:ute,arrIncludesSome:dte,equals:hte,weakEquals:fte,inNumberRange:cO};function Cl(e){return e==null||e===""}const qke={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:oo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return Yk(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r==null?void 0:r.find(d=>d.id===e.id),a=fh(n,s?s.value:void 0);if(LB(i,a,e)){var o;return(o=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?o:[]}const c={id:e.id,value:a};if(s){var u;return(u=r==null?void 0:r.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=fh(t,i))==null?void 0:s.filter(a=>{const o=n.find(c=>c.id===a.id);if(o){const c=o.getFilterFn();if(LB(c,a.value,o))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function LB(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Gke=(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),Wke=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},Yke=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},Kke=(e,t,n)=>{let r,i;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},Xke=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},Qke=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!Fke(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,a)=>s-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Zke=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Jke=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,e3e=(e,t)=>t.length,AT={sum:Gke,min:Wke,max:Yke,extent:Kke,mean:Xke,median:Qke,unique:Zke,uniqueCount:Jke,count:e3e},t3e={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:oo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return AT.sum;if(Object.prototype.toString.call(r)==="[object Date]")return AT.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Yk(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:AT[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function n3e(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(a=>a.id===s)).filter(Boolean),...r]}const r3e={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:oo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=$t(n=>[Y1(t,n)],n=>n.findIndex(r=>r.id===e.id),Ut(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Y1(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Y1(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=$t(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const a=[...t],o=[...i];for(;o.length&&a.length;){const c=a.shift(),u=o.findIndex(d=>d.id===c);u>-1&&s.push(o.splice(u,1)[0])}s=[...s,...o]}return n3e(s,n,r)},Ut(e.options,"debugTable"))}},MT=()=>({left:[],right:[]}),i3e={getInitialState:e=>({columnPinning:MT(),...e}),getDefaultOptions:e=>({onColumnPinningChange:oo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,a;if(n==="right"){var o,c;return{left:((o=i==null?void 0:i.left)!=null?o:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((c=i==null?void 0:i.right)!=null?c:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var u,d;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((d=i==null?void 0:i.right)!=null?d:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(h=>!(r!=null&&r.includes(h))),right:((a=i==null?void 0:i.right)!=null?a:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(o=>o.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(o=>r==null?void 0:r.includes(o)),a=n.some(o=>i==null?void 0:i.includes(o));return s?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(a=>!s.includes(a.column.id))},Ut(t.options,"debugRows")),e.getLeftVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Ut(t.options,"debugRows")),e.getRightVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Ut(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?MT():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:MT())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ut(e.options,"debugColumns")),e.getRightLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ut(e.options,"debugColumns")),e.getCenterLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},Ut(e.options,"debugColumns"))}};function s3e(e){return e||(typeof document<"u"?document:null)}const y2={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},RT=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),a3e={getDefaultColumnDef:()=>y2,getInitialState:e=>({columnSizing:{},columnSizingInfo:RT(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:oo("columnSizing",e),onColumnSizingInfoChange:oo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:y2.minSize,(r=s??e.columnDef.size)!=null?r:y2.size),(i=e.columnDef.maxSize)!=null?i:y2.maxSize)},e.getStart=$t(n=>[n,Y1(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),Ut(t.options,"debugColumns")),e.getAfter=$t(n=>[n,Y1(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),Ut(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),OT(s)&&s.touches&&s.touches.length>1))return;const a=e.getSize(),o=e?e.getLeafHeaders().map(g=>[g.column.id,g.column.getSize()]):[[r.id,r.getSize()]],c=OT(s)?Math.round(s.touches[0].clientX):s.clientX,u={},d=(g,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(w=>{var S,C;const k=t.options.columnResizeDirection==="rtl"?-1:1,_=(y-((S=w==null?void 0:w.startOffset)!=null?S:0))*k,E=Math.max(_/((C=w==null?void 0:w.startSize)!=null?C:0),-.999999);return w.columnSizingStart.forEach(A=>{let[j,D]=A;u[j]=Math.round(Math.max(D+D*E,0)*100)/100}),{...w,deltaOffset:_,deltaPercentage:E}}),(t.options.columnResizeMode==="onChange"||g==="end")&&t.setColumnSizing(w=>({...w,...u})))},h=g=>d("move",g),f=g=>{d("end",g),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=s3e(n),p={moveHandler:g=>h(g.clientX),upHandler:g=>{m==null||m.removeEventListener("mousemove",p.moveHandler),m==null||m.removeEventListener("mouseup",p.upHandler),f(g.clientX)}},x={moveHandler:g=>(g.cancelable&&(g.preventDefault(),g.stopPropagation()),h(g.touches[0].clientX),!1),upHandler:g=>{var y;m==null||m.removeEventListener("touchmove",x.moveHandler),m==null||m.removeEventListener("touchend",x.upHandler),g.cancelable&&(g.preventDefault(),g.stopPropagation()),f((y=g.touches[0])==null?void 0:y.clientX)}},v=o3e()?{passive:!1}:!1;OT(s)?(m==null||m.addEventListener("touchmove",x.moveHandler,v),m==null||m.addEventListener("touchend",x.upHandler,v)):(m==null||m.addEventListener("mousemove",p.moveHandler,v),m==null||m.addEventListener("mouseup",p.upHandler,v)),t.setColumnSizingInfo(g=>({...g,startOffset:c,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?RT():(n=e.initialState.columnSizingInfo)!=null?n:RT())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let b2=null;function o3e(){if(typeof b2=="boolean")return b2;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return b2=e,b2}function OT(e){return e.type==="touchstart"}const l3e={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:oo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=$t(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ut(t.options,"debugRows")),e.getVisibleCells=$t(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ut(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>$t(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),Ut(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Y1(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const c3e={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},u3e={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:oo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Yk(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},d3e={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:oo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const a=s.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(o=>{a[o]=!0}):a=r,n=(i=n)!=null?i:!s,!s&&n)return{...a,[e.id]:!0};if(s&&!n){const{[e.id]:o,...c}=a;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},aA=0,oA=10,DT=()=>({pageIndex:aA,pageSize:oA}),h3e={getInitialState:e=>({...e,pagination:{...DT(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:oo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>fh(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?DT():(i=e.initialState.pagination)!=null?i:DT())},e.setPageIndex=r=>{e.setPagination(i=>{let s=fh(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?aA:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:aA)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?oA:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:oA)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,fh(r,i.pageSize)),a=i.pageSize*i.pageIndex,o=Math.floor(a/s);return{...i,pageIndex:o,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let a=fh(r,(s=e.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=$t(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,a)=>a)),i},Ut(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},LT=()=>({top:[],bottom:[]}),f3e={getInitialState:e=>({rowPinning:LT(),...e}),getDefaultOptions:e=>({onRowPinningChange:oo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],a=i?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],o=new Set([...a,e.id,...s]);t.setRowPinning(c=>{var u,d;if(n==="bottom"){var h,f;return{top:((h=c==null?void 0:c.top)!=null?h:[]).filter(x=>!(o!=null&&o.has(x))),bottom:[...((f=c==null?void 0:c.bottom)!=null?f:[]).filter(x=>!(o!=null&&o.has(x))),...Array.from(o)]}}if(n==="top"){var m,p;return{top:[...((m=c==null?void 0:c.top)!=null?m:[]).filter(x=>!(o!=null&&o.has(x))),...Array.from(o)],bottom:((p=c==null?void 0:c.bottom)!=null?p:[]).filter(x=>!(o!=null&&o.has(x)))}}return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(x=>!(o!=null&&o.has(x))),bottom:((d=c==null?void 0:c.bottom)!=null?d:[]).filter(x=>!(o!=null&&o.has(x)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(o=>r==null?void 0:r.includes(o)),a=n.some(o=>i==null?void 0:i.includes(o));return s?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:o}=a;return o});return(r=s==null?void 0:s.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?LT():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:LT())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const o=e.getRow(a,!0);return o.getIsAllParentsExpanded()?o:null}):(n??[]).map(a=>t.find(o=>o.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ut(e.options,"debugRows")),e.getBottomRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ut(e.options,"debugRows")),e.getCenterRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},Ut(e.options,"debugRows"))}},m3e={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:oo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{lA(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?PT(e,n):{rows:[],flatRows:[],rowsById:{}},Ut(e.options,"debugTable")),e.getFilteredSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?PT(e,n):{rows:[],flatRows:[],rowsById:{}},Ut(e.options,"debugTable")),e.getGroupedSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?PT(e,n):{rows:[],flatRows:[],rowsById:{}},Ut(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const o={...s};return lA(o,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),o})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return uO(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return cA(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return cA(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},lA=(e,t,n,r,i)=>{var s;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(o=>delete e[o]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(o=>lA(e,o.id,n,r,i))};function PT(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(a,o){return a.map(c=>{var u;const d=uO(c,n);if(d&&(r.push(c),i[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:s(c.subRows)}),d)return c}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function uO(e,t){var n;return(n=t[e.id])!=null?n:!1}function cA(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(a=>{if(!(s&&!i)&&(a.getCanSelect()&&(uO(a,t)?s=!0:i=!1),a.subRows&&a.subRows.length)){const o=cA(a,t);o==="all"?s=!0:(o==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const uA=/([0-9]+)/gm,p3e=(e,t,n)=>mte(Uh(e.getValue(n)).toLowerCase(),Uh(t.getValue(n)).toLowerCase()),g3e=(e,t,n)=>mte(Uh(e.getValue(n)),Uh(t.getValue(n))),x3e=(e,t,n)=>dO(Uh(e.getValue(n)).toLowerCase(),Uh(t.getValue(n)).toLowerCase()),y3e=(e,t,n)=>dO(Uh(e.getValue(n)),Uh(t.getValue(n))),b3e=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},v3e=(e,t,n)=>dO(e.getValue(n),t.getValue(n));function dO(e,t){return e===t?0:e>t?1:-1}function Uh(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function mte(e,t){const n=e.split(uA).filter(Boolean),r=t.split(uA).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),a=parseInt(i,10),o=parseInt(s,10),c=[a,o].sort();if(isNaN(c[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(c[1]))return isNaN(a)?-1:1;if(a>o)return 1;if(o>a)return-1}return n.length-r.length}const jy={alphanumeric:p3e,alphanumericCaseSensitive:g3e,text:x3e,textCaseSensitive:y3e,datetime:b3e,basic:v3e},w3e={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:oo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return jy.datetime;if(typeof s=="string"&&(r=!0,s.split(uA).length>1))return jy.alphanumeric}return r?jy.text:jy.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Yk(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:jy[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(a=>{const o=a==null?void 0:a.find(m=>m.id===e.id),c=a==null?void 0:a.findIndex(m=>m.id===e.id);let u=[],d,h=s?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?o?d="toggle":d="add":a!=null&&a.length&&c!==a.length-1?d="replace":o?d="toggle":d="replace",d==="toggle"&&(s||i||(d="remove")),d==="add"){var f;u=[...a,{id:e.id,desc:h}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=a.map(m=>m.id===e.id?{...m,desc:h}:m):d==="remove"?u=a.filter(m=>m.id!==e.id):u=[{id:e.id,desc:h}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const s=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},S3e=[Uke,l3e,r3e,i3e,Hke,qke,c3e,u3e,w3e,t3e,d3e,h3e,f3e,m3e,a3e];function C3e(e){var t,n;const r=[...S3e,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((f,m)=>Object.assign(f,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),a=f=>i.options.mergeOptions?i.options.mergeOptions(s,f):{...s,...f};let c={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(f=>{var m;c=(m=f.getInitialState==null?void 0:f.getInitialState(c))!=null?m:c});const u=[];let d=!1;const h={_features:r,options:{...s,...e},initialState:c,_queue:f=>{u.push(f),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:f=>{const m=fh(f,i.options);i.options=a(m)},getState:()=>i.options.state,setState:f=>{i.options.onStateChange==null||i.options.onStateChange(f)},_getRowId:(f,m,p)=>{var x;return(x=i.options.getRowId==null?void 0:i.options.getRowId(f,m,p))!=null?x:`${p?[p.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(f,m)=>{let p=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[f];if(!p&&(p=i.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:$t(()=>[i.options.defaultColumn],f=>{var m;return f=(m=f)!=null?m:{},{header:p=>{const x=p.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:p=>{var x,v;return(x=(v=p.renderValue())==null||v.toString==null?void 0:v.toString())!=null?x:null},...i._features.reduce((p,x)=>Object.assign(p,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...f}},Ut(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:$t(()=>[i._getColumnDefs()],f=>{const m=function(p,x,v){return v===void 0&&(v=0),p.map(g=>{const y=$ke(i,g,v,x),w=g;return y.columns=w.columns?m(w.columns,y,v+1):[],y})};return m(f)},Ut(e,"debugColumns")),getAllFlatColumns:$t(()=>[i.getAllColumns()],f=>f.flatMap(m=>m.getFlatColumns()),Ut(e,"debugColumns")),_getAllFlatColumnsById:$t(()=>[i.getAllFlatColumns()],f=>f.reduce((m,p)=>(m[p.id]=p,m),{}),Ut(e,"debugColumns")),getAllLeafColumns:$t(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,m)=>{let p=f.flatMap(x=>x.getLeafColumns());return m(p)},Ut(e,"debugColumns")),getColumn:f=>i._getAllFlatColumnsById()[f]};Object.assign(i,h);for(let f=0;f<i._features.length;f++){const m=i._features[f];m==null||m.createTable==null||m.createTable(i)}return i}function k3e(){return e=>$t(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,a){s===void 0&&(s=0);const o=[];for(let u=0;u<i.length;u++){const d=Vke(e,e._getRowId(i[u],u,a),i[u],u,s,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,o.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(i[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,s+1,d))}}return o};return n.rows=r(t),n},Ut(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function _3e(){return e=>$t(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],s=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),a={};s.forEach(c=>{const u=e.getColumn(c.id);u&&(a[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const o=c=>{const u=c.map(d=>({...d}));return u.sort((d,h)=>{for(let m=0;m<s.length;m+=1){var f;const p=s[m],x=a[p.id],v=x.sortUndefined,g=(f=p==null?void 0:p.desc)!=null?f:!1;let y=0;if(v){const w=d.getValue(p.id),S=h.getValue(p.id),C=w===void 0,k=S===void 0;if(C||k){if(v==="first")return C?-1:1;if(v==="last")return C?1:-1;y=C&&k?0:C?v:-v}}if(y===0&&(y=x.sortingFn(d,h,p.id)),y!==0)return g&&(y*=-1),x.invertSorting&&(y*=-1),y}return d.index-h.index}),u.forEach(d=>{var h;i.push(d),(h=d.subRows)!=null&&h.length&&(d.subRows=o(d.subRows))}),u};return{rows:o(n.rows),flatRows:i,rowsById:n.rowsById}},Ut(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** 765 * react-table 766 * 767 * Copyright (c) TanStack 768 * 769 * This source code is licensed under the MIT license found in the 770 * LICENSE.md file in the root directory of this source tree. 771 * 772 * @license MIT 773 */function PB(e,t){return e?T3e(e)?b.createElement(e,t):e:null}function T3e(e){return E3e(e)||typeof e=="function"||j3e(e)}function E3e(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function j3e(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function N3e(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:C3e(t)})),[r,i]=b.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function A3e({colCount:e}){return l.jsx("tr",{className:"border-b",children:Array.from({length:e}).map((t,n)=>l.jsx("td",{className:"px-4 py-3",children:l.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"})},n))})}function M3e({direction:e}){return e==="asc"?l.jsx(DM,{className:"ms-1 inline h-3.5 w-3.5"}):e==="desc"?l.jsx(pQ,{className:"ms-1 inline h-3.5 w-3.5"}):l.jsx(vxe,{className:"ms-1 inline h-3.5 w-3.5 opacity-40"})}function R3e({columns:e,data:t,isLoading:n=!1,skeletonRows:r=5,emptyMessage:i="No results found.",emptyState:s,enableRowSelection:a=!1,rowSelection:o,onRowSelectionChange:c,pagination:u,onPreviousPage:d,onNextPage:h,currentPage:f=1,className:m}){const[p,x]=b.useState([]),[v,g]=b.useState({}),S=N3e({data:t,columns:e,state:{sorting:p,rowSelection:o??v},onSortingChange:x,onRowSelectionChange:c??g,getCoreRowModel:k3e
773(),getSortedRowModel:_3e(),enableRowSelection:a}),C=b.useCallback(()=>{u!=null&&u.nextCursor&&h&&h(u.nextCursor)},[u==null?void 0:u.nextCursor,h]);return l.jsxs("div",{className:re("rounded-lg border bg-card",m),children:[l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",role:"grid",children:[l.jsx("thead",{children:S.getHeaderGroups().map(k=>l.jsx("tr",{className:"border-b bg-muted/80",children:k.headers.map(_=>l.jsx("th",{className:re("px-6 py-4 text-start text-xs font-medium tracking-wider text-muted-foreground",_.column.getCanSort()&&"cursor-pointer select-none hover:text-foreground"),onClick:_.column.getToggleSortingHandler(),"aria-sort":_.column.getIsSorted()==="asc"?"ascending":_.column.getIsSorted()==="desc"?"descending":"none",children:_.isPlaceholder?null:l.jsxs("span",{className:"inline-flex items-center",children:[PB(_.column.columnDef.header,_.getContext()),_.column.getCanSort()&&l.jsx(M3e,{direction:_.column.getIsSorted()})]})},_.id))},k.id))}),l.jsx("tbody",{children:n?Array.from({length:r}).map((k,_)=>l.jsx(A3e,{colCount:e.length},_)):S.getRowModel().rows.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,className:"px-4 py-12 text-center",children:s??l.jsx(xn,{className:"text-muted-foreground",children:i})})}):S.getRowModel().rows.map(k=>l.jsx("tr",{className:re("border-b border-border transition-colors hover:bg-muted/50",k.getIsSelected()&&"bg-muted"),children:k.getVisibleCells().map(_=>l.jsx("td",{className:"px-6 py-6",children:PB(_.column.columnDef.cell,_.getContext())},_.id))},k.id))})]})}),u&&l.jsxs("div",{className:"flex items-center justify-between border-t px-6 py-4",children:[l.jsx(xn,{variant:"bodySmall",className:"text-foreground",children:u.total!==void 0?`Showing ${(f-1)*u.limit+1} to ${Math.min(f*u.limit,u.total)} of ${u.total} results`:`Page ${f} â ${t.length} results`}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("button",{type:"button",onClick:d,disabled:f<=1,"aria-label":"Previous page",className:re("px-3 py-1 rounded-md bg-muted text-foreground hover:bg-accent","disabled:opacity-50 disabled:cursor-not-allowed transition-colors duration-150"),children:l.jsx($o,{className:"h-5 w-5"})}),l.jsx(xn,{variant:"bodySmall",className:"text-foreground",children:u.total!==void 0?`Page ${f} of ${Math.ceil(u.total/u.limit)}`:`Page ${f}`}),l.jsx("button",{type:"button",onClick:C,disabled:!u.hasMore,"aria-label":"Next page",className:re("px-3 py-1 rounded-md bg-muted text-foreground hover:bg-accent","disabled:opacity-50 disabled:cursor-not-allowed transition-colors duration-150"),children:l.jsx(ns,{className:"h-5 w-5"})})]})]})]})}const Kpt=Math.abs,Xpt=Math.atan2,Qpt=Math.cos,Zpt=Math.max,Jpt=Math.min,e0t=Math.sin,t0t=Math.sqrt,IB=1e-12,hO=Math.PI,FB=hO/2,n0t=2*hO;function r0t(e){return e>1?0:e<-1?hO:Math.acos(e)}function i0t(e){return e>=1?FB:e<=-1?-FB:Math.asin(e)}function pte(e){this._context=e}pte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function O3e(e){return new pte(e)}class gte{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function D3e(e){return new gte(e,!0)}function L3e(e){return new gte(e,!1)}function Vh(){}function N4(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Kk(e){this._context=e}Kk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:N4(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:N4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function P3e(e){return new Kk(e)}function xte(e){this._context=e}xte.prototype={areaStart:Vh,areaEnd:Vh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:N4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function I3e(e){return new xte(e)}function yte(e){this._context=e}yte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:N4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function F3e(e){return new yte(e)}function bte(e,t){this._basis=new Kk(e),this._beta=t}bte.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,c;++o<=n;)c=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+c*s),this._beta*t[o]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const B3e=function e(t){function n(r){return t===1?new Kk(r):new bte(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function A4(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function fO(e,t){this._context=e,this._k=(1-t)/6}fO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A4(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:A4(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const z3e=function e(t){function n(r){return new fO(r,t)}return n.tension=function(r){return e(+r)},n}(0);function mO(e,t){this._context=e,this._k=(1-t)/6}mO.prototype={areaStart:Vh,areaEnd:Vh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:A4(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $3e=function e(t){function n(r){return new mO(r,t)}return n.tension=function(r){return e(+r)},n}(0);function pO(e,t){this._context=e,this._k=(1-t)/6}pO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A4(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const U3e=function e(t){function n(r){return new pO(r,t)}return n.tension=function(r){return e(+r)},n}(0);function gO(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>IB){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>IB){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*u+e._x1*e._l23_2a-t*e._l12_2a)/d,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/d}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function vte(e,t){this._context=e,this._alpha=t}vte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:gO(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const V3e=function e(t){function n(r){return t?new vte(r,t):new fO(r,0)}
vendor: 6,105 bytes, line 773
773return n.alpha=function(r){return e(+r)},n}(.5);function wte(e,t){this._context=e,this._alpha=t}wte.prototype={areaStart:Vh,areaEnd:Vh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:gO(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const H3e=function e(t){function n(r){return t?new wte(r,t):new mO(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Ste(e,t){this._context=e,this._alpha=t}Ste.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gO(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const q3e=function e(t){function n(r){return t?new Ste(r,t):new pO(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Cte(e){this._context=e}Cte.prototype={areaStart:Vh,areaEnd:Vh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function G3e(e){return new Cte(e)}function BB(e){return e<0?-1:1}function zB(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(BB(s)+BB(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function $B(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function IT(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function M4(e){this._context=e}M4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:IT(this,this._t0,$B(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,IT(this,$B(this,n=zB(this,e,t)),n);break;default:IT(this,this._t0,n=zB(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kte(e){this._context=new _te(e)}(kte.prototype=Object.create(M4.prototype)).point=function(e,t){M4.prototype.point.call(this,t,e)};function _te(e){this._context=e}_te.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function W3e(e){return new M4(e)}function Y3e(e){return new kte(e)}function Tte(e){this._context=e}Tte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=UB(e),i=UB(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function UB(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function K3e(e){return new Tte(e)}function Xk(e,t){this._context=e,this._t=t}Xk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 6,516 bytes, line 773
773default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function X3e(e){return new Xk(e,.5)}function Q3e(e){return new Xk(e,0)}function Z3e(e){return new Xk(e,1)}function xO(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ete(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function sw(){}var Ub=.7,R4=1/Ub,q0="\\s*([+-]?\\d+)\\s*",Vb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",hc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",J3e=/^#([0-9a-f]{3,8})$/,e_e=new RegExp(`^rgb\\(${q0},${q0},${q0}\\)$`),t_e=new RegExp(`^rgb\\(${hc},${hc},${hc}\\)$`),n_e=new RegExp(`^rgba\\(${q0},${q0},${q0},${Vb}\\)$`),r_e=new RegExp(`^rgba\\(${hc},${hc},${hc},${Vb}\\)$`),i_e=new RegExp(`^hsl\\(${Vb},${hc},${hc}\\)$`),s_e=new RegExp(`^hsla\\(${Vb},${hc},${hc},${Vb}\\)$`),VB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};xO(sw,Hb,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:HB,formatHex:HB,formatHex8:a_e,formatHsl:o_e,formatRgb:qB,toString:qB});function HB(){return this.rgb().formatHex()}function a_e(){return this.rgb().formatHex8()}function o_e(){return jte(this).formatHsl()}function qB(){return this.rgb().formatRgb()}function Hb(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=J3e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?GB(t):n===3?new Sa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?v2(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?v2(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=e_e.exec(e))?new Sa(t[1],t[2],t[3],1):(t=t_e.exec(e))?new Sa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=n_e.exec(e))?v2(t[1],t[2],t[3],t[4]):(t=r_e.exec(e))?v2(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=i_e.exec(e))?KB(t[1],t[2]/100,t[3]/100,1):(t=s_e.exec(e))?KB(t[1],t[2]/100,t[3]/100,t[4]):VB.hasOwnProperty(e)?GB(VB[e]):e==="transparent"?new Sa(NaN,NaN,NaN,0):null}function GB(e){return new Sa(e>>16&255,e>>8&255,e&255,1)}function v2(e,t,n,r){return r<=0&&(e=t=n=NaN),new Sa(e,t,n,r)}function l_e(e){return e instanceof sw||(e=Hb(e)),e?(e=e.rgb(),new Sa(e.r,e.g,e.b,e.opacity)):new Sa}function dA(e,t,n,r){return arguments.length===1?l_e(e):new Sa(e,t,n,r??1)}function Sa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}xO(Sa,dA,Ete(sw,{brighter(e){return e=e==null?R4:Math.pow(R4,e),new Sa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ub:Math.pow(Ub,e),new Sa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sa(wm(this.r),wm(this.g),wm(this.b),O4(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:WB,formatHex:WB,formatHex8:c_e,formatRgb:YB,toString:YB}));function WB(){return`#${Jf(this.r)}${Jf(this.g)}${Jf(this.b)}`}function c_e(){return`#${Jf(this.r)}${Jf(this.g)}${Jf(this.b)}${Jf((isNaN(this.opacity)?1:this.opacity)*255)}`}function YB(){const e=O4(this.opacity);return`${e===1?"rgb(":"rgba("}${wm(this.r)}, ${wm(this.g)}, ${wm(this.b)}${e===1?")":`, ${e})`}`}function O4(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wm(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jf(e){return e=wm(e),(e<16?"0":"")+e.toString(16)}function KB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pl(e,t,n,r)}function jte(e){if(e instanceof pl)return new pl(e.h,e.s,e.l,e.opacity);if(e instanceof sw||(e=Hb(e)),!e)return new pl;if(e instanceof pl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,c=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=c<.5?s+i:2-s-i,a*=60):o=c>
vendor: 4,422 bytes, line 773
7730&&c<1?0:a,new pl(a,o,c,e.opacity)}function u_e(e,t,n,r){return arguments.length===1?jte(e):new pl(e,t,n,r??1)}function pl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}xO(pl,u_e,Ete(sw,{brighter(e){return e=e==null?R4:Math.pow(R4,e),new pl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ub:Math.pow(Ub,e),new pl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Sa(FT(e>=240?e-240:e+120,i,r),FT(e,i,r),FT(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pl(XB(this.h),w2(this.s),w2(this.l),O4(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=O4(this.opacity);return`${e===1?"hsl(":"hsla("}${XB(this.h)}, ${w2(this.s)*100}%, ${w2(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XB(e){return e=(e||0)%360,e<0?e+360:e}function w2(e){return Math.max(0,Math.min(1,e||0))}function FT(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const yO=e=>()=>e;function Nte(e,t){return function(n){return e+n*t}}function d_e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function s0t(e,t){var n=t-e;return n?Nte(e,n>180||n<-180?n-360*Math.round(n/360):n):yO(isNaN(e)?t:e)}function h_e(e){return(e=+e)==1?Ate:function(t,n){return n-t?d_e(t,n,e):yO(isNaN(t)?n:t)}}function Ate(e,t){var n=t-e;return n?Nte(e,n):yO(isNaN(e)?t:e)}const QB=function e(t){var n=h_e(t);function r(i,s){var a=n((i=dA(i)).r,(s=dA(s)).r),o=n(i.g,s.g),c=n(i.b,s.b),u=Ate(i.opacity,s.opacity);return function(d){return i.r=a(d),i.g=o(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function Wd(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var hA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,BT=new RegExp(hA.source,"g");function f_e(e){return function(){return e}}function m_e(e){return function(t){return e(t)+""}}function p_e(e,t){var n=hA.lastIndex=BT.lastIndex=0,r,i,s,a=-1,o=[],c=[];for(e=e+"",t=t+"";(r=hA.exec(e))&&(i=BT.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,c.push({i:a,x:Wd(r,i)})),n=BT.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?c[0]?m_e(c[0].x):f_e(t):(t=c.length,function(u){for(var d=0,h;d<t;++d)o[(h=c[d]).i]=h.x(u);return o.join("")})}var ZB=180/Math.PI,fA={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mte(e,t,n,r,i,s){var a,o,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,c/=o),e*r<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*ZB,skewX:Math.atan(c)*ZB,scaleX:a,scaleY:o}}var S2;function g_e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?fA:Mte(t.a,t.b,t.c,t.d,t.e,t.f)}function x_e(e){return e==null||(S2||(S2=document.createElementNS("http://www.w3.org/2000/svg","g")),S2.setAttribute("transform",e),!(e=S2.transform.baseVal.consolidate()))?fA:(e=e.matrix,Mte(e.a,e.b,e.c,e.d,e.e,e.f))}function Rte(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function s(u,d,h,f,m,p){if(u!==h||d!==f){var x=m.push("translate(",null,t,null,n);p.push({i:x-4,x:Wd(u,h)},{i:x-2,x:Wd(d,f)})}else(h||f)&&m.push("translate("+h+t+f+n)}function a(u,d,h,f){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Wd(u,d)})):d&&h.push(i(h)+"rotate("+d+r)}function o(u,d,h,f){u!==d?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Wd(u,d)}):d&&h.push(i(h)+"skewX("+d+r)}function c(u,d,h,f,m,p){if(u!==h||d!==f){var x=m.push(i(m)+"scale(",null,",",null,")");p.push({i:x-4,x:Wd(u,h)},{i:x-2,x:Wd(d,f)})}else(h!==1||f!==1)&&m.push(i(m)+"scale("+h+","+f+")")}return function(u,d){var h=[],f=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,h,f),a(u.rotate,d.rotate,h,f),o(u.skewX,d.skewX,h,f),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,f),u=d=null,function(m){for(var p=-1,x=f.length,v;++p<x;)h[(v=f[p]).i]=v.x(m);return h.join("")}}}var y_e=Rte(g_e,"px, ","px)","deg)"),b_e=Rte(x_e,", ",")",")"),v_e=Object.defineProperty,Zo=(e,t)=>v_e(e,"name",{value:t,configurable:!0}),bO="Dialog",[Ote,a0t]=sa(bO),[w_e,Nc]=Ote(bO),Px=Zo(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:
773a=!0}=e,o=b.useRef(null),c=b.useRef(null),[u,d]=Vo({prop:r,defaultProp:i??!1,onChange:s,caller:bO}),[h,f]=b.useState(0),[m,p]=b.useState(0);return l.jsx(w_e,{scope:t,triggerRef:o,contentRef:c,contentId:Sl(),titleId:Sl(),descriptionId:Sl(),titlePresent:h>0,descriptionPresent:m>0,setTitleCount:f,setDescriptionCount:p,open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(x=>!x),[d]),modal:a,children:n})},"Dialog"),Dte="DialogPortal",[S_e,Lte]=Ote(Dte,{forceMount:void 0}),Ix=Zo(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Nc(Dte,t);return l.jsx(S_e,{scope:t,forceMount:n,children:b.Children.map(r,a=>l.jsx(cd,{present:n||s.open,children:l.jsx(rR,{asChild:!0,container:i,children:a})}))})},"DialogPortal"),mA="DialogOverlay",Fx=b.forwardRef(Zo(function(t,n){const r=Lte(mA,t.__scopeDialog),{forceMount:i=r.forceMount,...s}=t,a=Nc(mA,t.__scopeDialog);return a.modal?l.jsx(cd,{present:i||a.open,children:l.jsx(k_e,{...s,ref:n})}):null},"DialogOverlay")),C_e=gc("DialogOverlay.RemoveScroll"),k_e=b.forwardRef(Zo(function(t,n){const{__scopeDialog:r,...i}=t,s=Nc(mA,r),a=ZQ(),o=Vn(n,a);return l.jsx(Ak,{as:C_e,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Jt.div,{"data-state":vO(s.open),...i,ref:o,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),qb="DialogContent",Bx=b.forwardRef(Zo(function(t,n){const r=Lte(qb,t.__scopeDialog),{forceMount:i=r.forceMount,...s}=t,a=Nc(qb,t.__scopeDialog);return l.jsx(cd,{present:i||a.open,children:a.modal?l.jsx(__e,{...s,ref:n}):l.jsx(T_e,{...s,ref:n})})},"DialogContent")),__e=b.forwardRef(Zo(function(t,n){const r=Nc(qb,t.__scopeDialog),i=b.useRef(null),s=Vn(n,r.contentRef,i);return b.useEffect(()=>{const a=i.current;if(a)return iR(a)},[]),l.jsx(Pte,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Xt(t.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Xt(t.onPointerDownOutside,a=>{const o=a.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0;(o.button===2||c)&&a.preventDefault()}),onFocusOutside:Xt(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),T_e=b.forwardRef(Zo(function(t,n){const r=Nc(qb,t.__scopeDialog),i=b.useRef(!1),s=b.useRef(!1);return l.jsx(Pte,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,c;(o=t.onCloseAutoFocus)==null||o.call(t,a),a.defaultPrevented||(i.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:a=>{var u,d;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"DialogContentNonModal")),Pte=b.forwardRef(Zo(function(t,n){const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,...o}=t,c=Nc(qb,r);return Yv(),l.jsx(l.Fragment,{children:l.jsx(KM,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a,children:l.jsx(GM,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":vO(c.open),...o,ref:n,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},"DialogContentImpl")),E_e="DialogTitle",zx=b.forwardRef(Zo(function(t,n){const{__scopeDialog:r,...i}=t,s=Nc(E_e,r),{setTitleCount:a}=s;return Ir(()=>(a(o=>o+1),()=>a(o=>o-1)),[a]),l.jsx(Jt.h2,{id:s.titleId,...i,ref:n})},"DialogTitle")),j_e="DialogDescription",Qk=b.forwardRef(Zo(function(t,n){const{__scopeDialog:r,...i}=t,s=Nc(j_e,r),{setDescriptionCount:a}=s;return Ir(()=>(a(o=>o+1),()=>a(o=>o-1)),[a]),l.jsx(Jt.p,{id:s.descriptionId,...i,ref:n})},"DialogDescription")),N_e="DialogClose",qu=b.forwardRef(Zo(function(t,n){const{__scopeDialog:r,...i}=t,s=Nc(N_e,r);return l.jsx(Jt.button,{type:"button",...i,ref:n,onClick:Xt(t.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function vO(e){return e?"open":"closed"}Zo(vO,"getState");const A_e={default:{icon:l.jsx(zm,{className:"h-5 w-5 text-primary"}),buttonClass:"bg-primary text-primary-foreground hover:bg-primary/90"},destructive:{icon:l.jsx(Fg,{className:"h-5 w-5 text-destructive"}),buttonClass:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},warning:{icon:l.jsx(lf,{className:"h-5 w-5 text-warning"}),buttonClass:"bg-warning text-warning-foreground hover:bg-warning/90"},info:{icon:l.jsx(zm,{className:"h-5 w-5 text-info"}),buttonClass:"bg-primary text-primary-foreground hover:bg-primary/90"}};function $x({open:e,onOpenChange:t,title:n,description:r,confirmLabel:i="Confirm",cancelLabel:s="Cancel",variant:a="destructive",onConfirm:o,isLoading:c=!1,children:u}){const d=A_e[a];return l.jsx(Px,{open:e,onOpenChange:t,children:l.jsxs(Ix,{children:[l.jsx(Fx,{className:"fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),l.jsxs(Bx,{className:re("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","rounded-lg border bg-background p-6 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:[l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button","aria-label":"Close",className:"ds-touch-target inl
773ine-flex items-center justify-center absolute end-4 top-4 rounded p-1 hover:bg-muted transition-colors",children:l.jsx(ar,{className:"h-4 w-4"})})}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"shrink-0 mt-0.5",children:d.icon}),l.jsxs("div",{className:"flex-1",children:[l.jsx(zx,{asChild:!0,children:l.jsx(hp,{level:4,children:n})}),r&&l.jsx(Qk,{asChild:!0,children:l.jsx(xn,{className:"mt-2 text-muted-foreground",children:r})})]})]}),u&&l.jsx("div",{className:"mt-4",children:u}),l.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button",className:re("ds-touch-target inline-flex h-9 items-center justify-center rounded-md border px-4 text-sm font-medium","hover:bg-muted transition-colors"),children:s})}),l.jsx("button",{type:"button",onClick:o,disabled:c,className:re("ds-touch-target inline-flex h-9 items-center justify-center rounded-md px-4 text-sm font-medium transition-colors","disabled:pointer-events-none disabled:opacity-50",d.buttonClass),children:c?"Processing...":i})]})]})]})})}const M_e={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl"};function _u({open:e,onOpenChange:t,title:n,description:r,children:i,onSubmit:s,isSubmitting:a=!1,submitLabel:o="Save",cancelLabel:c="Cancel",size:u="md"}){const d=b.useRef(null);return l.jsx(Px,{open:e,onOpenChange:t,children:l.jsxs(Ix,{children:[l.jsx(Fx,{className:"fixed inset-0 z-50 bg-[rgba(20,22,27,0.42)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),l.jsx(Bx,{ref:d,onPointerDownOutside:h=>{var f,m;(m=(f=h.target).closest)!=null&&m.call(f,"[data-radix-popper-content-wrapper]")&&h.preventDefault()},onInteractOutside:h=>{var f,m;(m=(f=h.target).closest)!=null&&m.call(f,"[data-radix-popper-content-wrapper]")&&h.preventDefault()},className:re("fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2","rounded-2xl border bg-card shadow-elevated","flex flex-col max-h-[85vh]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",M_e[u]),children:l.jsxs(cQ.Provider,{value:d,children:[l.jsxs("div",{className:"flex items-start justify-between border-b px-6 py-4",children:[l.jsxs("div",{children:[l.jsx(zx,{asChild:!0,children:l.jsx(hp,{level:4,children:n})}),r&&l.jsx(Qk,{className:"mt-1 text-sm text-muted-foreground",children:r})]}),l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button","aria-label":"Close",className:"rounded p-1 hover:bg-muted transition-colors",children:l.jsx(ar,{className:"h-4 w-4"})})})]}),l.jsxs("form",{onSubmit:s,className:"flex flex-col flex-1 overflow-hidden",children:[l.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:i}),l.jsxs("div",{className:"flex justify-end gap-3 border-t px-6 py-4",children:[l.jsx(qu,{asChild:!0,children:l.jsx(ce,{type:"button",variant:"outline",children:c})}),l.jsx(ce,{type:"submit",variant:"primary",isLoading:a,children:o})]})]})]})})]})})}var R_e=Object.defineProperty,wO=(e,t)=>R_e(e,"name",{value:t,configurable:!0}),zT=!1;function Ite(){const[e,t]=b.useState(zT);return b.useEffect(()=>{zT||(zT=!0,t(!0))},[]),e}wO(Ite,"useIsHydrated");var Fte=ap[" useSyncExternalStore ".trim().toString()];function Bte(){return()=>{}}wO(Bte,"subscribe");function zte(){return Fte(Bte,()=>!0,()=>!1)}wO(zte,"useIsHydratedModern");var O_e=typeof Fte=="function"?zte:Ite,D_e=Object.defineProperty,xp=(e,t)=>D_e(e,"name",{value:t,configurable:!0}),$T="rovingFocusGroup.onEntryFocus",L_e={bubbles:!1,cancelable:!0},Zk="RovingFocusGroup",[pA,$te,P_e]=wk(Zk),[I_e,Ute]=sa(Zk,[P_e]),[F_e,B_e]=I_e(Zk),z_e=b.forwardRef(xp(function(t,n){return l.jsx(pA.Provider,{scope:t.__scopeRovingFocusGroup,children:l.jsx(pA.Slot,{scope:t.__scopeRovingFocusGroup,children:l.jsx($_e,{...t,ref:n})})})},"RovingFocusGroup")),$_e=b.forwardRef(xp(function(t,n){const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...f}=t,m=b.useRef(null),p=Vn(n,m),x=Wv(a),[v,g]=Vo({prop:o,defaultProp:c??null,onChange:u,caller:Zk}),[y,w]=b.useState(!1),S=Uo(d),C=$te(r),k=b.useRef(!1),[_,E]=b.useState(0);return b.useEffect(()=>{const A=m.current;if(A)return A.addEventListener($T,S),()=>A.removeEventListener($T,S)},[S]),l.jsx(F_e,{scope:r,orientation:i,dir:x,loop:s,currentTabStopId:v,onItemFocus:b.useCallback(A=>g(A),[g]),onItemShiftTab:b.useCallback(()=>w(!0),[]),onFocusableItemAdd:b.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:b.useCallback(()=>E(A=>A-1),[]),children:l.jsx(Jt.div,{tabIndex:y||_===0?-1:0,"data-orientation":i,...f,ref:p,style:{outline:"none",...t.style},onMouseDown:Xt(t.onMouseDown,()=>{k.current=!0}),onFocus:Xt(t.onFocus,A=>{const j=!k.current;if(A.target===A.currentTarget&&j&&!y){const D=new CustomEvent($T,L_e);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const M=C().filter(P=>P.focusable),$=M.find(P=>P.active),B=M.find(P=>
773P.id===v),O=[$,B,...M].filter(Boolean).map(P=>P.ref.current);SO(O,h)}}k.current=!1}),onBlur:Xt(t.onBlur,()=>w(!1))})})},"RovingFocusGroupImpl")),U_e="RovingFocusGroupItem",V_e=b.forwardRef(xp(function(t,n){const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:a,children:o,...c}=t,u=Sl(),d=a||u,h=B_e(U_e,r),f=h.currentTabStopId===d,m=$te(r),{onFocusableItemAdd:p,onFocusableItemRemove:x,currentTabStopId:v}=h,g=O_e();return Ir(()=>{if(!(!g||!i))return p(),()=>x()},[g,i,p,x]),b.useEffect(()=>{if(!(g||!i))return p(),()=>x()},[g,i,p,x]),l.jsx(pA.ItemSlot,{scope:r,id:d,focusable:i,active:s,children:l.jsx(Jt.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...c,ref:n,onMouseDown:Xt(t.onMouseDown,y=>{i?h.onItemFocus(d):y.preventDefault()}),onFocus:Xt(t.onFocus,()=>h.onItemFocus(d)),onKeyDown:Xt(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){h.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=Hte(y,h.orientation,h.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let C=m().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")C.reverse();else if(w==="prev"||w==="next"){w==="prev"&&C.reverse();const k=C.indexOf(y.currentTarget);C=h.loop?qte(C,k+1):C.slice(k+1)}setTimeout(()=>SO(C))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:v!=null}):o})})},"RovingFocusGroupItem")),H_e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vte(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}xp(Vte,"getDirectionAwareKey");function Hte(e,t,n){const r=Vte(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return H_e[r]}xp(Hte,"getFocusIntent");function SO(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}xp(SO,"focusFirst");function qte(e,t){return e.map((n,r)=>e[(t+r)%e.length])}xp(qte,"wrapArray");var q_e=z_e,G_e=V_e,W_e=Object.defineProperty,Ux=(e,t)=>W_e(e,"name",{value:t,configurable:!0}),CO="Tabs",[Y_e,o0t]=sa(CO,[Ute]),Gte=Ute(),[K_e,kO]=Y_e(CO),X_e=b.forwardRef(Ux(function(t,n){const{__scopeTabs:r,value:i,onValueChange:s,defaultValue:a,orientation:o="horizontal",dir:c,activationMode:u="automatic",...d}=t,h=Wv(c),[f,m]=Vo({prop:i,onChange:s,defaultProp:a??"",caller:CO});return l.jsx(K_e,{scope:r,baseId:Sl(),value:f,onValueChange:m,orientation:o,dir:h,activationMode:u,children:l.jsx(Jt.div,{dir:h,"data-orientation":o,...d,ref:n})})},"Tabs")),Q_e="TabsList",Z_e=b.forwardRef(Ux(function(t,n){const{__scopeTabs:r,loop:i=!0,...s}=t,a=kO(Q_e,r),o=Gte(r);return l.jsx(q_e,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:i,children:l.jsx(Jt.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:n})})},"TabsList")),J_e="TabsTrigger",eTe=b.forwardRef(Ux(function(t,n){const{__scopeTabs:r,value:i,disabled:s=!1,...a}=t,o=kO(J_e,r),c=Gte(r),u=_O(o.baseId,i),d=TO(o.baseId,i),h=i===o.value;return l.jsx(G_e,{asChild:!0,...c,focusable:!s,active:h,children:l.jsx(Jt.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:u,...a,ref:n,onMouseDown:Xt(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(i):f.preventDefault()}),onKeyDown:Xt(t.onKeyDown,f=>{s||f.target!==f.currentTarget||[" ","Enter"].includes(f.key)&&o.onValueChange(i)}),onFocus:Xt(t.onFocus,()=>{const f=o.activationMode!=="manual";!h&&!s&&f&&o.onValueChange(i)})})})},"TabsTrigger")),tTe="TabsContent",nTe=b.forwardRef(Ux(function(t,n){const{__scopeTabs:r,value:i,forceMount:s,children:a,...o}=t,c=kO(tTe,r),u=_O(c.baseId,i),d=TO(c.baseId,i),h=i===c.value,f=b.useRef(h);return b.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(cd,{present:s||h,children:({present:m})=>l.jsx(Jt.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:d,tabIndex:0,...o,ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0},children:m&&a})})},"TabsContent"));function _O(e,t){return`${e}-trigger-${t}`}Ux(_O,"makeTriggerId");function TO(e,t){return`${e}-content-${t}`}Ux(TO,"makeContentId");
773var rTe=X_e,iTe=Z_e,sTe=eTe,aTe=nTe;function oTe({items:e,value:t,defaultValue:n,onValueChange:r,children:i,className:s,"aria-label":a}){var o;return l.jsxs(rTe,{value:t,defaultValue:n??((o=e[0])==null?void 0:o.value),onValueChange:r,className:re("w-full",s),children:[l.jsx(iTe,{className:re("inline-flex w-full border-b","overflow-x-auto scrollbar-none"),"aria-label":a??"Tabs",children:e.map(c=>l.jsxs(sTe,{value:c.value,disabled:c.disabled,className:re("inline-flex items-center gap-2 whitespace-nowrap border-b-2 border-transparent px-4 py-2.5 text-sm font-medium","text-muted-foreground transition-colors","hover:text-foreground","data-[state=active]:border-primary data-[state=active]:text-foreground","disabled:pointer-events-none disabled:opacity-50","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[c.label,c.badge!==void 0&&c.badge>0&&l.jsx(Oi,{variant:"default",size:"sm",children:c.badge})]},c.value))}),i]})}function lTe({value:e,children:t,className:n}){return l.jsx(aTe,{value:e,className:re("mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),children:t})}const Pp=["daily","weekly","monthly"];function cTe({value:e,onChange:t,labels:n,ariaLabel:r,className:i}){const s=Y.useRef([]),a=c=>{var d;const u=Pp[c];u&&(t(u),(d=s.current[c])==null||d.focus())},o=(c,u)=>{switch(c.key){case"ArrowRight":case"ArrowDown":{c.preventDefault(),a((u+1)%Pp.length);return}case"ArrowLeft":case"ArrowUp":{c.preventDefault(),a((u-1+Pp.length)%Pp.length);return}case"Home":{c.preventDefault(),a(0);return}case"End":{c.preventDefault(),a(Pp.length-1);return}default:return}};return l.jsx("div",{role:"group","aria-label":r,className:re("inline-flex items-center gap-0.5 rounded-lg border border-border bg-card p-0.5 shadow-soft",i),children:Pp.map((c,u)=>{const d=c===e;return l.jsx("button",{type:"button",ref:h=>{s.current[u]=h},"aria-pressed":d,tabIndex:d?0:-1,onClick:()=>t(c),onKeyDown:h=>o(h,u),className:re("ds-touch-target","inline-flex items-center justify-center rounded-md px-3 py-1 text-xs font-medium","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:n[c]},c)})})}function Wte({tabs:e,ariaLabel:t,className:n}){const r=Y.useRef([]),i=a=>{const o=r.current[a];o&&o.focus()},s=(a,o)=>{switch(a.key){case"ArrowRight":case"ArrowDown":{a.preventDefault(),i((o+1)%e.length);return}case"ArrowLeft":case"ArrowUp":{a.preventDefault(),i((o-1+e.length)%e.length);return}case"Home":{a.preventDefault(),i(0);return}case"End":{a.preventDefault(),i(e.length-1);return}default:return}};return l.jsx("div",{role:"tablist","aria-label":t,className:re("inline-flex flex-wrap items-center gap-1 rounded-xl border border-border bg-card p-1 shadow-soft",n),children:e.map((a,o)=>l.jsx(yk,{to:a.path,role:"tab",end:!0,ref:c=>{r.current[o]=c},onKeyDown:c=>s(c,o),"aria-label":typeof a.count=="number"?`${a.label}, ${a.count}`:void 0,className:({isActive:c})=>re("ds-touch-target","inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",c?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:({isActive:c})=>l.jsxs(l.Fragment,{children:[l.jsx("span",{children:a.label}),typeof a.count=="number"&&l.jsx("span",{"aria-hidden":"true",className:re("inline-flex min-w-[1.25rem] items-center justify-center rounded-full px-1.5 text-xs font-semibold",c?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-foreground"),children:a.count})]})},a.id))})}const Yte=6048e5,uTe=864e5,JB=Symbol.for("constructDateFrom");function Hh(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&JB in e?e[JB](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ml(e,t){return Hh(t||e,e)}let dTe={};function Jk(){return dTe}function Gb(e,t){var o,c,u,d;const n=Jk(),r=(t==null?void 0:t.weekStartsOn)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=Ml(e,t==null?void 0:t.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function D4(e,t){return Gb(e,{...t,weekStartsOn:1}
vendor: 4,122 bytes, line 773
773)}function Kte(e,t){const n=Ml(e,t==null?void 0:t.in),r=n.getFullYear(),i=Hh(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=D4(i),a=Hh(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=D4(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function ez(e){const t=Ml(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function hTe(e,...t){const n=Hh.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function tz(e,t){const n=Ml(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function fTe(e,t,n){const[r,i]=hTe(n==null?void 0:n.in,e,t),s=tz(r),a=tz(i),o=+s-ez(s),c=+a-ez(a);return Math.round((o-c)/uTe)}function mTe(e,t){const n=Kte(e,t),r=Hh(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),D4(r)}function pTe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gTe(e){return!(!pTe(e)&&typeof e!="number"||isNaN(+Ml(e)))}function xTe(e,t){const n=Ml(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const yTe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bTe=(e,t,n)=>{let r;const i=yTe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function UT(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const vTe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wTe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},STe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CTe={date:UT({formats:vTe,defaultWidth:"full"}),time:UT({formats:wTe,defaultWidth:"full"}),dateTime:UT({formats:STe,defaultWidth:"full"})},kTe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_Te=(e,t,n,r)=>kTe[e];function Ny(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const TTe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ETe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jTe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},NTe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
773ay","Saturday"]},ATe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},MTe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},RTe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},OTe={ordinalNumber:RTe,era:Ny({values:TTe,defaultWidth:"wide"}),quarter:Ny({values:ETe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ny({values:jTe,defaultWidth:"wide"}),day:Ny({values:NTe,defaultWidth:"wide"}),dayPeriod:Ny({values:ATe,defaultWidth:"wide",formattingValues:MTe,defaultFormattingWidth:"wide"})};function Ay(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?LTe(o,h=>h.test(a)):DTe(o,h=>h.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function DTe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function LTe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function PTe(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const ITe=/^(\d+)(th|st|nd|rd)?/i,FTe=/\d+/i,BTe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zTe={any:[/^b/i,/^(a|c)/i]},$Te={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UTe={any:[/1/i,/2/i,/3/i,/4/i]},VTe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},HTe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},qTe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},GTe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},WTe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YTe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},KTe={ordinalNumber:PTe({matchPattern:ITe,parsePattern:FTe,valueCallback:e=>parseInt(e,10)}),era:Ay({matchPatterns:BTe,defaultMatchWidth:"wide",parsePatterns:zTe,defaultParseWidth:"any"}),quarter:Ay({matchPatterns:$Te,defaultMatchWidth:"wide",parsePatterns:UTe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ay({matchPatterns:VTe,defaultMatchWidth:"wide",parsePatterns:HTe,defaultParseWidth:"any"}),day:Ay({matchPatterns:qTe,defaultMatchWidth:"wide",parsePatterns:GTe,defaultParseWidth:"any"}),dayPeriod:Ay({matchPatterns:WTe,defaultMatchWidth:"any",parsePatterns:YTe,defaultParseWidth:"any"})},XTe={code:"en-US",formatDistance:bTe,formatLong:CTe,formatRelative:_Te,localize:OTe,match:KTe,o
vendor: 6,781 bytes, line 773
773ptions:{weekStartsOn:0,firstWeekContainsDate:1}};function QTe(e,t){const n=Ml(e,t==null?void 0:t.in);return fTe(n,xTe(n))+1}function ZTe(e,t){const n=Ml(e,t==null?void 0:t.in),r=+D4(n)-+mTe(n);return Math.round(r/Yte)+1}function Xte(e,t){var d,h,f,m;const n=Ml(e,t==null?void 0:t.in),r=n.getFullYear(),i=Jk(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(f=i.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,a=Hh((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=Gb(a,t),c=Hh((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=Gb(c,t);return+n>=+o?r+1:+n>=+u?r:r-1}function JTe(e,t){var o,c,u,d;const n=Jk(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=Xte(e,t),s=Hh((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Gb(s,t)}function eEe(e,t){const n=Ml(e,t==null?void 0:t.in),r=+Gb(n,t)-+JTe(n,t);return Math.round(r/Yte)+1}function Jn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Td={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Jn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Jn(n+1,2)},d(e,t){return Jn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Jn(e.getHours()%12||12,t.length)},H(e,t){return Jn(e.getHours(),t.length)},m(e,t){return Jn(e.getMinutes(),t.length)},s(e,t){return Jn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Jn(i,t.length)}},Ip={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},nz={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Td.y(e,t)},Y:function(e,t,n,r){const i=Xte(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Jn(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Jn(s,t.length)},R:function(e,t){const n=Kte(e);return Jn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Jn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Jn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Jn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Td.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Jn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=eEe(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Jn(i,t.length)},I:function(e,t,n){const r=ZTe(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Jn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Td.d(e,t)},D:function(e,t,n){const r=QTe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Jn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Jn(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Jn(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Jn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ip.noon:r===0?i=Ip.midnight:i=r/12>
vendor: 4,190 bytes, line 773
773=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ip.evening:r>=12?i=Ip.afternoon:r>=4?i=Ip.morning:i=Ip.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Td.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Td.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Jn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Jn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Td.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Td.s(e,t)},S:function(e,t){return Td.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return iz(r);case"XXXX":case"XX":return Pf(r);case"XXXXX":case"XXX":default:return Pf(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return iz(r);case"xxxx":case"xx":return Pf(r);case"xxxxx":case"xxx":default:return Pf(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+rz(r,":");case"OOOO":default:return"GMT"+Pf(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+rz(r,":");case"zzzz":default:return"GMT"+Pf(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Jn(r,t.length)},T:function(e,t,n){return Jn(+e,t.length)}};function rz(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Jn(s,2)}function iz(e,t){return e%60===0?(e>0?"-":"+")+Jn(Math.abs(e)/60,2):Pf(e,t)}function Pf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Jn(Math.trunc(r/60),2),s=Jn(r%60,2);return n+i+t+s}const sz=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Qte=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},tEe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return sz(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",sz(r,t)).replace("{{time}}",Qte(i,t))},nEe={p:Qte,P:tEe},rEe=/^D+$/,iEe=/^Y+$/,sEe=["D","DD","YY","YYYY"];function aEe(e){return rEe.test(e)}function oEe(e){return iEe.test(e)}function lEe(e,t,n){const r=cEe(e,t,n);if(console.warn(r),sEe.includes(e))throw new RangeError(r)}function cEe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const uEe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dEe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hEe=/^'([^]*?)'?$/,fEe=/''/g,mEe=/[a-zA-Z]/;function pEe(e,t,n){var d,h,f,m;const r=Jk(),i=r.locale??XTe,s=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,o=Ml(e,n==null?void 0:n.in);if(!gTe(o))throw new RangeError("Invalid time value");let c=t.match(dEe).map(p=>{const x=p[0];
773if(x==="p"||x==="P"){const v=nEe[x];return v(p,i.formatLong)}return p}).join("").match(uEe).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const x=p[0];if(x==="'")return{isToken:!1,value:gEe(p)};if(nz[x])return{isToken:!0,value:p};if(x.match(mEe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(c=i.localize.preprocessor(o,c));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return c.map(p=>{if(!p.isToken)return p.value;const x=p.value;(oEe(x)||aEe(x))&&lEe(x,t,String(e));const v=nz[x[0]];return v(o,x,i.localize,u)}).join("")}function gEe(e){const t=e.match(hEe);return t?t[1].replace(fEe,"'"):e}var xEe=Object.defineProperty,ud=(e,t)=>xEe(e,"name",{value:t,configurable:!0}),EO="Popover",[Zte,l0t]=sa(EO,[Mx]),e3=Mx(),[yEe,Vx]=Zte(EO),bEe=ud(e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!1}=e,o=e3(t),c=b.useRef(null),[u,d]=b.useState(!1),[h,f]=Vo({prop:r,defaultProp:i??!1,onChange:s,caller:EO});return l.jsx(CZ,{...o,children:l.jsx(yEe,{scope:t,contentId:Sl(),triggerRef:c,open:h,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>d(!0),[]),onCustomAnchorRemove:b.useCallback(()=>d(!1),[]),modal:a,children:n})})},"Popover"),vEe="PopoverTrigger",wEe=b.forwardRef(ud(function(t,n){const{__scopePopover:r,...i}=t,s=Vx(vEe,r),a=e3(r),o=Vn(n,s.triggerRef),c=l.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":jO(s.open),...i,ref:o,onClick:Xt(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?c:l.jsx(kZ,{asChild:!0,...a,children:c})},"PopoverTrigger")),Jte="PopoverPortal",[SEe,CEe]=Zte(Jte,{forceMount:void 0}),kEe=ud(e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,s=Vx(Jte,t);return l.jsx(SEe,{scope:t,forceMount:n,children:l.jsx(cd,{present:n||s.open,children:l.jsx(rR,{asChild:!0,container:i,children:r})})})},"PopoverPortal"),Wb="PopoverContent",_Ee=b.forwardRef(ud(function(t,n){const r=CEe(Wb,t.__scopePopover),{forceMount:i=r.forceMount,...s}=t,a=Vx(Wb,t.__scopePopover);return l.jsx(cd,{present:i||a.open,children:a.modal?l.jsx(EEe,{...s,ref:n}):l.jsx(jEe,{...s,ref:n})})},"PopoverContent")),TEe=gc("PopoverContent.RemoveScroll"),EEe=b.forwardRef(ud(function(t,n){const r=Vx(Wb,t.__scopePopover),i=b.useRef(null),s=Vn(n,i),a=b.useRef(!1);return b.useEffect(()=>{const o=i.current;if(o)return iR(o)},[]),l.jsx(Ak,{as:TEe,allowPinchZoom:!0,children:l.jsx(ene,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xt(t.onCloseAutoFocus,o=>{var c;o.preventDefault(),a.current||(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Xt(t.onPointerDownOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Xt(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),jEe=b.forwardRef(ud(function(t,n){const r=Vx(Wb,t.__scopePopover),i=b.useRef(!1),s=b.useRef(!1);return l.jsx(ene,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,c;(o=t.onCloseAutoFocus)==null||o.call(t,a),a.defaultPrevented||(i.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:a=>{var u,d;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"PopoverContentNonModal")),ene=b.forwardRef(ud(function(t,n){const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,...f}=t,m=Vx(Wb,r),p=e3(r);return Yv(),l.jsx(KM,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a,children:l.jsx(GM,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:h,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:l.jsx(_Z,{"data-state":jO(m.open),role:"dialog",id:m.contentId,...p,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl")),NEe=b.forwardRef(ud(function(t,n){const{__scopePopover:r,...i}=t,s=e3(r);return l.jsx(dbe,{...s,...i,ref:n})},"PopoverArrow"));function jO(e){return e?"open":"closed"}ud(jO,"getState");var AEe=bEe,MEe=wEe,REe=kEe,OEe=_Ee,DEe=NEe;function LEe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const PEe=e=>{switch(e){case"success":return BEe;case"info":return $Ee;case"warning":return zEe;case"error":return UEe;default:return null}},IEe=Array(12).fill(0),FEe=({visible:e,className:t})=>Y.createElement("div",{className:["sonner-loading-wrapper",t].filter(
773Boolean).join(" "),"data-visible":e},Y.createElement("div",{className:"sonner-spinner"},IEe.map((n,r)=>Y.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),BEe=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),zEe=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Y.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),$Ee=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),UEe=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),VEe=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Y.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Y.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),HEe=()=>{const[e,t]=Y.useState(document.hidden);return Y.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e};let qEe=1;const GEe=100,az=e=>{var t;return typeof(e==null?void 0:e.id)=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:qEe++};class WEe{constructor(){this.subscribe=t=>
773(this.subscribers.push(t),this.getActiveToasts().forEach(n=>t(n)),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-GEe;t<=0||(this.toasts=this.toasts.filter(n=>t>0&&this.dismissedToasts.has(n.id)?(this.dismissedToasts.delete(n.id),t--,!1):!0))},this.create=t=>{const{message:n,...r}=t,i=az(t),s=this.pendingDismissals.get(i);s!==void 0&&(cancelAnimationFrame(s),this.pendingDismissals.delete(i),this.dismissedToasts.delete(i));const a=this.dismissedToasts.has(i),o=t.dismissible===void 0?!0:t.dismissible;return a&&(this.dismissedToasts.delete(i),this.toasts=this.toasts.filter(u=>u.id!==i)),(a?void 0:this.toasts.find(u=>u.id===i))?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...t,id:i,title:n}),{...u,...t,id:i,dismissible:o,title:n}):u):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>
773{if(t==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const n=this.pendingDismissals.get(t);return n!==void 0&&cancelAnimationFrame(n),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(r=>r({id:t,dismiss:!0}))})),t},this.message=(t,n)=>this.create({...n,message:t,type:void 0}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const o=i.then(async u=>{if(a=["resolve",u],Y.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(KEe(u)&&!u.ok){s=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,p=typeof h=="object"&&!Y.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:f,...p})}else if(u instanceof Error){s=!1;const h=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof h=="object"&&!Y.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const h=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof h=="object"&&!Y.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:f,...p})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof d=="object"&&!Y.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=az(n);return this.create({...n,jsx:t(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const ha=new WEe,YEe=(e,t)=>ha.message(e,t),KEe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XEe=YEe,QEe=()=>ha.toasts,ZEe=()=>ha.getActiveToasts(),Vt=Object.assign(XEe,{success:ha.success,info:ha.info,warning:ha.warning,error:ha.error,custom:ha.custom,message:ha.message,promise:ha.promise,dismiss:ha.dismiss,loading:ha.loading},{getHistory:QEe,getToasts:ZEe});LEe
vendor: 14,921 bytes, line 773
773("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
773function C2(e){return e.label!==void 0}const JEe=3,eje="24px",tje="16px",oz=4e3,nje=356,rje=14,ije=45,sje=200;function Fl(...e){return e.filter(Boolean).join(" ")}function aje(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const oje=e=>{var t,n,r,i,s,a,o,c,u;const{invert:d,toast:h,unstyled:f,interacting:m,setHeights:p,visibleToasts:x,heights:v,index:g,toasts:y,exp
vendor: 8,892 bytes, line 773
773anded:w,removeToast:S,defaultRichColors:C,closeButton:k,style:_,cancelButtonStyle:E,actionButtonStyle:A,className:j="",descriptionClassName:D="",duration:M,position:$,gap:B,expandByDefault:z,classNames:O,icons:P,closeButtonAriaLabel:I="Close toast"}=e,[q,R]=Y.useState(null),[xe,me]=Y.useState(null),[U,ae]=Y.useState(!1),[Ce,je]=Y.useState(!1),[ve,Te]=Y.useState(!1),[Se,He]=Y.useState(!1),[tt,we]=Y.useState(!1),[Oe,Je]=Y.useState(0),[It,mt]=Y.useState(0),De=Y.useRef(h.duration||M||oz),Pe=Y.useRef(null),ct=Y.useRef(null),Tn=g===0,Nn=g+1<=x,ln=h.type,Bn=ln??"default",Sn=h.dismissible!==!1,zr=h.className||"",or=h.descriptionClassName||"",ge=Y.useMemo(()=>v.findIndex(Fe=>Fe.toastId===h.id)||0,[v,h.id]),Me=Y.useMemo(()=>{var Fe;return(Fe=h.closeButton)!=null?Fe:k},[h.closeButton,k]),ut=Y.useMemo(()=>h.duration||M||oz,[h.duration,M]),Ct=Y.useRef(0),yn=Y.useRef(0),un=Y.useRef(0),en=Y.useRef(null),[Rr,Ei]=$.split("-"),li=Y.useMemo(()=>v.reduce((Fe,Lt,Ft)=>Ft>=ge?Fe:Fe+Lt.height,0),[v,ge]),V=HEe(),te=Y.useMemo(()=>{var Fe;return(Fe=e.swipeDirections)!=null?Fe:aje($)},[e.swipeDirections,$]),W=h.invert||d,ye=ln==="loading";yn.current=Y.useMemo(()=>ge*B+li,[ge,li]),Y.useEffect(()=>{De.current=ut},[ut]),Y.useEffect(()=>{ae(!0)},[]),Y.useEffect(()=>{const Fe=ct.current;if(Fe){const Lt=Fe.getBoundingClientRect().height;return mt(Lt),p(Ft=>[{toastId:h.id,height:Lt,position:h.position},...Ft]),()=>p(Ft=>Ft.filter(Dn=>Dn.toastId!==h.id))}},[p,h.id]),Y.useLayoutEffect(()=>{if(!U)return;const Fe=ct.current,Lt=Fe.style.height;Fe.style.height="auto";const Ft=Fe.getBoundingClientRect().height;Fe.style.height=Lt,mt(Ft),p(Dn=>Dn.find(Z=>Z.toastId===h.id)?Dn.map(Z=>Z.toastId===h.id?{...Z,height:Ft}:Z):[{toastId:h.id,height:Ft,position:h.position},...Dn])},[U,h.title,h.description,p,h.id,h.jsx,h.action,h.cancel]);const fe=Y.useCallback(()=>{je(!0),Je(yn.current),p(Fe=>Fe.filter(Lt=>Lt.toastId!==h.id)),setTimeout(()=>{S(h)},sje)},[h,S,p,yn]);Y.useEffect(()=>{if(h.promise&&ln==="loading"||h.duration===1/0||h.type==="loading")return;let Fe;return w||m||V?(()=>{if(un.current<Ct.current){const Dn=new Date().getTime()-Ct.current;De.current=De.current-Dn}un.current=new Date().getTime()})():(()=>{De.current!==1/0&&(Ct.current=new Date().getTime(),Fe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),fe()},De.current))})(),()=>clearTimeout(Fe)},[w,m,h,ln,V,fe]),Y.useEffect(()=>{h.delete&&(fe(),h.onDismiss==null||h.onDismiss.call(h,h))},[fe,h.delete]);function Ne(){var Fe;if(P!=null&&P.loading){var Lt;return Y.createElement("div",{className:Fl(O==null?void 0:O.loader,h==null||(Lt=h.classNames)==null?void 0:Lt.loader,"sonner-loader"),"data-visible":ln==="loading"},P.loading)}return Y.createElement(FEe,{className:Fl(O==null?void 0:O.loader,h==null||(Fe=h.classNames)==null?void 0:Fe.loader),visible:ln==="loading"})}const ke=h.icon||(P==null?void 0:P[ln])||PEe(ln);var ze,et;return Y.createElement("li",{tabIndex:0,ref:ct,className:Fl(j,zr,O==null?void 0:O.toast,h==null||(t=h.classNames)==null?void 0:t.toast,O==null?void 0:O[Bn],h==null||(n=h.classNames)==null?void 0:n[Bn]),"data-sonner-toast":"","data-rich-colors":(ze=h.richColors)!=null?ze:C,"data-styled":!(h.jsx||h.unstyled||f),"data-mounted":U,"data-promise":!!h.promise,"data-swiped":tt,"data-removed":Ce,"data-visible":Nn,"data-y-position":Rr,"data-x-position":Ei,"data-index":g,"data-front":Tn,"data-swiping":ve,"data-dismissible":Sn,"data-type":ln,"data-invert":W,"data-swipe-out":Se,"data-swipe-direction":xe,"data-expanded":!!(w||z&&U),"data-testid":h.testId,style:{"--index":g,"--toasts-before":g,"--z-index":y.length-g,"--offset":`${Ce?Oe:yn.current}px`,"--initial-height":z?"auto":`${It}px`,..._,...h.style},onDragEnd:()=>{Te(!1),R(null),en.current=null},onPointerDown:Fe=>{Fe.button!==2&&(ye||!Sn||(Pe.current=new Date,Je(yn.current),Fe.target.setPointerCapture(Fe.pointerId),Fe.target.tagName!=="BUTTON"&&(Te(!0),en.current={x:Fe.clientX,y:Fe.clientY})))},onPointerUp:()=>{var Fe,Lt,Ft;if(Se||!Sn)return;en.current=null;const Dn=Number(((Fe=ct.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Xn=Number(((Lt=ct.current)==null?void 0:Lt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Z=new Date().getTime()-((Ft=Pe.current)==null?void 0:Ft.getTime()),oe=q==="x"?Dn:Xn,pe=Math.abs(oe)/Z;if((q==="x"?te.includes(Dn>0?"right":"left"):te.includes(Xn>0?"bottom":"top"))&&(Math.abs(oe)>=ije||pe>.11)){Je(yn.current),h.onDismiss==null||h.onDismiss.call(h,h),me(q==="x"?Dn>0?"right":"left":Xn>0?"down":"up"),fe(),He(!0);return}else{var qe,xt;(qe=ct.current)==null||qe.style.setProperty("--swipe-amount-x","0px"),(xt=ct.current)==null||xt.style.setProperty("--swipe-amount-y","0px")}we(!1),Te(!1),R(null)},onPointerMove:Fe=>{var Lt,Ft,Dn;if(!en.current||!Sn||((Lt=window.getSelection())==null?void 0:Lt.toString().length)>0)return;const Z=Fe.clientY-en.current.y,oe=Fe.clientX-en.current.x;!q&&(Math.abs(oe)>1||Math.abs(Z)>1)&&R(Math.abs(oe)>Math.abs(Z)?"x":"y");let pe={x:0,y:0};const Le=qe=>1/(1.5+Math.abs(qe)/20);if(q==="y"){if(te.includes("top")||te.includes("bottom"))if(te.includes("top")&&Z<0||te.includes("bottom")&&Z>0)pe.y=Z;else{const qe=Z*Le(Z);pe.y=Math.abs(qe)<Math.abs(Z)?qe:Z}}else if(q==="x"&&(te.includes("left")||te.includes("right")))if(te.includes("left")&&oe<0||te.includes("right")&&oe>0)pe.x=oe;else{const qe=oe*Le(oe);pe.x=Math.abs(qe)<Math.abs(oe)?qe:oe}(Math.abs(pe.x)>0||Math.abs(pe.y)>0)&&we(!0),(Ft=ct.current)==null||Ft.style.setProperty("--swipe-amount-x",`${pe.x}px`),(Dn=ct.current)==null||Dn.style.setProperty("--swipe-amount-y",`${pe.y}px`)}},Me&&!h.jsx&&ln!=="loading"?Y.createElement("button",{"aria-label":I,"data-disabled":ye,"data-close-button":!0,onClick:ye||!Sn?()=>{}:()=>{fe(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Fl(O==null?void 0:O.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(et=P==null?void 0:P.close)!=null?et:VEe):null,(ln||h.icon||h.promise)&&h.icon!==null&&((P==null?void 0:P[ln])!==null||h.icon)?Y.createElement("div",{"data-icon":"",className:Fl(O==null?void 0:O.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},ln==="loading"?h.icon||Ne():h.promise?Ne():null,ln!=="loading"?ke:null):null,Y.createElement("div",{"data-content":"",className:Fl(O==null?void 0:O.content,h==null||(s=h.classNames)==null?void 0:s.content)},Y.createElement("div",{"data-title":"",className:Fl(O==null?void 0:O.title,h==null||(a=h.classNames)==null?void 0:a.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Y.createElement("div",{"data-description":"",className:Fl(D,or,O==null?void 0:O.description,h==null||(o=h.classNames)==null?void 0:o.description)},typeof h.description=="function"?h.description():h.description):null),Y.isValidElement(h.cancel)?h.cancel:h.cancel&&C2(h.cancel)?Y.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||E,onClick:Fe=>{C2(h.cancel)&&Sn&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Fe),fe())},className:Fl(O==null?void 0:O.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,Y.isValidElement(h.action)?h.action:h.action&&C2(h.action)?Y.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||A,onClick:Fe=>{C2(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Fe),!Fe.defaultPrevented&&fe())},className:Fl(O==null?void 0:O.actionButton,h==null||(u=h.classNames)==null?void 0:u.actionButton)},h.action.label):null)};function lz(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function lje(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,a=s?"--mobile-offset":"--offset",o=s?tje:eje;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(o)}),n}const cje=Y.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:d,mobileOffset:h,theme:f="light",richColors:m,duration:p,style:x,visibleToasts:v=JEe,toastOptions:g,dir:y=lz(),gap:w=rje,icons:S,customAriaLabel:C,containerAriaLabel:k="Notifications"}=t,[_,E]=Y.useState([]),A=Y.useMemo(()=>r?_.filter(ae=>ae.toasterId===r):_.filter(ae=>!ae.toasterId),[_,r]),j=Y.useMemo(()=>Array.from(new Set([s].concat(A.filter(ae=>ae.position).map(ae=>ae.position)))),[A,s]),[D,M]=Y.useState([]),[$,B]=Y.useState(!1),[z,O]=Y.useState(!1),[P,I]=Y.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
773k":"light"),q=Y.useRef(null),R=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),xe=Y.useRef(null),me=Y.useRef(!1),U=Y.useCallback(ae=>{E(Ce=>{var je;return(je=Ce.find(ve=>ve.id===ae.id))!=null&&je.delete||ha.dismiss(ae.id),Ce.filter(({id:ve})=>ve!==ae.id)})},[]);return Y.useEffect(()=>ha.subscribe(ae=>{if(ae.dismiss){requestAnimationFrame(()=>{E(Ce=>Ce.map(je=>je.id===ae.id?{...je,delete:!0}:je))});return}setTimeout(()=>{SW.flushSync(()=>{E(Ce=>{const je=Ce.findIndex(ve=>ve.id===ae.id);return je!==-1?[...Ce.slice(0,je),{...Ce[je],...ae},...Ce.slice(je+1)]:[ae,...Ce]})})})}),[]),Y.useEffect(()=>{if(f!=="system"){I(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?I("dark"):I("light")),typeof window>"u")return;const ae=window.matchMedia("(prefers-color-scheme: dark)");try{ae.addEventListener("change",({matches:Ce})=>{I(Ce?"dark":"light")})}catch{ae.addListener(({matches:je})=>{try{I(je?"dark":"light")}catch(ve){console.error(ve)}})}},[f]),Y.useEffect(()=>{_.length<=1&&B(!1)},[_]),Y.useEffect(()=>{const ae=Ce=>{var je;if(a.length>0&&a.every(Se=>Ce[Se]||Ce.code===Se)){var Te;B(!0),(Te=q.current)==null||Te.focus()}Ce.code==="Escape"&&(document.activeElement===q.current||(je=q.current)!=null&&je.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[a]),Y.useEffect(()=>{if(q.current)return()=>{xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null,me.current=!1)}},[q.current]),Y.createElement("section",{ref:n,"aria-label":C??`${k} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},j.map((ae,Ce)=>{var je;const[ve,Te]=ae.split("-");return A.length?Y.createElement("ol",{key:ae,dir:y==="auto"?lz():y,tabIndex:-1,ref:q,className:u,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":ve,"data-x-position":Te,style:{"--front-toast-height":`${((je=D[0])==null?void 0:je.height)||0}px`,"--width":`${nje}px`,"--gap":`${w}px`,...x,...lje(d,h)},onBlur:Se=>{me.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(me.current=!1,xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||me.current||(me.current=!0,xe.current=Se.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{z||B(!1)},onDragEnd:()=>B(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},A.filter(Se=>!Se.position&&Ce===0||Se.position===ae).map((Se,He)=>{var tt,we;return Y.createElement(oje,{key:Se.id,icons:S,index:He,toast:Se,defaultRichColors:m,duration:(tt=g==null?void 0:g.duration)!=null?tt:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:i,visibleToasts:v,closeButton:(we=g==null?void 0:g.closeButton)!=null?we:c,interacting:z,position:ae,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:U,toasts:A.filter(Oe=>Oe.position==Se.position),heights:D.filter(Oe=>Oe.position==Se.position),setHeights:M,expandByDefault:o,gap:w,expanded:$,swipeDirections:t.swipeDirections})})):null}))}),cz={classNames:{toast:re("group toast border-border bg-background text-foreground shadow-lg"),description:re("text-muted-foreground"),actionButton:re("bg-primary text-primary-foreground"),cancelButton:re("bg-muted text-muted-foreground"),error:re("border-destructive/50 text-destructive"),success:re("border-success/50 text-success"),warning:re("border-warning/50 text-warning"),info:re("border-info/50 text-info")}},tne=e=>{const{position:t="bottom-right",toastOptions:n,...r}=e,i={...cz,...n,classNames:{...cz.classNames,...n==null?void 0:n.classNames}};return l.jsx(cje,{position:t,toastOptions:i,...r})};tne.displayName="Toaster";const bc=({icon:e,title:t,description:n,action:r,titleLevel:i=4,className:s})=>l.jsxs("div",{className:re("flex flex-col items-center justify-center py-12 px-4 text-center",s
773),children:[e&&l.jsx("div",{className:"mb-4 text-muted-foreground [&>svg]:h-12 [&>svg]:w-12",children:e}),l.jsx(hp,{level:i,className:"mb-2",children:t}),n&&l.jsx(xn,{className:"text-muted-foreground max-w-sm mb-6",children:n}),r&&l.jsx(ce,{variant:"primary",leftIcon:r.icon,onClick:r.onClick,children:r.label})]});bc.displayName="EmptyState";const uje={info:{icon:zm,classes:"bg-info/10 border-info/20 text-info"},warning:{icon:lf,classes:"bg-warning/10 border-warning/20 text-warning"},error:{icon:PM,classes:"bg-destructive/10 border-destructive/20 text-destructive"},success:{icon:vQ,classes:"bg-success/10 border-success/20 text-success"}},lo=({variant:e,title:t,message:n,action:r,dismissible:i,onDismiss:s,className:a})=>{const o=uje[e],c=o.icon;return l.jsxs("div",{className:re("flex items-start gap-3 rounded-lg border p-4",o.classes,a),role:"alert",children:[l.jsx(c,{className:"h-5 w-5 shrink-0 mt-0.5"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[t&&l.jsx("p",{className:"font-medium text-sm",children:t}),l.jsx("p",{className:"text-sm opacity-90",children:n})]}),r&&l.jsx(ce,{variant:"outline",size:"sm",onClick:r.onClick,children:r.label}),i&&s&&l.jsx(Pn,{variant:"ghost",size:"sm","aria-label":"Dismiss",onClick:s,children:l.jsx(ar,{className:"h-4 w-4"})})]})};lo.displayName="AlertBanner";function nne({searchValue:e,onSearch:t,searchPlaceholder:n="Searchâ¦",filters:r,action:i,className:s}){return l.jsxs("div",{className:re("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",s),children:[l.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center flex-1",children:[l.jsx(Ex,{value:e,onSearch:t,debounceMs:0,placeholder:n,className:"flex-1 min-w-0 sm:max-w-md"}),r==null?void 0:r.map(a=>l.jsx(Ok,{options:a.options,value:a.value,onChange:a.onChange},a.key))]}),i&&l.jsx(ce,{variant:"primary",leftIcon:i.icon,onClick:i.onClick,className:"shrink-0",children:i.label})]})}nne.displayName="FilterBar";const dje="linear-gradient(120deg, #2a2d4f 0%, #3f4280 50%, #5b5f9e 100%)",rne=Y.forwardRef(({eyebrow:e,title:t,lead:n,ctaSlot:r,metaSlot:i,mascotSlot:s,gradient:a,artSlot:o,className:c},u)=>{const d=a??dje;return l.jsxs("section",{ref:u,className:re("relative grid items-center gap-6 overflow-hidden rounded-2xl text-white shadow-elevated","px-7 py-6 sm:px-8","grid-cols-1 md:grid-cols-[1fr_auto]",c),style:{background:d},children:[l.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-16 -top-20 h-72 w-72 rounded-full",style:{background:"radial-gradient(circle, rgba(168, 179, 255, 0.30) 0%, transparent 60%)"}}),l.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute -bottom-24 left-[20%] h-60 w-60 rounded-full",style:{background:"radial-gradient(circle, rgba(255, 107, 26, 0.10) 0%, transparent 65%)"}}),o&&l.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 overflow-hidden",children:o}),l.jsxs("div",{className:"relative z-10 min-w-0",children:[e&&l.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2 text-[11px] font-bold uppercase tracking-[0.14em] text-white/85",children:e}),l.jsx("h2",{className:"text-[22px] font-bold leading-tight text-white sm:text-2xl",children:t}),n&&l.jsx("p",{className:"mt-2 max-w-xl text-sm leading-relaxed text-white/85",children:n}),r&&l.jsx("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:r}),i&&l.jsx("div",{className:"mt-4 flex flex-wrap items-center gap-x-6 gap-y-2 text-xs text-white/75",children:i})]}),s&&l.jsx("div",{className:"relative z-10 flex shrink-0 items-center justify-center justify-self-center md:justify-self-end",children:s})]})});rne.displayName="HeroCard";const oC=({children:e,className:t})=>l.jsx("span",{className:re("rounded-md bg-white/15 px-2 py-1 text-[11px] font-bold uppercase tracking-wider text-white",t),children:e});oC.displayName="HeroCardEyebrowPill";const ine=({children:e,className:t})=>l.jsx("div",{className:re("relative flex h-[132px] w-[132px] items-center justify-center rounded-full border-2 border-white/20 bg-white/10",t),children:l.jsx("div",{className:"flex h-[102px] w-[102px] items-center justify-center overflow-hidden rounded-full bg-gradient-to-br from-white/95 to-white/70 text-[var(--arthur-secondary,#5b5f9e)]",children:e})});ine.displayName="HeroCardMascotCircle";const VT=[.75,1,1.25,1.5,2],Xc=52,gA=3,xA=(Xc-gA)/2,HT=2*Math.PI*xA;function hje({state:e,progressPercent:t=0,speed:n,onToggle:r,onSpeedChange:i,className:s}){const[a,o]=b.useState(!1),c=e!=="idle",u=Math.min(100,Math.max(0,t)),d=HT-u/100*HT,h=()=>{const x=VT.indexOf(n);i(VT[(x+1)%VT.length])},f=(()=>{switch(e){case"loading":return l.jsx(Qo,{className:"h-5 w-5 animate-spin","aria-hidden":!0});case"playing":return l.jsx(BM,{className:"h-5 w-5","aria-hidden":!0});case"paused":return l.jsx(vk,{className:"ms-0.5 h-5 w-5","aria-hidden":!0});default:return l.jsx(DQ,{className:"h-5 w-5","aria-hidden":!0})}})(),m=(()=>{switch(e){case"loading":return"Loading audio";case"playing":return"Pause narration";case"paused":return"Resume narration";default:return"Listen to lesson"}})(),p=c&&a;return l.jsxs("div",{className:re("fixed bottom-6 right-6 z-50 flex flex-col items-center gap-2",s),role:"region","aria-label":"Audio controls",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[l.jsx("div",{className:re("flex h-9 min-w-9 items-center justify-center rounded-full bg-background/95 px-2 text-xs font-bold text-foreground shadow-lg ring-1 ring-border/40 backdrop-blur-md transition-all duration-200","dark:bg-zinc-800/95 dark:ring-white/10",p?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-2 scale-90 opacity-0"),children:l.jsxs("button",{type:"button",onClick:h,className:"flex h-full w-full items-center justify-center transition-transform hover:scale-105 active:scale-95","aria-label":`Speed ${n}Ã`,children:[n,"Ã"]})}),l.jsxs("div",{className:"relative",style:{width:Xc,height:Xc},children:[c&&l.jsxs("svg",{className:"absolute inset-0 -rotate-90",width:Xc,height:Xc,"aria-hidden":!0,
773children:[l.jsx("circle",{cx:Xc/2,cy:Xc/2,r:xA,fill:"none",stroke:"currentColor",strokeWidth:gA,className:"text-border/30 dark:text-white/10"}),l.jsx("circle",{cx:Xc/2,cy:Xc/2,r:xA,fill:"none",stroke:"currentColor",strokeWidth:gA,strokeLinecap:"round",strokeDasharray:HT,strokeDashoffset:d,className:"text-primary transition-[stroke-dashoffset] duration-500 ease-out"})]}),l.jsx("button",{type:"button",onClick:r,disabled:e==="loading",className:re("absolute inset-0 flex items-center justify-center rounded-full shadow-xl transition-all","disabled:opacity-70",c?"bg-primary text-primary-foreground hover:brightness-110 active:scale-95":"bg-background/95 text-foreground ring-1 ring-border/40 backdrop-blur-md hover:bg-background hover:shadow-2xl active:scale-95 dark:bg-zinc-800/95 dark:ring-white/10",e==="playing"&&"animate-[pulse-glow_2s_ease-in-out_infinite] shadow-[0_0_24px_rgba(var(--arthur-primary-rgb),0.35)]"),"aria-label":m,children:f})]})]})}const fje=({error:e,resetError:t,title:n="Something went wrong",description:r="An unexpected error occurred. Please try again.",errorDetailsLabel:i="Error details",tryAgainLabel:s="Try Again",goHomeLabel:a="Go Home",onTryAgain:o,onGoHome:c})=>{const u=o??t,d=c??(()=>{window.location.href="/"});return l.jsx("div",{className:"min-h-screen flex items-center justify-center p-4 bg-gray-50",role:"alert","aria-live":"assertive",children:l.jsxs(ec,{className:"max-w-md w-full",children:[l.jsxs(Qf,{children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Uv,{className:"h-6 w-6 text-destructive","aria-hidden":"true"}),l.jsx(hp,{level:2,children:n})]}),l.jsx(xn,{variant:"bodySmall",className:"text-muted-foreground",children:r})]}),e&&l.jsx(fu,{children:l.jsxs("details",{className:"text-sm",children:[l.jsx("summary",{className:"cursor-pointer font-medium mb-2",children:i}),l.jsx("pre",{className:"p-3 bg-muted rounded-md overflow-x-auto text-xs",children:e.message})]})}),l.jsxs(hQ,{className:"flex gap-2",children:[l.jsx(ce,{onClick:u,className:"flex-1",children:s}),l.jsx(ce,{variant:"outline",onClick:d,className:"flex-1",children:a})]})]})})};class NO extends b.Component{constructor(n){super(n);y_(this,"handleReset",()=>{var n;(n=this.props.queryClient)==null||n.clear(),this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){var i,s;(s=(i=this.props).onError)==null||s.call(i,n,r)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:l.jsx(fje,{error:this.state.error,resetError:this.handleReset}):this.props.children}}function uz(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function mje(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pje=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gje=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xje={};function dz(e,t){return(xje.jsx?gje:pje).test(e)}const yje=/[ \t\n\f\r]/g;function bje(e){return typeof e=="object"?e.type==="text"?hz(e.value):!1:hz(e)}function hz(e){return e.replace(yje,"")===""}class aw{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}aw.prototype.normal={};aw.prototype.property={};aw.prototype.space=void 0;function sne(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new aw(n,r,t)}function Yb(e){return e.toLowerCase()}class Da{constructor(t,n){this.attribute=n,this.property=t}}Da.prototype.attribute="";Da.prototype.booleanish=!1;Da.prototype.boolean=!1;Da.prototype.commaOrSpaceSeparated=!1;Da.prototype.commaSeparated=!1;Da.prototype.defined=!1;Da.prototype.mustUseProperty=!1;Da.prototype.number=!1;Da.prototype.overloadedBoolean=!1;Da.prototype.property="";Da.prototype.spaceSeparated=!1;Da.prototype.space=void 0;let vje=0;const Yt=yp(),ui=yp(),yA=yp(),We=yp(),ur=yp(),Sm=yp(),za=yp();function yp(){return 2**++vje}const bA=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yt,booleanish:ui,commaOrSpaceSeparated:za,commaSeparated:Sm,number:We,overloadedBoolean:yA,spaceSeparated:ur},Symbol.toStringTag,{value:"Module"})),qT=Object.keys(bA);class AO extends Da{constructor(t,n,r,i){let s=-1;if(super(t,n),fz(this,"space",i),typeof r=="number")for(;++s<qT.length;){const a=qT[s];
vendor: 4,247 bytes, line 773
773fz(this,qT[s],(r&bA[a])===bA[a])}}}AO.prototype.defined=!0;function fz(e,t,n){n&&(e[t]=n)}function Hx(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new AO(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Yb(r)]=r,n[Yb(s.attribute)]=r}return new aw(t,n,e.space)}const ane=Hx({properties:{ariaActiveDescendant:null,ariaAtomic:ui,ariaAutoComplete:null,ariaBusy:ui,ariaChecked:ui,ariaColCount:We,ariaColIndex:We,ariaColSpan:We,ariaControls:ur,ariaCurrent:null,ariaDescribedBy:ur,ariaDetails:null,ariaDisabled:ui,ariaDropEffect:ur,ariaErrorMessage:null,ariaExpanded:ui,ariaFlowTo:ur,ariaGrabbed:ui,ariaHasPopup:null,ariaHidden:ui,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ur,ariaLevel:We,ariaLive:null,ariaModal:ui,ariaMultiLine:ui,ariaMultiSelectable:ui,ariaOrientation:null,ariaOwns:ur,ariaPlaceholder:null,ariaPosInSet:We,ariaPressed:ui,ariaReadOnly:ui,ariaRelevant:null,ariaRequired:ui,ariaRoleDescription:ur,ariaRowCount:We,ariaRowIndex:We,ariaRowSpan:We,ariaSelected:ui,ariaSetSize:We,ariaSort:null,ariaValueMax:We,ariaValueMin:We,ariaValueNow:We,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function one(e,t){return t in e?e[t]:t}function lne(e,t){return one(e,t.toLowerCase())}const wje=Hx({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sm,acceptCharset:ur,accessKey:ur,action:null,allow:null,allowFullScreen:Yt,allowPaymentRequest:Yt,allowUserMedia:Yt,alpha:Yt,alt:null,as:null,async:Yt,autoCapitalize:null,autoComplete:ur,autoFocus:Yt,autoPlay:Yt,blocking:ur,capture:null,charSet:null,checked:Yt,cite:null,className:ur,closedBy:null,colorSpace:null,cols:We,colSpan:We,command:null,commandFor:null,content:null,contentEditable:ui,controls:Yt,controlsList:ur,coords:We|Sm,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yt,defer:Yt,dir:null,dirName:null,disabled:Yt,download:yA,draggable:ui,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yt,formTarget:null,headers:ur,height:We,hidden:yA,high:We,href:null,hrefLang:null,htmlFor:ur,httpEquiv:ur,id:null,imageSizes:null,imageSrcSet:null,inert:Yt,inputMode:null,integrity:null,is:null,isMap:Yt,itemId:null,itemProp:ur,itemRef:ur,itemScope:Yt,itemType:ur,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yt,low:We,manifest:null,max:null,maxLength:We,media:null,method:null,min:null,minLength:We,multiple:Yt,muted:Yt,name:null,nonce:null,noModule:Yt,noValidate:Yt,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:Yt,optimum:We,pattern:null,ping:ur,placeholder:null,playsInl
773ine:Yt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yt,referrerPolicy:null,rel:ur,required:Yt,reversed:Yt,rows:We,rowSpan:We,sandbox:ur,scope:null,scoped:Yt,seamless:Yt,selected:Yt,shadowRootClonable:Yt,shadowRootCustomElementRegistry:Yt,shadowRootDelegatesFocus:Yt,shadowRootMode:null,shadowRootSerializable:Yt,shape:null,size:We,sizes:null,slot:null,span:We,spellCheck:ui,src:null,srcDoc:null,srcLang:null,srcSet:null,start:We,step:null,style:null,tabIndex:We,target:null,title:null,translate:null,type:null,typeMustMatch:Yt,useMap:null,value:ui,width:We,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ur,axis:null,background:null,bgColor:null,border:We,borderColor:null,bottomMargin:We,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yt,declare:Yt,event:null,face:null,frame:null,frameBorder:null,hSpace:We,leftMargin:We,link:null,longDesc:null,lowSrc:null,marginHeight:We,marginWidth:We,noResize:Yt,noHref:Yt,noShade:Yt,noWrap:Yt,object:null,profile:null,prompt:null,rev:null,rightMargin:We,rules:null,scheme:null,scrolling:ui,standby:null,summary:null,text:null,topMargin:We,valueType:null,version:null,vAlign:null,vLink:null,vSpace:We,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Yt,disablePictureInPicture:Yt,disableRemotePlayback:Yt,exportParts:Sm,part:ur,prefix:null,property:null,results:We,security:null,unselectable:null},space:"html",transform:lne}),Sje=Hx({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",maskType:"mask-type",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
773-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:za,accentHeight:We,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:We,amplitude:We,arabicForm:null,ascent:We,attributeName:null,attributeType:null,azimuth:We,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:We,by:null,calcMode:null,capHeight:We,className:ur,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:We,diffuseConstant:We,direction:null,display:null,dur:null,divisor:We,dominantBaseline:null,download:Yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:We,enableBackground:null,end:null,event:null,exponent:We,externalResourcesRequired:null,fill:null,fillOpacity:We,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:Sm,g2:Sm,glyphName:Sm,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:We,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:We,horizOriginX:We,horizOriginY:We,id:null,ideographic:We,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:We,k:We,k1:We,k2:We,k3:We,k4:We,kernelMatrix:za,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:We,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:We,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 5,436 bytes, lines 773-774
773Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:We,overlineThickness:We,paintOrder:null,panose1:null,path:null,pathLength:We,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ur,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:We,pointsAtY:We,pointsAtZ:We,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:za,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:za,rev:za,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:za,requiredFeatures:za,requiredFonts:za,requiredFormats:za,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:We,specularExponent:We,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:We,strikethroughThickness:We,string:null,stroke:null,strokeDashArray:za,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:We,strokeOpacity:We,strokeWidth:null,style:null,surfaceScale:We,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:za,tabIndex:We,tableValues:null,target:null,targetX:We,targetY:We,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:za,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:We,underlineThickness:We,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:We,values:null,vAlphabetic:We,vMathematical:We,vectorEffect:null,vHanging:We,vIdeographic:We,version:null,vertAdvY:We,vertOriginX:We,vertOriginY:We,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:We,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:one}),cne=Hx({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),une=Hx({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lne}),dne=Hx({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Cje={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"},kje=/[A-Z]/g,mz=/-[a-z]/g,_je=/^data[-\w.:]+$/i;function hne(e,t){const n=Yb(t);let r=t,i=Da;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_je.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(mz,Eje);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!mz.test(s)){let a=s.replace(kje,Tje);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=AO}return new i(r,t)}function Tje(e){return"-"+e.toLowerCase()}function Eje(e){return e.charAt(1).toUpperCase()}const fne=sne([ane,wje,cne,une,dne],"html"),t3=sne([ane,Sje,cne,une,dne],"svg");function pz(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jje(e){return e.join(" ").trim()}var MO={},gz=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Nje=/\n/g,Aje=/^\s*/,Mje=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Rje=/^:\s*/,Oje=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Dje=/^[;\s]*/,Lje=/^\s+|\s+$/g,Pje=` 774`,xz="/",yz="*",Uf="",Ije="comment",Fje="declaration";function Bje(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var x=p.match(Nje);x&&(n+=x.length);var v=p.lastIndexOf(Pje);r=~v?p.length-v:r+p.length}function s(){var p={line:n,column:r};return function(x){return x.position=new a(p),u(),x}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(p){var x=new Error(t.source+":"+n+":"+r+": "+p);if(x.reason=p,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function c(p){var x=p.exec(e);if(x){var v=x[0];return i(v),e=e.slice(v.length),x}}function u(){c(Aje)}function d(p){var x;for(p=p||[];x=h();)x!==!1&&p.push(x);return p}function h(){var p=s();if(!(xz!=e.charAt(0)||yz!=e.charAt(1))){for(var x=2;Uf!=e.charAt(x)&&(yz!=e.charAt(x)||xz!=e.charAt(x+1));)++x;if(x+=2,Uf===e.charAt(x-1))return o("End of comment missing");var v=e.slice(2,x-2);return r+=2,i(v),e=e.slice(x),r+=2,p({type:Ije,comment:v})}}function f(){var p=s(),x=c(Mje);if(x){if(h(),!c(Rje))return o("property missing ':'");var v=c(Oje),g=p({type:Fje,property:bz(x[0].replace(gz,Uf)),value:v?bz(v[0].replace(gz,Uf)):Uf});return c(Dje),g}}function m(){var p=[];d(p);for(var x;x=f();)x!==!1&&(p.push(x),d(p));return p}return u(),m()}function bz(e){return e?e.replace(Lje,Uf):Uf}var zje=Bje,$je=fb&&fb.__importDefault||function(e){return e&&e.__esMo
vendor: 1,757 bytes, line 774
774dule?e:{default:e}};Object.defineProperty(MO,"__esModule",{value:!0});MO.default=Vje;const Uje=$je(zje);function Vje(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Uje.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(n=n||{},n[a]=o)}),n}var n3={};Object.defineProperty(n3,"__esModule",{value:!0});n3.camelCase=void 0;var Hje=/^--[a-zA-Z0-9_-]+$/,qje=/-([a-z])/g,Gje=/^[^-]+$/,Wje=/^-(webkit|moz|ms|o|khtml)-/,Yje=/^-(ms)-/,Kje=function(e){return!e||Gje.test(e)||Hje.test(e)},Xje=function(e,t){return t.toUpperCase()},vz=function(e,t){return"".concat(t,"-")},Qje=function(e,t){return t===void 0&&(t={}),Kje(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Yje,vz):e=e.replace(Wje,vz),e.replace(qje,Xje))};n3.camelCase=Qje;var Zje=fb&&fb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jje=Zje(MO),eNe=n3;function vA(e,t){var n={};return!e||typeof e!="string"||(0,Jje.default)(e,function(r,i){r&&i&&(n[(0,eNe.camelCase)(r,t)]=i)}),n}vA.default=vA;var tNe=vA;const nNe=dx(tNe),mne=pne("end"),RO=pne("start");function pne(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function rNe(e){const t=RO(e),n=mne(e);if(t&&n)return{start:t,end:n}}function K1(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wz(e.position):"start"in e||"end"in e?wz(e):"line"in e||"column"in e?wA(e):""}function wA(e){return Sz(e&&e.line)+":"+Sz(e&&e.column)}function wz(e){return wA(e&&e.start)+"-"+wA(e&&e.end)}function Sz(e){return e&&typeof e=="number"?e:1}
vendor: 1,928 bytes, line 774
774class Ls extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=K1(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ls.prototype.file="";Ls.prototype.name="";Ls.prototype.reason="";Ls.prototype.message="";Ls.prototype.stack="";Ls.prototype.column=void 0;Ls.prototype.line=void 0;Ls.prototype.ancestors=void 0;Ls.prototype.cause=void 0;Ls.prototype.fatal=void 0;Ls.prototype.place=void 0;Ls.prototype.ruleId=void 0;Ls.prototype.source=void 0;const OO={}.hasOwnProperty,iNe=new Map,sNe=/[A-Z]/g,aNe=new Set(["table","tbody","thead","tfoot","tr"]),oNe=new Set(["td","th"]),gne="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lNe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=gNe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,360 bytes, line 774
774if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=pNe(n,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:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?t3:fne,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=xne(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function xne(e,t,n){if(t.type==="element")return cNe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return uNe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return hNe(e,t,n);if(t.type==="mdxjsEsm")return dNe(e,t);if(t.type==="root")return fNe(e,t,n);if(t.type==="text")return mNe(e,t)}function cNe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=t3,e.schema=i),e.ancestors.push(t);const s=bne(e,t.tagName,!1),a=xNe(e,t);let o=LO(e,t);return aNe.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!bje(c):!0})),yne(e,a,s,t),DO(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function uNe(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Kb(e,t.position)}function dNe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kb(e,t.position)}function hNe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=t3,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:bne(e,t.name,!0),a=yNe(e,t),o=LO(e,t);return yne(e,a,s,t),DO(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function fNe(e,t,n){const r={};return DO(r,LO(e,t)),e.create(t,e.Fragment,r,n)}function mNe(e,t){return t.value}function yne(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function DO(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function pNe(e,t,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:t;return o?u(s,a,o):u(s,a)}}function gNe(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),c=RO(r);return t(i,s,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function xNe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&OO.call(t.properties,i)){const s=bNe(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&oNe.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function yNe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Kb(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Kb(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function LO(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:iNe;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const u=i.get(c)||0;a=c+"-"+u,i.set(c,u+1)}}const o=xne(e,s,a);o!==void 0&&n.push(o)}return n}function bNe(e,t,n){const r=hne(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mje(n):jje(n)),r.property==="style"){let i=typeof n=="object"?n:vNe(e,String(n));return e.stylePropertyNameCase==="css"&&(i=wNe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Cje[r.property]||r.property:r.attribute,n]}}function vNe(e,t){try{return nNe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ls("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=gne+"#cannot-parse-style-attribute",i}}function bne(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=dz(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=dz(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return OO.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Kb(e)}function Kb(e,t){const n=new Ls("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=gne+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wNe(e){const t={};let n;for(n in e)OO.call(e,n)&&(t[SNe(n)]=e[n]);return t}function SNe(e){let t=e.replace(sNe,CNe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CNe(e){return"-"+e.toLowerCase()}const GT={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"]},kNe={};function PO(e,t){const n=kNe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return vne(e,r,i)}function vne(e,t,n){if(_Ne(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cz(e.children,t,n)}return Array.isArray(e)?Cz(e,t,n):""}function Cz(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=vne(e[i],t,n);return r.join("")}function _Ne(e){return!!(e&&typeof e=="object")}const kz=document.createElement("i");function IO(e){const t="&"+e+";";kz.innerHTML=t;const n=kz.textContent;
vendor: 12,055 bytes, line 774
774return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kl(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t: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 No(e,t){return e.length>0?(kl(e,e.length,0,t),e):t}const _z={}.hasOwnProperty;function wne(e){const t={};let n=-1;for(;++n<e.length;)TNe(t,e[n]);return t}function TNe(e,t){let n;for(n in t){const i=(_z.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){_z.call(i,a)||(i[a]=[]);const o=s[a];ENe(i[a],Array.isArray(o)?o:o?[o]:[])}}}function ENe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kl(e,0,0,r)}function Sne(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _l(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ws=hf(/[A-Za-z]/),js=hf(/[\dA-Za-z]/),jNe=hf(/[#-'*+\--9=?A-Z^-~]/);function L4(e){return e!==null&&(e<32||e===127)}const SA=hf(/\d/),NNe=hf(/[\dA-Fa-f]/),ANe=hf(/[!-/:-@[-`{-~]/);function kt(e){return e!==null&&e<-2}function mr(e){return e!==null&&(e<0||e===32)}function mn(e){return e===-2||e===-1||e===32}const r3=hf(new RegExp("\\p{P}|\\p{S}","u")),Hm=hf(/\s/);function hf(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qx(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&js(e.charCodeAt(n+1))&&js(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function kn(e,t,n,r){const i=r?r-1:1/0;let s=0;return a;function a(c){return mn(c)?(e.enter(n),o(c)):t(c)}function o(c){return mn(c)&&s++<i?(e.consume(c),o):(e.exit(n),t(c))}}function Cne(e,t,n,r,i,s){let a=0;return o;function o(d){return mn(d)?(e.enter(r),c(d)):u(d)}function c(d){return mn(d)&&a<s?(e.consume(d),a++,c):(e.exit(r),u(d))}function u(d){return a>=i?t(d):n(d)}}const MNe={tokenize:RNe};function RNe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),kn(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return kt(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}let P4=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Tz(this,t,n,r,!1)}addBefore(t,n,r){Tz(this,t,n,r,!0)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}};function Tz(e,t,n,r,i){if(n===0&&r.length===0)return;const s=e.index.get(t);if(s){s[1]+=n,i?(r.push(...s[2]),s[2]=r):s[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}const ONe={tokenize:DNe},Ez={tokenize:LNe};function DNe(e){const t=this,n=[];let r=0,i,s,a;return o;function o(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const S=t.events.length;let C=S,k;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){k=t.events[C][1].end;break}g(r);let _=S;for(;_<t.events.length;)t.events[_][1].end={...k},_++;const E=new P4;return E.add(C+1,0,t.events.slice(S)),E.add(S,_-S,[]),E.consume(t.events),u(w)}return o(w)}function u(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return p(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ez,d,h)(w)}function d(w){return i&&y(),g(r),f(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(w)}function f(w){return t.containerState={},e.attempt(Ez,m,p)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function p(w){if(w===null){i&&y(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),x(w)}function x(w){if(w===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return kt(w)?(e.consume(w),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(w),x)}function v(w,S){const C=t.sliceStream(w);if(S&&C.push(null),w.previous=s,s&&(s.next=w),s=w,i.defineSkip(w.start),i.write(C),t.parser.lazy[w.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;const _=t.events.length;let E=_,A,j;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(A){j=t.events[E][1].end;break}A=!0}for(g(r),k=_;k<t.events.length;)t.events[k][1].end={...j},k++;const D=new P4;D.add(E+1,0,t.events.slice(_)),D.add(_,k-_,[]),D.consume(t.events)}}function g(w){let S=n.length;for(;S-- >w;){const C=n[S];t.containerState=C[1],C[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function LNe(e,t,n){return kn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function I4(e){if(e===null||mr(e)||Hm(e))return 1;if(r3(e))return 2}function i3(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const CA={name:"attention",resolveAll:PNe,tokenize:INe};function PNe(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const s=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,a={...e[i][1].end},o={...e[n][1].start};jz(a,-s),jz(o,s);const c={type:s>1?"strongSequence":"emphasisSequence",start:a,end:{...e[i][1].end}},u={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:o},d={type:s>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},h={type:s>1?"strong":"emphasis",start:{...c.start},end:{...u.end}};e[i][1].end={...c.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=No(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=No(r,[["enter",h,t],["enter",c,t],["exit",c,t],["enter",d,t]]),r=No(r,i3(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=No(r,[["exit",d,t],["enter",u,t],["exit",u,t],["exit",h,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=No(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),kl(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function INe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=I4(r);let s;return a;function a(c){return s=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===s)return e.consume(c),o;const u=e.exit("attentionSequence"),d=I4(c),h=!d||d===2&&i||n.includes(c)&&c!==42&&c!==95,f=!i||i===2&&d||n.includes(r)&&r!==42&&r!==95;return u._open=!!(s===42?h:h&&(i||!f)),u._close=!!(s===42?f:f&&(d||!h)),t(c)}}function jz(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const FNe={name:"autolink",tokenize:BNe};function BNe(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return Ws(m)?(e.consume(m),a):m===64?n(m):u(m)}function a(m){return m===43||m===45||m===46||js(m)?(r=1,o(m)):u(m)}function o(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||js(m))&&r++<32?(e.consume(m),o):(r=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||L4(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):jNe(m)?(e.consume(m),u):n(m)}function d(m){return js(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):f(m)}function f(m){if((m===45||js(m))&&r++<63){const p=m===45?f:h;return e.consume(m),p}return n(m)}}const ow={partial:!0,tokenize:zNe};function zNe(e,t,n){return r;function r(s){return mn(s)?kn(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||kt(s)?t(s):n(s)}}const kne={continuation:{tokenize:UNe},exit:VNe,name:"blockQuote",tokenize:$Ne};function $Ne(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return mn(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function UNe(e,t,n){const r=this;return i;function i(a){return mn(a)?kn(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(kne,t,n)(a)}}function VNe(e){e.exit("blockQuote")}const _ne={name:"characterEscape",tokenize:HNe};function HNe(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return ANe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Tne={name:"characterReference",tokenize:qNe};function qNe(e,t,n){const r=this;let i=0,s,a;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=js,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=NNe,d):(e.enter("characterReferenceValue"),s=7,a=SA,d(h))}function d(h){if(h===59&&i){const f=e.exit("characterReferenceValue");return a===js&&!IO(r.sliceSerialize(f))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<s?(e.consume(h),d):n(h)}}const kA={partial:!0,tokenize:GNe};function GNe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Nz={concrete:!0,name:"codeFenced",tokenize:WNe};function WNe(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,a=0,o;return c;function c(k){return u(k)}function u(k){const _=r.events[r.events.length-1];return s=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,o=k,e.enter("co
774deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===o?(a++,e.consume(k),d):a<3?n(k):(e.exit("codeFencedFenceSequence"),mn(k)?kn(e,h,"whitespace")(k):h(k))}function h(k){return k===null||kt(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(kA,x,S)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||kt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(k)):mn(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kn(e,m,"whitespace")(k)):k===96&&k===o?n(k):(e.consume(k),f)}function m(k){return k===null||kt(k)?h(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||kt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(k)):k===96&&k===o?n(k):(e.consume(k),p)}function x(k){return e.attempt(i,S,v)(k)}function v(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),g}function g(k){return s>0&&mn(k)?kn(e,y,"linePrefix",s+1)(k):y(k)}function y(k){return k===null||kt(k)?e.check(kA,x,S)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||kt(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),w)}function S(k){return e.exit("codeFenced"),t(k)}function C(k,_,E){let A=0;return j;function j(z){return k.enter("lineEnding"),k.consume(z),k.exit("lineEnding"),D}function D(z){return k.enter("codeFencedFence"),mn(z)?kn(k,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):M(z)}function M(z){return z===o?(k.enter("codeFencedFenceSequence"),$(z)):E(z)}function $(z){return z===o?(A++,k.consume(z),$):A>=a?(k.exit("codeFencedFenceSequence"),mn(z)?kn(k,B,"whitespace")(z):B(z)):E(z)}function B(z){return z===null||kt(z)?(k.exit("codeFencedFence"),_(z)):E(z)}}}const WT={name:"codeIndented",tokenize:KNe},YNe={partial:!0,tokenize:XNe};function KNe(e,t,n){return r;function r(o){return e.enter("codeIndented"),Cne(e,i,n,"linePrefix",4,4)(o)}function i(o){return o===null?a(o):kt(o)?e.attempt(YNe,i,a)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||kt(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),s)}function a(o){return e.exit("codeIndented"),t(o)}}function XNe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):kt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Cne(e,t,s,"linePrefix",4,4)(a)}function s(a){return kt(a)?i(a):n(a)}}const QNe={name:"codeText",previous:JNe,resolve:ZNe,tokenize:e6e};function ZNe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function JNe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function e6e(e,t,n){let r=0,i,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),r++,o):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(s=e.enter("codeTextSequence"),i=0,d(h)):kt(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||kt(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",u(h))}}class t6e{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&My(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),My(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),My(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);My(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);My(this.left,n.reverse())}}}function My(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 Ene(e){const t={};let n=-1,r,i,s,a,o,c,u;const d=new t6e(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,n6e(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return kl(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function n6e(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,c=[],u={};let d,h,f=-1,m=n,p=0,x=0;const v=[x];for(;m;){for(;e.get(++i)[1]!==m;);s.push(i),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),h&&a.defineSki
vendor: 6,111 bytes, line 774
774p(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(x=f+1,v.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):v.pop(),f=v.length;f--;){const g=o.slice(v[f],v[f+1]),y=s.pop();c.push([y,y+g.length-1]),e.splice(y,2,g)}for(c.reverse(),f=-1;++f<c.length;)u[p+c[f][0]]=p+c[f][1],p+=c[f][1]-c[f][0]-1;return u}const r6e={resolve:s6e,tokenize:a6e},i6e={partial:!0,tokenize:o6e};function s6e(e){return Ene(e),e}function a6e(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):kt(o)?e.check(i6e,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function o6e(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),kn(e,s,"linePrefix")}function s(a){if(a===null||kt(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function jne(e,t,n,r,i,s,a,o,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),f):g===null||g===32||g===41||L4(g)?n(g):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(g))}function f(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===62?(e.exit("chunkString"),e.exit(o),f(g)):g===null||g===60||kt(g)?n(g):(e.consume(g),g===92?p:m)}function p(g){return g===60||g===62||g===92?(e.consume(g),m):m(g)}function x(g){return!d&&(g===null||g===41||mr(g))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(g)):d<u&&g===40?(e.consume(g),d++,x):g===41?(e.consume(g),d--,x):g===null||g===32||g===40||L4(g)?n(g):(e.consume(g),g===92?v:x)}function v(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function Nne(e,t,n,r,i,s){const a=this;let o=0,c;return u;function u(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(s),d}function d(m){return o>999||m===null||m===91||m===93&&!c||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(s),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):kt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||kt(m)||o++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!mn(m)),m===92?f:h)}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function Ane(e,t,n,r,i,s){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,c):n(f)}function c(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),u(f))}function u(f){return f===a?(e.exit(s),c(a)):f===null?n(f):kt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),kn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===a||f===null||kt(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?h:d)}function h(f){return f===a||f===92?(e.consume(f),d):d(f)}}function X1(e,t){let n;return r;function r(i){return kt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):mn(i)?kn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const l6e={name:"definition",tokenize:u6e},c6e={partial:!0,tokenize:d6e};function u6e(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return Nne.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return i=_l(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return mr(m)?X1(e,u)(m):u(m)}function u(m){return jne(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(c6e,h,h)(m)}function h(m){return mn(m)?kn(e,f,"whitespace")(m):f(m)}function f(m){return m===null||kt(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function d6e(e,t,n){return r;function r(o){return mr(o)?X1(e,i)(o):n(o)}function i(o){return Ane(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return mn(o)?kn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||kt(o)?t(o):n(o)}}const h6e={name:"hardBreakEscape",tokenize:f6e};function f6e(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return kt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const m6e={name:"headingAtx",resolve:p6e,tokenize:g6e};function p6e(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};kl(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])}return e}function g6e(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||mr(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||kt(
vendor: 7,976 bytes, line 774
774d)?(e.exit("atxHeading"),t(d)):mn(d)?kn(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||mr(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const x6e=["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"],Az=["pre","script","style","textarea"],y6e={concrete:!0,name:"htmlFlow",resolveTo:v6e,tokenize:w6e},b6e={partial:!0,tokenize:S6e};function v6e(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function w6e(e,t,n){const r=this;let i,s,a,o,c;return u;function u(U){return d(U)}function d(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),h}function h(U){return U===33?(e.consume(U),f):U===47?(e.consume(U),s=!0,x):U===63?(e.consume(U),i=3,r.interrupt?t:R):Ws(U)?(e.consume(U),a=String.fromCharCode(U),v):n(U)}function f(U){return U===45?(e.consume(U),i=2,m):U===91?(e.consume(U),i=5,o=0,p):Ws(U)?(e.consume(U),i=4,r.interrupt?t:R):n(U)}function m(U){return U===45?(e.consume(U),r.interrupt?t:R):n(U)}function p(U){const ae="CDATA[";return U===ae.charCodeAt(o++)?(e.consume(U),o===ae.length?r.interrupt?t:M:p):n(U)}function x(U){return Ws(U)?(e.consume(U),a=String.fromCharCode(U),v):n(U)}function v(U){if(U===null||U===47||U===62||mr(U)){const ae=U===47,Ce=a.toLowerCase();return!ae&&!s&&Az.includes(Ce)?(i=1,r.interrupt?t(U):M(U)):x6e.includes(a.toLowerCase())?(i=6,ae?(e.consume(U),g):r.interrupt?t(U):M(U)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(U):s?y(U):w(U))}return U===45||js(U)?(e.consume(U),a+=String.fromCharCode(U),v):n(U)}function g(U){return U===62?(e.consume(U),r.interrupt?t:M):n(U)}function y(U){return mn(U)?(e.consume(U),y):j(U)}function w(U){return U===47?(e.consume(U),j):U===58||U===95||Ws(U)?(e.consume(U),S):mn(U)?(e.consume(U),w):j(U)}function S(U){return U===45||U===46||U===58||U===95||js(U)?(e.consume(U),S):C(U)}function C(U){return U===61?(e.consume(U),k):mn(U)?(e.consume(U),C):w(U)}function k(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),c=U,_):mn(U)?(e.consume(U),k):E(U)}function _(U){return U===c?(e.consume(U),c=null,A):U===null||kt(U)?n(U):(e.consume(U),_)}function E(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||mr(U)?C(U):(e.consume(U),E)}function A(U){return U===47||U===62||mn(U)?w(U):n(U)}function j(U){return U===62?(e.consume(U),D):n(U)}function D(U){return U===null||kt(U)?M(U):mn(U)?(e.consume(U),D):n(U)}function M(U){return U===45&&i===2?(e.consume(U),O):U===60&&i===1?(e.consume(U),P):U===62&&i===4?(e.consume(U),xe):U===63&&i===3?(e.consume(U),R):U===93&&i===5?(e.consume(U),q):kt(U)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(b6e,me,$)(U)):U===null||kt(U)?(e.exit("htmlFlowData"),$(U)):(e.consume(U),M)}function $(U){return e.check(kA,B,me)(U)}function B(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),z}function z(U){return U===null||kt(U)?$(U):(e.enter("htmlFlowData"),M(U))}function O(U){return U===45?(e.consume(U),R):M(U)}function P(U){return U===47?(e.consume(U),a="",I):M(U)}function I(U){if(U===62){const ae=a.toLowerCase();return Az.includes(ae)?(e.consume(U),xe):M(U)}return Ws(U)&&a.length<8?(e.consume(U),a+=String.fromCharCode(U),I):M(U)}function q(U){return U===93?(e.consume(U),R):M(U)}function R(U){return U===62?(e.consume(U),xe):U===45&&i===2?(e.consume(U),R):M(U)}function xe(U){return U===null||kt(U)?(e.exit("htmlFlowData"),me(U)):(e.consume(U),xe)}function me(U){return e.exit("htmlFlow"),t(U)}}function S6e(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ow,t,n)}}const C6e={name:"htmlText",tokenize:k6e};function k6e(e,t,n){const r=this;let i,s,a;return o;function o(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),c}function c(R){return R===33?(e.consume(R),u):R===47?(e.consume(R),C):R===63?(e.consume(R),w):Ws(R)?(e.consume(R),E):n(R)}function u(R){return R===45?(e.consume(R),d):R===91?(e.consume(R),s=0,p):Ws(R)?(e.consume(R),y):n(R)}function d(R){return R===45?(e.consume(R),m):n(R)}function h(R){return R===null?n(R):R===45?(e.consume(R),f):kt(R)?(a=h,P(R)):(e.consume(R),h)}function f(R){return R===45?(e.consume(R),m):h(R)}function m(R){return R===62?O(R):R===45?f(R):h(R)}function p(R){const xe="CDATA[";return R===xe.charCodeAt(s++)?(e.consume(R),s===xe.length?x:p):n(R)}function x(R){return R===null?n(R):R===93?(e.consume(R),v):kt(R)?(a=x,P(R)):(e.consume(R),x)}function v(R){return R===93?(e.consume(R),g):x(R)}function g(R){return R===62?O(R):R===93?(e.consume(R),g):x(R)}function y(R){return R===null||R===62?O(R):kt(R)?(a=y,P(R)):(e.consume(R),y)}function w(R){return R===null?n(R):R===63?(e.consume(R),S):kt(R)?(a=w,P(R)):(e.consume(R),w)}function S(R){return R===62?O(R):w(R)}function C(R){return Ws(R)?(e.consume(R),k):n(R)}function k(R){return R===45||js(R)?(e.consume(R),k):_(R)}function _(R){return kt(R)?(a=_,P(R)):mn(R)?(e.consume(R),_):O(R)}function E(R){return R===45||js(R)?(e.consume(R),E):R===47||R===62||mr(R)?A(R):n(R)}function A(R){return R===47?(e.consume(R),O):R===58||R===95||Ws(R)?(e.consume(R),j):kt(R)?(a=A,P(R)):mn(R)?(e.consume(R),A):O(R)}function j(R){return R===45||R===46||R===58||R===95||js(R)?(e.consume(R),j):D(R)}function D(R){return R===61?(e.consume(R),M):kt(R)?(a=D,P(R)):mn(R)?(e.consume(R),D):A(R)}function M(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,$):kt(R)?(a=M,P(R)):mn(R)?(e.consume(R),M):(e.consume(R),B)}function $(R){return R===i?(e.consume(R),i=void 0,z):R===null?n(R):kt(R)?(a=$,P(R)):(e.consume(R),$)}function B(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||mr(R)?A(R):(e.consume(R),B)}function z(R){return R===47||R===62||mr(R)?A(R):n(R)}function O(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function P(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),I}function I(R){return mn(R)?kn(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):q(R)}function q(R){return e.enter("htmlTextData"),a(R)}}const FO={name:"labelEnd",resolveAll:j6e,resolveTo:N6e,tokenize:A6e},_6e={tokenize:M6e},T6e={tokenize:R6e},E6e={tokenize:O6e};function j6e(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&kl(e,0,e.length,n),e}function N6e(e,t){let n=e.length,r=0,i,s,a;for(;n--;){const d=e[n][1];if(i){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;e[n][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(i=n,d.type!=="labelLink")){r=2;break}}else d.type==="labelEnd"&&(s=n)}const o={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",o,t],["enter",c,t]],a=No(a,e.slice(i+1,i+r+3)),a=No(a,[["enter",u,t]]),a=No(a,i3(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),a=No(a,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),a=No(a,e.slice(s+1)),a=No(a,[["exit",o,t]]
vendor: 4,434 bytes, line 774
774),kl(e,i,e.length,a),e}function A6e(e,t,n){const r=this,i=r._labelStarts;let s,a;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();s=i[i.length-1]}return o;function o(f){return s?s._inactive?h(f):(a=r.parser.defined.includes(_l(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(_6e,d,a?d:h)(f):f===91?e.attempt(T6e,d,a?u:h)(f):a?d(f):h(f)}function u(f){return e.attempt(E6e,d,h)(f)}function d(f){return i.pop(),t(f)}function h(f){return s._balanced=!0,n(f)}}function M6e(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return mr(h)?X1(e,s)(h):s(h)}function s(h){return h===41?d(h):jne(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return mr(h)?X1(e,c)(h):d(h)}function o(h){return n(h)}function c(h){return h===34||h===39||h===40?Ane(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return mr(h)?X1(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function R6e(e,t,n){const r=this;return i;function i(o){return Nne.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(_l(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function O6e(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const D6e={name:"labelStartImage",resolveAll:FO.resolveAll,tokenize:L6e};function L6e(e,t,n){const r=this;let i;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(c)}function o(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(c))}}const P6e={name:"labelStartLink",resolveAll:FO.resolveAll,tokenize:I6e};function I6e(e,t,n){const r=this;let i;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(o))}}const YT={name:"lineEnding",tokenize:F6e};function F6e(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),kn(e,t,"linePrefix")}}const lC={name:"thematicBreak",tokenize:B6e};function B6e(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||kt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),mn(u)?kn(e,o,"whitespace")(u):o(u))}}const oa={continuation:{tokenize:V6e},exit:q6e,name:"list",tokenize:U6e},z6e={partial:!0,tokenize:G6e},$6e={partial:!0,tokenize:H6e};function U6e(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(m){const p=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:SA(m)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(lC,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return SA(m)&&++a<10?(e.consume(m),c):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ow,r.interrupt?n:d,e.attempt(z6e,f,h))}
vendor: 4,269 bytes, line 774
774function d(m){return r.containerState.initialBlankLine=!0,s++,f(m)}function h(m){return mn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),f):n(m)}function f(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function V6e(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ow,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kn(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!mn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($6e,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,kn(e,e.attempt(oa,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function H6e(e,t,n){const r=this;return kn(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function q6e(e){e.exit(this.containerState.type)}function G6e(e,t,n){const r=this;return kn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!mn(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Mz={name:"setextUnderline",resolveTo:W6e,tokenize:Y6e};function W6e(e,t){const n=new P4;let r=e.length,i,s,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(n.add(s,0,[["enter",o,t]]),n.add(a+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[a][1].end}):e[i][1]=o,n.add(e.length,0,[["exit",o,t]]),n.consume(e),e}function Y6e(e,t,n){const r=this;let i;return s;function s(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),mn(u)?kn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||kt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const K6e={tokenize:X6e};function X6e(e){const t=this,n=e.attempt(ow,r,e.attempt(this.parser.constructs.flowInitial,i,kn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(r6e,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Q6e={resolveAll:Rne()},Z6e=Mne("string"),J6e=Mne("text");function Mne(e){return{resolveAll:Rne(e==="text"?eAe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=i[d];let f=-1;if(h)for(;++f<h.length;){const m=h[f];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function Rne(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function eAe(e,t){const n=new P4;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],s=t.sliceStream(i);let a=s.length,o=-1,c=0,u;for(;a--;){const d=s[a];
vendor: 1,944 bytes, line 774
774if(typeof d=="string"){for(o=d.length;d.charCodeAt(o-1)===32;)c++,o--;if(o)break;o=-1}else if(d===-2)u=!0,c++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const d={type:r===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:i.start._bufferIndex+o,_index:i.start._index+a,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...d.start},i.start.offset===i.end.offset?Object.assign(i,d):n.add(r,0,[["enter",d,t],["exit",d,t]])}r++}return n.consume(e),e}const tAe={42:oa,43:oa,45:oa,48:oa,49:oa,50:oa,51:oa,52:oa,53:oa,54:oa,55:oa,56:oa,57:oa,62:kne},nAe={91:l6e},rAe={[-2]:WT,[-1]:WT,32:WT},iAe={35:m6e,42:lC,45:[Mz,lC],60:y6e,61:Mz,95:lC,96:Nz,126:Nz},sAe={38:Tne,92:_ne},aAe={[-5]:YT,[-4]:YT,[-3]:YT,33:D6e,38:Tne,42:CA,60:[FNe,C6e],91:P6e,92:[h6e,_ne],93:FO,95:CA,96:QNe},oAe={null:[CA,Q6e]},lAe={null:[42,95]},cAe={null:[]},uAe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:lAe,contentInitial:nAe,disable:cAe,document:tAe,flow:iAe,flowInitial:rAe,insideSpan:oAe,string:sAe,text:aAe},Symbol.toStringTag,{value:"Module"}));function dAe(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={},s=[];let a=[],o=[];const c={attempt:_(C),check:_(k),consume:y,enter:w,exit:S,interrupt:_(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:m,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&s.push(t),u;function h(D){return a=No(a,D),v(),a[a.length-1]!==null?[]:(E(t,0),u.events=i3(s,u.events,u),u.events)}function f(D,M){return fAe(m(D),M)}function m(D){return hAe(a,D)}function p(){const{_bufferIndex:D,_index:M,line:$,column:B,offset:z}=r;return{_bufferIndex:D,_index:M,line:$,column:B,offset:z}}function x(D){i[D.line]=D.column,j()}function v(){for(;r._index<a.length;){const D=a[r._index];
vendor: 1,260 bytes, line 774
774if(typeof D=="string"){const M=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<D.length;)g(D.charCodeAt(r._bufferIndex))}else g(D)}}function g(D){d=d(D)}function y(D){kt(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,j()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function w(D,M){const $=M||{};return $.type=D,$.start=p(),u.events.push(["enter",$,u]),o.push($),$}function S(D){const M=o.pop();return M.end=p(),u.events.push(["exit",M,u]),M}function C(D,M){E(D,M.from)}function k(D,M){M.restore()}function _(D,M){return $;function $(B,z,O){let P,I,q,R;return Array.isArray(B)?me(B):"tokenize"in B?me([B]):xe(B);function xe(je){return ve;function ve(Te){const Se=Te!==null&&je[Te],He=Te!==null&&je.null,tt=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(He)?He:He?[He]:[]];return me(tt)(Te)}}function me(je){return P=je,I=0,je.length===0?O:U(je[I])}function U(je){return ve;function ve(Te){return R=A(),q=je,je.partial||(u.currentConstruct=je),je.name&&u.parser.constructs.disable.null.includes(je.name)?Ce():je.tokenize.call(M?Object.assign(Object.create(u),M):u,c,ae,Ce)(Te)}}function ae(je){return D(q,R),z}
vendor: 13,700 bytes, lines 774-776
774function Ce(je){return R.restore(),++I<P.length?U(P[I]):O}}}function E(D,M){D.resolveAll&&!s.includes(D)&&s.push(D),D.resolve&&kl(u.events,M,u.events.length-M,D.resolve(u.events.slice(M),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function A(){const D=p(),M=u.previous,$=u.currentConstruct,B=u.events.length,z=Array.from(o);return{from:B,restore:O};function O(){r=D,u.previous=M,u.currentConstruct=$,u.events.length=B,o=z,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hAe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function fAe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=` 775`;break}case-3:{a=`\r 776`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function mAe(e){const r={constructs:wne([uAe,...(e||{}).extensions||[]]),content:i(MNe),defined:[],document:i(ONe),flow:i(K6e),lazy:{},string:i(Z6e),text:i(J6e)};return r;function i(s){return a;function a(o){return dAe(r,s,o)}}}function pAe(e){for(;!Ene(e););return e}const Rz=/[\0\t\n\r]/g;function gAe(){let e=1,t="",n=!0,r;return i;function i(s,a,o){s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s));const c=[];let u=0;for(t="",n&&(s.charCodeAt(0)===65279&&u++,n=void 0);u<s.length;){Rz.lastIndex=u;const d=Rz.exec(s),h=d&&d.index!==void 0?d.index:s.length,f=s.charCodeAt(h);if(!d){t=s.slice(u);break}if(f===10&&u===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),u<h&&(c.push(s.slice(u,h)),e+=h-u),f){case 0:{c.push(65533),e++;break}case 9:{const m=Math.ceil(e/4)*4;for(c.push(-2);e++<m;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}u=h+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const xAe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yAe(e){return e.replace(xAe,bAe)}function bAe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Sne(n.slice(s?2:1),s?16:10)}return IO(n)||e}const One={}.hasOwnProperty;function vAe(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),wAe(n)(pAe(mAe(n).document().write(gAe()(e,t,!0))))}function wAe(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Tn),autolinkProtocol:j,autolinkEmail:j,atxHeading:a(mt),blockQuote:a(tt),characterEscape:j,characterReference:j,codeFenced:a(we),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(we,o),codeText:a(Oe,o),codeTextData:j,data:j,codeFlowValue:j,definition:a(Je),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(It),hardBreakEscape:a(De),hardBreakTrailing:a(De),htmlFlow:a(Pe,o),htmlFlowData:j,htmlText:a(Pe,o),htmlTextData:j,image:a(ct),label:o,link:a(Tn),listItem:a(ln),listItemValue:m,listOrdered:a(Nn,f),listUnordered:a(Nn),paragraph:a(Bn),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(mt),strong:a(Sn),thematicBreak:a(or)},exit:{atxHeading:u(),atxHeadingSequence:k,autolink:u(),autolinkEmail:He,autolinkProtocol:Se,blockQuote:u(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:je,characterReferenceMarkerNumeric:je,characterReferenceValue:ve,characterReference:Te,codeFenced:u(g),codeFencedFence:v,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:D,codeIndented:u(y),codeText:u(O),codeTextData:D,data:D,definition:u(),definitionDestinationString:C,definitionLabelString:w,definitionTitleString:S,emphasis:u(),hardBreakEscape:u($),hardBreakTrailing:u($),htmlFlow:u(B),htmlFlowData:D,htmlText:u(z),htmlTextData:D,image:u(I),label:R,labelText:q,lineEnding:M,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ce,resourceDestinationString:xe,resourceTitleString:me,resource:U,setextHeading:u(A),setextHeadingLineSequence:E,setextHeadingText:_,strong:u(),thematicBreak:u()}};Dne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ge){let Me={type:"root",children:[],position:void 0};const ut={stack:[Me],tokenStack:[],config:t,enter:c,exit:d,buffer:o,resume:h,data:n},Ct=[],yn=[];let un=-1;for(;++un<ge.length;)if(yn.push(ge[un]),ge[un][1].type==="listOrdered"||ge[un][1].type==="listUnordered")if(ge[un][0]==="enter")Ct.push(yn.length-1);else{const en=Ct.pop();s(yn,en)}for(ge=yn,un=-1;++un<ge.length;){const en=t[ge[un][0]];ge[un][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...ut,sliceSerialize:ge[un][2].sliceSerialize},ge[un][1]),One.call(en,ge[un][1].type)&&en[ge[un][1].type].call({...ut,sliceSerialize:ge[un][2].sliceSerialize},ge[un][1]),ge[un][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...ut,sliceSerialize:ge[un][2].sliceSerialize},ge[un][1])}if(ut.tokenStack.length>0){const en=ut.tokenStack[ut.tokenStack.length-1];(en[1]||Oz).call(ut,void 0,en[0])}for(Me.position={start:Ed(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:Ed(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},un=-1;++un<t.transforms.length;)Me=t.transforms[un](Me)||Me;return Me}function i(ge,Me,ut){let Ct=-1;for(;++Ct<ge.length;)ge[Ct].call(Me,ut)}function s(ge,Me){const ut=ge.length-1;let Ct=Me-1,yn=-1,un=!1,en,Rr,Ei,li;const V=[];for(;++Ct<=ut;){const ye=ge[Ct];switch(ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ye[0]==="enter"?yn++:yn--,li=void 0;break}case"lineEndingBlank":{ye[0]==="enter"&&(en&&!li&&!yn&&!Ei&&(Ei=Ct),li=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:li=void 0}if(!yn&&ye[0]==="enter"&&ye[1].type==="listItemPrefix"||yn===-1&&ye[0]==="exit"&&(ye[1].type==="listUnordered"||ye[1].type==="listOrdered")){if(en){let fe=Ct;for(Rr=void 0;fe--;){const Ne=ge[fe];if(Ne[1].type==="lineEnding"||Ne[1].type==="lineEndingBlank"){if(Ne[0]==="exit")continue;Rr&&(ge[Rr][1].type="lineEndingBlank",un=!0),Ne[1].type="lineEnding",Rr=fe}else if(!(Ne[1].type==="linePrefix"||Ne[1].type==="blockQuotePrefix"||Ne[1].type==="blockQuotePrefixWhitespace"||Ne[1].type==="blockQuoteMarker"||Ne[1].type==="listItemIndent"))break}Ei&&(!Rr||Ei<Rr)&&(en._spread=!0),en.end=Object.assign({},Rr?ge[Rr][1].start:ye[1].end),V.push({at:Rr||Ct,event:["exit",en,ye[2]]})}if(ye[1].type==="listItemPrefix"){const fe={type:"listItem",_spread:!1,start:Object.assign({},ye[1].start),end:void 0};en=fe,V.push({at:Ct,event:["enter",fe,ye[2]]}),Ei=void 0,li=!0}}}const te=ge.splice(Me);let W=0;for(Ct=-1;++Ct<te.length;){for(;W<V.length&&V[W].at===Me+Ct;)ge.push(V[W++].event);ge.push(te[Ct])}ge[Me][1]._spread=un}function a(ge,Me){return ut;function ut(Ct){c.call(this,ge(Ct),Ct),Me&&Me.call(this,Ct)}}function o(){this.stack.push({type:"fragment",children:[]})}function c(ge,Me,ut){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([Me,ut||void 0]),ge.position={start:Ed(Me.start),end:void 0}}function u(ge){return Me;function Me(ut){ge&&ge.call(this,ut),d.call(this,ut)}}function d(ge,Me){const ut=this.stack.pop(),Ct=this.tokenStack.pop();if(!Ct)throw new Error("Cannot close `"+ge.type+"` ("+K1({start:ge.start,end:ge.end})+"): itâs not open");Ct[0].type!==ge.type&&(Me?Me.call(this,ge,Ct[0]):(Ct[1]||Oz).call(this,ge,Ct[0])),ut.position.end=Ed(ge.end)}function h(){return PO(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(ge){if(this.data.expectingFirstListItemValue){const Me=this.stack[this.stack.length-2];Me.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function p(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.lang=ge}function x(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.meta=ge}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge.replace(/(\r?\n|\r)$/g,"")}function w(ge){const Me=this.resume(),ut=this.stack[this.stack.length-1];ut.label=Me,ut.identifier=_l(this.sliceSerialize(ge)).toLowerCase()}function S(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.title=ge}function C(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.url=ge}function k(ge){const Me=this.stack[this.stack.length-1];if(!Me.depth){const ut=this.sliceSerialize(ge).length;Me.depth=ut}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function E(ge){const Me=this.stack[this.stack.length-1];Me.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function j(ge){const ut=this.stack[this.stack.length-1].children;let Ct=ut[ut.length-1];(!Ct||Ct.type!=="text")&&(Ct=zr(),Ct.position={start:Ed(ge.start),end:void 0},ut.push(Ct)),this.stack.push(Ct)}function D(ge){const Me=this.stack.pop();Me.value+=this.sliceSerialize(ge),Me.position.end=Ed(ge.end)}function M(ge){const Me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ut=Me.children[Me.children.length-1];ut.position.end=Ed(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Me.type)&&(j.call(this,ge),D.call(this,ge))}function $(){this.data.atHardBreak=!0}function B(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge}function z(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge}function O(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge}function P(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const Me=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=Me,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function I(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const Me=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=Me,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function q(ge){const Me=this.sliceSerialize(ge),ut=this.stack[this.stack.length-2];ut.label=yAe(Me),ut.identifier=_l(Me).toLowerCase()}function R(){const ge=this.stack[this.stack.length-1],Me=this.resume(),ut=this.stack[this.stack.length-1];if(this.data.inReference=!0,ut.type==="link"){const Ct=ge.children;ut.children=Ct}else ut.alt=Me}function xe(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.url=ge}function me(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.title=ge}function U(){this.data.inReference=void 0}function ae(){this.data.referenceType="collapsed"}function Ce(ge){const Me=this.resume(),ut=this.stack[this.stack.length-1];ut.label=Me,ut.identifier=_l(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function je(ge){this.data.characterReferenceType=ge.type}function ve(ge){const Me=this.sliceSerialize(ge),ut=this.data.characterReferenceType;let Ct;ut?(Ct=Sne(Me,ut==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ct=IO(Me);const yn=this.stack[this.stack.length-1];yn.value+=Ct}function Te(ge){const Me=this.stack.pop();Me.position.end=Ed(ge.end)}function Se(ge){D.call(this,ge);const Me=this.stack[this.stack.length-1];Me.url=this.sliceSerialize(ge)}function He(ge){D.call(this,ge);const Me=this.stack[this.stack.length-1];Me.url="mailto:"+this.sliceSerialize(ge)}function tt(){return{type:"blockquote",children:[],position:void 0}}function we(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Oe(){return{type:"inlineCode",value:"",position:void 0}}function Je(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function It(){return{type:"emphasis",children:[],position:void 0}}function mt(){return{type:"heading",depth:0,children:[],position:void 0}}function De(){return{type:"break",position:void 0}}function Pe(){return{type:"html",value:"",position:void 0}}function ct(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Tn(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Nn(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[],position:void 0}}function ln(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[],position:void 0}}function Bn(){return{type:"paragraph",children:[],position:void 0}}function Sn(){return{type:"strong",children:[],position:void 0}}function zr(){return{type:"text",value:"",position:void 0}}function or(){return{type:"thematicBreak",position:void 0}}}function Ed(e){return{line:e.line,column:e.column,offset:e.offset}}function Dne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Dne(e,r):SAe(e,r)}}function SAe(e,t){let n;for(n in t)if(One.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"afterExit":case"beforeEnter":{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 Oz(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+K1({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+K1({start:t.start,end:t.end}
vendor: 4,537 bytes, lines 776-780
776)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+K1({start:t.start,end:t.end})+") is still open")}function CAe(e){const t=this;t.parser=n;function n(r){return vAe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function kAe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function _Ae(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 777`}]}function TAe(e,t){const n=t.value?t.value+` 778`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function EAe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jAe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NAe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qx(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const c={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(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function AAe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MAe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Lne(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function RAe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lne(e,t);const i={src:qx(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function OAe(e,t){const n={src:qx(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function DAe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function LAe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lne(e,t);const i={href:qx(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function PAe(e,t){const n={href:qx(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function IAe(e,t,n){const r=e.all(t),i=n?FAe(n):Pne(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:` 779`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:` 780`});const u={type:"element",tagName:"li",properties:s,children:a};
vendor: 3,301 bytes, line 780
780return e.patch(t,u),e.applyData(t,u)}function FAe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Pne(n[r])}return t}function Pne(e){const t=e.spread;return t??e.children.length>1}function BAe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function zAe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $Ae(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function UAe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VAe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=RO(t.children[1]),c=mne(t.children[t.children.length-1]);o&&c&&(a.position={start:o,end:c}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function HAe(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let c=-1;const u=[];for(;++c<o;){const h=t.children[c],f={},m=a?a[c]:void 0;m&&(f.align=m);let p={type:"element",tagName:s,properties:f,children:[]};h&&(p.children=e.all(h),e.patch(h,p),p=e.applyData(h,p)),u.push(p)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function qAe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Dz=9,Lz=32;function GAe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Pz(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Pz(t.slice(i),i>0,!1)),s.join("")}function Pz(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Dz||s===Lz;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Dz||s===Lz;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function WAe(e,t){const n={type:"text",value:GAe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function YAe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const KAe={blockquote:kAe,break:_Ae,code:TAe,delete:EAe,emphasis:jAe,footnoteReference:NAe,heading:AAe,html:MAe,imageReference:RAe,image:OAe,inlineCode:DAe,linkReference:LAe,link:PAe,listItem:IAe,list:BAe,paragraph:zAe,root:$Ae,strong:UAe,table:VAe,tableCell:qAe,tableRow:HAe,text:WAe,thematicBreak:YAe,toml:k2,yaml:k2,definition:k2,footnoteDefinition:k2};function k2(){}const Ine=-1,s3=0,Q1=1,F4=2,BO=3,zO=4,$O=5,UO=6,Fne=7,Bne=8,{defineProperty:XAe}=Object,zne=typeof self=="object"?self:globalThis,Iz=(e,t)=>
vendor: 4,853 bytes, lines 780-781
780{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new zne[e](t)},QAe=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case s3:case Ine:return n(a,i);case Q1:{const o=n([],i);for(const c of a)o.push(r(c));return o}case F4:{const o=n({},i);for(const[c,u]of a){const d=r(c),h=r(u);d==="__proto__"?XAe(o,d,{value:h,configurable:!0,enumerable:!0,writable:!0}):o[d]=h}return o}case BO:return n(new Date(a),i);case zO:{const{source:o,flags:c}=a;return n(new RegExp(o,c),i)}case $O:{const o=n(new Map,i);for(const[c,u]of a)o.set(r(c),r(u));return o}case UO:{const o=n(new Set,i);for(const c of a)o.add(r(c));return o}case Fne:{const{name:o,message:c}=a;return n(typeof zne[o]=="function"?Iz(o,c):new Error(c),i)}case Bne:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}case"-0":return-0}return n(Iz(s,a),i)};return r},Fz=e=>QAe(new Map,e)(0),If="",{toString:ZAe}={},{keys:JAe,is:e7e}=Object,Ry=e=>{const t=typeof e;if(t!=="object"||!e)return[s3,t];const n=ZAe.call(e).slice(8,-1);switch(n){case"Array":return[Q1,If];case"Object":return[F4,If];case"Date":return[BO,If];case"RegExp":return[zO,If];case"Map":return[$O,If];case"Set":return[UO,If];case"DataView":return[Q1,n]}return n.includes("Array")?[Q1,n]:e instanceof Error?[Fne,e.name||"Error"]:[F4,n]},_2=([e,t])=>e===s3&&(t==="function"||t==="symbol"),t7e=(e,t,n,r)=>{const i=(a,o)=>{const c=r.push(a)-1;return n.set(o,c),c},s=a=>{if(n.has(a))return n.get(a);let[o,c]=Ry(a);switch(o){case s3:{let d=a;switch(c){case"bigint":o=Bne,d=a.toString();break;case"number":if(!a&&e7e(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return i([Ine],a)}return i([o,d],a)}case Q1:{if(c){let f=a;return c==="DataView"?f=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(a)),i([c,[...f]],a)}const d=[],h=i([o,d],a);for(const f of a)d.push(s(f));return h}case F4:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],h=i([o,d],a);for(const f of JAe(a))(e||!_2(Ry(a[f])))&&d.push([s(f),s(a[f])]);return h}case BO:return i([o,isNaN(a.getTime())?If:a.toISOString()],a);case zO:{const{source:d,flags:h}=a;return i([o,{source:d,flags:h}],a)}case $O:{const d=[],h=i([o,d],a);for(const[f,m]of a)(e||!(_2(Ry(f))||_2(Ry(m))))&&d.push([s(f),s(m)]);return h}case UO:{const d=[],h=i([o,d],a);for(const f of a)(e||!_2(Ry(f)))&&d.push(s(f));return h}}const{message:u}=a;return i([o,{name:c,message:u}],a)};return s},Bz=(e,{json:t,lossy:n}={})=>{const r=[];return t7e(!(t||n),!!t,new Map,r)(e),r},B4=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Fz(Bz(e,t)):structuredClone(e):(e,t)=>Fz(Bz(e,t));function n7e(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function r7e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function i7e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||n7e,r=e.options.footnoteBackLabel||r7e,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),f=qx(h.toLowerCase());let m=0;const p=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++m<=x;){p.length>0&&p.push({type:"text",value:" "});let y=typeof n=="string"?n:n(c,m);typeof y=="string"&&(y={type:"text",value:y}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...p)}else d.push(...p);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,g),o.push(g)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...B4(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` 781`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)}
vendor: 22,598 bytes, lines 781-786
781,{type:"text",value:` 782`}]}}const lw=function(e){if(e==null)return l7e;if(typeof e=="function")return a3(e);if(typeof e=="object")return Array.isArray(e)?s7e(e):a7e(e);if(typeof e=="string")return o7e(e);throw new Error("Expected function, string, or object as test")};function s7e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lw(e[n]);return a3(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function a7e(e){const t=e;return a3(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function o7e(e){return a3(t);function t(n){return n&&n.type===e}}function a3(e){return t;function t(n,r,i){return!!(c7e(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function l7e(){return!0}function c7e(e){return e!==null&&typeof e=="object"&&"type"in e}const $ne=[],u7e=!0,_A=!1,Une="skip";function VO(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=lw(i),a=r?-1:1;o(e,void 0,[])();function o(c,u,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=$ne,p,x,v;if((!t||s(c,u,d[d.length-1]||void 0))&&(m=d7e(n(c,d)),m[0]===_A))return m;if("children"in c&&c.children){const g=c;if(g.children&&m[0]!==Une)for(x=(r?g.children.length:-1)+a,v=d.concat(g);x>-1&&x<g.children.length;){const y=g.children[x];if(p=o(y,x,v)(),p[0]===_A)return p;x=typeof p[1]=="number"?p[1]:x+a}}return m}}}function d7e(e){return Array.isArray(e)?e:typeof e=="number"?[u7e,e]:e==null?$ne:[e]}function HO(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),VO(e,s,o,i);function o(c,u){const d=u[u.length-1],h=d?d.children.indexOf(c):void 0;return a(c,h,d)}}const TA={}.hasOwnProperty,h7e={};function f7e(e,t){const n=t||h7e,r=new Map,i=new Map,s=new Map,a={...KAe,...n.handlers},o={all:u,applyData:p7e,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:n,patch:m7e,wrap:x7e};return HO(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,f=String(d.identifier).toUpperCase();h.has(f)||h.set(f,d)}}),o;function c(d,h){const f=d.type,m=o.handlers[f];if(TA.call(o.handlers,f)&&m)return m(o,d,h);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in d){const{children:x,...v}=d,g=B4(v);return g.children=o.all(d),g}return B4(d)}return(o.options.unknownHandler||g7e)(o,d,h)}function u(d){const h=[];if("children"in d){const f=d.children;let m=-1;for(;++m<f.length;){const p=o.one(f[m],d);if(p){if(m&&f[m-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=zz(p.value)),!Array.isArray(p)&&p.type==="element")){const x=p.children[0];x&&x.type==="text"&&(x.value=zz(x.value))}Array.isArray(p)?h.push(...p):h.push(p)}}}return h}}function m7e(e,t){e.position&&(t.position=rNe(e))}function p7e(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,B4(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function g7e(e,t){const n=t.data||{},r="value"in t&&!(TA.call(n,"hProperties")||TA.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function x7e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 783`});++r<e.length;)r&&n.push({type:"text",value:` 784`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 785`}),n}function zz(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $z(e,t){const n=f7e(e,t),r=n.one(e,void 0),i=i7e(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:` 786`},i),s}function y7e(e,t){return e&&"run"in e?async function(n,r){const i=$z(n,{file:r,...t});await e.run(i,r)}:function(n,r){return $z(n,{file:r,...e||t})}}function Uz(e){if(e)throw e}var cC=Object.prototype.hasOwnProperty,Vne=Object.prototype.toString,Vz=Object.defineProperty,Hz=Object.getOwnPropertyDescriptor,qz=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Vne.call(t)==="[object Array]"},Gz=function(t){if(!t||Vne.call(t)!=="[object Object]")return!1;var n=cC.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&cC.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||cC.call(t,i)},Wz=function(t,n){Vz&&n.name==="__proto__"?Vz(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Yz=function(t,n){if(n==="__proto__")if(cC.call(t,n)){if(Hz)return Hz(t,n).value}else return;return t[n]},b7e=function e(){var t,n,r,i,s,a,o=arguments[0],c=1,u=arguments.length,d=!1;for(typeof o=="boolean"&&(d=o,o=arguments[1]||{},c=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=Yz(o,n),i=Yz(t,n),o!==i&&(d&&i&&(Gz(i)||(s=qz(i)))?(s?(s=!1,a=r&&qz(r)?r:[]):a=r&&Gz(r)?r:{},Wz(o,{name:n,newValue:e(d,a,i)})):typeof i<"u"&&Wz(o,{name:n,newValue:i}));return o};const KT=dx(b7e);function EA(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function v7e(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(c,...u){const d=e[++s];let h=-1;if(c){a(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?w7e(d,o)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function w7e(e,t){let n;return r;function r(...a){const o=e.length>a.length;let c;o&&a.push(i);try{c=e.apply(this,a)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Bl={basename:S7e,dirname:C7e,extname:k7e,join:_7e,sep:"/"};function S7e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cw(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function C7e(e){if(cw(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function k7e(e){cw(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function _7e(...e){let t=-1,n;for(;++t<e.length;)cw(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":T7e(n)}function T7e(e){cw(e);const t=e.codePointAt(0)===47;let n=E7e(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function E7e(e,t){let n="",r=0,i=-1,s=0,a=-1,o,c;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function cw(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const j7e={cwd:N7e};function N7e(){return"/"}function jA(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function A7e(e){if(typeof e=="string")e=new URL(e);else if(!jA(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return M7e(e)}function M7e(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const XT=["history","path","basename","stem","extname","dirname"];class Hne{constructor(t){let n;t?jA(t)?n={path:t}:typeof t=="string"||R7e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":j7e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<XT.length;){const s=XT[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)XT.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Bl.basename(this.path):void 0}set basename(t){ZT(t,"basename"),QT(t,"basename"),this.path=Bl.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Bl.dirname(this.path):void 0}set dirname(t){Kz(this.basename,"dirname"),this.path=Bl.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Bl.extname(this.path):void 0}set extname(t){if(QT(t,"extname"),Kz(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Bl.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jA(t)&&(t=A7e(t)),ZT(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Bl.basename(this.path,this.extname):void 0}set stem(t){ZT(t,"stem"),QT(t,"stem"),this.path=Bl.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ls(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function QT(e,t){if(e&&e.includes(Bl.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Bl.sep+"`")}function ZT(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Kz(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function R7e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const O7e=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},D7e={}.hasOwnProperty;class qO extends O7e{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=v7e()}copy(){const t=new qO;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(KT(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(tE("data",this.frozen),this.namespace[t]=n,this):D7e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(tE("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=T2(t),r=this.parser||this.Parser;return JT("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),JT("process",this.parser||this.Parser),eE("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=T2(t),c=r.parse(o);r.run(c,o,function(d,h,f){if(d||!h||!f)return u(d);const m=h,p=r.stringify(m,f);I7e(p)?f.value=p:f.result=p,u(d,f)});function u(d,h){d||!h?a(d):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),JT("processSync",this.parser||this.Parser),eE("processSync",this.compiler||this.Compiler),this.process(t,i),Qz("processSync","process",n),r;function i(s,a){n=!0,Uz(s),r=a}}run(t,n,r){Xz(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const c=T2(n);i.run(t,c,u);function u(d,h,f){const m=h||t;d?o(d):a?a(m):r(void 0,m,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Qz("runSync","run",r),i;function s(a,o){Uz(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=T2(n),i=this.compiler||this.Compiler;return eE("stringify",i),Xz(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(tE("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;c(d,h)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(i.settings=KT(!0,i.settings,u.settings))}function o(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];s(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let h=-1,f=-1;for(;++h<r.length;)if(r[h][0]===u){f=h;break}if(f===-1)r.push([u,...d]);else if(d.length>0){let[m,...p]=d;const x=r[f][1];EA(x)&&EA(m)&&(m=KT(!0,x,m)),r[f]=[u,m,...p]}}}}const L7e=new qO().freeze();function JT(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function eE(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tE(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 Xz(e){if(!EA(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Qz(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function T2(e){return P7e(e)?e:new Hne(e)}function P7e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function I7e(e){return typeof e=="string"||F7e(e)}function F7e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const B7e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zz=[],Jz={allowDangerousHtml:!0},z7e=/^(https?|ircs?|mailto|xmpp)$/i,$7e=[{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 qne(e){const t=U7e(e),n=V7e(e);return H7e(t.runSync(t.parse(n),n),e)}function U7e(e){const t=e.rehypePlugins||Zz,n=e.remarkPlugins||Zz,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Jz}:Jz;return L7e().use(CAe).use(n).use(y7e,r).use(t)}function V7e(e){const t=e.children||"",n=new Hne;return typeof t=="string"&&(n.value=t),n}function H7e(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,c=t.urlTransform||q7e;for(const d of $7e)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+B7e+d.id,void 0);return HO(e,u),lNe(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function u(d,h,f){if(d.type==="raw"&&f&&typeof h=="number")return a?f.children.splice(h,1):f.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let m;for(m in GT)if(Object.hasOwn(GT,m)&&Object.hasOwn(d.properties,m)){const p=d.properties[m],x=GT[m];(x===null||x.includes(d.tagName))&&(d.properties[m]=c(String(p||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(d,h,f)),m&&f&&typeof h=="number")return o&&d.children?f.children.splice(h,1,...d.children):f.children.splice(h,1),h}}}function q7e(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||z7e.test(e.slice(0,t))?e:""}function e$(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function G7e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function W7e(e,t,n){const i=lw((n||{}).ignore||[]),s=Y7e(t);let a=-1;for(;++a<s.length;)VO(e,"text",o);function o(u,d){let h=-1,f;for(;++h<d.length;){const m=d[h],p=f?f.children:void 0;if(i(m,p?p.indexOf(m):void 0,f))return;f=m}if(f)return c(u,d)}function c(u,d){const h=d[d.length-1],f=s[a][0],m=s[a][1];let p=0;const v=h.children.indexOf(u);let g=!1,y=[];f.lastIndex=0;let w=f.exec(u.value);for(;w;){const C=w.index,k={index:w.index,input:w.input,stack:[...d,u]};let _=m(...w,k);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1)f.lastIndex=C+1;else{if(p!==C&&S({type:"text",value:u.value.slice(p,C)}),Array.isArray(_))for(const E of _)S(E);else _&&S(_);p=C+w[0].length,g=!0}if(!f.global)break;w=f.exec(u.value)}return g?(p<u.value.length&&S({type:"text",value:u.value.slice(p)}),h.children.splice(v,1,...y)):y=[u],v+y.length;function S(C){const k=y[y.length-1];k&&k.type==="text"&&C.type==="text"?k.value+=C.value:y.push(C)}}}function Y7e(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([K7e(i[0]),X7e(i[1])])}return t}function K7e(e){return typeof e=="string"?new RegExp(G7e(e),"g"):e}function X7e(e){return typeof e=="function"?e:function(){return e}}const nE="phrasing",rE=["autolink","link","image","label"];function Q7e(){return{transforms:[i8e],enter:{literalAutolink:J7e,literalAutolinkEmail:iE,literalAutolinkHttp:iE,literalAutolinkWww:iE},exit:{literalAutolink:r8e,literalAutolinkEmail:n8e,literalAutolinkHttp:e8e,literalAutolinkWww:t8e}}}function Z7e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nE,notInConstruct:rE},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nE,notInConstruct:rE},{character:":",before:"[ps]",after:"\\/",inConstruct:nE,notInConstruct:rE}]}}function J7e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function iE(e){this.config.enter.autolinkProtocol.call(this,e)}function e8e(e){this.config.exit.autolinkProtocol.call(this,e)}function t8e(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 n8e(e){this.config.exit.autolinkEmail.call(this,e)}function r8e(e){this.exit(e)}function i8e(e){W7e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,s8e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),a8e]],{ignore:["link","linkReference"]})}function s8e(e,t,n,r,i){let s="";if(!Gne(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!o8e(n)))return!1;const a=l8e(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function a8e(e,t,n,r){return!Gne(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function o8e(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function l8e(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=e$(e,"(");let s=e$(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Gne(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Hm(n)||r3(n))&&(!t||n!==47)}Wne.peek=x8e;function c8e(){this.buffer()}function u8e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function d8e(){this.buffer()}
vendor: 4,934 bytes, lines 786-790
786function h8e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function f8e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_l(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m8e(e){this.exit(e)}function p8e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_l(this.sliceSerialize(e)).toLowerCase(),n.label=t}function g8e(e){this.exit(e)}function x8e(){return"["}function Wne(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function y8e(){return{enter:{gfmFootnoteCallString:c8e,gfmFootnoteCall:u8e,gfmFootnoteDefinitionLabelString:d8e,gfmFootnoteDefinition:h8e},exit:{gfmFootnoteCallString:f8e,gfmFootnoteCall:m8e,gfmFootnoteDefinitionLabelString:p8e,gfmFootnoteDefinition:g8e}}}function b8e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wne},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let c=o.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return c+=o.move(s.safe(s.associationId(r),{before:c,after:"]"})),d(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?` 787`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Yne:v8e))),u(),c}}function v8e(e,t,n){return t===0?e:Yne(e,t,n)}function Yne(e,t,n){return(n?"":" ")+e}const w8e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];GO.attention=T8e;GO.peek=E8e;function S8e(){return{canContainEols:["delete"],enter:{strikethrough:k8e},exit:{strikethrough:_8e}}}function C8e(){return{handlers:{delete:GO},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:w8e}]}}function k8e(e){this.enter({type:"delete",children:[],position:void 0},e)}function _8e(e){this.exit(e)}function GO(e,t,n,r){const i=n.createTracker(r),s=n.stack.includes("strikethrough")?"~":"~~",a=n.enter("strikethrough");let o=i.move(s);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move(s),a(),o}function T8e(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function E8e(){return"~"}function j8e(e){return e.length}function N8e(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||j8e,s=[],a=[],o=[],c=[];let u=0,d=-1;for(;++d<e.length;){const x=[],v=[];let g=-1;for(e[d].length>u&&(u=e[d].length);++g<e[d].length;){const y=A8e(e[d][g]);if(n.alignDelimiters!==!1){const w=i(y);v[g]=w,(c[g]===void 0||w>c[g])&&(c[g]=w)}x.push(y)}a[d]=x,o[d]=v}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)s[h]=t$(r[h]);else{const x=t$(r);for(;++h<u;)s[h]=x}h=-1;const f=[],m=[];for(;++h<u;){const x=s[h];let v="",g="";x===99?(v=":",g=":"):x===108?v=":":x===114&&(g=":");let y=n.alignDelimiters===!1?1:Math.max(1,c[h]-v.length-g.length);const w=v+"-".repeat(y)+g;n.alignDelimiters!==!1&&(y=v.length+y+g.length,y>c[h]&&(c[h]=y),m[h]=y),f[h]=w}a.splice(1,0,f),o.splice(1,0,m),d=-1;const p=[];for(;++d<a.length;){const x=a[d],v=o[d];h=-1;const g=[];for(;++h<u;){const y=x[h]||"";let w="",S="";if(n.alignDelimiters!==!1){const C=c[h]-(v[h]||0),k=s[h];k===114?w=" ".repeat(C):k===99?C%2?(w=" ".repeat(C/2+.5),S=" ".repeat(C/2-.5)):(w=" ".repeat(C/2),S=w):S=" ".repeat(C)}n.delimiterStart!==!1&&!h&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||h)&&g.push(" "),n.alignDelimiters!==!1&&g.push(w),g.push(y),n.alignDelimiters!==!1&&g.push(S),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&g.push("|")}p.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return p.join(` 788`)}function A8e(e){return e==null?"":String(e)}function t$(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const M8e=lw(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function R8e(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),O8e);return i(),a}function O8e(e,t,n){return">"+(n?"":" ")+e}function D8e(e,t){return n$(e,t.inConstruct,!0)&&!n$(e,t.notInConstruct,!1)}function n$(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function r$(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const s=n.unsafe[i];if(s.character===` 789`&&!s.before&&!s.after&&D8e(n.stack,s))return/[\t ]/.test(r.before)?"":" "}return`\\ 790`}function Kne(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>
vendor: 5,970 bytes, lines 790-799
790a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function L8e(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function P8e(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function I8e(e,t,n,r){const i=P8e(n),s=e.value||"";if(L8e(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(s,F8e);return h(),f}const a=n.createTracker(r),o=i.repeat(Math.max(Kne(s,i)+1,3)),c=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let d=a.move(o);if(e.lang){const h=n.enter(`codeFencedLang${u}`);d+=a.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${u}`);d+=a.move(" "),d+=a.move(n.safe(e.meta,{before:d,after:` 791`,encode:["`"],...a.current()})),h()}return d+=a.move(` 792`),s&&(d+=a.move(s+` 793`)),d+=a.move(o),c(),d}function F8e(e,t,n){return(n?"":" ")+e}function WO(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 B8e(e,t,n,r){const i=WO(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":` 794`,...c.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),o()),a(),u}function z8e(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}YO.attention=$8e;YO.peek=U8e;function YO(e,t,n,r){const i=n.enter("phrasing"),s=n.containerPhrasing({type:"root",children:[e]},r);return i(),s}function $8e(e,t){return{construct:"emphasis",markers:z8e(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function U8e(e,t,n){return n.options.emphasis||"*"}function V8e(e){return"&#x"+e.toString(16).toUpperCase()+";"}function H8e(e,t){let n=!1;return HO(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,_A}),!!((!e.depth||e.depth<3)&&PO(e)&&(t.options.setext||n))}function q8e(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(H8e(e,n)){const h=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:` 795`,after:` 796`});return f(),h(),m+` 797`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` 798`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),c=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:` 799`,...s.current()});const d=u.charCodeAt(0);return(d===9||d===32)&&(u=V8e(d)+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),o(),u}Xne.peek=G8e;function Xne(e){return e.value||""}function G8e(){return"<"}Qne.peek=W8e;function Qne(e,t,n,r){const i=WO(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),o()),u+=c.move(")"),a(),u}function W8e(){return"!"}Zne.peek=Y8e;function Zne(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const u=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=n.stack;n.stack=d.filter(function(f){return f!=="phrasing"}),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==h?c+=o.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Y8e(){return"!"}Jne.peek=K8e;function Jne(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);if(!a.atBreak)continue;let c;for(;c=o.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function K8e(){return"`"}function ere(e,t){const n=PO(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}tre.peek=X8e;function tre(e,t,n,r){const i=WO(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);if(ere(e,n)){const d=n.stack;n.stack=d.filter(function(m){return m!=="phrasing"});const h=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),h(),n.stack=d,f}const o=n.enter("link");let c=n.enter("label"),u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}
vendor: 2,550 bytes, line 799
799))),c(),e.title&&(c=n.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),c()),u+=a.move(")"),o(),u}function X8e(e,t,n){return ere(e,n)?"<":"["}nre.peek=Q8e;function nre(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=n.stack;n.stack=d.filter(function(f){return f!=="phrasing"}),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==h?c+=o.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Q8e(){return"["}function KO(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 Z8e(e){const t=KO(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function J8e(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function rre(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function eMe(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?J8e(n):KO(n);const o=e.ordered?a==="."?")":".":Z8e(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),rre(n)===a&&d){let h=-1;for(;++h<e.children.length;){const f=e.children[h];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),u}function tMe(e){const t=e.options.listItemIndent||"one";
vendor: 5,549 bytes, lines 799-801
799if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nMe(e,t,n,r){const i=tMe(n);let s=n.bulletCurrent||KO(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),d);return c(),u;function d(h,f,m){return f?(m?"":" ".repeat(a))+h:(m?s:s+" ".repeat(a-s.length))+h}}function rMe(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}function iMe(e,t,n,r){if(!e.children.some(function(o){return M8e(o)}))return n.containerFlow(e,r);const s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),a}function sMe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}XO.attention=aMe;XO.peek=oMe;function XO(e,t,n,r){const i=n.enter("phrasing"),s=n.containerPhrasing({type:"root",children:[e]},r);return i(),s}function aMe(e,t){return{construct:"strong",markers:sMe(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function oMe(e,t,n){return n.options.strong||"*"}function lMe(e,t,n,r){const i=t?t.children:[],s=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[s+1],beforeNode:i[s-1]})}function cMe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function uMe(e,t,n){const r=(rre(n)+(n.options.ruleSpaces?" ":"")).repeat(cMe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ire={blockquote:R8e,break:r$,code:I8e,definition:B8e,emphasis:YO,hardBreak:r$,heading:q8e,html:Xne,image:Qne,imageReference:Zne,inlineCode:Jne,link:tre,linkReference:nre,list:eMe,listItem:nMe,paragraph:rMe,root:iMe,strong:XO,text:lMe,thematicBreak:uMe};function dMe(){return{enter:{table:hMe,tableData:i$,tableHeader:i$,tableRow:mMe},exit:{codeText:pMe,table:fMe,tableData:sE,tableHeader:sE,tableRow:sE}}}function hMe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function fMe(e){this.exit(e),this.data.inTable=void 0}function mMe(e){this.enter({type:"tableRow",children:[]},e)}function sE(e){this.exit(e)}function i$(e){this.enter({type:"tableCell",children:[]},e)}function pMe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gMe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gMe(e,t){return t==="|"?t:e}function xMe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 800`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:c,tableRow:o}};function a(m,p,x,v){return u(d(m,x,v),m.align)}function o(m,p,x,v){const g=h(m,x,v),y=u([g]);return y.slice(0,y.indexOf(` 801`))}function c(m,p,x,v){const g=x.enter("tableCell"),y=x.enter("phrasing"),w=x.containerPhrasing(m,{...v,before:s,after:s});return y(),g(),w}function u(m,p){return N8e(m,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function d(m,p,x){const v=m.children;let g=-1;const y=[],w=p.enter("table");for(;++g<v.length;)y[g]=h(v[g],p,x);return w(),y}function h(m,p,x){const v=m.children;let g=-1;const y=[],w=p.enter("tableRow");for(;++g<v.length;)y[g]=c(v[g],m,p,x);return w(),y}function f(m,p,x){let v=ire.inlineCode(m,p,x);return x.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function yMe(){return{exit:{taskListCheckValueChecked:s$,taskListCheckValueUnchecked:s$,paragraph:vMe}}}function bMe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wMe}}}function s$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function vMe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function wMe(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let c=ire.listItem(e,t,n,{...r,...o.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+a}}function SMe(){return[Q7e(),y8e(),S8e(),dMe(),yMe()]}function CMe(e){return{extensions:[Z7e(),b8e(e),C8e(),xMe(e),bMe()]}}const kMe={tokenize:AMe,partial:!0},sre={tokenize:MMe,partial:!0},are={tokenize:RMe,partial:!0},ore={tokenize:OMe,partial:!0},_Me={tokenize:DMe,partial:!0},lre={name:"wwwAutolink",tokenize:jMe,previous:ure},cre={name:"protocolAutolink",tokenize:NMe,previous:dre}
vendor: 7,413 bytes, line 801
801,dd={name:"emailAutolink",tokenize:EMe,previous:hre},Ac={};function TMe(){return{text:Ac}}let Tf=48;for(;Tf<123;)Ac[Tf]=dd,Tf++,Tf===58?Tf=65:Tf===91&&(Tf=97);Ac[43]=dd;Ac[45]=dd;Ac[46]=dd;Ac[95]=dd;Ac[72]=[dd,cre];Ac[104]=[dd,cre];Ac[87]=[dd,lre];Ac[119]=[dd,lre];function EMe(e,t,n){const r=this;let i,s;return a;function a(h){return!NA(h)||!hre.call(r,r.previous)||QO(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return NA(h)?(e.consume(h),o):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(_Me,d,u)(h):h===45||h===95||js(h)?(s=!0,e.consume(h),c):d(h)}function u(h){return e.consume(h),i=!0,c}function d(h){return s&&i&&Ws(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function jMe(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!ure.call(r,r.previous)||QO(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kMe,e.attempt(sre,e.attempt(are,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function NMe(e,t,n){const r=this;let i="",s=!1;return a;function a(h){return(h===72||h===104)&&dre.call(r,r.previous)&&!QO(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),o):n(h)}function o(h){if(Ws(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),s?u:(s=!0,c)):n(h)}function u(h){return h===null||L4(h)||mr(h)||Hm(h)||r3(h)?n(h):e.attempt(sre,e.attempt(are,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function AMe(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function MMe(e,t,n){let r,i,s;return a;function a(u){return u===46||u===95?e.check(ore,c,o)(u):u===null||mr(u)||Hm(u)||u!==45&&r3(u)?c(u):(s=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function c(u){return i||r||!s?n(u):t(u)}}function RMe(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(ore,t,s)(a):a===null||mr(a)||Hm(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function OMe(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||mr(o)||Hm(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||mr(o)||Hm(o)?t(o):r(o)}function s(o){return Ws(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Ws(o)?(e.consume(o),a):n(o)}}function DMe(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return js(s)?n(s):t(s)}}function ure(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mr(e)}function dre(e){return!Ws(e)}function hre(e){return!(e===47||NA(e))}function NA(e){return e===43||e===45||e===46||e===95||js(e)}function QO(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const LMe={tokenize:VMe,partial:!0};function PMe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zMe,continuation:{tokenize:$Me},exit:UMe}},text:{91:{name:"gfmFootnoteCall",tokenize:BMe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:IMe,resolveTo:FMe}}}}function IMe(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return n(c);const u=_l(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function FMe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function BMe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!a||h===null||h===91||mr(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(_l(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return mr(h)||(a=!0),s++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,u):u(h)}}function zMe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return c;function c(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(p)}function d(p){if(a>999||p===93&&!o||p===null||p===91||mr(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=_l(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return mr(p)||(o=!0),a++,e.consume(p),p===92?h:d}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}function f(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),kn(e,m,"gfmFootnoteDefinitionWhitespace")):n(p)}function m(p){return t(p)}}function $Me(e,t,n){return e.check(ow,t,e.attempt(LMe,t,n))}function UMe(e){e.exit("gfmFootnoteDefinition")}
vendor: 5,740 bytes, line 801
801function VMe(e,t,n){const r=this;return kn(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function HMe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},h={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},f=[["enter",d,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",h,o]],m=o.parser.constructs.insideSpan.null;m&&kl(f,f.length,0,i3(m,a.slice(u+1,c),o)),kl(f,f.length,0,[["exit",h,o],["enter",a[c][1],o],["exit",a[c][1],o],["exit",d,o]]),kl(a,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function s(a,o,c){const u=this.previous,d=this.events;let h=0;return f;function f(p){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(p):(a.enter("strikethroughSequenceTemporary"),m(p))}function m(p){const x=I4(u);if(p===126)return h>1?c(p):(a.consume(p),h++,m);if(h<2&&!n)return c(p);const v=a.exit("strikethroughSequenceTemporary"),g=I4(p);return v._open=!g||g===2&&!!x,v._close=!x||x===2&&!!g,o(p)}}}class qMe{constructor(){this.map=[],this.index=new Map}add(t,n,r){GMe(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}}function GMe(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}function WMe(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function YMe(){return{flow:{null:{name:"table",tokenize:KMe,resolveAll:XMe}}}}function KMe(e,t,n){const r=this;let i=0,s=0,a;return o;function o(j){let D=r.events.length-1;for(;D>-1;){const{type:B}=r.events[D][1];if(B==="lineEnding"||B==="linePrefix")D--;else break}const M=D>-1?r.events[D][1].type:null,$=M==="tableHead"||M==="tableRow"?k:c;return $===k&&r.parser.lazy[r.now().line]?n(j):$(j)}function c(j){return e.enter("tableHead"),e.enter("tableRow"),u(j)}function u(j){return j===124||(a=!0,s+=1),d(j)}function d(j){return j===null?n(j):kt(j)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),m):n(j):mn(j)?kn(e,d,"whitespace")(j):(s+=1,a&&(a=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(j)))}function h(j){return j===null||j===124||mr(j)?(e.exit("data"),d(j)):(e.consume(j),j===92?f:h)}function f(j){return j===92||j===124?(e.consume(j),h):h(j)}function m(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,mn(j)?kn(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):p(j))}function p(j){return j===45||j===58?v(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),x):C(j)}function x(j){return mn(j)?kn(e,v,"whitespace")(j):v(j)}function v(j){return j===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),g):j===45?(s+=1,g(j)):j===null||kt(j)?S(j):C(j)}function g(j){return j===45?(e.enter("tableDelimiterFiller"),y(j)):C(j)}function y(j){return j===45?(e.consume(j),y):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(j))}function w(j){return mn(j)?kn(e,S,"whitespace")(j):S(j)}function S(j){return j===124?p(j):j===null||kt(j)?!a||i!==s?C(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):C(j)}function C(j){return n(j)}function k(j){return e.enter("tableRow"),_(j)}function _(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),_):j===null||kt(j)?(e.exit("tableRow"),t(j)):mn(j)?kn(e,_,"whitespace")(j):(e.enter("data"),E(j))}function E(j){return j===null||j===124||mr(j)?(e.exit("data"),_(j)):(e.consume(j),j===92?A:E)}function A(j){return j===92||j===124?(e.consume(j),E):E(j)}}function XMe(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,d,h;const f=new qMe;for(;++n<e.length;){const m=e[n],p=m[1];m[0]==="enter"?p.type==="tableHead"?(o=!1,c!==0&&(a$(f,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(n,0,[["enter",u,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)}
vendor: 15,552 bytes, lines 801-805
801,f.add(n,0,[["enter",d,t]])),i=p.type==="tableDelimiterRow"?2:d?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=E2(f,t,s,i,void 0,h),s=[0,0,0,0]),a[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],h=E2(f,t,s,i,void 0,h)),s=a,a=[s[1],n,0,0])):p.type==="tableHead"?(o=!0,c=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(c=n,s[1]!==0?(a[0]=a[1],h=E2(f,t,s,i,n,h)):a[1]!==0&&(h=E2(f,t,a,i,n,h)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&a$(f,t,c,u,d),f.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=WMe(t.events,n))}return e}function E2(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},t0(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const c=t0(t.events,n[1]);if(s={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=t0(t.events,n[2]),d=t0(t.events,n[3]),h={type:o,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const f=t.events[n[2]],m=t.events[n[3]];if(f[1].end=Object.assign({},m[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,x=n[3]-n[2]-1;e.add(p,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},t0(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function a$(e,t,n,r,i){const s=[],a=t0(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function t0(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const QMe={name:"tasklistCheck",tokenize:JMe};function ZMe(){return{text:{91:QMe}}}function JMe(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),s)}function s(c){return mr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return kt(c)?t(c):mn(c)?e.check({tokenize:eRe},t,n)(c):n(c)}}function eRe(e,t,n){return kn(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function tRe(e){return wne([TMe(),PMe(),HMe(e),YMe(),ZMe()])}const nRe={};function rRe(e){const t=this,n=e||nRe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(tRe(n)),s.push(SMe()),a.push(CMe(n))}function iRe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:o,mathText:a,mathTextData:o}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function t(){this.buffer()}function n(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const h=d.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function s(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function sRe(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` 802`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(s,a,o,c){const u=s.value||"",d=o.createTracker(c),h="$".repeat(Math.max(Kne(u,"$")+1,2)),f=o.enter("mathFlow");let m=d.move(h);if(s.meta){const p=o.enter("mathFlowMeta");m+=d.move(o.safe(s.meta,{after:` 803`,before:m,encode:["$"],...d.current()})),p()}return m+=d.move(` 804`),u&&(m+=d.move(u+` 805`)),m+=d.move(h),f(),m}function r(s,a,o){let c=s.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let h=-1;for(;++h<o.unsafe.length;){const f=o.unsafe[h];if(!f.atBreak)continue;const m=o.compilePattern(f);let p;for(;p=m.exec(c);){let x=p.index;c.codePointAt(x)===10&&c.codePointAt(x-1)===13&&x--,c=c.slice(0,x)+" "+c.slice(p.index+1)}}return d+c+d}function i(){return"$"}}const aRe={tokenize:oRe,concrete:!0,name:"mathFlow"},o$={tokenize:lRe,partial:!0};function oRe(e,t,n){const r=this,i=r.events[r.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let a=0;return o;function o(y){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),c(y)}function c(y){return y===36?(e.consume(y),a++,c):a<2?n(y):(e.exit("mathFlowFenceSequence"),kn(e,u,"whitespace")(y))}function u(y){return y===null||kt(y)?h(y):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===null||kt(y)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),h(y)):y===36?n(y):(e.consume(y),d)}function h(y){return e.exit("mathFlowFence"),r.interrupt?t(y):e.attempt(o$,f,v)(y)}function f(y){return e.attempt({tokenize:g,partial:!0},v,m)(y)}function m(y){return(s?kn(e,p,"linePrefix",s+1):p)(y)}function p(y){return y===null?v(y):kt(y)?e.attempt(o$,f,v)(y):(e.enter("mathFlowValue"),x(y))}function x(y){return y===null||kt(y)?(e.exit("mathFlowValue"),p(y)):(e.consume(y),x)}function v(y){return e.exit("mathFlow"),t(y)}function g(y,w,S){let C=0;return kn(y,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function k(A){return y.enter("mathFlowFence"),y.enter("mathFlowFenceSequence"),_(A)}function _(A){return A===36?(C++,y.consume(A),_):C<a?S(A):(y.exit("mathFlowFenceSequence"),kn(y,E,"whitespace")(A))}function E(A){return A===null||kt(A)?(y.exit("mathFlowFence"),w(A)):S(A)}}}function lRe(e,t,n){const r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function cRe(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:r,resolve:uRe,previous:dRe,name:"mathText"};function r(i,s,a){let o=0,c,u;return d;function d(x){return i.enter("mathText"),i.enter("mathTextSequence"),h(x)}function h(x){return x===36?(i.consume(x),o++,h):o<2&&!n?a(x):(i.exit("mathTextSequence"),f(x))}function f(x){return x===null?a(x):x===36?(u=i.enter("mathTextSequence"),c=0,p(x)):x===32?(i.enter("space"),i.consume(x),i.exit("space"),f):kt(x)?(i.enter("lineEnding"),i.consume(x),i.exit("lineEnding"),f):(i.enter("mathTextData"),m(x))}function m(x){return x===null||x===32||x===36||kt(x)?(i.exit("mathTextData"),f(x)):(i.consume(x),m)}function p(x){return x===36?(i.consume(x),c++,p):c===o?(i.exit("mathTextSequence"),i.exit("mathText"),s(x)):(u.type="mathTextData",m(x))}}}function uRe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="mathTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function dRe(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function hRe(e){return{flow:{36:aRe},text:{36:cRe(e)}}}class Ve extends Error{constructor(t,n){var r="KaTeX parse error: "+t,i,s,a=n&&n.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var c=o.slice(i,s).replace(/[^]/g,"$&̲"),u;i>15?u="â¦"+o.slice(i-15,i):u=o.slice(0,i);var d;s+15<o.length?d=o.slice(s,s+15)+"â¦":d=o.slice(s),r+=u+c+d}super(r),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Ve.prototype),this.position=i,i!=null&&s!=null&&(this.length=s-i),this.rawMessage=t}}var fRe=/([A-Z])/g,mRe=e=>e.replace(fRe,"-$1").toLowerCase(),pRe={"&":"&",">":">","<":"<",'"':""","'":"'"},gRe=/[&><"']/g,As=e=>String(e).replace(gRe,t=>pRe[t]),uC=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?uC(e.body[0]):e:e.type==="font"?uC(e.body):e,xRe=new Set(["mathord","textord","atom"]),hd=e=>xRe.has(uC(e).type),yRe=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},z4={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function bRe(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function vRe(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return bRe(t)}function wRe(e,t,n,r){var i=n[t];e[t]=i!==void 0?r.processor?r.processor(i):i:vRe(r)}class ZO{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n of Object.keys(z4)){var r=z4[n];r&&wRe(this,n,t,r)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i=="function"&&(i=i(t,n,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Ve("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var i=this.strict;if(typeof i=="function")try{i=i(t,n,r)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=yRe(t.url);if(n==null)return!1;t.protocol=n}var r=typeof this.trust=="function"?this.trust(t):this.trust;return!!r}}class jd{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return Gl[SRe[this.id]]}sub(){return Gl[CRe[this.id]]}fracNum(){return Gl[kRe[this.id]]}fracDen(){return Gl[_Re[this.id]]}cramp(){return Gl[TRe[this.id]]}text(){return Gl[ERe[this.id]]}isTight(){return this.size>=2}}var JO=0,$4=1,G0=2,Tu=3,Xb=4,Fo=5,Hg=6,Zs=7,Gl=[new jd(JO,0,!1),new jd($4,0,!0),new jd(G0,1,!1),new jd(Tu,1,!0),new jd(Xb,2,!1),new jd(Fo,2,!0),new jd(Hg,3,!1),new jd(Zs,3,!0)],SRe=[Xb,Fo,Xb,Fo,Hg,Zs,Hg,Zs],CRe=[Fo,Fo,Fo,Fo,Zs,Zs,Zs,Zs],kRe=[G0,Tu,Xb,Fo,Hg,Zs,Hg,Zs],_Re=[Tu,Tu,Fo,Fo,Zs,Zs,Zs,Zs],TRe=[$4,$4,Tu,Tu,Fo,Fo,Zs,Zs],ERe=[JO,$4,G0,Tu,G0,Tu,G0,Tu],Qt={DISPLAY:Gl[JO],TEXT:Gl[G0],SCRIPT:Gl[Xb],SCRIPTSCRIPT:Gl[Hg]},AA=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function jRe(e){for(var t=0;t<AA.length;t++)for(var n=AA[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var dC=[];
vendor: 7,464 bytes, lines 805-896
805AA.forEach(e=>e.blocks.forEach(t=>dC.push(...t)));function fre(e){for(var t=0;t<dC.length;t+=2)if(e>=dC[t]&&e<=dC[t+1])return!0;return!1}var Ni=e=>e+" "+e,Fp=80,NRe=function(t,n){return"M95,"+(622+t+n)+` 806c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 807c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 808c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 809s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 810c69,-144,104.5,-217.7,106.5,-221 811l`+t/2.075+" -"+t+` 812c5.3,-9.3,12,-14,20,-14 813H400000v`+(40+t)+`H845.2724 814s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 815c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z 816M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},ARe=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 817c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 818c340,-704.7,510.7,-1060.3,512,-1067 819l`+t/2.084+" -"+t+` 820c4.7,-7.3,11,-11,19,-11 821H40000v`+(40+t)+`H1012.3 822s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 823c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 824s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 825c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z 826M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},MRe=function(t,n){return"M983 "+(10+t+n)+` 827l`+t/3.13+" -"+t+` 828c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` 829H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 830s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 831c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 832c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 833c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 834c53.7,-170.3,84.5,-266.8,92.5,-289.5z 835M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},RRe=function(t,n){return"M424,"+(2398+t+n)+` 836c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 837c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 838s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 839s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 840l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 841v`+(40+t)+`H1014.6 842s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 843c-2,6,-10,9,-24,9 844c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` 845h400000v`+(40+t)+"h-400000z"},ORe=function(t,n){return"M473,"+(2713+t+n)+` 846c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` 847c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 848s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 849c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 850c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 851s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 852606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},DRe=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},LRe=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` 853H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 854h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 855c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 856219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},PRe=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=NRe(n,Fp);break;case"sqrtSize1":i=ARe(n,Fp);break;case"sqrtSize2":i=MRe(n,Fp);break;case"sqrtSize3":i=RRe(n,Fp);break;case"sqrtSize4":i=ORe(n,Fp);break;case"sqrtTall":i=LRe(n,Fp,r)}return i},IRe=function(t,n){switch(t){case"â":return Ni("M291 0 H417 V"+n+" H291z");case"â£":return Ni("M145 0 H188 V"+n+" H145z");case"â¥":return Ni("M145 0 H188 V"+n+" H145z")+Ni("M367 0 H410 V"+n+" H367z");case"â":return Ni("M457 0 H583 V"+n+" H457z");case"â¢":return Ni("M319 0 H403 V"+n+" H319z");case"â¥":return Ni("M263 0 H347 V"+n+" H263z");case"âª":return Ni("M384 0 H504 V"+n+" H384z");case"â":return Ni("M312 0 H355 V"+n+" H312z");case"â":return Ni("M257 0 H300 V"+n+" H257z")+Ni("M478 0 H521 V"+n+" H478z");default:return""}},l$={doubleleftarrow:`M262 157 857l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 858 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 859 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 860c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 861 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 862-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 863-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z 864m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l 865-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 866 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 867-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 868-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 869-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 870c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 871-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 872 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 873-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 874c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 875 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 876 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 877 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 878-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 879 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 880 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 881 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 882-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 883H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 884 435 0h399565z`,leftgroupunder:`M400000 262 885H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 886 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 887-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 888-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 889-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 890 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 891-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 892-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z 893m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 894 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 895 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 896-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2
89611s5.3 5.3 12 897 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 898-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 899v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 900-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 901-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 902 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Ni("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Ni("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Ni("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Ni("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 903-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 904c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 905 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Ni("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 906c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 907-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 908 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 909 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 910c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 911 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 912 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 913-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 914-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z 915m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 91660.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 917-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z 918m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 919c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 920-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z 921m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 92285.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 923-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z 924m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 925c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 926-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 927 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 928 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 929-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 930-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 931 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l 932-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 933s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 934c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 935 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 936-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 937 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 938 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 939-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 940-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 941 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 942-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 943 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z 944m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 945 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
946-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 947-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 948 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 949 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 950-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z 951m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 952 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 953-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 954 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Ni("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Ni("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Ni("M399995 440 h-120 V150 H0 v-120 H399995z")
vendor: 6,574 bytes, lines 954-1027
954,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 955 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 956-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 957-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 958 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 959-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 960-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 961-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 962 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 963c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 964 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 965 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 966-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 967 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 968-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 969 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 970 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 971-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 972-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 973 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 974c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 975 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 976-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 977 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 978 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 979 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 980-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 981 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 982 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 983 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 9843.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 98510.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 986-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 987-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 988H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 989c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 990c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 991-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 992-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 993-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, 994-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 995-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 996-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 997-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 998c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 999c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 1000s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 1001121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 1002s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 1003c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z 1004M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 1005-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 100613.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 1007-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 1008-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 1009-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 1010151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 1011c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 1012c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 1013c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 1014c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z 1015M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 1016c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 1017-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 1018c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z 1019M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 1020c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 10211c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, 1022-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z 1023M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 1024c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 1025-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 1026c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z 1027M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},
vendor: 4,158 bytes, lines 1027-1055
1027FRe=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84 1028H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z 1029M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 1030c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 1031c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 1032c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 1033c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z 1034M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 1035c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 1036c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z 1037MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z 1038MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z 1039M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z 1040M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 1041c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, 1042-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 1043949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 1044c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, 1045-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 1046l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, 1047-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 104863,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 1049c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` 1050c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 1051c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 1052c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 1053c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 1054l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, 1055-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function BRe(e){return"toText"in e}let Gx=class{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){return this.children.map(t=>{if(BRe(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}};var MA={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},zRe={ex:!0,em:!0,mu:!0},mre=function(t){return typeof t!="string"&&(t=t.unit),t in MA||t in zRe||t==="ex"},qr=function(t,n){var r;if(t.unit in MA)r=MA[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new Ve("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},Qe=function(t){return+t.toFixed(4)+"em"},qh=function(t){return t.filter(n=>n).join(" ")},e9=function(t){var n="";for(var r of Object.keys(t)){var i=t[r];
vendor: 5,216 bytes, line 1055
1055i!==void 0&&(n+=mRe(r)+":"+i+";")}return n},pre=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},gre=function(t){var n=document.createElement(t);n.className=qh(this.classes),Object.assign(n.style,this.style);for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n},$Re=/[\s"'>/=\x00-\x1f]/,xre=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+As(qh(this.classes))+'"');var r=e9(this.style);r&&(n+=' style="'+As(r)+'"');for(var i of Object.keys(this.attributes)){if($Re.test(i))throw new Ve("Invalid attribute name '"+i+"'");n+=" "+i+'="'+As(this.attributes[i])+'"'}n+=">";for(var s=0;s<this.children.length;s++)n+=this.children[s].toMarkup();return n+="</"+t+">",n};class Wx{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,pre.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return gre.call(this,"span")}toMarkup(){return xre.call(this,"span")}}class o3{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,pre.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return gre.call(this,"a")}toMarkup(){return xre.call(this,"a")}}class URe{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+As(this.src)+'"'+(' alt="'+As(this.alt)+'"'),n=e9(this.style);return n&&(t+=' style="'+As(n)+'"'),t+="'/>",t}}var VRe={î:"ıÌ",ï:"ıÌ",Ã:"ıÌ",ì:"ıÌ"};class co{constructor(t,n,r,i,s,a,o,c){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=n||0,this.depth=r||0,this.italic=i||0,this.skew=s||0,this.width=a||0,this.classes=o||[],this.style=c||{},this.maxFontSize=0;var u=jRe(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[îïÃì]/.test(this.text)&&(this.text=VRe[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=Qe(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=qh(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=As(qh(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+Qe(this.italic)+";"),r+=e9(this.style),r&&(t=!0,n+=' style="'+As(r)+'"');var i=As(this.text);return t?(n+=">",n+=i,n+="</span>",n):i}}class Gu{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+As(this.attributes[n])+'"';t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</svg>",t}}class Gh{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",l$[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+As(this.alternate)+'"/>':'<path d="'+As(l$[this.pathName])+'"/>'}}class RA{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+As(this.attributes[n])+'"';return t+="/>",t}}function HRe(e){if(e instanceof co)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function qRe(e){if(e instanceof Wx)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var GRe=e=>e instanceof Wx||e instanceof o3||e instanceof Gx,rc
vendor: 57,629 bytes, line 1055
1055={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},
vendor: 6,395 bytes, line 1055
1055j2={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},c$={Ã
:"A",Ã:"D",Ã:"o",Ã¥:"a",ð:"d",þ:"o",Ð:"A",Ð:"B",Ð:"B",Ð:"F",Ð:"A",Ð:"E",Ð:"K",Ð:"3",Ð:"N",Ð:"N",Ð:"K",Ð:"N",Ð:"M",Ð:"H",Ð:"O",Ð:"N",Ð :"P",С:"C",Т:"T",У:"y",Ф:"O",Ð¥:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Ð:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",Ñ:"p",Ñ:"c",Ñ:"o",Ñ:"y",Ñ:"b",Ñ
:"x",Ñ:"n",Ñ:"n",Ñ:"w",Ñ:"w",Ñ:"a",Ñ:"m",Ñ:"a",Ñ:"e",Ñ:"m",Ñ:"r"};function yre(e,t){rc[e]=t}function t9(e,t,n){if(!rc[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=rc[t][r];if(!i&&e[0]in c$&&(r=c$[e[0]].charCodeAt(0),i=rc[t][r]),!i&&n==="text"&&fre(r)&&(i=rc[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var aE={};function WRe(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!aE[t]){var n=aE[t]={cssEmPerMu:j2.quad[t]/18};for(var r in j2)j2.hasOwnProperty(r)&&(n[r]=j2[r][t])}return aE[t]}var Fr={math:{},text:{}};function T(e,t,n,r,i,s){Fr[e][i]={font:t,group:n,replace:r},s&&r&&(Fr[e][r]=Fr[e][i])}var N="math",Ie="text",L="main",G="ams",Br="accent-token",ht="bin",aa="close",Yx="inner",Dt="mathord",Ti="op-token",fo="open",uw="punct",X="rel",fd="spacing",se="textord";T(N,L,X,"â¡","\\equiv",!0);T(N,L,X,"âº","\\prec",!0);T(N,L,X,"â»","\\succ",!0);T(N,L,X,"â¼","\\sim",!0);T(N,L,X,"â¥","\\perp");T(N,L,X,"⪯","\\preceq",!0);T(N,L,X,"⪰","\\succeq",!0);T(N,L,X,"â","\\simeq",!0);T(N,L,X,"â£","\\mid",!0);T(N,L,X,"âª","\\ll",!0);T(N,L,X,"â«","\\gg",!0);T(N,L,X,"â","\\asymp",!0);T(N,L,X,"â¥","\\parallel");T(N,L,X,"â","\\bowtie",!0);T(N,L,X,"â£","\\smile",!0);T(N,L,X,"â","\\sqsubseteq",!0);T(N,L,X,"â","\\sqsupseteq",!0);T(N,L,X,"â","\\doteq",!0);T(N,L,X,"â¢","\\frown",!0);T(N,L,X,"â","\\ni",!0);T(N,L,X,"â","\\propto",!0);T(N,L,X,"â¢","\\vdash",!0);T(N,L,X,"â£","\\dashv",!0);T(N,L,X,"â","\\owns");T(N,L,uw,".","\\ldotp");T(N,L,uw,"â
","\\cdotp");T(N,L,uw,"â
","·");T(Ie,L,se,"â
","·");T(N,L,se,"#","\\#");T(Ie,L,se,"#","\\#");T(N,L,se,"&","\\&");T(Ie,L,se,"&","\\&");T(N,L,se,"âµ","\\aleph",!0);T(N,L,se,"â","\\forall",!0);T(N,L,se,"â","\\hbar",!0);T(N,L,se,"â","\\exists",!0);T(N,L,se,"â","\\nabla",!0);T(N,L,se,"â","\\flat",!0);T(N,L,se,"â","\\ell",!0);T(N,L,se,"â®","\\natural",!0);T(N,L,se,"â£","\\clubsuit",!0);T(N,L,se,"â","\\wp",!0);T(N,L,se,"â¯","\\sharp",!0);T(N,L,se,"â¢","\\diamondsuit",!0);T(N,L,se,"â","\\Re",!0);T(N,L,se,"â¡","\\heartsuit",!0);T(N,L,se,"â","\\Im",!0);T(N,L,se,"â ","\\spadesuit",!0);T(N,L,se,"§","\\S",!0);T(Ie,L,se,"§","\\S");T(N,L,se,"¶","\\P",!0);T(Ie,L,se,"¶","\\P");T(N,L,se,"â ","\\dag");T(Ie,L,se,"â ","\\dag");T(Ie,L,se,"â ","\\textdagger");T(N,L,se,"â¡","\\ddag");T(Ie,L,se,"â¡","\\ddag");T(Ie,L,se,"â¡","\\textdaggerdbl");T(N,L,aa,"â±","\\rmoustache",!0);T(N,L,fo,"â°","\\lmoustache",!0);T(N,L,aa,"â¯","\\rgroup",!0);T(N,L,fo,"â®","\\lgroup",!0);T(N,L,ht,"â","\\mp",!0);T(N,L,ht,"â","\\ominus",!0);T(N,L,ht,"â","\\uplus",!0);T(N,L,ht,"â","\\sqcap",!0);T(N,L,ht,"â","\\ast");T(N,L,ht,"â","\\sqcup",!0);T(N,L,ht,"â¯","\\bigcirc",!0);T(N,L,ht,"â","\\bullet",!0);T(N,L,ht,"â¡","\\ddagger");T(N,L,ht,"â","\\wr",!0);T(N,L,ht,"⨿","\\amalg");T(N,L,ht,"&","\\And");T(N,L,X,"âµ","\\longleftarrow",!0);T(N,L,X,"â","\\Leftarrow",!0);T(N,L,X,"â¸","\\Longleftarrow",!0);T(N,L,X,"â¶","\\longrightarrow",!0);T(N,L,X,"â","\\Rightarrow",!0);T(N,L,X,"â¹","\\Longrightarrow",!0);T(N,L,X,"â","\\leftrightarrow",!0);T(N,L,X,"â·","\\longleftrightarrow",!0);T(N,L,X,"â","\\Leftrightarrow",!0);T(N,L,X,"âº","\\Longleftrightarrow",!0);T(N,L,X,"â¦","\\mapsto",!0);T(N,L,X,"â¼","\\longmapsto",!0);T(N,L,X,"â","\\nearrow",!0);T(N,L,X,"â©","\\hookleftarrow",!0);T(N,L,X,"âª","\\hookrightarrow",!0);T(N,L,X,"â","\\searrow",!0);T(N,L,X,"â¼","\\leftharpoonup",!0);T(N,L,X,"â","\\rightharpoonup",!0);T(N,L,X,"â","\\swarrow",!0);T(N,L,X,"â½","\\leftharpoondown",!0);T(N,L,X,"â","\\rightharpoondown",!0);T(N,L,X,"â","\\nwarrow",!0);T(N,L,X,"â","\\rightleftharpoons",!0);T(N,G,X,"â®","\\nless",!0);T(N,G,X,"î","\\@nleqslant");T(N,G,X,"î","\\@nleqq");T(N,G,X,"âª","\\lneq",!0);T(N,G,X,"â¨","\\lneqq",!0);T(N,G,X,"î","\\@lvertneqq");T(N,G,X,"â¦","\\lnsim",!0);T(N,G,X,"âª","\\lnapprox",!0);T(N,G,X,"â","\\nprec",!0);T(N,G,X,"â ","\\npreceq",!0);T(N,G,X,"â¨","\\precnsim",!0);T(N,G,X,"⪹","\\precnapprox",!0);T(N,G,X,"â","\\nsim",!0);T(N,G,X,"î","\\@nshortmid");T(N,G,X,"â¤","\\nmid",!0);T(N,G,X,"â¬","\\nvdash",!0);T(N,G,X,"â","\\nvDash",!0);T(N,G,X,"âª","\\ntriangleleft");T(N,G,X,"â¬","\\ntrianglelefteq",!0);T(N,G,X,"â","\\subsetneq",!0);T(N,G,X,"î","\\@varsubsetneq");T(N,G,X,"â«","\\subsetneqq",!0);T(N,G,X,"î","\\@varsubsetneqq");T(N,G,X,"â¯","\\ngtr",!0);T(N,G,X,"î","\\@ngeqslant");T(N,G,X,"î","\\@ngeqq");T(N,G,X,"âª","\\gneq",!0);T(N,G,X,"â©","\\gneqq",!0);T(N,G,X,"î","\\@gvertneqq");T(N,G,X,"â§","\\gnsim",!0);T(N,G,X,"âª","\\gnapprox",!0);T(N,G,X,"â","\\nsucc",!0);T(N,G,X,"â¡","\\nsucceq",!0);T(N,G,X,"â©","\\succnsim",!0);T(N,G,X,"⪺","\\succnapprox",!0);T(N,G,X,"â","\\ncong",!0);T(N,G,X,"î","\\@nshortparallel");T(N,G,X,"â¦","\\nparallel",!0);T(N,G,X,"â¯","\\nVDash",!0);T(N,G,X,"â«","\\ntriangleright");T(N,G,X,"â","\\ntrianglerighteq",!0);T(N,G,X,"î","\\@nsupseteqq");T(N,G,X,"â","\\supsetneq",!0);T(N,G,X,"î","\\@varsupsetneq");T(N,G,X,"â«","\\supsetneqq",!0);T(N,G,X,"î","\\@varsupsetneqq");T(N,G,X,"â®","\\nVdash",!0);T(N,G,X,"⪵","\\precneqq",!0);T(N,G,X,"⪶","\\succneqq",!0);
1055T(N,G,X,"î","\\@nsubseteqq");T(N,G,ht,"â´","\\unlhd");T(N,G,ht,"âµ","\\unrhd");T(N,G,X,"â","\\nleftarrow",!0);T(N,G,X,"â","\\nrightarrow",!0);T(N,G,X,"â","\\nLeftarrow",!0);T(N,G,X,"â","\\nRightarrow",!0);T(N,G,X,"â®","\\nleftrightarrow",!0);T(N,G,X,"â","\\nLeftrightarrow",!0);T(N,G,X,"â³","\\vartriangle");T(N,G,se,"â","\\hslash");T(N,G,se,"â½","\\triangledown");T(N,G,se,"â","\\lozenge");T(N,G,se,"â","\\circledS");T(N,G,se,"®","\\circledR");T(Ie,G,se,"®","\\circledR");T(N,G,se,"â¡","\\measuredangle",!0);T(N,G,se,"â","\\nexists");T(N,G,se,"â§","\\mho");T(N,G,se,"â²","\\Finv",!0);T(N,G,se,"â
","\\Game",!0);T(N,G,se,"âµ","\\backprime");T(N,G,se,"â²","\\blacktriangle");T(N,G,se,"â¼","\\blacktriangledown");T(N,G,se,"â ","\\blacksquare");T(N,G,se,"â§«","\\blacklozenge");T(N,G,se,"â
","\\bigstar");T(N,G,se,"â¢","\\sphericalangle",!0);T(N,G,se,"â","\\complement",!0);T(N,G,se,"ð","\\eth",!0);T(Ie,L,se,"ð","ð");T(N,G,se,"â±","\\diagup");T(N,G,se,"â²","\\diagdown");T(N,G,se,"â¡","\\square");T(N,G,se,"â¡","\\Box");T(N,G,se,"â","\\Diamond");T(N,G,se,"Â¥","\\yen",!0);T(Ie,G,se,"Â¥","\\yen",!0);T(N,G,se,"â","\\checkmark",!0);T(Ie,G,se,"â","\\checkmark");T(N,G,se,"â¶","\\beth",!0);T(N,G,se,"â¸","\\daleth",!0);T(N,G,se,"â·","\\gimel",!0);T(N,G,se,"Ï","\\digamma",!0);T(N,G,se,"ϰ","\\varkappa");T(N,G,fo,"â","\\@ulcorner",!0);T(N,G,aa,"â","\\@urcorner",!0);T(N,G,fo,"â","\\@llcorner",!0);T(N,G,aa,"â","\\@lrcorner",!0);T(N,G,X,"â¦","\\leqq",!0);T(N,G,X,"⩽","\\leqslant",!0);T(N,G,X,"âª","\\eqslantless",!0);T(N,G,X,"â²","\\lesssim",!0);T(N,G,X,"âª
","\\lessapprox",!0);T(N,G,X,"â","\\approxeq",!0);T(N,G,ht,"â","\\lessdot");T(N,G,X,"â","\\lll",!0);T(N,G,X,"â¶","\\lessgtr",!0);T(N,G,X,"â","\\lesseqgtr",!0);T(N,G,X,"âª","\\lesseqqgtr",!0);T(N,G,X,"â","\\doteqdot");T(N,G,X,"â","\\risingdotseq",!0);T(N,G,X,"â","\\fallingdotseq",!0);T(N,G,X,"â½","\\backsim",!0);T(N,G,X,"â","\\backsimeq",!0);T(N,G,X,"â«
","\\subseteqq",!0);T(N,G,X,"â","\\Subset",!0);T(N,G,X,"â","\\sqsubset",!0);T(N,G,X,"â¼","\\preccurlyeq",!0);T(N,G,X,"â","\\curlyeqprec",!0);T(N,G,X,"â¾","\\precsim",!0);T(N,G,X,"⪷","\\precapprox",!0);T(N,G,X,"â²","\\vartriangleleft");T(N,G,X,"â´","\\trianglelefteq");T(N,G,X,"â¨","\\vDash",!0);T(N,G,X,"âª","\\Vvdash",!0);T(N,G,X,"â£","\\smallsmile");T(N,G,X,"â¢","\\smallfrown");T(N,G,X,"â","\\bumpeq",!0);T(N,G,X,"â","\\Bumpeq",!0);T(N,G,X,"â§","\\geqq",!0);T(N,G,X,"⩾","\\geqslant",!0);T(N,G,X,"âª","\\eqslantgtr",!0);T(N,G,X,"â³","\\gtrsim",!0);T(N,G,X,"âª","\\gtrapprox",!0);T(N,G,ht,"â","\\gtrdot");T(N,G,X,"â","\\ggg",!0);T(N,G,X,"â·","\\gtrless",!0);T(N,G,X,"â","\\gtreqless",!0);T(N,G,X,"âª","\\gtreqqless",!0);T(N,G,X,"â","\\eqcirc",!0);T(N,G,X,"â","\\circeq",!0);T(N,G,X,"â","\\triangleq",!0);T(N,G,X,"â¼","\\thicksim");T(N,G,X,"â","\\thickapprox");T(N,G,X,"â«","\\supseteqq",!0);T(N,G,X,"â","\\Supset",!0);T(N,G,X,"â","\\sqsupset",!0);T(N,G,X,"â½","\\succcurlyeq",!0);T(N,G,X,"â","\\curlyeqsucc",!0);T(N,G,X,"â¿","\\succsim",!0);T(N,G,X,"⪸","\\succapprox",!0);T(N,G,X,"â³","\\vartriangleright");T(N,G,X,"âµ","\\trianglerighteq");T(N,G,X,"â©","\\Vdash",!0);T(N,G,X,"â£","\\shortmid");T(N,G,X,"â¥","\\shortparallel");T(N,G,X,"â¬","\\between",!0);T(N,G,X,"â","\\pitchfork",!0);T(N,G,X,"â","\\varpropto");T(N,G,X,"â","\\blacktriangleleft");T(N,G,X,"â´","\\therefore",!0);T(N,G,X,"â","\\backepsilon");T(N,G,X,"â¶","\\blacktriangleright");T(N,G,X,"âµ","\\because",!0);T(N,G,X,"â","\\llless");T(N,G,X,"â","\\gggtr");T(N,G,ht,"â²","\\lhd");T(N,G,ht,"â³","\\rhd");T(N,G,X,"â","\\eqsim",!0);T(N,L,X,"â","\\Join");T(N,G,X,"â","\\Doteq",!0);T(N,G,ht,"â","\\dotplus",!0);T(N,G,ht,"â","\\smallsetminus");T(N,G,ht,"â","\\Cap",!0);T(N,G,ht,"â","\\Cup",!0);T(N,G,ht,"â©","\\doublebarwedge",!0);T(N,G,ht,"â","\\boxminus",!0);T(N,G,ht,"â","\\boxplus",!0);T(N,G,ht,"â","\\divideontimes",!0);T(N,G,ht,"â","\\ltimes",!0);T(N,G,ht,"â","\\rtimes",!0);T(N,G,ht,"â","\\leftthreetimes",!0);T(N,G,ht,"â","\\rightthreetimes",!0);T(N,G,ht,"â","\\curlywedge",!0);T(N,G,ht,"â","\\curlyvee",!0);T(N,G,ht,"â","\\circleddash",!0);T(N,G,ht,"â","\\circledast",!0);T(N,G,ht,"â
","\\centerdot");T(N,G,ht,"âº","\\intercal",!0);T(N,G,ht,"â","\\doublecap");T(N,G,ht,"â","\\doublecup");T(N,G,ht,"â ","\\boxtimes",!0);T(N,G,X,"â¢","\\dashrightarrow",!0);T(N,G,X,"â ","\\dashleftarrow",!0);T(N,G,X,"â","\\leftleftarrows",!0);T(N,G,X,"â","\\leftrightarrows",!0);T(N,G,X,"â","\\Lleftarrow",!0);T(N,G,X,"â","\\twoheadleftarrow",!0);T(N,G,X,"â¢","\\leftarrowtail",!0);T(N,G,X,"â«","\\looparrowleft",!0);T(N,G,X,"â","\\leftrightharpoons",!0);T(N,G,X,"â¶","\\curvearrowleft",!0);T(N,G,X,"âº","\\circlearrowleft",!0);T(N,G,X,"â°","\\Lsh",!0);T(N,G,X,"â","\\upuparrows",!0);T(N,G,X,"â¿","\\upharpoonleft",!0);T(N,G,X,"â","\\downharpoonleft",!0);T(N,L,X,"â¶","\\origof",!0);T(N,L,X,"â·","\\imageof",!0);T(N,G,X,"â¸","\\multimap",!0);T(N,G,X,"â","\\leftrightsquigarrow",!0);T(N,G,X,"â","\\rightrightarrows",!0);T(N,G,X,"â","\\rightleftarrows",!0);T(N,G,X,"â ","\\twoheadrightarrow",!0);T(N,G,X,"â£","\\rightarrowtail",!0);T(N,G,X,"â¬","\\looparrowright",!0);T(N,G,X,"â·","\\curvearrowright",!0);T(N,G,X,"â»","\\circlearrowright",!0);T(N,G,X,"â±","\\Rsh",!0);T(N,G,X,"â","\\downdownarrows",!0);T(N,G,X,"â¾","\\upharpoonright",!0);T(N,G,X,"â","\\downharpoonright",!0);T(N,G,X,"â","\\rightsquigarrow",!0);T(N,G,X,"â","\\leadsto");T(N,G,X,"â","\\Rrightarrow",!0);T(N,G,X,"â¾","\\restriction");T(N,L,se,"â","`");T(N,L,se,"$","\\$");T(Ie,L,se,"$","\\$");T(Ie,L,se,"$","\\textdollar");T(N,L,se,"%","\\%");T(Ie,L,se,"%","\\%");T(N,L,se,"_","\\_");T(Ie,L,se,"_","\\_");T(Ie,L,se,"_","\\textunderscore");T(N,L,se,"â ","\\angle",!0);T(N,L,se,"â","\\infty",!0);T(N,L,se,"â²","\\prime");T(N,L,se,"â³","\\triangle");T(N,L,se,"Î","\\Gamma",!0);T(N,L,se,"Î","\\Delta",!0);T(N,L,se,"Î","\\Theta",!0);T(N,L,se,"Î","\\Lambda",!0);T(N,L,se,"Î","\\Xi",!0);T(N,L,se,"Î ","\\Pi",!0);T(N,L,se,"Σ","\\Sigma",!0);T(N,L,se,"Î¥","\\Upsilon",!0);T(N,L,se,"Φ","\\Phi",!0);T(N,L,se,"Ψ","\\Psi",!0);T(N,L,se,"Ω","\\Omega",!0);T(N,L,se,"A","Î");T(N,L,se,"B","Î");T(N,L,se,"E","Î");T(N,L,se,"Z","Î");T(N,L,se,"H","Î");T(N,L,se,"I","Î");T(N,L,se,"K","Î");T(N,L,se,"M","Î");T(N,L,se,"N","Î");T(N,L,se,"O","Î");T(N,L,se,"P","Ρ");T(N,L,se,"T","Τ");T(N,L,se,"X","Χ");T(N,L,se,"¬","\\neg",!0);T(N,L,se,"¬","\\lnot");T(N,L,se,"â¤","\\top");T(N,L,se,"â¥","\\bot");T(N,L,se,"â
","\\emptyset");T(N,G,se,"â
","\\varnothing");T(N,L,Dt,"α","\\alpha",!0);T(N,L,Dt,"β","\\beta",!0);T(N,L,Dt,"γ","\\gamma",!0);T(N,L,Dt,"δ","\\delta",!0);T(N,L,Dt,"ϵ","\\epsilon",!0);T(N,L,Dt,"ζ","\\zeta",!0);T(N,L,Dt,"η","\\eta",!0);T(N,L,Dt,"θ","\\theta",!0);T(N,L,Dt,"ι","\\iota",!0);T(N,L,Dt,"κ","\\kappa",!0);T(N,L,Dt,"λ","\\lambda",!0);T(N,L,Dt,"μ","\\mu",!0);T(N,L,Dt,"ν","\\nu",!0);T(N,L,Dt,"ξ","\\xi",!0);T(N,L,Dt,"ο","\\omicron",!0);T(N,L,Dt,"Ï","\\pi",!0);T(N,L,Dt,"Ï","\\rho",!0);T(N,L,Dt,"Ï","\\sigma",!0);T(N,L,Dt,"Ï","\\tau",!0);T(N,L,Dt,"Ï
","\\upsilon",!0);T(N,L,Dt,"Ï","\\phi",!0);T(N,L,Dt,"Ï","\\chi",!0);T(N,L,Dt,"Ï","\\psi",!0);T(N,L,Dt,"Ï","\\omega",!0);T(N,L,Dt,"ε","\\varepsilon",!0);T(N,L,Dt,"Ï","\\vartheta",!0);T(N,L,Dt,"Ï","\\varpi",!0);T(N,L,Dt,"ϱ","\\varrho",!0);T(N,L,Dt,"Ï","\\varsigma",!0);T(N,L,Dt,"Ï","\\varphi",!0);T(N,L,ht,"â","*",!0);T(N,L,ht,"+","+");T(N,L,ht,"â","-",!0);T(N,L,ht,"â
","\\cdot",!0);T(N,L,ht,"â","\\circ",!0);T(N,L,ht,"÷","\\div",!0);T(N,L,ht,"±","\\pm",!0);T(N,L,ht,"Ã","\\times",!0);T(N,L,ht,"â©","\\cap",!0);T(N,L,ht,"âª","\\cup",!0);T(N,L,ht,"â","\\setminus",!0);T(N,L,ht,"â§","\\land");T(N,L,ht,"â¨","\\lor");T(N,L,ht,"â§","\\wedge",!0);T(N,L,ht,"â¨","\\vee",!0);T(N,L,se,"â","\\surd");T(N,L,fo,"â¨","\\langle",!0);T(N,L,fo,"â£","\\lvert");T(N,L,fo,"â¥","\\lVert");T(N,L,aa,"?","?");T(N,L,aa,"!","!");T(N,L,aa,"â©","\\rangle",!0);T(N,L,aa,"â£","\\rvert");T(N,L,aa,"â¥","\\rVert");T(N,L,X,"=","=");T(N,L,X,":",":");T(N,L,X,"â","\\approx",!0);T(N,L,X,"â
","\\cong",!0);T(N,L,X,"â¥","\\ge");T(N,L,X,"â¥","\\geq",!0);T(N,L,X,"â","\\gets");T(N,L,X,">","\\gt",!0);T(N,L,X,"â","\\in",!0);T(N,L,X,"î ","\\@not");T(N,L,X,"â","\\subset",!0);T(N,L,X,"â","\\supset",!0);T(N,L,X,"â","\\subseteq",!0);T(N,L,X,"â","\\supseteq",!0);T(N,G,X,"â","\\nsubseteq",!0);T(N,G,X,"â","\\nsupseteq",!0);T(N,L,X,"â¨","\\models");T(N,L,X,"â","\\leftarrow",!0);T(N,L,X,"â¤","\\le");T(N,L,X,"â¤","\\leq",!0);T(N,L,X,"<","\\lt",!0);T(N,L,X,"â","\\rightarrow",!0);T(N,L,X,"â","\\to");T(N,G,X,"â±","\\ngeq",!0);T(N,G,X,"â°","\\nleq",!0);T(N,L,fd," ","\\ ");T(N,L,fd," ","\\space");T(N,L,fd," ","\\nobreakspace");T(Ie,L,fd," ","\\ ");T(Ie,L,fd," "," ");T(Ie,L,fd," ","\\space");T(Ie,L,fd," ","\\nobreakspace");T(N,L,fd,"","\\nobreak");T(N,L,fd,"","\\allowbreak");T(N,L,uw,",",",");T(N,L,uw,";",";");T(N,G,ht,"â¼","\\barwedge",!0);T(N,G,ht,"â»","\\veebar",!0);T(N,L,ht,"â","\\odot",!0);T(N,L,ht,"â","\\oplus",!0);T(N,L,ht,"â","\\otimes",!0);T(N,L,se,"â","\\partial",!0);T(N,L,ht,"â","\\oslash",!0);T(N,G,ht,"â","\\circledcirc",!0);T(N,G,ht,"â¡","\\boxdot",!0);
vendor: 8,736 bytes, line 1055
1055T(N,L,ht,"â³","\\bigtriangleup");T(N,L,ht,"â½","\\bigtriangledown");T(N,L,ht,"â ","\\dagger");T(N,L,ht,"â","\\diamond");T(N,L,ht,"â","\\star");T(N,L,ht,"â","\\triangleleft");T(N,L,ht,"â¹","\\triangleright");T(N,L,fo,"{","\\{");T(Ie,L,se,"{","\\{");T(Ie,L,se,"{","\\textbraceleft");T(N,L,aa,"}","\\}");T(Ie,L,se,"}","\\}");T(Ie,L,se,"}","\\textbraceright");T(N,L,fo,"{","\\lbrace");T(N,L,aa,"}","\\rbrace");T(N,L,fo,"[","\\lbrack",!0);T(Ie,L,se,"[","\\lbrack",!0);T(N,L,aa,"]","\\rbrack",!0);T(Ie,L,se,"]","\\rbrack",!0);T(N,L,fo,"(","\\lparen",!0);T(N,L,aa,")","\\rparen",!0);T(Ie,L,se,"<","\\textless",!0);T(Ie,L,se,">","\\textgreater",!0);T(N,L,fo,"â","\\lfloor",!0);T(N,L,aa,"â","\\rfloor",!0);T(N,L,fo,"â","\\lceil",!0);T(N,L,aa,"â","\\rceil",!0);T(N,L,se,"\\","\\backslash");T(N,L,se,"â£","|");T(N,L,se,"â£","\\vert");T(Ie,L,se,"|","\\textbar",!0);T(N,L,se,"â¥","\\|");T(N,L,se,"â¥","\\Vert");T(Ie,L,se,"â¥","\\textbardbl");T(Ie,L,se,"~","\\textasciitilde");T(Ie,L,se,"\\","\\textbackslash");T(Ie,L,se,"^","\\textasciicircum");T(N,L,X,"â","\\uparrow",!0);T(N,L,X,"â","\\Uparrow",!0);T(N,L,X,"â","\\downarrow",!0);T(N,L,X,"â","\\Downarrow",!0);T(N,L,X,"â","\\updownarrow",!0);T(N,L,X,"â","\\Updownarrow",!0);T(N,L,Ti,"â","\\coprod");T(N,L,Ti,"â","\\bigvee");T(N,L,Ti,"â","\\bigwedge");T(N,L,Ti,"â¨","\\biguplus");T(N,L,Ti,"â","\\bigcap");T(N,L,Ti,"â","\\bigcup");T(N,L,Ti,"â«","\\int");T(N,L,Ti,"â«","\\intop");T(N,L,Ti,"â¬","\\iint");T(N,L,Ti,"â","\\iiint");T(N,L,Ti,"â","\\prod");T(N,L,Ti,"â","\\sum");T(N,L,Ti,"â¨","\\bigotimes");T(N,L,Ti,"â¨","\\bigoplus");T(N,L,Ti,"â¨","\\bigodot");T(N,L,Ti,"â®","\\oint");T(N,L,Ti,"â¯","\\oiint");T(N,L,Ti,"â°","\\oiiint");T(N,L,Ti,"â¨","\\bigsqcup");T(N,L,Ti,"â«","\\smallint");T(Ie,L,Yx,"â¦","\\textellipsis");T(N,L,Yx,"â¦","\\mathellipsis");T(Ie,L,Yx,"â¦","\\ldots",!0);T(N,L,Yx,"â¦","\\ldots",!0);T(N,L,Yx,"â¯","\\@cdots",!0);T(N,L,Yx,"â±","\\ddots",!0);T(N,L,se,"â®","\\varvdots");T(Ie,L,se,"â®","\\varvdots");T(N,L,Br,"Ë","\\acute");T(N,L,Br,"Ë","\\grave");T(N,L,Br,"¨","\\ddot");T(N,L,Br,"~","\\tilde");T(N,L,Br,"Ë","\\bar");T(N,L,Br,"Ë","\\breve");T(N,L,Br,"Ë","\\check");T(N,L,Br,"^","\\hat");T(N,L,Br,"â","\\vec");T(N,L,Br,"Ë","\\dot");T(N,L,Br,"Ë","\\mathring");T(N,L,Dt,"î±","\\@imath");T(N,L,Dt,"î·","\\@jmath");T(N,L,se,"ı","ı");T(N,L,se,"È·","È·");T(Ie,L,se,"ı","\\i",!0);T(Ie,L,se,"È·","\\j",!0);T(Ie,L,se,"Ã","\\ss",!0);T(Ie,L,se,"æ","\\ae",!0);T(Ie,L,se,"Å","\\oe",!0);T(Ie,L,se,"ø","\\o",!0);T(Ie,L,se,"Ã","\\AE",!0);T(Ie,L,se,"Å","\\OE",!0);T(Ie,L,se,"Ã","\\O",!0);T(Ie,L,Br,"Ë","\\'");T(Ie,L,Br,"Ë","\\`");T(Ie,L,Br,"Ë","\\^");T(Ie,L,Br,"Ë","\\~");T(Ie,L,Br,"Ë","\\=");T(Ie,L,Br,"Ë","\\u");T(Ie,L,Br,"Ë","\\.");T(Ie,L,Br,"¸","\\c");T(Ie,L,Br,"Ë","\\r");T(Ie,L,Br,"Ë","\\v");T(Ie,L,Br,"¨",'\\"');T(Ie,L,Br,"Ë","\\H");T(Ie,L,Br,"â¯","\\textcircled");var bre={"--":!0,"---":!0,"``":!0,"''":!0};T(Ie,L,se,"â","--",!0);T(Ie,L,se,"â","\\textendash");T(Ie,L,se,"â","---",!0);T(Ie,L,se,"â","\\textemdash");T(Ie,L,se,"â","`",!0);T(Ie,L,se,"â","\\textquoteleft");T(Ie,L,se,"â","'",!0);T(Ie,L,se,"â","\\textquoteright");T(Ie,L,se,"â","``",!0);T(Ie,L,se,"â","\\textquotedblleft");T(Ie,L,se,"â","''",!0);T(Ie,L,se,"â","\\textquotedblright");T(N,L,se,"°","\\degree",!0);T(Ie,L,se,"°","\\degree");T(Ie,L,se,"°","\\textdegree",!0);T(N,L,se,"£","\\pounds");T(N,L,se,"£","\\mathsterling",!0);T(Ie,L,se,"£","\\pounds");T(Ie,L,se,"£","\\textsterling",!0);T(N,G,se,"â ","\\maltese");T(Ie,G,se,"â ","\\maltese");var u$='0123456789/@."';for(var oE=0;oE<u$.length;oE++){var d$=u$.charAt(oE);T(N,L,se,d$,d$)}var h$='0123456789!@*()-=+";:?/.,';for(var lE=0;lE<h$.length;lE++){var f$=h$.charAt(lE);T(Ie,L,se,f$,f$)}var U4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var cE=0;cE<U4.length;cE++){var N2=U4.charAt(cE);T(N,L,Dt,N2,N2),T(Ie,L,se,N2,N2)}T(N,G,se,"C","â");T(Ie,G,se,"C","â");T(N,G,se,"H","â");T(Ie,G,se,"H","â");T(N,G,se,"N","â");T(Ie,G,se,"N","â");T(N,G,se,"P","â");T(Ie,G,se,"P","â");T(N,G,se,"Q","â");T(Ie,G,se,"Q","â");T(N,G,se,"R","â");T(Ie,G,se,"R","â");T(N,G,se,"Z","â¤");T(Ie,G,se,"Z","â¤");T(N,L,Dt,"h","â");T(Ie,L,Dt,"h","â");var zt;for(var zs=0;zs<U4.length;zs++){var Qr=U4.charAt(zs);zt=String.fromCharCode(55349,56320+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56372+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56424+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56580+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56684+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56736+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56788+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56840+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56944+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zs<26&&(zt=String.fromCharCode(55349,56632+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt),zt=String.fromCharCode(55349,56476+zs),T(N,L,Dt,Qr,zt),T(Ie,L,se,Qr,zt))}zt="ð";T(N,L,Dt,"k",zt);T(Ie,L,se,"k",zt);for(var Ef=0;Ef<10;Ef++){var Nd=Ef.toString();zt=String.fromCharCode(55349,57294+Ef),T(N,L,Dt,Nd,zt),T(Ie,L,se,Nd,zt),zt=String.fromCharCode(55349,57314+Ef),T(N,L,Dt,Nd,zt),T(Ie,L,se,Nd,zt),zt=String.fromCharCode(55349,57324+Ef),T(N,L,Dt,Nd,zt),T(Ie,L,se,Nd,zt),zt=String.fromCharCode(55349,57334+Ef),T(N,L,Dt,Nd,zt),T(Ie,L,se,Nd,zt)}var OA="ÃÃþ";for(var uE=0;uE<OA.length;uE++){var A2=OA.charAt(uE);T(N,L,Dt,A2,A2),T(Ie,L,se,A2,A2)}var DA={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},m$={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},p$={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},YRe={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Vf={mathClass:"",textClass:"",font:""},g$={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},x$={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},y$={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},LA={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},PA={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},b$={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},IA={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},v$=[DA,DA,m$,m$,p$,p$,YRe,Vf,Vf,Vf,g$,g$,x$,x$,y$,y$,LA,LA,PA,PA,b$,b$,Vf,Vf,IA,IA],KRe=[DA,Vf,LA,PA,IA],XRe=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return v$[i]}else if(120782<=r&&r<=120831){var s=Math.floor((r-120782)/10);return KRe[s]}else{if(r===120485||r===120486)return v$[0];if(120486<r&&r<120782)return Vf;throw new Ve("Unsupported character: "+e)}},l3=function(t,n,r){if(Fr[r][t]){var i=Fr[r][t].replace;i&&(t=i)}return{value:t,metrics:t9(t,n,r)}},qs=function(t,n,r,i,s){var a=l3(t,n,r),o=a.metrics;t=a.value;var c;if(o){var u=o.italic;(r==="text"||i&&i.font==="mathit")&&(u=0),c=new co(t,o.height,o.depth,u,o.skew,o.width,s)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+r+"'")),c=new co(t,0,0,0,0,0,s);if(i){c.maxFontSize=i.sizeMultiplier,i.style.isTight()&&c.classes.push("mtight");var d=i.getColor();d&&(c.style.color=d)}return c},n9=function(t,n,r,i){return i===void 0&&(i=[]),r.font==="boldsymbol"&&l3(t,"Main-Bold",n).metrics?qs(t,"Main-Bold",n,r,i.concat(["mathbf"])):t==="\\"||Fr[n][t].font==="main"?qs(t,"Main-Regular",n,r,i):qs(t,"AMS-Regular",n,r,i.concat(["amsrm"]))},QRe=function(t,n,r){return r!=="textord"&&l3(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},c3=function(t,n,r){var i=t.mode,s=t.text,a=["mord"],{font:o,fontFamily:c,fontWeight:u,fontShape:d}=n,h=i==="math"||i==="text"&&!!o,f=h?o:c,m="",p="";if(s.charCodeAt(0)===55349){var x=XRe(s);m=x.font,p=x[i+"Class"]}if(m)return qs(s,m,i,n,a.concat(p));if(f){var v,g;if(f==="boldsymbol"){var y=QRe(s,i,r);v=y.fontName,g=[y.fontClass]}else h?(v=FA[o].fontName,g=[o]):(v=M2(c,u,d),g=[c,u,d]);if(l3(s,v,i).metrics)return qs(s,v,i,n,a.concat(g));if(bre.hasOwnProperty(s)&&v.slice(0,10)==="Typewriter"){for(var w=[],S=0;S<s.length;S++)w.push(qs(s[S],v,i,n,a.concat(g)));return md(w)}}if(r==="mathord")return qs(s,"Math-Italic",i,n,a.concat(["mathnormal"]));if(r==="textord"){var C=Fr[i][s]&&Fr[i][s].font;if(C==="ams"){var k=M2("amsrm",u,d);return qs(s,k,i,n,a.concat("amsrm",u,d))}else if(C==="main"||!C){var _=M2("textrm",u,d);return qs(s,_,i,n,a.concat(u,d))}else{var E=M2(C,u,d);return qs(s,E,i,n,a.concat(E,u,d))}}
vendor: 18,045 bytes, line 1055
1055else throw new Error("unexpected type: "+r+" in makeOrd")},ZRe=(e,t)=>{if(qh(e.classes)!==qh(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},vre=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof co&&r instanceof co&&ZRe(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},r9=function(t){for(var n=0,r=0,i=0,s=0;s<t.children.length;s++){var a=t.children[s];a.height>n&&(n=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},$e=function(t,n,r,i){var s=new Wx(t,n,r,i);return r9(s),s},Wh=(e,t,n,r)=>new Wx(e,t,n,r),qg=function(t,n,r){var i=$e([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=Qe(i.height),i.maxFontSize=1,i},JRe=function(t,n,r,i){var s=new o3(t,n,r,i);return r9(s),s},md=function(t){var n=new Gx(t);return r9(n),n},Gg=function(t,n){return t instanceof Gx?$e([],[t],n):t},eOe=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,s=i,a=1;a<n.length;a++){var o=-n[a].shift-s-n[a].elem.depth,c=o-(n[a-1].elem.height+n[a-1].elem.depth);s=s+o,r.push({type:"kern",size:c}),r.push(n[a])}return{children:r,depth:i}}var u;if(t.positionType==="top"){for(var d=t.positionData,h=0;h<t.children.length;h++){var f=t.children[h];d-=f.type==="kern"?f.size:f.elem.height+f.elem.depth}u=d}else if(t.positionType==="bottom")u=-t.positionData;else{var m=t.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")u=-m.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-m.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},qn=function(t,n){for(var{children:r,depth:i}=eOe(t),s=0,a=0;a<r.length;a++){var o=r[a];if(o.type==="elem"){var c=o.elem;s=Math.max(s,c.maxFontSize,c.height)}}s+=2;var u=$e(["pstrut"],[]);u.style.height=Qe(s);for(var d=[],h=i,f=i,m=i,p=0;p<r.length;p++){var x=r[p];if(x.type==="kern")m+=x.size;else{var v=x.elem,g=x.wrapperClasses||[],y=x.wrapperStyle||{},w=$e(g,[u,v],void 0,y);w.style.top=Qe(-s-m-v.depth),x.marginLeft&&(w.style.marginLeft=x.marginLeft),x.marginRight&&(w.style.marginRight=x.marginRight),d.push(w),m+=v.height+v.depth}h=Math.min(h,m),f=Math.max(f,m)}var S=$e(["vlist"],d);S.style.height=Qe(f);var C;if(h<0){var k=$e([],[]),_=$e(["vlist"],[k]);_.style.height=Qe(-h);var E=$e(["vlist-s"],[new co("â")]);C=[$e(["vlist-r"],[S,E]),$e(["vlist-r"],[_])]}else C=[$e(["vlist-r"],[S])];var A=$e(["vlist-t"],C);return C.length===2&&A.classes.push("vlist-t2"),A.height=f,A.depth=-h,A},wre=(e,t)=>{var n=$e(["mspace"],[],t),r=qr(e,t);return n.style.marginRight=Qe(r),n},M2=(e,t,n)=>{var r,i;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return t==="textbf"&&n==="textit"?i="BoldItalic":t==="textbf"?i="Bold":n==="textit"?i="Italic":i="Regular",r+"-"+i},FA={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Sre={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Cre=function(t,n){var[r,i,s]=Sre[t],a=new Gh(r),o=new Gu([a],{width:Qe(i),height:Qe(s),style:"width:"+Qe(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=Wh(["overlay"],[o],n);return c.height=s,c.style.height=Qe(s),c.style.width=Qe(i),c},Ur={number:3,unit:"mu"},jf={number:4,unit:"mu"},Hc={number:5,unit:"mu"},tOe={mord:{mop:Ur,mbin:jf,mrel:Hc,minner:Ur},mop:{mord:Ur,mop:Ur,mrel:Hc,minner:Ur},mbin:{mord:jf,mop:jf,mopen:jf,minner:jf},mrel:{mord:Hc,mop:Hc,mopen:Hc,minner:Hc},mopen:{},mclose:{mop:Ur,mbin:jf,mrel:Hc,minner:Ur},mpunct:{mord:Ur,mop:Ur,mrel:Hc,mopen:Ur,mclose:Ur,mpunct:Ur,minner:Ur},minner:{mord:Ur,mop:Ur,mbin:jf,mrel:Hc,mopen:Ur,mpunct:Ur,minner:Ur}},nOe={mord:{mop:Ur},mop:{mord:Ur,mop:Ur},mbin:{},mrel:{},mopen:{},mclose:{mop:Ur},mpunct:{},minner:{mop:Ur}},kre={},V4={},H4={};function lt(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)kre[n[c]]=o;t&&(s&&(V4[t]=s),a&&(H4[t]=a))}function bp(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;lt({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var q4=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},vi=function(t){return t.type==="ordgroup"?t.body:[t]},rOe=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),iOe=new Set(["rightmost","mrel","mclose","mpunct"]),sOe={display:Qt.DISPLAY,text:Qt.TEXT,script:Qt.SCRIPT,scriptscript:Qt.SCRIPTSCRIPT},aOe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Bi=function(t,n,r,i){i===void 0&&(i=[null,null]);for(var s=[],a=0;a<t.length;a++){var o=Yn(t[a],n);if(o instanceof Gx){var c=o.children;s.push(...c)}else s.push(o)}if(vre(s),!r)return s;var u=n;if(t.length===1){var d=t[0];d.type==="sizing"?u=n.havingSize(d.size):d.type==="styling"&&(u=n.havingStyle(sOe[d.style]))}var h=$e([i[0]||"leftmost"],[],n),f=$e([i[1]||"rightmost"],[],n),m=r==="root";return BA(s,(p,x)=>{var v=x.classes[0],g=p.classes[0];v==="mbin"&&iOe.has(g)?x.classes[0]="mord":g==="mbin"&&rOe.has(v)&&(p.classes[0]="mord")},{node:h},f,m),BA(s,(p,x)=>{var v,g,y=$A(x),w=$A(p),S=y&&w?p.hasClass("mtight")?(v=nOe[y])==null?void 0:v[w]:(g=tOe[y])==null?void 0:g[w]:null;if(S)return wre(S,u)},{node:h},f,m),s},BA=function(t,n,r,i,s){i&&t.push(i);for(var a=0;a<t.length;a++){var o=t[a],c=_re(o);if(c){BA(c.children,n,r,null,s);continue}var u=!o.hasClass("mspace");if(u){var d=n(o,r.node);d&&(r.insertAfter?r.insertAfter(d):(t.unshift(d),a++))}u?r.node=o:s&&o.hasClass("newline")&&(r.node=$e(["leftmost"])),r.insertAfter=(h=>f=>{t.splice(h+1,0,f),a++})(a)}i&&t.pop()},_re=function(t){return t instanceof Gx||t instanceof o3||t instanceof Wx&&t.hasClass("enclosing")?t:null},zA=function(t,n){var r=_re(t);if(r){var i=r.children;if(i.length){if(n==="right")return zA(i[i.length-1],"right");if(n==="left")return zA(i[0],"left")}}return t},$A=function(t,n){if(!t)return null;n&&(t=zA(t,n));var r=t.classes[0];return aOe[r]||null},Qb=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return $e(n.concat(r))},Yn=function(t,n,r){if(!t)return $e();if(V4[t.type]){var i=V4[t.type](t,n);if(r&&n.size!==r.size){i=$e(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new Ve("Got group of unknown type: '"+t.type+"'")};function R2(e,t){var n=$e(["base"],e,t),r=$e(["strut"]);return r.style.height=Qe(n.height+n.depth),n.depth&&(r.style.verticalAlign=Qe(-n.depth)),n.children.unshift(r),n}function UA(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=Bi(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var s=[],a=[],o=0;o<r.length;o++)if(a.push(r[o]),r[o].hasClass("mbin")||r[o].hasClass("mrel")||r[o].hasClass("allowbreak")){for(var c=!1;o<r.length-1&&r[o+1].hasClass("mspace")&&!r[o+1].hasClass("newline");)o++,a.push(r[o]),r[o].hasClass("nobreak")&&(c=!0);c||(s.push(R2(a,t)),a=[])}else r[o].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(R2(a,t)),a=[]),s.push(r[o]));a.length>0&&s.push(R2(a,t));var u;n?(u=R2(Bi(n,t,!0),t),u.classes=["tag"],s.push(u)):i&&s.push(i);var d=$e(["katex-html"],s);if(d.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=Qe(d.height+d.depth),d.depth&&(h.style.verticalAlign=Qe(-d.depth))}return d}function Tre(e){return new Gx(e)}class Ye{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=qh(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof wi&&this.children[r+1]instanceof wi){for(var i=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof wi;)i+=this.children[++r].toText();t.appendChild(new wi(i).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=As(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+As(qh(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class wi{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return As(this.toText())}toText(){return this.text}}class Ere{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character="â":t>=.1666&&t<=.1667?this.character="â":t>=.2222&&t<=.2223?this.character="â
":t>=.2777&&t<=.2778?this.character="â
â":t>=-.05556&&t<=-.05555?this.character="ââ£":t>=-.1667&&t<=-.1666?this.character="ââ£":t>=-.2223&&t<=-.2222?this.character="ââ£":t>=-.2778&&t<=-.2777?this.character="â
â£":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Qe(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Qe(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var oOe=new Set(["\\imath","\\jmath"]),lOe=new Set(["mrow","mtable"]),qo=function(t,n,r){return Fr[n][t]&&Fr[n][t].replace&&t.charCodeAt(0)!==55349&&!(bre.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=Fr[n][t].replace),new wi(t)},i9=function(t){return t.length===1?t[0]:new Ye("mrow",t)},cOe={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},s9=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode,i=cOe[n];if(i)return typeof i=="function"?i(e):i;var s=e.text;if(oOe.has(s))return null;if(Fr[r][s]){var a=Fr[r][s].replace;a&&(s=a)}var o=FA[n].fontName;return t9(s,o,r)?FA[n].variant:null};function dE(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof wi&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof wi&&n.text===","}else return!1}var mo=function(t,n,r){if(t.length===1){var i=pr(t[0],n);return r&&i instanceof Ye&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],a,o=0;o<t.length;o++){var c=pr(t[o],n);if(c instanceof Ye&&a instanceof Ye){if(c.type==="mtext"&&a.type==="mtext"&&c.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...c.children);continue}else if(c.type==="mn"&&a.type==="mn"){a.children.push(...c.children);continue}else if(dE(c)&&a.type==="mn"){a.children.push(...c.children);continue}else if(c.type==="mn"&&dE(a))c.children=[...a.children,...c.children],s.pop();else if((c.type==="msup"||c.type==="msub")&&c.children.length>=1&&(a.type==="mn"||dE(a))){var u=c.children[0];u instanceof Ye&&u.type==="mn"&&(u.children=[...a.children,...u.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof wi&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var h=c.children[0];h instanceof wi&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),s.pop())}}}s.push(c),a=c}return s},Yh=function(t,n,r){return i9(mo(t,n,r))},pr=function(t,n){if(!t)return new Ye("mrow");if(H4[t.type])return H4[t.type](t,n);throw new Ve("Got group of unknown type: '"+t.type+"'")};function w$(e,t,n,r,i){var s=mo(e,n),a;s.length===1&&s[0]instanceof Ye&&lOe.has(s[0].type)?a=s[0]:a=new Ye("mrow",s);var o=new Ye("annotation",[new wi(t)]);o.setAttribute("encoding","application/x-tex");var c=new Ye("semantics",[a,o]),u=new Ye("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var d=i?"katex":"katex-mathml";return $e([d],[u])}var uOe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],S$=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],C$=function(t,n){return n.size<2?t:uOe[t-1][n.size-1]};class nu{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||nu.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=S$[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new nu(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:C$(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:S$[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=C$(nu.BASESIZE,t);return this.size===n&&this.textSize===nu.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==nu.BASESIZE?["sizing","reset-size"+this.size,"size"+nu.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=WRe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}nu.BASESIZE=6;var jre=function(t){return new nu({style:t.displayMode?Qt.DISPLAY:Qt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Nre=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=$e(r,[t])}return t},dOe=function(t,n,r){var i=jre(r),s;if(r.output==="mathml")return w$(t,n,i,r.displayMode,!0);if(r.output==="html"){var a=UA(t,i);s=$e(["katex"],[a])}else{var o=w$(t,n,i,r.displayMode,!1),c=UA(t,i);s=$e(["katex"],[o,c])}return Nre(s,r)},hOe=function(t,n,r){var i=jre(r),s=UA(t,i),a=$e(["katex"],[s]);return Nre(a,r)},fOe={widehat:"^",widecheck:"Ë",widetilde:"~",utilde:"~",overleftarrow:"â",underleftarrow:"â",xleftarrow:"â",overrightarrow:"â",underrightarrow:"â",xrightarrow:"â",underbrace:"â",overbrace:"â",underbracket:"âµ",overbracket:"â´",overgroup:"â ",undergroup:"â¡",overleftrightarrow:"â",underleftrightarrow:"â",xleftrightarrow:"â",Overrightarrow:"â",xRightarrow:"â",overleftharpoon:"â¼",xleftharpoonup:"â¼",overrightharpoon:"â",xrightharpoonup:"â",xLeftarrow:"â",xLeftrightarrow:"â",xhookleftarrow:"â©",xhookrightarrow:"âª",xma
vendor: 4,197 bytes, lines 1055-1056
1055psto:"â¦",xrightharpoondown:"â",xleftharpoondown:"â½",xrightleftharpoons:"â",xleftrightharpoons:"â",xtwoheadleftarrow:"â",xtwoheadrightarrow:"â ",xlongequal:"=",xtofrom:"â",xrightleftarrows:"â",xrightequilibrium:"â",xleftequilibrium:"â","\\cdrightarrow":"â","\\cdleftarrow":"â","\\cdlongequal":"="},u3=function(t){var n=new Ye("mo",[new wi(fOe[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},mOe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},pOe=new Set(["widehat","widecheck","widetilde","utilde"]),d3=function(t,n){function r(){var o=4e5,c=t.label.slice(1);if(pOe.has(c)&&"base"in t){var u=t.base.type==="ordgroup"?t.base.body.length:1,d,h,f;if(u>5)c==="widehat"||c==="widecheck"?(d=420,o=2364,f=.42,h=c+"4"):(d=312,o=2340,f=.34,h="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],f=[0,.24,.3,.3,.36,.42][m],h=c+m):(o=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],f=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var p=new Gh(h),x=new Gu([p],{width:"100%",height:Qe(f),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:Wh([],[x],n),minWidth:0,height:f}}else{var v=[],g=mOe[c];if(!g)throw new Error('No SVG data for "'+c+'".');var[y,w,S]=g,C=S/1e3,k=y.length,_,E;if(k===1){if(g.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');_=["hide-tail"],E=[g[3]]}else if(k===2)_=["halfarrow-left","halfarrow-right"],E=["xMinYMin","xMaxYMin"];else if(k===3)_=["brace-left","brace-center","brace-right"],E=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support 1056 `+k+" children.");for(var A=0;A<k;A++){var j=new Gh(y[A]),D=new Gu([j],{width:"400em",height:Qe(C),viewB
vendor: 13,577 bytes, line 1056
1056ox:"0 0 "+o+" "+S,preserveAspectRatio:E[A]+" slice"}),M=Wh([_[A]],[D],n);if(k===1)return{span:M,minWidth:w,height:C};M.style.height=Qe(C),v.push(M)}return{span:$e(["stretchy"],v,n),minWidth:w,height:C}}}var{span:i,minWidth:s,height:a}=r();return i.height=a,i.style.height=Qe(a),s>0&&(i.style.minWidth=Qe(s)),i},gOe=function(t,n,r,i,s){var a,o=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(a=$e(["stretchy",n],[],s),n==="fbox"){var c=s.color&&s.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(n)&&u.push(new RA({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&u.push(new RA({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Gu(u,{width:"100%",height:Qe(o)});a=Wh([],[d],s)}return a.height=o,a.style.height=Qe(o),a},xOe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},yOe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function bOe(e){return e in xOe}function on(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function h3(e){var t=f3(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function f3(e){return e&&(e.type==="atom"||yOe.hasOwnProperty(e.type))?e:null}var Are=e=>{if(e instanceof co)return e;if(GRe(e)&&e.children.length===1)return Are(e.children[0])},a9=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=on(e.base,"accent"),n=r.base,e.base=n,i=qRe(Yn(e,t)),e.base=r):(r=on(e,"accent"),n=r.base);var s=Yn(n,t.havingCrampedStyle()),a=r.isShifty&&hd(n),o=0;if(a){var c,u;o=(c=(u=Are(s))==null?void 0:u.skew)!=null?c:0}var d=r.label==="\\c",h=d?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),f;if(r.isStretchy)f=d3(r,t),f=qn({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Qe(2*o)+")",marginLeft:Qe(2*o)}:void 0}]});else{var m,p;r.label==="\\vec"?(m=Cre("vec",t),p=Sre.vec[1]):(m=c3({mode:r.mode,text:r.label},t,"textord"),m=HRe(m),m.italic=0,p=m.width,d&&(h+=m.depth)),f=$e(["accent-body"],[m]);var x=r.label==="\\textcircled";x&&(f.classes.push("accent-full"),h=s.height);var v=o;x||(v-=p/2),f.style.left=Qe(v),r.label==="\\textcircled"&&(f.style.top=".2em"),f=qn({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-h},{type:"elem",elem:f}]})}var g=$e(["mord","accent"],[f],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]="mord",i):g},Mre=(e,t)=>{var n=e.isStretchy?u3(e.label):new Ye("mo",[qo(e.label,e.mode)]),r=new Ye("mover",[pr(e.base,t),n]);return r.setAttribute("accent","true"),r},vOe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));lt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=q4(t[0]),r=!vOe.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:a9,mathmlBuilder:Mre});lt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:a9,mathmlBuilder:Mre});lt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Yn(e.base,t),r=d3(e,t),i=e.label==="\\utilde"?.12:0,s=qn({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]});return $e(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=u3(e.label),r=new Ye("munder",[pr(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var O2=e=>{var t=new Ye("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};lt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Gg(Yn(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var a;e.below&&(r=t.havingStyle(n.sub()),a=Gg(Yn(e.below,r,t),t),a.classes.push(s+"-arrow-pad"));var o=d3(e,t),c=-t.fontMetrics().axisHeight+.5*o.height,u=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var d;if(a){var h=-t.fontMetrics().axisHeight+a.height+.5*o.height+.111;d=qn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:h}]})}else d=qn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return $e(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var n=u3(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=O2(pr(e.body,t));if(e.below){var s=O2(pr(e.below,t));r=new Ye("munderover",[n,s,i])}else r=new Ye("mover",[n,i])}else if(e.below){var a=O2(pr(e.below,t));r=new Ye("munder",[n,a])}else r=O2(),r=new Ye("mover",[n,r]);return r}});function Rre(e,t){var n=Bi(e.body,t,!0);return $e([e.mclass],n,t)}function Ore(e,t){var n,r=mo(e.body,t);return e.mclass==="minner"?n=new Ye("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new Ye("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new Ye("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}lt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:vi(i),isCharacterBox:hd(i)}},htmlBuilder:Rre,mathmlBuilder:Ore});var m3=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};lt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:m3(t[0]),body:vi(t[1]),isCharacterBox:hd(t[1])}}});lt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],s=t[0],a;r!=="\\stackrel"?a=m3(i):a="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:vi(i)},c={type:"supsub",mode:s.mode,base:o,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:a,body:[c],isCharacterBox:hd(c)}},htmlBuilder:Rre,mathmlBuilder:Ore});lt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:m3(t[0]),body:vi(t[0])}},htmlBuilder(e,t){var n=Bi(e.body,t,!0),r=$e([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=mo(e.body,t),r=new Ye("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var wOe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},k$=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),_$=e=>e.type==="textord"&&e.text==="@",SOe=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function COe(e,t,n){var r=wOe[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},a=n.callFunction("\\Big",[s],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),c={type:"ordgroup",mode:"math",body:[i,a,o]};return n.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function kOe(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ve("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],s=0;s<t.length;s++){for(var a=t[s],o=k$(),c=0;c<a.length;c++)if(!_$(a[c]))o.body.push(a[c]);else{r.push(o),c+=1;var u=h3(a[c]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(u))if("<>AV".includes(u))for(var h=0;h<2;h++){for(var f=!0,m=c+1;m<a.length;m++){if(SOe(a[m],u)){f=!1,c=m;break}if(_$(a[m]))throw new Ve("Missing a "+u+" character to complete a CD arrow.",a[m]);d[h].body.push(a[m])}if(f)throw new Ve("Missing a "+u+" character to complete a CD arrow.",a[c])}else throw new Ve('Expected one of "<>AV=|." after @',a[c]);var p=COe(u,d,e),x={type:"styling",body:[p],mode:"math",style:"display",resetFont:!0};r.push(x),o=k$()}s%2===0?r.push(o):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}lt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Gg(Yn(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Qe(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Ye("mrow",[pr(e.label,t)]);return n=new Ye("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ye("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});lt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Gg(Yn(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Ye("mrow",[pr(e.fragment,t)])}});lt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=on(t[0],"ordgroup"),i=r.body,s="",a=0;a<i.length;a++){var o=on(i[a],"textord");s+=o.text}var c=parseInt(s),u;if(isNaN(c))throw new Ve("\\@char has non-numeric argument "+s);if(c<0||c>=1114111)throw new Ve("\\@char with invalid code point "+s);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:n.mode,text:u}}});var Dre=(e,t)=>{var n=Bi(e.body,t.withColor(e.color),!1);return md(n)},Lre=(e,t)=>{var n=mo(e.body,t.withColor(e.color)),r=new Ye("mstyle",n);return r.setAttribute("mathcolor",e.color),r};lt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=on(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:vi(i)}},htmlBuilder:Dre,mathmlBuilder:Lre});lt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=on(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:s}},htmlBuilder:Dre,mathmlBuilder:Lre});lt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTe
1056X, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:i&&on(i,"size").value}},htmlBuilder(e,t){var n=$e(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Qe(qr(e.size,t)))),n},mathmlBuilder(e,t){var n=new Ye("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Qe(qr(e.size,t)))),n}});var VA={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Pre=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ve("Expected a control sequence",e);return t},_Oe=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Ire=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};lt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(VA[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=VA[r.text]),on(t.parseFunction(),"internal");throw new Ve("Invalid token after macro prefix",r)}});lt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Ve("Expected a control sequence",r);for(var s=0,a,o=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){a=t.gullet.future(),o[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ve('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Ve('Argument number "'+r.text+'" out of order');s++,o.push([])}else{if(r.text==="EOF")throw new Ve("Expected a macro definition");o[s].push(r.text)}var{tokens:c}=t.gullet.consumeArg();return a&&c.unshift(a),(n==="\\edef"||n==="\\xdef")&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:s,delimiters:o},n===VA[n]),{type:"internal",mode:t.mode}}});lt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Pre(t.gullet.popToken());t.gullet.consumeSpaces();var i=_Oe(t);return Ire(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});lt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Pre(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return Ire(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var p1=function(t,n,r){var i=Fr.math[t]&&Fr.math[t].replace,s=t9(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},o9=function(t,n,r,i){var s=r.havingBaseStyle(n),a=$e(i.concat(s.sizingClasses(r)),[t],r),o=s.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},Fre=function(t,n,r){var i=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Qe(s),t.height-=s,t.depth+=s},TOe=function(t,n,r,i,s,a){var o=qs(t,"Main-Regular",s,i),c=o9(o,n,i,a);return Fre(c,i,n),c},EOe=function(t,n,r,i){return qs(t,"Size"+n+"-Regular",r,i)},Bre=function(t,n,r,i,s,a){var o=EOe(t,n,s,i),c=o9($e(["delimsizing","size"+n],[o],i),Qt.TEXT,i,a);return r&&Fre(c,i,Qt.TEXT),c},hE=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=$e(["delimsizinginner",i],[$e([],[qs(t,n,r)])]);return{type:"elem",elem:s}},fE=function(t,n,r){var i=rc["Size4-Regular"][t.charCodeAt(0)]?rc["Size4-Regular"][t.charCodeAt(0)][4]:rc["Size1-Regular"][t.charCodeAt(0)][4],s=new Gh("inner",IRe(t,Math.round(1e3*n))),a=new Gu([s],{width:Qe(i),height:Qe(n),style:"width:"+Qe(i),viewB
vendor: 8,101 bytes, line 1056
1056ox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=Wh([],[a],r);return o.height=n,o.style.height=Qe(n),o.style.width=Qe(i),{type:"elem",elem:o}},HA=.008,D2={type:"kern",size:-1*HA},jOe=new Set(["|","\\lvert","\\rvert","\\vert"]),NOe=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),zre=function(t,n,r,i,s,a){var o,c,u,d,h="",f=0;o=u=d=t,c=null;var m="Size1-Regular";t==="\\uparrow"?u=d="â":t==="\\Uparrow"?u=d="â":t==="\\downarrow"?o=u="â":t==="\\Downarrow"?o=u="â":t==="\\updownarrow"?(o="\\uparrow",u="â",d="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",u="â",d="\\Downarrow"):jOe.has(t)?(u="â£",h="vert",f=333):NOe.has(t)?(u="â¥",h="doublevert",f=556):t==="["||t==="\\lbrack"?(o="â¡",u="â¢",d="â£",m="Size4-Regular",h="lbrack",f=667):t==="]"||t==="\\rbrack"?(o="â¤",u="â¥",d="â¦",m="Size4-Regular",h="rbrack",f=667):t==="\\lfloor"||t==="â"?(u=o="â¢",d="â£",m="Size4-Regular",h="lfloor",f=667):t==="\\lceil"||t==="â"?(o="â¡",u=d="â¢",m="Size4-Regular",h="lceil",f=667):t==="\\rfloor"||t==="â"?(u=o="â¥",d="â¦",m="Size4-Regular",h="rfloor",f=667):t==="\\rceil"||t==="â"?(o="â¤",u=d="â¥",m="Size4-Regular",h="rceil",f=667):t==="("||t==="\\lparen"?(o="â",u="â",d="â",m="Size4-Regular",h="lparen",f=875):t===")"||t==="\\rparen"?(o="â",u="â",d="â ",m="Size4-Regular",h="rparen",f=875):t==="\\{"||t==="\\lbrace"?(o="â§",c="â¨",d="â©",u="âª",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="â«",c="â¬",d="â",u="âª",m="Size4-Regular"):t==="\\lgroup"||t==="â®"?(o="â§",d="â©",u="âª",m="Size4-Regular"):t==="\\rgroup"||t==="â¯"?(o="â«",d="â",u="âª",m="Size4-Regular"):t==="\\lmoustache"||t==="â°"?(o="â§",d="â",u="âª",m="Size4-Regular"):(t==="\\rmoustache"||t==="â±")&&(o="â«",d="â©",u="âª",m="Size4-Regular");var p=p1(o,m,s),x=p.height+p.depth,v=p1(u,m,s),g=v.height+v.depth,y=p1(d,m,s),w=y.height+y.depth,S=0,C=1;if(c!==null){var k=p1(c,m,s);S=k.height+k.depth,C=2}var _=x+w+S,E=Math.max(0,Math.ceil((n-_)/(C*g))),A=_+E*C*g,j=i.fontMetrics().axisHeight;r&&(j*=i.sizeMultiplier);var D=A/2-j,M=[];if(h.length>0){var $=A-x-w,B=Math.round(A*1e3),z=FRe(h,Math.round($*1e3)),O=new Gh(h,z),P=Qe(f/1e3),I=Qe(B/1e3),q=new Gu([O],{width:P,height:I,viewBox:"0 0 "+f+" "+B}),R=Wh([],[q],i);R.height=B/1e3,R.style.width=P,R.style.height=I,M.push({type:"elem",elem:R})}else{if(M.push(hE(d,m,s)),M.push(D2),c===null){var xe=A-x-w+2*HA;M.push(fE(u,xe,i))}else{var me=(A-x-w-S)/2+2*HA;M.push(fE(u,me,i)),M.push(D2),M.push(hE(c,m,s)),M.push(D2),M.push(fE(u,me,i))}M.push(D2),M.push(hE(o,m,s))}var U=i.havingBaseStyle(Qt.TEXT),ae=qn({positionType:"bottom",positionData:D,children:M});return o9($e(["delimsizing","mult"],[ae],U),Qt.TEXT,i,a)},mE=80,pE=.08,gE=function(t,n,r,i,s){var a=PRe(t,i,r),o=new Gh(t,a),c=new Gu([o],{width:"400em",height:Qe(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Wh(["hide-tail"],[c],s)},AOe=function(t,n){var r=n.havingBaseSizing(),i=qre("\\surd",t*r.sizeMultiplier,Hre,r),s=r.sizeMultiplier,a=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,c,u,d,h;return i.type==="small"?(d=1e3+1e3*a+mE,t<1?s=1:t<1.4&&(s=.7),c=(1+a+pE)/s,u=(1+a)/s,o=gE("sqrtMain",c,d,a,n),o.style.minWidth="0.853em",h=.833/s):i.type==="large"?(d=(1e3+mE)*Z1[i.size],u=(Z1[i.size]+a)/s,c=(Z1[i.size]+a+pE)/s,o=gE("sqrtSize"+i.size,c,d,a,n),o.style.minWidth="1.02em",h=1/s):(c=t+a+pE,u=t+a,d=Math.floor(1e3*t+a)+mE,o=gE("sqrtTall",c,d,a,n),o.style.minWidth="0.742em",h=1.056),o.height=u,o.style.height=Qe(c),{span:o,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+a)*s}},$re=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","\\surd"]),MOe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±"]),Ure=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Z1=[0,1.2,1.8,2.4,3],Vre=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="â¨"?t="\\langle":(t===">"||t==="\\gt"||t==="â©")&&(t="\\rangle"),$re.has(t)||Ure.has(t))return Bre(t,n,!1,r,i,s);if(MOe.has(t))return zre(t,Z1[n],!1,r,i,s);throw new Ve("Illegal delimiter: '"+t+"'")},ROe=[{type:"small",style:Qt.SCRIPTSCRIPT},{type:"small",style:Qt.SCRIPT},{type:"small",style:Qt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],OOe=[{type:"small",style:Qt.SCRIPTSCRIPT},{type:"small",style:Qt.SCRIPT},{type:"small",style:Qt.TEXT},{type:"stack"}],Hre=[{type:"small",style:Qt.SCRIPTSCRIPT},{type:"small",style:Qt.SCRIPT},{type:"small",style:Qt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],DOe=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var n=t.type;throw new Error("Add support for delim type '"+n+"' here.")},qre=function(t,n,r,i){for(var s=Math.min(2,3-i.style.size),a=s;a<r.length;a++){var o=r[a];if(o.type==="stack")break;var c=p1(t,DOe(o),"math"),u=c.height+c.depth;if(o.type==="small"){var d=i.havingBaseStyle(o.style);u*=d.sizeMultiplier}if(u>n)return o}return r[r.length-1]},qA=function(t,n,r,i,s,a){t==="<"||t==="\\lt"||t==="â¨"?t="\\langle":(t===">"||t==="\\gt"||t==="â©")&&(t="\\rangle");var o;Ure.has(t)?o=ROe:$re.has(t)?o=Hre:o=OOe;var c=qre(t,n,o,i);return c.type==="small"?TOe(t,c.style,r,i,s,a):c.type==="large"?Bre(t,c.size,r,i,s,a):zre(t,n,r,i,s,a)},xE=function(t,n,r,i,s,a){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,c=901,u=5/i.fontMetrics().ptPerEm,d=Math.max(n-o,r+o),h=Math.max(d/500*c,2*d-u);return qA(t,h,!0,i,s,a)},T$={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},LOe=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","<",">","\\langle","â¨","\\rangle","â©","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function E$(e){return"isMiddle"in e}function p3(e,t){var n=f3(e);if(n&&LOe.has(n.text))return n;throw n?new Ve("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ve("Invalid delimiter type '"+e.type+"'",e)}lt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=p3(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:T$[e.funcName].size,mclass:T$[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?$e([e.mclass]):Vre(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(qo(e.delim,e.mode));var n=new Ye("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=Qe(Z1[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function j$(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}lt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");
vendor: 6,398 bytes, line 1056
1056if(n&&typeof n!="string")throw new Ve("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:p3(t[0],e).text,color:n}}});lt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=p3(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=on(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{j$(e);for(var n=Bi(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,a=0;a<n.length;a++){var o=n[a];E$(o)?s=!0:(r=Math.max(n[a].height,r),i=Math.max(n[a].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c;if(e.left==="."?c=Qb(t,["mopen"]):c=xE(e.left,r,i,t,e.mode,["mopen"]),n.unshift(c),s)for(var u=1;u<n.length;u++){var d=n[u];if(E$(d)){var h=d.isMiddle;n[u]=xE(h.delim,r,i,h.options,e.mode,[])}}var f;if(e.right===".")f=Qb(t,["mclose"]);else{var m=e.rightColor?t.withColor(e.rightColor):t;f=xE(e.right,r,i,m,e.mode,["mclose"])}return n.push(f),$e(["minner"],n,t)},mathmlBuilder:(e,t)=>{j$(e);var n=mo(e.body,t);if(e.left!=="."){var r=new Ye("mo",[qo(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new Ye("mo",[qo(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return i9(n)}});lt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=p3(t[0],e);if(!e.parser.leftrightDepth)throw new Ve("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=Qb(t,[]):(n=Vre(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?qo("|","text"):qo(e.delim,e.mode),r=new Ye("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var g3=(e,t)=>{var n=Gg(Yn(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,a,o=hd(e.body);if(r==="sout")s=$e(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,a=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var c=qr({number:.6,unit:"pt"},t),u=qr({number:.35,unit:"ex"},t),d=t.havingBaseSizing();i=i/d.sizeMultiplier;var h=n.height+n.depth+c+u;n.style.paddingLeft=Qe(h/2+c);var f=Math.floor(1e3*h*i),m=DRe(f),p=new Gu([new Gh("phase",m)],{width:"400em",height:Qe(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=Wh(["hide-tail"],[p],t),s.style.height=Qe(h),a=n.depth+c+u}else{/cancel/.test(r)?o||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var x,v,g=0;/box/.test(r)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(r==="colorbox"?0:g),v=x):r==="angl"?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*g,v=Math.max(0,.25-n.depth)):(x=o?.2:0,v=x),s=gOe(n,r,x,v,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=Qe(g)):r==="angl"&&g!==.049&&(s.style.borderTopWidth=Qe(g),s.style.borderRightWidth=Qe(g)),a=n.depth+v,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=qn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:n,shift:0}]});else{var w=/cancel|phase/.test(r)?["svg-align"]:[];y=qn({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:w}]})}return/cancel/.test(r)&&(y.height=n.height,y.depth=n.depth),/cancel/.test(r)&&!o?$e(["mord","cancel-lap"],[y],t):$e(["mord"],[y],t)},x3=(e,t)=>{var n,r=new Ye(e.label.includes("colorbox")?"mpadded":"menclose",[pr(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+Qe(i)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};lt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=on(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:a}},htmlBuilder:g3,mathmlBuilder:x3});lt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=on(t[0],"color-token").color,a=on(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:g3,mathmlBuilder:x3});lt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});lt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:g3,mathmlBuilder:x3});lt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:g3,mathmlBuilder:x3});lt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var Gre={};function Mc(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:
vendor: 2,877 bytes, line 1056
1056a}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)Gre[n[c]]=o;s&&(V4[t]=s),a&&(H4[t]=a)}var Wre={};function F(e,t){Wre[e]=t}class pa{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new pa(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class io{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new io(n,pa.range(this,t))}}function N$(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var y3=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Ve("{"+e.envName+"} can be used only in display mode.")},POe=new Set(["gather","gather*"]);function l9(e){if(!e.includes("ed"))return!e.includes("*")}function ff(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:s,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:h,leqno:f}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new Ve("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var p=[],x=[p],v=[],g=[],y=c!=null?[]:void 0;function w(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function S(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new io("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),g.push(N$(e));;){var C=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var k={type:"ordgroup",mode:e.mode,body:C};n&&(k={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[k]}),p.push(k);var _=e.fetch().text;if(_==="&"){if(h&&p.length===h){if(u||o)throw new Ve("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(_==="\\end"){S(),p.length===1&&k.type==="styling"&&k.body.length===1&&k.body[0].type==="ordgroup"&&k.body[0].body.length===0&&(x.length>1||!d)&&x.pop(),g.length<x.length+1&&g.push([]);break}else if(_==="\\\\"){e.consume();var E=void 0;e.gullet.future().text!==" "&&(E=e.parseSizeGroup(!0)),v.push(E?E.value:null),S(),g.push(N$(e)),p=[],x.push(p),w()}else throw new Ve("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:a,body:x,cols:s,rowGaps:v,hskipBeforeAndAfter:r,hLinesBeforeRow:g,colSeparationType:o,tags:y,leqno:f}}function c9(e){return e.slice(0,1)==="d"?"display":"text"}
vendor: 5,048 bytes, line 1056
1056var Rc=function(t,n){var r,i,s=t.body.length,a=t.hLinesBeforeRow,o=0,c=new Array(s),u=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),h=1/n.fontMetrics().ptPerEm,f=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var m=n.havingStyle(Qt.SCRIPT).sizeMultiplier;f=.2778*(m/n.sizeMultiplier)}var p=t.colSeparationType==="CD"?qr({number:3,unit:"ex"},n):12*h,x=3*h,v=t.arraystretch*p,g=.7*v,y=.3*v,w=0;function S(Me){for(var ut=0;ut<Me.length;++ut)ut>0&&(w+=.25),u.push({pos:w,isDashed:Me[ut]})}for(S(a[0]),r=0;r<t.body.length;++r){var C=t.body[r],k=g,_=y;o<C.length&&(o=C.length);var E={cells:new Array(C.length),height:0,depth:0,pos:0};for(i=0;i<C.length;++i){var A=Yn(C[i],n);_<A.depth&&(_=A.depth),k<A.height&&(k=A.height),E.cells[i]=A}var j=t.rowGaps[r],D=0;j&&(D=qr(j,n),D>0&&(D+=y,_<D&&(_=D),D=0)),t.addJot&&r<t.body.length-1&&(_+=x),E.height=k,E.depth=_,w+=k,E.pos=w,w+=_+D,c[r]=E,S(a[r+1])}var M=w/2+n.fontMetrics().axisHeight,$=t.cols||[],B=[],z,O,P=[];if(t.tags&&t.tags.some(Me=>Me))for(r=0;r<s;++r){var I=c[r],q=I.pos-M,R=t.tags[r],xe=void 0;R===!0?xe=$e(["eqn-num"],[],n):R===!1?xe=$e([],[],n):xe=$e([],Bi(R,n,!0),n),xe.depth=I.depth,xe.height=I.height,P.push({type:"elem",elem:xe,shift:q})}for(i=0,O=0;i<o||O<$.length;++i,++O){for(var me,U=$[O],ae=!0;((Ce=U)==null?void 0:Ce.type)==="separator";){var Ce;if(ae||(z=$e(["arraycolsep"],[]),z.style.width=Qe(n.fontMetrics().doubleRuleSep),B.push(z)),U.separator==="|"||U.separator===":"){var je=U.separator==="|"?"solid":"dashed",ve=$e(["vertical-separator"],[],n);ve.style.height=Qe(w),ve.style.borderRightWidth=Qe(d),ve.style.borderRightStyle=je,ve.style.margin="0 "+Qe(-d/2);var Te=w-M;Te&&(ve.style.verticalAlign=Qe(-Te)),B.push(ve)}else throw new Ve("Invalid separator type: "+U.separator);O++,U=$[O],ae=!1}if(!(i>=o)){var Se=void 0;if(i>0||t.hskipBeforeAndAfter){var He,tt;Se=(He=(tt=U)==null?void 0:tt.pregap)!=null?He:f,Se!==0&&(z=$e(["arraycolsep"],[]),z.style.width=Qe(Se),B.push(z))}var we=[];for(r=0;r<s;++r){var Oe=c[r],Je=Oe.cells[i];if(Je){var It=Oe.pos-M;Je.depth=Oe.depth,Je.height=Oe.height,we.push({type:"elem",elem:Je,shift:It})}}var mt=qn({positionType:"individualShift",children:we}),De=$e(["col-align-"+(((me=U)==null?void 0:me.align)||"c")],[mt]);if(B.push(De),i<o-1||t.hskipBeforeAndAfter){var Pe,ct;Se=(Pe=(ct=U)==null?void 0:ct.postgap)!=null?Pe:f,Se!==0&&(z=$e(["arraycolsep"],[]),z.style.width=Qe(Se),B.push(z))}}}var Tn=$e(["mtable"],B);if(u.length>0){for(var Nn=qg("hline",n,d),ln=qg("hdashline",n,d),Bn=[{type:"elem",elem:Tn,shift:0}];u.length>0;){var Sn=u.pop(),zr=Sn.pos-M;Sn.isDashed?Bn.push({type:"elem",elem:ln,shift:zr}):Bn.push({type:"elem",elem:Nn,shift:zr})}Tn=qn({positionType:"individualShift",children:Bn})}if(P.length===0)return $e(["mord"],[Tn],n);var or=qn({positionType:"individualShift",children:P}),ge=$e(["tag"],[or],n);return md([Tn,ge])},IOe={c:"center ",l:"left ",r:"right "},Oc=function(t,n){for(var r=[],i=new Ye("mtd",[],["mtr-glue"]),s=new Ye("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var o=t.body[a],c=[],u=0;u<o.length;u++)c.push(new Ye("mtd",[pr(o[u],n)]));t.tags&&t.tags[a]&&(c.unshift(i),c.push(i),t.leqno?c.unshift(s):c.push(s)),r.push(new Ye("mtr",c))}var d=new Ye("mtable",r),h=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);d.setAttribute("rowspacing",Qe(h));var f="",m="";if(t.cols&&t.cols.length>0){var p=t.cols,x="",v=!1,g=0,y=p.length;p[0].type==="separator"&&(f+="top ",g=1),p[p.length-1].type==="separator"&&(f+="bottom ",y-=1);for(var w=g;w<y;w++){var S=p[w];S.type==="align"?(m+=IOe[S.align],v&&(x+="none "),v=!0):S.type==="separator"&&v&&(x+=S.separator==="|"?"solid ":"dashed ",v=!1)}d.setAttribute("columnalign",m.trim()),/[sd]/.test(x)&&d.setAttribute("columnlines",x.trim())}if(t.colSeparationType==="align"){for(var C=t.cols||[],k="",_=1;_<C.length;_++)k+=_%2?"0em ":"1em ";d.setAttribute("columnspacing",k.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var E="",A=t.hLinesBeforeRow;f+=A[0].length>0?"left ":"",f+=A[A.length-1].length>0?"right ":"";for(var j=1;j<A.length-1;j++)E+=A[j].length===0?"none ":A[j][0]?"dashed ":"solid ";return/[sd]/.test(E)&&d.setAttribute("rowlines",E.trim()),f!==""&&(d=new Ye("menclose",[d]),d.setAttribute("notation",f.trim())),t.arraystretch&&t.arraystretch<1&&(d=new Ye("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},Yre=function(t,n){t.envName.includes("ed")||y3(t);var r=[],i=t.envName.includes("at")?"alignat":"align",s=t.envName==="split",a=ff(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:l9(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,c=0,u={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var d="",h=0;h<n[0].body.length;h++){var f=on(n[0].body[h],"textord");d+=f.text}
vendor: 30,995 bytes, line 1056
1056o=Number(d),c=o*2}var m=!c;a.body.forEach(function(g){for(var y=1;y<g.length;y+=2){var w=on(g[y],"styling"),S=on(w.body[0],"ordgroup");S.body.unshift(u)}if(m)c<g.length&&(c=g.length);else{var C=g.length/2;if(o<C)throw new Ve("Too many math in a row: "+("expected "+o+", but got "+C),g[0])}});for(var p=0;p<c;++p){var x="r",v=0;p%2===1?x="l":p>0&&m&&(v=1),r[p]={type:"align",align:x,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};Mc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=f3(t[0]),r=n?[t[0]]:on(t[0],"ordgroup").body,i=r.map(function(a){var o=h3(a),c=o.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new Ve("Unknown column alignment: "+c,a)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return ff(e.parser,s,c9(e.envName))},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!"lcr".includes(n))throw new Ve("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=ff(e.parser,r,c9(e.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=ff(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=f3(t[0]),r=n?[t[0]]:on(t[0],"ordgroup").body,i=r.map(function(o){var c=h3(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Ve("Unknown column alignment: "+u,o)});if(i.length>1)throw new Ve("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},a=ff(e.parser,s,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ve("{subarray} can contain only one column");return a},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=ff(e.parser,t,c9(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Yre,htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){POe.has(e.envName)&&y3(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:l9(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ff(e.parser,t,"display")},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Yre,htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){y3(e);var t={autoTag:l9(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ff(e.parser,t,"display")},htmlBuilder:Rc,mathmlBuilder:Oc});Mc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return y3(e),kOe(e.parser)},htmlBuilder:Rc,mathmlBuilder:Oc});F("\\nonumber","\\gdef\\@eqnsw{0}");F("\\notag","\\nonumber");lt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ve(e.funcName+" valid only within array environment")}});var A$=Gre;lt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new Ve("Invalid environment name",i);for(var s="",a=0;a<i.body.length;++a)s+=on(i.body[a],"textord").text;if(r==="\\begin"){if(!A$.hasOwnProperty(s))throw new Ve("No such environment: "+s,i);var o=A$[s],{args:c,optArgs:u}=n.parseArguments("\\begin{"+s+"}",o),d={mode:n.mode,envName:s,parser:n},h=o.handler(d,c,u);n.expect("\\end",!1);var f=n.nextToken,m=on(n.parseFunction(),"environment");if(m.name!==s)throw new Ve("Mismatch: \\begin{"+s+"} matched by \\end{"+m.name+"}",f);return h}return{type:"environment",mode:n.mode,name:s,nameGroup:i}}});var Kre=(e,t)=>{var n=e.font,r=t.withFont(n);return Yn(e.body,r)},Xre=(e,t)=>{var n=e.font,r=t.withFont(n);return pr(e.body,r)},M$={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};lt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=q4(t[0]),s=r;return s in M$&&(s=M$[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:Kre,mathmlBuilder:Xre});lt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"mclass",mode:n.mode,mclass:m3(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:hd(r)}}});lt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:s}=n,a=n.parseExpression(!0,i);return{type:"font",mode:s,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:Kre,mathmlBuilder:Xre});var FOe=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var a=Yn(e.numer,s,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<c?c:a.depth}s=t.havingStyle(i);var u=Yn(e.denom,s,t),d,h,f;e.hasBarLine?(e.barSize?(h=qr(e.barSize,t),d=qg("frac-line",t,h)):d=qg("frac-line",t),h=d.height,f=d.height):(d=null,h=0,f=t.fontMetrics().defaultRuleThickness);var m,p,x;n.size===Qt.DISPLAY.size?(m=t.fontMetrics().num1,h>0?p=3*f:p=7*f,x=t.fontMetrics().denom1):(h>0?(m=t.fontMetrics().num2,p=f):(m=t.fontMetrics().num3,p=3*f),x=t.fontMetrics().denom2);var v;if(d){var y=t.fontMetrics().axisHeight;m-a.depth-(y+.5*h)<p&&(m+=p-(m-a.depth-(y+.5*h))),y-.5*h-(u.height-x)<p&&(x+=p-(y-.5*h-(u.height-x)));var w=-(y-.5*h);v=qn({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:d,shift:w},{type:"elem",elem:a,shift:-m}]})}else{var g=m-a.depth-(u.height-x);g<p&&(m+=.5*(p-g),x+=.5*(p-g)),v=qn({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:a,shift:-m}]})}s=t.havingStyle(n),v.height*=s.sizeMultiplier/t.sizeMultiplier,v.depth*=s.sizeMultiplier/t.sizeMultiplier;var S;n.size===Qt.DISPLAY.size?S=t.fontMetrics().delim1:n.size===Qt.SCRIPTSCRIPT.size?S=t.havingStyle(Qt.SCRIPT).fontMetrics().delim2:S=t.fontMetrics().delim2;var C,k;return e.leftDelim==null?C=Qb(t,["mopen"]):C=qA(e.leftDelim,S,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?k=$e([]):e.rightDelim==null?k=Qb(t,["mclose"]):k=qA(e.rightDelim,S,!0,t.havingStyle(n),e.mode,["mclose"]),$e(["mord"].concat(s.sizingClasses(t)),[C,$e(["mfrac"],[v]),k],t)},BOe=(e,t)=>{var n=new Ye("mfrac",[pr(e.numer,t),pr(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=qr(e.barSize,t);n.setAttribute("linethickness",Qe(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var s=new Ye("mo",[new wi(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}if(i.push(n),e.rightDelim!=null){var a=new Ye("mo",[new wi(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}return i9(i)}return n},Qre=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};lt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1],a,o=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",c=")";break;case"\\\\bracefrac":a=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;return u||r.startsWith("\\d")?d="display":r.startsWith("\\t")&&(d="text"),Qre({type:"genfrac",mode:n.mode,numer:i,denom:s,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},d)},htmlBuilder:FOe,mathmlBuilder:BOe});lt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var R$=["display","text","script","scriptscript"],O$=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};lt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],s=q4(t[0]),a=s.type==="atom"&&s.family==="open"?O$(s.text):null,o=q4(t[1]),c=o.type==="atom"&&o.family==="close"?O$(o.text):null,u=on(t[2],"size"),d,h=null;u.isBlank?d=!0:(h=u.value,d=h.number>0);var f=null,m=t[3];if(m.type==="ordgroup"){if(m.body.length>0){var p=on(m.body[0],"textord");f=R$[Number(p.text)]}}else m=on(m,"textord"),f=R$[Number(m.text)];return Qre({type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:d,barSize:h,leftDelim:a,rightDelim:c},f)}});lt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:on(t[0],"size").value,token:i}}});lt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=on(t[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));var a=t[2],o=s.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var Zre=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?Yn(e.sup,t.havingStyle(n.sup()),t):Yn(e.sub,t.havingStyle(n.sub()),t),i=on(e.base,"horizBrace")):i=on(e,"horizBrace");var s=Yn(i.base,t.havingBaseStyle(Qt.DISPLAY)),a=d3(i,t),o;if(i.isOver?o=qn({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=qn({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),r){var c=$e(["minner",i.isOver?"mover":"munder"],[o],t);i.isOver?o=qn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=qn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return $e(["minner",i.isOver?"mover":"munder"],[o],t)},zOe=(e,t)=>{var n=u3(e.label);return new Ye(e.isOver?"mover":"munder",[pr(e.base,t),n])};lt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:Zre,mathmlBuilder:zOe});lt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=on(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:vi(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Bi(e.body,t,!1);return JRe(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Yh(e.body,t);return n instanceof Ye||(n=new Ye("mrow",[n])),n.setAttribute("href",e.href),n}});lt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=on(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],s=0;s<r.length;s++){var a=r[s];a==="~"&&(a="\\textasciitilde"),i.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:vi(o)}}});lt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:vi(t[0])}},htmlBuilder(e,t){var n=Bi(e.body,t.withFont(""),!1);return md(n)},mathmlBuilder(e,t){return new Ye("mrow",mo(e.body,t.withFont("")))}});lt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,s=on(t[0],"raw").string,a=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,c={};switch(r){case"\\htmlClass":c.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var u=s.split(","),d=0;d<u.length;d++){var h=u[d],f=h.indexOf("=");if(f<0)throw new Ve("\\htmlData key/value '"+h+"' missing equals sign");var m=h.slice(0,f),p=h.slice(f+1);c["data-"+m.trim()]=p}o={command:"\\htmlData",attributes:c};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(o)?{type:"html",mode:n.mode,attributes:c,body:vi(a)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Bi(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=$e(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>Yh(e.body,t)});lt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:vi(t[0]),mathml:vi(t[1])}},htmlBuilder:(e,t)=>{var n=Bi(e.html,t,!1);return md(n)},mathmlBuilder:(e,t)=>Yh(e.mathml,t)});var yE=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ve("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!mre(r))throw new Ve("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};lt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(n[0])for(var c=on(n[0],"raw").string,u=c.split(","),d=0;d<u.length;d++){var h=u[d].split("=");if(h.length===2){var f=h[1].trim();switch(h[0].trim()){case"alt":o=f;break;case"width":i=yE(f);break;case"height":s=yE(f);break;case"totalheight":a=yE(f);break;default:throw new Ve("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var m=on(t[0],"url").url;return o===""&&(o=m,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:r.mode,alt:o,width:i,height:s,totalheight:a,src:m}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=qr(e.height,t),r=0;e.totalheight.number>0&&(r=qr(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=qr(e.width,t));var s={height:Qe(n+r)};i>0&&(s.width=Qe(i)),r>0&&(s.verticalAlign=Qe(-r));var a=new URe(e.src,e.alt,s);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new Ye("mglyph",[]);n.setAttribute("alt",e.alt);var r=qr(e.height,t),i=0;if(e.totalheight.number>0&&(i=qr(e.totalheight,t)-r,n.setAttribute("valign",Qe(-i))),n.setAttribute("height",Qe(r+i)),e.width.number>0){var s=qr(e.width,t);n.setAttribute("width",Qe(s))}return n.setAttribute("src",e.src),n}});lt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=on(t[0],"size");if(n.settings.strict){var s=r[1]==="m",a=i.value.unit==="mu";s?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return wre(e.dimension,t)},mathmlBuilder(e,t){var n=qr(e.dimension,t);return new Ere(n)}});lt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=$e([],[Yn(e.body,t)]),n=$e(["inner"],[n],t)):n=$e(["inner"],[Yn(e.body,t)]);var r=$e(["fix"],[]),i=$e([e.alignment],[n,r],t),s=$e(["strut"]);return s.style.height=Qe(i.height+i.depth),i.depth&&(s.style.verticalAlign=Qe(-i.depth)),i.children.unshift(s),i=$e(["thinbox"],[i],t),$e(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new Ye("mpadded",[pr(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});lt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",a=r.parseExpression(!1,s);return r.expect(s),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});lt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ve("Mismatched "+e.funcName)}});var D$=(e,t)=>{switch(t.style.size){case Qt.DISPLAY.size:return e.display;case Qt.TEXT.size:return e.text;case Qt.SCRIPT.size:return e.script;case Qt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};lt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:vi(t[0]),text:vi(t[1]),script:vi(t[2]),scriptscript:vi(t[3])}},htmlBuilder:(e,t)=>{var n=D$(e,t),r=Bi(n,t,!1);return md(r)},mathmlBuilder:(e,t)=>{var n=D$(e,t);return Yh(n,t)}});var Jre=(e,t,n,r,i,s,a)=>{e=$e([],[e]);var o=n&&hd(n),c,u;if(t){var d=Yn(t,r.havingStyle(i.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=Yn(n,r.havingStyle(i.sub()),r);c={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var f;if(u&&c){var m=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;f=qn({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Qe(-s)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Qe(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var p=e.height-a;f=qn({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Qe(-s)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+a;f=qn({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Qe(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[f];if(c&&s!==0&&!o){var g=$e(["mspace"],[],r);g.style.marginRight=Qe(s),v.unshift(g)}return $e(["mop","op-limits"],v,r)},eie=new Set(["\\smallint"]),Kx=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=on(e.base,"op"),i=!0):s=on(e,"op");var a=t.style,o=!1;a.size===Qt.DISPLAY.size&&s.symbol&&!eie.has(s.name)&&(o=!0);var c,u;if(s.symbol){var d=o?"Size2-Regular":"Size1-Regular",h="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(h=s.name.slice(1),s.name=h==="oiint"?"\\iint":"\\iiint"),c=qs(s.name,d,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,h.length>0){var f=Cre(h+"Size"+(o?"2":"1"),t);c=qn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:f,shift:o?.08:0}]}),s.name="\\"+h,c.classes.unshift("mop"),c.italic=u}}else if(s.body){var m=Bi(s.body,t,!0);m.length===1&&m[0]instanceof co?(c=m[0],c.classes[0]="mop"):c=$e(["mop"],m,t)}else{for(var p=[],x=1;x<s.name.length;x++)p.push(n9(s.name[x],s.mode,t));c=$e(["mop"],p,t)}var v=0,g=0;if((c instanceof co||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift){var y;v=(c.height-c.depth)/2-t.fontMetrics().axisHeight,g=(y=c.italic)!=null?y:0}return i?Jre(c,n,r,t,a,g,v):(v&&(c.style.position="relative",c.style.top=Qe(v)),c)},dw=(e,t)=>{var n;if(e.symbol)n=new Ye("mo",[qo(e.name,e.mode)]),eie.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ye("mo",mo(e.body,t));else{n=new Ye("mi",[new wi(e.name.slice(1))]);var r=new Ye("mo",[qo("â¡","text")]);e.parentIsSupSub?n=new Ye("mrow",[n,r]):n=Tre([n,r])}return n},$Oe={"â":"\\prod","â":"\\coprod","â":"\\sum","â":"\\bigwedge","â":"\\bigvee","â":"\\bigcap","â":"\\bigcup","â¨":"\\bigodot","â¨":"\\bigoplus","â¨":"\\bigotimes","â¨":"\\biguplus","â¨":"\\bigsqcup"};lt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","â","â","â","â","â","â","â","â¨","â¨","â¨","â¨","â¨"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=$Oe[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Kx,mathmlBuilder:dw});lt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:vi(r)}},htmlBuilder:Kx,mathmlBuilder:dw});var UOe={"â«":"\\int","â¬":"\\iint","â":"\\iiint","â®":"\\oint","â¯":"\\oiint","â°":"\\oiiint"};lt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Kx,mathmlBuilder:dw});lt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Kx,mathmlBuilder:dw});lt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","â«","â¬","â","â®","â¯","â°"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=UOe[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Kx,mathmlBuilder:dw});var tie=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=on(e.base,"operatorname"),i=!0):s=on(e,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(h=>{var f="text"in h?h.text:void 0;return typeof f=="string"?{type:"textord",mode:h.mode,text:f}:h}),c=Bi(o,t.withFont("mathrm"),!0),u=0;u<c.length;u++){var d=c[u];d instanceof co&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=$e(["mop"],c,t)}else a=$e(["mop"],[],t);return i?Jre(a,n,r,t,t.style,0,0):a},VOe=(e,t)=>{for(var n=mo(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var s=n[i];if(!(s instanceof Ere))if(s instanceof Ye)switch(s.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var a=s.children[0];s.children.length===1&&a instanceof wi?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var o=n.map(d=>d.toText()).join("");n=[new wi(o)]}var c=new Ye("mi",n);c.setAttribute("mathvariant","normal");var u=new Ye("mo",[qo("â¡","text")]);return e.parentIsSupSub?new Ye("mrow",[c,u]):Tre([c,u])};lt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:vi(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:tie,mathmlBuilder:VOe});F("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");bp({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?md(Bi(e.body,t,!1)):$e(["mord"],Bi(e.body,t,!0),t)},mathmlBuilder(e,t){return Yh(e.body,t,!0)}});lt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Yn(e.body,t.havingCrampedStyle()),r=qg("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=qn({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]});return $e(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new Ye("mo",[new wi("â¾")]);n.setAttribute("stretchy","true");var r=new Ye("mover",[pr(e.body,t),n]);return r.setAttribute("accent","true"),r}});lt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:vi(r)}},htmlBuilder:(e,t)=>{var n=Bi(e.body,t.withPhantom(),!1);return md(n)},mathmlBuilder:(e,t)=>{var n=mo(e.body,t);return new Ye("mphantom",n)}});F("\\hphantom","\\smash{\\phantom{#1}}");lt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=$e(["inner"],[Yn(e.body,t.withPhantom())]),r=$e(["fix"],[]);return $e(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=mo(vi(e.body),t),r=new Ye("mphantom",n),i=new Ye("mpadded",[r]);return i.setAttribute("width","0px"),i}});lt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=on(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Yn(e.body,t),r=qr(e.dy,t);return qn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ye("mpadded",[pr(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});lt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});lt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],s=on(t[0],"size"),a=on(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&on(i,"size").value,width:s.value,height:a.value}},htmlBuilder(e,t){var n=$e(["mord","rule"],[],t),r=qr(e.width,t),i=qr(e.height,t),s=e.shift?qr(e.shift,t):0;return n.style.borderRightWidth=Qe(r),n.style.borderTopWidth=Qe(i),n.style.bottom=Qe(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=qr(e.width,t),r=qr(e.height,t),i=e.shift?qr(e.shift,t):0,s=t.color&&t.getColor()||"black",a=new Ye("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",Qe(n)),a.setAttribute("height",Qe(r));var o=new Ye("mpadded",[a]);return i>=0?o.setAttribute("height",Qe(i)):(o.setAttribute("height",Qe(i)),o.setAttribute("depth",Qe(-i))),o.setAttribute("voffset",Qe(i)),o}});function nie(e,t,n){for(var r=Bi(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s<r.length;s++){var a=r[s].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[s].classes,t.sizingClasses(n)):r[s].classes[a+1]==="reset-size"+t.size&&(r[s].classes[a+1]="reset-size"+n.size),r[s].height*=i,r[s].depth*=i}return md(r)}var L$=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],HOe=(e,t)=>{var n=t.havingSize(e.size);return nie(e.body,n,t)};lt({type:"sizing",names:L$,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:L$.indexOf(r)+1,body:s}},htmlBuilder:HOe,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=mo(e.body,n),i=new Ye("mstyle",r);return i.setAttribute("mathsize",Qe(n.sizeMultiplier)),i}});lt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,s=!1,a=n[0]&&on(n[0],"ordgroup");if(a)for(var o,c=0;c<a.body.length;++c){var u=a.body[c];if(o=h3(u).text,o==="t")i=!0;else if(o==="b")s=!0;else{i=!1,s=!1;break}}else i=!0,s=!0;var d=t[0];return{type:"smash",mode:r.mode,body:d,smashHeight:i,smashDepth:s}},htmlBuilder:(e,t)=>{var n=$e([],[Yn(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return $e(["mord","smash"],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);var i=qn({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return $e(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var n=new Ye("mpadded",[pr(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});lt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:i}},htmlBuilder(e,t){var n=Yn(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Gg(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;
vendor: 4,753 bytes, line 1056
1056t.style.id<Qt.TEXT.id&&(s=t.fontMetrics().xHeight);var a=i+s/4,o=n.height+n.depth+a+i,{span:c,ruleWidth:u,advanceWidth:d}=AOe(o,t),h=c.height-u;h>n.height+n.depth+a&&(a=(a+h-n.height-n.depth)/2);var f=c.height-n.height-a-u;n.style.paddingLeft=Qe(d);var m=qn({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+f)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var p=t.havingStyle(Qt.SCRIPTSCRIPT),x=Yn(e.index,p,t),v=.6*(m.height-m.depth),g=qn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:x}]}),y=$e(["root"],[g]);return $e(["mord","sqrt"],[y,m],t)}else return $e(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Ye("mroot",[pr(n,t),pr(r,t)]):new Ye("msqrt",[pr(n,t)])}});var GA={display:Qt.DISPLAY,text:Qt.TEXT,script:Qt.SCRIPT,scriptscript:Qt.SCRIPTSCRIPT};function qOe(e){return e in GA}lt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!0,n),a=r.slice(1,r.length-5);if(!qOe(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:i.mode,style:a,body:s}},htmlBuilder(e,t){var n=GA[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont("")),nie(e.body,r,t)},mathmlBuilder(e,t){var n=GA[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(""));var i=mo(e.body,r),s=new Ye("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var GOe=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===Qt.DISPLAY.size||r.alwaysHandleSupSub);return i?Kx:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===Qt.DISPLAY.size||r.limits);return s?tie:null}else{if(r.type==="accent")return hd(r.base)?a9:null;if(r.type==="horizBrace"){var a=!t.sub;return a===r.isOver?Zre:null}else return null}else return null};bp({type:"supsub",htmlBuilder(e,t){var n=GOe(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,a=Yn(r,t),o,c,u=t.fontMetrics(),d=0,h=0,f=r&&hd(r);if(i){var m=t.havingStyle(t.style.sup());o=Yn(i,m,t),f||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(s){var p=t.havingStyle(t.style.sub());c=Yn(s,p,t),f||(h=a.depth+p.fontMetrics().subDrop*p.sizeMultiplier/t.sizeMultiplier)}var x;t.style===Qt.DISPLAY?x=u.sup1:t.style.cramped?x=u.sup3:x=u.sup2;var v=t.sizeMultiplier,g=Qe(.5/u.ptPerEm/v),y=null;if(c){var w=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof co||w){var S;y=Qe(-((S=a.italic)!=null?S:0))}}var C;if(o&&c){d=Math.max(d,x,o.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var k=u.defaultRuleThickness,_=4*k;if(d-o.depth-(c.height-h)<_){h=_-(d-o.depth)+c.height;var E=.8*u.xHeight-(d-o.depth);E>0&&(d+=E,h-=E)}var A=[{type:"elem",elem:c,shift:h,marginRight:g,marginLeft:y},{type:"elem",elem:o,shift:-d,marginRight:g}];C=qn({positionType:"individualShift",children:A})}else if(c){h=Math.max(h,u.sub1,c.height-.8*u.xHeight);var j=[{type:"elem",elem:c,marginLeft:y,marginRight:g}];C=qn({positionType:"shift",positionData:h,children:j})}else if(o)d=Math.max(d,x,o.depth+.25*u.xHeight),C=qn({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:g}]});else throw new Error("supsub must have either sup or sub.");var D=$A(a,"right")||"mord";return $e([D],[a,$e(["msupsub"],[C])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[pr(e.base,t)];e.sub&&s.push(pr(e.sub,t)),e.sup&&s.push(pr(e.sup,t));var a;if(n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Qt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Qt.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(t.style===Qt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||t.style===Qt.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Qt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Qt.DISPLAY)?a="mover":a="msup"}return new Ye(a,s)}});bp({type:"atom",htmlBuilder(e,t){return n9(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Ye("mo",[qo(e.text,e.mode)]);if(e.family==="bin"){var r=s9(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}
vendor: 9,080 bytes, lines 1056-1060
1056else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var rie={mi:"italic",mn:"normal",mtext:"normal"};bp({type:"mathord",htmlBuilder(e,t){return c3(e,t,"mathord")},mathmlBuilder(e,t){var n=new Ye("mi",[qo(e.text,e.mode,t)]),r=s9(e,t)||"italic";return r!==rie[n.type]&&n.setAttribute("mathvariant",r),n}});bp({type:"textord",htmlBuilder(e,t){return c3(e,t,"textord")},mathmlBuilder(e,t){var n=qo(e.text,e.mode,t),r=s9(e,t)||"normal",i;return e.mode==="text"?i=new Ye("mtext",[n]):/[0-9]/.test(e.text)?i=new Ye("mn",[n]):e.text==="\\prime"?i=new Ye("mo",[n]):i=new Ye("mi",[n]),r!==rie[i.type]&&i.setAttribute("mathvariant",r),i}});var bE={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},vE={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};bp({type:"spacing",htmlBuilder(e,t){if(vE.hasOwnProperty(e.text)){var n=vE[e.text].className||"";if(e.mode==="text"){var r=c3(e,t,"textord");return r.classes.push(n),r}else return $e(["mspace",n],[n9(e.text,e.mode,t)],t)}else{if(bE.hasOwnProperty(e.text))return $e(["mspace",bE[e.text]],[],t);throw new Ve('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(vE.hasOwnProperty(e.text))n=new Ye("mtext",[new wi(" ")]);else{if(bE.hasOwnProperty(e.text))return new Ye("mspace");throw new Ve('Unknown type of space "'+e.text+'"')}return n}});var P$=()=>{var e=new Ye("mtd",[]);return e.setAttribute("width","50%"),e};bp({type:"tag",mathmlBuilder(e,t){var n=new Ye("mtable",[new Ye("mtr",[P$(),new Ye("mtd",[Yh(e.body,t)]),P$(),new Ye("mtd",[Yh(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var I$={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},F$={"\\textbf":"textbf","\\textmd":"textmd"},WOe={"\\textit":"textit","\\textup":"textup"},B$=(e,t)=>{var n=e.font;if(n){if(I$[n])return t.withTextFontFamily(I$[n]);if(F$[n])return t.withTextFontWeight(F$[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(WOe[n])};lt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:vi(i),font:r}},htmlBuilder(e,t){var n=B$(e,t),r=Bi(e.body,n,!0);return $e(["mord","text"],r,n)},mathmlBuilder(e,t){var n=B$(e,t);return Yh(e.body,n)}});lt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Yn(e.body,t),r=qg("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=qn({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]});return $e(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new Ye("mo",[new wi("â¾")]);n.setAttribute("stretchy","true");var r=new Ye("munder",[pr(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});lt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Yn(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return qn({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ye("mpadded",[pr(e.body,t)],["vcenter"]);return new Ye("mrow",[n])}});lt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ve("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=z$(e),r=[],i=t.havingStyle(t.style.text()),s=0;s<n.length;s++){var a=n[s];a==="~"&&(a="\\textasciitilde"),r.push(qs(a,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return $e(["mord","text"].concat(i.sizingClasses(t)),vre(r),i)},mathmlBuilder(e,t){var n=new wi(z$(e)),r=new Ye("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var z$=e=>e.body.replace(/ /g,e.star?"â£":" "),mh=kre,iie=`[ \r 1057 ]`,YOe="\\\\[a-zA-Z@]+",KOe="\\\\[^\uD800-\uDFFF]",XOe="("+YOe+")"+iie+"*",QOe=`\\\\( 1058|[ \r ]+ 1059?)[ \r ]*`,WA="[Ì-ͯ]",ZOe=new RegExp(WA+"+$"),JOe="("+iie+"+)|"+(QOe+"|")+"([!-\\[\\]-â§âª-í¿ï¤-ï¿¿]"+(WA+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(WA+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+XOe)+("|"+KOe+")");class $${constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(JOe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new io("EOF",new pa(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new Ve("Unexpected character: '"+t[n]+"'",new io(t[n],new pa(this,n,n+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=t.indexOf(` 1060`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new io(i,new pa(this,n,this.tokenRegex.lastIndex))}}class e9e{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ve("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(t)&&(s[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var t9e=Wre;F("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});F("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});F("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});F("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});F("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});F("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");F("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var U$={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};F("\\char",function(e){var t=e.popToken(),n,r=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ve("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=U$[t.text],r==null||r>=n)throw new Ve("Invalid base-"+n+" digit "+t.text);for(var i;(i=U$[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return"\\@char{"+r+"}"});var u9=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new Ve("\\newcommand's first argument must be a macro name");var s=i[0].text,a=e.isDefined(s);if(a&&!t)throw new Ve("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!n)throw new Ve("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Ve("Invalid number of arguments: "+c);o=parseInt(c),i=e.consumeArg().tokens}return a&&r||e.macros.set(s,{tokens:i,numArgs:o}),""};F("\\newcommand",e=>u9(e,!1,!0,!1));F("\\renewcommand",e=>u9(e,!0,!1,!1));F("\\providecommand",e=>u9(e,!0,!0,!0));F("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});F("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});F("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),mh[n],Fr.math[n],Fr.text[n]),""});F("\\bgroup","{");F("\\egroup","}");
vendor: 6,427 bytes, line 1060
1060F("~","\\nobreakspace");F("\\lq","`");F("\\rq","'");F("\\aa","\\r a");F("\\AA","\\r A");F("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");F("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");F("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");F("â¬","\\mathscr{B}");F("â°","\\mathscr{E}");F("â±","\\mathscr{F}");F("â","\\mathscr{H}");F("â","\\mathscr{I}");F("â","\\mathscr{L}");F("â³","\\mathscr{M}");F("â","\\mathscr{R}");F("â","\\mathfrak{C}");F("â","\\mathfrak{H}");F("â¨","\\mathfrak{Z}");F("\\Bbbk","\\Bbb{k}");F("\\llap","\\mathllap{\\textrm{#1}}");F("\\rlap","\\mathrlap{\\textrm{#1}}");F("\\clap","\\mathclap{\\textrm{#1}}");F("\\mathstrut","\\vphantom{(}");F("\\underbar","\\underline{\\text{#1}}");F("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');F("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`â }}");F("\\ne","\\neq");F("â ","\\neq");F("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`â}}");F("â","\\notin");F("â","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`â}}");F("â","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`â}}");F("â","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`â}}");F("â","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`â}}");F("â","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`â}}");F("â","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`â}}");F("â","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`â}}");F("â","\\perp");F("â¼","\\mathclose{!\\mkern-0.8mu!}");F("â","\\notni");F("â","\\ulcorner");F("â","\\urcorner");F("â","\\llcorner");F("â","\\lrcorner");F("©","\\copyright");F("®","\\textregistered");F("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');F("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');F("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');F("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');F("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");F("â®","\\vdots");F("\\varGamma","\\mathit{\\Gamma}");F("\\varDelta","\\mathit{\\Delta}");F("\\varTheta","\\mathit{\\Theta}");F("\\varLambda","\\mathit{\\Lambda}");F("\\varXi","\\mathit{\\Xi}");F("\\varPi","\\mathit{\\Pi}");F("\\varSigma","\\mathit{\\Sigma}");F("\\varUpsilon","\\mathit{\\Upsilon}");F("\\varPhi","\\mathit{\\Phi}");F("\\varPsi","\\mathit{\\Psi}");F("\\varOmega","\\mathit{\\Omega}");F("\\substack","\\begin{subarray}{c}#1\\end{subarray}");F("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");F("\\boxed","\\fbox{$\\displaystyle{#1}$}");F("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");F("\\implies","\\DOTSB\\;\\Longrightarrow\\;");F("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");F("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");F("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var V$={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},n9e=new Set(["bin","rel"]);F("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in V$?t=V$[n]:(n.slice(0,4)==="\\not"||n in Fr.math&&n9e.has(Fr.math[n].group))&&(t="\\dotsb"),t});var d9={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};F("\\dotso",function(e){var t=e.future().text;return t in d9?"\\ldots\\,":"\\ldots"});F("\\dotsc",function(e){var t=e.future().text;return t in d9&&t!==","?"\\ldots\\,":"\\ldots"});F("\\cdots",function(e){var t=e.future().text;return t in d9?"\\@cdots\\,":"\\@cdots"});F("\\dotsb","\\cdots");F("\\dotsm","\\cdots");F("\\dotsi","\\!\\cdots");F("\\dotsx","\\ldots\\,");F("\\DOTSI","\\relax");F("\\DOTSB","\\relax");F("\\DOTSX","\\relax");F("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");F("\\,","\\tmspace+{3mu}{.1667em}");F("\\thinspace","\\,");F("\\>","\\mskip{4mu}");F("\\:","\\tmspace+{4mu}{.2222em}");F("\\medspace","\\:");F("\\;","\\tmspace+{5mu}{.2777em}");F("\\thickspace","\\;");F("\\!","\\tmspace-{3mu}{.1667em}");F("\\negthinspace","\\!");F("\\negmedspace","\\tmspace-{4mu}{.2222em}");F("\\negthickspace","\\tmspace-{5mu}{.277em}");F("\\enspace","\\kern.5em ");F("\\enskip","\\hskip.5em\\relax");F("\\quad","\\hskip1em\\relax");F("\\qquad","\\hskip2em\\relax");F("\\tag","\\@ifstar\\tag@literal\\tag@paren");F("\\tag@paren","\\tag@literal{({#1})}");F("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ve("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});F("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");F("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");F("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");F("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");F("\\newline","\\\\\\relax");F("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var sie=Qe(rc["Main-Regular"][84][1]-.7*rc["Main-Regular"][65][1]);F("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+sie+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");
1060F("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+sie+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");F("\\hspace","\\@ifstar\\@hspacer\\@hspace");F("\\@hspace","\\hskip #1\\relax");F("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");F("\\ordinarycolon",":");F("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");F("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');F("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');F("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');F("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');F("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');F("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');F("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');F("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');F("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');F("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');F("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');F("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');F("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');F("â·","\\dblcolon");F("â¹","\\eqcolon");F("â","\\coloneqq");F("â","\\eqqcolon");F("â©´","\\Coloneqq");F("\\ratio","\\vcentcolon");F("\\coloncolon","\\dblcolon");F("\\colonequals","\\coloneqq");F("\\coloncolonequals","\\Coloneqq");F("\\equalscolon","\\eqqcolon");F("\\equalscoloncolon","\\Eqqcolon");F("\\colonminus","\\coloneq");F("\\coloncolonminus","\\Coloneq");F("\\minuscolon","\\eqcolon");F("\\minuscoloncolon","\\Eqcolon");F("\\coloncolonapprox","\\Colonapprox");F("\\coloncolonsim","\\Colonsim");F("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");F("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");F("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");F("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");F("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`â}}");F("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");F("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");F("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");F("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");F("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");F("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");F("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");F("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");F("\\gvertneqq","\\html@mathml{\\@gvertneqq}{â©}");F("\\lvertneqq","\\html@mathml{\\@lvertneqq}{â¨}");F("\\ngeqq","\\html@mathml{\\@ngeqq}{â±}");F("\\ngeqslant","\\html@mathml{\\@ngeqslant}{â±}");F("\\nleqq","\\html@mathml{\\@nleqq}{â°}");F("\\nleqslant","\\html@mathml{\\@nleqslant}{â°}");F("\\nshortmid","\\html@mathml{\\@nshortmid}{â¤}");F("\\nshortparallel","\\html@mathml{\\@nshortparallel}{â¦}");F("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{â}");F("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{â}");F("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{â}");F("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{â«}");F("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{â}");F("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{â«}");F("\\imath","\\html@mathml{\\@imath}{ı}");F("\\jmath","\\html@mathml{\\@jmath}{È·}");F("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`â¦}}");F("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`â§}}");F("â¦","\\llbracket");F("â§","\\rrbracket");F("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}
1060{\\mathopen{\\char`â¦}}");F("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`â¦}}");F("â¦","\\lBrace");F("â¦","\\rBrace");F("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");F("⦵","\\minuso");F("\\darr","\\downarrow");F("\\dArr","\\Downarrow");F("\\Darr","\\Downarrow");F("\\lang","\\langle");F("\\rang","\\rangle");F("\\uarr","\\uparrow");F("\\uArr","\\Uparrow");F("\\Uarr","\\Uparrow");F("\\N","\\mathbb{N}");F("\\R","\\mathbb{R}");F("\\Z","\\mathbb{Z}");F("\\alef","\\aleph");F("\\alefsym","\\aleph");F("\\Alpha","\\mathrm{A}");F("\\Beta","\\mathrm{B}");F("\\bull","\\bullet");F("\\Chi","\\mathrm{X}");F("\\clubs","\\clubsuit");F("\\cnums","\\mathbb{C}");F("\\Complex","\\mathbb{C}");F("\\Dagger","\\ddagger");F("\\diamonds","\\diamondsuit");F("\\empty","\\emptyset");F("\\Epsilon","\\mathrm{E}");F("\\Eta","\\mathrm{H}");F("\\exist","\\exists");F("\\harr","\\leftrightarrow");F("\\hArr","\\Leftrightarrow");F("\\Harr","\\Leftrightarrow");F("\\hearts","\\heartsuit");F("\\image","\\Im");F("\\infin","\\infty");F("\\Iota","\\mathrm{I}");F("\\isin","\\in");F("\\Kappa","\\mathrm{K}");F("\\larr","\\leftarrow");F("\\lArr","\\Leftarrow");F("\\Larr","\\Leftarrow");F("\\lrarr","\\leftrightarrow");F("\\lrArr","\\Leftrightarrow");F("\\Lrarr","\\Leftrightarrow");F("\\Mu","\\mathrm{M}");F("\\natnums","\\mathbb{N}");F("\\Nu","\\mathrm{N}");F("\\Omicron","\\mathrm{O}");F("\\plusmn","\\pm");F("\\rarr","\\rightarrow");F("\\rArr","\\Rightarrow");F("\\Rarr","\\Rightarrow");F("\\real","\\Re");F("\\reals","\\mathbb{R}");F("\\Reals","\\mathbb{R}");F("\\Rho","\\mathrm{P}");F("\\sdot","\\cdot");F("\\sect","\\S");F("\\spades","\\spadesuit");F("\\sub","\\subset");F("\\sube","\\subseteq");F("\\supe","\\supseteq");F("\\Tau","\\mathrm{T}");F("\\thetasym","\\vartheta");F("\\weierp","\\wp");F("\\Zeta","\\mathrm{Z}");F("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");F("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");F("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");F("\\bra","\\mathinner{\\langle{#1}|}");F("\\ket","\\mathinner{|{#1}\\rangle}");F("\\braket","\\mathinner{\\langle{#1}\\rangle}");F("\\Bra","\\left\\langle#1\\right|");F("\\Ket","\\left|#1\\right\\rangle");var aie=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var c=h=>f=>{e&&(f.macros.set("|",a),i.length&&f.macros.set("\\|",o));var m=h;if(!h&&i.length){var p=f.future();p.text==="|"&&(f.popToken(),m=!0)}return{tokens:m?i:r,numArgs:0}};t.macros.set("|",c(!1)),i.length&&t.macros.set("\\|",c(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...s,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};F("\\bra@ket",aie(!1));F("\\bra@set",aie(!0));F("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");F("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");F("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");F("\\angln","{\\angl n}");F("\\blue","\\textcolor{##6495ed}{#1}");F("\\orange","\\textcolor{##ffa500}{#1}");F("\\pink","\\textcolor{##ff00af}{#1}");F("\\red","\\textcolor{##df0030}{#1}");F("\\green","\\textcolor{##28ae7b}{#1}");F("\\gray","\\textcolor{gray}{#1}");F("\\purple","\\textcolor{##9d38bd}{#1}");F("\\blueA","\\textcolor{##ccfaff}{#1}");F("\\blueB","\\textcolor{##80f6ff}{#1}");F("\\blueC","\\textcolor{##63d9ea}{#1}");F("\\blueD","\\textcolor{##11accd}{#1}");F("\\blueE","\\textcolor{##0c7f99}{#1}");F("\\tealA","\\textcolor{##94fff5}{#1}");F("\\tealB","\\textcolor{##26edd5}{#1}");F("\\tealC","\\textcolor{##01d1c1}{#1}");F("\\tealD","\\textcolor{##01a995}{#1}");F("\\tealE","\\textcolor{##208170}{#1}");F("\\greenA","\\textcolor{##b6ffb0}{#1}");F("\\greenB","\\textcolor{##8af281}{#1}");F("\\greenC","\\textcolor{##74cf70}{#1}");F("\\greenD","\\textcolor{##1fab54}{#1}");F("\\greenE","\\textcolor{##0d923f}{#1}");F("\\goldA","\\textcolor{##ffd0a9}{#1}");F("\\goldB","\\textcolor{##ffbb71}{#1}");F("\\goldC","\\textcolor{##ff9c39}{#1}");F("\\goldD","\\textcolor{##e07d10}{#1}");F("\\goldE","\\textcolor{##a75a05}{#1}");F("\\redA","\\textcolor{##fca9a9}{#1}");F("\\redB","\\textcolor{##ff8482}{#1}");F("\\redC","\\textcolor{##f9685d}{#1}");F("\\redD","\\textcolor{##e84d39}{#1}");
vendor: 9,652 bytes, line 1060
1060F("\\redE","\\textcolor{##bc2612}{#1}");F("\\maroonA","\\textcolor{##ffbde0}{#1}");F("\\maroonB","\\textcolor{##ff92c6}{#1}");F("\\maroonC","\\textcolor{##ed5fa6}{#1}");F("\\maroonD","\\textcolor{##ca337c}{#1}");F("\\maroonE","\\textcolor{##9e034e}{#1}");F("\\purpleA","\\textcolor{##ddd7ff}{#1}");F("\\purpleB","\\textcolor{##c6b9fc}{#1}");F("\\purpleC","\\textcolor{##aa87ff}{#1}");F("\\purpleD","\\textcolor{##7854ab}{#1}");F("\\purpleE","\\textcolor{##543b78}{#1}");F("\\mintA","\\textcolor{##f5f9e8}{#1}");F("\\mintB","\\textcolor{##edf2df}{#1}");F("\\mintC","\\textcolor{##e0e5cc}{#1}");F("\\grayA","\\textcolor{##f6f7f7}{#1}");F("\\grayB","\\textcolor{##f0f1f2}{#1}");F("\\grayC","\\textcolor{##e3e5e6}{#1}");F("\\grayD","\\textcolor{##d6d8da}{#1}");F("\\grayE","\\textcolor{##babec2}{#1}");F("\\grayF","\\textcolor{##888d93}{#1}");F("\\grayG","\\textcolor{##626569}{#1}");F("\\grayH","\\textcolor{##3b3e40}{#1}");F("\\grayI","\\textcolor{##21242c}{#1}");F("\\kaBlue","\\textcolor{##314453}{#1}");F("\\kaGreen","\\textcolor{##71B307}{#1}");var oie={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class r9e{constructor(t,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new e9e(t9e,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new $$(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:n,end:r}=this.consumeArg());return this.pushToken(new io("EOF",r.loc)),this.pushTokens(i),new io("",pa.range(n,r))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),s,a=0,o=0;do{if(s=this.popToken(),n.push(s),s.text==="{")++a;else if(s.text==="}"){if(--a,a===-1)throw new Ve("Extra }",s)}else if(s.text==="EOF")throw new Ve("Unexpected end of input in a macro argument, expected '"+(t&&r?t[o]:"}")+"'",s);if(t&&r)if((a===0||a===1&&t[o]==="{")&&s.text===t[o]){if(++o,o===t.length){n.splice(-o,o);break}}else o=0}while(a!==0||r);return i.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:s}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Ve("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;i<r.length;i++){var s=this.popToken();if(r[i]!==s.text)throw new Ve("Use of the macro doesn't match its definition",s)}}for(var a=[],o=0;o<t;o++)a.push(this.consumeArg(n&&n[o+1]).tokens);return a}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Ve("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),r=n.text,i=n.noexpand?null:this._getExpansion(r);if(i==null||t&&i.unexpandable){if(t&&i==null&&r[0]==="\\"&&!this.isDefined(r))throw new Ve("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var s=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var c=s[o];if(c.text==="#"){if(o===0)throw new Ve("Incomplete placeholder at end of macro body",c);if(c=s[--o],c.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(c.text))s.splice(o,2,...a[+c.text-1]);else throw new Ve("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new io(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),n.push(i)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var i=typeof n=="function"?n(this):n;if(typeof i=="string"){var s=0;if(i.includes("#"))for(var a=i.replace(/##/g,"");a.includes("#"+(s+1));)++s;for(var o=new $$(i,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var d={tokens:c,numArgs:s};return d}return i}isDefined(t){return this.macros.has(t)||mh.hasOwnProperty(t)||Fr.math.hasOwnProperty(t)||Fr.text.hasOwnProperty(t)||oie.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:mh.hasOwnProperty(t)&&!mh[t].primitive}}var H$=/^[âââââââââââ
âââââââᵢⱼââââââáµ£ââᵤᵥâᵦᵧᵨᵩᵪ]/,L2=Object.freeze({"â":"+","â":"-","â":"=","â":"(","â":")","â":"0","â":"1","â":"2","â":"3","â":"4","â
":"5","â":"6","â":"7","â":"8","â":"9","â":"a","â":"e","â":"h","áµ¢":"i","â±¼":"j","â":"k","â":"l","â":"m","â":"n","â":"o","â":"p","áµ£":"r","â":"s","â":"t","ᵤ":"u","áµ¥":"v","â":"x","ᵦ":"β","áµ§":"γ","ᵨ":"Ï","ᵩ":"Ï","ᵪ":"Ï","âº":"+","â»":"-","â¼":"=","â½":"(","â¾":")","â°":"0","¹":"1","²":"2","³":"3","â´":"4","âµ":"5","â¶":"6","â·":"7","â¸":"8","â¹":"9","á´¬":"A","á´®":"B","á´°":"D","á´±":"E","á´³":"G","á´´":"H","á´µ":"I","á´¶":"J","á´·":"K","á´¸":"L","á´¹":"M","á´º":"N","á´¼":"O","á´¾":"P","á´¿":"R","áµ":"T","áµ":"U","â±½":"V","áµ":"W","áµ":"a","áµ":"b","á¶":"c","áµ":"d","áµ":"e","á¶ ":"f","áµ":"g",ʰ:"h","â±":"i",ʲ:"j","áµ":"k",Ë¡:"l","áµ":"m",â¿:"n","áµ":"o","áµ":"p",ʳ:"r",Ë¢:"s","áµ":"t","áµ":"u","áµ":"v",Ê·:"w",Ë£:"x",ʸ:"y","á¶»":"z","áµ":"β","áµ":"γ","áµ":"δ","áµ ":"Ï","ᵡ":"Ï","á¶¿":"θ"}),wE={"Ì":{text:"\\'",math:"\\acute"},"Ì":{text:"\\`",math:"\\grave"},"Ì":{text:'\\"',math:"\\ddot"},"Ì":{text:"\\~",math:"\\tilde"},"Ì":{text:"\\=",math:"\\bar"},"Ì":{text:"\\u",math:"\\breve"},"Ì":{text:"\\v",math:"\\check"},"Ì":{text:"\\^",math:"\\hat"},"Ì":{text:"\\.",math:"\\dot"},"Ì":{text:"\\r",math:"\\mathring"},"Ì":{text:"\\H"},"̧":{text:"\\c"}},q$={á:"aÌ",à :"aÌ",ä:"aÌ",Ç:"aÌÌ",ã:"aÌ",Ä:"aÌ",Ä:"aÌ",ắ:"aÌÌ",ằ:"aÌÌ",ẵ:"aÌÌ",Ç:"aÌ",â:"aÌ",ấ:"aÌÌ",ầ:"aÌÌ",ẫ:"aÌÌ",ȧ:"aÌ",Ç¡:"aÌÌ",Ã¥:"aÌ",Ç»:"aÌÌ",á¸:"bÌ",Ä:"cÌ",á¸:"çÌ",Ä:"cÌ",Ä:"cÌ",Ä:"cÌ",ç:"ç",Ä:"dÌ",á¸:"dÌ",á¸:"ḑ",é:"eÌ",è:"eÌ",ë:"eÌ",ẽ:"eÌ",Ä:"eÌ",á¸:"eÌÌ",á¸:"eÌÌ",Ä:"eÌ",á¸:"ȩÌ",Ä:"eÌ",ê:"eÌ",ế:"eÌÌ",á»:"eÌÌ",á»
:"eÌÌ",Ä:"eÌ",È©:"ȩ",á¸:"fÌ",ǵ:"gÌ",ḡ:"gÌ",Ä:"gÌ",ǧ:"gÌ",Ä:"gÌ",Ä¡:"gÌ",Ä£:"ģ",ḧ:"hÌ",È:"hÌ",Ä¥:"hÌ",ḣ:"hÌ",ḩ:"ḩ",Ã:"iÌ",ì:"iÌ",ï:"iÌ",ḯ:"iÌÌ",Ä©:"iÌ",Ä«:"iÌ",Ä:"iÌ",Ç:"iÌ",î:"iÌ",ǰ:"jÌ",ĵ:"jÌ",ḱ:"kÌ",Ç©:"kÌ",Ä·:"ķ",ĺ:"lÌ",ľ:"lÌ",ļ:"ļ",ḿ:"mÌ",á¹:"mÌ",Å:"nÌ",ǹ:"nÌ",ñ:"nÌ",Å:"nÌ",á¹
:"nÌ",Å:"ņ",ó:"oÌ",ò:"oÌ",ö:"oÌ",È«:"oÌÌ",õ:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",È:"oÌÌ",Å:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",Å:"oÌ",Ç:"oÌ",ô:"oÌ",á»:"oÌÌ",á»:"oÌÌ",á»:"oÌÌ",ȯ:"oÌ",ȱ:"oÌÌ",Å:"oÌ",á¹:"pÌ",á¹:"pÌ",Å:"rÌ",Å:"rÌ",á¹:"rÌ",Å:"ŗ",Å:"sÌ",á¹¥:"sÌÌ",Å¡:"sÌ",á¹§:"sÌÌ",Å:"sÌ",ṡ:"sÌ",Å:"ş",áº:"tÌ",Å¥:"tÌ",ṫ:"tÌ",Å£:"ţ",ú:"uÌ",ù:"uÌ",ü:"uÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Å©:"uÌ",á¹¹:"uÌÌ",Å«:"uÌ",á¹»:"uÌÌ",Å:"uÌ",Ç:"uÌ",û:"uÌ",ů:"uÌ",ű:"uÌ",á¹½:"vÌ",áº:"wÌ",áº:"wÌ",áº
:"wÌ",ŵ:"wÌ",áº:"wÌ",áº:"wÌ",áº:"xÌ",áº:"xÌ",ý:"yÌ",ỳ:"yÌ",ÿ:"yÌ",ỹ:"yÌ",ȳ:"yÌ",Å·:"yÌ",áº:"yÌ",áº:"yÌ",ź:"zÌ",ž:"zÌ",áº:"zÌ",ż:"zÌ",Ã:"AÌ",Ã:"AÌ",Ã:"AÌ",Ç:"AÌÌ",Ã:"AÌ",Ä:"AÌ",Ä:"AÌ",Ắ:"AÌÌ",Ằ:"AÌÌ",Ẵ:"AÌÌ",Ç:"AÌ",Ã:"AÌ",Ấ:"AÌÌ",Ầ:"AÌÌ",Ẫ:"AÌÌ",Ȧ:"AÌ",Ç :"AÌÌ",Ã
:"AÌ",Ǻ:"AÌÌ",á¸:"BÌ",Ä:"CÌ",á¸:"ÇÌ",Ä:"CÌ",Ä:"CÌ",Ä:"CÌ",Ã:"Ç",Ä:"DÌ",á¸:"DÌ",á¸:"Ḑ",Ã:"EÌ",Ã:"EÌ",Ã:"EÌ",Ẽ:"EÌ",Ä:"EÌ",á¸:"EÌÌ",á¸:"EÌÌ",Ä:"EÌ",á¸:"ȨÌ",Ä:"EÌ",Ã:"EÌ",Ế:"EÌÌ",á»:"EÌÌ",á»:"EÌÌ",Ä:"EÌ",Ȩ:"Ȩ",á¸:"FÌ",Ç´:"GÌ",Ḡ:"GÌ",Ä:"GÌ",Ǧ:"GÌ",Ä:"GÌ",Ä :"GÌ",Ä¢:"Ģ",Ḧ:"HÌ",È:"HÌ",Ĥ:"HÌ",Ḣ:"HÌ",Ḩ:"Ḩ",Ã:"IÌ",Ã:"IÌ",Ã:"IÌ",Ḯ:"IÌÌ",Ĩ:"IÌ",Ī:"IÌ",Ĭ:"IÌ",Ç:"IÌ",Ã:"IÌ",İ:"IÌ",Ä´:"JÌ",Ḱ:"KÌ",Ǩ:"KÌ",Ķ:"Ķ",Ĺ:"LÌ",Ľ:"LÌ",Ä»:"Ļ",Ḿ:"MÌ",á¹:"MÌ",Å:"NÌ",Ǹ:"NÌ",Ã:"NÌ",Å:"NÌ",á¹:"NÌ",Å
:"Ņ",Ã:"OÌ",Ã:"OÌ",Ã:"OÌ",Ȫ:"OÌÌ",Ã:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Ȭ:"OÌÌ",Å:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Å:"OÌ",Ç:"OÌ",Ã:"OÌ",á»:"OÌÌ",á»:"OÌÌ",á»:"OÌÌ",È®:"OÌ",Ȱ:"OÌÌ",Å:"OÌ",á¹:"PÌ",á¹:"PÌ",Å:"RÌ",Å:"RÌ",á¹:"RÌ",Å:"Ŗ",Å:"SÌ",Ṥ:"SÌÌ",Å :"SÌ",Ṧ:"SÌÌ",Å:"SÌ",á¹ :"SÌ",Å:"Ş",Ť:"TÌ",Ṫ:"TÌ",Å¢:"Ţ",Ã:"UÌ",Ã:"UÌ",Ã:"UÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ũ:"UÌ",Ṹ:"UÌÌ",Ū:"UÌ",Ṻ:"UÌÌ",Ŭ:"UÌ",Ç:"UÌ",Ã:"UÌ",Å®:"UÌ",Ű:"UÌ",á¹¼:"VÌ",áº:"WÌ",áº:"WÌ",áº:"WÌ",Å´:"WÌ",áº:"WÌ",áº:"XÌ",áº:"XÌ",Ã:"YÌ",Ỳ:"YÌ",Ÿ:"YÌ",Ỹ:"YÌ",Ȳ
vendor: 11,198 bytes, lines 1060-1061
1060:"YÌ",Ŷ:"YÌ",áº:"YÌ",Ź:"ZÌ",Ž:"ZÌ",áº:"ZÌ",Å»:"ZÌ",ά:"αÌ",á½°:"αÌ",á¾±:"αÌ",á¾°:"αÌ",Î:"εÌ",á½²:"εÌ",ή:"ηÌ",á½´:"ηÌ",ί:"ιÌ",á½¶:"ιÌ",Ï:"ιÌ",Î:"ιÌÌ",á¿:"ιÌÌ",á¿:"ιÌ",á¿:"ιÌ",Ï:"οÌ",ὸ:"οÌ",Ï:"Ï Ì",ὺ:"Ï Ì",Ï:"Ï Ì",ΰ:"Ï ÌÌ",á¿¢:"Ï ÌÌ",á¿¡:"Ï Ì",á¿ :"Ï Ì",Ï:"ÏÌ",á½¼:"ÏÌ",Î:"Î¥Ì",Ὺ:"Î¥Ì",Ϋ:"Î¥Ì",á¿©:"Î¥Ì",Ῠ:"Î¥Ì",Î:"ΩÌ",Ὼ:"ΩÌ"};class b3{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new r9e(t,n,this.mode),this.settings=n,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Ve("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new io("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(b3.endOfExpression.has(i.text)||n&&i.text===n||t&&mh[i.text]&&mh[i.text].infix)break;var s=this.parseAtom(n);if(s){if(s.type==="internal")continue}else break;r.push(s)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i<t.length;i++){var s=t[i];if(s.type==="infix"){if(n!==-1)throw new Ve("only one infix operator per group",s.token);n=i,r=s.replaceWith}}if(n!==-1&&r){var a,o,c=t.slice(0,n),u=t.slice(n+1);c.length===1&&c[0].type==="ordgroup"?a=c[0]:a={type:"ordgroup",mode:this.mode,body:c},u.length===1&&u[0].type==="ordgroup"?o=u[0]:o={type:"ordgroup",mode:this.mode,body:u};var d;return r==="\\\\abovefrac"?d=this.callFunction(r,[a,t[n],o],[]):d=this.callFunction(r,[a,o],[]),[d]}else return t}handleSupSubscript(t){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var i;do{var s;i=this.parseGroup(t)}while(((s=i)==null?void 0:s.type)==="internal");if(!i)throw new Ve("Expected group after '"+r+"'",n);return i}formatUnsupportedCmd(t){for(var n=[],r=0;r<t.length;r++)n.push({type:"textord",mode:"text",text:t[r]});var i={type:"text",mode:this.mode,body:n},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return s}parseAtom(t){var n=this.parseGroup("atom",t);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var r,i;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(n&&n.type==="op"){var a=s.text==="\\limits";n.limits=a,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=s.text==="\\limits");else throw new Ve("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(r)throw new Ve("Double superscript",s);r=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(i)throw new Ve("Double subscript",s);i=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(r)throw new Ve("Double superscript",s);var o={type:"textord",mode:this.mode,text:"\\prime"},c=[o];for(this.consume();this.fetch().text==="'";)c.push(o),this.consume();this.fetch().text==="^"&&c.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:c}}else if(L2[s.text]){var u=H$.test(s.text),d=[];for(d.push(new io(L2[s.text])),this.consume();;){var h=this.fetch().text;if(!L2[h]||H$.test(h)!==u)break;d.unshift(new io(L2[h])),this.consume()}var f=this.subparse(d);u?i={type:"ordgroup",mode:"math",body:f}:r={type:"ordgroup",mode:"math",body:f}}else break}return r||i?{type:"supsub",mode:this.mode,base:n,sup:r,sub:i}:n}parseFunction(t,n){var r=this.fetch(),i=r.text,s=mh[i];if(!s)return null;if(this.consume(),n&&n!=="atom"&&!s.allowedInArgument)throw new Ve("Got function '"+i+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!s.allowedInText)throw new Ve("Can't use function '"+i+"' in text mode",r);if(this.mode==="math"&&s.allowedInMath===!1)throw new Ve("Can't use function '"+i+"' in math mode",r);var{args:a,optArgs:o}=this.parseArguments(i,s);return this.callFunction(i,a,o,r,t)}callFunction(t,n,r,i,s){var a={funcName:t,parser:this,token:i,breakOnTokenText:s},o=mh[t];if(o&&o.handler)return o.handler(a,n,r);throw new Ve("No function handler for "+t)}parseArguments(t,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var i=[],s=[],a=0;a<r;a++){var o=n.argTypes&&n.argTypes[a],c=a<n.numOptionalArgs;("primitive"in n&&n.primitive&&o==null||n.type==="sqrt"&&a===1&&s[0]==null)&&(o="primitive");var u=this.parseGroupOfType("argument to '"+t+"'",o,c);if(c)s.push(u);else if(u!=null)i.push(u);else throw new Ve("Null argument, please report this as a bug")}return{args:i,optArgs:s}}parseGroupOfType(t,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var i=this.parseArgumentGroup(r,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text",resetFont:!0}:null}case"raw":{var s=this.parseStringGroup("raw",r);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(r)throw new Ve("A primitive argument cannot be optional");var a=this.parseGroup(t);if(a==null)throw new Ve("Expected group as "+t,this.fetch());return a}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Ve("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var i="",s;(s=this.fetch()).text!=="EOF";)i+=s.text,this.consume();return this.consume(),r.text=i,r}parseRegexGroup(t,n){for(var r=this.fetch(),i=r,s="",a;(a=this.fetch()).text!=="EOF"&&t.test(s+a.text);)i=a,s+=i.text,this.consume();if(s==="")throw new Ve("Invalid "+n+": '"+r.text+"'",r);return r.range(i,s)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new Ve("Invalid color: '"+n.text+"'",n);var i=r[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(t){var n,r=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",r=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!i)throw new Ve("Invalid size: '"+n.text+"'",n);var s={number:+(i[1]+i[2]),unit:i[3]};if(!mre(s))throw new Ve("Invalid unit: '"+s.unit+"'",n);return{type:"size",mode:this.mode,value:s,isBlank:r}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(t,n){var r=this.gullet.scanArgument(t);if(r==null)return null;var i=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:r.loc,body:s};return n&&this.switchMode(i),a}parseGroup(t,n){var r=this.fetch(),i=r.text,s;if(i==="{"||i==="\\begingroup"){this.consume();var a=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,a),c=this.fetch();this.expect(a),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:pa.range(r,c),body:o,semisimple:i==="\\begingroup"||void 0}}else if(s=this.parseFunction(n,t)||this.parseSymbol(),s==null&&i[0]==="\\"&&!oie.hasOwnProperty(i)){if(this.settings.throwOnError)throw new Ve("Undefined control sequence: "+i,r);s=this.formatUnsupportedCmd(i),this.consume()}return s}formLigatures(t){for(var n=t.length-1,r=0;r<n;++r){var i=t[r];if(i.type==="textord"){var s=i.text,a=t[r+1];if(!(!a||a.type!=="textord")){if(s==="-"&&a.text==="-"){var o=t[r+2];r+1<n&&o&&o.type==="textord"&&o.text==="-"?(t.splice(r,3,{type:"textord",mode:"text",loc:pa.range(i,o),text:"---"}),n-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:pa.range(i,a),text:"--"}),n-=1)}(s==="'"||s==="`")&&a.text===s&&(t.splice(r,2,{type:"textord",mode:"text",loc:pa.range(i,a),text:s+s}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),i=r.charAt(0)==="*";if(i&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Ve(`\\verb assertion failed -- 1061 please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:i}}q$.hasOwnProperty(n[0])&&!Fr[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=q$[n[0]]+n.slice(1));var s=ZOe.exec(n);s&&(n=n.substring(0,s.index),n==="i"?n="ı":n==="j"&&(n="È·"));var a;if(Fr[this.mode][n]){this.settings.strict&&this.mode==="math"&&OA.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var o=Fr[this.mode][n].group,c=pa.range(t),u;bOe(o)?u={type:"atom",mode:this.mode,family:o,loc:c,text:n}:u={type:o,mode:this.mode,loc:c,text:n},a=u}else if(n.charCodeAt(0)>=128)this.settings.strict&&(fre(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),a={type:"textord",mode:"text",loc:pa.range(t),text:n};else return null;if(this.consume(),s)for(var d=0;d<s[0].length;d++){var h=s[0][d];if(!wE[h])throw new Ve("Unknown accent ' "+h+"'",t);var f=wE[h][this.mode]||wE[h].text;if(!f)throw new Ve("Accent "+h+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:pa.range(t),label:f,isStretchy:!1,isShifty:!0,base:a}}return a}}b3.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var h9=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new b3(t,n);delete r.gullet.macros.current["\\df@tag"];var i=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Ve("\\tag works only in display equations");
vendor: 10,846 bytes, lines 1061-1063
1061i=[{type:"tag",mode:"text",body:i,tag:r.subparse([new io("\\df@tag")])}]}return i},f9=function(t,n,r){n.textContent="";var i=v3(t,r).toNode();n.appendChild(i)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),f9=function(){throw new Ve("KaTeX doesn't work in quirks mode.")});var lie=function(t,n){var r=v3(t,n).toMarkup();return r},cie=function(t,n){var r=new ZO(n);return h9(t,r)},uie=function(t,n,r){if(r.throwOnError||!(t instanceof Ve))throw t;var i=$e(["katex-error"],[new co(n)]);return i.setAttribute("title",t.toString()),i.setAttribute("style","color:"+r.errorColor),i},v3=function(t,n){var r=new ZO(n);try{var i=h9(t,r);return dOe(i,t,r)}catch(s){return uie(s,t,r)}},die=function(t,n){var r=new ZO(n);try{var i=h9(t,r);return hOe(i,t,r)}catch(s){return uie(s,t,r)}},hie="0.16.47",fie={Span:Wx,Anchor:o3,SymbolNode:co,SvgNode:Gu,PathNode:Gh,LineNode:RA},G4={version:hie,render:f9,renderToString:lie,ParseError:Ve,SETTINGS_SCHEMA:z4,__parse:cie,__renderToDomTree:v3,__renderToHTMLTree:die,__setFontMetrics:yre,__defineSymbol:T,__defineFunction:lt,__defineMacro:F,__domTree:fie};const i9e=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Ve,SETTINGS_SCHEMA:z4,__defineFunction:lt,__defineMacro:F,__defineSymbol:T,__domTree:fie,__parse:cie,__renderToDomTree:v3,__renderToHTMLTree:die,__setFontMetrics:yre,default:G4,get render(){return f9},renderToString:lie,version:hie},Symbol.toStringTag,{value:"Module"})),s9e={};function a9e(e){const t=this,n=e||s9e,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(hRe(n)),s.push(iRe()),a.push(sRe(n))}const G$=/[#.]/g;function o9e(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){G$.lastIndex=i;const o=G$.exec(n),c=n.slice(i,o?o.index:n.length);c&&(s?s==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:a=c,i+=c.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function mie(e,t,n){const r=n?d9e(n):void 0;function i(s,a,...o){let c;if(s==null){c={type:"root",children:[]};const u=a;o.unshift(u)}else{c=o9e(s,t);const u=c.tagName.toLowerCase(),d=r?r.get(u):void 0;if(c.tagName=d||u,l9e(a))o.unshift(a);else for(const[h,f]of Object.entries(a))c9e(e,c.properties,h,f)}for(const u of o)YA(c.children,u);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function l9e(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function c9e(e,t,n,r){const i=hne(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=pz(r):i.commaSeparated?s=uz(r):i.commaOrSpaceSeparated?s=pz(uz(r).join(" ")):s=W$(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?u9e(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(W$(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function YA(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)YA(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?YA(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function W$(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yb(n)===Yb(t)))return!0}return n}function u9e(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function d9e(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const h9e=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],f9e=mie(fne,"div"),m9e=mie(t3,"g",h9e),SE={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function p9e(e,t){return pie(e,{})||{type:"root",children:[]}}function pie(e,t){const n=g9e(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function g9e(e,t){switch(e.nodeType){case 1:return v9e(e,t);case 3:return y9e(e);case 8:return b9e(e);case 9:return Y$(e,t);case 10:return x9e();case 11:return Y$(e,t);default:return}}function Y$(e,t){return{type:"root",children:gie(e,t)}}function x9e(){return{type:"doctype"}}function y9e(e){return{type:"text",value:e.nodeValue||""}}function b9e(e){return{type:"comment",value:e.nodeValue||""}}function v9e(e,t){const n=e.namespaceURI,r=n===SE.svg?m9e:f9e,i=n===SE.html?e.tagName.toLowerCase():e.tagName,s=n===SE.html&&i==="template"?e.content:e,a=e.getAttributeNames(),o={};let c=-1;for(;++c<a.length;)o[a[c]]=e.getAttribute(a[c])||"";return r(i,o,gie(s,t))}function gie(e,t){const n=e.childNodes,r=[];let i=-1;for(;++i<n.length;){const s=pie(n[i],t);s!==void 0&&r.push(s)}return r}new DOMParser;function w9e(e,t){const n=S9e(e);return p9e(n)}function S9e(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const K$=function(e,t,n){const r=lw(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},vp=function(e){if(e==null)return _9e;if(typeof e=="string")return k9e(e);if(typeof e=="object")return C9e(e);if(typeof e=="function")return m9(e);throw new Error("Expected function, string, or array as `test`")};function C9e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vp(e[n]);return m9(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function k9e(e){return m9(t);function t(n){return n.tagName===e}}function m9(e){return t;function t(n,r,i){return!!(T9e(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function _9e(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function T9e(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const X$=/\n/g,Q$=/[\t ]+/g,KA=vp("br"),Z$=vp(D9e),E9e=vp("p"),J$=vp("tr"),j9e=vp(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",O9e,L9e]),xie=vp(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function N9e(e,t){const n=t||{},r="children"in e?e.children:[],i=xie(e),s=vie(e,{whitespace:n.whitespace||"normal"}),a=[];(e.type==="text"||e.type==="comment")&&a.push(...bie(e,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<r.length;)a.push(...yie(r[o],e,{whitespace:s,breakBefore:o?void 0:i,breakAfter:o<r.length-1?KA(r[o+1]):i}));const c=[];let u;for(o=-1;++o<a.length;){const d=a[o];typeof d=="number"?u!==void 0&&d>u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` 1062`.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function yie(e,t,n){return e.type==="element"?A9e(e,t,n):e.type==="text"?n.whitespace==="normal"?bie(e,n):M9e(e):[]}function A9e(e,t,n){const r=vie(e,n),i=e.children||[];let s=-1,a=[];if(j9e(e))return a;let o,c;for(KA(e)||J$(e)&&K$(t,e,J$)?c=` 1063`:E9e(e)?(o=2,c=2):xie(e)&&(o=1,c=1);++s<i.length;)a=a.concat(yie(i[s],e,{whitespace:r,breakBefore:s?void 0:o,breakAfter:s<i.length-1?KA(i[s+1]):c}));return Z$(e)&&K$(t,e,Z$)&&a.push(" "),o&&a.unshift(o),c&&a.push(c),a}function bie(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){X$.lastIndex=s;const c=X$.exec(n),u=c&&"index"in c?c.index:n.length;r.push(R9e(n.slice(s,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,u===n.length?t.breakAfter:!0)),s=u+1}let a=-1,o;for(;++a<r.length;)r[a].charCodeAt(r[a].length-1)===8203||a<r.length-1&&r[a+1].charCodeAt(0)===8203?(i.push(r[a]),o=void 0):r[a]?(typeof o=="number"&&i.push(o),i.push(r[a]),o=0):(a===0||a===r.length-1)&&i.push(0);return i}function M9e(e){return[String(e.value)]}function R9e(e,t,n){const r=[];let i=0,s;for(;i<e.length;){Q$.lastIndex=i;const a=Q$.exec(e);s=a?a.index:e.length,!i&&!s&&a&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=a?s+a[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function vie(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function O9e(e){return!!(e.properties||{}).hidden}function D9e(e){return e.tagName==="td"||e.tagName==="th"}function L9e(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const P9e={},I9e=[];function F9e(e){const t=e||P9e;return function(n,r){VO(n,"element",function(i,s){const a=Array.isArray(i.properties.className)?i.properties.className:I9e,o=a.includes("language-math"),c=a.includes("math-display"),u=a.includes("math-inline");let d=c;if(!o&&!c&&!u)return;let h=s[s.length-1],f=i;if(i.tagName==="code"&&o&&h&&h.type==="element"&&h.tagName==="pre"&&(f=h,h=s[s.length-2],d=!0),!h)return;const m=N9e(f,{whitespace:"pre"});let p;try{p=G4.renderToString(m,{...t,displayMode:d,throwOnError:!0})}catch(v){const g=v,y=g.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...s,i],cause:g,place:i.position,ruleId:y,source:"rehype-katex"});try{p=G4.renderToString(m,{...t,displayMode:d,strict:"ignore",throwOnError:!1})}catch{p=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(v)},children:[{type:"text",value:m}]}]}}typeof p=="string"&&(p=w9e(p).children);const x=h.children.indexOf(f);
vendor: 5,260 bytes, line 1063
1063return h.children.splice(x,1,...p),Une})}}function B9e(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Cm(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const eU={};function XA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Cm(t[0])&&eU[t[0]]||(Cm(t[0])&&(eU[t[0]]=new Date),B9e(...t))}const wie=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},tU=(e,t,n)=>{e.loadNamespaces(t,wie(e,n))},nU=(e,t,n,r)=>{Cm(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,wie(e,r))},z9e=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,c)=>{const u=t.services.backendConnector.state[`${o}|${c}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(s,e)))},$9e=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(XA("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):z9e(e,t,n)},Cm=e=>typeof e=="string",U9e=e=>typeof e=="object"&&e!==null,V9e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,H9e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},q9e=e=>H9e[e],G9e=e=>e.replace(V9e,q9e);let QA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:G9e};const W9e=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};QA={...QA,...e}},Y9e=()=>QA;let Sie;const K9e=e=>{Sie=e},X9e=()=>Sie,Q9e={type:"3rdParty",init(e){W9e(e.options.react),K9e(e)}},Z9e=b.createContext();class J9e{constructor(){y_(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}}const eDe=(e,t)=>{const n=b.useRef();return b.useEffect(()=>{n.current=e},[e,t]),n.current},Cie=(e,t,n,r)=>e.getFixedT(t,n,r),tDe=(e,t,n,r)=>b.useCallback(Cie(e,t,n,r),[e,t,n,r]),J=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=b.useContext(Z9e)||{},s=n||r||X9e();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new J9e),!s){XA("You will need to pass in an i18next instance by using initReactI18next");const S=(k,_)=>Cm(_)?_:U9e(_)&&Cm(_.defaultValue)?_.defaultValue:Array.isArray(k)?k[k.length-1]:k,C=[S,{},!1];return C.t=S,C.i18n={},C.ready=!1,C}s.options.react&&s.options.react.wait!==void 0&&XA("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Y9e(),...s.options.react,...t},{useSuspense:o,keyPrefix:c}=a;let u=e||i||s.options&&s.options.defaultNS;u=Cm(u)?[u]:u||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(u);const d=(s.isInitialized||s.initializedStoreOnce)&&u.every(S=>$9e(S,s,a)),h=tDe(s,t.lng||null,a.nsMode==="fallback"?u:u[0],c),f=()=>h,m=()=>Cie(s,t.lng||null,a.nsMode==="fallback"?u:u[0],c),[p,x]=b.useState(f);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const g=eDe(v),y=b.useRef(!0);b.useEffect(()=>{const{bindI18n:S,bindI18nStore:C}=a;y.current=!0,!d&&!o&&(t.lng?nU(s,t.lng,u,()=>{y.current&&x(m)}):tU(s,u,()=>{y.current&&x(m)})),d&&g&&g!==v&&y.current&&x(m);const k=()=>{y.current&&x(m)};return S&&s&&s.on(S,k),C&&s&&s.store.on(C,k),()=>{y.current=!1,S&&s&&S.split(" ").forEach(_=>s.off(_,k)),C&&s&&C.split(" ").forEach(_=>s.store.off(_,k))}},[s,v]),b.useEffect(()=>{y.current&&d&&x(f)},[s,c,d]);const w=[p,s,d];if(w.t=p,w.i18n=s,w.ready=d,d||!d&&!o)return w;throw new Promise(S=>{t.lng?nU(s,t.lng,u,()=>S()):tU(s,u,()=>S())})};/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */function rU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nDe(e){if(Array.isArray(e))return e}function rDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}
vendor: 6,867 bytes, lines 1063-1064
1063finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function iDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1064In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function sDe(e,t){return nDe(e)||rDe(e,t)||aDe(e,t)||iDe()}function aDe(e,t){if(e){if(typeof e=="string")return rU(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rU(e,t):void 0}}const kie=Object.entries,iU=Object.setPrototypeOf,oDe=Object.isFrozen,lDe=Object.getPrototypeOf,cDe=Object.getOwnPropertyDescriptor;let Li=Object.freeze,rs=Object.seal,n0=Object.create,_ie=typeof Reflect<"u"&&Reflect,ZA=_ie.apply,JA=_ie.construct;Li||(Li=function(t){return t});rs||(rs=function(t){return t});ZA||(ZA=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return t.apply(n,i)});JA||(JA=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const Ff=_i(Array.prototype.forEach),uDe=_i(Array.prototype.lastIndexOf),sU=_i(Array.prototype.pop),Oy=_i(Array.prototype.push),dDe=_i(Array.prototype.splice),W0=Array.isArray,g1=_i(String.prototype.toLowerCase),CE=_i(String.prototype.toString),aU=_i(String.prototype.match),Dy=_i(String.prototype.replace),oU=_i(String.prototype.indexOf),hDe=_i(String.prototype.trim),fDe=_i(Number.prototype.toString),mDe=_i(Boolean.prototype.toString),lU=typeof BigInt>"u"?null:_i(BigInt.prototype.toString),cU=typeof Symbol>"u"?null:_i(Symbol.prototype.toString),ua=_i(Object.prototype.hasOwnProperty),Ly=_i(Object.prototype.toString),vs=_i(RegExp.prototype.test),Ad=pDe(TypeError);function _i(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ZA(e,t,r)}}function pDe(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return JA(e,n)}}function Ln(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g1;if(iU&&iU(e,null),!W0(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(oDe(t)||(t[r]=s),i=s)}e[i]=!0}return e}function gDe(e){for(let t=0;t<e.length;t++)ua(e,t)||(e[t]=null);return e}function $a(e){const t=n0(null);for(const r of kie(e)){var n=sDe(r,2);const i=n[0],s=n[1];ua(e,i)&&(W0(s)?t[i]=gDe(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=$a(s):t[i]=s)}return t}function xDe(e){switch(typeof e){case"string":return e;case"number":return fDe(e);case"boolean":return mDe(e);case"bigint":return lU?lU(e):"0";case"symbol":return cU?cU(e):"Symbol()";case"undefined":return Ly(e);case"function":case"object":{if(e===null)return Ly(e);const t=e,n=wo(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Ly(r)}return Ly(e)}default:return Ly(e)}}function wo(e,t){for(;e!==null;){const r=cDe(e,t);if(r){if(r.get)return _i(r.get);if(typeof r.value=="function")return _i(r.value)}e=lDe(e)}function n(){return null}return n}function yDe(e){try{return vs(e,""),!0}catch{return!1}}const uU=Li(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),kE=Li(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_E=Li(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bDe=Li(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),TE=Li(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vDe=Li(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dU=Li(["#text"]),hU=Li(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
1064spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),EE=Li(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fU=Li(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P2=Li(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wDe=rs(/{{[\w\W]*|^[\w\W]*}}/g),SDe=rs(/<%[\w\W]*|^[\w\W]*%>/g),CDe=rs(/\${[\w\W]*/g),kDe=rs(/^data-[\-\w.\u00B7-\uFFFF]+$/),_De=rs(/^aria-[\-\w]+$/),mU=rs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TDe=rs(/^(?:\w+script|data):/i),EDe=rs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jDe=rs(/^html$/i),NDe=rs(/^[a-z][.\w]*(-[.\w]+)+$/i),pU=rs(/<[/\w!]/g),gU=rs(/<[/\w]/g),ADe=rs(/<\/no(script|embed|frames)/i),MDe=rs(/\/>/i),Ia={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Tie=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],RDe=Li(Ln({},Tie)),ODe=function(){const e={};return Ff(Tie,t=>{e[t]=rs(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Li(e)}(),DDe=function(){return typeof window>"u"?null:window},LDe=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;
vendor: 4,361 bytes, line 1064
1064const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},xU=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Md=function(t,n,r,i){return ua(t,n)&&W0(t[n])?Ln(i.base?$a(i.base):{},t[n],i.transform):r},jE=function(t,n,r){const i=ua(t,n)?t[n]:void 0;return i&&typeof i=="object"?$a(i):r()};function Eie(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DDe();const t=Ge=>Eie(Ge);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==Ia.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,d=e.trustedTypes,h=o.prototype,f=wo(h,"cloneNode"),m=wo(h,"remove"),p=wo(h,"removeAttributeNode"),x=wo(h,"nextSibling"),v=wo(h,"childNodes"),g=wo(h,"parentNode"),y=wo(h,"shadowRoot"),w=wo(h,"attributes"),S=a&&a.prototype?wo(a.prototype,"nodeType"):null,C=a&&a.prototype?wo(a.prototype,"nodeName"):null,k=a&&a.prototype?wo(a.prototype,"ownerDocument"):null,_=function(H){return S?S(H):H.nodeType},E=function(H){return C?C(H):H.nodeName};if(typeof s=="function"){const Ge=n.createElement("template");Ge.content&&Ge.content.ownerDocument&&(n=Ge.content.ownerDocument)}let A,j="",D,M=!1,$=0;const B=function(){if($>0)throw Ad('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(H){B(),$++;try{return A.createHTML(H)}finally{$--}},O=function(H){B(),$++;try{return A.createScriptURL(H)}finally{$--}},P=function(){return M||(D=LDe(d,i),M=!0),D},I=n,q=I.implementation,R=I.createNodeIterator,xe=I.createDocumentFragment,me=I.getElementsByTagName,U=r.importNode;let ae=xU();t.isSupported=typeof kie=="function"&&typeof g=="function"&&q&&q.createHTMLDocument!==void 0;const Ce=wDe,je=SDe,ve=CDe,Te=kDe,Se=_De,He=TDe,tt=EDe,we=NDe;let Oe=mU,Je=null;const It=Ln({},[...uU,...kE,..._E,...TE,...dU]);let mt=null;const De=Ln({},[...hU,...EE,...fU,...P2]);let Pe=Object.seal(n0(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ct=null,Tn=null;const Nn=Object.seal(n0(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ln=!0,Bn=!0,Sn=!1,zr=!0,or=!1,ge=!0,Me=!1,ut=!1,Ct=null,yn=null,un=!1,en=!1,Rr=!1,Ei=!1,li=!0,V=!1;const te="user-content-";let W=!0,ye=!1,fe={},Ne=null;const ke=Ln({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ze=null;const et=Ln({},["audio","video","img","source","image","track"]);let Fe=null;const Lt=Ln({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ft="http://www.w3.org/1998/Math/MathML",Dn="http://www.w3.org/2000/svg",Xn="http://www.w3.org/1999/xhtml";let Z=Xn,oe=!1,pe=null;const Le=Ln({},[Ft,Dn,Xn],CE),qe=Li(["mi","mo","mn","ms","mtext"]);let xt=Ln({},qe);const Bt=Li(["annotation-xml"]);let pt=Ln({},Bt);const yt=Ln({},["title","style","font","a","script"]);let dt=null;const wt=["application/xhtml+xml","text/html"],tn="text/html";let Et=null,Or=null;const lr=n.createElement("form"),An=function(H){return H instanceof RegExp||H instanceof Function},xr=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Or&&Or===H)return;(!H||typeof H!="object")&&(H={}
vendor: 12,202 bytes, line 1064
1064),H=$a(H),dt=wt.indexOf(H.PARSER_MEDIA_TYPE)===-1?tn:H.PARSER_MEDIA_TYPE,Et=dt==="application/xhtml+xml"?CE:g1,Je=Md(H,"ALLOWED_TAGS",It,{transform:Et}),mt=Md(H,"ALLOWED_ATTR",De,{transform:Et}),pe=Md(H,"ALLOWED_NAMESPACES",Le,{transform:CE}),Fe=Md(H,"ADD_URI_SAFE_ATTR",Lt,{transform:Et,base:Lt}),ze=Md(H,"ADD_DATA_URI_TAGS",et,{transform:Et,base:et}),Ne=Md(H,"FORBID_CONTENTS",ke,{transform:Et}),ct=Md(H,"FORBID_TAGS",$a({}),{transform:Et}),Tn=Md(H,"FORBID_ATTR",$a({}),{transform:Et}),fe=ua(H,"USE_PROFILES")?H.USE_PROFILES&&typeof H.USE_PROFILES=="object"?$a(H.USE_PROFILES):H.USE_PROFILES:!1,ln=H.ALLOW_ARIA_ATTR!==!1,Bn=H.ALLOW_DATA_ATTR!==!1,Sn=H.ALLOW_UNKNOWN_PROTOCOLS||!1,zr=H.ALLOW_SELF_CLOSE_IN_ATTR!==!1,or=H.SAFE_FOR_TEMPLATES||!1,ge=H.SAFE_FOR_XML!==!1,Me=H.WHOLE_DOCUMENT||!1,en=H.RETURN_DOM||!1,Rr=H.RETURN_DOM_FRAGMENT||!1,Ei=H.RETURN_TRUSTED_TYPE||!1,un=H.FORCE_BODY||!1,li=H.SANITIZE_DOM!==!1,V=H.SANITIZE_NAMED_PROPS||!1,W=H.KEEP_CONTENT!==!1,ye=H.IN_PLACE||!1,Oe=yDe(H.ALLOWED_URI_REGEXP)?H.ALLOWED_URI_REGEXP:mU,Z=typeof H.NAMESPACE=="string"?H.NAMESPACE:Xn,xt=jE(H,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ln({},qe)),pt=jE(H,"HTML_INTEGRATION_POINTS",()=>Ln({},Bt));const ue=jE(H,"CUSTOM_ELEMENT_HANDLING",()=>n0(null));if(Pe=n0(null),ua(ue,"tagNameCheck")&&An(ue.tagNameCheck)&&(Pe.tagNameCheck=ue.tagNameCheck),ua(ue,"attributeNameCheck")&&An(ue.attributeNameCheck)&&(Pe.attributeNameCheck=ue.attributeNameCheck),ua(ue,"allowCustomizedBuiltInElements")&&typeof ue.allowCustomizedBuiltInElements=="boolean"&&(Pe.allowCustomizedBuiltInElements=ue.allowCustomizedBuiltInElements),rs(Pe),or&&(Bn=!1),Rr&&(en=!0),fe&&(Je=Ln({},dU),mt=n0(null),fe.html===!0&&(Ln(Je,uU),Ln(mt,hU)),fe.svg===!0&&(Ln(Je,kE),Ln(mt,EE),Ln(mt,P2)),fe.svgFilters===!0&&(Ln(Je,_E),Ln(mt,EE),Ln(mt,P2)),fe.mathMl===!0&&(Ln(Je,TE),Ln(mt,fU),Ln(mt,P2))),Nn.tagCheck=null,Nn.attributeCheck=null,ua(H,"ADD_TAGS")&&(typeof H.ADD_TAGS=="function"?Nn.tagCheck=H.ADD_TAGS:W0(H.ADD_TAGS)&&(Je===It&&(Je=$a(Je)),Ln(Je,H.ADD_TAGS,Et))),ua(H,"ADD_ATTR")&&(typeof H.ADD_ATTR=="function"?Nn.attributeCheck=H.ADD_ATTR:W0(H.ADD_ATTR)&&(mt===De&&(mt=$a(mt)),Ln(mt,H.ADD_ATTR,Et))),ua(H,"ADD_FORBID_CONTENTS")&&W0(H.ADD_FORBID_CONTENTS)&&(Ne===ke&&(Ne=$a(Ne)),Ln(Ne,H.ADD_FORBID_CONTENTS,Et)),W&&(Je["#text"]=!0),Me&&Ln(Je,["html","head","body"]),Je.table&&(Ln(Je,["tbody"]),delete ct.tbody),H.TRUSTED_TYPES_POLICY){if(typeof H.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ad('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof H.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ad('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Be=A;A=H.TRUSTED_TYPES_POLICY;try{j=z("")}catch(Ze){throw A=Be,Ze}}else H.TRUSTED_TYPES_POLICY===null?(A=void 0,j=""):(A===void 0&&(A=P()),A&&typeof j=="string"&&(j=z("")));Li&&Li(H),Or=H},Fc=Ln({},[...kE,..._E,...bDe]),vd=Ln({},[...TE,...vDe]),tl=function(H,ue,Be){return ue.namespaceURI===Xn?H==="svg":ue.namespaceURI===Ft?H==="svg"&&(Be==="annotation-xml"||xt[Be]):!!Fc[H]},po=function(H,ue,Be){return ue.namespaceURI===Xn?H==="math":ue.namespaceURI===Dn?H==="math"&&pt[Be]:!!vd[H]},fy=function(H,ue,Be){return ue.namespaceURI===Dn&&!pt[Be]||ue.namespaceURI===Ft&&!xt[Be]?!1:!vd[H]&&(yt[H]||!Fc[H])},vf=function(H){let ue=g(H);(!ue||!ue.tagName)&&(ue={namespaceURI:Z,tagName:"template"});const Be=g1(H.tagName),Ze=g1(ue.tagName);return pe[H.namespaceURI]?H.namespaceURI===Dn?tl(Be,ue,Ze):H.namespaceURI===Ft?po(Be,ue,Ze):H.namespaceURI===Xn?fy(Be,ue,Ze):!!(dt==="application/xhtml+xml"&&pe[H.namespaceURI]):!1},xs=function(H){Oy(t.removed,{element:H});try{g(H).removeChild(H)}catch{if(m(H),!g(H))throw Ad("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},wf=function(H,ue,Be){try{p(H,ue)}catch{try{H.removeAttribute(Be)}catch{}}},Bc=function(H){nl(H);const ue=v(H);if(ue){const Ze=[];Ff(ue,Mt=>{Oy(Ze,Mt)}),Ff(Ze,Mt=>{try{m(Mt)}catch{}})}const Be=w(H);if(Be)for(let Ze=Be.length-1;Ze>=0;--Ze){const Mt=Be[Ze],bn=Mt&&Mt.name;typeof bn=="string"&&wf(H,Mt,bn)}},cn=function(H,ue,Be){if(!Be)try{Be=ue.getAttributeNode(H)}catch{Be=null}Oy(t.removed,{attribute:Be||null,from:ue});try{Be?p(ue,Be):ue.removeAttribute(H)}catch{try{ue.removeAttribute(H)}catch{}}if(H==="is")if(en||Rr)try{xs(ue)}catch{}else try{ue.setAttribute(H,"")}catch{}},Dr=function(H){const ue=w(H);if(ue)for(let Be=ue.length-1;Be>=0;--Be){const Ze=ue[Be],Mt=Ze&&Ze.name;typeof Mt!="string"||mt[Et(Mt)]||wf(H,Ze,Mt)}},nl=function(H){const ue=[H];for(;ue.length>0;){const Be=ue.pop();_(Be)===Ia.element&&Dr(Be);const Ze=v(Be);if(Ze)for(let Mt=Ze.length-1;Mt>=0;--Mt)ue.push(Ze[Mt])}},wd=function(H,ue){return ge?H==="patchsrc"?!0:H==="for"&&ue!=="label"&&ue!=="output":!1},Yr=function(H){if(!ge)return;const ue=[H];for(;ue.length>0;){const Be=ue.pop(),Ze=_(Be);if(Ze===Ia.processingInstruction||Ze===Ia.comment&&vs(gU,Be.data)){try{m(Be)}catch{}continue}if(Ze===Ia.element){const bn=Be,Mn=Et(E(Be));try{bn.hasAttribute&&bn.hasAttribute("patchsrc")&&bn.removeAttribute("patchsrc"),bn.hasAttribute&&bn.hasAttribute("for")&&wd("for",Mn)&&bn.removeAttribute("for")}catch{}}const Mt=v(Be);if(Mt)for(let bn=Mt.length-1;bn>=0;--bn)ue.push(Mt[bn])}},zc=function(H){let ue=null,Be=null;if(un)H="<remove></remove>"+H;else{const bn=aU(H,/^[\r\n\t ]+/);Be=bn&&bn[0]}dt==="application/xhtml+xml"&&Z===Xn&&(H='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+H+"</body></html>");const Ze=A?z(H):H;if(Z===Xn)try{ue=new u().parseFromString(Ze,dt)}catch{}if(!ue||!ue.documentElement){ue=q.createDocument(Z,"template",null);try{ue.documentElement.innerHTML=oe?j:Ze}catch{}}const Mt=ue.body||ue.documentElement;return H&&Be&&Mt.insertBefore(n.createTextNode(Be),Mt.childNodes[0]||null),Z===Xn?me.call(ue,Me?"html":"body")[0]:Me?ue.documentElement:Mt},my=function(H){const ue=k?k(H):H.ownerDocument;return R.call(ue||H,H,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Tp=function(H){return H=Dy(H,Ce," "),H=Dy(H,je," "),H=Dy(H,ve," "),H},p_=function(H){var ue;H.normalize();const Be=k?k(H):H.ownerDocument,Ze=R.call(Be||H,H,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Mt=Ze.nextNode();for(;Mt;)Mt.data=Tp(Mt.data),Mt=Ze.nextNode();const bn=(ue=H.querySelectorAll)===null||ue===void 0?void 0:ue.call(H,"template");bn&&Ff(bn,Mn=>{Ep(Mn.content)&&p_(Mn.content)})},Dw=function(H){const ue=C?C(H):null;return typeof ue!="string"||Et(ue)!=="form"?!1:typeof H.nodeName!="string"||typeof H.textContent!="string"||typeof H.removeChild!="function"||H.attributes!==w(H)||typeof H.removeAttribute!="function"||typeof H.removeAttributeNode!="function"||typeof H.getAttributeNode!="function"||typeof H.setAttribute!="function"||typeof H.namespaceURI!="string"||typeof H.insertBefore!="function"||typeof H.hasChildNodes!="function"||H.nodeType!==S(H)||H.childNodes!==v(H)},Ep=function(H){if(!S||typeof H!="object"||H===null)return!1;try{return S(H)===Ia.documentFragment}catch{return!1}},py=function(H){if(!S||typeof H!="object"||H===null)return!1;try{return typeof S(H)=="number"}catch{return!1}};function Ol(Ge,H,ue){Ge.length!==0&&Ff(Ge,Be=>{Be.call(t,H,ue,Or)})}const vde=function(H,ue){return!!(ge&&H.hasChildNodes()&&!py(H.firstElementChild)&&vs(pU,H.textContent)&&vs(pU,H.innerHTML)||ge&&H.namespaceURI===Xn&&RDe[ue]&&(py(H.firstElementChild)||typeof H.textContent=="string"&&vs(ODe[ue],H.textContent))||H.nodeType===Ia.processingInstruction||ge&&H.nodeType===Ia.comment&&vs(gU,H.data))},Lw=function(H,ue){if(H instanceof RegExp)return vs(H,ue);if(H instanceof Function){for(var Be=arguments.length,Ze=new Array(Be>2?Be-2:0),Mt=2;Mt<Be;Mt++)Ze[Mt-2]=arguments[Mt];return!!H(ue,...Ze)}return!1},wde=function(H,ue,Be){if(!ct[ue]&&fL(ue)&&Lw(Pe.tagNameCheck,ue))return!1;if(W&&!Ne[ue]){const Ze=g(H),Mt=v(H);if(Mt&&Ze){const bn=Mt.length;for(let Mn=bn-1;Mn>=0;--Mn){const Kr=H===Be?f(Mt[Mn],!0):Mt[Mn];Ze.insertBefore(Kr,x(H))}}}return xs(H),!0},uL=function(H,ue,Be,Ze){return H.length===0?ue:ue===Be||ue===Ze?$a(ue):ue},jp=function(H,ue){return H===ue||g(H)!==null?!1:(ye&&nl(H),!0)},dL=function(H,ue){if(Ol(ae.beforeSanitizeElements,H,null),jp(H,ue))return!0;if(Dw(H))return xs(H),!0;const Be=Et(E(H));if(Je=uL(ae.uponSanitizeElement,Je,It,Ct),Ol(ae.uponSanitizeElement,H,{tagName:Be,allowedTags:Je}),jp(H,ue))return!0;if(vde(H,Be))return xs(H),!0;if(ct[Be]||!(Nn.tagCheck instanceof Function&&Nn.tagCheck(Be))&&!Je[Be]){const Ze=wde(H,Be,ue);return Ze===!1&&(Ol(ae.afterSanitizeElements,H,null),jp(H,ue))?!0:Ze}if(_(H)===Ia.element&&!vf(H)||(Be==="noscript"||Be==="noembed"||Be==="noframes")&&vs(ADe,H.innerHTML))return xs(H),!0;if(or&&H.nodeType===Ia.text){const Ze=Tp(H.textContent);H.textContent!==Ze&&(Oy(t.removed,{element:H.cloneNode()}),H.textContent=Ze)}return Ol(ae.afterSanitizeElements,H,null),jp(H,ue)},hL=function(H,ue,Be){if(Tn[ue]||wd(ue,H)||li&&(ue==="id"||ue==="name")&&(Be in n||Be in lr))return!1;const Ze=mt[ue]||Nn.attributeCheck instanceof Function&&Nn.attributeCheck(ue,H);return Bn&&vs(Te,ue)||ln&&vs(Se,ue)?!0:Ze?Fe[ue]||vs(Oe,Dy(Be,tt,""))||(ue==="src"||ue==="xlink:href"||ue==="href")&&H!=="script"&&oU(Be,"data:")===0&&ze[H]||Sn&&!vs(He,Dy(Be,tt,""))?!0:!Be:fL(H)&&Lw(Pe.tagNameCheck,H)&&Lw(Pe.attributeNameCheck,ue,H)||ue==="is"&&Pe.allowCustomizedBuiltInElements&&Lw(Pe.tagNameCheck,Be)},Sde=Ln({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),fL=function(H){return!Sde[g1(H)]&&vs(we,H)},Cde=function(H,ue,Be,Ze){if(A&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Be)switch(d.getAttributeType(H,ue)){case"TrustedHTML":return z(Ze);case"TrustedScriptURL":return O(Ze)}return Ze},kde=function(H,ue,Be,Ze){try{return Be?H.setAttributeNS(Be,ue,Ze):H.setAttribute(ue,Ze),Dw(H)?(xs(H),!1):!0}catch{return cn(ue,H),!1}},mL=function(H,ue){if(Ol(ae.beforeSanitizeAttributes,H,null),jp(H,ue))return;const Be=H.attributes;if(!Be||Dw(H))return;mt=uL(ae.uponSanitizeAttribute,mt,De,yn);const Ze={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:mt,forceKeepAttr:void 0};let Mt=Be.length;const bn=Et(H.nodeName);for(;Mt--;){const Mn=Be[Mt],Kr=Mn.name,go=Mn.namespaceURI,La=Mn.value,Np=Et(Kr),x_=La;let Is=Kr==="value"?x_:hDe(x_),pL=!1;if(Ze.attrName=Np,Ze.attrValue=Is,Ze.keepAttr=!0,Ze.forceKeepAttr=void 0,Ol(ae.uponSanitizeAttribute,H,Ze),Is=Ze.attrValue,V&&(Np==="id"||Np==="name")&&oU(Is,te)!==0&&(cn(Kr,H,Mn),Is=te+Is,pL=!0),ge&&vs(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Is)){cn(Kr,H,Mn);continue}if(Np==="attributename"&&aU(Is,"href")){cn(Kr,H,Mn);continue}if(!Ze.forceKeepAttr){if(!Ze.keepAttr){cn(Kr,H,Mn);continue}if(!zr&&vs(MDe,Is)){cn(Kr,H,Mn);continue}if(or&&(Is=Tp(Is)),!hL(bn,Np,Is)){cn(Kr,H,Mn);continue}Is=Cde(bn,Np,go,Is),Is!==x_&&kde(H,Kr,go,Is)&&pL&&sU(t.removed)}}Ol(ae.afterSanitizeAttributes,H,null),jp(H,ue)},Pw=function(H){let ue=null;const Be=my(H);for(Ol(ae.beforeSanitizeShadowDOM,H,null);ue=Be.nextNode();)if(Ol(ae.uponSanitizeShadowNode,ue,null),dL(ue,H),mL(ue,H),Ep(ue.content)&&Pw(ue.content),_(ue)===Ia.element){const Ze=y(ue);Ep(Ze)&&(g_(Ze),Pw(Ze))}Ol(ae.afterSanitizeShadowDOM,H,null)},g_=function(H){const ue=[{node:H,shadow:null}];for(;ue.length>0;){const Be=ue.pop();if(Be.shadow){Pw(Be.shadow);continue}const Ze=Be.node,Mt=_(Ze)===Ia.element,bn=v(Ze);if(bn)for(let Mn=bn.length-1;Mn>=0;--Mn)ue.push({node:bn[Mn],shadow:null});if(Mt){const Mn=C?C(Ze):null;if(typeof Mn=="string"&&Et(Mn)==="template"){const Kr=Ze.content;Ep(Kr)&&ue.push({node:Kr,shadow:null})}}if(Mt){const Mn=y(Ze);Ep(Mn)&&ue.push({node:null,shadow:Mn},{node:Mn,shadow:null})}}};return t.sanitize=function(Ge){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=null,Be=null,Ze=null,Mt=null;if(oe=!Ge,oe&&(Ge="<!-->"),typeof Ge!="string"&&!py(Ge)&&(Ge=xDe(Ge),typeof Ge!="string"))throw Ad("dirty is not a string, aborting");if(!t.isSupported)return Ge;ut?(Je=Ct,mt=yn):xr(H),(ae.uponSanitizeElement.length>0||ae.uponSanitizeAttribute.length>0)&&(Je=$a(Je)),ae.uponSanitizeAttribute.length>
10640&&(mt=$a(mt)),t.removed=[];const bn=ye&&typeof Ge!="string"&&py(Ge);if(bn){Yr(Ge);const go=E(Ge);if(typeof go=="string"){const La=Et(go);if(!Je[La]||ct[La])throw Bc(Ge),Ad("root node is forbidden and cannot be sanitized in-place")}if(Dw(Ge))throw Bc(Ge),Ad("root node is clobbered and cannot be sanitized in-place");try{g_(Ge)}catch(La){throw Bc(Ge),La}}else if(py(Ge))ue=zc("<!---->"),Be=ue.ownerDocument.importNode(Ge,!0),Be.nodeType===Ia.element&&Be.nodeName==="BODY"||Be.nodeName==="HTML"?ue=Be:ue.appendChild(Be),g_(ue);else{if(!en&&!or&&!Me&&Ge.indexOf("<")===-1)return A&&Ei?z(Ge):Ge;if(ue=zc(Ge),!ue)return en?null:Ei?j:""}ue&&un&&xs(ue.firstChild);const Mn=bn?Ge:ue;try{const go=my(Mn);for(;Ze=go.nextNode();)dL(Ze,Mn),mL(Ze,Mn),Ep(Ze.content)&&Pw(Ze.content)}catch(go){throw bn&&(Bc(Ge),Ff(t.removed,La=>{La.element&&nl(La.element)})),go}if(bn){let go=!1;if(Ff(t.removed,La=>{La.element&&(La.element===Ge&&(go=!0),nl(La.element))}),go)throw Ad("a node selected for removal could not be safely returned; refusing to sanitize in place");return or&&p_(Ge),Ge}if(en){if(or&&p_(ue),Rr)for(Mt=xe.call(ue.ownerDocument);ue.firstChild;)Mt.appendChild(ue.firstChild);else Mt=ue;return(mt.shadowroot||mt.shadowrootmode)&&(Mt=U.call(r,Mt,!0)),Mt}let Kr=Me?ue.outerHTML:ue.innerHTML;return Me&&Je["!doctype"]&&ue.ownerDocument&&ue.ownerDocument.doctype&&ue.ownerDocument.doctype.name&&vs(jDe,ue.ownerDocument.doctype.name)&&(Kr="<!DOCTYPE "+ue.ownerDocument.doctype.name+`> 1065`+Kr),or&&(Kr=Tp(Kr)),A&&Ei?z(Kr):Kr},t.setConfig=function(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xr(Ge),ut=!0,Ct=Je,yn=mt},t.clearConfig=function(){Or=null,ut=!1,Ct=null,yn=null,A=D,j=""},t.isValidAttribute=function(Ge,H,ue){Or||xr({});const Be=Et(Ge),Ze=Et(H);return hL(Be,Ze,ue)},t.addHook=function(Ge,H){typeof H=="function"&&ua(ae,Ge)&&Oy(ae[Ge],H)},t.removeHook=function(Ge,H){if(ua(ae,Ge)){if(H!==void 0){const ue=uDe(ae[Ge],H);return ue===-1?void 0:dDe(ae[Ge],ue,1)[0]}return sU(ae[Ge])}},t.removeHooks=function(Ge){ua(ae,Ge)&&(ae[Ge]=[])},t.removeAllHooks=function(){ae=xU()},t}var Kh=Eie();function PDe(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.from(typeof e=="string"?[e]:e);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var i=r.reduce(function(o,c){var u=c.match(/\n([\t ]+|(?!\s).)/g);return u?o.concat(u.map(function(d){var h,f;return(f=(h=d.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0})):o},[]);if(i.length){var s=new RegExp(` 1066[ ]{`.concat(Math.min.apply(Math,i),"}"),"g");r=r.map(function(o){return o.replace(s,` 1067`)})}r[0]=r[0].replace(/^\r?\n/,"");var a=r[0];return t.forEach(function(o,c){var u=a.match(/(?:^|\n)( *)$/),d=u?u[1]:"",h=o;typeof o=="string"&&o.includes(` 1068`)&&(h=String(o).split(` 1069`).map(function(f,m){return m===0?f:"".concat(d).concat(f)}).join(` 1070`)),a+=h+r[c+1]}),a}const IDe="modulepreload",FDe=function(e){return"/"+e},yU={},_r=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=FDe(c),c in yU)return;yU[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":IDe,u||(h.as="script"),h.crossOrigin="",h.href=c,o&&h.setAttribute("nonce",o),document.head.appendChild(h),u)return new Promise((f,m)=>{h.addEventListener("load",f),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};var jie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(fb,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",c="hour",u="day",d="week",h="month",f="quarter",m="year",p="date",x="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}
vendor: 5,542 bytes, line 1070
1070|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var z=["th","st","nd","rd"],O=B%100;return"["+B+(z[(O-20)%10]||z[O]||z[0])+"]"}},w=function(B,z,O){var P=String(B);return!P||P.length>=z?B:""+Array(z+1-P.length).join(O)+B},S={s:w,z:function(B){var z=-B.utcOffset(),O=Math.abs(z),P=Math.floor(O/60),I=O%60;return(z<=0?"+":"-")+w(P,2,"0")+":"+w(I,2,"0")},m:function B(z,O){if(z.date()<O.date())return-B(O,z);var P=12*(O.year()-z.year())+(O.month()-z.month()),I=z.clone().add(P,h),q=O-I<0,R=z.clone().add(P+(q?-1:1),h);return+(-(P+(O-I)/(q?I-R:R-I))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:h,y:m,w:d,d:u,D:p,h:c,m:o,s:a,ms:s,Q:f}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},C="en",k={};k[C]=y;var _="$isDayjsObject",E=function(B){return B instanceof M||!(!B||!B[_])},A=function B(z,O,P){var I;if(!z)return C;if(typeof z=="string"){var q=z.toLowerCase();k[q]&&(I=q),O&&(k[q]=O,I=q);var R=z.split("-");if(!I&&R.length>1)return B(R[0])}else{var xe=z.name;k[xe]=z,I=xe}return!P&&I&&(C=I),I||!P&&C},j=function(B,z){if(E(B))return B.clone();var O=typeof z=="object"?z:{};return O.date=B,O.args=arguments,new M(O)},D=S;D.l=A,D.i=E,D.w=function(B,z){return j(B,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var M=function(){function B(O){this.$L=A(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[_]=!0}var z=B.prototype;return z.parse=function(O){this.$d=function(P){var I=P.date,q=P.utc;if(I===null)return new Date(NaN);if(D.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var R=I.match(v);if(R){var xe=R[2]-1||0,me=(R[7]||"0").substring(0,3);return q?new Date(Date.UTC(R[1],xe,R[3]||1,R[4]||0,R[5]||0,R[6]||0,me)):new Date(R[1],xe,R[3]||1,R[4]||0,R[5]||0,R[6]||0,me)}}return new Date(I)}(O),this.init()},z.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},z.$utils=function(){return D},z.isValid=function(){return this.$d.toString()!==x},z.isSame=function(O,P){var I=j(O);return this.startOf(P)<=I&&I<=this.endOf(P)},z.isAfter=function(O,P){return j(O)<this.startOf(P)},z.isBefore=function(O,P){return this.endOf(P)<j(O)},z.$g=function(O,P,I){return D.u(O)?this[P]:this.set(I,O)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(O,P){var I=this,q=!!D.u(P)||P,R=D.p(O),xe=function(Se,He){var tt=D.w(I.$u?Date.UTC(I.$y,He,Se):new Date(I.$y,He,Se),I);return q?tt:tt.endOf(u)},me=function(Se,He){return D.w(I.toDate()[Se].apply(I.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(He)),I)},U=this.$W,ae=this.$M,Ce=this.$D,je="set"+(this.$u?"UTC":"");switch(R){case m:return q?xe(1,0):xe(31,11);case h:return q?xe(1,ae):xe(0,ae+1);case d:var ve=this.$locale().weekStart||0,Te=(U<ve?U+7:U)-ve;return xe(q?Ce-Te:Ce+(6-Te),ae);case u:case p:return me(je+"Hours",0);case c:return me(je+"Minutes",1);case o:return me(je+"Seconds",2);case a:return me(je+"Milliseconds",3);default:return this.clone()}},z.endOf=function(O){return this.startOf(O,!1)},z.$set=function(O,P){var I,q=D.p(O),R="set"+(this.$u?"UTC":""),xe=(I={},I[u]=R+"Date",I[p]=R+"Date",I[h]=R+"Month",I[m]=R+"FullYear",I[c]=R+"Hours",I[o]=R+"Minutes",I[a]=R+"Seconds",I[s]=R+"Milliseconds",I)[q],me=q===u?this.$D+(P-this.$W):P;if(q===h||q===m){var U=this.clone().set(p,1);U.$d[xe](me),U.init(),this.$d=U.set(p,Math.min(this.$D,U.daysInMonth())).$d}else xe&&this.$d[xe](me);return this.init(),this},z.set=function(O,P){return this.clone().$set(O,P)},z.get=function(O){return this[D.p(O)]()},z.add=function(O,P){var I,q=this;O=Number(O);var R=D.p(P),xe=function(ae){var Ce=j(q);return D.w(Ce.date(Ce.date()+Math.round(ae*O)),q)};if(R===h)return this.set(h,this.$M+O);if(R===m)return this.set(m,this.$y+O);if(R===u)return xe(1);if(R===d)return xe(7);var me=(I={},I[o]=r,I[c]=i,I[a]=n,I)[R]||1,U=this.$d.getTime()+O*me;return D.w(U,this)},z.subtract=function(O,P){return this.add(-1*O,P)},z.format=function(O){var P=this,I=this.$locale();if(!this.isValid())return I.invalidDate||x;var q=O||"YYYY-MM-DDTHH:mm:ssZ",R=D.z(this),xe=this.$H,me=this.$m,U=this.$M,ae=I.weekdays,Ce=I.months,je=I.meridiem,ve=function(He,tt,we,Oe){return He&&(He[tt]||He(P,q))||we[tt].slice(0,Oe)},Te=function(He){return D.s(xe%12||12,He,"0")},Se=je||function(He,tt,we){var Oe=He<12?"AM":"PM";return we?Oe.toLowerCase():Oe};return q.replace(g,function(He,tt){return tt||function(we){switch(we){case"YY":return String(P.$y).slice(-2);case"YYYY":return D.s(P.$y,4,"0");case"M":return U+1;case"MM":return D.s(U+1,2,"0");case"MMM":return ve(I.monthsShort,U,Ce,3);case"MMMM":return ve(Ce,U);case"D":return P.$D;case"DD":return D.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return ve(I.weekdaysMin,P.$W,ae,2);case"ddd":return ve(I.weekdaysShort,P.$W,ae,3);case"dddd":return ae[P.$W];case"H":return String(xe);case"HH":return D.s(xe,2,"0");case"h":return Te(1);case"hh":return Te(2);case"a":return Se(xe,me,!0);case"A":return Se(xe,me,!1);case"m":return String(me);case"mm":return D.s(me,2,"0");case"s":return String(P.$s);case"ss":return D.s(P.$s,2,"0");case"SSS":return D.s(P.$ms,3,"0");case"Z":return R}return null}(He)||R.replace(":","")})}
vendor: 17,054 bytes, line 1070
1070,z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(O,P,I){var q,R=this,xe=D.p(P),me=j(O),U=(me.utcOffset()-this.utcOffset())*r,ae=this-me,Ce=function(){return D.m(R,me)};switch(xe){case m:q=Ce()/12;break;case h:q=Ce();break;case f:q=Ce()/3;break;case d:q=(ae-U)/6048e5;break;case u:q=(ae-U)/864e5;break;case c:q=ae/i;break;case o:q=ae/r;break;case a:q=ae/n;break;default:q=ae}return I?q:D.a(q)},z.daysInMonth=function(){return this.endOf(h).$D},z.$locale=function(){return k[this.$L]},z.locale=function(O,P){if(!O)return this.$L;var I=this.clone(),q=A(O,P,!0);return q&&(I.$L=q),I},z.clone=function(){return D.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},B}(),$=M.prototype;return j.prototype=$,[["$ms",s],["$s",a],["$m",o],["$H",c],["$W",u],["$M",h],["$y",m],["$D",p]].forEach(function(B){$[B[1]]=function(z){return this.$g(z,B[0],B[1])}}),j.extend=function(B,z){return B.$i||(B(z,M,j),B.$i=!0),j},j.locale=A,j.isDayjs=E,j.unix=function(B){return j(1e3*B)},j.en=k[C],j.Ls=k,j.p={},j})})(jie);var BDe=jie.exports;const zDe=dx(BDe);var Nie={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=e.BLANK_URL=void 0;var t=/^([^\w]*)(javascript|data|vbscript)/im,n=/&#(\w+)(^\w|;)?/g,r=/&(newline|tab);/gi,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|:)/gim,a=[".","/"];e.BLANK_URL="about:blank";function o(d){return a.indexOf(d[0])>-1}function c(d){var h=d.replace(i,"");return h.replace(n,function(f,m){return String.fromCharCode(m)})}function u(d){if(!d)return e.BLANK_URL;var h=c(d).replace(r,"").replace(i,"").trim();if(!h)return e.BLANK_URL;if(o(h))return h;var f=h.match(s);if(!f)return h;var m=f[0];return t.test(m)?e.BLANK_URL:h}e.sanitizeUrl=u})(Nie);var $De={value:()=>{}};function Aie(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new hC(n)}function hC(e){this._=e}function UDe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}hC.prototype=Aie.prototype={constructor:hC,on:function(e,t){var n=this._,r=UDe(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=VDe(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=bU(n[i],e.name,t);else if(t==null)for(i in n)n[i]=bU(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new hC(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function VDe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function bU(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=$De,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var e7="http://www.w3.org/1999/xhtml";const vU={svg:"http://www.w3.org/2000/svg",xhtml:e7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function w3(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vU.hasOwnProperty(t)?{space:vU[t],local:e}:e}function HDe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===e7&&t.documentElement.namespaceURI===e7?t.createElement(e):t.createElementNS(n,e)}}function qDe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Mie(e){var t=w3(e);return(t.local?qDe:HDe)(t)}function GDe(){}function p9(e){return e==null?GDe:function(){return this.querySelector(e)}}function WDe(e){typeof e!="function"&&(e=p9(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),c,u,d=0;d<a;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),o[d]=u);return new uo(r,this._parents)}function YDe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function KDe(){return[]}function Rie(e){return e==null?KDe:function(){return this.querySelectorAll(e)}}function XDe(e){return function(){return YDe(e.apply(this,arguments))}}function QDe(e){typeof e=="function"?e=XDe(e):e=Rie(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,c,u=0;u<o;++u)(c=a[u])&&(r.push(e.call(c,c.__data__,u,a)),i.push(c));return new uo(r,i)}function Oie(e){return function(){return this.matches(e)}}function Die(e){return function(t){return t.matches(e)}}var ZDe=Array.prototype.find;function JDe(e){return function(){return ZDe.call(this.children,e)}}function eLe(){return this.firstElementChild}function tLe(e){return this.select(e==null?eLe:JDe(typeof e=="function"?e:Die(e)))}var nLe=Array.prototype.filter;function rLe(){return Array.from(this.children)}function iLe(e){return function(){return nLe.call(this.children,e)}}function sLe(e){return this.selectAll(e==null?rLe:iLe(typeof e=="function"?e:Die(e)))}function aLe(e){typeof e!="function"&&(e=Oie(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&o.push(c);return new uo(r,this._parents)}function Lie(e){return new Array(e.length)}function oLe(){return new uo(this._enter||this._groups.map(Lie),this._parents)}function W4(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}W4.prototype={constructor:W4,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function lLe(e){return function(){return e}}function cLe(e,t,n,r,i,s){for(var a=0,o,c=t.length,u=s.length;a<u;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new W4(e,s[a]);for(;a<c;++a)(o=t[a])&&(i[a]=o)}function uLe(e,t,n,r,i,s,a){var o,c,u=new Map,d=t.length,h=s.length,f=new Array(d),m;for(o=0;o<d;++o)(c=t[o])&&(f[o]=m=a.call(c,c.__data__,o,t)+"",u.has(m)?i[o]=c:u.set(m,c));for(o=0;o<h;++o)m=a.call(e,s[o],o,s)+"",(c=u.get(m))?(r[o]=c,c.__data__=s[o],u.delete(m)):n[o]=new W4(e,s[o]);for(o=0;o<d;++o)(c=t[o])&&u.get(f[o])===c&&(i[o]=c)}function dLe(e){return e.__data__}function hLe(e,t){if(!arguments.length)return Array.from(this,dLe);var n=t?uLe:cLe,r=this._parents,i=this._groups;typeof e!="function"&&(e=lLe(e));for(var s=i.length,a=new Array(s),o=new Array(s),c=new Array(s),u=0;u<s;++u){var d=r[u],h=i[u],f=h.length,m=fLe(e.call(d,d&&d.__data__,u,r)),p=m.length,x=o[u]=new Array(p),v=a[u]=new Array(p),g=c[u]=new Array(f);n(d,h,x,v,g,m,t);for(var y=0,w=0,S,C;y<p;++y)if(S=x[y]){for(y>=w&&(w=y+1);!(C=v[w])&&++w<p;);S._next=C||null}}return a=new uo(a,r),a._enter=o,a._exit=c,a}function fLe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function mLe(){return new uo(this._exit||this._groups.map(Lie),this._parents)}function pLe(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function gLe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),c=0;c<a;++c)for(var u=n[c],d=r[c],h=u.length,f=o[c]=new Array(h),m,p=0;p<h;++p)(m=u[p]||d[p])&&(f[p]=m);for(;c<i;++c)o[c]=n[c];return new uo(o,this._parents)}function xLe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function yLe(e){e||(e=bLe);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,c=i[s]=new Array(o),u,d=0;d<o;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new uo(i,this._parents).order()}function bLe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function vLe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function wLe(){return Array.from(this)}function SLe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function CLe(){let e=0;for(const t of this)++e;return e}function kLe(){return!this.node()}function _Le(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function TLe(e){return function(){this.removeAttribute(e)}}function ELe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jLe(e,t){return function(){this.setAttribute(e,t)}}function NLe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ALe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function MLe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function RLe(e,t){var n=w3(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ELe:TLe:typeof t=="function"?n.local?MLe:ALe:n.local?NLe:jLe)(n,t))}function Pie(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function OLe(e){return function(){this.style.removeProperty(e)}}function DLe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function LLe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function PLe(e,t,n){return arguments.length>1?this.each((t==null?OLe:typeof t=="function"?LLe:DLe)(e,t,n??"")):Wg(this.node(),e)}function Wg(e,t){return e.style.getPropertyValue(t)||Pie(e).getComputedStyle(e,null).getPropertyValue(t)}function ILe(e){return function(){delete this[e]}}function FLe(e,t){return function(){this[e]=t}}function BLe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zLe(e,t){return arguments.length>1?this.each((t==null?ILe:typeof t=="function"?BLe:FLe)(e,t)):this.node()[e]}function Iie(e){return e.trim().split(/^|\s+/)}function g9(e){return e.classList||new Fie(e)}function Fie(e){this._node=e,this._names=Iie(e.getAttribute("class")||"")}Fie.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Bie(e,t){for(var n=g9(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function zie(e,t){for(var n=g9(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function $Le(e){return function(){Bie(this,e)}}function ULe(e){return function(){zie(this,e)}}function VLe(e,t){return function(){(t.apply(this,arguments)?Bie:zie)(this,e)}}function HLe(e,t){var n=Iie(e+"");if(arguments.length<2){for(var r=g9(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?VLe:t?$Le:ULe)(n,t))}function qLe(){this.textContent=""}function GLe(e){return function(){this.textContent=e}}function WLe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function YLe(e){return arguments.length?this.each(e==null?qLe:(typeof e=="function"?WLe:GLe)(e)):this.node().textContent}function KLe(){this.innerHTML=""}function XLe(e){return function(){this.innerHTML=e}}function QLe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ZLe(e){return arguments.length?this.each(e==null?KLe:(typeof e=="function"?QLe:XLe)(e)):this.node().innerHTML}function JLe(){this.nextSibling&&this.parentNode.appendChild(this)}function ePe(){return this.each(JLe)}function tPe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function nPe(){return this.each(tPe)}function rPe(e){var t=typeof e=="function"?e:Mie(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function iPe(){return null}function sPe(e,t){var n=typeof e=="function"?e:Mie(e),r=t==null?iPe:typeof t=="function"?t:p9(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function aPe(){var e=this.parentNode;e&&e.removeChild(this)}function oPe(){return this.each(aPe)}function lPe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cPe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function uPe(e){return this.select(e?cPe:lPe)}function dPe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function hPe(e){return function(t){e.call(this,t,this.__data__)}}function fPe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function mPe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function pPe(e,t,n){return function(){var r=this.__on,i,s=hPe(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function gPe(e,t,n){var r=fPe(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,u=o.length,d;c<u;++c)for(i=0,d=o[c];i<s;++i)if((a=r[i]).type===d.type&&a.name===d.name)return d.value}return}for(o=t?pPe:mPe,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function $ie(e,t,n){var r=Pie(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function xPe(e,t){return function(){return $ie(this,e,t)}}function yPe(e,t){return function(){return $ie(this,e,t.apply(this,arguments))}}function bPe(e,t){return this.each((typeof t=="function"?yPe:xPe)(e,t))}function*vPe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var Uie=[null];function uo(e,t){this._groups=e,this._parents=t}function hw(){return new uo([[document.documentElement]],Uie)}function wPe(){return this}uo.prototype=hw.prototype={constructor:uo,select:WDe,selectAll:QDe,selectChild:tLe,selectChildren:sLe,filter:aLe,data:hLe,enter:oLe,exit:mLe,join:pLe,merge:gLe,selection:wPe,order:xLe,sort:yLe,call:vLe,nodes:wLe,node:SLe,size:CLe,empty:kLe,each:_Le,attr:RLe,style:PLe,property:zLe,classed:HLe,text:YLe,html:ZLe,raise:ePe,lower:nPe,append:rPe,insert:sPe,remove:oPe,clone:uPe,datum:dPe,on:gPe,dispatch:bPe,[Symbol.iterator]:vPe};function _o(e){return typeof e=="string"?new uo([[document.querySelector(e)]],[document.documentElement]):new uo([[e]],Uie)}var Yg=0,x1=0,Py=0,Vie=1e3,Y4,y1,K4=0,qm=0,S3=0,Zb=typeof performance=="object"&&performance.now?performance:Date,Hie=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function x9(){return qm||(Hie(SPe),qm=Zb.now()+S3)}function SPe(){qm=0}function X4(){this._call=this._time=this._next=null}X4.prototype=qie.prototype={constructor:X4,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?x9():+n)+(t==null?0:+t),!this._next&&y1!==this&&(y1?y1._next=this:Y4=this,y1=this),this._call=e,this._time=n,t7()},stop:function(){this._call&&(this._call=null,this._time=1/0,t7())}};function qie(e,t,n){var r=new X4;return r.restart(e,t,n),r}function CPe(){x9(),++Yg;for(var e=Y4,t;e;)(t=qm-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yg}function wU(){qm=(K4=Zb.now())+S3,Yg=x1=0;try{CPe()}finally{Yg=0,_Pe(),qm=0}}function kPe(){var e=Zb.now(),t=e-K4;t>Vie&&(S3-=t,K4=e)}function _Pe(){for(var e,t=Y4,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Y4=n);y1=e,t7(r)}
vendor: 6,473 bytes, line 1070
1070function t7(e){if(!Yg){x1&&(x1=clearTimeout(x1));var t=e-qm;t>24?(e<1/0&&(x1=setTimeout(wU,e-Zb.now()-S3)),Py&&(Py=clearInterval(Py))):(Py||(K4=Zb.now(),Py=setInterval(kPe,Vie)),Yg=1,Hie(wU))}}function SU(e,t,n){var r=new X4;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var TPe=Aie("start","end","cancel","interrupt"),EPe=[],Gie=0,CU=1,n7=2,fC=3,kU=4,r7=5,mC=6;function C3(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;jPe(e,n,{name:t,index:r,group:i,on:TPe,tween:EPe,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Gie})}function y9(e,t){var n=Rl(e,t);if(n.state>Gie)throw new Error("too late; already scheduled");return n}function Dc(e,t){var n=Rl(e,t);if(n.state>fC)throw new Error("too late; already running");return n}function Rl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function jPe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=qie(s,0,n.time);function s(u){n.state=CU,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var d,h,f,m;if(n.state!==CU)return c();for(d in r)if(m=r[d],m.name===n.name){if(m.state===fC)return SU(a);m.state===kU?(m.state=mC,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+d<t&&(m.state=mC,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete r[d])}if(SU(function(){n.state===fC&&(n.state=kU,n.timer.restart(o,n.delay,n.time),o(u))}),n.state=n7,n.on.call("start",e,e.__data__,n.index,n.group),n.state===n7){for(n.state=fC,i=new Array(f=n.tween.length),d=0,h=-1;d<f;++d)(m=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=m);i.length=h+1}}function o(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=r7,1),h=-1,f=i.length;++h<f;)i[h].call(e,d);n.state===r7&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=mC,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function NPe(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>n7&&r.state<r7,r.state=mC,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function APe(e){return this.each(function(){NPe(this,e)})}function MPe(e,t){var n,r;return function(){var i=Dc(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function RPe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Dc(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===t){i[c]=o;break}c===u&&i.push(o)}s.tween=i}}function OPe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Rl(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?MPe:RPe)(n,e,t))}function b9(e,t,n){var r=e._id;return e.each(function(){var i=Dc(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Rl(i,r).value[t]}}function Wie(e,t){var n;return(typeof t=="number"?Wd:t instanceof Hb?QB:(n=Hb(t))?(t=n,QB):p_e)(e,t)}function DPe(e){return function(){this.removeAttribute(e)}}function LPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function PPe(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function IPe(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function FPe(e,t,n){var r,i,s;return function(){var a,o=n(this),c;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=o+"",a===c?null:a===r&&c===i?s:(i=c,s=t(r=a,o)))}}function BPe(e,t,n){var r,i,s;return function(){var a,o=n(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=o+"",a===c?null:a===r&&c===i?s:(i=c,s=t(r=a,o)))}}function zPe(e,t){var n=w3(e),r=n==="transform"?b_e:Wie;return this.attrTween(e,typeof t=="function"?(n.local?BPe:FPe)(n,r,b9(this,"attr."+e,t)):t==null?(n.local?LPe:DPe)(n):(n.local?IPe:PPe)(n,r,t))}function $Pe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function UPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function VPe(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&UPe(e,s)),n}return i._value=t,i}function HPe(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&$Pe(e,s)),n}return i._value=t,i}function qPe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=w3(e);return this.tween(n,(r.local?VPe:HPe)(r,t))}function GPe(e,t){return function(){y9(this,e).delay=+t.apply(this,arguments)}}function WPe(e,t){return t=+t,function(){y9(this,e).delay=t}}function YPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?GPe:WPe)(t,e)):Rl(this.node(),t).delay}function KPe(e,t){return function(){Dc(this,e).duration=+t.apply(this,arguments)}}function XPe(e,t){return t=+t,function(){Dc(this,e).duration=t}}function QPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?KPe:XPe)(t,e)):Rl(this.node(),t).duration}function ZPe(e,t){if(typeof t!="function")throw new Error;return function(){Dc(this,e).ease=t}}function JPe(e){var t=this._id;return arguments.length?this.each(ZPe(t,e)):Rl(this.node(),t).ease}function eIe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Dc(this,e).ease=n}}function tIe(e){if(typeof e!="function")throw new Error;return this.each(eIe(this._id,e))}function nIe(e){typeof e!="function"&&(e=Oie(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&o.push(c);return new Wu(r,this._parents,this._name,this._id)}function rIe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var c=t[o],u=n[o],d=c.length,h=a[o]=new Array(d),f,m=0;m<d;++m)(f=c[m]||u[m])&&(h[m]=f);for(;o<r;++o)a[o]=t[o];return new Wu(a,this._parents,this._name,this._id)}function iIe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>
vendor: 15,110 bytes, line 1070
1070=0&&(t=t.slice(0,n)),!t||t==="start"})}function sIe(e,t,n){var r,i,s=iIe(t)?y9:Dc;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function aIe(e,t){var n=this._id;return arguments.length<2?Rl(this.node(),n).on.on(e):this.each(sIe(n,e,t))}function oIe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function lIe(){return this.on("end.remove",oIe(this._id))}function cIe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=p9(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],c=o.length,u=s[a]=new Array(c),d,h,f=0;f<c;++f)(d=o[f])&&(h=e.call(d,d.__data__,f,o))&&("__data__"in d&&(h.__data__=d.__data__),u[f]=h,C3(u[f],t,n,f,u,Rl(d,n)));return new Wu(s,this._parents,t,n)}function uIe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Rie(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var c=r[o],u=c.length,d,h=0;h<u;++h)if(d=c[h]){for(var f=e.call(d,d.__data__,h,c),m,p=Rl(d,n),x=0,v=f.length;x<v;++x)(m=f[x])&&C3(m,t,n,x,f,p);s.push(f),a.push(d)}return new Wu(s,a,t,n)}var dIe=hw.prototype.constructor;function hIe(){return new dIe(this._groups,this._parents)}function fIe(e,t){var n,r,i;return function(){var s=Wg(this,e),a=(this.style.removeProperty(e),Wg(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Yie(e){return function(){this.style.removeProperty(e)}}function mIe(e,t,n){var r,i=n+"",s;return function(){var a=Wg(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function pIe(e,t,n){var r,i,s;return function(){var a=Wg(this,e),o=n(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),Wg(this,e))),a===c?null:a===r&&c===i?s:(i=c,s=t(r=a,o))}}function gIe(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var c=Dc(this,e),u=c.on,d=c.value[s]==null?o||(o=Yie(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(a,i=d),c.on=r}}function xIe(e,t,n){var r=(e+="")=="transform"?y_e:Wie;return t==null?this.styleTween(e,fIe(e,r)).on("end.style."+e,Yie(e)):typeof t=="function"?this.styleTween(e,pIe(e,r,b9(this,"style."+e,t))).each(gIe(this._id,e)):this.styleTween(e,mIe(e,r,t),n).on("end.style."+e,null)}function yIe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function bIe(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&yIe(e,a,n)),r}return s._value=t,s}function vIe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,bIe(e,t,n??""))}function wIe(e){return function(){this.textContent=e}}function SIe(e){return function(){var t=e(this);this.textContent=t??""}}function CIe(e){return this.tween("text",typeof e=="function"?SIe(b9(this,"text",e)):wIe(e==null?"":e+""))}function kIe(e){return function(t){this.textContent=e.call(this,t)}}function _Ie(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&kIe(i)),t}return r._value=e,r}function TIe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,_Ie(e))}function EIe(){for(var e=this._name,t=this._id,n=Kie(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,c,u=0;u<o;++u)if(c=a[u]){var d=Rl(c,t);C3(c,e,n,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Wu(r,this._parents,e,n)}function jIe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},c={value:function(){--i===0&&s()}};n.each(function(){var u=Dc(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),u.on=t}),i===0&&s()})}var NIe=0;function Wu(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Kie(){return++NIe}var qc=hw.prototype;Wu.prototype={constructor:Wu,select:cIe,selectAll:uIe,selectChild:qc.selectChild,selectChildren:qc.selectChildren,filter:nIe,merge:rIe,selection:hIe,transition:EIe,call:qc.call,nodes:qc.nodes,node:qc.node,size:qc.size,empty:qc.empty,each:qc.each,on:aIe,attr:zPe,attrTween:qPe,style:xIe,styleTween:vIe,text:CIe,textTween:TIe,remove:lIe,tween:OPe,delay:YPe,duration:QPe,ease:JPe,easeVarying:tIe,end:jIe,[Symbol.iterator]:qc[Symbol.iterator]};function AIe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var MIe={time:null,delay:0,duration:250,ease:AIe};function RIe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function OIe(e){var t,n;e instanceof Wu?(t=e._id,e=e._name):(t=Kie(),(n=MIe).time=x9(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,c,u=0;u<o;++u)(c=a[u])&&C3(c,e,t,u,a,n||RIe(c,t));return new Wu(r,this._parents,e,t)}hw.prototype.interrupt=APe;hw.prototype.transition=OIe;function b1(e,t,n){this.k=e,this.x=t,this.y=n}b1.prototype={constructor:b1,scale:function(e){return e===1?this:new b1(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new b1(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};b1.prototype;const pC={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;const i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;switch(r){case"r":return pC.hue2rgb(s,i,e+1/3)*255;case"g":return pC.hue2rgb(s,i,e)*255;case"b":return pC.hue2rgb(s,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;const i=Math.max(e,t,n),s=Math.min(e,t,n),a=(i+s)/2;if(r==="l")return a*100;if(i===s)return 0;const o=i-s,c=a>.5?o/(2-i-s):o/(i+s);if(r==="s")return c*100;switch(i){case e:return((t-n)/o+(t<n?6:0))*60;case t:return((n-e)/o+2)*60;case n:return((e-t)/o+4)*60;default:return-1}}},DIe={clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},LIe={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},qt={channel:pC,lang:DIe,unit:LIe},$d={};for(let e=0;e<=255;e++)$d[e]=qt.unit.dec2hex(e);const ws={ALL:0,RGB:1,HSL:2};class PIe{constructor(){this.type=ws.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ws.ALL}is(t){return this.type===t}}class IIe{constructor(t,n){this.color=n,this.changed=!1,this.data=t,this.type=new PIe}set(t,n){return this.color=n,this.changed=!1,this.data=t,this.type.type=ws.ALL,this}_ensureHSL(){const t=this.data,{h:n,s:r,l:i}=t;n===void 0&&(t.h=qt.channel.rgb2hsl(t,"h")),r===void 0&&(t.s=qt.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=qt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:n,g:r,b:i}=t;n===void 0&&(t.r=qt.channel.hsl2rgb(t,"r")),r===void 0&&(t.g=qt.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=qt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,n=t.r;return!this.type.is(ws.HSL)&&n!==void 0?n:(this._ensureHSL(),qt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,n=t.g;return!this.type.is(ws.HSL)&&n!==void 0?n:(this._ensureHSL(),qt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,n=t.b;return!this.type.is(ws.HSL)&&n!==void 0?n:(this._ensureHSL(),qt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,n=t.h;return!this.type.is(ws.RGB)&&n!==void 0?n:(this._ensureRGB(),qt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,n=t.s;return!this.type.is(ws.RGB)&&n!==void 0?n:(this._ensureRGB(),qt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,n=t.l;return!this.type.is(ws.RGB)&&n!==void 0?n:(this._ensureRGB(),qt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ws.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ws.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ws.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ws.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ws.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ws.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const k3=new IIe({r:0,g:0,b:0,a:0},"transparent"),Y0={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Y0.re);if(!t)return;const n=t[1],r=parseInt(n,16),i=n.length,s=i%4===0,a=i>4,o=a?1:17,c=a?8:4,u=s?0:-1,d=a?255:15;return k3.set({r:(r>>c*(u+3)&d)*o,g:(r>>c*(u+2)&d)*o,b:(r>>c*(u+1)&d)*o,a:s?(r&d)*o/255:1},e)},stringify:e=>{const{r:t,g:n,b:r,a:i}=e;return i<1?`#${$d[Math.round(t)]}${$d[Math.round(n)]}${$d[Math.round(r)]}${$d[Math.round(i*255)]}`:`#${$d[Math.round(t)]}${$d[Math.round(n)]}${$d[Math.round(r)]}`}},em={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(em.hueRe);if(t){const[,n,r]=t;switch(r){case"grad":return qt.channel.clamp.h(parseFloat(n)*.9);case"rad":return qt.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return qt.channel.clamp.h(parseFloat(n)*360)}}return qt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const n=e.match(em.re);if(!n)return;const[,r,i,s,a,o]=n;return k3.set({h:em._hue2deg(r),s:qt.channel.clamp.s(parseFloat(i)),l:qt.channel.clamp.l(parseFloat(s)),a:a?qt.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${qt.lang.round(t)}, ${qt.lang.round(n)}%, ${qt.lang.round(r)}%, ${i})`:`hsl(${qt.lang.round(t)}, ${qt.lang.round(n)}%, ${qt.lang.round(r)}%)`}},J1={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=J1.colors[e];if(t)return Y0.parse(t)},stringify:e=>{const t=Y0.stringify(e);for(const n in J1.colors)if(J1.colors[n]===t)return n}},v1={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const n=e.match(v1.re);if(!n)return;const[,r,i,s,a,o,c,u,d]=n;return k3.set({r:qt.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:qt.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:qt.channel.clamp.b(c?parseFloat(o)*2.55:parseFloat(o)),a:u?qt.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{const{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${qt.lang.round(t)}, ${qt.lang.round(n)}, ${qt.lang.round(r)}, ${qt.lang.round(i)})`:`rgb(${qt.lang.round(t)}, ${qt.lang.round(n)}, ${qt.lang.round(r)})`}},vc={format:{keyword:J1,hex:Y0,rgb:v1,rgba:v1,hsl:em,hsla:em},parse:e=>{if(typeof e!="string")return e;const t=Y0.parse(e)||v1.parse(e)||em.parse(e)||J1.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ws.HSL)||e.data.r===void 0?em.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?v1.stringify(e):Y0.stringify(e)},Xie=(e,t)=>{const n=vc.parse(e);for(const r in t)n[r]=qt.channel.clamp[r](t[r]);
vendor: 15,185 bytes, line 1070
1070return vc.stringify(n)},eb=(e,t,n=0,r=1)=>{if(typeof e!="number")return Xie(e,{a:t});const i=k3.set({r:qt.channel.clamp.r(e),g:qt.channel.clamp.g(t),b:qt.channel.clamp.b(n),a:qt.channel.clamp.a(r)});return vc.stringify(i)},FIe=e=>{const{r:t,g:n,b:r}=vc.parse(e),i=.2126*qt.channel.toLinear(t)+.7152*qt.channel.toLinear(n)+.0722*qt.channel.toLinear(r);return qt.lang.round(i)},BIe=e=>FIe(e)>=.5,fw=e=>!BIe(e),Qie=(e,t,n)=>{const r=vc.parse(e),i=r[t],s=qt.channel.clamp[t](i+n);return i!==s&&(r[t]=s),vc.stringify(r)},jt=(e,t)=>Qie(e,"l",t),Ot=(e,t)=>Qie(e,"l",-t),de=(e,t)=>{const n=vc.parse(e),r={};for(const i in t)t[i]&&(r[i]=n[i]+t[i]);return Xie(e,r)},zIe=(e,t,n=50)=>{const{r,g:i,b:s,a}=vc.parse(e),{r:o,g:c,b:u,a:d}=vc.parse(t),h=n/100,f=h*2-1,m=a-d,x=((f*m===-1?f:(f+m)/(1+f*m))+1)/2,v=1-x,g=r*x+o*v,y=i*x+c*v,w=s*x+u*v,S=a*h+d*(1-h);return eb(g,y,w,S)},nt=(e,t=100)=>{const n=vc.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,zIe(n,e,t)};var Zie=typeof global=="object"&&global&&global.Object===Object&&global,$Ie=typeof self=="object"&&self&&self.Object===Object&&self,Lc=Zie||$Ie||Function("return this")(),Q4=Lc.Symbol,Jie=Object.prototype,UIe=Jie.hasOwnProperty,VIe=Jie.toString,Iy=Q4?Q4.toStringTag:void 0;function HIe(e){var t=UIe.call(e,Iy),n=e[Iy];try{e[Iy]=void 0;var r=!0}catch{}var i=VIe.call(e);return r&&(t?e[Iy]=n:delete e[Iy]),i}var qIe=Object.prototype,GIe=qIe.toString;function WIe(e){return GIe.call(e)}var YIe="[object Null]",KIe="[object Undefined]",_U=Q4?Q4.toStringTag:void 0;function Xx(e){return e==null?e===void 0?KIe:YIe:_U&&_U in Object(e)?HIe(e):WIe(e)}function wp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var XIe="[object AsyncFunction]",QIe="[object Function]",ZIe="[object GeneratorFunction]",JIe="[object Proxy]";function v9(e){if(!wp(e))return!1;var t=Xx(e);return t==QIe||t==ZIe||t==XIe||t==JIe}var NE=Lc["__core-js_shared__"],TU=function(){var e=/[^.]+$/.exec(NE&&NE.keys&&NE.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function eFe(e){return!!TU&&TU in e}var tFe=Function.prototype,nFe=tFe.toString;function Sp(e){if(e!=null){try{return nFe.call(e)}catch{}try{return e+""}catch{}}return""}var rFe=/[\\^$.*+?()[\]{}|]/g,iFe=/^\[object .+?Constructor\]$/,sFe=Function.prototype,aFe=Object.prototype,oFe=sFe.toString,lFe=aFe.hasOwnProperty,cFe=RegExp("^"+oFe.call(lFe).replace(rFe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uFe(e){if(!wp(e)||eFe(e))return!1;var t=v9(e)?cFe:iFe;return t.test(Sp(e))}function dFe(e,t){return e==null?void 0:e[t]}function Cp(e,t){var n=dFe(e,t);return uFe(n)?n:void 0}var Jb=Cp(Object,"create");function hFe(){this.__data__=Jb?Jb(null):{},this.size=0}function fFe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mFe="__lodash_hash_undefined__",pFe=Object.prototype,gFe=pFe.hasOwnProperty;function xFe(e){var t=this.__data__;if(Jb){var n=t[e];return n===mFe?void 0:n}return gFe.call(t,e)?t[e]:void 0}var yFe=Object.prototype,bFe=yFe.hasOwnProperty;function vFe(e){var t=this.__data__;return Jb?t[e]!==void 0:bFe.call(t,e)}var wFe="__lodash_hash_undefined__";function SFe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Jb&&t===void 0?wFe:t,this}function Gm(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gm.prototype.clear=hFe;Gm.prototype.delete=fFe;Gm.prototype.get=xFe;Gm.prototype.has=vFe;Gm.prototype.set=SFe;function CFe(){this.__data__=[],this.size=0}function _3(e,t){return e===t||e!==e&&t!==t}function T3(e,t){for(var n=e.length;n--;)if(_3(e[n][0],t))return n;return-1}var kFe=Array.prototype,_Fe=kFe.splice;function TFe(e){var t=this.__data__,n=T3(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():_Fe.call(t,n,1),--this.size,!0}function EFe(e){var t=this.__data__,n=T3(t,e);return n<0?void 0:t[n][1]}function jFe(e){return T3(this.__data__,e)>-1}function NFe(e,t){var n=this.__data__,r=T3(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function pd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pd.prototype.clear=CFe;pd.prototype.delete=TFe;pd.prototype.get=EFe;pd.prototype.has=jFe;pd.prototype.set=NFe;var ev=Cp(Lc,"Map");function AFe(){this.size=0,this.__data__={hash:new Gm,map:new(ev||pd),string:new Gm}}function MFe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function E3(e,t){var n=e.__data__;return MFe(t)?n[typeof t=="string"?"string":"hash"]:n.map}function RFe(e){var t=E3(this,e).delete(e);return this.size-=t?1:0,t}function OFe(e){return E3(this,e).get(e)}function DFe(e){return E3(this,e).has(e)}function LFe(e,t){var n=E3(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mf.prototype.clear=AFe;mf.prototype.delete=RFe;mf.prototype.get=OFe;mf.prototype.has=DFe;mf.prototype.set=LFe;var PFe="Expected a function";function mw(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(PFe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(mw.Cache||mf),n}mw.Cache=mf;function IFe(){this.__data__=new pd,this.size=0}function FFe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function BFe(e){return this.__data__.get(e)}function zFe(e){return this.__data__.has(e)}var $Fe=200;function UFe(e,t){var n=this.__data__;if(n instanceof pd){var r=n.__data__;if(!ev||r.length<$Fe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mf(r)}return n.set(e,t),this.size=n.size,this}function Qx(e){var t=this.__data__=new pd(e);this.size=t.size}Qx.prototype.clear=IFe;Qx.prototype.delete=FFe;Qx.prototype.get=BFe;Qx.prototype.has=zFe;Qx.prototype.set=UFe;var Z4=function(){try{var e=Cp(Object,"defineProperty");return e({},"",{}),e}catch{}}();function w9(e,t,n){t=="__proto__"&&Z4?Z4(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function i7(e,t,n){(n!==void 0&&!_3(e[t],n)||n===void 0&&!(t in e))&&w9(e,t,n)}function VFe(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return t}}var HFe=VFe(),ese=typeof exports=="object"&&exports&&!exports.nodeType&&exports,EU=ese&&typeof module=="object"&&module&&!module.nodeType&&module,qFe=EU&&EU.exports===ese,jU=qFe?Lc.Buffer:void 0,NU=jU?jU.allocUnsafe:void 0;function GFe(e,t){if(t)return e.slice();var n=e.length,r=NU?NU(n):new e.constructor(n);return e.copy(r),r}var AU=Lc.Uint8Array;function WFe(e){var t=new e.constructor(e.byteLength);return new AU(t).set(new AU(e)),t}function YFe(e,t){var n=t?WFe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function KFe(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var MU=Object.create,XFe=function(){function e(){}return function(t){if(!wp(t))return{};if(MU)return MU(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function tse(e,t){return function(n){return e(t(n))}}var nse=tse(Object.getPrototypeOf,Object),QFe=Object.prototype;function j3(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||QFe;return e===n}function ZFe(e){return typeof e.constructor=="function"&&!j3(e)?XFe(nse(e)):{}}function pw(e){return e!=null&&typeof e=="object"}var JFe="[object Arguments]";function RU(e){return pw(e)&&Xx(e)==JFe}var rse=Object.prototype,eBe=rse.hasOwnProperty,tBe=rse.propertyIsEnumerable,J4=RU(function(){return arguments}())?RU:function(e){return pw(e)&&eBe.call(e,"callee")&&!tBe.call(e,"callee")},e5=Array.isArray,nBe=9007199254740991;function ise(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nBe}function N3(e){return e!=null&&ise(e.length)&&!v9(e)}function rBe(e){return pw(e)&&N3(e)}function iBe(){return!1}var sse=typeof exports=="object"&&exports&&!exports.nodeType&&exports,OU=sse&&typeof module=="object"&&module&&!module.nodeType&&module,sBe=OU&&OU.exports===sse,DU=sBe?Lc.Buffer:void 0,aBe=DU?DU.isBuffer:void 0,S9=aBe||iBe,oBe="[object Object]",lBe=Function.prototype,cBe=Object.prototype,ase=lBe.toString,uBe=cBe.hasOwnProperty,dBe=ase.call(Object);function hBe(e){if(!pw(e)||Xx(e)!=oBe)return!1;var t=nse(e);if(t===null)return!0;var n=uBe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ase.call(n)==dBe}var fBe="[object Arguments]",mBe="[object Array]",pBe="[object Boolean]",gBe="[object Date]",xBe="[object Error]",yBe="[object Function]",bBe="[object Map]",vBe="[object Number]",wBe="[object Object]",SBe="[object RegExp]",CBe="[object Set]",kBe="[object String]",_Be="[object WeakMap]",TBe="[object ArrayBuffer]",EBe="[object DataView]",jBe="[object Float32Array]",NBe="[object Float64Array]",ABe="[object Int8Array]",MBe="[object Int16Array]",RBe="[object Int32Array]",OBe="[object Uint8Array]",DBe="[object Uint8ClampedArray]",LBe="[object Uint16Array]",PBe="[object Uint32Array]",Er={};Er[jBe]=Er[NBe]=Er[ABe]=Er[MBe]=Er[RBe]=Er[OBe]=Er[DBe]=Er[LBe]=Er[PBe]=!0;Er[fBe]=Er[mBe]=Er[TBe]=Er[pBe]=Er[EBe]=Er[gBe]=Er[xBe]=Er[yBe]=Er[bBe]=Er[vBe]=Er[wBe]=Er[SBe]=Er[CBe]=Er[kBe]=Er[_Be]=!1;function IBe(e){return pw(e)&&ise(e.length)&&!!Er[Xx(e)]}function FBe(e){return function(t){return e(t)}}var ose=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tb=ose&&typeof module=="object"&&module&&!module.nodeType&&module,BBe=tb&&tb.exports===ose,AE=BBe&&Zie.process,LU=function(){try{var e=tb&&tb.require&&tb.require("util").types;return e||AE&&AE.binding&&AE.binding("util")}catch{}}(),PU=LU&&LU.isTypedArray,C9=PU?FBe(PU):IBe;function s7(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var zBe=Object.prototype,$Be=zBe.hasOwnProperty;function UBe(e,t,n){var r=e[t];(!($Be.call(e,t)&&_3(r,n))||n===void 0&&!(t in e))&&w9(e,t,n)}function VBe(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],c=void 0;c===void 0&&(c=e[o]),i?w9(n,o,c):UBe(n,o,c)}return n}function HBe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var qBe=9007199254740991,GBe=/^(?:0|[1-9]\d*)$/;function lse(e,t){var n=typeof e;return t=t??qBe,!!t&&(n=="number"||n!="symbol"&&GBe.test(e))&&e>-1&&e%1==0&&e<t}var WBe=Object.prototype,YBe=WBe.hasOwnProperty;function KBe(e,t){var n=e5(e),r=!n&&J4(e),i=!n&&!r&&S9(e),s=!n&&!r&&!i&&C9(e),a=n||r||i||s,o=a?HBe(e.length,String):[],c=o.length;for(var u in e)(t||YBe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lse(u,c)))&&o.push(u);return o}function XBe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var QBe=Object.prototype,ZBe=QBe.hasOwnProperty;function JBe(e){if(!wp(e))return XBe(e);var t=j3(e),n=[];for(var r in e)r=="constructor"&&(t||!ZBe.call(e,r))||n.push(r);return n}function cse(e){return N3(e)?KBe(e,!0):JBe(e)}function eze(e){return VBe(e,cse(e))}function tze(e,t,n,r,i,s,a){var o=s7(e,n),c=s7(t,n),u=a.get(c);if(u){i7(e,n,u);return}var d=s?s(o,c,n+"",e,t,a):void 0,h=d===void 0;if(h){var f=e5(c),m=!f&&S9(c),p=!f&&!m&&C9(c);d=c,f||m||p?e5(o)?d=o:rBe(o)?d=KFe(o):m?(h=!1,d=GFe(c,!0)):p?(h=!1,d=YFe(c,!0)):d=[]:hBe(c)||J4(c)?(d=o,J4(o)?d=eze(o):(!wp(o)||v9(o))&&(d=ZFe(c))):h=!1}h&&(a.set(c,d),i(d,c,r,s,a),a.delete(c)),i7(e,n,d)}function use(e,t,n,r,i){e!==t&&HFe(t,function(s,a){if(i||(i=new Qx),wp(s))tze(e,t,a,n,use,r,i);else{var o=r?r(s7(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),i7(e,a,o)}},cse)}function dse(e){return e}function nze(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var IU=Math.max;function rze(e,t,n){return t=IU(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=IU(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),nze(e,this,o)}}function ize(e){return function(){return e}}var sze=Z4?function(e,t){return Z4(e,"toString",{configurable:!0,enumerable:!1,value:ize(t),writable:!0})}:dse,aze=800,oze=16,lze=Date.now;function cze(e){var t=0,n=0;return function(){var r=lze(),i=oze-(r-n);if(n=r,i>0){if(++t>=aze)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var uze=cze(sze);function dze(e,t){return uze(rze(e,t,dse),e+"")}function hze(e,t,n){if(!wp(n))return!1;var r=typeof t;return(r=="number"?N3(n)&&lse(t,n.length):r=="string"&&t in n)?_3(n[t],e):!1}function fze(e){return dze(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&hze(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var mze=fze(function(e,t,n){use(e,t,n)}),k9="comm",hse="rule",fse="decl",pze="@media",gze="@import",xze="@supports",yze="@namespace",a7="@keyframes",mse="@layer",bze=Math.abs,nb=String.fromCharCode;function pse(e){return e.trim()}function o7(e,t,n){return e.replace(t,n)}function K0(e,t){return e.charCodeAt(t)|0}function Kg(e,t,n){return e.slice(t,n)}function $l(e){return e.length}function gse(e){return e.length}function I2(e,t){return t.push(e),e}var A3=1,Xg=1,xse=0,Go=0,pi=0,Zx="";function _9(e,t,n,r,i,s,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:A3,column:Xg,length:a,return:"",siblings:o}}function vze(){return pi}function wze(){return pi=Go>0?K0(Zx,--Go):0,Xg--,pi===10&&(Xg=1,A3--),pi}function Tl(){return pi=Go<xse?K0(Zx,Go++):0,Xg++,pi===10&&(Xg=1,A3++),pi}function ph(){return K0(Zx,Go)}function gC(){return Go}function M3(e,t){return Kg(Zx,e,t)}function tv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Sze(e){return A3=Xg=1,xse=$l(Zx=e),Go=0,[]}function Cze(e){return Zx="",e}function ME(e){return pse(M3(Go-1,l7(e===91?e+2:e===40?e+1:e)))}function kze(e){for(;(pi=ph())&&pi<33;)Tl();return tv(e)>2||tv(pi)>3?"":" "}function _ze(e,t){for(;--t&&Tl()&&!(pi<48||pi>102||pi>57&&pi<65||pi>70&&pi<97););return M3(e,gC()+(t<6&&ph()==32&&Tl()==32))}function l7(e){for(;Tl();)switch(pi){case e:return Go;case 34:case 39:e!==34&&e!==39&&l7(pi);break;case 40:e===41&&l7(e);break;case 92:Tl();break}return Go}function Tze(e,t){for(;Tl()&&e+pi!==57;)if(e+pi===84&&ph()===47)break;return"/*"+M3(t,Go-1)+"*"+nb(e===47?e:Tl())}function Eze(e){for(;!tv(ph());)Tl();return M3(e,Go)}function jze(e){return Cze(xC("",null,null,null,[""],e=Sze(e),0,[0],e))}function xC(e,t,n,r,i,s,a,o,c){for(var u=0,d=0,h=a,f=0,m=0,p=0,x=1,v=1,g=1,y=0,w=0,S="",C=i,k=s,_=r,E=S;v;)switch(p=w,w=Tl()){case 40:p!=108&&K0(E,h-1)==58?(y++,E+="("):E+=ME(w);break;case 41:y--,E+=")";break;case 34:case 39:case 91:E+=ME(w);break;case 9:case 10:case 13:case 32:if(y>0){E+=nb(w);break}E+=kze(p);break;case 92:E+=_ze(gC()-1,7);continue;case 47:switch(ph()){case 42:case 47:I2(Nze(Tze(Tl(),gC()),t,n,c),c),(tv(p||1)==5||tv(ph()||1)==5)&&$l(E)&&Kg(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;
vendor: 2,806 bytes, line 1070
1070case 123*x:o[u++]=$l(E)*g;case 125*x:case 59:case 0:if(y>0&&w){E+=nb(w);break}switch(w){case 0:case 125:v=0;case 59+d:g==-1&&(E=o7(E,/\f/g,"")),m>0&&($l(E)-h||x===0)&&I2(m>32?BU(E+";",r,n,h-1,c):BU(o7(E," ","")+";",r,n,h-2,c),c);break;case 59:E+=";";default:if(I2(_=FU(E,t,n,u,d,i,o,S,C=[],k=[],h,s),s),w===123)if(d===0)xC(E,t,_,_,C,s,h,o,k);else{switch(f){case 99:if(K0(E,3)===110)break;case 108:if(K0(E,2)===97)break;default:d=0;case 100:case 109:case 115:}d?xC(e,_,_,r&&I2(FU(e,_,_,0,0,i,o,S,i,C=[],h,k),k),i,k,h,o,r?C:k):xC(E,_,_,_,[""],k,0,o,k)}}u=d=m=0,x=g=1,S=E="",h=a;break;case 58:h=1+$l(E),m=p;default:if(x<1){if(w==123)--x;else if(w==125&&x++==0&&wze()==125)continue}switch(E+=nb(w),w*x){case 38:g=d>0?1:(E+="\f",-1);break;case 44:if(y>0)break;o[u++]=($l(E)-1)*g,g=1;break;case 64:ph()===45&&(E+=ME(Tl())),f=ph(),d=h=$l(S=E+=Eze(gC())),w++;break;case 45:p===45&&$l(E)==2&&(x=0)}}return s}function FU(e,t,n,r,i,s,a,o,c,u,d,h){for(var f=i-1,m=i===0?s:[""],p=gse(m),x=0,v=0,g=0;x<r;++x)for(var y=0,w=Kg(e,f+1,f=bze(v=a[x])),S=e;y<p;++y)(S=pse(v>0?m[y]+" "+w:o7(w,/&\f/g,m[y])))&&(c[g++]=S);return _9(e,t,n,i===0?hse:o,c,u,d,h)}function Nze(e,t,n,r){return _9(e,t,n,k9,nb(vze()),Kg(e,2,-2),0,r)}function BU(e,t,n,r,i){return _9(e,t,n,fse,Kg(e,0,r),Kg(e,r+1,-1),r,i)}function c7(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Aze(e,t,n,r){switch(e.type){case mse:if(e.children.length)break;case gze:case yze:case fse:return e.return=e.return||e.value;case k9:return"";case a7:return e.return=e.value+"{"+c7(e.children,r)+"}";case hse:if(!$l(e.value=e.props.join(",")))return""}return $l(n=c7(e.children,r))?e.return=e.value+"{"+n+"}":""}function Mze(e){var t=gse(e);return function(n,r,i,s){for(var a="",o=0;o<t;o++)a+=e[o](n,r,i,s)||"";return a}}var Rze=tse(Object.keys,Object),Oze=Object.prototype,Dze=Oze.hasOwnProperty;function Lze(e){if(!j3(e))return Rze(e);var t=[];for(var n in Object(e))Dze.call(e,n)&&n!="constructor"&&t.push(n);return t}var u7=Cp(Lc,"DataView"),d7=Cp(Lc,"Promise"),h7=Cp(Lc,"Set"),f7=Cp(Lc,"WeakMap"),zU="[object Map]",Pze="[object Object]",$U="[object Promise]",UU="[object Set]",VU="[object WeakMap]",HU="[object DataView]",Ize=Sp(u7),Fze=Sp(ev),Bze=Sp(d7),zze=Sp(h7),$ze=Sp(f7),Bf=Xx;(u7&&Bf(new u7(new ArrayBuffer(1)))!=HU||ev&&Bf(new ev)!=zU||d7&&Bf(d7.resolve())!=$U||h7&&Bf(new h7)!=UU||f7&&Bf(new f7)!=VU)&&(Bf=function(e){var t=Xx(e),n=t==Pze?e.constructor:void 0,r=n?Sp(n):"";if(r)switch(r){case Ize:return HU;case Fze:return zU;case Bze:return $U;case zze:return UU;case $ze:return VU}return t});var Uze="[object Map]",Vze="[object Set]",Hze=Object.prototype,qze=Hze.hasOwnProperty;function RE(e){if(e==null)return!0;if(N3(e)&&(e5(e)||typeof e=="string"||typeof e.splice=="function"||S9(e)||C9(e)||J4(e)))return!e.length;var t=Bf(e);
1070if(t==Uze||t==Vze)return!e.size;if(j3(e))return!Lze(e).length;for(var n in e)if(qze.call(e,n))return!1;return!0}const Gc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Rt={trace:(...e)=>{},debug:(...e)=>{},info:(...e)=>{},warn:(...e)=>{},error:(...e)=>{},fatal:(...e)=>{}},T9=function(e="fatal"){let t=Gc.fatal;typeof e=="string"?(e=e.toLowerCase(),e in Gc&&(t=Gc[e])):typeof e=="number"&&(t=e),Rt.trace=()=>{},Rt.debug=()=>{},Rt.info=()=>{},Rt.warn=()=>{},Rt.error=()=>{},Rt.fatal=()=>{},t<=Gc.fatal&&(Rt.fatal=console.error?console.error.bind(console,bo("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",bo("FATAL"))),t<=Gc.error&&(Rt.error=console.error?console.error.bind(console,bo("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",bo("ERROR"))),t<=Gc.warn&&(Rt.warn=console.warn?console.warn.bind(console,bo("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",bo("WARN"))),t<=Gc.info&&(Rt.info=console.info?console.info.bind(console,bo("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",bo("INFO"))),t<=Gc.debug&&(Rt.debug=console.debug?console.debug.bind(console,bo("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",bo("DEBUG"))),t<=Gc.trace&&(Rt.trace=console.debug?console.debug.bind(console,bo("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",bo("TRACE")))},bo=e=>`%c${zDe().format("ss.SSS")} : ${e} : `,gw=/<br\s*\/?>/gi,Gze=e=>
1070e?bse(e).replace(/\\n/g,"#br#").split("#br#"):[""],Wze=(()=>{let e=!1;return()=>{e||(Yze(),e=!0)}})();function Yze(){const e="data-temp-href-target";Kh.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Kh.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}const yse=e=>(Wze(),Kh.sanitize(e)),qU=(e,t)=>{var n;if(((n=t.flowchart)==null?void 0:n.htmlLabels)!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=yse(e):r!=="loose"&&(e=bse(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Zze(e))}return e},Qg=(e,t)=>e&&(t.dompurifyConfig?e=Kh.sanitize(qU(e,t),t.dompurifyConfig).toString():e=Kh.sanitize(qU(e,t),{FORBID_TAGS:["style"]}).toString(),e),Kze=(e,t)=>typeof e=="string"?Qg(e,t):e.flat().map(n=>Qg(n,t)),Xze=e=>gw.test(e),Qze=e=>e.split(gw),Zze=e=>e.replace(/#br#/g,"<br/>"),bse=e=>e.replace(gw,"#br#"),Jze=e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},vse=e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),e$e=function(...e){const t=e.filter(n=>!isNaN(n));return Math.max(...t)},t$e=function(...e){const t=e.filter(n=>!isNaN(n));return Math.min(...t)},d0t=function(e){const t=e.split(/(,)/),n=[];for(let r=0;r<t.length;r++){let i=t[r];if(i===","&&r>0&&r+1<t.length){const s=t[r-1],a=t[r+1];n$e(s,a)&&(i=s+","+a,r++,n.pop())}n.push(r$e(i))}return n.join("")},m7=(e,t)=>Math.max(0,e.split(t).length-1),n$e=(e,t)=>{const n=m7(e,"~"),r=m7(t,"~");return n===1&&r===1},r$e=e=>{const t=m7(e,"~");let n=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),n=!0);const r=[...e];let i=r.indexOf("~"),s=r.lastIndexOf("~");for(;i!==-1&&s!==-1&&i!==s;)r[i]="<",r[s]=">",i=r.indexOf("~"),s=r.lastIndexOf("~");return n&&r.unshift("~"),r.join("")},GU=()=>window.MathMLElement!==void 0,p7=/\$\$(.*)\$\$/g,WU=e=>{var t;return(((t=e.match(p7))==null?void 0:t.length)??0)>0},h0t=async(e,t)=>{const n=document.createElement("div");n.innerHTML=await s$e(e,t),n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0";const r=document.querySelector("body");r==null||r.insertAdjacentElement("beforeend",n);const i={width:n.clientWidth,height:n.clientHeight};return n.remove(),i},i$e=async(e,t)=>{if(!WU(e))return e;if(!GU()&&!t.legacyMathML)return e.replace(p7,"MathML is unsupported in this environment.");const{default:n}=await _r(async()=>{const{default:r}=await Promise.resolve().then(()=>i9e);return{default:r}},void 0);return e.split(gw).map(r=>WU(r)?` 1071 <div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;"> 1072 ${r} 1073 </div> 1074 `:`<div>${r}</div>`).join("").replace(p7,(r,i)=>n.renderToString(i,{throwOnError:!0,displayMode:!0,output:GU()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},s$e=async(e,t)=>Qg(await i$e(e,t),t),E9={getRows:Gze,sanitizeText:Qg,sanitizeTextOrArray:Kze,hasBreaks:Xze,splitBreaks:Qze,lineBreakRegex:gw,removeScript:yse,getUrl:Jze,evaluate:vse,getMax:e$e,getMin:t$e},Js=(e,t)=>t?de(e,{s:-40,l:10}):de(e,{s:-40,l:-10}),R3="#ffffff",O3="#f2f2f2";let a$e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,n,r,i,s,a,o,c,u,d,h;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||de(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||de(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Js(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Js(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackgroun
vendor: 15,888 bytes, line 1074
1074d=this.edgeLabelBackground||(this.darkMode?Ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||jt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||de(this.primaryColor,{h:30}),this.cScale4=this.cScale4||de(this.primaryColor,{h:60}),this.cScale5=this.cScale5||de(this.primaryColor,{h:90}),this.cScale6=this.cScale6||de(this.primaryColor,{h:120}),this.cScale7=this.cScale7||de(this.primaryColor,{h:150}),this.cScale8=this.cScale8||de(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||de(this.primaryColor,{h:270}),this.cScale10=this.cScale10||de(this.primaryColor,{h:300}),this.cScale11=this.cScale11||de(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=Ot(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=Ot(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||nt(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||jt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||Ot(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const f=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||de(this.mainBkg,{h:180,s:-15,l:f*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||de(this.mainBkg,{h:180,s:-15,l:f*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||de(this.primaryColor,{h:64}),this.fillType3=this.fillType3||de(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||de(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||de(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||de(this.primaryColor,{h:128}),this.fillType7=this.fillType7||de(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||de(this.primaryColor,{l:-10}),this.pie5=this.pie5||de(this.secondaryColor,{l:-10}),this.pie6=this.pie6||de(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||de(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||de(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||de(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||de(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||de(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||de(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||de(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||de(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||de(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||de(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||de(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||de(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fw(this.quadrant1Fill)?jt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||de(this.primaryColor,{h:-30}),this.git4=this.git4||de(this.primaryColor,{h:-60}),this.git5=this.git5||de(this.primaryColor,{h:-90}),this.git6=this.git6||de(this.primaryColor,{h:60}),this.git7=this.git7||de(this.primaryColor,{h:120}),this.darkMode?(this.git0=jt(this.git0,25),this.git1=jt(this.git1,25),this.git2=jt(this.git2,25),this.git3=jt(this.git3,25),this.git4=jt(this.git4,25),this.git5=jt(this.git5,25),this.git6=jt(this.git6,25),this.git7=jt(this.git7,25)):(this.git0=Ot(this.git0,25),this.git1=Ot(this.git1,25),this.git2=Ot(this.git2,25),this.git3=Ot(this.git3,25),this.git4=Ot(this.git4,25),this.git5=Ot(this.git5,25),this.git6=Ot(this.git6,25),this.git7=Ot(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R3,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O3}calculate(t){if(typeof t!="object"){this.updateColors();return}const n=Object.keys(t);n.forEach(r=>{this[r]=t[r]}),this.updateColors(),n.forEach(r=>{this[r]=t[r]})}};const o$e=e=>{const t=new a$e;return t.calculate(e),t};let l$e=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=jt(this.primaryColor,16),this.tertiaryColor=de(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.background),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=jt(nt("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=eb(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Ot("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ot(this.sectionBkgColor,10),this.taskBorderColor=eb(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=eb(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,n,r,i,s,a,o,c,u,d,h;this.secondBkg=jt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=jt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=jt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroun
vendor: 4,345 bytes, line 1074
1074dColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=de(this.primaryColor,{h:64}),this.fillType3=de(this.secondaryColor,{h:64}),this.fillType4=de(this.primaryColor,{h:-64}),this.fillType5=de(this.secondaryColor,{h:-64}),this.fillType6=de(this.primaryColor,{h:128}),this.fillType7=de(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||de(this.primaryColor,{h:30}),this.cScale4=this.cScale4||de(this.primaryColor,{h:60}),this.cScale5=this.cScale5||de(this.primaryColor,{h:90}),this.cScale6=this.cScale6||de(this.primaryColor,{h:120}),this.cScale7=this.cScale7||de(this.primaryColor,{h:150}),this.cScale8=this.cScale8||de(this.primaryColor,{h:210}),this.cScale9=this.cScale9||de(this.primaryColor,{h:270}),this.cScale10=this.cScale10||de(this.primaryColor,{h:300}),this.cScale11=this.cScale11||de(this.primaryColor,{h:330});for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||nt(this["cScale"+f]);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScalePeer"+f]=this["cScalePeer"+f]||jt(this["cScale"+f],10);for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||de(this.mainBkg,{h:30,s:-30,l:-(-10+f*4)}),this["surfacePeer"+f]=this["surfacePeer"+f]||de(this.mainBkg,{h:30,s:-30,l:-(-7+f*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["pie"+f]=this["cScale"+f];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||de(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||de(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||de(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||de(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||de(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||de(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fw(this.quadrant1Fill)?jt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExter
vendor: 40,429 bytes, line 1074
1074nalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=jt(this.secondaryColor,20),this.git1=jt(this.pie2||this.secondaryColor,20),this.git2=jt(this.pie3||this.tertiaryColor,20),this.git3=jt(this.pie4||de(this.primaryColor,{h:-30}),20),this.git4=jt(this.pie5||de(this.primaryColor,{h:-60}),20),this.git5=jt(this.pie6||de(this.primaryColor,{h:-90}),10),this.git6=jt(this.pie7||de(this.primaryColor,{h:60}),10),this.git7=jt(this.pie8||de(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||nt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||nt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||jt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||jt(this.background,2)}calculate(t){if(typeof t!="object"){this.updateColors();return}const n=Object.keys(t);n.forEach(r=>{this[r]=t[r]}),this.updateColors(),n.forEach(r=>{this[r]=t[r]})}};const c$e=e=>{const t=new l$e;return t.calculate(e),t};let u$e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=de(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=de(this.primaryColor,{h:-160}),this.primaryBorderColor=Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=eb(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,n,r,i,s,a,o,c,u,d,h;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||de(this.primaryColor,{h:30}),this.cScale4=this.cScale4||de(this.primaryColor,{h:60}),this.cScale5=this.cScale5||de(this.primaryColor,{h:90}),this.cScale6=this.cScale6||de(this.primaryColor,{h:120}),this.cScale7=this.cScale7||de(this.primaryColor,{h:150}),this.cScale8=this.cScale8||de(this.primaryColor,{h:210}),this.cScale9=this.cScale9||de(this.primaryColor,{h:270}),this.cScale10=this.cScale10||de(this.primaryColor,{h:300}),this.cScale11=this.cScale11||de(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ot(this.tertiaryColor,40);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=Ot(this["cScale"+f],10),this["cScalePeer"+f]=this["cScalePeer"+f]||Ot(this["cScale"+f],25);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||de(this["cScale"+f],{h:180});for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||de(this.mainBkg,{h:30,l:-(5+f*5)}),this["surfacePeer"+f]=this["surfacePeer"+f]||de(this.mainBkg,{h:30,l:-(7+f*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||nt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||nt(this.labelTextColor);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=jt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=de(this.primaryColor,{h:64}),this.fillType3=de(this.secondaryColor,{h:64}),this.fillType4=de(this.primaryColor,{h:-64}),this.fillType5=de(this.secondaryColor,{h:-64}),this.fillType6=de(this.primaryColor,{h:128}),this.fillType7=de(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||de(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||de(this.primaryColor,{l:-10}),this.pie5=this.pie5||de(this.secondaryColor,{l:-30}),this.pie6=this.pie6||de(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||de(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||de(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||de(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||de(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||de(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||de(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||de(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||de(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||de(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||de(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||de(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||de(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fw(this.quadrant1Fill)?jt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||de(this.primaryColor,{h:-30}),this.git4=this.git4||de(this.primaryColor,{h:-60}),this.git5=this.git5||de(this.primaryColor,{h:-90}),this.git6=this.git6||de(this.primaryColor,{h:60}),this.git7=this.git7||de(this.primaryColor,{h:120}),this.darkMode?(this.git0=jt(this.git0,25),this.git1=jt(this.git1,25),this.git2=jt(this.git2,25),this.git3=jt(this.git3,25),this.git4=jt(this.git4,25),this.git5=jt(this.git5,25),this.git6=jt(this.git6,25),this.git7=jt(this.git7,25)):(this.git0=Ot(this.git0,25),this.git1=Ot(this.git1,25),this.git2=Ot(this.git2,25),this.git3=Ot(this.git3,25),this.git4=Ot(this.git4,25),this.git5=Ot(this.git5,25),this.git6=Ot(this.git6,25),this.git7=Ot(this.git7,25)),this.gitInv0=this.gitInv0||Ot(nt(this.git0),25),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||nt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||nt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R3,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O3}calculate(t){if(typeof t!="object"){this.updateColors();return}const n=Object.keys(t);n.forEach(r=>{this[r]=t[r]}),this.updateColors(),n.forEach(r=>{this[r]=t[r]})}};const d$e=e=>{const t=new u$e;return t.calculate(e),t};let h$e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=jt("#cde498",10),this.primaryBorderColor=Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.primaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,n,r,i,s,a,o,c,u,d,h;this.actorBorder=Ot(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||de(this.primaryColor,{h:30}),this.cScale4=this.cScale4||de(this.primaryColor,{h:60}),this.cScale5=this.cScale5||de(this.primaryColor,{h:90}),this.cScale6=this.cScale6||de(this.primaryColor,{h:120}),this.cScale7=this.cScale7||de(this.primaryColor,{h:150}),this.cScale8=this.cScale8||de(this.primaryColor,{h:210}),this.cScale9=this.cScale9||de(this.primaryColor,{h:270}),this.cScale10=this.cScale10||de(this.primaryColor,{h:300}),this.cScale11=this.cScale11||de(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ot(this.tertiaryColor,40);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=Ot(this["cScale"+f],10),this["cScalePeer"+f]=this["cScalePeer"+f]||Ot(this["cScale"+f],25);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||de(this["cScale"+f],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||de(this.mainBkg,{h:30,s:-30,l:-(5+f*5)}),this["surfacePeer"+f]=this["surfacePeer"+f]||de(this.mainBkg,{h:30,s:-30,l:-(8+f*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=de(this.primaryColor,{h:64}),this.fillType3=de(this.secondaryColor,{h:64}),this.fillType4=de(this.primaryColor,{h:-64}),this.fillType5=de(this.secondaryColor,{h:-64}),this.fillType6=de(this.primaryColor,{h:128}),this.fillType7=de(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||de(this.primaryColor,{l:-30}),this.pie5=this.pie5||de(this.secondaryColor,{l:-30}),this.pie6=this.pie6||de(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||de(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||de(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||de(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||de(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||de(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||de(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||de(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||de(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||de(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||de(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||de(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||de(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fw(this.quadrant1Fill)?jt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||de(this.primaryColor,{h:-30}),this.git4=this.git4||de(this.primaryColor,{h:-60}),this.git5=this.git5||de(this.primaryColor,{h:-90}),this.git6=this.git6||de(this.primaryColor,{h:60}),this.git7=this.git7||de(this.primaryColor,{h:120}),this.darkMode?(this.git0=jt(this.git0,25),this.git1=jt(this.git1,25),this.git2=jt(this.git2,25),this.git3=jt(this.git3,25),this.git4=jt(this.git4,25),this.git5=jt(this.git5,25),this.git6=jt(this.git6,25),this.git7=jt(this.git7,25)):(this.git0=Ot(this.git0,25),this.git1=Ot(this.git1,25),this.git2=Ot(this.git2,25),this.git3=Ot(this.git3,25),this.git4=Ot(this.git4,25),this.git5=Ot(this.git5,25),this.git6=Ot(this.git6,25),this.git7=Ot(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||nt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||nt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R3,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O3}calculate(t){if(typeof t!="object"){this.updateColors();return}const n=Object.keys(t);n.forEach(r=>{this[r]=t[r]}),this.updateColors(),n.forEach(r=>{this[r]=t[r]})}};const f$e=e=>{const t=new h$e;return t.calculate(e),t};class m$e{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=jt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=de(this.primaryColor,{h:-160}),this.primaryBorderColor=Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,n,r,i,s,a,o,c,u,d,h;this.secondBkg=jt(this.contrast,55),this.border2=this.contrast,this.actorBorder=jt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||nt(this["cScale"+f]);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this.darkMode?this["cScalePeer"+f]=this["cScalePeer"+f]||jt(this["cScale"+f],10):this["cScalePeer"+f]=this["cScalePeer"+f]||Ot(this["cScale"+f],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||de(this.mainBkg,{l:-(5+f*5)}),this["surfacePeer"+f]=this["surfacePeer"+f]||de(this.mainBkg,{l:-(8+f*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=jt(this.contrast,30),this.sectionBkgColor2=jt(this.contrast,30),this.taskBorderColor=Ot(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=jt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ot(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=de(this.primaryColor,{h:64}),this.fillType3=de(this.secondaryColor,{h:64}),this.fillType4=de(this.primaryColor,{h:-64}),this.fillType5=de(this.secondaryColor,{h:-64}),this.fillType6=de(this.primaryColor,{h:128}),this.fillType7=de(this.secondaryColor,{h:128});for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["pie"+f]=this["cScale"+f];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||de(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||de(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||de(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||de(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||de(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||de(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fw(this.quadrant1Fill)?jt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Ot(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||de(this.primaryColor,{h:-30}),this.git4=this.pie5||de(this.primaryColor,{h:-60}),this.git5=this.pie6||de(this.primaryColor,{h:-90}),this.git6=this.pie7||de(this.primaryColor,{h:60}),this.git7=this.pie8||de(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R3,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O3}calculate(t){if(typeof t!="object"){this.updateColors();return}const n=Object.keys(t);n.forEach(r=>{this[r]=t[r]}
1074),this.updateColors(),n.forEach(r=>{this[r]=t[r]})}}const p$e=e=>{const t=new m$e;return t.calculate(e),t},Eu={base:{getThemeVariables:o$e},dark:{getThemeVariables:c$e},default:{getThemeVariables:d$e},forest:{getThemeVariables:f$e},neutral:{getThemeVariables:p$e}},Wc={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16}
1074,wse={...Wc,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Eu.default.getThemeVariables(),sequence:{...Wc.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Wc.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Wc.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Wc.pie,useWidth:984}
1074,xyChart:{...Wc.xyChart,useWidth:void 0},requirement:{...Wc.requirement,useWidth:void 0},gitGraph:{...Wc.gitGraph,useMaxWidth:!1},sankey:{...Wc.sankey,useMaxWidth:!1}},Sse=(e,t="")=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]=="object"&&e[r]!==null?[...n,t+r,...Sse(e[r],"")]:[...n,t+r],[]),g$e=new Set(Sse(wse,"")),x$e=wse,t5=e=>{if(Rt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>t5(t));return}for(const t of Object.keys(e)){if(Rt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!g$e.has(t)||e[t]==null){Rt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){Rt.debug("sanitizing object",t),t5(e[t]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const r of n)t.includes(r)&&(Rt.debug("sanitizing css option",t),e[t]=Cse(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const n=e.themeVariables[t];n!=null&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}Rt.debug("After sanitization",e)}},Cse=e=>{let t=0,n=0;for(const r of e){if(t<n)return"{ /* ERROR: Unbalanced CSS */ }";r==="{"?t++:r==="}"&&n++}return t!==n?"{ /* ERROR: Unbalanced CSS */ }":e},kse=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,rb=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y$e=/\s*%%.*\n/gm;class _se extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}}const Zg={},D3=function(e,t){e=e.replace(kse,"").replace(rb,"").replace(y$e,` 1075`);for(const[n,{detector:r}]of Object.entries(Zg))if(r(e,t))return n;throw new _se(`No diagram type detected matching given configuration for text: ${e}`)},Tse=(...e)=>{for(const{id:t,detector:n,loader:r}of e)Ese(t,n,r)},Ese=(e,t,n)=>{Zg[e]?Rt.error(`Detector with key ${e} already exists`):Zg[e]={detector:t,loader:n},Rt.debug(`Detector with key ${e} added${n?" with loader":""}`)},b$e=e=>Zg[e].loader,g7=(e,t,{depth:n=2}={})=>{const r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(i=>g7(e,i,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(i=>{e.includes(i)||e.push(i)}),e;if(e==null||n<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const i=e;Object.entries(t).forEach(([s,a])=>{typeof a=="object"?(Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),i[s]===void 0&&(i[s]=Array.isArray(a)?[]:{}),typeof i[s]=="object"&&(i[s]=g7(i[s],a,{depth:n-1}))):typeof i[s]!="object"&&(Object.hasOwn(e,s)?i[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},Ys=g7,v$e="â",w$e={curveBasis:P3e,curveBasisClosed:I3e,curveBasisOpen:F3e,curveBumpX:D3e,curveBumpY:L3e,curveBundle:B3e,curveCardinalClosed:$3e,curveCardinalOpen:U3e,curveCardinal:z3e,curveCatmullRomClosed:H3e,curveCatmullRomOpen:q3e,curveCatmullRom:V3e,curveLinear:O3e,curveLinearClosed:G3e,curveMonotoneX:W3e,curveMonotoneY:Y3e,curveNatural:K3e,curveStep:X3e,curveStepAfter:Z3e,curveStepBefore:Q3e},S$e=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,C$e=function(e,t){const n=jse(e,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(n)){const a=n.map(o=>o.args);t5(a),r=Ys(r,[...a])}else r=n.args;if(!r)return;let i=D3(e,t);const s="config";return r[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),r[i]=r[s],delete r[s]),r},jse=function(e,t=null){try{const n=new RegExp(`[%]{2}(?![{]${S$e.source})(?=[}][%]{2}).* 1076`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),Rt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let r;const i=[];for(;(r=rb.exec(e))!==null;)if(r.index===rb.lastIndex&&rb.lastIndex++,r&&!t||t&&r[1]&&r[1].match(t)||t&&r[2]&&r[2].match(t)){const s=r[1]?r[1]:r[2],a=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:s,args:a})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return Rt.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},k$e=function(e){return e.replace(rb,"")},_$e=function(e,t){for(const[n,r]of t.entries())if(r.match(e))return n;return-1};function T$e(e,t){if(!e)return t;const n=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return w$e[n]??t}function E$e(e,t){const n=e.trim();if(n)return t.securityLevel!=="loose"?Nie.sanitizeUrl(n):n}const j$e=(e,...t)=>{const n=e.split("."),r=n.length-1,i=n[r];let s=window;for(let a=0;a<r;a++)if(s=s[n[a]],!s){Rt.error(`Function name: ${e} not found in window`);return}s[i](...t)};function Nse(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function N$e(e){let t,n=0;e.forEach(i=>
vendor: 6,295 bytes, line 1076
1076{n+=Nse(i,t),t=i});const r=n/2;return j9(e,r)}function A$e(e){return e.length===1?e[0]:N$e(e)}const YU=(e,t=2)=>{const n=Math.pow(10,t);return Math.round(e*n)/n},j9=(e,t)=>{let n,r=t;for(const i of e){if(n){const s=Nse(i,n);if(s<r)r-=s;else{const a=r/s;if(a<=0)return n;if(a>=1)return{x:i.x,y:i.y};if(a>0&&a<1)return{x:YU((1-a)*n.x+a*i.x,5),y:YU((1-a)*n.y+a*i.y,5)}}}n=i}throw new Error("Could not find a suitable point for the given distance")},M$e=(e,t,n)=>{Rt.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());const i=j9(t,25),s=e?10:5,a=Math.atan2(t[0].y-i.y,t[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(a)*s+(t[0].x+i.x)/2,o.y=-Math.cos(a)*s+(t[0].y+i.y)/2,o};function R$e(e,t,n){const r=structuredClone(n);Rt.info("our points",r),t!=="start_left"&&t!=="start_right"&&r.reverse();const i=25+e,s=j9(r,i),a=10+e*.5,o=Math.atan2(r[0].y-s.y,r[0].x-s.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(o+Math.PI)*a+(r[0].x+s.x)/2,c.y=-Math.cos(o+Math.PI)*a+(r[0].y+s.y)/2):t==="end_right"?(c.x=Math.sin(o-Math.PI)*a+(r[0].x+s.x)/2-5,c.y=-Math.cos(o-Math.PI)*a+(r[0].y+s.y)/2-5):t==="end_left"?(c.x=Math.sin(o)*a+(r[0].x+s.x)/2-5,c.y=-Math.cos(o)*a+(r[0].y+s.y)/2-5):(c.x=Math.sin(o)*a+(r[0].x+s.x)/2,c.y=-Math.cos(o)*a+(r[0].y+s.y)/2),c}function O$e(e){let t="",n="";for(const r of e)r!==void 0&&(r.startsWith("color:")||r.startsWith("text-align:")?n=n+r+";":t=t+r+";");return{style:t,labelStyle:n}}let KU=0;const D$e=()=>(KU++,"id-"+Math.random().toString(36).substr(2,12)+"-"+KU);function L$e(e){let t="";const n="0123456789abcdef",r=n.length;for(let i=0;i<e;i++)t+=n.charAt(Math.floor(Math.random()*r));return t}const P$e=e=>L$e(e.length),I$e=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},F$e=function(e,t){const n=t.text.replace(E9.lineBreakRegex," "),[,r]=A9(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",r),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);const s=i.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(n),i},B$e=mw((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),E9.lineBreakRegex.test(e)))return e;const r=e.split(" "),i=[];let s="";return r.forEach((a,o)=>{const c=n5(`${a} `,n),u=n5(s,n);if(c>t){const{hyphenatedStrings:f,remainingWord:m}=z$e(a,t,"-",n);i.push(s,...f),s=m}else u+c>=t?(i.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===r.length&&i.push(s)}),i.filter(a=>a!=="").join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),z$e=mw((e,t,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=[...e],s=[];let a="";return i.forEach((o,c)=>{const u=`${a}${o}`;if(n5(u,r)>=t){const h=c+1,f=i.length===h,m=`${u}${n}`;s.push(f?u:m),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(e,t,n="-",r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function $$e(e,t){return N9(e,t).height}function n5(e,t){return N9(e,t).width}const N9=mw((e,t)=>{const{fontSize:n=12,fontFamily:r="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,s]=A9(n),a=["sans-serif",r],o=e.split(E9.lineBreakRegex),c=[],u=_o("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const d=u.append("svg");for(const f of a){let m=0;const p={width:0,height:0,lineHeight:0};for(const x of o){const v=I$e();v.text=x||v$e;const g=F$e(d,v).style("font-size",s).style("font-weight",i).style("font-family",f),y=(g._groups||g)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,y.width)),m=Math.round(y.height),p.height+=m,p.lineHeight=Math.round(Math.max(p.lineHeight,m))}c.push(p)}d.remove();const h=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[h]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`);class U$e{constructor(t=!1,n){this.count=0,this.count=n?n.length:0,this.next=t?()=>this.count++:()=>Date.now()}}let F2;const V$e=function(e){return F2=F2||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),F2.innerHTML=e,unescape(F2.textContent)};function Ase(e){return"str"in e}const H$e=(e,t,n,r)=>{var i;if(!r)return;const s=(i=e.node())==null?void 0:i.getBBox();s&&e.append("text").text(r).attr("x",s.x+s.width/2).attr("y",-n).attr("class",t)},A9=e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]};function Mse(e,t){return mze({},e,t)}const ib={assignWithDepth:Ys,wrapLabel:B$e,calculateTextHeight:$$e,calculateTextWidth:n5,calculateTextDimensions:N9,cleanAndMerge:Mse,detectInit:C$e,detectDirective:jse,isSubstringInArray:_$e,interpolateToCurve:T$e,calcLabelPosition:A$e,calcCardinalityPosition:M$e,calcTerminalLabelPosition:R$e,formatUrl:E$e,getStylesFromArray:O$e,generateId:D$e,random:P$e,runFunc:j$e,entityDecode:V$e,insertTitle:H$e,parseFontSize:A9,InitIDGenerator:U$e},q$e=function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),t=t.replace(/#\w+;/g,function(n){const r=n.substring(1,n.length-1);return/^\+?\d+$/.test(r)?"ï¬Â°Â°"+r+"¶Ã":"ï¬Â°"+r+"¶Ã"}),t},G$e=function(e){return e.replace(/ï¬Â°Â°/g,"&#").replace(/ï¬Â°/g,"&").replace(/¶Ã/g,";")},XU="10.9.8",Jg=Object.freeze(x$e);let va=Ys({},Jg),Rse,ex=[],sb=Ys({},Jg);const xw=(e,t)=>{let n=Ys({},e),r={};for(const i of t)Lse(i),r=Ys(r,i);if(n=Ys(n,r),r.theme&&r.theme in Eu){const i=Ys({},Rse),s=Ys(i.themeVariables||{},r.themeVariables);n.theme&&n.theme in Eu&&(n.themeVariables=Eu[n.theme].getThemeVariables(s))}return sb=n,J$e(sb),sb},W$e=e=>(va=Ys({},Jg),va=Ys(va,e),e.theme&&Eu[e.theme]&&(va.themeVariables=Eu[e.theme].getThemeVariables(e.themeVariables)),xw(va,ex),va),Y$e=e=>{Rse=Ys({},e)},K$e=e=>(va=Ys(va,e),xw(va,ex),va),Ose=()=>Ys({},va),Dse=e=>(xw(sb,[e]),wc()),wc=()=>Ys({},sb),Lse=e=>
1076{e&&(["secure",...va.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(Rt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Lse(e[t])}))},X$e=e=>{t5(e),e.fontFamily&&(!e.themeVariables||!e.themeVariables.fontFamily)&&(e.themeVariables={fontFamily:e.fontFamily}),ex.push(e),xw(va,ex)},r5=(e=va)=>{ex=[],xw(e,ex)},Q$e={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},QU={},Z$e=e=>{QU[e]||(Rt.warn(Q$e[e]),QU[e]=!0)},J$e=e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Z$e("LAZY_LOAD_DEPRECATED")},Pse="c4",eUe=e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),tUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./c4Diagram-3f4bdde3-CVIFT0XA.js");return{diagram:t}},__vite__mapDeps([0,1]));return{id:Pse,diagram:e}},nUe={id:Pse,detector:eUe,loader:tUe},rUe=nUe,Ise="flowchart",iUe=(e,t)=>{var n,r;return((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},sUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./flowDiagram-1629c991-NsVCKrU0.js");return{diagram:t}},__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:Ise,diagram:e}},aUe={id:Ise,detector:iUe,loader:sUe},oUe=aUe,Fse="flowchart-v2",lUe=(e,t)=>{var n,r,i;return((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"||((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)},cUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./flowDiagram-v2-1d953310-DNx0fwKi.js");return{diagram:t}},__vite__mapDeps([15,3,6,4,7,5,8,9,10,11,12,13,14]));return{id:Fse,diagram:e}},uUe={id:Fse,detector:lUe,loader:cUe},dUe=uUe,Bse="er",hUe=e=>/^\s*erDiagram/.test(e),fUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./erDiagram-5d81789a-DOwXo2jX.js");return{diagram:t}},__vite__mapDeps([16,4,5,11,12,13]));return{id:Bse,diagram:e}},mUe={id:Bse,detector:hUe,loader:fUe},pUe=mUe,zse="gitGraph",gUe=e=>/^\s*gitGraph/.test(e),xUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./gitGraphDiagram-f01e8bc2-BXEZEgfG.js");return{diagram:t}},[]);return{id:zse,diagram:e}},yUe={id:zse,detector:gUe,loader:xUe},bUe=yUe,$se="gantt",vUe=e=>/^\s*gantt/.test(e),wUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./ganttDiagram-3b0b3873-fR0mnsSy.js");return{diagram:t}},__vite__mapDeps([17,18,19]));return{id:$se,diagram:e}},SUe={id:$se,detector:vUe,loader:wUe},CUe=SUe,Use="info",kUe=e=>/^\s*info/.test(e),_Ue=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./infoDiagram-a29d40f1-7pwvk38m.js");return{diagram:t}},[]);return{id:Use,diagram:e}},TUe={id:Use,detector:kUe,loader:_Ue},Vse="pie",EUe=e=>/^\s*pie/.test(e),jUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./pieDiagram-c941bede-DCyephyS.js");return{diagram:t}},__vite__mapDeps([20,21,13,22,19,12]));return{id:Vse,diagram:e}},NUe={id:Vse,detector:EUe,loader:jUe},Hse="quadrantChart",AUe=e=>/^\s*quadrantChart/.test(e),MUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./quadrantDiagram-cf8b8fe0-CvWkoeeu.js");return{diagram:t}},__vite__mapDeps([23,18,19]));return{id:Hse,diagram:e}},RUe={id:Hse,detector:AUe,loader:MUe},OUe=RUe,qse="xychart",DUe=e=>/^\s*xychart-beta/.test(e),LUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./xychartDiagram-3f383b91-CJVRQ83o.js");return{diagram:t}},__vite__mapDeps([24,10,19,22,18,11,12,13]));return{id:qse,diagram:e}},PUe={id:qse,detector:DUe,loader:LUe},IUe=PUe,Gse="requirement",FUe=e=>
1076/^\s*requirement(Diagram)?/.test(e),BUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./requirementDiagram-53bda41b-DpQQLu_j.js");return{diagram:t}},__vite__mapDeps([25,4,5,11,12,13]));return{id:Gse,diagram:e}},zUe={id:Gse,detector:FUe,loader:BUe},$Ue=zUe,Wse="sequence",UUe=e=>/^\s*sequenceDiagram/.test(e),VUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./sequenceDiagram-82a5b84f-CObGbXD8.js");return{diagram:t}},__vite__mapDeps([26,1]));return{id:Wse,diagram:e}},HUe={id:Wse,detector:UUe,loader:VUe},qUe=HUe,Yse="class",GUe=(e,t)=>{var n;return((n=t==null?void 0:t.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},WUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./classDiagram-f62afe4f-DH06noKZ.js");return{diagram:t}},__vite__mapDeps([27,28,4,5,11,12,13]));return{id:Yse,diagram:e}},YUe={id:Yse,detector:GUe,loader:WUe},KUe=YUe,Kse="classDiagram",XUe=(e,t)=>{var n;return/^\s*classDiagram/.test(e)&&((n=t==null?void 0:t.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},QUe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./classDiagram-v2-604399ef-DTBJzOCE.js");return{diagram:t}},__vite__mapDeps([29,28,4,7,5,8,9,10,11,12,13]));return{id:Kse,diagram:e}},ZUe={id:Kse,detector:XUe,loader:QUe},JUe=ZUe,Xse="state",eVe=(e,t)=>{var n;return((n=t==null?void 0:t.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},tVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./stateDiagram-43e79a5f-scW0f9G_.js");return{diagram:t}},__vite__mapDeps([30,31,4,5,11,12,13]));return{id:Xse,diagram:e}},nVe={id:Xse,detector:eVe,loader:tVe},rVe=nVe,Qse="stateDiagram",iVe=(e,t)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((n=t==null?void 0:t.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},sVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./stateDiagram-v2-2041ed4f-DhKMDLCt.js");return{diagram:t}},__vite__mapDeps([32,31,4,7,5,8,9,10,11,12,13]));return{id:Qse,diagram:e}},aVe={id:Qse,detector:iVe,loader:sVe},oVe=aVe,Zse="journey",lVe=e=>/^\s*journey/.test(e),cVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./journeyDiagram-95396277-yixILir5.js");return{diagram:t}},__vite__mapDeps([33,1,21,13]));return{id:Zse,diagram:e}},uVe={id:Zse,detector:lVe,loader:cVe},dVe=uVe,hVe=function(e,t){for(let n of t)e.attr(n[0],n[1])},fVe=function(e,t,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${t}px;`)):(r.set("height",e),r.set("width",t)),r},Jse=function(e,t,n,r){const i=fVe(t,n,r);hVe(e,i)},mVe=function(e,t,n,r){const i=t.node().getBBox(),s=i.width,a=i.height;Rt.info(`SVG bounds: ${s}x${a}`,i);let o=0,c=0;Rt.info(`Graph bounds: ${o}x${c}`,e),o=s+n*2,c=a+n*2,Rt.info(`Calculated bounds: ${o}x${c}`),Jse(t,c,o,r);const u=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr("viewBox",u)},yC={};function ZU(e){return[...e.cssRules].map(t=>t.cssText).join(` 1077`)}const pVe=(e,t,n)=>{let r="";return e in yC&&yC[e]?r=yC[e](n):Rt.warn(`No theme found for ${e}`),`& { 1078 font-family: ${n.fontFamily}; 1079 font-size: ${n.fontSize}; 1080 fill: ${n.textColor} 1081 } 1082 1083 /* Classes common for multiple diagrams */ 1084 1085 & .error-icon { 1086 fill: ${n.errorBkgColor}; 1087 } 1088 & .error-text { 1089 fill: ${n.errorTextColor}; 1090 stroke: ${n.errorTextColor}; 1091 } 1092 1093 & .edge-thickness-normal { 1094 stroke-width: 2px; 1095 } 1096 & .edge-thickness-thick { 1097 stroke-width: 3.5px 1098 } 1099 & .edge-pattern-solid { 1100 stroke-dasharray: 0; 1101 } 1102 1103 & .edge-pattern-dashed{ 1104 stroke-dasharray: 3; 1105 } 1106 .edge-pattern-dotted { 1107 stroke-dasharray: 2; 1108 } 1109 1110 & .marker { 1111 fill: ${n.lineColor}; 1112 stroke: ${n.lineColor}; 1113 } 1114 & .marker.cross { 1115 stroke: ${n.lineColor}; 1116 } 1117 1118 & svg { 1119 font-family: ${n.fontFamily}; 1120 font-size: ${n.fontSize}; 1121 } 1122 1123 ${r} 1124 1125 ${t} 1126`},gVe=(e,t)=>{t!==void 0&&(yC[e]=t)},xVe=pVe;let M9="",R9="",O9="";const D9=e=>Qg(e,wc()),yVe=()=>{M9="",O9="",R9=""},bVe=e=>{M9=D9(e).replace(/^\s+/g,"")},vVe=()=>M9,wVe=e=>{O9=D9(e).replace(/\n\s+/g,` 1127`)},SVe=()=>O9,CVe=e=>{R9=D9(e)},kVe=()=>R9,_Ve=Object.freeze(Object.defineProperty({__proto__:null,clear:yVe,getAccDescription:SVe,getAccTitle:vVe,getDiagramTitle:kVe,setAccDescription:wVe,setAccTitle:bVe,setDiagramTitle:CVe},Symbol.toStringTag,{value:"Module"})),TVe=Rt,EVe=T9,L9=wc,x0t=Dse,y0t=Jg,jVe=e=>Qg(e,L9()),NVe=mVe,AVe=()=>_Ve,i5={},s5=(e,t,n)=>{var r;if(i5[e])throw new Error(`Diagram ${e} already registered.`);i5[e]=t,n&&Ese(e,n),gVe(e,t.styles),(r=t.injectUtils)==null||r.call(t,TVe,EVe,L9,jVe,NVe,AVe(),()=>{})},P9=e=>{if(e in i5)return i5[e];throw new MVe(e)};
1127class MVe extends Error{constructor(t){super(`Diagram ${t} not found.`)}}const RVe=e=>{var t;const{securityLevel:n}=L9();let r=_o("body");if(n==="sandbox"){const a=((t=_o(`#i${e}`).node())==null?void 0:t.contentDocument)??document;r=_o(a.body)}return r.select(`#${e}`)},OVe=(e,t,n)=>{Rt.debug(`rendering svg for syntax error 1128`);const r=RVe(t),i=r.append("g");r.attr("viewBox","0 0 2412 512"),Jse(r,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.
1128164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},eae={draw:OVe},DVe=eae,LVe={db:{},renderer:eae,parser:{parser:{yy:{}},parse:()=>{}}},PVe=LVe,tae="flowchart-elk",IVe=(e,t)=>{var n;return!!(/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="elk")},FVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./flowchart-elk-definition-6df44142-Dx5SENeV.js");return{diagram:t}},__vite__mapDeps([34,3,9,10,11,12,13]));return{id:tae,diagram:e}},BVe={id:tae,detector:IVe,loader:FVe},zVe=BVe,nae="timeline",$Ve=e=>/^\s*timeline/.test(e),UVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./timeline-definition-7545f45a-LH2wkUZ4.js");return{diagram:t}},__vite__mapDeps([35,21,13]));return{id:nae,diagram:e}},VVe={id:nae,detector:$Ve,loader:UVe},HVe=VVe,rae="mindmap",qVe=e=>/^\s*mindmap/.test(e),GVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./mindmap-definition-e4c1d938-B64xgD2A.js");return{diagram:t}},__vite__mapDeps([36,10]));return{id:rae,diagram:e}},WVe={id:rae,detector:qVe,loader:GVe},YVe=WVe,iae="sankey",KVe=e=>/^\s*sankey-beta/.test(e),XVe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./sankeyDiagram-c3ef121a-B80WEm1g.js");return{diagram:t}},__vite__mapDeps([37,22,19,38]));return{id:iae,diagram:e}},QVe={id:iae,detector:KVe,loader:XVe},ZVe=QVe,sae="block",JVe=e=>/^\s*block-beta/.test(e),eHe=async()=>{const{diagram:e}=await _r(async()=>{const{diagram:t}=await import("./blockDiagram-868be97b-Cj1auH54.js");return{diagram:t}},__vite__mapDeps([39,8,4,9,10,11,12,13,22,19,38,14]));return{id:sae,diagram:e}},tHe={id:sae,detector:JVe,loader:eHe},nHe=tHe;let JU=!1;const I9=()=>{JU||(JU=!0,s5("error",PVe,e=>e.toLowerCase().trim()==="error"),s5("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},e=>e.toLowerCase().trimStart().startsWith("---")),Tse(rUe,JUe,KUe,pUe,CUe,TUe,NUe,$Ue,qUe,zVe,dUe,oUe,YVe,HVe,bUe,oVe,rVe,dVe,OUe,ZVe,IUe,nHe))};class aae{constructor(t,n={}){this.text=t,this.metadata=n,this.type="graph",this.text=q$e(t),this.text+=` 1129`;const r=wc();try{this.type=D3(t,r)}catch(s){this.type="error",this.detectError=s}const i=P9(this.type);Rt.debug("Type "+this.type),this.db=i.db,this.renderer=i.renderer,this.parser=i.parser,this.parser.parser.yy=this.db,this.init=i.init,this.parse()}parse(){var t,n,r,i,s;if(this.detectError)throw this.detectError;(n=(t=this.db).clear)==null||n.call(t);const a=wc();(r=this.init)==null||r.call(this,a),this.metadata.title&&((s=(i=this.db).setDiagramTitle)==null||s.call(i,this.metadata.title)),this.parser.parse(this.text)}async render(t,n){await this.renderer.draw(this.text,t,n,this)}getParser(){return this.parser}getType(){return this.type}}const rHe=async(e,t={})=>{const n=D3(e,wc());try{P9(n)}catch{const i=b$e(n);if(!i)throw new _se(`Diagram ${n} not found.`);const{id:s,diagram:a}=await i();s5(s,a)}return new aae(e,t)};let eV=[];const iHe=()=>{eV.forEach(e=>{e()}),eV=[]},sHe="graphics-document document";function aHe(e,t){e.attr("role",sHe),t!==""&&e.attr("aria-roledescription",t)}function oHe(e,t,n,r){if(e.insert!==void 0){if(n){const i=`chart
1129-desc-${r}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(n)}if(t){const i=`chart-title-${r}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}const lHe=e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function oae(e){return typeof e>"u"||e===null}function cHe(e){return typeof e=="object"&&e!==null}function uHe(e){return Array.isArray(e)?e:oae(e)?[]:[e]}function dHe(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function hHe(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function fHe(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var mHe=oae,pHe=cHe,gHe=uHe,xHe=hHe,yHe=fHe,bHe=dHe,Ks={isNothing:mHe,isObject:pHe,toArray:gHe,repeat:xHe,isNegativeZero:yHe,extend:bHe};function lae(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=` 1130 1131`+e.mark.snippet),r+" "+n):r}function nv(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=lae(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}nv.prototype=Object.create(Error.prototype);nv.prototype.constructor=nv;nv.prototype.toString=function(t){return this.name+": "+lae(this,t)};var uu=nv;function OE(e,t,n,r,i){var s="",a="",o=Math.floor(i/2)-1;return r-t>o&&(s=" ... ",t=r-o+s.length),n-r>o&&(a=" ...",n=r+o-a.length),{str:s+e.slice(t,n).replace(/\t/g,"â")+a,pos:r-t+s.length}}function DE(e,t){return Ks.repeat(" ",t-e.length)+e}function vHe(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],s,a=-1;s=n.exec(e.buffer);)i.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var o="",c,u,d=Math.min(e.line+t.linesAfter,i.length).toString().length,h=t.maxLength-(t.indent+d+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)u=OE(e.buffer,r[a-c],i[a-c],e.position-(r[a]-r[a-c]),h),o=Ks.repeat(" ",t.indent)+DE((e.line-c+1).toString(),d)+" | "+u.str+` 1132`+o;for(u=OE(e.buffer,r[a],i[a],e.position,h),o+=Ks.repeat(" ",t.indent)+DE((e.line+1).toString(),d)+" | "+u.str+` 1133`,o+=Ks.repeat("-",t.indent+d+3+u.pos)+`^ 1134`,c=1;c<=t.linesAfter&&!(a+c>=i.length);c++)u=OE(e.buffer,r[a+c],i[a+c],e.position-(r[a]-r[a+c]),h),o+=Ks.repeat(" ",t.indent)+DE((e.line+c+1).toString(),d)+" | "+u.str+` 1135`;return o.replace(/\n$/,"")}var wHe=vHe,SHe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],CHe=["scalar","sequence","mapping"];function kHe(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function _He(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(SHe.indexOf(n)===-1)throw new uu('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=kHe(t.styleAliases||null),CHe.indexOf(this.kind)===-1)throw new uu('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ms=_He;function tV(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(s,a){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(i=a)}),n[i]=r}),n}function THe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function x7(e){return this.extend(e)}x7.prototype.extend=function(t){var n=[],r=[];if(t instanceof Ms)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new uu("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
vendor: 16,350 bytes, lines 1135-1138
1135n.forEach(function(s){if(!(s instanceof Ms))throw new uu("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new uu("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new uu("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof Ms))throw new uu("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(x7.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=tV(i,"implicit"),i.compiledExplicit=tV(i,"explicit"),i.compiledTypeMap=THe(i.compiledImplicit,i.compiledExplicit),i};var EHe=x7,jHe=new Ms("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),NHe=new Ms("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),AHe=new Ms("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),MHe=new EHe({explicit:[jHe,NHe,AHe]});function RHe(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function OHe(){return null}function DHe(e){return e===null}var LHe=new Ms("tag:yaml.org,2002:null",{kind:"scalar",resolve:RHe,construct:OHe,predicate:DHe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function PHe(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function IHe(e){return e==="true"||e==="True"||e==="TRUE"}function FHe(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var BHe=new Ms("tag:yaml.org,2002:bool",{kind:"scalar",resolve:PHe,construct:IHe,predicate:FHe,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function zHe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function $He(e){return 48<=e&&e<=55}function UHe(e){return 48<=e&&e<=57}function VHe(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!zHe(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!$He(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!UHe(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function HHe(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function qHe(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ks.isNegativeZero(e)}var GHe=new Ms("tag:yaml.org,2002:int",{kind:"scalar",resolve:VHe,construct:HHe,predicate:qHe,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),WHe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function YHe(e){return!(e===null||!WHe.test(e)||e[e.length-1]==="_")}function KHe(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var XHe=/^[-+]?[0-9]+e/;function QHe(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ks.isNegativeZero(e))return"-0.0";return n=e.toString(10),XHe.test(n)?n.replace("e",".e"):n}function ZHe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ks.isNegativeZero(e))}var JHe=new Ms("tag:yaml.org,2002:float",{kind:"scalar",resolve:YHe,construct:KHe,predicate:ZHe,represent:QHe,defaultStyle:"lowercase"}),cae=MHe.extend({implicit:[LHe,BHe,GHe,JHe]}),eqe=cae,uae=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dae=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function tqe(e){return e===null?!1:uae.exec(e)!==null||dae.exec(e)!==null}function nqe(e){var t,n,r,i,s,a,o,c=0,u=null,d,h,f;if(t=uae.exec(e),t===null&&(t=dae.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(s=+t[4],a=+t[5],o=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(d=+t[10],h=+(t[11]||0),u=(d*60+h)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(n,r,i,s,a,o,c)),u&&f.setTime(f.getTime()-u),f}function rqe(e){return e.toISOString()}var iqe=new Ms("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:tqe,construct:nqe,instanceOf:Date,represent:rqe});function sqe(e){return e==="<<"||e===null}var aqe=new Ms("tag:yaml.org,2002:merge",{kind:"scalar",resolve:sqe}),F9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= 1136\r`;function oqe(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=F9;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function lqe(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=F9,a=0,o=[];for(t=0;t<i;t++)t%4===0&&t&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):n===18?(o.push(a>>10&255),o.push(a>>2&255)):n===12&&o.push(a>>4&255),new Uint8Array(o)}function cqe(e){var t="",n=0,r,i,s=e.length,a=F9;for(r=0;r<s;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):i===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):i===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function uqe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var dqe=new Ms("tag:yaml.org,2002:binary",{kind:"scalar",resolve:oqe,construct:lqe,predicate:uqe,represent:cqe}),hqe=Object.prototype.hasOwnProperty,fqe=Object.prototype.toString;function mqe(e){if(e===null)return!0;var t=[],n,r,i,s,a,o=e;for(n=0,r=o.length;n<r;n+=1){if(i=o[n],a=!1,fqe.call(i)!=="[object Object]")return!1;for(s in i)if(hqe.call(i,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function pqe(e){return e!==null?e:[]}var gqe=new Ms("tag:yaml.org,2002:omap",{kind:"sequence",resolve:mqe,construct:pqe}),xqe=Object.prototype.toString;function yqe(e){if(e===null)return!0;var t,n,r,i,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],xqe.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function bqe(e){if(e===null)return[];var t,n,r,i,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}var vqe=new Ms("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:yqe,construct:bqe}),wqe=Object.prototype.hasOwnProperty;function Sqe(e){if(e===null)return!0;var t,n=e;for(t in n)if(wqe.call(n,t)&&n[t]!==null)return!1;return!0}function Cqe(e){return e!==null?e:{}}var kqe=new Ms("tag:yaml.org,2002:set",{kind:"mapping",resolve:Sqe,construct:Cqe}),_qe=eqe.extend({implicit:[iqe,aqe],explicit:[dqe,gqe,vqe,kqe]}),Xh=Object.prototype.hasOwnProperty,a5=1,hae=2,fae=3,o5=4,LE=1,Tqe=2,nV=3,Eqe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jqe=/[\x85\u2028\u2029]/,Nqe=/[,\[\]\{\}]/,mae=/^(?:!|!!|![a-z\-]+!)$/i,pae=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function rV(e){return Object.prototype.toString.call(e)}function fc(e){return e===10||e===13}function km(e){return e===9||e===32}function Ca(e){return e===9||e===32||e===10||e===13}function _0(e){return e===44||e===91||e===93||e===123||e===125}function Aqe(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Mqe(e){return e===120?2:e===117?4:e===85?8:0}function Rqe(e){return 48<=e&&e<=57?e-48:-1}function iV(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?` 1137`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"Â ":e===95?"Â ":e===76?"\u2028":e===80?"\u2029":""}function Oqe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var gae=new Array(256),xae=new Array(256);for(var Bp=0;Bp<256;Bp++)gae[Bp]=iV(Bp)?1:0,xae[Bp]=iV(Bp);function Dqe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||_qe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function yae(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=wHe(n),new uu(t,n)}function Nt(e,t){throw yae(e,t)}function l5(e,t){e.onWarning&&e.onWarning.call(null,yae(e,t))}var sV={YAML:function(t,n,r){var i,s,a;t.version!==null&&Nt(t,"duplication of %YAML directive"),r.length!==1&&Nt(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Nt(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),a=parseInt(i[2],10),s!==1&&Nt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&l5(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&Nt(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],mae.test(i)||Nt(t,"ill-formed tag handle (first argument) of the TAG directive"),Xh.call(t.tagMap,i)&&Nt(t,'there is a previously declared suffix for "'+i+'" tag handle'),pae.test(s)||Nt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Nt(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function Nh(e,t,n,r){var i,s,a,o;if(t<n){if(o=e.input.slice(t,n),r)for(i=0,s=o.length;i<s;i+=1)a=o.charCodeAt(i),a===9||32<=a&&a<=1114111||Nt(e,"expected valid JSON character");else Eqe.test(o)&&Nt(e,"the stream contains non-printable characters");e.result+=o}}function aV(e,t,n,r){var i,s,a,o;for(Ks.isObject(n)||Nt(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),a=0,o=i.length;a<o;a+=1)s=i[a],Xh.call(t,s)||(t[s]=n[s],r[s]=!0)}function T0(e,t,n,r,i,s,a,o,c){var u,d;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,d=i.length;u<d;u+=1)Array.isArray(i[u])&&Nt(e,"nested arrays are not supported inside keys"),typeof i=="object"&&rV(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&rV(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,d=s.length;u<d;u+=1)aV(e,t,s[u],n);else aV(e,t,s,n);else!e.json&&!Xh.call(n,i)&&Xh.call(t,i)&&(e.line=a||e.line,e.lineStart=o||e.lineStart,e.position=c||e.position,Nt(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[i]=s,delete n[i];return t}function B9(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Nt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function xi(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;km(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(fc(i))for(B9(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&l5(e,"deficient indentation"),r}function L3(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Ca(n)))}function z9(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ks.repeat(` 1138`,t-1))}function Lqe(e,t,n){var r,i,s,a,o,c,u,d,h=e.kind,f=e.result,m;if(m=e.input.charCodeAt(e.position),Ca(m)||_0(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),Ca(i)||n&&_0(i)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,o=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),Ca(i)||n&&_0(i))break}else if(m===35){if(r=e.input.charCodeAt(e.position-1),Ca(r))break}else{if(e.position===e.lineStart&&L3(e)||n&&_0(m))break;if(fc(m))if(c=e.line,u=e.lineStart,d=e.lineIndent,xi(e,!1,-1),e.lineIndent>=t){o=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=u,e.lineIndent=d;break}}o&&(Nh(e,s,a,!1),z9(e,e.line-c),s=a=e.position,o=!1),km(m)||(a=e.position+1),m=e.input.charCodeAt(++e.position)}return Nh(e,s,a,!1),e.result?!0:(e.kind=h,e.result=f,!1)}function Pqe(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Nh(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else fc(n)?(Nh(e,r,i,!0),z9(e,xi(e,!1,t)),r=i=e.position):e.position===e.lineStart&&L3(e)?Nt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Nt(e,"unexpected end of the stream within a single quoted scalar")}function Iqe(e,t){var n,r,i,s,a,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Nh(e,n,e.position,!0),e.position++,!0;if(o===92){if(Nh(e,n,e.position,!0),o=e.input.charCodeAt(++e.position),fc(o))xi(e,!1,t);else if(o<256&&gae[o])e.result+=xae[o],e.position++;else if((a=Mqe(o))>0){for(i=a,s=0;i>0;i--)o=e.input.charCodeAt(++e.position),(a=Aqe(o))>=0?s=(s<<4)+a:Nt(e,"expected hexadecimal character");e.result+=Oqe(s),e.position++}else Nt(e,"unknown escape sequence");n=r=e.position}else fc(o)?(Nh(e,n,r,!0),z9(e,xi(e,!1,t)),n=r=e.position):e.position===e.lineStart&&L3(e)?Nt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Nt(e,"unexpected end of the stream within a double quoted scalar")}function Fqe(e,t){var n=!0,r,i,s,a=e.tag,o,c=e.anchor,u,d,h,f,m,p=Object.create(null),x,v,g,y;if(y=e.input.charCodeAt(e.position),y===91)d=93,m=!1,o=[];else if(y===123)d=125,m=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),y=e.input.charCodeAt(++e.position);y!==0;){if(xi(e,!0,t),y=e.input.charCodeAt(e.position),y===d)return e.position++,e.tag=a,e.anchor=c,e.kind=m?"mapping":"sequence",e.result=
vendor: 6,933 bytes, lines 1138-1144
1138o,!0;n?y===44&&Nt(e,"expected the node content, but found ','"):Nt(e,"missed comma between flow collection entries"),v=x=g=null,h=f=!1,y===63&&(u=e.input.charCodeAt(e.position+1),Ca(u)&&(h=f=!0,e.position++,xi(e,!0,t))),r=e.line,i=e.lineStart,s=e.position,tx(e,t,a5,!1,!0),v=e.tag,x=e.result,xi(e,!0,t),y=e.input.charCodeAt(e.position),(f||e.line===r)&&y===58&&(h=!0,y=e.input.charCodeAt(++e.position),xi(e,!0,t),tx(e,t,a5,!1,!0),g=e.result),m?T0(e,o,p,v,x,g,r,i,s):h?o.push(T0(e,null,p,v,x,g,r,i,s)):o.push(x),xi(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(n=!0,y=e.input.charCodeAt(++e.position)):n=!1}Nt(e,"unexpected end of the stream within a flow collection")}function Bqe(e,t){var n,r,i=LE,s=!1,a=!1,o=t,c=0,u=!1,d,h;if(h=e.input.charCodeAt(e.position),h===124)r=!1;else if(h===62)r=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)LE===i?i=h===43?nV:Tqe:Nt(e,"repeat of a chomping mode identifier");else if((d=Rqe(h))>=0)d===0?Nt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Nt(e,"repeat of an indentation width identifier"):(o=t+d-1,a=!0);else break;if(km(h)){do h=e.input.charCodeAt(++e.position);while(km(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!fc(h)&&h!==0)}for(;h!==0;){for(B9(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!a||e.lineIndent<o)&&h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>o&&(o=e.lineIndent),fc(h)){c++;continue}if(e.lineIndent<o){i===nV?e.result+=Ks.repeat(` 1139`,s?1+c:c):i===LE&&s&&(e.result+=` 1140`);break}for(r?km(h)?(u=!0,e.result+=Ks.repeat(` 1141`,s?1+c:c)):u?(u=!1,e.result+=Ks.repeat(` 1142`,c+1)):c===0?s&&(e.result+=" "):e.result+=Ks.repeat(` 1143`,c):e.result+=Ks.repeat(` 1144`,s?1+c:c),s=!0,a=!0,c=0,n=e.position;!fc(h)&&h!==0;)h=e.input.charCodeAt(++e.position);Nh(e,n,e.position,!1)}return!0}function oV(e,t){var n,r=e.tag,i=e.anchor,s=[],a,o=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Nt(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!Ca(a))));){if(o=!0,e.position++,xi(e,!0,-1)&&e.lineIndent<=t){s.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,tx(e,t,fae,!1,!0),s.push(e.result),xi(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)Nt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function zqe(e,t,n){var r,i,s,a,o,c,u=e.tag,d=e.anchor,h={},f=Object.create(null),m=null,p=null,x=null,v=!1,g=!1,y;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),y=e.input.charCodeAt(e.position);y!==0;){if(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Nt(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),s=e.line,(y===63||y===58)&&Ca(r))y===63?(v&&(T0(e,h,f,m,p,null,a,o,c),m=p=x=null),g=!0,v=!0,i=!0):v?(v=!1,i=!0):Nt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=r;else{if(a=e.line,o=e.lineStart,c=e.position,!tx(e,n,hae,!1,!0))break;if(e.line===s){for(y=e.input.charCodeAt(e.position);km(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Ca(y)||Nt(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(T0(e,h,f,m,p,null,a,o,c),m=p=x=null),g=!0,v=!1,i=!1,m=e.tag,p=e.result;else if(g)Nt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=d,!0}else if(g)Nt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=d,!0}if((e.line===s||e.lineIndent>t)&&(v&&(a=e.line,o=e.lineStart,c=e.position),tx(e,t,o5,!0,i)&&(v?p=e.result:x=e.result),v||(T0(e,h,f,m,p,x,a,o,c),m=p=x=null),xi(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&y!==0)Nt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&T0(e,h,f,m,p,null,a,o,c),g&&(e.tag=u,e.anchor=d,e.kind="mapping",e.result=h),g}function $qe(e){var t,n=!1,r=!1,i,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&Nt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):Nt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Ca(a);)a===33&&(r?Nt(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),mae.test(i)||Nt(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Nqe.test(s)&&Nt(e,"tag suffix cannot contain flow indicator characters")}s&&!pae.test(s)&&Nt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Nt(e,"tag name is malformed: "+s)}return n?e.tag=s:Xh.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:Nt(e,'undeclared tag handle "'+i+'"'),!0}function Uqe(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Nt(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Ca(n)&&!_0(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Nt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Vqe(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ca(r)&&!_0(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Nt(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Xh.call(e.anchorMap,n)||Nt(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],xi(e,!0,-1),!0}function tx(e,t,n,r,i){var s,a,o,c=1,u=!1,d=!1,h,f,m,p,x,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=o=o5===n||fae===n,r&&xi(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;$qe(e)||Uqe(e);)xi(e,!0,-1)?(u=!0,o=s,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):o=!1;if(o&&(o=u||i),(c===1||o5===n)&&(a5===n||hae===n?x=t:x=t+1,v=e.position-e.lineStart,c===1?o&&(oV(e,v)||zqe(e,v,x))||Fqe(e,x)?d=!0:(a&&Bqe(e,x)||Pqe(e,x)||Iqe(e,x)?d=!0:Vqe(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&Nt(e,"alias node should not have any properties")):Lqe(e,x,a5===n)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(
1144d=o&&oV(e,v))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Nt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),h=0,f=e.implicitTypes.length;h<f;h+=1)if(p=e.implicitTypes[h],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Xh.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,m=e.typeMap.multi[e.kind||"fallback"],h=0,f=m.length;h<f;h+=1)if(e.tag.slice(0,m[h].tag.length)===m[h].tag){p=m[h];break}p||Nt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&Nt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Nt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function Hqe(e){var t=e.position,n,r,i,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(xi(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!Ca(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Nt(e,"directive name must not be less than one character in length");a!==0;){for(;km(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!fc(a));break}if(fc(a))break;for(n=e.position;a!==0&&!Ca(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}a!==0&&B9(e),Xh.call(sV,r)?sV[r](e,r,i):l5(e,'unknown document directive "'+r+'"')}if(xi(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,xi(e,!0,-1)):s&&Nt(e,"directives end mark is expected"),tx(e,e.lineIndent-1,o5,!1,!0),xi(e,!0,-1),e.checkLineBreaks&&jqe.test(e.input.slice(t,e.position))&&l5(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&L3(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,xi(e,!0,-1));return}if(e.position<e.length-1)Nt(e,"end of the stream or a document separator is expected");else return}function qqe(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=` 1145`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Dqe(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Nt(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Hqe(n);return n.documents}function Gqe(e,t){var n=qqe(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new uu("expected a single document in the stream, but found more")}}var Wqe=Gqe,Yqe={load:Wqe},Kqe=cae,Xqe=Yqe.load;function Qqe(e){const t=e.match(kse);if(!t)return{text:e,metadata:{}};let n=Xqe(t[1],{schema:Kqe})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}const Zqe=e=>e.replace(/\r\n?/g,` 1146`).replace(/<(\w+)([^>]*)>/g,(t,n,r)=>"<"+n+r.replace(/="([^"]*)"/g,"='$1'")+">"),Jqe=e=>{const{text:t,metadata:n}=Qqe(e),{displayMode:r,title:i,config:s={}}=n;return r&&(s.gantt||(s.gantt={}),s.gantt.displayMode=r),{title:i,config:s,text:t}},eGe=e=>{const t=ib.detectInit(e)??{},n=ib.detectDirective(e,"wrap");return Array.isArray(n)?t.wrap=n.some(({type:r})=>{}):(n==null?void 0:n.type)==="wrap"&&(t.wrap=!0),{text:k$e(e),directive:t}};function bae(e){const t=Zqe(e),n=Jqe(t),r=eGe(n.text),i=Mse(n.config,r.directive);return e=lHe(r.text),{code:e,title:n.title,config:i}}const tGe=5e4,nGe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",rGe="sandbox",iGe="loose",sGe="http://www.w3.org/2000/svg",aGe="http://www.w3.org/1999/xlink",oGe="http://www.w3.org/1999/xhtml",lGe="100%",cGe="100%",uGe="border:0;margin:0;",dGe="margin:0",hGe="allow-top-navigation-by-user-activation allow-popups",fGe='The "iframe" tag is not supported by your browser.',mGe=["foreignobject"],pGe=["dominant-baseline"];function vae(e){const t=bae(e);return r5(),X$e(t.config??{}),t}async function gGe(e,t){I9(),e=vae(e).code;try{await $9(e)}catch(n){if(t!=null&&t.suppressErrors)return!1;throw n}return!0}const lV=(e,t,n=[])=>{const r=Cse(`{ ${n.join(" !important; ")} !important; }`);return`.${e} ${t} ${r}`},xGe=(e,t={})=>{var n;const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),!RE(t)){const c=e.htmlLabels||((n=e.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const u in t){const d=t[u];
1146RE(d.styles)||c.forEach(h=>{r.insertRule(lV(d.id,h,d.styles),r.cssRules.length)}),RE(d.textStyles)||r.insertRule(lV(d.id,"tspan",d.textStyles),r.cssRules.length)}}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=ZU(s)+` 1147`}else i+=`${e.themeCSS} 1148`;return i+ZU(r)},yGe=(e,t)=>c7(jze(`${e}{${t}}`),Mze([function(r,i,s,a){if(r.type==="rule"&&Array.isArray(r.props)){if(r.parent&&r.parent.type===a7)return;r.props=r.props.map(o=>o===e&&Array.isArray(r.children)&&r.children.every(u=>u.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(u.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else r.type.startsWith("@")&&([...[pze,xze,mse,"@scope","@container","@starting-style"],a7].includes(r.type)||(Rt.warn(`Removing unsupported at-rule ${r.type} from CSS`),r.type=k9))},Aze])),bGe=(e,t,n,r)=>{const i=xGe(e,n),s=xVe(t,i,e.themeVariables);return yGe(r,s)},vGe=(e="",t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=G$e(r),r=r.replace(/<br>/g,"<br/>"),r},wGe=(e="",t)=>{var n,r;const i=(r=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&r.height?t.viewBox.baseVal.height+"px":cGe,s=btoa('<body style="'+dGe+'">'+e+"</body>");return`<iframe style="width:${lGe};height:${i};${uGe}" src="data:text/html;base64,${s}" sandbox="${hGe}"> 1149 ${fGe} 1150</iframe>`},cV=(e,t,n,r,i)=>{const s=e.append("div");s.attr("id",n),r&&s.attr("style",r);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",sGe);return i&&a.attr("xmlns:xlink",i),a.append("g"),e};function uV(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const SGe=(e,t,n,r)=>{var i,s,a;(i=e.getElementById(t))==null||i.remove(),(s=e.getElementById(n))==null||s.remove(),(
1150a=e.getElementById(r))==null||a.remove()},CGe=async function(e,t,n){var r,i,s,a,o,c;I9();const u=vae(t);t=u.code;const d=wc();Rt.debug(d),t.length>((d==null?void 0:d.maxTextSize)??tGe)&&(t=nGe);const h=`#${e}`,f="i"+e,m="#"+f,p="d"+e,x="#"+p;let v=_o(document.body);const g=d.securityLevel===rGe,y=d.securityLevel===iGe,w=d.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),g){const q=uV(_o(n),f);v=_o(q.nodes()[0].contentDocument.body),v.node().style.margin="0"}else v=_o(n);cV(v,e,p,`font-family: ${w}`,aGe)}else{if(SGe(document,e,p,f),g){const q=uV(_o(document.body),f);v=_o(q.nodes()[0].contentDocument.body),v.node().style.margin="0"}else v=_o("body");cV(v,e,p)}let S,C;try{S=await $9(t,{title:u.title})}catch(q){S=new aae("error"),C=q}const k=v.select(x).node(),_=S.type,E=k.firstChild,A=E.firstChild,j=(i=(r=S.renderer).getClasses)==null?void 0:i.call(r,t,S),D=bGe(d,_,j,h),M=document.createElement("style");M.innerHTML=D,E.insertBefore(M,A);try{await S.renderer.draw(t,e,XU,S)}catch(q){throw DVe.draw(t,e,XU),q}const $=v.select(`${x} svg`),B=(a=(s=S.db).getAccTitle)==null?void 0:a.call(s),z=(c=(o=S.db).getAccDescription)==null?void 0:c.call(o);_Ge(_,$,B,z),v.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",oGe);let O=v.select(x).node().innerHTML;if(Rt.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),O=vGe(O,g,vse(d.arrowMarkerAbsolute)),g){const q=v.select(x+" svg").node();O=wGe(O,q)}else y||(O=Kh.sanitize(O,{ADD_TAGS:mGe,ADD_ATTR:pGe,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(iHe(),C)throw C;const I=_o(g?m:x).node();return I&&"remove"in I&&I.remove(),{svg:O,bindFunctions:S.db.bindFunctions}};function kGe(e={}){var t;e!=null&&e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Y$e(e),e!=null&&e.theme&&e.theme in Eu?e.themeVariables=Eu[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Eu.default.getThemeVariables(e.themeVariables));const n=typeof e=="object"?W$e(e):Ose();T9(n.logLevel),I9()}const $9=(e,t={})=>{const{code:n}=bae(e);return rHe(n,t)};function _Ge(e,t,n,r){aHe(t,e),oHe(t,n,r,t.attr("id"))}const Wm=Object.freeze({render:CGe,parse:gGe,getDiagramFromText:$9,initialize:kGe,getConfig:wc,setConfig:Dse,getSiteConfig:Ose,updateSiteConfig:K$e,reset:()=>{r5()},globalReset:()=>{r5(Jg)},defaultConfig:Jg});T9(wc().logLevel);r5(wc());const TGe=async()=>{Rt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Zg).map(async([n,{detector:r,loader:i}])=>{if(i)try{P9(n)}catch{try{const{diagram:a,id:o}=await i();s5(o,a,r)}catch(a){throw Rt.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete Zg[n],a}}}))).filter(n=>n.status==="rejected");if(t.length>0){Rt.error(`Failed to load ${t.length} external diagrams`);for(const n of t)Rt.error(n);throw new Error(`Failed to load ${t.length} external diagrams`)}},EGe=(e,t,n)=>{Rt.warn(e),Ase(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},wae=async function(e={querySelector:".mermaid"}){try{await jGe(e)}catch(t){if(Ase(t)&&Rt.error(t.str),Wo.parseError&&Wo.parseError(t),!e.suppressErrors)throw Rt.error("Use the suppressErrors option to suppress these errors"),t}},jGe=async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:".mermaid"}){const r=Wm.getConfig();Rt.debug(`${e?"":"No "}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");Rt.debug(`Found ${i.length} diagrams`),(r==null?void 0:r.startOnLoad)!==void 0&&(Rt.debug("Start On Load: "+(r==null?void 0:r.startOnLoad)),Wm.updateSiteConfig({startOnLoad:r==null?void 0:r.startOnLoad}));const s=new ib.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const c of Array.from(i)){Rt.info("Rendering diagram: "+c.id);/*! Check if previously processed */if(c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=c.innerHTML,a=PDe(ib.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ib.detectInit(a);d&&Rt.debug("Detected early reinit: ",d);try{const{svg:h,bindFunctions:f}=await _ae(u,a,c);c.innerHTML=h,e&&await e(u),f&&f(c)}catch(h){EGe(h,o,Wo.parseError)}}if(o.length>0)throw o[0]},Sae=function(e){Wm.initialize(e)},NGe=async function(e,t,n){Rt.warn("mermaid.init is deprecated. Please use run instead."),e&&Sae(e);const r={postRenderCallback:n,querySelector:".mermaid"};typeof t=="string"?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.
1150nodes=t),await wae(r)},AGe=async(e,{lazyLoad:t=!0}={})=>{Tse(...e),t===!1&&await TGe()},Cae=function(){if(Wo.startOnLoad){const{startOnLoad:e}=Wm.getConfig();e&&Wo.run().catch(t=>Rt.error("Mermaid failed to initialize",t))}};if(typeof document<"u"){/*! 1151 * Wait for document loaded before starting the execution 1152 */window.addEventListener("load",Cae,!1)}const MGe=function(e){Wo.parseError=e},c5=[];let PE=!1;const kae=async()=>{if(!PE){for(PE=!0;c5.length>0;){const e=c5.shift();if(e)try{await e()}catch(t){Rt.error("Error executing queue",t)}}PE=!1}},RGe=async(e,t)=>new Promise((n,r)=>{const i=()=>new Promise((s,a)=>{Wm.parse(e,t).then(o=>{s(o),n(o)},o=>{var c;Rt.error("Error parsing",o),(c=Wo.parseError)==null||c.call(Wo,o),a(o),r(o)})});c5.push(i),kae().catch(r)}),_ae=(e,t,n)=>new Promise((r,i)=>{const s=()=>new Promise((a,o)=>{Wm.render(e,t,n).then(c=>{a(c),r(c)},c=>{var u;Rt.error("Error parsing",c),(u=Wo.parseError)==null||u.call(Wo,c),o(c),i(c)})});c5.push(s),kae().catch(i)}),Wo={startOnLoad:!0,mermaidAPI:Wm,parse:RGe,render:_ae,init:NGe,run:wae,registerExternalDiagrams:AGe,initialize:Sae,parseError:void 0,contentLoaded:Cae,setParseErrorHandler:MGe,detectType:D3};function OGe(e){return e.replace(/\[([^\]]*)\]/g,(t,n)=>`[${n.replace(/[(){}]/g,"").replace(/<br\s*\/?>/gi," ").replace(/\|/g,"-").replace(/"/g,"'")}]`)}function DGe(e,t){var r;const n=[e.querySelector(".nodeLabel"),e.querySelector("foreignObject .nodeLabel"),e.querySelector("foreignObject span"),e.querySelector("foreignObject div"),e.querySelector("foreignObject"),e.querySelector("text"),e];for(const i of n){const s=(r=i==null?void 0:i.textContent)==null?void 0:r.trim();if(s&&s.length>0)return s}return t}function LGe(e){const t=e.querySelectorAll(".node"),n=e.querySelectorAll(".edgePaths > path");if(t.length===0)return[];const r=[];t.forEach((o,c)=>{r.push(DGe(o,`Step ${c+1}`))});const i=n.length,s=t.length,a=[];return t.forEach((o,c)=>{const u=r[c],d=c>0?r[c-1]:null,h=c<s-1?r[c+1]:null,f=[];if(c>0&&i>0)if(i===s-1)f.push(c-1);else{const p=i/Math.max(s-1,1),x=Math.floor((c-1)*p),v=Math.floor(c*p);for(let g=x;g<v&&g<i;g++)f.push(g);f.length===0&&c-1<i&&f.push(c-1)}let m;c===0&&h?m=`The process starts here with "${u}", which leads to ${h}.`:c===0?m=`The process starts here with "${u}".`:c===s-1&&d?m=`After ${d}, the process reaches "${u}" â the final step.`:d&&h?m=`After ${d}, "${u}" takes over and then passes to ${h}.`:d?m=`Following ${d}, the flow continues to "${u}".`:m=`"${u}" is part of this flow.`,a.push({nodeIndex:c,label:u,description:m,edgeIndices:f})}),a}function PGe(e,t){const n=[],r=new Map,i=/([A-Za-z_]\w*)\[([^\]]+)\]/g;let s;for(;(s=i.exec(e))!==null;){const c=s[1],u=s[2].replace(/['"]/g,"").trim(),d=t.findIndex(h=>h===u);d>=0&&r.set(c,d)}t.forEach((c,u)=>{Array.from(r.values()).includes(u)||r.set(c,u)});const a=/([A-Za-z_]\w*)(?:\[[^\]]*\])?\s*-->(?:\|[^|]*\|)?\s*([A-Za-z_]\w*)/g;let o=0;for(;(s=a.exec(e))!==null;){const c=s[1],u=s[2],d=r.get(c),h=r.get(u);d!==void 0&&h!==void 0&&n.push({fromNodeIndex:d,toNodeIndex:h,edgeIndex:o}),o++}return n}function IGe(e,t){const n=new Set([e]),r=new Set;let i=e;const s=new Set;for(;!s.has(i);){s.add(i);const a=t.find(o=>o.toNodeIndex===i);if(!a)break;n.add(a.fromNodeIndex),r.add(a.edgeIndex),i=a.fromNodeIndex}return{nodeIndices:n,edgeIndices:r}}function B2(e,t,n,r,i,s){var v,g,y;const a=e.querySelectorAll(".node"),o=e.querySelectorAll(".edgePaths > path"),c=e.querySelectorAll(".edgeLabels > .edgeLabel"),u="cubic-bezier(0.4, 0, 0.2, 1)";function d(w){o[w]&&(o[w].style.display="none"),c[w]&&(c[w].style.display="none")}function h(w,S){o[w]&&(o[w].style.display="",o[w].style.opacity=S),c[w]&&(c[w].style.display="",c[w].style.opacity=S)}if(r==="completed"){a.forEach(w=>{w.style.transition=`opacity 0.6s ${u}, filter 0.6s ${u}`,w.style.opacity="1",w.style.filter="none",w.style.cursor="pointer"});for(let w=0;w<Math.max(o.length,c.length);w++)h(w,"0.5");return}if(r==="focused"&&i!==void 0){const w=s?IGe(i,s):{nodeIndices:new Set([i]),edgeIndices:new Set(((v=t.find(S=>S.nodeIndex===i))==null?void 0:v.edgeIndices)??[])};a.forEach((S,C)=>{S.style.transition=`opacity 0.5s ${u}, filter 0.5s ${u}`,S.style.cursor="pointer",C===i?(S.style.opacity="1",S.style.filter="drop-shadow(0 0 20px rgba(124, 58, 237, 0.7))"):w.nodeIndices.has(C)?(S.style.opacity="0.65",S.style.filter="drop-shadow(0 0 8px rgba(124, 58, 237, 0.3))"):(S.style.opacity="0.1",S.style.filter="blur(1.5px)")});for(let S=0;S<Math.max(o.length,c.length);S++)w.edgeIndices.has(S)?h(S,"0.85"):d(S);return}const f=new Set,m=new Set;for(let w=0;w<=n;w++){const S=t[w];
1152S&&(f.add(S.nodeIndex),S.edgeIndices.forEach(C=>m.add(C)))}const p=(g=t[n])==null?void 0:g.nodeIndex,x=new Set(((y=t[n])==null?void 0:y.edgeIndices)??[]);a.forEach((w,S)=>{w.style.transition=`opacity 0.6s ${u}, filter 0.6s ${u}`,w.style.cursor="default",f.has(S)?S===p?(w.style.opacity="1",w.style.filter="drop-shadow(0 0 20px rgba(124, 58, 237, 0.6))"):(w.style.opacity="0.18",w.style.filter="blur(0.5px)"):(w.style.opacity="0",w.style.filter="blur(6px)")});for(let w=0;w<Math.max(o.length,c.length);w++)m.has(w)?x.has(w)?h(w,"0.85"):h(w,"0.1"):d(w)}function Tae({title:e,mermaid:t}){const{t:n}=J("common"),r=b.useId().replace(/:/g,"-"),i=b.useRef(null),s=b.useRef(null),[a,o]=b.useState(null),[c,u]=b.useState(null),[d,h]=b.useState([]),[f,m]=b.useState([]),[p,x]=b.useState(0),[v,g]=b.useState(!1),[y,w]=b.useState("building"),[S,C]=b.useState(null),[k,_]=b.useState(1),[E,A]=b.useState({x:0,y:0}),j=b.useRef(!1),D=b.useRef({x:0,y:0,panX:0,panY:0}),M=b.useRef(null),$=b.useRef(null);b.useEffect(()=>{if(!(t!=null&&t.trim())){u(n("errors.noDiagramCode"));return}let we=!1;const Oe=OGe(t);return(async()=>{try{const It=document.documentElement.classList.contains("dark");Wo.initialize({startOnLoad:!1,theme:"base",themeVariables:It?{primaryColor:"#1e1b2e",primaryTextColor:"#e2dff0",primaryBorderColor:"#7c3aed",secondaryColor:"#1a1830",tertiaryColor:"#14122a",lineColor:"#4c3d8f",textColor:"#c4bde0",mainBkg:"#1e1b2e",nodeBorder:"#7c3aed",clusterBkg:"#1a1830",clusterBorder:"#3b2d6e",titleColor:"#e2dff0",edgeLabelBackground:"#14122a",fontFamily:"Inter, system-ui, sans-serif",fontSize:"14px",nodeTextColor:"#e2dff0"}:{primaryColor:"#f5f3ff",primaryTextColor:"#1e1b2e",primaryBorderColor:"#8b5cf6",secondaryColor:"#ede9fe",tertiaryColor:"#f8f7ff",lineColor:"#a78bfa",textColor:"#374151",mainBkg:"#f5f3ff",nodeBorder:"#8b5cf6",clusterBkg:"#ede9fe",clusterBorder:"#c4b5fd",titleColor:"#1e1b2e",edgeLabelBackground:"#ffffff",fontFamily:"Inter, system-ui, sans-serif",fontSize:"14px",nodeTextColor:"#1e1b2e"}});const mt=await Wo.render(r,Oe);if(we)return;o(mt.svg),u(null)}catch(It){if(we)return;u(It instanceof Error?It.message:n("errors.failedToRenderDiagram")),o(null)}})(),()=>{we=!0}},[r,t,n]);const B=b.useCallback(we=>{if(!we||!a)return;i.current=we;const Oe=LGe(we);h(Oe);const Je=Oe.map(mt=>mt.label),It=PGe(t,Je);m(It),Oe.length>1?(x(0),w("building"),C(null),B2(we,Oe,0,"building")):(w("completed"),B2(we,Oe,0,"completed"))},[a,t]);b.useEffect(()=>{if(!(!i.current||d.length<=1)){if(B2(i.current,d,p,y,S??void 0,f),y==="building"&&p>=d.length-1){const we=setTimeout(()=>{w("completed"),C(null),i.current&&(B2(i.current,d,p,"completed"),z())},1200);return()=>clearTimeout(we)}y==="completed"&&z()}},[p,d,y,S,f]);function z(){if(s.current&&s.current(),!i.current)return;const we=i.current.querySelectorAll(".node"),Oe=[];we.forEach((It,mt)=>{const De=Pe=>{Pe.stopPropagation(),w("focused"),C(mt)};It.addEventListener("click",De),It.style.cursor="pointer",Oe.push(()=>It.removeEventListener("click",De))});const Je=It=>{It.target.closest(".node")||(w("completed"),C(null))};i.current.addEventListener("click",Je),Oe.push(()=>{var It;return(It=i.current)==null?void 0:It.removeEventListener("click",Je)}),s.current=()=>Oe.forEach(It=>It())}b.useEffect(()=>()=>{s.current&&s.current()},[]);const O=d.length,P=p>=O-1,I=y==="focused"&&S!==null?d.find(we=>we.nodeIndex===S):y==="building"?d[p]:null,q=b.useCallback(()=>{p<O-1?x(we=>we+1):g(!1)},[p,O]),R=b.useCallback(()=>{p>0&&(w("building"),C(null),x(we=>we-1))},[p]),xe=b.useCallback(()=>{P&&!v?(w("building"),C(null),x(0),g(!0)):g(we=>!we)},[P,v]);b.useEffect(()=>(v&&!P&&y==="building"&&($.current=setInterval(q,2200)),()=>{$.current&&clearInterval($.current)}),[v,P,q,y]);const me=O>1?p/(O-1)*100:100,U=O>1,ae=I!=null,Ce=b.useCallback(()=>{y==="focused"&&(w("completed"),C(null))},[y]);b.useEffect(()=>{if(y!=="focused")return;const we=Oe=>{M.current&&!M.current.contains(Oe.target)&&(w("completed"),C(null))};return document.addEventListener("mousedown",we),()=>document.removeEventListener("mousedown",we)},[y]);const je=b.useCallback(()=>_(we=>Math.min(we+.2,2)),[]),ve=b.useCallback(()=>{_(we=>{const Oe=Math.max(we-.2,.4);return Oe<=1&&A({x:0,y:0}),Oe})},[]),Te=b.useCallback(()=>{_(1),A({x:0,y:0})},[]),Se=b.useCallback(we=>{var Oe,Je;k<=1||(j.current=!0,D.current={x:we.clientX,y:we.clientY,panX:E.x,panY:E.y},(Je=(Oe=we.target).setPointerCapture)==null||Je.call(Oe,we.pointerId))},[k,E]),He=b.useCallback(we=>{if(!j.current)return;const Oe=we.clientX-D.current.x,Je=we.clientY-D.current.y;A({x:D.current.panX+Oe,y:D.current.panY+Je})},[]),tt=b.useCallback(()=>{j.current=!1},[]);return l.jsx("div",{ref:M,className:"diagram-block group mb-6 overflow-hidden rounded-2xl border border-border/50 bg-card shadow-lg transition-shadow duration-500 hover:shadow-2xl",onClick:Ce,role:"presentation",children:l.jsxs("div",{className:"relative px-6 pb-4 pt-6",children:[l.jsxs("div",{className:"relative z-10 mb-5 flex items-center justify-between",children:[l.jsx("div",{className:"w-20"}),e?l.jsxs("div",{className:"inline-flex items-center gap-2.5 rounded-full border border-border bg-muted/60 px-5 py-2 text-[11px] font-bold uppercase tracking-[0.2em] text-muted-foreground shadow-sm backdrop-blur-sm",children:[l.jsx("span",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-violet-500 to-purple-600 shadow-md shadow-violet-500/30",children:l.jsx(Oxe,{className:"h-3 w-3 text-white",strokeWidth:2.5,"aria-hidden":!0})}),e]}):l.jsx("div",{}),l.jsxs("div",{className:"flex items-center gap-1",onClick:we=>we.stopPropagation(),children:[l.jsx(Pn,{onClick:ve,disabled:k<=.4,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-30","aria-label":"Zoom out",children:l.jsx(rye,{className:"h-3.5 w-3.5"})}),l.jsxs(ce,{variant:"ghost",size:"sm",onClick:Te,className:"min-w-[2.5rem] rounded-lg px-1.5 py-0.5 text-center text-[10px] font-medium text-muted-foreground
1152/70 h-7","aria-label":"Reset zoom",children:[Math.round(k*100),"%"]}),l.jsx(Pn,{onClick:je,disabled:k>=2,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-30","aria-label":"Zoom in",children:l.jsx(nye,{className:"h-3.5 w-3.5"})})]})]}),l.jsxs("div",{className:"relative z-10 flex justify-center overflow-hidden py-2",style:{cursor:k>1?j.current?"grabbing":"grab":"default"},onPointerDown:Se,onPointerMove:He,onPointerUp:tt,onPointerLeave:tt,children:[c&&l.jsx("p",{className:"text-sm text-muted-foreground",role:"alert",children:c}),a&&!c&&l.jsx("div",{ref:B,className:"mermaid-output",style:{transform:`translate(${E.x}px, ${E.y}px) scale(${k})`,transformOrigin:"center top",transition:j.current?"none":"transform 0.3s ease-out"},dangerouslySetInnerHTML:{__html:Kh.sanitize(a,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["foreignObject"],ADD_ATTR:["xmlns","class","id","data-id","data-node","transform","style","marker-end"]})}})]}),l.jsx(H6,{mode:"wait",children:ae&&I&&l.jsxs(nc.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{type:"spring",stiffness:300,damping:28},className:"relative z-10 mx-auto mb-3 max-w-md rounded-xl border border-border bg-muted/80 px-5 py-3.5 text-center backdrop-blur-sm",onClick:we=>we.stopPropagation(),children:[l.jsx("p",{className:"mb-1 text-xs font-bold uppercase tracking-widest text-institution",children:I.label}),l.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:I.description}),y==="focused"&&l.jsx(ce,{variant:"ghost",size:"sm",onClick:Ce,className:"mt-2 text-[11px] font-medium text-muted-foreground/60 h-auto px-2 py-1",children:"Close"})]},y==="focused"?`focus-${S}`:`step-${p}`)}),U&&l.jsxs("div",{className:"relative z-10 mt-2 flex flex-col items-center gap-2 pb-2",onClick:we=>we.stopPropagation(),children:[l.jsx("div",{className:"h-1 w-full max-w-xs overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full transition-all duration-500 ease-out",style:{width:`${me}%`,background:"linear-gradient(90deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))"}})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Pn,{onClick:R,disabled:p===0,className:"flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-30","aria-label":"Previous step",children:l.jsx($o,{className:"h-4 w-4"})}),l.jsx(Pn,{onClick:xe,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted text-foreground transition-all hover:bg-accent hover:scale-110","aria-label":v?"Pause":P?"Replay":"Play",children:P&&!v?l.jsx(Tx,{className:"h-4 w-4"}):v?l.jsx(BM,{className:"h-4 w-4"}):l.jsx(vk,{className:"h-4 w-4 ml-0.5"})}),l.jsx(Pn,{onClick:q,disabled:P,className:"flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-30","aria-label":"Next step",children:l.jsx(ns,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[d.map((we,Oe)=>l.jsx(Pn,{onClick:()=>{w("building"),C(null),x(Oe)},className:re("h-1.5 rounded-full transition-all duration-300 min-w-0 p-0",Oe===p?"w-5":Oe<=p?"w-1.5":"w-1.5 opacity-40",Oe<=p?"bg-institution":"bg-muted"),"aria-label":`Go to step ${Oe+1}`},Oe)),l.jsxs("span",{className:"ml-2 text-[10px] font-medium text-muted-foreground/50",children:[p+1,"/",O]})]})]})]})})}const FGe={previousStep:"Previous step",nextStep:"Next step",play:"Play",pause:"Pause",replay:"Replay",goToStep:e=>`Go to step ${e}`};function BGe({totalSteps:e,autoPlay:t=!1,autoPlayInterval:n=2500,onStepChange:r,children:i,className:s,labels:a}){const o={...FGe,...a},[c,u]=b.useState(0),[d,h]=b.useState(t),f=b.useRef(null),m=c>=e-1,p=b.useCallback(C=>{const k=Math.max(0,Math.min(C,e-1));u(k),r==null||r(k)},[e,r]),x=b.useCallback(()=>{c<e-1?p(c+1):h(!1)},[c,e,p]),v=b.useCallback(()=>{c>0&&p(c-1)},[c,p]),g=b.useCallback(()=>{m?(p(0),h(!0)):h(C=>!C)},[m,p]),y=b.useCallback(()=>{h(!1),p(0)},[p]);b.useEffect(()=>(d&&!m&&(f.current=setInterval(x,n)),()=>{f.current&&clearInterval(f.current)}),[d,m,x,n]);const w={currentStep:c,totalSteps:e,isPlaying:d,isComplete:m,next:x,previous:v,goToStep:p,togglePlay:g,reset:y},S=e>1?c/(e-1)*100:100;return l.jsxs("div",{className:re("flex flex-col",s),children:[l.jsx("div",{className:"flex-1",children:i(w)}),l.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[l.jsx("div",{className:"mx-auto h-1 w-full max-w-xs overflow-hidden rounded-full bg-white/10",children:l.jsx("div",{className:"h-full rounded-full transition-all duration-500 ease-out",style:{width:`${S}%`,background:"linear-gradient(90deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))"}})}),l.jsxs("div",{className:"flex items-center justify-center gap-3",children:[l.jsx(Pn,{onClick:v,disabled:c===0,className:"flex h-8 w-8 items-center justify-center rounded-full text-violet-300/70 transition-colors hover:bg-white/10 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent","aria-label":o.previousStep,children:l.jsx($o,{className:"h-4 w-4"})}),l.jsx(Pn,{onClick:g,className:"flex h-9 w-9 items-center justify-center rounded-full bg-white/10 text-white transition-all hover:bg-white/20 hover:scale-110","aria-label":d?o.pause:m?o.replay:o.play,children:m&&!d?l.jsx(Tx,{className:"h-4 w-4"}):d?l.jsx(BM,{className:"h-4 w-4"}):l.jsx(vk,{className:"h-4 w-4 ml-0.5"})}),l.jsx(Pn,{onClick:x,disabled:m,className:"flex h-8 w-8 items-center justify-center rounded-full text-violet-300/70 transition-colors hover:bg-white/10 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent","aria-label":o.nextStep,children:l.jsx(ns,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[Array.from({length:e},(C,k)=>l.jsx(Pn,{onClick:()=>p(k),className:re("h-1.5 rounded-full transition-all duration-300 min-w-0 p-0",k===c?"w-5":k<=c?"w-1.5":"w-1.5 opacity-40",k<=c?"bg-institution":"bg-white/25"),"aria-label":o.goToStep(k+1)},k)),l.jsxs("span",{className:"ml-2 text-[10px] font-medium text-violet-300/50",children:[c+1,"/",e]})]})]})]})}const zGe={type:"spring",stiffness:260,damping:25},dV={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:zGe}};function Eae(e,t=0,n=null){var i,s;const r=[];return r.push({id:e.id,label:e.label,description:e.description,depth:t,parentId:n,childIds:((i=e.children)==null?void 0:i.map(a=>a.id))??[]}
1152),(s=e.children)==null||s.forEach(a=>{r.push(...Eae(a,t+1,e.id))}),r}function $Ge(e){const t=[];return e.forEach(n=>{n.parentId&&t.push({id:`${n.parentId}->${n.id}`,fromId:n.parentId,toId:n.id})}),t}function UGe(e,t){const n=new Set,r=[e];for(;r.length>0;){const i=r.shift();n.add(i);const s=t.find(a=>a.id===i);s==null||s.childIds.forEach(a=>r.push(a))}return n}const Ao=160,Yd=48,zp=24,hV=56,fV=16,Ui=40,VGe=14,HGe="Inter, system-ui, sans-serif",qGe=7.2,jae=28,GGe=12,WGe=Math.max(6,Math.floor((Ao-jae-GGe)/qGe));function YGe(e,t){const n=new Map;if(e.length===0)return{positions:n,width:0,height:0};const r=new Map;e.forEach(u=>{const d=r.get(u.depth)??[];d.push(u),r.set(u.depth,d)});const i=Math.max(...Array.from(r.keys())),s=[];for(let u=0;u<=i;u++){const h=(r.get(u)??[]).length;if(h===0){s.push({perRow:0,rowCount:0,rowWidth:0,rowHeight:0});continue}const f=h*Ao+(h-1)*zp,m=t<=0||f+Ui*2<=t;let p;if(m)p=h;else{const y=Math.max(Ao,t-Ui*2);p=Math.max(1,Math.floor((y+zp)/(Ao+zp)))}const x=Math.ceil(h/p),v=p*Ao+(p-1)*zp,g=x*Yd+(x-1)*fV;s.push({perRow:p,rowCount:x,rowWidth:v,rowHeight:g})}const a=s.reduce((u,d)=>Math.max(u,d.rowWidth),0);let o=0;for(let u=0;u<=i;u++){const d=r.get(u)??[],h=s[u];if(!h||d.length===0)continue;const{perRow:f,rowCount:m,rowWidth:p}=h,x=(a-p)/2;d.forEach((v,g)=>{const y=Math.floor(g/f),w=g%f,S=y<m-1?f:d.length-f*(m-1),C=S*Ao+(S-1)*zp,k=x+(p-C)/2;n.set(v.id,{x:k+w*(Ao+zp),y:o+y*(Yd+fV)})}),o+=h.rowHeight+hV}const c=Math.max(0,o-hV);return{positions:n,width:a,height:c}}const mV=[{bg:"from-violet-500 to-purple-600",glow:"rgba(124, 58, 237, 0.4)",border:"#7c3aed"},{bg:"from-blue-500 to-indigo-600",glow:"rgba(59, 130, 246, 0.4)",border:"#3b82f6"},{bg:"from-emerald-500 to-teal-600",glow:"rgba(16, 185, 129, 0.4)",border:"#10b981"},{bg:"from-amber-500 to-orange-600",glow:"rgba(245, 158, 11, 0.35)",border:"#f59e0b"},{bg:"from-rose-500 to-pink-600",glow:"rgba(244, 63, 94, 0.4)",border:"#f43f5e"}];function KGe(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}â¦`}function Nae({title:e,root:t,steps:n}){var A;const r=b.useMemo(()=>Eae(t),[t]),i=b.useMemo(()=>$Ge(r),[r]),[s,a]=b.useState(null),[o,c]=b.useState(0),u=b.useRef(null),[d,h]=b.useState(0);b.useLayoutEffect(()=>{const j=u.current;j&&h(j.getBoundingClientRect().width)},[]),b.useEffect(()=>{const j=u.current;if(!j||typeof ResizeObserver>"u")return;const D=new ResizeObserver(M=>{for(const $ of M)h($.contentRect.width)});return D.observe(j),()=>D.disconnect()},[]);const f=b.useMemo(()=>YGe(r,d),[r,d]),m=b.useMemo(()=>s?UGe(s,r):null,[s,r]),p=n&&n.length>0,x=b.useMemo(()=>{var D;if(!p)return new Set(r.map(M=>M.id));const j=new Set;for(let M=0;M<=o;M++)(D=n[M])==null||D.nodes.forEach($=>j.add($));return j},[p,n,o,r]),v=b.useMemo(()=>{var j;return p?new Set(((j=n[o])==null?void 0:j.nodes)??[]):new Set},[p,n,o]),g=p?((A=n[o])==null?void 0:A.explanation)??"":"",y=f.width+Ui*2,w=f.height+Ui*2;function S(j){return x.has(j)?m&&!m.has(j)?.2:1:0}function C(j){return x.has(j)?v.has(j)?1.08:s===j?1.1:1:.7}function k(j){return!x.has(j.fromId)||!x.has(j.toId)?0:m?m.has(j.fromId)&&m.has(j.toId)?1:.1:.5}function _(j){return m&&m.has(j.fromId)&&m.has(j.toId)?"rgba(var(--arthur-primary-rgb), 0.7)":"rgba(124, 58, 237, 0.3)"}const E=l.jsxs("div",{className:"px-6 pt-6 pb-2",children:[l.jsx("div",{className:"mb-5 flex justify-center",children:l.jsxs("div",{className:"inline-flex items-center gap-2.5 rounded-full border border-[#2a2545] bg-gradient-to-r from-[#1a1730]/80 to-[#1e1a35]/80 px-5 py-2 text-[11px] font-bold uppercase tracking-[0.2em] text-violet-300/90 shadow-lg backdrop-blur-sm",children:[l.jsx("span",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-violet-500 to-purple-600 shadow-md shadow-violet-500/30",children:l.jsx(Hxe,{className:"h-3 w-3 text-white",strokeWidth:2.5,"aria-hidden":!0})}),e]})}),l.jsx("div",{ref:u,className:"overflow-x-auto py-4",children:l.jsx("div",{className:"flex justify-center",style:{minWidth:y},children:l.jsxs("svg",{width:y,height:w,viewBox:`0 0 ${y} ${w}`,children:[i.map(j=>{const D=f.positions.get(j.fromId),M=f.positions.get(j.toId);if(!D||!M)return null;const $=D.x+Ao/2+Ui,B=D.y+Yd+Ui,z=M.x+Ao/2+Ui,O=M.y+Ui,P=B+(O-B)*.4,I=B+(O-B)*.6;return l.jsx(nc.path,{d:`M ${$} ${B} C ${$} ${P}, ${z} ${I}, ${z} ${O}`,fill:"none",strokeWidth:2,strokeLinecap:"round",initial:{pathLength:0,opacity:0}
1152,animate:{pathLength:k(j)>0?1:0,opacity:k(j),stroke:_(j)},transition:{duration:.6,ease:"easeInOut"}},j.id)}),r.map(j=>{const D=f.positions.get(j.id);if(!D)return null;const M=mV[j.depth%mV.length],$=S(j.id),B=C(j.id),z=v.has(j.id),O=s===j.id;return l.jsxs(nc.g,{initial:{opacity:0,scale:.7},animate:{opacity:$,scale:B},transition:{type:"spring",stiffness:260,damping:25,delay:p?0:j.depth*.15},onMouseEnter:()=>a(j.id),onMouseLeave:()=>a(null),style:{cursor:"pointer",transformOrigin:`${D.x+Ao/2+Ui}px ${D.y+Yd/2+Ui}px`},children:[(z||O)&&l.jsx("rect",{x:D.x+Ui-4,y:D.y+Ui-4,width:Ao+8,height:Yd+8,rx:16,fill:"none",stroke:M.border,strokeWidth:2,opacity:.4,style:{filter:`drop-shadow(0 0 12px ${M.glow})`}}),l.jsx("rect",{x:D.x+Ui,y:D.y+Ui,width:Ao,height:Yd,rx:12,fill:"#1e1b2e",stroke:M.border,strokeWidth:z||O?2:1.5}),l.jsx("circle",{cx:D.x+Ui+16,cy:D.y+Ui+Yd/2,r:4,fill:M.border}),l.jsxs("text",{x:D.x+Ui+jae,y:D.y+Ui+Yd/2+1,fill:z||O?"#ffffff":"#c4bde0",fontSize:VGe,fontWeight:600,fontFamily:HGe,dominantBaseline:"middle",children:[KGe(j.label,WGe),l.jsx("title",{children:j.label})]})]},j.id)})]})})}),l.jsx(H6,{children:s&&!p&&(()=>{const j=r.find(D=>D.id===s);return j!=null&&j.description?l.jsxs(nc.div,{variants:dV,initial:"hidden",animate:"visible",exit:"hidden",className:"mx-auto mb-4 max-w-sm rounded-xl border border-border dark:border-[#2a2545] bg-card dark:bg-[#15132a]/90 px-4 py-3 text-center backdrop-blur-sm",children:[l.jsx("p",{className:"mb-0.5 text-xs font-bold text-foreground",children:j.label}),l.jsx("p",{className:"text-xs leading-relaxed text-violet-200/70",children:j.description})]},`tooltip-${s}`):null})()}),p&&l.jsx(H6,{mode:"wait",children:l.jsx(nc.div,{variants:dV,initial:"hidden",animate:"visible",exit:"hidden",className:"mx-auto mb-4 max-w-lg rounded-xl border border-border dark:border-[#2a2545] bg-card dark:bg-[#15132a]/80 px-5 py-3.5 text-center backdrop-blur-sm",children:l.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground dark:text-violet-200/80",children:g})},o)})]});return l.jsx("div",{className:"mb-6 overflow-hidden rounded-2xl shadow-lg",children:l.jsxs("div",{className:"relative bg-muted dark:bg-[#0f0e1a]",children:[l.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:l.jsx("div",{className:"absolute left-1/2 top-1/3 h-[400px] w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-full opacity-[0.05]",style:{background:"radial-gradient(circle, var(--arthur-primary) 0%, transparent 70%)"}})}),l.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px)",backgroundSize:"40px 40px"}}),l.jsx("div",{className:"relative z-10",children:p?l.jsx(BGe,{totalSteps:n.length,onStepChange:c,children:()=>E}):E})]})})}const XGe={p:({children:e,...t})=>l.jsx("p",{className:"mb-4 text-foreground leading-relaxed",...t,children:e}),h1:({children:e,...t})=>l.jsx("h1",{className:"text-2xl font-bold mb-4 text-foreground",...t,children:e}),h2:({children:e,...t})=>l.jsx("h2",{className:"text-xl font-semibold mb-3 border-b pb-2 text-foreground",...t,children:e}),h3:({children:e,...t})=>l.jsx("h3",{className:"text-lg font-semibold mb-2 text-foreground",...t,children:e}),h4:({children:e,...t})=>l.jsx("h4",{className:"text-base font-semibold mb-2 text-foreground",...t,children:e}),ul:({children:e,...t})=>l.jsx("ul",{className:"list-disc ps-6 mb-4 space-y-1",...t,children:e}),ol:({children:e,...t})=>l.jsx("ol",{className:"list-decimal ps-6 mb-4 space-y-1",...t,children:e}),li:({children:e,...t})=>l.jsx("li",{className:"text-foreground leading-relaxed",...t,children:e}),blockquote:({children:e,...t})=>l.jsx("blockquote",{className:"border-s-4 border-primary ps-4 py-2 my-4 italic bg-muted/50 rounded-e",...t,children:e}),code:({className:e,children:t,...n})=>{if(e==null?void 0:e.startsWith("language-")){const i=(e==null?void 0:e.replace("language-",""))??"",s=String(t).replace(/\n$/,"");if(i==="mermaid")return l.jsx(Tae,{mermaid:s});if(i==="hierarchy_tree")try{const a=JSON.parse(s);if(a.root)return l.jsx(Nae,{title:a.title??"",root:a.root})}catch{}return l.jsxs("div",{className:"relative my-4",children:[i&&l.jsx("span",{className:"absolute top-2 end-2 text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded",children:i}),l.jsx("code",{className:re("block bg-muted rounded-md p-4 overflow-x-auto text-sm",e),...n,children:t})]})}return l.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",...n,children:t})},pre:({children:e})=>l.jsx(l.Fragment,{children:e}),table:({children:e})=>
1152l.jsx("div",{className:"overflow-x-auto my-4 rounded border",children:l.jsx(TR,{className:"min-w-full divide-y divide-border",children:e})}),thead:({children:e})=>l.jsx(ER,{className:"bg-muted",children:e}),tbody:({children:e})=>l.jsx(jR,{children:e}),tr:({children:e})=>l.jsx(b4,{children:e}),th:({children:e})=>l.jsx(NR,{className:"px-4 py-2 text-start text-sm font-semibold text-foreground",children:e}),td:({children:e})=>l.jsx(AR,{className:"px-4 py-2 text-sm text-foreground border-t",children:e}),a:({children:e,href:t,...n})=>l.jsx("a",{href:t,className:"text-primary underline hover:text-primary/80 transition-colors",target:"_blank",rel:"noopener noreferrer",...n,children:e}),hr:e=>l.jsx("hr",{className:"my-6 border-border",...e}),img:({src:e,alt:t,...n})=>l.jsx("img",{src:e,alt:t??"Image",className:"max-w-full h-auto rounded-md my-4",loading:"lazy",...n}),strong:({children:e,...t})=>l.jsx("strong",{className:"font-semibold text-foreground",...t,children:e})};function Jx({content:e,className:t}){const n=Y.useMemo(()=>cxe(e),[e]);return l.jsx("div",{className:re("prose-custom",t),children:l.jsx(qne,{remarkPlugins:[rRe,a9e],rehypePlugins:[F9e],components:XGe,children:n})})}const Aae=({displayName:e,roleLabel:t,avatarContent:n,avatarStyle:r,menuItems:i,labels:s})=>{const[a,o]=b.useState(!1),c=b.useRef(null);return b.useEffect(()=>{const u=d=>{c.current&&!c.current.contains(d.target)&&o(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),b.useEffect(()=>{if(!a)return;const u=d=>{d.key==="Escape"&&o(!1)};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[a]),l.jsxs("div",{className:"relative flex items-center gap-4",ref:c,children:[l.jsxs(ce,{variant:"ghost",className:"flex items-center gap-2.5 px-2 py-1.5 h-auto rounded-lg border border-transparent hover:bg-muted hover:border-border",onClick:()=>o(!a),"aria-label":(s==null?void 0:s.ariaLabel)??"User menu","aria-expanded":a,children:[l.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center text-white text-xs font-semibold overflow-hidden",style:r,children:n}),l.jsxs("div",{className:"hidden md:block text-start",children:[l.jsx("div",{className:"font-medium text-sm text-foreground leading-tight",children:e}),l.jsx("div",{className:"text-[11px] text-muted-foreground leading-tight",children:t})]}),l.jsx(ad,{className:`hidden md:block w-3.5 h-3.5 text-muted-foreground transition-transform duration-200 ${a?"rotate-180":""}`,"aria-hidden":"true"})]}),a&&l.jsx("div",{className:"absolute top-full mt-1.5 end-0 w-60 rounded-lg overflow-hidden z-[10001] bg-popover border border-border shadow-elevated",children:l.jsx("div",{className:"p-1",children:i.map((u,d)=>l.jsxs(Y.Fragment,{children:[d>0&&l.jsx("div",{className:"my-1 mx-2 h-px bg-border"}),l.jsxs(ce,{variant:"ghost",className:`w-full gap-3 px-2.5 py-2 h-auto rounded-md justify-start whitespace-normal font-normal ${u.hover}`,onClick:()=>{o(!1),u.action()},children:[l.jsx("div",{className:"w-7 h-7 rounded-md flex items-center justify-center",style:{background:u.iconBg},children:l.jsx(u.icon,{className:`w-3.5 h-3.5 ${u.iconClass}`,"aria-hidden":!0})}),l.jsxs("div",{className:"text-start",children:[l.jsx("div",{className:`font-medium text-sm leading-tight ${u.labelClass??"text-foreground"}`,children:u.label}),l.jsx("div",{className:"text-[11px] text-muted-foreground leading-tight mt-0.5",children:u.desc})]})]})]},u.label))})})]})};Aae.displayName="ProfileDropdown";const Mae=({unreadCount:e,open:t,onToggle:n,labels:r,children:i})=>l.jsxs(l.Fragment,{children:[l.jsxs(Pn,{onClick:n,className:"relative h-9 w-9 rounded-lg border border-transparent transition-colors duration-200 hover:bg-muted hover:border-border","aria-label":(r==null?void 0:r.ariaLabel)??"Notifications","aria-expanded":t,children:[l.jsx(Rb,{className:"h-4 w-4 text-muted-foreground"}),e>0&&l.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-semibold text-destructive-foreground","aria-label":(r==null?void 0:r.countAriaLabel)??`${e} unread notification${e!==1?"s":""}`,children:e>99?"99+":e})]}),i]});Mae.displayName="NotificationBell";const pV={OPEN:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",IN_PROGRESS:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300",WAITING:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-300",RESOLVED:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",CLOSED:"bg-gray-100 text-gray-700 dark:bg-gray-700/30 dark:text-gray-300"}
1152,gV={LOW:"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300",MEDIUM:"bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-300",HIGH:"bg-orange-100 text-orange-600 dark:bg-orange-900/30 dark:text-orange-300",CRITICAL:"bg-red-100 text-red-600 dark:bg-red-900/30 dark:text-red-300"};function QGe(e){return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function ZGe({ticket:e,onReply:t,isReplying:n,formatDate:r=QGe,labels:i}){const[s,a]=b.useState(!1),[o,c]=b.useState(""),u=async()=>{const d=o.trim();!d||!t||(await t(e.id,d),c(""))};return l.jsxs(bm,{padding:"p-0",rounded:"rounded-xl",children:[l.jsxs("button",{type:"button",className:"w-full text-left p-4 flex items-center justify-between gap-3 hover:bg-muted/50 transition-colors rounded-xl",onClick:()=>a(d=>!d),"aria-expanded":s,children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:l.jsxs("span",{className:"font-semibold text-sm text-foreground truncate",children:["#",e.ticketNumber," â ",e.subject]})}),l.jsxs("div",{className:"flex items-center gap-3 mt-1 flex-wrap",children:[l.jsx("span",{className:re("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",pV[e.status]??pV.OPEN),children:e.status.replace("_"," ")}),l.jsx("span",{className:re("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",gV[e.priority]??gV.MEDIUM),children:e.priority}),l.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(od,{className:"h-3 w-3","aria-hidden":"true"}),r(e.createdAt)]}),e.commentCount>0&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(qv,{className:"h-3 w-3","aria-hidden":"true"}),e.commentCount]})]})]}),s?l.jsx(bQ,{className:"h-5 w-5 text-muted-foreground shrink-0"}):l.jsx(ad,{className:"h-5 w-5 text-muted-foreground shrink-0"})]}),s&&l.jsxs("div",{className:"border-t px-4 pb-4 pt-3 space-y-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:i.description}),l.jsx("p",{className:"text-sm whitespace-pre-wrap text-foreground",children:e.description})]}),e.comments&&e.comments.length>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:i.comments}),e.comments.map(d=>l.jsxs("div",{className:re("rounded-lg p-3 text-sm",d.authorType==="platform_admin"?"bg-primary/5 border border-primary/10":"bg-muted/50"),children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground capitalize",children:d.authorType==="platform_admin"?i.supportTeam:i.you}),l.jsx("span",{className:"text-xs text-muted-foreground",children:r(d.createdAt)})]}),l.jsx("p",{className:"text-sm whitespace-pre-wrap text-foreground",children:d.content})]},d.id))]}),e.status!=="CLOSED"&&e.status!=="RESOLVED"&&t&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",className:"flex-1 rounded-lg border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:i.replyPlaceholder,value:o,onChange:d=>c(d.target.value),onKeyDown:d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),u())},disabled:n}),l.jsx(ce,{size:"sm",onClick:u,disabled:!o.trim()||n,"aria-label":i.sendReply,children:l.jsx(Pg,{className:"h-4 w-4"})})]})]})]})}function Rae({tickets:e,isLoading:t,isError:n,errorMessage:r,onReply:i,isReplying:s,labels:a}){return t?l.jsx(bm,{padding:"p-8",rounded:"rounded-xl",children:l.jsx("div",{className:"flex items-center justify-center",children:l.jsx(Rx,{size:"lg"})})}):n?l.jsx(bm,{padding:"p-8",rounded:"rounded-xl",children:l.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 text-center",children:[l.jsx(k6,{className:"h-10 w-10 text-destructive"}),l.jsx("p",{className:"text-sm font-semibold text-foreground",children:a.errorTitle}),r&&l.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})}):e.length?l.jsx("div",{className:"space-y-3",children:e.map(o=>l.jsx(ZGe,{ticket:o,onReply:i,isReplying:s,labels:a},o.id))}):l.jsx(bm,{padding:"p-8",rounded:"rounded-xl",children:l.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 text-center",children:[l.jsx(k6,{className:"h-10 w-10 text-muted-foreground"}),l.jsx("p",{className:"text-sm font-semibold text-foreground",children:a.emptyTitle}),l.jsx("p",{className:"text-xs text-muted-foreground",children:a.emptyDescription})]})})}const Yc={prev:"Previous",next:"Next",pageOf:(e,t)=>`Page ${e} of ${t}`,summary:(e,t,n)=>`Showing ${e}â${t} of ${n}`,pageSize:"Rows per page",loadMore:"Load more",loading:"Loadingâ¦",allLoaded:"All loaded",loadMoreAria:"Load more results"},JGe=[10,20,50];function ey(e){const t=eWe(e.labels);if(e.mode==="cursor")return l.jsxs("nav",{"aria-label":t.loadMoreAria,className:re("flex flex-wrap items-center justify-between gap-2 px-1 py-2 text-sm text-muted-foreground",e.className),children:[l.jsx("p",{children:e.summary??""}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:e.onLoadMore,disabled:!e.hasMore||e.isLoadingMore,children:e.isLoadingMore?t.loading:e.hasMore?t.loadMore:t.allLoaded})]});const{page:n,size:r,total:i,onPageChange:s,onSizeChange:a}=e,o=e.pageSizeOptions??JGe,c=i===0?1:Math.ceil(i/r),u=i===0?0:(n-1)*r+1,d=Math.min(n*r,i),h=n<=1,f=n>=c;return l.jsxs("nav",{"aria-label":t.summary(u,d,i),className:re("flex flex-wrap items-center justify-between gap-2 px-1 py-2 text-sm text-muted-foreground",e.className),children:[l.jsx("p",{children:t.summary(u,d,i)}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>s(n-1),disabled:h,leftIcon:l.jsx($o,{className:"h-4 w-4"}),children:t.prev}),l.jsx("span",{className:"px-1 text-xs",children:t.pageOf(n,c)}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>s(n+1),disabled:f,rightIcon:l.jsx(ns,{className:"h-4 w-4"}),children:t.next}),a&&l.jsxs("label",{className:"ml-2 flex items-center gap-1 text-xs",children:[l.jsx("span",{className:"sr-only",children:t.pageSize}),l.jsx("select",{value:r,onChange:m=>a(Number(m.target.value)),className:"h-8 rounded-md border border-input bg-background px-2 text-xs text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":t.pageSize,children:o.map(m=>l.jsx("option",{value:m,children:m},m))})]})]})]})}function eWe(e){return{prev:(e==null?void 0:e.prev)??Yc.prev,next:(e==null?void 0:e.next)??Yc.next,pageOf:(e
1152==null?void 0:e.pageOf)??Yc.pageOf,summary:(e==null?void 0:e.summary)??Yc.summary,pageSize:(e==null?void 0:e.pageSize)??Yc.pageSize,loadMore:(e==null?void 0:e.loadMore)??Yc.loadMore,loading:(e==null?void 0:e.loading)??Yc.loading,allLoaded:(e==null?void 0:e.allLoaded)??Yc.allLoaded,loadMoreAria:(e==null?void 0:e.loadMoreAria)??Yc.loadMoreAria}}const Oae=({leading:e,left:t,right:n,id:r,ariaLabel:i,className:s})=>l.jsxs("header",{id:r,"aria-label":i,className:re("relative z-40 flex flex-wrap items-center gap-4 rounded-2xl border border-border bg-card px-5 py-3 text-card-foreground shadow-soft",s),children:[e,l.jsx("div",{className:"min-w-0 flex-1",children:t}),n!==void 0&&l.jsx("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:n})]});Oae.displayName="DashboardHeaderCard";const $i=Y.forwardRef(({label:e,...t},n)=>l.jsx(Pn,{ref:n,type:"button",variant:"ghost",size:"md","aria-label":e,...t,children:l.jsx(kx,{className:"h-5 w-5","aria-hidden":"true"})}));$i.displayName="HeaderBackButton";const tWe={streak:{accent:"linear-gradient(90deg, #ff8a3d, #ff6b1a)",iconBg:"bg-orange-500/10 dark:bg-orange-500/20",iconColor:"text-orange-600 dark:text-orange-300"},accuracy:{accent:"linear-gradient(90deg, var(--ple-secondary, #ff8a3d), var(--ple-primary, #ec4899))",iconBg:"bg-pink-500/10 dark:bg-pink-500/20",iconColor:"text-pink-600 dark:text-pink-300"},due:{accent:"linear-gradient(90deg, #ff8d8d, #c53030)",iconBg:"bg-red-500/10 dark:bg-red-500/20",iconColor:"text-red-600 dark:text-red-300"},active:{accent:"linear-gradient(90deg, #5ee0c1, #14b8a6)",iconBg:"bg-teal-500/10 dark:bg-teal-500/20",iconColor:"text-teal-600 dark:text-teal-300"}},yw=Y.forwardRef(({variant:e,icon:t,value:n,unit:r,label:i,trendChip:s,infoButton:a,footSlot:o,onClick:c,ariaLabel:u,className:d},h)=>{const f=tWe[e],m=!c&&!!a,p=l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true","data-testid":"stat-tile-accent",className:"pointer-events-none absolute inset-x-0 top-0 h-[3px]",style:{background:f.accent}}),l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsx("span",{"data-testid":"stat-tile-icon",className:re("inline-flex h-8 w-8 items-center justify-center rounded-[9px]",f.iconBg,f.iconColor,"[&>svg]:h-4 [&>svg]:w-4"),"aria-hidden":"true",children:t}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[s&&l.jsx("span",{children:s}),m&&a]})]}),l.jsxs("div",{className:"mt-3.5 flex items-baseline gap-1",children:[l.jsx("span",{className:"text-[26px] font-extrabold leading-none tracking-tight text-foreground",children:n}),r&&l.jsx("small",{className:"text-[13px] font-semibold text-muted-foreground",children:r})]}),l.jsx("div",{className:"mt-1.5 text-[11px] font-bold uppercase tracking-[0.10em] text-muted-foreground",children:i}),o&&l.jsx("div",{className:"mt-2.5 flex items-center gap-1.5 border-t border-border pt-2.5 text-[11.5px] text-muted-foreground",children:o})]}),x=re("relative min-w-0 overflow-hidden rounded-2xl border border-border bg-card p-4 shadow-soft",d);return c?l.jsx("button",{ref:h,type:"button",onClick:c,"aria-label":u??i,className:re(x,"text-start transition-shadow hover:shadow-elevated","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:p}):l.jsx("article",{ref:h,className:x,"aria-label":u,children:p})});yw.displayName="StatTile";const nWe=1,Dae=Y.forwardRef(({initial:e,swatchColor:t,title:n,meta:r,progressPercent:i,action:s,className:a},o)=>{const c=Math.min(100,Math.max(0,Math.round(i))),u=s.variant??"secondary",d=e.slice(0,nWe).toUpperCase();return l.jsxs("div",{ref:o,className:re("grid grid-cols-[40px_minmax(0,1fr)_auto] items-center gap-3.5 py-3","border-t border-border first:border-t-0 first:pt-1",a),children:[l.jsx("span",{"aria-hidden":"true","data-testid":"course-list-item-swatch",className:"flex h-10 w-10 items-center justify-center rounded-[11px] text-base font-extrabold text-white shadow-inner",style:{backgroundColor:t},children:d}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("p",{className:"flex items-center gap-2 truncate text-[13.5px] font-bold leading-snug text-foreground",children:[l.jsx("span",{className:"truncate",children:n}),l.jsxs("span",{className:"hidden text-[11px] font-medium text-muted-foreground sm:inline",children:["· ",r]})]}),l.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-muted-foreground sm:hidden",children:r}),l.jsxs("div",{className:"mt-1.5 grid grid-cols-[1fr_40px] items-center gap-2.5",children:[l.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c,"aria-label":`${n} â ${c}% complete`,className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{"data-testid":"course-list-item-progress-fill",className:"h-full rounded-full bg-gradient-to-r from-[rgb(var(--ple-secondary,255_138_61))] to-[rgb(var(--ple-primary,91_95_158))] transition-[width] duration-500",style:{width:`${c}%`}})}),l.jsxs("span",{className:"text-right text-xs font-bold text-foreground tabular-nums",children:[c,"%"]})]})]}),l.jsx("button",{type:"button",onClick:s.onClick,"aria-label":s.ariaLabel??`${s.label} ${n}`,"data-variant":u,className:re("inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-full","min-h-[36px] px-4 text-[11px] font-bold uppercase tracking-wide","transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",u==="primary"?"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95 shadow-sm":"bg-muted text-primary hover:bg-muted/80 dark:text-[var(--ple-secondary,inherit)]"),children:s.label})]})});Dae.displayName="CourseListItem";const rWe={lesson:"bg-teal-500 dark:bg-teal-400",review:"bg-red-500 dark:bg-red-400",event:"bg-purple-500 dark:bg-purple-400",practice:"bg-orange-500 dark:bg-orange-400"};function iWe(e){const t=e.trim(),n=t.match(/^(.+?)\s*(AM|PM|am|pm)$/);return n?{clock:n[1].trim(),meridiem:n[2].toUpperCase()}
1152:{clock:t,meridiem:null}}const Lae=Y.forwardRef(({time:e,kind:t,title:n,meta:r,onClick:i,ariaLabel:s,className:a},o)=>{const{clock:c,meridiem:u}=iWe(e),d=rWe[t],h=l.jsxs(l.Fragment,{children:[l.jsxs("span",{"data-testid":"agenda-item-time",className:"flex flex-col items-center justify-center text-[11px] font-bold leading-tight text-[var(--ple-primary,inherit)] dark:text-[var(--ple-secondary,inherit)]",children:[l.jsx("span",{children:c}),u&&l.jsx("span",{className:"mt-0.5 text-[9px] font-semibold text-muted-foreground",children:u})]}),l.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.jsx("span",{"aria-hidden":"true","data-testid":"agenda-item-dot","data-kind":t,className:re("h-2.5 w-2.5 shrink-0 rounded-full",d)}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate text-[13px] font-semibold leading-tight text-foreground",children:n}),l.jsx("p",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:r})]})]}),i?l.jsx(ns,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 text-muted-foreground"}):l.jsx("span",{"aria-hidden":"true",className:"w-4"})]}),f=re("grid w-full grid-cols-[64px_minmax(0,1fr)_auto] items-center gap-3 py-2.5","border-t border-border first:border-t-0 first:pt-1",a);return i?l.jsx("button",{ref:o,type:"button",onClick:i,"aria-label":s??`${e} ${t} â ${n}`,className:re(f,"min-h-[44px] text-start transition-colors","hover:bg-muted/40 focu
1152s-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card"),children:h}):l.jsx("article",{ref:o,className:f,"aria-label":s,children:h})});Lae.displayName="AgendaItem";const sWe={gold:{cell:"bg-amber-500/10 dark:bg-amber-500/15",accent:"border-t-amber-500",value:"text-amber-700 dark:text-amber-300"},purple:{cell:"bg-purple-500/10 dark:bg-purple-500/15",accent:"border-t-purple-500",value:"text-purple-700 dark:text-purple-300"},red:{cell:"bg-red-500/10 dark:bg-red-500/15",accent:"border-t-red-500",value:"text-red-700 dark:text-red-300"},teal:{cell:"bg-teal-500/10 dark:bg-teal-500/15",accent:"border-t-teal-500",value:"text-teal-700 dark:text-teal-300"},orange:{cell:"bg-orange-500/10 dark:bg-orange-500/15",accent:"border-t-orange-500",value:"text-orange-700 dark:text-orange-300"},blue:{cell:"bg-blue-500/10 dark:bg-blue-500/15",accent:"border-t-blue-500",value:"text-blue-700 dark:text-blue-300"}},Pae=({buckets:e,className:t,ariaLabel:n})=>{const r=e.length===3;return l.jsx("div",{role:"list","aria-label":n,className:re("grid gap-3",r?"grid-cols-3":"grid-cols-[repeat(auto-fit,minmax(96px,1fr))]",t),children:e.map((i,s)=>{const a=sWe[i.variant];return l.jsxs("div",{role:"listitem","data-testid":"bucket-cell","data-variant":i.variant,className:re("flex flex-col items-center justify-center gap-1 rounded-xl border-t-[3px] p-3 text-center",a.cell,a.accent),children:[l.jsx("span",{"data-testid":"bucket-cell-value",className:re("text-3xl font-extrabold leading-none tracking-tight",a.value),children:i.count}),l.jsx("span",{className:"mt-0.5 text-[10.5px] font-bold uppercase tracking-[0.08em] text-muted-foreground",children:i.label})]},`${i.label}-${s}`)})})};Pae.displayName="BucketGrid";function aWe(e){return e<1e3?String(e):e<1e4?`${(e/1e3).toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(e/1e3)}k`}const y7=({icon:e,label:t,sub:n,count:r,onClick:i,ariaLabel:s,className:a})=>{const o=aWe(r),c=l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true","data-testid":"engagement-row-icon",className:re("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-[10px]","bg-primary/10 text-primary dark:bg-primary/20 dark:text-primary-foreground","[&>svg]:h-4 [&>svg]:w-4"),children:e}),l.jsxs("div",{className:"min-w-0 text-start",children:[l.jsx("p",{className:"truncate text-[13px] font-semibold leading-tight text-foreground",children:t}),l.jsx("p",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:n})]}),l.jsx("span",{"data-testid":"engagement-row-count",className:"text-[20px] font-extrabold leading-none tracking-tight text-foreground",children:o})]}),u=re("grid w-full grid-cols-[36px_minmax(0,1fr)_auto] items-center gap-3 py-2.5","border-t border-border first:border-t-0 first:pt-1",a);return i?l.jsx("button",{type:"button",onClick:i,"aria-label":s??`${t} â ${r}`,className:re(u,"min-h-[44px] text-start transition-colors","hover:bg-muted/40 focu
1152s-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card"),children:c}):l.jsx("article",{className:u,"aria-label":s,children:c})};y7.displayName="EngagementRow";const xV=({label:e,ariaLabel:t,state:n})=>{const{optedIn:r,onChange:i,disabled:s}=n;return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:re("text-xs font-medium uppercase tracking-wide",s?"text-muted-foreground/60":"text-muted-foreground"),children:e}),l.jsx(vJ,{checked:r,onCheckedChange:i,disabled:s,"aria-label":t,"aria-disabled":s||void 0})]})},Iae=({title:e,description:t,email:n,inApp:r,badge:i,emailLabel:s="Email",inAppLabel:a="In-app",className:o})=>l.jsxs("div",{className:re("flex flex-col gap-4 rounded-2xl border border-border bg-card p-5","sm:flex-row sm:items-center sm:justify-between",o),children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e}),i&&l.jsx(Oi,{variant:"outline",className:"px-2 py-0.5 text-xs",children:i})]}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),l.jsxs("div",{className:"flex flex-row items-center gap-6 sm:shrink-0",children:[l.jsx(xV,{label:s,ariaLabel:`${e} via ${s}`,state:n}),l.jsx(xV,{label:a,ariaLabel:`${e} via ${a}`,state:r})]})]});Iae.displayName="NotificationPreferenceRow";function Fae(e){switch(e){case"COMPLETED":return"completed";case"PENDING":return"pending";case"FAILED":return"failed";case"REFUNDED":return"credit";default:return"draft"}}const Bae=({orderLabel:e,dateLabel:t,itemName:n,amountLabel:r,status:i,statusLabel:s,statusVariant:a,metaLabel:o,onViewDetails:c,onViewReceipt:u,viewDetailsLabel:d="View details",viewReceiptLabel:h="View receipt",receiptDisabled:f,className:m})=>{const p=a??Fae(i);return l.jsxs("div",{className:re("rounded-xl border border-border bg-card p-4",m),"data-testid":"order-row",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:[e," · ",t]}),l.jsx("p",{className:"mt-0.5 truncate text-sm font-medium text-foreground",children:n})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-semibold text-foreground",children:r}),l.jsx(Oi,{variant:p,size:"sm",children:s??i})]})]}),(o||c||u)&&l.jsxs("div",{className:"mt-2 flex flex-wrap items-center justify-between gap-2",children:[o?l.jsx("span",{className:"text-xs text-muted-foreground",children:o}):l.jsx("span",{}),l.jsxs("div",{className:"flex items-center gap-1",children:[u&&l.jsx(ce,{variant:"ghost",size:"sm",onClick:u,disabled:f,"aria-label":`${h} â ${e}`,children:h}),c&&l.jsx(ce,{variant:"link",size:"sm",onClick:c,"aria-label":`${d} â ${e}`,children:d})]})]})]})};Bae.displayName="OrderRow";function gd({ariaLabel:e,popoverContent:t,side:n="bottom",align:r="center",disabled:i=!1,className:s}){const a=uxe();return l.jsxs(AEe,{children:[l.jsx(MEe,{asChild:!0,disabled:i,children:l.jsx("button",{type:"button","aria-label":e,className:re("ds-touch-target","inline-flex h-6 w-6 items-center justify-center rounded-full","text-muted-foreground hover:text-foreground hover:bg-muted/60","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-muted-foreground",s),children:l.jsx(zm,{className:"h-4 w-4","aria-hidden":"true"})})}),l.jsx(REe,{container:a,children:l.jsxs(OEe,{side:n,align:r,sideOffset:6,collisionPadding:8,className:re("z-50 w-[280px] max-w-[calc(100vw-2rem)] rounded-xl border border-border/60","bg-popover text-popover-foreground shadow-xl","p-4","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","focus:outline-none"),children:[t,l.jsx(DEe,{className:"fill-popover"})]})})]})}
1152gd.displayName="CardInfoButton";function yV({label:e,body:t}){return l.jsxs("div",{className:"space-y-1",children:[l.jsx(dQ,{className:"text-muted-foreground",children:e}),l.jsx(xn,{variant:"bodySmall",className:"text-popover-foreground/90 leading-relaxed",children:t})]})}function xd({title:e,purpose:t,calculation:n,className:r}){return l.jsxs("div",{className:re("flex flex-col gap-3",r),children:[l.jsx(hp,{level:5,className:"text-popover-foreground",children:e}),l.jsx(yV,{label:"Purpose",body:t}),n?l.jsx(yV,{label:"Calculation",body:n}):null]})}xd.displayName="CardInfoPopover";function oWe(e){return e.lessons.reduce((t,n)=>t+(n.durationMinutes??0),0)}function lWe({lesson:e,stepsLabel:t,minutesLabel:n}){var a;const r=((a=e.progress)==null?void 0:a.state)??"not_started",i=r==="completed"?jl:r==="in_progress"?Ph:kxe,s=r==="completed"?"text-success":r==="in_progress"?"text-primary":"text-muted-foreground";return l.jsxs("li",{className:"flex flex-col gap-2 rounded-lg border border-border bg-card px-3 py-2 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx(i,{"aria-hidden":"true",className:re("h-4 w-4 shrink-0",s)}),l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:e.title})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[typeof e.stepCount=="number"&&e.stepCount>0&&l.jsxs("span",{children:[e.stepCount," ",t]}),typeof e.durationMinutes=="number"&&e.durationMinutes>0&&l.jsxs("span",{children:[e.durationMinutes," ",n]}),e.progress&&e.progress.state!=="not_started"&&l.jsx("span",{className:"h-1.5 w-24 overflow-hidden rounded-full bg-secondary",children:l.jsx("span",{role:"progressbar","aria-label":`${e.title} progress`,"aria-valuenow":Math.round(e.progress.percent),"aria-valuemin":0,"aria-valuemax":100,className:"block h-full bg-primary transition-[width]",style:{width:`${Math.max(0,Math.min(100,e.progress.percent))}%`}})})]})]})}function cWe({week:e,labels:t}){const{weekLabel:n,stepsLabel:r,minutesLabel:i,lessonsLabel:s}=t,a=oWe(e),o=`week-${e.weekNumber}`;return l.jsxs(CR,{value:o,className:"rounded-xl border border-border bg-card px-4",children:[l.jsx(kR,{children:l.jsxs("span",{className:"flex flex-1 flex-wrap items-baseline gap-x-2 text-left",children:[l.jsxs("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[n," ",e.weekNumber]}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.title}),l.jsxs("span",{className:"ms-auto pe-3 text-xs font-medium text-muted-foreground",children:[e.lessons.length," ",s,a>0?` · ${a} ${i}`:""]})]})}),l.jsx(_R,{children:l.jsx("ul",{className:"space-y-2",children:e.lessons.map(c=>l.jsx(lWe,{lesson:c,stepsLabel:r,minutesLabel:i},c.id))})})]})}const U9=({weeks:e,multiple:t=!1,defaultOpenWeekNumber:n,weekLabel:r="Week",stepsLabel:i="steps",minutesLabel:s="min",lessonsLabel:a="lessons",className:o})=>{if(e.length===0)return null;const c=n!==void 0?`week-${n}`:`week-${e[0].weekNumber}`,u={weekLabel:r,stepsLabel:i,minutesLabel:s,lessonsLabel:a},d=e.map(h=>l.jsx(cWe,{week:h,labels:u},`week-${h.weekNumber}`));return t?l.jsx(y4,{type:"multiple",defaultValue:[c],className:re("space-y-2",o),children:d}):l.jsx(y4,{type:"single",collapsible:!0,defaultValue:c,className:re("space-y-2",o),children:d})};U9.displayName="CurriculumAccordion";const rv=Y.forwardRef(({icon:e,label:t,htmlFor:n,description:r,error:i,info:s,children:a,fullWidthControl:o=!1,stackOnMobile:c=!0,className:u,...d},h)=>{const f=n&&i?`${n}-error`:void 0,m=l.jsx("span",{className:"text-sm font-semibold text-foreground",children:t});return l.jsxs("div",{ref:h,className:re("flex gap-3 rounded-2xl border bg-card p-4",c?"flex-col sm:flex-row sm:items-start sm:justify-between sm:gap-6":"flex-row items-start justify-between gap-6",i?"border-destructive/40":"border-border",u),...d,children:[l.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[e&&l.jsx("div",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:e}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n?l.jsx("label",{htmlFor:n,className:"cursor-pointer",children:m}):m,s&&l.jsx("span",{className:"inline-flex shrink-0 items-center",children:s})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:r}),i&&l.jsx("p",{id:f,role:"alert",className:"mt-2 text-xs font-medium text-destructive",children:i})]})]}),a&&l.jsxs("div",{className:re("flex items-stretch gap-2",c?"flex-col sm:flex-row sm:items-center":"flex-row items-center",o?"w-full sm:w-auto
1152sm:flex-1 sm:max-w-md":"sm:shrink-0"),children:[a,f&&l.jsx("span",{hidden:!0,"data-describedby":f})]})]})});rv.displayName="SettingsRow";const V9=Y.forwardRef(({title:e,description:t,action:n,actionLabel:r,onAction:i,disabled:s=!1,comingSoon:a=!1,size:o="md",className:c,children:u,...d},h)=>{const m=n??(!n&&r?l.jsx(ce,{variant:"destructive",size:o,onClick:i,disabled:s||!i&&!a,children:r}):null);return l.jsxs("div",{ref:h,className:re("rounded-2xl border-2 border-destructive/40 bg-destructive/[0.04] p-5","flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",c),...d,children:[l.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[l.jsx(lf,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive","aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0 space-y-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e}),a&&l.jsx("span",{className:"inline-flex items-center rounded-full bg-destructive/15 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-destructive",children:"Coming soon"})]}),t&&l.jsx("div",{className:"text-sm text-muted-foreground",children:t}),u]})]}),m&&l.jsx("div",{className:"flex shrink-0 items-center gap-2 sm:justify-end",children:m})]})});V9.displayName="DangerZoneCard";const zae=Y.forwardRef(({deviceLabel:e,userAgent:t,ipAddress:n,loginAtFormatted:r,isCurrent:i,currentLabel:s,action:a,unknownDeviceLabel:o="Unknown device",className:c,...u},d)=>{const h=uWe(e)?Zxe:Vxe,f=e??o;return l.jsxs("div",{ref:d,className:re("flex flex-col gap-3 rounded-2xl border border-border bg-background p-4","sm:flex-row sm:items-center sm:justify-between",c),...u,children:[l.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[l.jsx("div",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:l.jsx(h,{className:"h-4 w-4"})}),l.jsxs("div",{className:"min-w-0 space-y-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"truncate text-sm font-medium text-foreground",title:t??void 0,children:f}),i&&l.jsx(Oi,{variant:"default",className:"text-[10px] uppercase tracking-wider",children:s})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[r,n?` · ${n}`:""]})]})]}),!i&&a&&l.jsx("div",{className:"flex shrink-0 items-center gap-2 sm:justify-end",children:a})]})});zae.displayName="SecuritySessionRow";function uWe(e){return e?/(iphone|android|mobile|ipad|tablet)/i.test(e):!1}const dWe=[5,4,3,2,1];function bV(e,t){return e.replace(/\{\{(\w+)\}\}/g,(n,r)=>t[r]!==void 0?String(t[r]):"")}const H9=({average:e,total:t,breakdown:n,outOfFiveLabel:r="out of 5",totalLabel:i="{{count}} reviews",rowLabel:s="{{stars}} stars",className:a})=>{const o=Number.isFinite(e)?Math.max(0,Math.min(5,e)):0,c=Math.max(0,t),u=bV(i,{count:c});return l.jsx("section",{className:re("rounded-xl border border-border bg-card p-5 text-card-foreground",a),"aria-label":"Review summary",children:l.jsxs("div",{className:"grid items-start gap-6 sm:grid-cols-[auto_1fr]",children:[l.jsxs("div",{className:"text-center sm:text-left",children:[l.jsx("div",{className:"text-4xl font-bold leading-none text-foreground",children:o.toFixed(1)}),l.jsx("div",{className:"mt-2 flex items-center justify-center gap-0.5 sm:justify-start","aria-hidden":"true",children:[1,2,3,4,5].map(d=>{const h=d<=Math.round(o);return l.jsx(Ig,{className:re("h-4 w-4",h?"fill-warning text-warning":"text-muted-foreground")},d)})}),l.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:r}),l.jsx("div",{className:"mt-1 text-xs font-medium text-muted-foreground",children:u})]}),l.jsx("ul",{className:"space-y-2","aria-label":"Rating breakdown",children:dWe.map(d=>{const h=n[d]??0,f=c>0?Math.round(h/c*100):0,m=bV(s,{stars:d});return l.jsxs("li",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-3 text-xs",children:[l.jsx("span",{className:"font-medium text-muted-foreground",children:m}),l.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-secondary",children:l.jsx("div",{role:"progressbar","aria-label":m,"aria-valuenow":f,"aria-valuemin":0,"aria-valuemax":100,className:"h-full bg-warning transition-[width]",style:{width:`${f}%`}})}),l.jsx("span",{className:"w-10 text-right tabular-nums text-muted-foreground",children:h.toLocaleStr
1152ing()})]},d)})})]})})};H9.displayName="ReviewSummary";const Nf=["YELLOW","GREEN","BLUE","PINK"],q9={YELLOW:"#fde68a",GREEN:"#bbf7d0",BLUE:"#bfdbfe",PINK:"#fbcfe8"};function $ae({value:e,onChange:t,label:n,colorLabels:r,disabled:i=!1,className:s}){const a=b.useRef({YELLOW:null,GREEN:null,BLUE:null,PINK:null}),o=b.useCallback(u=>{var d;(d=a.current[u])==null||d.focus()},[]),c=b.useCallback((u,d)=>{if(i)return;const h=Nf.indexOf(d);let f=h;switch(u.key){case"ArrowRight":case"ArrowDown":f=(h+1)%Nf.length;break;case"ArrowLeft":case"ArrowUp":f=(h-1+Nf.length)%Nf.length;break;case"Home":f=0;break;case"End":f=Nf.length-1;break;case"Enter":case" ":u.preventDefault(),t(d);return;default:return}u.preventDefault();const m=Nf[f];t(m),o(m)},[i,t,o]);return l.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":i||void 0,className:re("inline-flex items-center gap-2",s),children:Nf.map(u=>{const d=u===e,h=r[u];return l.jsx("button",{ref:f=>{a.current[u]=f},type:"button",role:"radio","aria-checked":d,"aria-label":h,tabIndex:d?0:-1,disabled:i,onClick:()=>!i&&t(u),onKeyDown:f=>c(f,u),className:re("ds-touch-target group inline-flex items-center justify-center rounded-full","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50"),children:l.jsx("span",{"aria-hidden":"true",className:re("h-7 w-7 rounded-full border-2 transition-all",d?"border-foreground ring-2 ring-ring ring-offset-2 ring-offset-background":"border-transparent group-hover:scale-110"),style:{backgroundColor:q9[u]}})},u)})})}$ae.displayName="HighlightColorPicker";const hWe=8;function fWe(e,t){if(typeof window>"u")return{left:e.left,top:e.top};const n=window.innerWidth||0,r=e.left+e.width/2,i=t/2,s=8,a=Math.max(8,n-t-8),o=r-i,c=Math.min(Math.max(o,s),a),u=Math.max(8,e.top-hWe);return{left:c,top:u}}function Uae({selection:e,actions:t,onDismiss:n,ariaLabel:r,onAskArthur:i,askArthurLabel:s,className:a}){var f;const o=b.useRef(null);if(b.useEffect(()=>{if(!e)return;const m=x=>{x.key==="Escape"&&(x.stopPropagation(),n())},p=x=>{const v=x.target;v&&(o.current&&o.current.contains(v)||n())};return document.addEventListener("keydown",m,!0),document.addEventListener("mousedown",p,!0),()=>{document.removeEventListener("keydown",m,!0),document.removeEventListener("mousedown",p,!0)}},[e,n]),!e)return null;const c=((f=o.current)==null?void 0:f.offsetWidth)??0,{left:u,top:d}=fWe(e.rect,c),h=i?[...t,{id:"ask-arthur",label:s??"Ask Arthur",icon:l.jsx(Rn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),onClick:()=>i(e.text)}]:t;return l.jsx("div",{ref:o,role:"menu","aria-label":r,onMouseDown:m=>m.preventDefault(),className:re("fixed z-[60] flex items-center gap-1 rounded-lg border border-border bg-popover px-1 py-1 text-popover-foreground shadow-md","-translate-y-full",a),style:{left:u,top:d},children:h.map(m=>l.jsx(mWe,{action:m},m.id))})}function mWe({action:e}){return l.jsxs("button",{type:"button",role:"menuitem","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,className:re("inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium","transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50"),children:[e.icon?l.jsx("span",{"aria-hidden":"true",className:"inline-flex",children:e.icon}):null,l.jsx("span",{children:e.label})]})}Uae.displayName="SelectionActionTooltip";function Vae({tabs:e,activeTab:t,onTabChange:n,children:r,scrollable:i=!0,className:s,"aria-label":a}){const o=e.map(c=>({value:c.id,label:c.label,badge:c.badge,disabled:c.disabled}));return l.jsx("div",{"data-testid":"tabbed-chat-history",className:re("flex min-h-0 flex-1 flex-col",s),children:l.jsx(oTe,{items:o,value:t,onValueChange:n,"aria-label":a,className:"flex min-h-0 flex-1 flex-col",children:l.jsx(lTe,{value:t,className:re("mt-0 flex min-h-0 flex-1 flex-col",i?"overflow-y-auto":"overflow-hidden"),children:r})})})}Vae.displayName="TabbedChatHistory";var bw=e=>e.type==="checkbox",P3=e=>e.type==="file",gh=e=>e instanceof Date,Yi=e=>e==null;const G9=e=>typeof e=="object";var Hr=e=>!Yi(e)&&!Array.isArray(e)&&G9(e)&&!gh(e),b7=e=>Hr(e)&&e.target?bw(e.target)?e.target.checked:P3(e.target)?e.target.files:e.target.value:e;const pWe=/[.[\]'"]/;var Ym=e=>
1152e.split(pWe).filter(Boolean);function gWe(e,t){const n=Ym(t);let r=e._formValues,i=e._defaultValues;for(let s=0;s<n.length-1;s++){const a=n[s];if(r=r==null?r:r[a],i=i==null?i:i[a],r===null||i===null)return null}}var Hae=(e,t)=>t.split(".").some((n,r,i)=>!isNaN(Number(n))&&e.has(i.slice(0,r).join("."))),I3=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function br(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const t=typeof Blob<"u"&&e instanceof Blob,n=typeof FileList<"u"&&e instanceof FileList;if(I3&&(t||n))return e;const r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=br(e[s]));return i}const Kd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Lo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},qi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},xWe=[qi.required,qi.min,qi.max,qi.minLength,qi.maxLength,qi.pattern,qi.validate],w1="form",qae="root",W9=["__proto__","constructor","prototype"],yWe=/^\w*$/;var nx=e=>yWe.test(e),$n=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Hr(e))return n;const r=nx(t)?[t]:Ym(t);if(r.some(s=>W9.includes(s)))return n;const i=r.reduce((s,a)=>Yi(s)?void 0:s[a],e);return $n(i)||i===e?$n(e[t])?n:e[t]:i},ga=e=>typeof e=="boolean",as=e=>typeof e=="function",zn=(e,t,n)=>{let r=-1;const i=nx(t)?[t]:Ym(t),s=i.length,a=s-1;for(;++r<s;){const o=i[r];let c=n;if(r!==a){const u=e[o];c=Hr(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(W9.includes(o))return;e[o]=c,e=e[o]}};const Y9=Y.createContext(null);Y9.displayName="HookFormControlContext";const K9=()=>Y.useContext(Y9);var Gae=(e,t,n,r=!0)=>{const i={};for(const s in e)Object.defineProperty(i,s,{get:()=>{const a=s;return t._proxyFormState[a]!==Lo.all&&(t._proxyFormState[a]=!r||Lo.all),n&&(n[a]=!0),e[a]}});return i};const X9=I3?Y.useLayoutEffect:Y.useEffect;var bWe=e=>{const t=e.constructor&&e.constructor.prototype;return Hr(t)&&t.hasOwnProperty("isPrototypeOf")},v7=e=>Yi(e)||!G9(e);const vV=(e,t)=>t.length===0&&!Array.isArray(e)&&!bWe(e);function xa(e,t,n=new WeakMap){if(e===t)return!0;if(v7(e)||v7(t))return Object.is(e,t);if(gh(e)&&gh(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(vV(e,r)||vV(t,i))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const s=n.get(e);if(s&&s.has(t))return!0;if(s)s.add(t);else{const a=new WeakSet;a.add(t),n.set(e,a)}for(const a of r){const o=e[a];if(!(a in t))return!1;if(a!=="ref"){const c=t[a];if(gh(o)&&gh(c)||(Hr(o)||Array.isArray(o))&&(Hr(c)||Array.isArray(c))?!xa(o,c,n):!Object.is(o,c
vendor: 4,976 bytes, line 1152
1152))return!1}}return!0}function Q9(e){const t=Y.useRef(!1),n=Y.useRef(!1),r=Y.useRef(void 0),i=Y.useRef(0);i.current++,!n.current&&e&&(n.current=!0,r.current=br(e()));const s=Y.useCallback((o,c,u)=>{if(o&&(t.current||n.current&&i.current>1)){const d=c();xa(r.current,d)||u(d)}t.current=!0},[]),a=Y.useCallback((o,c)=>{o&&(r.current=br(c()))},[]);return{resyncIfNeeded:s,snapshot:a}}function vWe(e){const t=K9(),{control:n=t,disabled:r,name:i,exact:s}=e||{},a=()=>({...n._formState,defaultValues:n._defaultValues}),[o,c]=Y.useState(a),u=Y.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:d,snapshot:h}=Q9(a);return X9(()=>{d(!r,a,c);const f=n._subscribe({name:i,formState:u.current,exact:s,callback:m=>{!r&&c({...n._formState,...m,defaultValues:n._defaultValues})}});return()=>{f(),h(!r,a)}},[n,i,r,s,d,h]),Y.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),Y.useMemo(()=>Gae(o,n,u.current,!1),[o,n])}var Xi=e=>typeof e=="string",w7=(e,t,n,r,i)=>Xi(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Xe(n,s,Xe(i,s)))):(r&&(t.watchAll=!0),n);function wWe(e){const t=K9(),{control:n=t,name:r,defaultValue:i,disabled:s,exact:a,compute:o}=e||{},c=Y.useRef(i),u=Y.useRef(o),d=Y.useRef(n),h=Y.useRef(r);u.current=o;const f=()=>{const A=n._getWatch(r,c.current);return u.current?u.current(A):A},[m,p]=Y.useState(f),x=Y.useRef(m),v=Y.useCallback(A=>{const j=w7(r,n._names,A||n._formValues,!1,c.current);return u.current?u.current(j):j},[n._formValues,n._names,r]),g=Y.useCallback(A=>{if(!s){const j=w7(r,n._names,A||n._formValues,!1,c.current);if(u.current){const D=u.current(j);xa(D,x.current)||(p(D),x.current=D)}else p(j)}},[n._formValues,n._names,s,r]),{resyncIfNeeded:y,snapshot:w}=Q9(f),S=Y.useRef(g);S.current=g;const C=Y.useRef(v);C.current=v,X9(()=>{d.current!==n||!xa(h.current,r)?(d.current=n,h.current=r,S.current()):y(!s,()=>C.current(),j=>{p(j),x.current=j});const A=n._subscribe({name:r,formState:{values:!0},exact:a,callback:j=>{S.current(j.values)}});return()=>{A(),w(!s,()=>C.current())}},[n,a,r,s,y,w]),Y.useEffect(()=>n._removeUnmounted());const k=d.current!==n,_=h.current;return Y.useMemo(()=>{if(s)return!1;const A=!k&&!xa(_,r);return k||A},[s,k,r,_])?v():m}function SWe(e){const t=K9(),{name:n,disabled:r,control:i=t,shouldUnregister:s,defaultValue:a,exact:o=!0}=e,c=Hae(i._names.array,n),u=Y.useMemo(()=>{const S=Xe(i._formValues,n,Xe(i._defaultValues,n,a));return $n(S)?gWe(i,n):S},[i,n,a]),d=wWe({control:i,name:n,defaultValue:u,exact:o}),h=vWe({control:i,name:n,exact:o}),f=Y.useRef(e),m=Y.useRef(null),p=Y.useRef(i.register(n,{...e.rules,value:d,...ga(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const x=Y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(h.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(h.errors,n)}}),[h,n]),v=Y.useCallback(S=>{const C=b7(S);return Xe(i._fields,n)||(p.current=i.register(n,{...f.current.rules,value:C})),p.current.onChange({target:{value:b7(S),name:n},type:Kd.CHANGE})},[n,i]),g=Y.useCallback(()=>p.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:Kd.BLUR}),[n,i._formValues]),y=Y.useCallback(S=>{S&&(m.current={focus:()=>as(S.focus)&&S.focus(),select:()=>as(S.select)&&S.select(),setCustomValidity:k=>as(S.setCustomValidity)&&S.setCustomValidity(k),reportValidity:()=>as(S.reportValidity)&&S.reportValidity()});const C=Xe(i._fields,n);C&&C._f&&S&&(C._f.ref=m.current,C._f._c=!0)},[i._fields,n]),w=Y.useMemo(()=>({name:n,value:d,...ga(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:v,onBlur:g,ref:y}),[n,r,h.disabled,v,g,y,d]);return Y.useEffect(()=>{const S=i._options.shouldUnregister||s;p.current=i.register(n,{...f.current.rules,...ga(f.current.disabled)?{disabled:f.current.disabled}:{}});const C=(k,_)=>{const E=Xe(i._fields,k);E&&E._f&&(E._f.mount=_,E._f._c=_)};if(C(n,!0),S){const k=br(Xe(s?i._defaultValues:i._options.values||i._defaultValues,n,Xe(i._options.defaultValues,n,f.current.defaultValue)));zn(i._defaultValues,n,k),$n(Xe(i._formValues,n))&&zn(i._formValues,n,k)}if(!c&&i.register(n,{...f.current.rules,...ga(f.current.disabled)?{disabled:f.current.disabled}:{}}),m.current){const k=Xe(i._fields,n);k&&k._f&&(k._f.ref=m.current)}return()=>{(c?S&&!i._state.action:S)?i.unregister(n):C(n,!1)}},[n,i,c,s]),Y.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),Y.useMemo(()=>({field:w,formState:h,fieldState:x}),[w,h,x])}const S7=e=>e.render(SWe(e));var z2=e=>({isOnSubmit:!e||e===Lo.onSubmit,isOnBlur:e===Lo.onBlur,isOnChange:e===Lo.onChange,isOnAll:e===Lo.all,isOnTouch:e===Lo.onTouched}),IE=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const r of t.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1};
1152const ab=(e,t,n)=>{for(const r of n||Object.keys(e)){if(r==="_f")continue;const i=n?Xe(e,r):e[r];if(i){const{_f:s}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],s.name))return!0;if(s.ref&&t(s.ref,s.name))return!0;if(ab(i,t))return!0}else if((Hr(i)||Array.isArray(i))&&ab(i,t))return!0}}};var wV=(e,t,n)=>{const r=Xe(e,n),i=Array.isArray(r)?r:[];return zn(i,qae,t[n]),zn(e,n,i),e},ri=e=>Hr(e)&&!Object.keys(e).length,u5=e=>{if(!I3)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Z9=e=>e.type==="radio",d5=e=>e instanceof RegExp,Wae=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{};const SV={value:!1,isValid:!1},CV={value:!0,isValid:!0};var Yae=e=>{if(!Array.isArray(e))return SV;if(e.length>1){const n=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:n,isValid:!!n.length}}const t=e[0];return!t||!t.checked||t.disabled?SV:!t.attributes||!("value"in t.attributes)||$n(t.value)||t.value===""?CV:{value:t.value,isValid:!0}};const kV={isValid:!1,value:null};var Kae=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,kV):kV;function _V(e,t,n="validate"){if(Xi(e)||Array.isArray(e)&&e.every(Xi)||ga(e)&&!e)return{type:n,message:Xi(e)?e:"",ref:t}}var $p=e=>Hr(e)&&!d5(e)?e:{value:e,message:""},TV=async(e,t,n,r,i,s)=>{const{ref:a,refs:o,required:c,maxLength:u,minLength:d,min:h,max:f,pattern:m,validate:p,name:x,valueAsNumber:v,mount:g,_c:y}=e._f,w=Xe(n,x);if(!g||t.has(x))return{};const S=o?o[0]:a,C=B=>{if(i&&S.reportValidity){const z=ga(B)?"":B||"";o?o.forEach(O=>as(O.setCustomValidity)&&O.setCustomValidity(z)):S.setCustomValidity(z),S.reportValidity()}},k={},_=Z9(a),E=bw(a),A=_||E,j=(v||P3(a))&&$n(a.value)&&$n(w)||u5(a)&&a.value===""&&!y||w===""||Array.isArray(w)&&!w.length,D=Wae.bind(null,x,r,k),M=(B,z,O,P=qi.maxLength,I=qi.minLength)=>{const q=B?z:O;k[x]={type:B?P:I,message:q,ref:a,...D(B?P:I,q)}};if(s?!Array.isArray(w)||!w.length:c&&(!A&&(j||Yi(w))||ga(w)&&!w||E&&!Yae(o).isValid||_&&!Kae(o).isValid)){const{value:B,message:z}=Xi(c)?{value:!!c,message:c}:$p(c);if(B&&(k[x]={type:qi.required,message:z,ref:S,...D(qi.required,z)},!r))return C(z),k}if(!j&&(!Yi(h)||!Yi(f))){let B,z;const O=$p(f),P=$p(h);if(!Yi(w)&&!gh(w)&&!isNaN(w)){const I=a.valueAsNumber||w&&+w;Yi(O.value)||(B=I>O.value),Yi(P.value)||(z=I<P.value)}else{const I=a.valueAsDate||new Date(w),q=me=>new Date(new Date().toDateString()+" "+me),R=a.type=="time",xe=a.type=="week";Xi(O.value)&&w&&(B=R?q(w)>q(O.value):xe?w>O.value:I>new Date(O.value)),Xi(P.value)&&w&&(z=R?q(w)<q(P.value):xe?w<P.value:I<new Date(P.value))}if((B||z)&&(M(!!B,O.message,P.message,qi.max,qi.min),!r))return C(k[x].message),k}if((u||d)&&!j&&(Xi(w)||s&&Array.isArray(w))){const B=$p(u),z=$p(d),O=!Yi(B.value)&&w.length>+B.value,P=!Yi(z.value)&&w.length<+z.value;if((O||P)&&(M(O,B.message,z.message),!r))return C(k[x].message),k}if(m&&!j&&Xi(w)){const{value:B,message:z}=$p(m);if(d5(B)&&!w.match(B)&&(k[x]={type:qi.pattern,message:z,ref:a,...D(qi.pattern,z)},!r))return C(z),k}if(p){if(as(p)){const B=await p(w,n),z=_V(B,S);if(z&&(k[x]={...z,...D(qi.validate,z.message)},!r))return C(z.message),k}else if(Hr(p)){let B={};for(const z in p){if(!ri(B)&&!r)break;const O=_V(await p[z](w,n),S,z);O&&(B={...O,...D(z,O.message)},r||C(O.message),r&&(k[x]=B))}if(!ri(B)&&(k[x]={ref:S,...B},!r))return k}}const $=k[x];return C($?$.message:!0),k},bC=e=>Array.isArray(e)?e:[e],Xae=e=>Array.isArray(e)?e.filter(Boolean):[];function CWe(e,t){const n=t.length-1;let r=0;for(;r<n;){if(Yi(e)){e=void 0;break}e=e[t[r]],r++}return e}function kWe(e){for(const t in e)if(e.hasOwnProperty(t)&&!$n(e[t]))return!1;return!0}function Zr(e,t){if(Xi(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:nx(t)?[t]:Ym(t);if(n.some(a=>W9.includes(String(a))))return e;const r=n.length===1?e:CWe(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(Hr(r)&&ri(r)||Array.isArray(r)&&kWe(r))&&Zr(e,n.slice(0,-1)),e}const J9=Y.createContext(null);J9.displayName="HookFormContext";const _We=()=>Y.useContext(J9),F3=({children:e,watch:t,getValues:n,getErrors:r,getFieldState:i,setError:s,clearErrors:a,setValue:o,setValues:c,trigger:u,formState:d,resetField:h,reset:f,resetDefaultValues:m,handleSubmit:p,unregister:x,control:v,register:g,setFocus:y,subscribe:w})=>{const S=Y.useMemo(()=>({watch:t,getValues:n,getErrors:r,getFieldState:i,setError:s,clearErrors:a,setValue:o,setValues:c,trigger:u,formState:d,resetField:h,reset:f,resetDefaultValues:m,handleSubmit:p,unregister:x,control:v,register:g,setFocus:y,subscribe:w}),[a,v,d,r,i,n,p,g,f,m,h,s,y,o,c,w,u,x,t]);return Y.createElement(J9.Provider,{value:S},Y.createElement(Y9.Provider,{value:S.control},e))};var EV=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}};function Qae(e,t){const n=Array.isArray(e)?[]:{};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];
1152i&&(Hr(i)||Array.isArray(i))&&s?n[r]=Qae(i,s):e[r]&&(n[r]=s)}return n}const jV=(e,t)=>e!==null&&G9(e)&&Object.prototype.hasOwnProperty.call(e,t);var TWe=(e,t)=>{if(!t)return!1;let n=e;for(const r of nx(t)?[t]:Ym(t)){if(!jV(n,r))return jV(e,t);n=n[r]}return!0},Zae=e=>e.type==="select-multiple",EWe=e=>Z9(e)||bw(e),FE=e=>u5(e)&&e.isConnected;function NV(e){return Array.isArray(e)||Hr(e)}function Jae(e,t,n="",r=[]){for(const i in e){const s=n?`${n}.${i}`:i,a=e[i];NV(a)&&NV(Xe(t,s))?Jae(a,t,s,r):r.push(s)}return r}var jWe=e=>{for(const t in e)if(as(e[t]))return!0;return!1};function eoe(e){return Array.isArray(e)||Hr(e)&&!jWe(e)}function toe(e){return!!(e&&"_f"in e)}function noe(e){return Array.isArray(e)?!e.some(t=>!$n(t)):!Object.keys(e).length}function C7(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function k7(e,t={},n){for(const r in e){const i=e[r],s=n&&n[r];eoe(i)&&(!Array.isArray(i)||!toe(s))?(t[r]=Array.isArray(i)?[]:{},k7(i,t[r],s),noe(t[r])&&C7(t,r)):$n(i)||(t[r]=!0)}return t}function Ud(e,t,n,r){n||(n=k7(t,{},r));for(const i in e){const s=e[i],a=r&&r[i];eoe(s)&&(!Array.isArray(s)||!toe(a))?($n(t)||v7(n[i])?n[i]=k7(s,Array.isArray(s)?[]:{},a):Ud(s,Yi(t)?{}:t[i],n[i],a),noe(n[i])&&C7(n,i)):xa(s,t[i])?C7(n,i):n[i]=!0}return n}var NWe=(e,t)=>{const n=t.split("."),r=[];let i=n[0];for(let s=1;s<n.length;i+="."+n[s++])!isNaN(+n[s])&&e.has(i)&&r.push(`${i}.${n[s]}`);return r},_7=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>$n(e)?e:t?e===""?NaN:e&&+e:n&&Xi(e)?new Date(e):r?r(e):e;function AV(e){const t=e.ref;return P3(t)?t.files:Z9(t)?Kae(e.refs).value:Zae(t)?[...t.selectedOptions].map(({value:n})=>n):bw(t)?Yae(e.refs).value:_7(t.value,e)}var AWe=(e,t,n,r)=>{const i={};for(const s of e){const a=Xe(t,s);a&&zn(i,s,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fy=e=>$n(e)?e:d5(e)?e.source:Hr(e)?d5(e.value)?e.value.source:e.value:e;const MV="AsyncFunction";var MWe=e=>{if(!e||!e.validate)return!1;if(as(e.validate))return e.validate.constructor.name===MV;if(Hr(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===MV)return!0}return!1},RWe=e=>e.mount&&(e.required||!$n(e.required)&&e.required!==!1||!$n(e.min)||!$n(e.max)||!$n(e.maxLength)||!$n(e.minLength)||e.pattern||e.validate);function RV(e,t,n){const r=Xe(e,n);if(r!=null&&r.type||r!=null&&r.message||Array.isArray(r))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),a=Xe(t,s),o=Xe(e,s);if(a&&!Array.isArray(a)&&n!==s)return{name:n};if(o&&o.type)return{name:s,error:o};if(o&&o.root&&o.root.type)return{name:`${s}.root`,error:o.root};i.pop()}return{name:n}}var OWe=(e,t,n,r)=>{n(e);const i=Object.keys(e).filter(s=>s!=="name");return!i.length||r&&i.length>=Object.keys(t).length||i.find(s=>t[s]===(!r||Lo.all))},DWe=(e,t,n)=>!e||!t||e===t||bC(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),LWe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,PWe=(e,t)=>{const n=Xe(e,t);!Xae(n).length&&!(n!=null&&n.root)&&Zr(e,t)};const IWe={mode:Lo.onSubmit,reValidateMode:Lo.onChange,shouldFocusError:!0},FWe=(e,t)=>{for(const n in e)n in t||delete e[n];Object.assign(e,t)},roe={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function BWe(e={}){let t={...IWe,...e},n={...br(roe),isLoading:as(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},i=Hr(t.defaultValues)||Hr(t.values)?br(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:br(i),a={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const c={},u={};let d=0,h=z2(t.mode),f=z2(t.reValidateMode);const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let x={...p};const v=(...V)=>V.some(te=>p[te]||x[te]),g={array:EV(),state:EV()};let y=0,w=0,S=t.criteriaMode===Lo.all;const C=(V,te)=>W=>{clearTimeout(u[V]),u[V]=setTimeout(te,W)},k=V=>{clearTimeout(u[V]),delete u[V],delete c[V]},_=V=>{k(V);const te=`${V}.`;for(const W of Object.keys(c))W.startsWith(te)&&k(W)},E=async V=>{if(!a.keepIsValid&&!t.disabled&&(v("isValid")||V)){const te=++y;let W;t.resolver?(W=ri((await q()).errors),te===y&&A()):W=await me({fields:r,onlyCheckValid:!0,eventType:Kd.VALID}),te===y&&W!==n.isValid&&g.state.next({isValid:W})}},A=(V,te)=>{!t.disabled&&v("isValidating","validatingFields")&&((V||o.mount).forEach(W=>{W&&(te?zn(n.validatingFields,W,te):Zr(n.validatingFields,W))}),g.state.next({validatingFields:n.validatingFields,isValidating:!ri(n.validatingFields)}))},j=()=>{n.dirtyFields=Ud(i,s,void 0,r)}
1152,D=(V,te=[],W,ye,fe=!0,Ne=!0)=>{if(ye&&W&&!t.disabled){a.action=!0;const ke=Xe(r,V);if(a.actionArrayLengths.has(V)||a.actionArrayLengths.set(V,Array.isArray(ke)?ke.length:0),Ne&&Array.isArray(ke)){const Ft=W(ke,ye.argA,ye.argB);fe&&zn(r,V,Ft)}const ze=Xe(n.errors,V);if(Ne&&Array.isArray(ze)){const Ft=ze.root,Dn=W(ze,ye.argA,ye.argB)||ze;Ft&&(Dn.root=Ft),fe&&zn(n.errors,V,Dn),PWe(n.errors,V)}const et=Xe(n.touchedFields,V),Fe=Ne&&Array.isArray(et);if(Fe){const Ft=W(et,ye.argA,ye.argB);fe&&zn(n.touchedFields,V,Ft)}const Lt=Xe(n.dirtyFields,V);if(Ne&&Array.isArray(Lt)){const Ft=W(Lt,ye.argA,ye.argB)||Lt;fe&&zn(n.dirtyFields,V,Ft)}v("dirtyFields")&&j(),g.state.next({name:V,isDirty:ae(V,te),dirtyFields:n.dirtyFields,...Fe&&{touchedFields:n.touchedFields},errors:n.errors,isValid:n.isValid})}else zn(s,V,te)},M=(V,te)=>{zn(n.errors,V,te),n.errors={...n.errors},g.state.next({errors:n.errors})},$=V=>{Object.keys(c).forEach(k);const te=!ri(V);n.errors=V,g.state.next({errors:n.errors,...te?{isValid:!1}:{}}),!te&&a.mount&&E()},B=V=>{const te=nx(V)?[V]:Ym(V);let W=s,ye=i;for(let fe=0;fe<te.length-1;fe++){const Ne=te[fe];if(W=Yi(W)?W:W[Ne],ye=Yi(ye)?ye:ye[Ne],W===null&&ye!==null)return!0}return!1},z=V=>{if(!a.actionArrayLengths.size)return!1;const te=nx(V)?[V]:Ym(V);let W=s,ye="",fe=-1,Ne=0;for(let ke=0;ke<te.length;ke++){if(Yi(W))return!1;const ze=te[ke];if(ye=ye?`${ye}.${ze}`:ze,Array.isArray(W)&&+ze>=W.length)return fe===-1?!1:ke===fe?+ze<Ne:!0;
1152if(a.actionArrayLengths.has(ye)&&(fe=ke+1,Ne=a.actionArrayLengths.get(ye)),W=W[ze],$n(W)&&fe!==-1&&ke>fe&&+te[fe]<Ne)return!0}return!1},O=(V,te,W,ye)=>{const fe=Xe(r,V);if(fe){if(B(V)||z(V))return;const Ne=$n(Xe(s,V)),ke=Xe(s,V,$n(W)?Xe(i,V):W);$n(ke)||ye&&ye.defaultChecked||te?zn(s,V,te?ke:AV(fe._f)):ve(V,ke),a.mount&&!a.action&&(t.resolver&&v("isValidating","validatingFields")?Promise.resolve().then(()=>E()):E(),Ne&&n.isDirty&&v("isDirty")&&(ae()||(n.isDirty=!1,g.state.next({...n}))),e.shouldUnregister&&Ne&&!$n(Xe(s,V))&&IE(V,o)&&(a.watch=!0))}},P=(V,te,W,ye,fe)=>{let Ne=!1,ke=!1;const ze={name:V};if(!t.disabled||ye===!0){if(!W||ye){const et=xa(Xe(i,V),te);v("isDirty")&&(ke=n.isDirty,n.isDirty=ze.isDirty=!et||ae(),Ne=ke!==ze.isDirty),ke=!!Xe(n.dirtyFields,V),et!==n.isDirty?FWe(n.dirtyFields,Ud(i,s,void 0,r)):et?Zr(n.dirtyFields,V):zn(n.dirtyFields,V,!0),ze.dirtyFields=n.dirtyFields,Ne=Ne||v("dirtyFields")&&ke!==!et}if(W){const et=Xe(n.touchedFields,V);et||(zn(n.touchedFields,V,W),ze.touchedFields=n.touchedFields,Ne=Ne||v("touchedFields")&&et!==W)}Ne&&fe&&g.state.next(ze)}return Ne?ze:{}},I=(V,te,W,ye)=>{const fe=Xe(n.errors,V),Ne=v("isValid")&&ga(te)&&n.isValid!==te;if(t.delayError&&W?(c[V]=C(V,()=>M(V,W)),c[V](t.delayError)):(k(V),W?zn(n.errors,V,W):Zr(n.errors,V),n.errors={...n.errors}),(W?!xa(fe,W):fe)||!ri(ye)||Ne){const ke={...ye,...Ne&&ga(te)?{isValid:te}:{},errors:n.errors,name:V};g.state.next(ke)}},q=async V=>(A(V,!0),await t.resolver(s,t.context,AWe(V||o.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),R=async V=>{const te=w,{errors:W}=await q(V);if(te!==w)return W;if(A(V),V){for(const ye of V){const fe=Xe(W,ye);_(ye);const Ne=o.array.has(ye)&&Hr(fe)&&!Object.keys(fe).some(et=>!Number.isNaN(Number(et))),ke=Xe(r,ye),ze=Hr(ke)&&Object.keys(ke).some(et=>et!=="_f");Ne?wV(n.errors,{[ye]:fe},ye):fe!=null&&fe.type||fe!=null&&fe.message||Array.isArray(fe)||Hr(fe)&&ze?zn(n.errors,ye,fe):Zr(n.errors,ye)}n.errors={...n.errors}}else Object.keys(c).forEach(k),n.errors=W;return W},xe=async({name:V,eventType:te})=>{if(t.validate){const W=w,ye=await t.validate({formValues:s,formState:n,name:V,eventType:te});if(W!==w)return!0;if(Hr(ye)){let fe=!0;Pe(w1);for(const Ne in ye){const ke=ye[Ne];ke&&(fe=!1,ct(`${w1}.${Ne}`,{message:Xi(ke.message)?ke.message:"",type:ke.type||qi.validate}))}return fe}else return Xi(ye)||!ye?(ct(w1,{message:ye||"",type:qi.validate}),!1):(Pe(w1),!0)}return!0},me=async({fields:V,onlyCheckValid:te,name:W,eventType:ye,context:fe={valid:!0,runRootValidation:!1}})=>{const Ne=w;if(t.validate&&!fe.runRootValidation&&(fe.runRootValidation=!0,!await xe({name:W,eventType:ye})&&(fe.valid=!1,te)))return fe.valid;for(const ke in V){const ze=V[ke];if(ze){const{_f:et,...Fe}=ze;if(et){const Lt=o.array.has(et.name),Ft=ze._f&&MWe(ze._f),Dn=v("isValidating","validatingFields");Ft&&Dn&&A([et.name],!0);const Xn=await TV(ze,o.disabled,s,S,t.shouldUseNativeValidation&&!te,Lt);if(Ne!==w)return fe.valid;if(Ft&&Dn&&A([et.name]),Xn[et.name]&&(fe.valid=!1,te)||(te||(k(et.name),Xe(Xn,et.name)?Lt?wV(n.errors,Xn,et.name):zn(n.errors,et.name,Xn[et.name]):Zr(n.errors,et.name)),e.shouldUseNativeValidation&&Xn[et.name]))break}!ri(Fe)&&await me({context:fe,onlyCheckValid:te,fields:Fe,name:ke,eventType:ye})}}return fe.valid},U=()=>{for(const V of o.unMount){const te=Xe(r,V);te&&(te._f.refs?te._f.refs.every(W=>!FE(W)):!FE(te._f.ref))&&Bn(V)}o.unMount=new Set},ae=(V,te)=>(V&&te&&zn(s,V,te),!xa(a.mount?s:i,i)),Ce=(V,te,W)=>w7(V,o,{...a.mount?s:$n(te)||Xi(V)?i:te},W,te),je=V=>Xae(Xe(a.mount?s:i,V,t.shouldUnregister?Xe(i,V,[]):[])),ve=(V,te,W={},ye=!1,fe=!1,Ne=!1)=>{const ke=Xe(r,V);let ze=te;if(ke){const et=ke._f;et&&(!et.disabled&&zn(s,V,_7(te,et)),ze=u5(et.ref)&&Yi(te)?"":te,Zae(et.ref)?[...et.ref.options].forEach(Fe=>Fe.selected=ze.includes(Fe.value)):et.refs?bw(et.ref)?et.refs.forEach(Fe=>{(!Fe.defaultChecked||!Fe.disabled)&&(Array.isArray(ze)?Fe.checked=!!ze.find(Lt=>Lt===Fe.value):Fe.checked=ze===Fe.value||!!ze)}):et.refs.forEach(Fe=>Fe.checked=Fe.value===ze):P3(et.ref)?et.ref.value="":(et.ref.value=ze,!et.ref.type&&!fe&&!Ne&&g.state.next({name:V,values:ye?s:br(s)})))}(W.shouldDirty||W.shouldTouch)&&P(V,ke&&ke._f&&!ke._f.disabled&&(ke._f.valueAsNumber||ke._f.valueAsDate||ke._f.setValueAs)?_7(te,ke._f):ze,W.shouldTouch,W.shouldDirty,!fe),W.shouldValidate&&Je(V,{delayError:W.delayError}),W.shouldValidate&&ke&&ke._f&&ke._f.deps&&(!Array.isArray(ke._f.deps)||ke._f.deps.length>0)&&Je(ke._f.deps)},Te=(V,te,W,ye=!1,fe=!1,Ne=!1)=>{o.array.has(V)&&g.array.next({name:V,values:ye?s:br(s)});for(const ke in te){if(!te.hasOwnProperty(ke))continue;const ze=te[ke],et=V+"."+ke,Fe=Xe(r,et);(o.array.has(V)||Hr(ze)||Fe&&!Fe._f)&&!gh(ze)?Te(et,ze,W,ye,fe,Ne):ve(et,ze,W,ye,fe,Ne)}},Se=(V,te,W,ye,fe=!1)=>{const Ne=Xe(r,V),ke=o.array.has(V),ze=ye?te:br(te),et=Xe(s,V),Fe=xa(et,ze);if(Fe||zn(s,V,ze),ke)g.array.next({name:V,values:ye?s:br(s)}),v("isDirty","dirtyFields")&&W.shouldDirty&&(j(),fe||g.state.next({name:V,dirtyFields:n.dirtyFields,isDirty:ae(V,ze)})),W.shouldValidate&&Je(V,{delayError:W.delayError});else{const Lt=Array.isArray(ze)&&!ze.length||ri(ze),Ft=!Fe&&!fe;!Ne||Ne._f||Yi(ze)||Lt?ve(V,ze,W,ye,fe,Ft):Te(V,ze,W,ye,fe,Ft)}if(!Fe&&!fe){const Lt=IE(V,o),Ft=ye?s:br(s);if(g.state.next({...Lt&&n,name:a.mount||Lt?V:void 0,values:Ft}),!ke)for(const Dn of NWe(o.array,V))g.state.next({name:Dn,values:Ft})}},He=(V,te,W={})=>Se(V,te,W,!1),tt=(V,te={})=>{const W=as(V)?V(s):V;if(!xa(s,W)){s={...s,...W};for(const ye of o.mount)TWe(W,ye)&&Se(ye,Xe(W,ye),te,!0,!0);g.state.next({...n,name:void 0,type:void 0,...d?{values:s}:{}}),te.shouldValidate&&E()}},we=async V=>{a.mount=!0;const te=V.target;let W=te.name,ye=!0;const fe=Xe(r,W),Ne=ke=>{ye=Number.isNaN(ke)||gh(ke)&&isNaN(ke.getTime())||xa(ke,Xe(s,W,ke))};if(fe){let ke,ze;
1152const et=te.type?AV(fe._f):b7(V),Fe=V.type===Kd.BLUR||V.type===Kd.FOCUS_OUT,Lt=!RWe(fe._f)&&!t.validate&&!t.resolver&&!Xe(n.errors,W)&&!fe._f.deps,Ft=Lt||LWe(Fe,Xe(n.touchedFields,W),n.isSubmitted,f,h),Dn=IE(W,o,Fe);if(zn(s,W,br(et)),Fe){if(!te||!te.readOnly){fe._f.onBlur&&fe._f.onBlur(V);const oe=c[W];oe&&oe(0)}}else fe._f.onChange&&fe._f.onChange(V);const Xn=P(W,et,Fe),Z=!ri(Xn)||Dn;if(!Fe&&g.state.next({name:W,type:V.type,...d?{values:br(s)}:{}}),Ft)return(!Lt||!n.isValid)&&v("isValid")&&(t.mode==="onBlur"?Fe&&E():Fe||E()),Z&&g.state.next({name:W,...Dn?{}:Xn});if(!t.resolver&&t.validate&&await xe({name:W,eventType:V.type}),!Fe&&Dn&&g.state.next({...n}),t.resolver){const oe=w,{errors:pe}=await q([W]);if(oe!==w)return;if(A([W]),Ne(et),!ye){!ri(Xn)&&g.state.next(Xn);return}const Le=RV(n.errors,r,W),qe=RV(pe,r,Le.name||W);ke=qe.error,W=qe.name,ze=ri(pe)}else{const oe=w;if(A([W],!0),ke=(await TV(fe,o.disabled,s,S,t.shouldUseNativeValidation))[W],oe!==w)return;if(A([W]),Ne(et),ye){if(ke)ze=!1;else if(v("isValid")&&(ze=await me({fields:r,onlyCheckValid:!0,name:W,eventType:V.type}),oe!==w))return}}ye&&(fe._f.deps&&(!Array.isArray(fe._f.deps)||fe._f.deps.length>0)&&Je(fe._f.deps),I(W,ze,ke,Xn))}},Oe=(V,te)=>{if(Xe(n.errors,te)&&V.focus)return V.focus(),1},Je=async(V,te={})=>{let W,ye;const fe=bC(V);if(t.resolver){const Ne=w,ke=await R($n(V)?V:fe);if(W=ri(ke),ye=V?!fe.some(ze=>Xe(ke,ze)):W,Ne!==w)return ye}else V?(ye=(await Promise.all(fe.map(async Ne=>{const ke=Xe(r,Ne);return await me({fields:ke&&ke._f?{[Ne]:ke}:ke,eventType:Kd.TRIGGER})}))).every(Boolean),!(!ye&&!n.isValid)&&E()):ye=W=await me({fields:r,name:V,eventType:Kd.TRIGGER});if(te.delayError&&t.delayError&&Xi(V)){const Ne=Xe(n.errors,V);Ne?(Zr(n.errors,V),c[V]=C(V,()=>M(V,Ne)),c[V](t.delayError)):k(V)}if(te.shouldTouch)for(const Ne of V?fe:o.mount)!o.array.has(Ne)&&zn(n.touchedFields,Ne,!0);return g.state.next({...!Xi(V)||v("isValid")&&W!==n.isValid?{}:{name:V},...t.resolver||!V?{isValid:W}:{},...te.shouldTouch&&v("touchedFields")?{touchedFields:n.touchedFields}:{},errors:n.errors}),te.shouldFocus&&!ye&&ab(r,Oe,V?fe:o.mount),ye},It=(V,te)=>{let W={...a.mount?s:i};return te&&(W=Qae(te.dirtyFields?n.dirtyFields:n.touchedFields,W)),$n(V)?W:Xi(V)?Xe(W,V):V.map(ye=>Xe(W,ye))},mt=V=>$n(V)?{...n.errors}:Xi(V)?Xe(n.errors,V):V.map(te=>Xe(n.errors,te)),De=(V,te)=>{const W=te||n,ye=Xe(W.errors,V);return{invalid:!!ye,isDirty:!!Xe(W.dirtyFields,V),error:ye,isValidating:!!Xe(W.validatingFields,V),isTouched:!!Xe(W.touchedFields,V)}},Pe=V=>{const te=V?bC(V):void 0;te?te.forEach(W=>{_(W),Zr(n.errors,W),g.state.next({name:W,errors:n.errors})}):(Object.keys(c).forEach(k),n.errors={},g.state.next({errors:n.errors}))},ct=(V,te,W)=>{_(V);const ye=(Xe(r,V,{_f:{}})._f||{}).ref,fe=Xe(n.errors,V)||{},{ref:Ne,message:ke,type:ze,types:et,...Fe}=fe;zn(n.errors,V,{...Fe,...te,ref:ye}),g.state.next({name:V,errors:n.errors,isValid:!1}),W&&W.shouldFocus&&ye&&ye.focus&&ye.focus()},Tn=(V,te)=>{if(as(V)){d++;const{unsubscribe:W}=g.state.subscribe({next:fe=>"values"in fe&&V(fe.values||Ce(void 0,te),fe)});let ye=!1;return{unsubscribe:()=>{ye||(ye=!0,d--,W())}}}return Ce(V,te,!0)},Nn=V=>{var te;const W=!!(!((te=V.formState)===null||te===void 0)&&te.values);W&&d++;const{unsubscribe:ye}=g.state.subscribe({next:Ne=>{if(DWe(V.name,Ne.name,V.exact)&&OWe(Ne,V.formState||p,en,V.reRenderRoot)){const ke={...s};V.callback({values:ke,...n,...Ne,defaultValues:i})}}});if(!W)return ye;let fe=!1;return()=>{fe||(fe=!0,d--,ye())}},ln=V=>(a.mount=!0,x={...x,...V.formState},Nn({...V,formState:{...m,...V.formState}})),Bn=(V,te={})=>{for(const W of V?bC(V):o.mount)o.mount.delete(W),o.array.delete(W),o.disabled.delete(W),te.keepValue||(Zr(r,W),Zr(s,W)),te.keepError||(_(W),Zr(n.errors,W)),!te.keepDirty&&Zr
vendor: 6,173 bytes, line 1152
1152(n.dirtyFields,W),!te.keepTouched&&Zr(n.touchedFields,W),!te.keepIsValidating&&Zr(n.validatingFields,W),!t.shouldUnregister&&!te.keepDefaultValue&&Zr(i,W);d&&g.state.next({values:br(s)}),g.state.next({...n,...te.keepDirty?{}:{isDirty:ae()},...te.keepIsValidating?{}:{isValidating:!ri(n.validatingFields)}}),!te.keepIsValid&&E()},Sn=({disabled:V,name:te})=>{if(ga(V)&&a.mount||V||o.disabled.has(te)){const fe=o.disabled.has(te)!==!!V;V?o.disabled.add(te):o.disabled.delete(te),fe&&a.mount&&!a.action&&E()}},zr=(V,te={})=>{let W=Xe(r,V);const ye=ga(te.disabled)||ga(t.disabled),fe=!o.registerName.has(V)&&W&&W._f&&!W._f.mount;if(zn(r,V,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:V}},name:V,mount:!0,...te}}),o.mount.add(V),W&&W._f){const Ne=Xe(r,V);for(const ke of xWe)ke in te||delete Ne._f[ke]}return W&&!fe?Sn({disabled:ga(te.disabled)?te.disabled:t.disabled,name:V}):O(V,!0,te.value),{...ye?{disabled:te.disabled||t.disabled}:{},...t.progressive?{required:!!te.required,min:Fy(te.min),max:Fy(te.max),minLength:Fy(te.minLength),maxLength:Fy(te.maxLength),pattern:Fy(te.pattern)}:{},name:V,onChange:we,onBlur:we,ref:Ne=>{if(Ne){o.registerName.add(V),zr(V,te),o.registerName.delete(V),W=Xe(r,V);const ke=$n(Ne.value)&&Ne.querySelectorAll&&Ne.querySelectorAll("input,select,textarea")[0]||Ne,ze=EWe(ke),et=W._f.refs||[];if(ze?et.find(Lt=>Lt===ke):ke===W._f.ref)return;const Fe={...W._f};ze?(Fe.refs=[...et.filter(FE),ke,...Array.isArray(Xe(i,V))?[{}]:[]],Fe.ref={type:ke.type,name:V}):(Fe.ref=ke,delete Fe.refs),zn(r,V,{_f:Fe}),O(V,!1,void 0,ke)}else W=Xe(r,V,{}),W._f&&(W._f.mount=!1),(t.shouldUnregister||te.shouldUnregister)&&!(Hae(o.array,V)&&a.action)&&o.unMount.add(V)}}},or=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&ab(r,Oe,o.mount),ge=V=>{ga(V)&&(g.state.next({disabled:V}),ab(r,(te,W)=>{const ye=Xe(r,W);ye&&(te.disabled=ye._f.disabled||V,Array.isArray(ye._f.refs)&&ye._f.refs.forEach(fe=>{fe.disabled=ye._f.disabled||V}))},0))},Me=(V,te)=>async W=>{let ye,fe;W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let Ne=br(s);if(g.state.next({isSubmitting:!0}),t.resolver){const ke=w,{errors:ze,values:et}=await q();if(ke!==w)return;A(),Object.keys(c).forEach(k),n.errors=ze,Ne=br(et)}else{const ke=w;if(await me({fields:r,eventType:Kd.SUBMIT}),ke!==w)return;Zr(n.errors,qae)}if(o.disabled.size)for(const ke of o.disabled)Zr(Ne,ke);if(ri(n.errors)){g.state.next({errors:{}});try{ye=await V(Ne,W)}catch(ke){fe=ke}}else te&&await te({...n.errors},W),or(),setTimeout(or);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ri(n.errors)&&!fe,submitCount:n.submitCount+1,errors:n.errors}),fe)throw fe;return ye},ut=(V,te={})=>{Xe(r,V)&&(Zr(n.validatingFields,V),$n(te.defaultValue)?He(V,br(Xe(i,V))):(He(V,te.defaultValue),zn(i,V,br(te.defaultValue))),te.keepTouched||Zr(n.touchedFields,V),te.keepDirty||(Zr(n.dirtyFields,V),n.isDirty=te.defaultValue?ae(V,br(Xe(i,V))):ae()),te.keepError||(_(V),Zr(n.errors,V),E()),g.state.next({...n,isValidating:!ri(n.validatingFields)}))},Ct=(V,te={})=>{w++;const W=V?br(V):i,ye=br(W),fe=ri(V),Ne=ye,ke=r;if(Object.keys(c).forEach(k),te.keepDefaultValues||(i=W),!te.keepValues){if(te.keepDirtyValues){const ze=new Set([...o.mount,...Jae(Ud(i,s,void 0,ke),n.dirtyFields)]);for(const et of ze){const Fe=Xe(n.dirtyFields,et),Lt=Xe(s,et),Ft=Xe(Ne,et);Fe&&!$n(Lt)?zn(Ne,et,Lt):!Fe&&!$n(Ft)&&He(et,Ft)}}else{if(I3&&$n(V))for(const ze of o.mount){const et=Xe(r,ze);if(et&&et._f){const Fe=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(u5(Fe)){const Lt=Fe.closest("form");if(Lt){Lt.reset();break}}}}if(te.keepFieldsRef)for(const ze of o.mount)He(ze,Xe(Ne,ze));else r={}}if(t.shouldUnregister){if(s=te.keepDefaultValues?br(i):{},te.keepFieldsRef)for(const ze of o.mount)zn(s,ze,Xe(Ne,ze))}else s=br(Ne);g.array.next({values:{...Ne}}),g.state.next({name:void 0,type:void 0,values:{...Ne}})}o={mount:te.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!p.isValid||!!te.keepIsValid||!!te.keepDirtyValues||!t.shouldUnregister&&!ri(Ne),a.watch=!!t.shouldUnregister,a.keepIsValid=!!te.keepIsValid,a.action=!1,a.actionArrayLengths.clear(),te.keepErrors||(n.errors={}),g.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:fe?!1:te.keepDirty?n.isDirty:te.keepValues?ae():!!(te.keepDefaultValues&&!xa(V,i)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:fe?{}:te.keepDirtyValues?te.keepDefaultValues&&s?Ud(i,s,void 0,ke):n.dirtyFields:te.keepDefaultValues&&V?Ud(i,V,void 0,ke):te.keepDirty?n.dirtyFields:te.keepValues?Ud(i,s,void 0,ke):{},touchedFields:te.keepTouched?n.touchedFields:{},...!te.keepIsValidating&&(n.isValidating||!ri(n.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},yn=(V,te)=>Ct(as(V)?V(s):V,{...t.resetOptions,...te}),un=(V,te={})=>{const W=Xe(r,V),ye=W&&W._f;if(ye){const fe=ye.refs?ye.refs[0]:ye.ref;fe.focus&&setTimeout(()=>{fe.focus(),te.shouldSelect&&as(fe.select)&&fe.select()})}},en=V=>{const{name:te,type:W,values:ye,...fe}=V;n={...n,...fe}};g.state.subscribe({next:en});const li={control:{register:zr,unregister:Bn,getFieldState:De,handleSubmit:Me,setError:ct,_subscribe:Nn,_runSchema:q,_updateIsValidating:A,_focusError:or,_getWatch:Ce,_getDirty:ae,_setValid:E,_setFieldArray:D,_setDisabledField:Sn,_setErrors:$,_getFieldArray:je,_reset:Ct,_resetDefaultValues:()=>as(t.defaultValues)&&t.defaultValues().then(V=>{yn(V,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:ge,_subjects:g,_proxyFormState:p,get _fields(){return r},get _formValues(){return s},get _state(){return a},set _state(V){a=V},get _defaultValues(){return i},get _names(){return o},set _names(V){o=V},get _formState(){return n},get _options(){return t},set _options(V){t={...t,...V},h=z2(t.mode),f=z2(t.reValidateMode),S=t.criteriaMode===Lo.all}},subscribe:ln,trigger:Je,register:zr,handleSubmit:Me,watch:Tn,setValue:He,setValues:tt,getValues:It,getErrors:mt,reset:yn,resetField:ut,resetDefaultValues:(V,te={})=>
1152{if(i=br(V),!te.keepDirty){const W=Ud(i,s,void 0,r);n.dirtyFields=W,n.isDirty=!ri(W)}te.keepIsValid||E(),g.state.next({...n,defaultValues:i})},clearErrors:Pe,unregister:Bn,setError:ct,setFocus:un,getFieldState:De};return{...li,formControl:li}}function pf(e={}){const t=Y.useRef(void 0),n=Y.useRef(void 0),r=Y.useRef(e.formControl),i=Y.useRef(!!e.validate),[s,a]=Y.useState(()=>({...br(roe),isLoading:as(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:as(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:s},e.defaultValues&&!as(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:h,...f}=BWe(e);t.current={...f,formState:s}}const o=t.current.control;o._options={...e,validate:e.validate};const c=()=>({...o._formState,defaultValues:o._defaultValues}),{resyncIfNeeded:u,snapshot:d}=Q9(c);return X9(()=>{u(!0,c,a);const h=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return a(f=>({...f,isReady:!0})),o._formState.isReady=!0,()=>{h(),d(!0,c)}},[o,u,d]),Y.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Y.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),Y.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),Y.useEffect(()=>{var h;i.current&&!e.validate&&((h=t.current)===null||h===void 0||h.clearErrors(w1)),i.current=!!e.validate},[e.validate]),Y.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Y.useEffect(()=>{if(o._proxyFormState.isDirty){const h=o._getDirty();h!==s.isDirty&&o._subjects.state.next({isDirty:h})}},[o,s.isDirty]),Y.useEffect(()=>{var h;e.values&&!xa(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((h=o._options.resetOptions)===null||h===void 0)&&h.keepIsValid||o._setValid(),n.current=e.values,a(f=>({...f}))):o._resetDefaultValues()},[o,e.values]),Y.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Y.useMemo(()=>Gae(s,o),[o,s]),t.current}const OV=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ioe=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?OV(r.ref,n,e):r.refs&&r.refs.forEach(i=>OV(i,n,e))}},zWe=(e,t)=>{t.shouldUseNativeValidation&&ioe(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),s=Object.assign(e[r]||{},{ref:i&&i.ref});if($We(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));zn(a,"root",s),zn(n,r,a)}else zn(n,r,s)}return n},$We=(e,t)=>e.some(n=>n.startsWith(t+"."));var UWe=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,s=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];n[a]={message:o.message,type:o.code}}else n[a]={message:s,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(h){return e.push(h)})}),t){var c=n[a].types,u=c&&c[r.code];n[a]=Wae(a,t,n,i,u?[].concat(u,r.message):r.message)}e.shift()}return n},gf=function(e,t,n){return n===void 0&&(n={}),function(r,i,s){try{return Promise.resolve(function(a,o){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return s.shouldUseNativeValidation&&ioe({},s),{errors:{},values:n.raw?r:u}})}catch(u){return o(u)}return c&&c.then?c.then(void 0,o):c}(0,function(a){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(a))return{values:{},errors:zWe(UWe(a.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}}},In;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},e.find=(i,s)=>{for(const a of i)if(s(a))return a}
vendor: 5,854 bytes, line 1152
1152,e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(In||(In={}));var DV;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(DV||(DV={}));const gt=In.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xd=e=>{switch(typeof e){case"undefined":return gt.undefined;case"string":return gt.string;case"number":return Number.isNaN(e)?gt.nan:gt.number;case"boolean":return gt.boolean;case"function":return gt.function;case"bigint":return gt.bigint;case"symbol":return gt.symbol;case"object":return Array.isArray(e)?gt.array:e===null?gt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?gt.promise:typeof Map<"u"&&e instanceof Map?gt.map:typeof Set<"u"&&e instanceof Set?gt.set:typeof Date<"u"&&e instanceof Date?gt.date:gt.object;default:return gt.unknown}},Ke=In.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Yu extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,c=0;for(;c<a.path.length;){const u=a.path[c];c===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(a))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return i(this),r}static assert(t){if(!(t instanceof Yu))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,In.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Yu.create=e=>new Yu(e);const T7=(e,t)=>{let n;switch(e.code){case Ke.invalid_type:e.received===gt.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ke.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,In.jsonStringifyReplacer)}`;break;case Ke.unrecognized_keys:n=`Unrecognized key(s) in object: ${In.joinValues(e.keys,", ")}`;break;case Ke.invalid_union:n="Invalid input";break;case Ke.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${In.joinValues(e.options)}`;break;case Ke.invalid_enum_value:n=`Invalid enum value. Expected ${In.joinValues(e.options)}, received '${e.received}'`;break;case Ke.invalid_arguments:n="Invalid function arguments";break;case Ke.invalid_return_type:n="Invalid function return type";break;case Ke.invalid_date:n="Invalid date";break;case Ke.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:In.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ke.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ke.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ke.custom:n="Invalid input";break;case Ke.invalid_intersection_types:n="Intersection results could not be merged";break;case Ke.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ke.not_finite:n="Number must be finite";break;default:n=t.defaultError,In.assertNever(e)}return{message:n}};let VWe=T7;function HWe(){return VWe}const qWe=e=>
vendor: 4,819 bytes, line 1152
1152{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)o=u(a,{data:t,defaultError:o}).message;return{...i,path:s,message:o}};function ot(e,t){const n=HWe(),r=qWe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===T7?void 0:T7].filter(i=>!!i)});e.common.issues.push(r)}class ta{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Gt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return ta.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Gt;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:t.value,value:r}}}const Gt=Object.freeze({status:"aborted"}),S1=e=>({status:"dirty",value:e}),Jo=e=>({status:"valid",value:e}),LV=e=>e.status==="aborted",PV=e=>e.status==="dirty",rx=e=>e.status==="valid",h5=e=>typeof Promise<"u"&&e instanceof Promise;var vt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(vt||(vt={}));class Sc{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const IV=(e,t)=>{if(rx(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Yu(e.common.issues);return this._error=n,this._error}}};function an(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,o)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:c??n??o.defaultError}},description:i}}class _n{get description(){return this._def.description}_getType(t){return Xd(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xd(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ta,ctx:{common:t.parent.common,data:t.data,parsedType:Xd(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(h5(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xd(t)},i=this._parseSync({data:t,path:r.path,parent:r});return IV(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xd(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return rx(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(r=s==null?void 0:s.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>rx(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xd(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(h5(i)?i:Promise.resolve(i));return IV(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=t(i),o=()=>s.addIssue({code:Ke.custom,...r(i)});
vendor: 9,000 bytes, line 1152
1152return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Jm({schema:this,typeName:Wt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ju.create(this,this._def)}nullable(){return ep.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mc.create(this)}promise(){return y5.create(this,this._def)}or(t){return m5.create([this,t],this._def)}and(t){return p5.create(this,t,this._def)}transform(t){return new Jm({...an(this._def),schema:this,typeName:Wt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new b5({...an(this._def),innerType:this,defaultValue:n,typeName:Wt.ZodDefault})}brand(){return new loe({typeName:Wt.ZodBranded,type:this,...an(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new v5({...an(this._def),innerType:this,catchValue:n,typeName:Wt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tD.create(this,t)}readonly(){return w5.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const GWe=/^c[^\s-]{8,}$/i,WWe=/^[0-9a-z]+$/,YWe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,KWe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,XWe=/^[a-z0-9_-]{21}$/i,QWe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ZWe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,JWe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eYe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let BE;const tYe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nYe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rYe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,iYe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sYe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aYe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,soe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oYe=new RegExp(`^${soe}$`);function aoe(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function lYe(e){return new RegExp(`^${aoe(e)}$`)}function cYe(e){let t=`${soe}T${aoe(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function uYe(e,t){return!!((t==="v4"||!t)&&tYe.test(e)||(t==="v6"||!t)&&rYe.test(e))}function dYe(e,t){if(!QWe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function hYe(e,t){return!!((t==="v4"||!t)&&nYe.test(e)||(t==="v6"||!t)&&iYe.test(e))}class ic extends _n{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==gt.string){const s=this._getOrReturnCtx(t);return ot(s,{code:Ke.invalid_type,expected:gt.string,received:s.parsedType}),Gt}const r=new ta;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=t.data.length>s.value,o=t.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(t,i),a?ot(i,{code:Ke.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&ot(i,{code:Ke.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")JWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"email",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")BE||(BE=new RegExp(eYe,"u")),BE.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"emoji",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")KWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"uuid",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")XWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"nanoid",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")GWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"cuid",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")WWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"cuid2",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")YWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"ulid",code:Ke.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ot(i,{validation:"url",code:Ke.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"regex",code:Ke.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.invalid_string,validation:{endsWith:s.value},message:s.message}
vendor: 4,088 bytes, line 1152
1152),r.dirty()):s.kind==="datetime"?cYe(s).test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?oYe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?lYe(s).test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?ZWe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"duration",code:Ke.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?uYe(t.data,s.version)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"ip",code:Ke.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?dYe(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"jwt",code:Ke.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?hYe(t.data,s.version)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"cidr",code:Ke.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?sYe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"base64",code:Ke.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?aYe.test(t.data)||(i=this._getOrReturnCtx(t,i),ot(i,{validation:"base64url",code:Ke.invalid_string,message:s.message}),r.dirty()):In.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Ke.invalid_string,...vt.errToObj(r)})}_addCheck(t){return new ic({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...vt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...vt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...vt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...vt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...vt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...vt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...vt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...vt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...vt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...vt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...vt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...vt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...vt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...vt.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...vt.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...vt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...vt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...vt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...vt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...vt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...vt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...vt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...vt.errToObj(n)})}nonempty(t){return this.min(1,vt.errToObj(t))}trim(){return new ic({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ic({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ic({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,672 bytes, line 1152
1152get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ic.create=e=>new ic({checks:[],typeName:Wt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...an(e)});function fYe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}class Km extends _n{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==gt.number){const s=this._getOrReturnCtx(t);return ot(s,{code:Ke.invalid_type,expected:gt.number,received:s.parsedType}),Gt}let r;const i=new ta;for(const s of this._def.checks)s.kind==="int"?In.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?fYe(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.not_finite,message:s.message}),i.dirty()):In.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,vt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,vt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,vt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,vt.toString(n))}setLimit(t,n,r,i){return new Km({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:vt.toString(i)}]})}_addCheck(t){return new Km({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:vt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:vt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:vt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:vt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:vt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:vt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:vt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:vt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:vt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&In.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}
vendor: 4,654 bytes, line 1152
1152}Km.create=e=>new Km({checks:[],typeName:Wt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...an(e)});class Xm extends _n{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==gt.bigint)return this._getInvalidInput(t);let r;const i=new ta;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ke.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):In.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ot(n,{code:Ke.invalid_type,expected:gt.bigint,received:n.parsedType}),Gt}gte(t,n){return this.setLimit("min",t,!0,vt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,vt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,vt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,vt.toString(n))}setLimit(t,n,r,i){return new Xm({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:vt.toString(i)}]})}_addCheck(t){return new Xm({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:vt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:vt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:vt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:vt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:vt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Xm.create=e=>new Xm({checks:[],typeName:Wt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...an(e)});class f5 extends _n{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==gt.boolean){const r=this._getOrReturnCtx(t);return ot(r,{code:Ke.invalid_type,expected:gt.boolean,received:r.parsedType}),Gt}return Jo(t.data)}}f5.create=e=>new f5({typeName:Wt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...an(e)});class ix extends _n{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==gt.date){const s=this._getOrReturnCtx(t);return ot(s,{code:Ke.invalid_type,expected:gt.date,received:s.parsedType}),Gt}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ot(s,{code:Ke.invalid_date}),Gt}const r=new ta;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),ot(i,{code:Ke.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):In.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ix({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:vt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:vt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ix.create=e=>new ix({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Wt.ZodDate,...an(e)});class FV extends _n{_parse(t){if(this._getType(t)!==gt.symbol){const r=this._getOrReturnCtx(t);return ot(r,{code:Ke.invalid_type,expected:gt.symbol,received:r.parsedType}),Gt}return Jo(t.data)}}FV.create=e=>new FV({typeName:Wt.ZodSymbol,...an(e)});class E7 extends _n{_parse(t){if(this._getType(t)!==gt.undefined){const r=this._getOrReturnCtx(t);return ot(r,{code:Ke.invalid_type,expected:gt.undefined,received:r.parsedType}),Gt}return Jo(t.data)}}E7.create=e=>new E7({typeName:Wt.ZodUndefined,...an(e)});
vendor: 9,477 bytes, line 1152
1152class j7 extends _n{_parse(t){if(this._getType(t)!==gt.null){const r=this._getOrReturnCtx(t);return ot(r,{code:Ke.invalid_type,expected:gt.null,received:r.parsedType}),Gt}return Jo(t.data)}}j7.create=e=>new j7({typeName:Wt.ZodNull,...an(e)});class BV extends _n{constructor(){super(...arguments),this._any=!0}_parse(t){return Jo(t.data)}}BV.create=e=>new BV({typeName:Wt.ZodAny,...an(e)});class N7 extends _n{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Jo(t.data)}}N7.create=e=>new N7({typeName:Wt.ZodUnknown,...an(e)});class Qh extends _n{_parse(t){const n=this._getOrReturnCtx(t);return ot(n,{code:Ke.invalid_type,expected:gt.never,received:n.parsedType}),Gt}}Qh.create=e=>new Qh({typeName:Wt.ZodNever,...an(e)});class zV extends _n{_parse(t){if(this._getType(t)!==gt.undefined){const r=this._getOrReturnCtx(t);return ot(r,{code:Ke.invalid_type,expected:gt.void,received:r.parsedType}),Gt}return Jo(t.data)}}zV.create=e=>new zV({typeName:Wt.ZodVoid,...an(e)});class mc extends _n{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==gt.array)return ot(n,{code:Ke.invalid_type,expected:gt.array,received:n.parsedType}),Gt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(ot(n,{code:a?Ke.too_big:Ke.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ot(n,{code:Ke.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ot(n,{code:Ke.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new Sc(n,a,n.path,o)))).then(a=>ta.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new Sc(n,a,n.path,o)));return ta.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new mc({...this._def,minLength:{value:t,message:vt.toString(n)}})}max(t,n){return new mc({...this._def,maxLength:{value:t,message:vt.toString(n)}})}length(t,n){return new mc({...this._def,exactLength:{value:t,message:vt.toString(n)}})}nonempty(t){return this.min(1,t)}}mc.create=(e,t)=>new mc({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Wt.ZodArray,...an(t)});function r0(e){if(e instanceof hi){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ju.create(r0(r))}return new hi({...e._def,shape:()=>t})}else return e instanceof mc?new mc({...e._def,type:r0(e.element)}):e instanceof ju?ju.create(r0(e.unwrap())):e instanceof ep?ep.create(r0(e.unwrap())):e instanceof Qm?Qm.create(e.items.map(t=>r0(t))):e}class hi extends _n{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=In.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==gt.object){const u=this._getOrReturnCtx(t);return ot(u,{code:Ke.invalid_type,expected:gt.object,received:u.parsedType}),Gt}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Qh&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||o.push(u);const c=[];for(const u of a){const d=s[u],h=i.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Sc(i,h,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Qh){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of o)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")o.length>0&&(ot(i,{code:Ke.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of o){const h=i.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Sc(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,f=await d.value;u.push({key:h,value:f,alwaysSet:d.alwaysSet})}return u}).then(u=>ta.mergeObjectSync(r,u)):ta.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return vt.errToObj,new hi({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,a;const i=((a=(s=this._def).errorMap)==null?void 0:a.call(s,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:vt.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new hi({...this._def,unknownKeys:"strip"})}passthrough(){return new hi({...this._def,unknownKeys:"passthrough"})}extend(t){return new hi({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new hi({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Wt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new hi({...this._def,catchall:t})}pick(t){const n={};for(const r of In.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new hi({...this._def,shape:()=>n})}omit(t){const n={};for(const r of In.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new hi({...this._def,shape:()=>n})}deepPartial(){return r0(this)}partial(t){const n={};for(const r of In.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new hi({...this._def,shape:()=>n})}required(t){const n={};for(const r of In.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof ju;)s=s._def.innerType;n[r]=s}return new hi({...this._def,shape:()=>n})}keyof(){return ooe(In.objectKeys(this.shape))}}hi.create=(e,t)=>new hi({shape:()=>e,unknownKeys:"strip",catchall:Qh.create(),typeName:Wt.ZodObject,...an(t)});hi.strictCreate=(e,t)=>new hi({shape:()=>e,unknownKeys:"strict",catchall:Qh.create(),typeName:Wt.ZodObject,...an(t)});hi.lazycreate=(e,t)=>new hi({shape:e,unknownKeys:"strip",catchall:Qh.create(),typeName:Wt.ZodObject,...an(t)});class m5 extends _n{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Yu(o.ctx.common.issues));return ot(n,{code:Ke.invalid_union,unionErrors:a}),Gt}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!s&&(s={result:d,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(c=>new Yu(c));return ot(n,{code:Ke.invalid_union,unionErrors:o}),Gt}}get options(){return this._def.options}}m5.create=(e,t)=>new m5({options:e,typeName:Wt.ZodUnion,...an(t)});const Qc=e=>e instanceof M7?Qc(e.schema):e instanceof Jm?Qc(e.innerType()):e instanceof x5?[e.value]:e instanceof Zm?e.options:e instanceof R7?In.objectValues(e.enum):e instanceof b5?Qc(e._def.innerType):e instanceof E7?[void 0]:e instanceof j7?[null]:e instanceof ju?[void 0,...Qc(e.unwrap())]:e instanceof ep?[null,...Qc(e.unwrap())]:e instanceof loe||e instanceof w5?Qc(e.unwrap()):e instanceof v5?Qc(e._def.innerType):[];class eD extends _n{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==gt.object)return ot(n,{code:Ke.invalid_type,expected:gt.object,received:n.parsedType}),Gt;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ot(n,{code:Ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Gt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const s of n){const a=Qc(s.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,s)}}return new eD({typeName:Wt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...an(r)})}}function A7(e,t){const n=Xd(e),r=Xd(t);if(e===t)return{valid:!0,data:e};if(n===gt.object&&r===gt.object){const i=In.objectKeys(t),s=In.objectKeys(e).filter(o=>i.indexOf(o)!==-1),a={...e,...t};for(const o of s){const c=A7(e[o],t[o]);if(!c.valid)return{valid:!1};a[o]=c.data}return{valid:!0,data:a}}else if(n===gt.array&&r===gt.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const a=e[s],o=t[s],c=A7(a,o);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===gt.date&&r===gt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class p5 extends _n{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,a)=>
vendor: 4,440 bytes, line 1152
1152{if(LV(s)||LV(a))return Gt;const o=A7(s.value,a.value);return o.valid?((PV(s)||PV(a))&&n.dirty(),{status:n.value,value:o.data}):(ot(r,{code:Ke.invalid_intersection_types}),Gt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}p5.create=(e,t,n)=>new p5({left:e,right:t,typeName:Wt.ZodIntersection,...an(n)});class Qm extends _n{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.array)return ot(r,{code:Ke.invalid_type,expected:gt.array,received:r.parsedType}),Gt;if(r.data.length<this._def.items.length)return ot(r,{code:Ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Gt;!this._def.rest&&r.data.length>this._def.items.length&&(ot(r,{code:Ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Sc(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>ta.mergeArray(n,a)):ta.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Qm({...this._def,rest:t})}}Qm.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qm({items:e,typeName:Wt.ZodTuple,rest:null,...an(t)})};class g5 extends _n{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.object)return ot(r,{code:Ke.invalid_type,expected:gt.object,received:r.parsedType}),Gt;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new Sc(r,o,r.path,o)),value:a._parse(new Sc(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?ta.mergeObjectAsync(n,i):ta.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof _n?new g5({keyType:t,valueType:n,typeName:Wt.ZodRecord,...an(r)}):new g5({keyType:ic.create(),valueType:t,typeName:Wt.ZodRecord,...an(n)})}}class $V extends _n{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.map)return ot(r,{code:Ke.invalid_type,expected:gt.map,received:r.parsedType}),Gt;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,c],u)=>({key:i._parse(new Sc(r,o,r.path,[u,"key"])),value:s._parse(new Sc(r,c,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of a){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return Gt;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),o.set(u.value,d.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of a){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Gt;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),o.set(u.value,d.value)}return{status:n.value,value:o}}}}$V.create=(e,t,n)=>new $V({valueType:t,keyType:e,typeName:Wt.ZodMap,...an(n)});class iv extends _n{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.set)return ot(r,{code:Ke.invalid_type,expected:gt.set,received:r.parsedType}),Gt;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ot(r,{code:Ke.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ot(r,{code:Ke.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(c){const u=new Set;for(const d of c){if(d.status==="aborted")return Gt;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((c,u)=>s._parse(new Sc(r,c,r.path,u)));return r.common.async?Promise.all(o).then(c=>a(c)):a(o)}min(t,n){return new iv({...this._def,minSize:{value:t,message:vt.toString(n)}})}max(t,n){return new iv({...this._def,maxSize:{value:t,message:vt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}iv.create=(e,t)=>
vendor: 4,657 bytes, line 1152
1152new iv({valueType:e,minSize:null,maxSize:null,typeName:Wt.ZodSet,...an(t)});class M7 extends _n{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}M7.create=(e,t)=>new M7({getter:e,typeName:Wt.ZodLazy,...an(t)});class x5 extends _n{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ot(n,{received:n.data,code:Ke.invalid_literal,expected:this._def.value}),Gt}return{status:"valid",value:t.data}}get value(){return this._def.value}}x5.create=(e,t)=>new x5({value:e,typeName:Wt.ZodLiteral,...an(t)});function ooe(e,t){return new Zm({values:e,typeName:Wt.ZodEnum,...an(t)})}class Zm extends _n{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ot(n,{expected:In.joinValues(r),received:n.parsedType,code:Ke.invalid_type}),Gt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ot(n,{received:n.data,code:Ke.invalid_enum_value,options:r}),Gt}return Jo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Zm.create(t,{...this._def,...n})}exclude(t,n=this._def){return Zm.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Zm.create=ooe;class R7 extends _n{_parse(t){const n=In.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==gt.string&&r.parsedType!==gt.number){const i=In.objectValues(n);return ot(r,{expected:In.joinValues(i),received:r.parsedType,code:Ke.invalid_type}),Gt}if(this._cache||(this._cache=new Set(In.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=In.objectValues(n);return ot(r,{received:r.data,code:Ke.invalid_enum_value,options:i}),Gt}return Jo(t.data)}get enum(){return this._def.values}}R7.create=(e,t)=>new R7({values:e,typeName:Wt.ZodNativeEnum,...an(t)});class y5 extends _n{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==gt.promise&&n.common.async===!1)return ot(n,{code:Ke.invalid_type,expected:gt.promise,received:n.parsedType}),Gt;const r=n.parsedType===gt.promise?n.data:Promise.resolve(n.data);return Jo(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}y5.create=(e,t)=>new y5({type:e,typeName:Wt.ZodPromise,...an(t)});class Jm extends _n{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Wt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:a=>{ot(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return Gt;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?Gt:c.status==="dirty"||n.value==="dirty"?S1(c.value):c});{if(n.value==="aborted")return Gt;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?Gt:o.status==="dirty"||n.value==="dirty"?S1(o.value):o}}if(i.type==="refinement"){const a=o=>{const c=i.refinement(o,s);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Gt:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Gt:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!rx(a))return Gt;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>rx(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):Gt);In.assertNever(i)}}
vendor: 5,304 bytes, line 1152
1152Jm.create=(e,t,n)=>new Jm({schema:e,typeName:Wt.ZodEffects,effect:t,...an(n)});Jm.createWithPreprocess=(e,t,n)=>new Jm({schema:t,effect:{type:"preprocess",transform:e},typeName:Wt.ZodEffects,...an(n)});class ju extends _n{_parse(t){return this._getType(t)===gt.undefined?Jo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ju.create=(e,t)=>new ju({innerType:e,typeName:Wt.ZodOptional,...an(t)});class ep extends _n{_parse(t){return this._getType(t)===gt.null?Jo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ep.create=(e,t)=>new ep({innerType:e,typeName:Wt.ZodNullable,...an(t)});class b5 extends _n{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===gt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}b5.create=(e,t)=>new b5({innerType:e,typeName:Wt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...an(t)});class v5 extends _n{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return h5(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yu(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yu(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}v5.create=(e,t)=>new v5({innerType:e,typeName:Wt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...an(t)});class UV extends _n{_parse(t){if(this._getType(t)!==gt.nan){const r=this._getOrReturnCtx(t);return ot(r,{code:Ke.invalid_type,expected:gt.nan,received:r.parsedType}),Gt}return{status:"valid",value:t.data}}}UV.create=e=>new UV({typeName:Wt.ZodNaN,...an(e)});class loe extends _n{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tD extends _n{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Gt:s.status==="dirty"?(n.dirty(),S1(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Gt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tD({in:t,out:n,typeName:Wt.ZodPipeline})}}class w5 extends _n{_parse(t){const n=this._def.innerType._parse(t),r=i=>(rx(i)&&(i.value=Object.freeze(i.value)),i);return h5(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}w5.create=(e,t)=>new w5({innerType:e,typeName:Wt.ZodReadonly,...an(t)});var Wt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Wt||(Wt={}));const Q=ic.create,Re=Km.create;Xm.create;const ni=f5.create,sx=ix.create,B3=N7.create;Qh.create;const bt=mc.create,Ue=hi.create,coe=m5.create,nD=eD.create;p5.create;Qm.create;const z3=g5.create,Ah=x5.create,na=Zm.create;y5.create;ju.create;ep.create;const sv={string:e=>ic.create({...e,coerce:!0}),number:e=>Km.create({...e,coerce:!0}),boolean:e=>f5.create({...e,coerce:!0}),bigint:e=>Xm.create({...e,coerce:!0}),date:e=>ix.create({...e,coerce:!0})};Ue({newPassword:Q().min(8,"Password must be at least 8 characters").regex(/[A-Z]/,"Must contain an uppercase letter").regex(/[a-z]/,"Must contain a lowercase letter").regex(/[0-9]/,"Must contain a number").regex(/[^A-Za-z0-9]/,"Must contain a special character"),confirmPassword:Q().min(1,"Please confirm your password")}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});Ue({identifier:Q().min(1,"Username or email is required"),password:Q().min(1,"Password is required"),rememberMe:ni().optional()});Ue({identifier:Q().email("Please enter a valid email address"),password:Q().min(1,"Password is required"),rememberMe:ni().optional()});function ie(e,t,n){return(t=function(r){var i=function(s,a){if(typeof s!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var c=o.call(s,a);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}
vendor: 4,300 bytes, lines 1152-1153
1152return(a==="string"?String:Number)(s)}(r,"string");return typeof i=="symbol"?i:i+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VV(Object(n),!0).forEach(function(r){ie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ar(e,t){if(e==null)return{};var n,r,i=function(a,o){if(a==null)return{};var c={};for(var u in a)if({}.hasOwnProperty.call(a,u)){if(o.indexOf(u)>=0)continue;c[u]=a[u]}return c}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}class HV{constructor(){ie(this,"browserShadowBlurConstant",1),ie(this,"DPI",96),ie(this,"devicePixelRatio",typeof window<"u"?window.devicePixelRatio:1),ie(this,"perfLimitSizeTotal",2097152),ie(this,"maxCacheSideLimit",4096),ie(this,"minCacheSideLimit",256),ie(this,"disableStyleCopyPaste",!1),ie(this,"enableGLFiltering",!0),ie(this,"textureSize",4096),ie(this,"forceGLPutImageData",!1),ie(this,"cachesBoundsOfCurve",!1),ie(this,"fontPaths",{}),ie(this,"NUM_FRACTION_DIGITS",4)}}const Fn=new class extends HV{constructor(e){super(),this.configure(e)}configure(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.assign(this,e)}addFonts(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fontPaths=le(le({},this.fontPaths),e)}removeFonts(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(e=>{delete this.fontPaths[e]})}clearFonts(){this.fontPaths={}}restoreDefaults(e){const t=new HV,n=(e==null?void 0:e.reduce((r,i)=>(r[i]=t[i],r),{}))||t;this.configure(n)}},Zh=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return console[e]("fabric",...n)};class sc extends Error{constructor(t,n){super("fabric: ".concat(t),n)}}class mYe extends sc{constructor(t){super("".concat(t," 'options.signal' is in 'aborted' state"))}}class pYe{}class gYe extends pYe{testPrecision(t,n){const r="precision ".concat(n,` float; 1153void main(){}`),i=t.createShader(t.FRAGMENT_SHADER);return!!i&&(t.shaderSource(i,r),t.compileShader(i),!!t.getShaderParameter(i,t.COMPILE_STATUS))}queryWebGL(t){const n=t.getContext("webgl");n&&(this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),this.GLPrecision=["highp","mediump","lowp"].find(r=>this.testPrecision(n,r)),n.getExtension("WEBGL_lose_context").loseContext(),Zh("log","WebGL: max texture size ".concat(this.maxTextureSize)))}isSupported(t){return!!this.maxTextureSize&&this.maxTextureSize>=t}}const xYe={};let qV;const Cc=()=>qV||(qV={document,window,isTouchSupported:"ontouchstart"in window||"ontouchstart"in document||window&&window.navigator&&window.navigator.maxTouchPoints>0,WebGLProbe:new gYe,dispose(){},copyPasteData:xYe}),ty=()=>Cc().document,$3=()=>Cc().window,uoe=()=>{var e;return Math.max((e=Fn.devicePixelRatio)!==null&&e!==void 0?e:$3().devicePixelRatio,1)},ob=new class{constructor(){ie(this,"boundsOfCurveCache",{}),this.charWidthsCache=new Map}getFontCache(e){let{fontFamily:t,fontStyle:n,fontWeight:r}=e;t=t.toLowerCase();const i=this.charWidthsCache;i.has(t)||i.set(t,new Map);const s=i.get(t),a="".concat(n.toLowerCase(),"_").concat((r+"").toLowerCase());return s.has(a)||s.set(a,new Map),s.get(a)}clearFontCache(e){e?this.charWidthsCache.delete((e||"").toLowerCase()):this.charWidthsCache=new Map}limitDimsByArea(e){const{perfLimitSizeTotal:t}=Fn,n=Math.sqrt(t*e);return[Math.floor(n),Math.floor(t/n)]}},O7="6.9.1";function vC(){}const vw=Math.PI/2,S5=2*Math.PI,rD=Math.PI/180,ra=Object.freeze([1,0,0,1,0,0]),iD=16,Rd=.4477152502,pn="center",Zn="left",Ea="top",D7="bottom",si="right",ja="none",sD=/\r?\n/,doe="mov
1153ing",U3="scaling",hoe="rotating",aD="rotate",foe="skewing",av="resizing",yYe="modifyPoly",bYe="modifyPath",C5="changed",V3="scale",Oa="scaleX",Yo="scaleY",ny="skewX",ry="skewY",Pi="fill",Na="stroke",k5="modified",Up="json",zE="svg",ft=new class{constructor(){this[Up]=new Map,this[zE]=new Map}has(e){return this[Up].has(e)}getClass(e){const t=this[Up].get(e);if(!t)throw new sc("No class registered for ".concat(e));return t}setClass(e,t){t?this[Up].set(t,e):(this[Up].set(e.type,e),this[Up].set(e.type.toLowerCase(),e))}getSVGClass(e){return this[zE].get(e)}setSVGClass(e,t){this[zE].set(t??e.type.toLowerCase(),e)}},_5=new class extends Array{remove(e){const t=this.indexOf(e);t>-1&&this.splice(t,1)}cancelAll(){const e=this.splice(0);return e.forEach(t=>t.abort()),e}cancelByCanvas(e){if(!e)return[];const t=this.filter(n=>{var r;return n.target===e||typeof n.target=="object"&&((r=n.target)===null||r===void 0?void 0:r.canvas)===e});return t.forEach(n=>n.abort()),t}cancelByTarget(e){if(!e)return[];const t=this.filter(n=>n.target===e);return t.forEach(n=>n.abort()),t}};class vYe{constructor(){ie(this,"__eventListeners",{})}on(t,n){if(this.__eventListeners||(this.__eventListeners={}),typeof t=="object")return Object.entries(t).forEach(r=>{let[i,s]=r;this.on(i,s)}),()=>this.off(t);if(n){const r=t;return this.__eventListeners[r]||(this.__eventListeners[r]=[]),this.__eventListeners[r].push(n),()=>this.off(r,n)}return()=>!1}once(t,n){if(typeof t=="object"){const r=[];return Object.entries(t).forEach(i=>{let[s,a]=i;r.push(this.once(s,a))}),()=>r.forEach(i=>i())}if(n){const r=this.on(t,function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];n.call(this,...s),r()});return r}return()=>!1}_removeEventListener(t,n){if(this.__eventListeners[t])if(n){const r=this.__eventListeners[t],i=r.indexOf(n);i>-1&&r.splice(i,1)}else this.__eventListeners[t]=[]}off(t,n){if(this.__eventListeners)if(t===void 0)for(const r in this.__eventListeners)this._removeEventListener(r);else typeof t=="object"?Object.entries(t).forEach(r=>{let[i,s]=r;this._removeEventListener(i,s)}):this._removeEventListener(t,n)}fire(t,n){var r;if(!this.__eventListeners)return;const i=(r=this.__eventListeners[t])===null||r===void 0?void 0:r.concat();if(i)for(let s=0;s<i.length;s++)i[s].call(this,n||{})}}const i0=(e,t)=>{const n=e.indexOf(t);return n!==-1&&e.splice(n,1),e},Ku=e=>{if(e===0)return 1;switch(Math.abs(e)/vw){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},Xu=e=>{if(e===0)return 0;const t=e/vw,n=Math.sign(e);switch(t){case 1:return n;case 2:return 0;case 3:return-n}return Math.sin(e)};class be{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;typeof t=="object"?(this.x=t.x,this.y=t.y):(this.x=t,this.y=n)}add(t){return new be(this.x+t.x,this.y+t.y)}addEquals(t){return this.x+=t.x,this.y+=t.y,this}scalarAdd(t){return new be(this.x+t,this.y+t)}scalarAddEquals(t){return this.x+=t,this.y+=t,this}subtract(t){return new be(this.x-t.x,this.y-t.y)}subtractEquals(t){return this.x-=t.x,this.y-=t.y,this}scalarSubtract(t){return new be(this.x-t,this.y-t)}scalarSubtractEquals(t){return this.x-=t,this.y-=t,this}multiply(t){return new be(this.x*t.x,this.y*t.y)}scalarMultiply(t){return new be(this.x*t,this.y*t)}scalarMultiplyEquals(t){return this.x*=t,this.y*=t,this}divide(t){return new be(this.x/t.x,this.y/t.y)}scalarDivide(t){return new be(this.x/t,this.y/t)}scalarDivideEquals(t){return this.x/=t,this.y/=t,this}eq(t){return this.x===t.x&&this.y===t.y}lt(t){return this.x<t.x&&this.y<t.y}lte(t){return this.x<=t.x&&this.y<=t.y}gt(t){return this.x>t.x&&this.y>t.y}gte(t){return this.x>=t.x&&this.y>=t.y}lerp(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5;return n=Math.max(Math.min(1,n),0),new be(this.x+(t.x-this.x)*n,this.y+(t.y-this.y)*n)}distanceFrom(t){const n=this.x-t.x,r=this.y-t.y;return Math.sqrt(n*n+r*r)}midPointFrom(t){return this.lerp(t)}min(t){return new be(Math.min(this.x,t.x),Math.min(this.y,t.y))}max(t){return new be(Math.max(this.x,t.x),Math.max(this.y,t.y))}toString(){return"".concat(this.x,",").concat(this.y)}setXY(t,n){return this.x=t,this.y=n,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setFromPoint(t){return this.x=t.x,this.y=t.y,this}swap(t){const n=this.x,r=this.y;this.x=t.x,this.y=t.y,t.x=n,t.y=r}clone(){return new be(this.x,this.y)}rotate(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oD;const r=Xu(t),i=Ku(t),s=this.subtract(n);return new be(s.x*i-s.y*r,s.x*r+s.y*i).add(n)}transform(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new be(t[0]*this.x+t[2]*this.y+(n?0:t[4]),t[1]*this.x+t[3]*this.y+(n?0:t[5]))}}const oD=new be(0,0),wC=e=>!!e&&Array.isArray(e._objects);function moe(e){class t extends e{constructor(){super(...arguments),ie(this,"_objects",[])}_onObjectAdded(r){}_onObjectRemoved(r){}_onStackOrderChanged(r){}add(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];const a=this._objects.push(...i);
vendor: 28,433 bytes, lines 1153-1172
1153return i.forEach(o=>this._onObjectAdded(o)),a}insertAt(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return this._objects.splice(r,0,...s),s.forEach(o=>this._onObjectAdded(o)),this._objects.length}remove(){const r=this._objects,i=[];for(var s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];return a.forEach(c=>{const u=r.indexOf(c);u!==-1&&(r.splice(u,1),i.push(c),this._onObjectRemoved(c))}),i}forEachObject(r){this.getObjects().forEach((i,s,a)=>r(i,s,a))}getObjects(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return i.length===0?[...this._objects]:this._objects.filter(a=>a.isType(...i))}item(r){return this._objects[r]}isEmpty(){return this._objects.length===0}size(){return this._objects.length}contains(r,i){return!!this._objects.includes(r)||!!i&&this._objects.some(s=>s instanceof t&&s.contains(r,!0))}complexity(){return this._objects.reduce((r,i)=>r+=i.complexity?i.complexity():0,0)}sendObjectToBack(r){return!(!r||r===this._objects[0])&&(i0(this._objects,r),this._objects.unshift(r),this._onStackOrderChanged(r),!0)}bringObjectToFront(r){return!(!r||r===this._objects[this._objects.length-1])&&(i0(this._objects,r),this._objects.push(r),this._onStackOrderChanged(r),!0)}sendObjectBackwards(r,i){if(!r)return!1;const s=this._objects.indexOf(r);if(s!==0){const a=this.findNewLowerIndex(r,s,i);return i0(this._objects,r),this._objects.splice(a,0,r),this._onStackOrderChanged(r),!0}return!1}bringObjectForward(r,i){if(!r)return!1;const s=this._objects.indexOf(r);if(s!==this._objects.length-1){const a=this.findNewUpperIndex(r,s,i);return i0(this._objects,r),this._objects.splice(a,0,r),this._onStackOrderChanged(r),!0}return!1}moveObjectTo(r,i){return r!==this._objects[i]&&(i0(this._objects,r),this._objects.splice(i,0,r),this._onStackOrderChanged(r),!0)}findNewLowerIndex(r,i,s){let a;if(s){a=i;for(let o=i-1;o>=0;--o)if(r.isOverlapping(this._objects[o])){a=o;break}}else a=i-1;return a}findNewUpperIndex(r,i,s){let a;if(s){a=i;for(let o=i+1;o<this._objects.length;++o)if(r.isOverlapping(this._objects[o])){a=o;break}}else a=i+1;return a}collectObjects(r){let{left:i,top:s,width:a,height:o}=r,{includeIntersecting:c=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const u=[],d=new be(i,s),h=d.add(new be(a,o));for(let f=this._objects.length-1;f>=0;f--){const m=this._objects[f];m.selectable&&m.visible&&(c&&m.intersectsWithRect(d,h)||m.isContainedWithinRect(d,h)||c&&m.containsPoint(d)||c&&m.containsPoint(h))&&u.push(m)}return u}}return t}class poe extends vYe{_setOptions(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(const n in t)this.set(n,t[n])}_setObject(t){for(const n in t)this._set(n,t[n])}set(t,n){return typeof t=="object"?this._setObject(t):this._set(t,n),this}_set(t,n){this[t]=n}toggle(t){const n=this.get(t);return typeof n=="boolean"&&this.set(t,!n),this}get(t){return this[t]}}function SC(e){return $3().requestAnimationFrame(e)}function wYe(e){return $3().cancelAnimationFrame(e)}let SYe=0;const Jh=()=>SYe++,Qu=()=>{const e=ty().createElement("canvas");if(!e||e.getContext===void 0)throw new sc("Failed to create `canvas` element");return e},CYe=()=>ty().createElement("img"),Ko=e=>{const t=Qu();return t.width=e.width,t.height=e.height,t},goe=(e,t,n)=>e.toDataURL("image/".concat(t),n),xoe=(e,t,n)=>new Promise((r,i)=>{e.toBlob(r,"image/".concat(t),n)}),ai=e=>e*rD,Zu=e=>e/rD,kYe=e=>e.every((t,n)=>t===ra[n]),fa=(e,t,n)=>new be(e).transform(t,n),bl=e=>{const t=1/(e[0]*e[3]-e[1]*e[2]),n=[t*e[3],-t*e[1],-t*e[2],t*e[0],0,0],{x:r,y:i}=new be(e[4],e[5]).transform(n,!0);return n[4]=-r,n[5]=-i,n},cs=(e,t,n)=>[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],n?0:e[0]*t[4]+e[2]*t[5]+e[4],n?0:e[1]*t[4]+e[3]*t[5]+e[5]],lD=(e,t)=>e.reduceRight((n,r)=>r&&n?cs(r,n,t):r||n,void 0)||ra.concat(),yoe=e=>{let[t,n]=e;return Math.atan2(n,t)},T5=e=>{const t=yoe(e),n=Math.pow(e[0],2)+Math.pow(e[1],2),r=Math.sqrt(n),i=(e[0]*e[3]-e[2]*e[1])/r,s=Math.atan2(e[0]*e[2]+e[1]*e[3],n);return{angle:Zu(t),scaleX:r,scaleY:i,skewX:Zu(s),skewY:0,translateX:e[4]||0,translateY:e[5]||0}},ww=function(e){return[1,0,0,1,e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0]};function iy(){let{angle:e=0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{x:t=0,y:n=0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=ai(e),i=Ku(r),s=Xu(r);return[i,s,-s,i,t?t-(i*t-s*n):0,n?n-(s*t+i*n):0]}const cD=function(e){return[e,0,0,arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,0,0]},boe=e=>Math.tan(ai(e)),voe=e=>[1,0,boe(e),1,0,0],woe=e=>[1,boe(e),0,1,0,0],H3=e=>{let{scaleX:t=1,scaleY:n=1,flipX:r=!1,flipY:i=!1,skewX:s=0,skewY:a=0}=e,o=cD(r?-t:t,i?-n:n);return s&&(o=cs(o,voe(s),!0)),a&&(o=cs(o,woe(a),!0)),o},_Ye=e=>{const{translateX:t=0,translateY:n=0,angle:r=0}=e;let i=ww(t,n);r&&(i=cs(i,iy({angle:r})));const s=H3(e);return kYe(s)||(i=cs(i,s)),i},CC=function(e){let{signal:t,crossOrigin:n=null}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(r,i){if(t&&t.aborted)return i(new mYe("loadImage"));const s=CYe();let a;t&&(a=function(c){s.src="",i(c)},t.addEventListener("abort",a,{once:!0}));const o=function(){s.onload=s.onerror=null,a&&(t==null||t.removeEventListener("abort",a)),r(s)};e?(s.onload=o,s.onerror=function(){a&&(t==null||t.removeEventListener("abort",a)),i(new sc("Error loading ".concat(s.src)))},n&&(s.crossOrigin=n),s.src=e):o()})},ov=function(e){let{signal:t,reviver:n=vC}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((r,i)=>{const s=[];t&&t.addEventListener("abort",i,{once:!0}),Promise.all(e.map(a=>ft.getClass(a.type).fromObject(a,{signal:t}).then(o=>(n(a,o),s.push(o),o)))).then(r).catch(a=>{s.forEach(o=>{o.dispose&&o.dispose()}),i(a)}).finally(()=>{t&&t.removeEventListener("abort",i)})})},q3=function(e){let{signal:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((n,r)=>{const i=[];t&&t.addEventListener("abort",r,{once:!0});const s=Object.values(e).map(o=>o&&o.type&&ft.has(o.type)?ov([o],{signal:t}).then(c=>{let[u]=c;return i.push(u),u}):o),a=Object.keys(e);Promise.all(s).then(o=>o.reduce((c,u,d)=>(c[a[d]]=u,c),{})).then(n).catch(o=>{i.forEach(c=>{c.dispose&&c.dispose()}),r(o)}).finally(()=>{t&&t.removeEventListener("abort",r)})})},sy=function(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:[]).reduce((t,n)=>(n in e&&(t[n]=e[n]),t),{})},uD=(e,t)=>Object.keys(e).reduce((n,r)=>(t(e[r],r,e)&&(n[r]=e[r]),n),{}),wr=(e,t)=>parseFloat(Number(e).toFixed(t)),lv=e=>"matrix("+e.map(t=>wr(t,Fn.NUM_FRACTION_DIGITS)).join(" ")+")",Po=e=>!!e&&e.toLive!==void 0,GV=e=>!!e&&typeof e.toObject=="function",WV=e=>!!e&&e.offsetX!==void 0&&"source"in e,Hf=e=>!!e&&"multiSelectionStacking"in e;function Soe(e){const t=e&&gl(e);let n=0,r=0;if(!e||!t)return{left:n,top:r};let i=e;const s=t.documentElement,a=t.body||{scrollLeft:0,scrollTop:0};for(;i&&(i.parentNode||i.host)&&(i=i.parentNode||i.host,i===t?(n=a.scrollLeft||s.scrollLeft||0,r=a.scrollTop||s.scrollTop||0):(n+=i.scrollLeft||0,r+=i.scrollTop||0),i.nodeType!==1||i.style.position!=="fixed"););return{left:n,top:r}}const gl=e=>e.ownerDocument||null,Coe=e=>{var t;return((t=e.ownerDocument)===null||t===void 0?void 0:t.defaultView)||null},koe=function(e,t,n){let{width:r,height:i}=n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;e.width=r,e.height=i,s>1&&(e.setAttribute("width",(r*s).toString()),e.setAttribute("height",(i*s).toString()),t.scale(s,s))},L7=(e,t)=>{let{width:n,height:r}=t;n&&(e.style.width=typeof n=="number"?"".concat(n,"px"):n),r&&(e.style.height=typeof r=="number"?"".concat(r,"px"):r)};function YV(e){return e.onselectstart!==void 0&&(e.onselectstart=()=>!1),e.style.userSelect=ja,e}class _oe{constructor(t){ie(this,"_originalCanvasStyle",void 0),ie(this,"lower",void 0);const n=this.createLowerCanvas(t);this.lower={el:n,ctx:n.getContext("2d")}}createLowerCanvas(t){const n=(r=t)&&r.getContext!==void 0?t:t&&ty().getElementById(t)||Qu();var r;if(n.hasAttribute("data-fabric"))throw new sc("Trying to initialize a canvas that has already been initialized. Did you forget to dispose the canvas?");return this._originalCanvasStyle=n.style.cssText,n.setAttribute("data-fabric","main"),n.classList.add("lower-canvas"),n}cleanupDOM(t){let{width:n,height:r}=t;const{el:i}=this.lower;i.classList.remove("lower-canvas"),i.removeAttribute("data-fabric"),i.setAttribute("width","".concat(n)),i.setAttribute("height","".concat(r)),i.style.cssText=this._originalCanvasStyle||"",this._originalCanvasStyle=void 0}setDimensions(t,n){const{el:r,ctx:i}=this.lower;koe(r,i,t,n)}setCSSDimensions(t){L7(this.lower.el,t)}calcOffset(){return function(t){var n;const r=t&&gl(t),i={left:0,top:0};if(!r)return i;const s=((n=Coe(t))===null||n===void 0?void 0:n.getComputedStyle(t,null))||{};i.left+=parseInt(s.borderLeftWidth,10)||0,i.top+=parseInt(s.borderTopWidth,10)||0,i.left+=parseInt(s.paddingLeft,10)||0,i.top+=parseInt(s.paddingTop,10)||0;let a={left:0,top:0};const o=r.documentElement;t.getBoundingClientRect!==void 0&&(a=t.getBoundingClientRect());const c=Soe(t);return{left:a.left+c.left-(o.clientLeft||0)+i.left,top:a.top+c.top-(o.clientTop||0)+i.top}}(this.lower.el)}dispose(){Cc().dispose(this.lower.el),delete this.lower}}const TYe={backgroundVpt:!0,backgroundColor:"",overlayVpt:!0,overlayColor:"",includeDefaultValues:!0,svgViewportTransformation:!0,renderOnAddRemove:!0,skipOffscreen:!0,enableRetinaScaling:!0,imageSmoothingEnabled:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,viewportTransform:[...ra]},EYe=["objects"];class Sw extends moe(poe){get lowerCanvasEl(){var t;return(t=this.elements.lower)===null||t===void 0?void 0:t.el}get contextContainer(){var t;return(t=this.elements.lower)===null||t===void 0?void 0:t.ctx}static getDefaults(){return Sw.ownDefaults}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,this.constructor.getDefaults()),this.set(n),this.initElements(t),this._setDimensionsImpl({width:this.width||this.elements.lower.el.width||0,height:this.height||this.elements.lower.el.height||0}),this.skipControlsDrawing=!1,this.viewportTransform=[...this.viewportTransform],this.calcViewportBoundaries()}initElements(t){this.elements=new _oe(t)}add(){const t=super.add(...arguments);return arguments.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),t}insertAt(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const s=super.insertAt(t,...r);return r.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),s}remove(){const t=super.remove(...arguments);return t.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),t}_onObjectAdded(t){t.canvas&&t.canvas!==this&&(Zh("warn",`Canvas is trying to add an object that belongs to a different canvas. 1154Resulting to default behavior: removing object from previous canvas and adding to new canvas`),t.canvas.remove(t)),t._set("canvas",this),t.setCoords(),this.fire("object:added",{target:t}),t.fire("added",{target:this})}_onObjectRemoved(t){t._set("canvas",void 0),this.fire("object:removed",{target:t}),t.fire("removed",{target:this})}_onStackOrderChanged(){this.renderOnAddRemove&&this.requestRenderAll()}getRetinaScaling(){return this.enableRetinaScaling?uoe():1}calcOffset(){return this._offset=this.elements.calcOffset()}getWidth(){return this.width}getHeight(){return this.height}setWidth(t,n){return this.setDimensions({width:t},n)}setHeight(t,n){return this.setDimensions({height:t},n)}_setDimensionsImpl(t){let{cssOnly:n=!1,backstoreOnly:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!n){const i=le({width:this.width,height:this.height},t);this.elements.setDimensions(i,this.getRetinaScaling()),this.hasLostContext=!0,this.width=i.width,this.height=i.height}r||this.elements.setCSSDimensions(t),this.calcOffset()}setDimensions(t,n){this._setDimensionsImpl(t,n),n&&n.cssOnly||this.requestRenderAll()}getZoom(){return this.viewportTransform[0]}setViewportTransform(t){this.viewportTransform=t,this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll()}zoomToPoint(t,n){const r=t,i=[...this.viewportTransform],s=fa(t,bl(i));i[0]=n,i[3]=n;const a=fa(s,i);i[4]+=r.x-a.x,i[5]+=r.y-a.y,this.setViewportTransform(i)}setZoom(t){this.zoomToPoint(new be(0,0),t)}absolutePan(t){const n=[...this.viewportTransform];return n[4]=-t.x,n[5]=-t.y,this.setViewportTransform(n)}relativePan(t){return this.absolutePan(new be(-t.x-this.viewportTransform[4],-t.y-this.viewportTransform[5]))}getElement(){return this.elements.lower.el}clearContext(t){t.clearRect(0,0,this.width,this.height)}getContext(){return this.elements.lower.ctx}clear(){this.remove(...this.getObjects()),this.backgroundImage=void 0,this.overlayImage=void 0,this.backgroundColor="",this.overlayColor="",this.clearContext(this.getContext()),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll()}renderAll(){this.cancelRequestedRender(),this.destroyed||this.renderCanvas(this.getContext(),this._objects)}renderAndReset(){this.nextRenderHandle=0,this.renderAll()}requestRenderAll(){this.nextRenderHandle||this.disposed||this.destroyed||(this.nextRenderHandle=SC(()=>this.renderAndReset()))}calcViewportBoundaries(){const t=this.width,n=this.height,r=bl(this.viewportTransform),i=fa({x:0,y:0},r),s=fa({x:t,y:n},r),a=i.min(s),o=i.max(s);return this.vptCoords={tl:a,tr:new be(o.x,a.y),bl:new be(a.x,o.y),br:o}}cancelRequestedRender(){this.nextRenderHandle&&(wYe(this.nextRenderHandle),this.nextRenderHandle=0)}drawControls(t){}renderCanvas(t,n){if(this.destroyed)return;const r=this.viewportTransform,i=this.clipPath;this.calcViewportBoundaries(),this.clearContext(t),t.imageSmoothingEnabled=this.imageSmoothingEnabled,t.patternQuality="best",this.fire("before:render",{ctx:t}),this._renderBackground(t),t.save(),t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),this._renderObjects(t,n),t.restore(),this.controlsAboveOverlay||this.skipControlsDrawing||this.drawControls(t),i&&(i._set("canvas",this),i.shouldCache(),i._transformDone=!0,i.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(t,i)),this._renderOverlay(t),this.controlsAboveOverlay&&!this.skipControlsDrawing&&this.drawControls(t),this.fire("after:render",{ctx:t}),this.__cleanupTask&&(this.__cleanupTask(),this.__cleanupTask=void 0)}drawClipPathOnCanvas(t,n){const r=this.viewportTransform;t.save(),t.transform(...r),t.globalCompositeOperation="destination-in",n.transform(t),t.scale(1/n.zoomX,1/n.zoomY),t.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),t.restore()}_renderObjects(t,n){for(let r=0,i=n.length;r<i;++r)n[r]&&n[r].render(t)}_renderBackgroundOrOverlay(t,n){const r=this["".concat(n,"Color")],i=this["".concat(n,"Image")],s=this.viewportTransform,a=this["".concat(n,"Vpt")];if(!r&&!i)return;const o=Po(r);if(r){if(t.save(),t.beginPath(),t.moveTo(0,0),t.lineTo(this.width,0),t.lineTo(this.width,this.height),t.lineTo(0,this.height),t.closePath(),t.fillStyle=o?r.toLive(t):r,a&&t.transform(...s),o){t.transform(1,0,0,1,r.offsetX||0,r.offsetY||0);const c=r.gradientTransform||r.patternTransform;c&&t.transform(...c)}t.fill(),t.restore()}if(i){t.save();const{skipOffscreen:c}=this;this.skipOffscreen=a,a&&t.transform(...s),i.render(t),this.skipOffscreen=c,t.restore()}}_renderBackground(t){this._renderBackgroundOrOverlay(t,"background")}_renderOverlay(t){this._renderBackgroundOrOverlay(t,"overlay")}getCenter(){return{top:this.height/2,left:this.width/2}}getCenterPoint(){return new be(this.width/2,this.height/2)}centerObjectH(t){return this._centerObject(t,new be(this.getCenterPoint().x,t.getCenterPoint().y))}centerObjectV(t){return this._centerObject(t,new be(t.getCenterPoint().x,this.getCenterPoint().y))}centerObject(t){return this._centerObject(t,this.getCenterPoint())}viewportCenterObject(t){return this._centerObject(t,this.getVpCenter())}viewportCenterObjectH(t){return this._centerObject(t,new be(this.getVpCenter().x,t.getCenterPoint().y))}viewportCenterObjectV(t){return this._centerObject(t,new be(t.getCenterPoint().x,this.getVpCenter().y))}getVpCenter(){return fa(this.getCenterPoint(),bl(this.viewportTransform))}_centerObject(t,n){t.setXY(n,pn,pn),t.setCoords(),this.renderOnAddRemove&&this.requestRenderAll()}toDatalessJSON(t){return this.toDatalessObject(t)}toObject(t){return this._toObjectMethod("toObject",t)}toJSON(){return this.toObject()}toDatalessObject(t){return this._toObjectMethod("toDatalessObject",t)}_toObjectMethod(t,n){const r=this.clipPath,i=r&&!r.excludeFromExport?this._toObject(r,t,n):null;return le(le(le({version:O7},sy(this,n)),{},{objects:this._objects.filter(s=>!s.excludeFromExport).map(s=>this._toObject(s,t,n))},this.__serializeBgOverlay(t,n)),i?{clipPath:i}:null)}_toObject(t,n,r){let i;this.includeDefaultValues||(i=t.includeDefaultValues,t.includeDefaultValues=!1);const s=t[n](r);return this.includeDefaultValues||(t.includeDefaultValues=!!i),s}__serializeBgOverlay(t,n){const r={},i=this.backgroundImage,s=this.overlayImage,a=this.backgroundColor,o=this.overlayColor;return Po(a)?a.excludeFromExport||(r.background=a.toObject(n)):a&&(r.background=a),Po(o)?o.excludeFromExport||(r.overlay=o.toObject(n)):o&&(r.overlay=o),i&&!i.excludeFromExport&&(r.backgroundImage=this._toObject(i,t,n)),s&&!s.excludeFromExport&&(r.overlayImage=this._toObject(s,t,n)),r}toSVG(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;t.reviver=n;const r=[];return this._setSVGPreamble(r,t),this._setSVGHeader(r,t),this.clipPath&&r.push('<g clip-path="url(#'.concat(this.clipPath.clipPathId,`)" > 1155`)),this._setSVGBgOverlayColor(r,"background"),this._setSVGBgOverlayImage(r,"backgroundImage",n),this._setSVGObjects(r,n),this.clipPath&&r.push(`</g> 1156`),this._setSVGBgOverlayColor(r,"overlay"),this._setSVGBgOverlayImage(r,"overlayImage",n),r.push("</svg>"),r.join("")}_setSVGPreamble(t,n){n.suppressPreamble||t.push('<?xml version="1.0" encoding="',n.encoding||"UTF-8",`" standalone="no" ?> 1157`,'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ',`"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 1158`)}_setSVGHeader(t,n){const r=n.width||"".concat(this.width),i=n.height||"".concat(this.height),s=Fn.NUM_FRACTION_DIGITS,a=n.viewBox;let o;if(a)o='viewBox="'.concat(a.x," ").concat(a.y," ").concat(a.width," ").concat(a.height,'" ');else if(this.svgViewportTransformation){const c=this.viewportTransform;o='viewBox="'.concat(wr(-c[4]/c[0],s)," ").concat(wr(-c[5]/c[3],s)," ").concat(wr(this.width/c[0],s)," ").concat(wr(this.height/c[3],s),'" ')}else o='viewBox="0 0 '.concat(this.width," ").concat(this.height,'" ');t.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',r,'" ','height="',i,'" ',o,`xml:space="preserve"> 1159`,"<desc>Created with Fabric.js ",O7,`</desc> 1160`,`<defs> 1161`,this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(n),`</defs> 1162`)}createSVGClipPathMarkup(t){const n=this.clipPath;return n?(n.clipPathId="CLIPPATH_".concat(Jh()),'<clipPath id="'.concat(n.clipPathId,`" > 1163`).concat(n.toClipPathSVG(t.reviver),`</clipPath> 1164`)):""}createSVGRefElementsMarkup(){return["background","overlay"].map(t=>{const n=this["".concat(t,"Color")];if(Po(n)){const r=this["".concat(t,"Vpt")],i=this.viewportTransform,s={isType:()=>!1,width:this.width/(r?i[0]:1),height:this.height/(r?i[3]:1)};return n.toSVG(s,{additionalTransform:r?lv(i):""})}}).join("")}createSVGFontFacesMarkup(){const t=[],n={},r=Fn.fontPaths;this._objects.forEach(function s(a){t.push(a),wC(a)&&a._objects.forEach(s)}),t.forEach(s=>{if(!(a=s)||typeof a._renderText!="function")return;var a;const{styles:o,fontFamily:c}=s;!n[c]&&r[c]&&(n[c]=!0,o&&Object.values(o).forEach(u=>{Object.values(u).forEach(d=>{let{fontFamily:h=""}=d;!n[h]&&r[h]&&(n[h]=!0)})}))});const i=Object.keys(n).map(s=>` @font-face { 1165 font-family: '`.concat(s,`'; 1166 src: url('`).concat(r[s],`'); 1167 } 1168`)).join("");return i?` <style type="text/css"><![CDATA[ 1169`.concat(i,`]]></style> 1170`):""}_setSVGObjects(t,n){this.forEachObject(r=>{r.excludeFromExport||this._setSVGObject(t,r,n)})}_setSVGObject(t,n,r){t.push(n.toSVG(r))}_setSVGBgOverlayImage(t,n,r){const i=this[n];i&&!i.excludeFromExport&&i.toSVG&&t.push(i.toSVG(r))}_setSVGBgOverlayColor(t,n){const r=this["".concat(n,"Color")];if(r)if(Po(r)){const i=r.repeat||"",s=this.width,a=this.height,o=this["".concat(n,"Vpt")]?lv(bl(this.viewportTransform)):"";t.push('<rect transform="'.concat(o," translate(").concat(s/2,",").concat(a/2,')" x="').concat(r.offsetX-s/2,'" y="').concat(r.offsetY-a/2,'" width="').concat(i!=="repeat-y"&&i!=="no-repeat"||!WV(r)?s:r.source.width,'" height="').concat(i!=="repeat-x"&&i!=="no-repeat"||!WV(r)?a:r.source.height,'" fill="url(#SVGID_').concat(r.id,`)"></rect> 1171`))}else t.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',r,'"',`></rect> 1172`)}loadFromJSON(t,n){let{signal:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return Promise.reject(new sc("`json` is undefined"));const i=typeof t=="string"?JSON.parse(t):t,{objects:s=[]}=i,a=Ar(i,EYe),{backgroundImage:o,background:c,overlayImage:u,overlay:d,clipPath:h}=a,f=this.renderOnAddRemove;return this.renderOnAddRemove=!1,Promise.all([ov(s,{reviver:n,signal:r}),q3({backgroundImage:o,backgroundColor:c,overlayImage:u,overlayColor:d,clipPath:h},{signal:r})]).then(m=>{let[p,x]=m;return this.clear(),this.add(...p),this.set(a),this.set(x),this.renderOnAddRemove=f,this})}clone(t){const n=this.toObject(t);return this.cloneWithoutData().loadFromJSON(n)}cloneWithoutData(){const t=Ko(this);return new this.constructor(t)}toDataURL(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{format:n="png",quality:r=1,multiplier:i=1,enableRetinaScaling:s=!1}=t,a=i*(s?this.getRetinaScaling():1);return goe(this.toCanvasElement(a,t),n,r)}toBlob(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{format:n="png",quality:r=1,multiplier:i=1,enableRetinaScaling:s=!1}=t,a=i*(s?this.getRetinaScaling():1);return xoe(this.toCanvasElement(a,t),n,r)}toCanvasElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,{width:n,height:r,left:i,top:s,filter:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=(n||this.width)*t,c=(r||this.height)*t,u=this.getZoom(),d=this.width,h=this.height,f=this.skipControlsDrawing,m=u*t,p=this.viewportTransform,x=[m,0,0,m,(p[4]-(i||0))*t,(p[5]-(s||0))*t],v=this.enableRetinaScaling,g=Ko({width:o,height:c}),y=a?this._objects.filter(w=>a(w)):this._objects;return this.enableRetinaScaling=!1,this.viewportTransform=x,this.width=o,this.height=c,this.skipControlsDrawing=!0,this.calcViewportBoundaries(),this.renderCanvas(g.getContext("2d"),y),this.viewportTransform=p,this.width=d,this.height=h,this.calcViewportBoundaries(),this.enableRetinaScaling=v,this.skipControlsDrawing=f,g}dispose(){return!this.disposed&&this.elements.cleanupDOM({width:this.width,height:this.height}),_5.cancelByCanvas(this),this.disposed=!0,new Promise((t,n)=>{const r=()=>{this.destroy(),t(!0)};r.kill=n,this.__cleanupTask&&this.__cleanupTask.kill("aborted"),this.destroyed?t(!1):this.nextRenderHandle?this.__cleanupTask=r:r()})}destroy(){this.destroyed=!0,this.cancelRequestedRender(),this.forEachObject(t=>t.dispose()),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose(),this.backgroundImage=void 0,this.overlayImage&&this.overlayImage.dispose(),this.overlayImage=void 0,this.elements.dispose()}toString(){return"#<Canvas (".concat(this.complexity(),"): { objects: ").concat(this._objects.length," }>")}}ie(Sw,"ownDefaults",TYe);const jYe=["touchstart","touchmove","touchend"],NYe=e=>{const t=Soe(e.target),n=function(r){const i=r.changedTouches;return i&&i[0]?i[0]:r}(e);return new be(n.clientX+t.left,n.clientY+t.top)},P7=e=>jYe.includes(e.type)||e.pointerType==="touch",KV=e=>{e.preventDefault(),e.stopPropagation()},Nu=e=>{let t=0,n=0,r=0,i=0;for(let s=0,a=e.length;s<a;s++){const{x:o,y:c}=e[s];(o>r||!s)&&(r=o),(o<t||!s)&&(t=o),(c>i||!s)&&(i=c),(c<n||!s)&&(n=c)}return{left:t,top:n,width:r-t,height:i-n}},AYe=["translateX","translateY","scaleX","scaleY"],MYe=(e,t)=>E5(e,cs(t,e.calcOwnMatrix())),E5=(e,t)=>{const n=T5(t),{translateX:r,translateY:i,scaleX:s,scaleY:a}=n,o=Ar(n,AYe),c=new be(r,i);e.flipX=!1,e.flipY=!1,Object.assign(e,o),e.set({scaleX:s,scaleY:a}),e.setPositionByOrigin(c,pn,pn)},RYe=e=>{e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},Toe=e=>({scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}),dD=(e,t,n)=>{const r=e/2,i=t/2,s=[new be(-r,-i),new be(r,-i),new be(-r,i),new be(r,i)].map(o=>o.transform(n)),a=Nu(s);return new be(a.width,a.height)},G3=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ra;return cs(bl(arguments.length>1&&arguments[1]!==void 0?arguments[1]:ra),e)},X0=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ra,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ra;return e.transform(G3(t,n))},OYe=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ra,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ra;return e.transform(G3(t,n),!0)},DYe=(e,t,n)=>{const r=G3(t,n);return E5(e,cs(r,e.calcOwnMatrix())),r},Eoe=(e,t)=>{var n;const{transform:{target:r}}=t;(n=r.canvas)===null||n===void 0||n.fire("object:".concat(e),le(le({},t),{},{target:r})),r.fire(e,t)},LYe={left:-.5,top:-.5,center:0,bottom:.5,right:.5},gi=e=>typeof e=="string"?LYe[e]:e-.5,j5="not-allowed";function joe(e){return gi(e.originX)===gi(pn)&&gi(e.originY)===gi(pn)}function XV(e){return .5-gi(e)}const El=(e,t)=>e[t],Noe=(e,t,n,r)=>({e,transform:t,pointer:new be(n,r)});function Aoe(e,t){const n=e.getTotalAngle()+Zu(Math.atan2(t.y,t.x))+360;return Math.round(n%360/45)}function hD(e,t,n,r,i){var s;let{target:a,corner:o}=e;const c=a.controls[o],u=((s=a.canvas)===null||s===void 0?void 0:s.getZoom())||1,d=a.padding/u,h=function(f,m,p,x){const v=f.getRelativeCenterPoint(),g=p!==void 0&&x!==void 0?f.translateToGivenOrigin(v,pn,pn,p,x):new be(f.left,f.top);return(f.angle?m.rotate(-ai(f.angle),v):m).subtract(g)}(a,new be(r,i),t,n);return h.x>=d&&(h.x-=d),h.x<=-d&&(h.x+=d),h.y>=d&&(h.y-=d),h.y<=d&&(h.y+=d),h.x-=c.offsetX,h.y-=c.offsetY,h}const PYe=(e,t,n,r)=>{const{target:i,offsetX:s,offsetY:a}=t,o=n-s,c=r-a,u=!El(i,"lockMovementX")&&i.left!==o,d=!El(i,"lockMovementY")&&i.top!==c;return u&&i.set(Zn,o),d&&i.set(Ea,c),(u||d)&&Eoe(doe,Noe(e,t,n,r)),u||d},N5=e=>e.replace(/\s+/g," "),QV={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA5
11725D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#639",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32"},$E=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),ZV=(e,t,n,r)=>{e/=255,t/=255,n/=255;const i=Math.max(e,t,n),s=Math.min(e,t,n);let a,o;const c=(i+s)/2;if(i===s)a=o=0;else{const u=i-s;switch(o=c>.5?u/(2-i-s):u/(i+s),i){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4}a/=6}return[Math.round(360*a),Math.round(100*o),Math.round(100*c),r]},JV=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"1";return parseFloat(e)/(e.endsWith("%")?100:1)},$2=e=>Math.min(Math.round(e),255).toString(16).toUpperCase().padStart(2,"0"),eH=e=>{let[t,n,r,i=1]=e;const s=Math.round(.3*t+.59*n+.11*r);return[s,s,s,i]};class er{constructor(t){if(ie(this,"isUnrecognised",!1),t)if(t instanceof er)this.setSource([...t._source]);else if(Array.isArray(t)){const[n,r,i,s=1]=t;this.setSource([n,r,i,s])}else this.setSource(this._tryParsingColor(t));else this.setSource([0,0,0,1])}_tryParsingColor(t){return(t=t.toLowerCase())in QV&&(t=QV[t]),t==="transparent"?[255,255,255,0]:er.sourceFromHex(t)||er.sourceFromRgb(t)||er.sourceFromHsl(t)||(this.isUnrecognised=!0)&&[0,0,0,1]}getSource(){return this._source}setSource(t){this._source=t}toRgb(){const[t,n,r]=this.getSource();return"rgb(".concat(t,",").concat(n,",").concat(r,")")}toRgba(){return"rgba(".concat(this.getSource().join(","),")")}toHsl(){const[t,n,r]=ZV(...this.getSource());return"hsl(".concat(t,",").concat(n,"%,").concat(r,"%)")}toHsla(){const[t,n,r,i]=ZV(...this.getSource());return"hsla(".concat(t,",").concat(n,"%,").concat(r,"%,").concat(i,")")}toHex(){return this.toHexa().slice(0,6)}toHexa(){const[t,n,r,i]=this.getSource();return"".concat($2(t)).concat($2(n)).concat($2(r)).concat($2(Math.round(255*i)))}getAlpha(){return this.getSource()[3]}setAlpha(t){return this._source[3]=t,this}toGrayscale(){return this.setSource(eH(this.getSource())),this}toBlackWhite(t){const[n,,,r]=eH(this.getSource()),i=n<(t||127)?0:255;return this.setSource([i,i,i,r]),this}overlayWith(t){t instanceof er||(t=new er(t));const n=this.getSource(),r=t.getSource(),[i,s,a]=n.map((o,c)=>Math.round(.5*o+.5*r[c]));return this.setSource([i,s,a,n[3]]),this}static fromRgb(t){return er.fromRgba(t)}static fromRgba(t){return new er(er.sourceFromRgb(t))}static sourceFromRgb(t){const n=N5(t).match(/^rgba?\(\s?(\d{0,3}(?:\.\d+)?%?)\s?[\s|,]\s?(\d{0,3}(?:\.\d+)?%?)\s?[\s|,]\s?(\d{0,3}(?:\.\d+)?%?)\s?(?:\s?[,/]\s?(\d{0,3}(?:\.\d+)?%?)\s?)?\)$/i);if(n){const[r,i,s]=n.slice(1,4).map(a=>{const o=parseFloat(a);return a.endsWith("%")?Math.round(2.55*o):o});return[r,i,s,JV(n[4])]}}static fromHsl(t){return er.fromHsla(t)}static fromHsla(t){return new er(er.sourceFromHsl(t))}static sourceFromHsl(t){const n=N5(t).match(/^hsla?\(\s?([+-]?\d{0,3}(?:\.\d+)?(?:deg|turn|rad)?)\s?[\s|,]\s?(\d{0,3}(?:\.\d+)?%?)\s?[\s|,]\s?(\d{0,3}(?:\.\d+)?%?)\s?(?:\s?[,/]\s?(\d*(?:\.\d+)?%?)\s?)?\)$/i);if(!n)return;const r=(er.parseAngletoDegrees(n[1])%360+360)%360/360,i=parseFloat(n[2])/100,s=parseFloat(n[3])/100;let a,o,c;if(i===0)a=o=c=s;else{const u=s<=.5?s*(i+1):s+i-s*i,d=2*s-u;a=$E(d,u,r+1/3),o=$E(d,u,r),c=$E(d,u,r-1/3)}return[Math.round(255*a),Math.round(255*o),Math.round(255*c),JV(n[4])]}static fromHex(t){return new er(er.sourceFromHex(t))}static sourceFromHex(t){if(t.match(/^#?(([0-9a-f]){3,4}|([0-9a-f]{2}){3,4})$/i)){const n=t.slice(t.indexOf("#")+1);let r;r=n.length<=4?n.split("").map(c=>c+c):n.match(/.{2}/g);const[i,s,a,o=255]=r.map(c=>parseInt(c,16));return[i,s,a,o/255]}}static parseAngletoDegrees(t){const n=t.toLowerCase(),r=parseFloat(n);return n.includes("rad")?Zu(r):n.includes("turn")?360*r:r}}const Q0=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:iD;const n=/\D{0,2}$/.exec(e),r=parseFloat(e),i=Fn.DPI;switch(n==null?void 0:n[0]){case"mm":return r*i/25.4;case"cm":return r*i/2.54;case"in":return r*i;case"pt":return r*i/72;case"pc":return r*i/72*12;case"em":return r*t;default:return r}},IYe=e=>{const[t,n]=e.trim().split(" "),[r,i]=(s=t)&&s!==ja?[s.slice(1,4),s.slice(5,8)]:s===ja?[s,s]:["Mid","Mid"];var s;return{meetOrSlice:n||"meet",alignX:r,alignY:i}},cv=function(e,t){let n,r,i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(t)if(t.toLive)n="url(#SVGID_".concat(t.id,")");else{const s=new er(t),a=s.getAlpha();n=s.toRgb(),a!==1&&(r=a.toString())}else n="none";return i?"".concat(e,": ").concat(n,";
1172 ").concat(r?"".concat(e,"-opacity: ").concat(r,"; "):""):"".concat(e,'="').concat(n,'" ').concat(r?"".concat(e,'-opacity="').concat(r,'" '):"")};class Moe{getSvgStyles(t){const n=this.fillRule?this.fillRule:"nonzero",r=this.strokeWidth?this.strokeWidth:"0",i=this.strokeDashArray?this.strokeDashArray.join(" "):ja,s=this.strokeDashOffset?this.strokeDashOffset:"0",a=this.strokeLineCap?this.strokeLineCap:"butt",o=this.strokeLineJoin?this.strokeLineJoin:"miter",c=this.strokeMiterLimit?this.strokeMiterLimit:"4",u=this.opacity!==void 0?this.opacity:"1",d=this.visible?"":" visibility: hidden;",h=t?"":this.getSvgFilter(),f=cv(Pi,this.fill);return[cv(Na,this.stroke),"stroke-width: ",r,"; ","stroke-dasharray: ",i,"; ","stroke-linecap: ",a,"; ","stroke-dashoffset: ",s,"; ","stroke-linejoin: ",o,"; ","stroke-miterlimit: ",c,"; ",f,"fill-rule: ",n,"; ","opacity: ",u,";",h,d].join("")}getSvgFilter(){return this.shadow?"filter: url(#SVGID_".concat(this.shadow.id,");"):""}getSvgCommons(){return[this.id?'id="'.concat(this.id,'" '):"",this.clipPath?'clip-path="url(#'.concat(this.clipPath.clipPathId,')" '):""].join("")}getSvgTransform(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t?this.calcTransformMatrix():this.calcOwnMatrix(),i='transform="'.concat(lv(r));return"".concat(i).concat(n,'" ')}_toSVG(t){return[""]}toSVG(t){return this._createBaseSVGMarkup(this._toSVG(t),{reviver:t})}toClipPathSVG(t){return" "+this._createBaseClipPathSVGMarkup(this._toSVG(t),{reviver:t})}_createBaseClipPathSVGMarkup(t){let{reviver:n,additionalTransform:r=""}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=[this.getSvgTransform(!0,r),this.getSvgCommons()].join(""),s=t.indexOf("COMMON_PARTS");return t[s]=i,n?n(t.join("")):t.join("")}_createBaseSVGMarkup(t){let{noStyle:n,reviver:r,withShadow:i,additionalTransform:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=n?"":'style="'.concat(this.getSvgStyles(),'" '),o=i?'style="'.concat(this.getSvgFilter(),'" '):"",c=this.clipPath,u=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",d=c&&c.absolutePositioned,h=this.stroke,f=this.fill,m=this.shadow,p=[],x=t.indexOf("COMMON_PARTS");let v;c&&(c.clipPathId="CLIPPATH_".concat(Jh()),v='<clipPath id="'.concat(c.clipPathId,`" > 1173`).concat(c.toClipPathSVG(r),`</clipPath> 1174`)),d&&p.push("<g ",o,this.getSvgCommons(),` > 1175`),p.push("<g ",this.getSvgTransform(!1),d?"":o+this.getSvgCommons(),` > 1176`);const g=[a,u,n?"":this.addPaintOrder()," ",s?'transform="'.concat(s,'" '):""].join("");return t[x]=g,Po(f)&&p.push(f.toSVG(this)),Po(h)&&p.push(h.toSVG(this)),m&&p.push(m.toSVG(this)),c&&p.push(v),p.push(t.join("")),p.push(`</g> 1177`),d&&p.push(`</g> 1178`),r?r(p.join("")):p.join("")}addPaintOrder(){return this.paintFirst!==Pi?' paint-order="'.concat(this.paintFirst,'" '):""}}function W3(e){return new RegExp("^("+e.join("|")+")\\b","i")}const tp="textDecorationThickness",Roe=["fontSize","fontWeight","fontFamily","fontStyle"],Ooe=["underline","overline","linethrough"],Doe=[...Roe,"lineHeight","text","charSpacing","textAlign","styles","path","pathStartOffset","pathSide","pathAlign"],Loe=[...Doe,...Ooe,"textBackgroundColor","direction",tp],FYe=[...Roe,...Ooe,Na,"strokeWidth",Pi,"deltaY","textBackgroundColor",tp],BYe={_reNewline:sD,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:Zn,fontStyle:"normal",lineHeight:1.16,textBackgroundColor:"",stroke:null,shadow:null,path:void 0,pathStartOffset:0,pathSide:Zn,pathAlign:"baseline",charSpacing:0,deltaY:0,direction:"ltr",CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.28167,overline:-.81333},_fontSizeMult:1.13,[tp]:66.667},Kl="justify",A5="justify-left",lb="justify-right",cb="justify-center";var tH,nH,rH;const vl=String.raw(tH||(tH=Pc(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"],["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))),UE=String.raw(nH||(nH=Pc(["(?:s*,?s+|s*,s*)"],["(?:\\s*,?\\s+|\\s*,\\s*
1178)"]))),zYe=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+vl+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+vl+"))?\\s+(.*)"),$Ye={cx:Zn,x:Zn,r:"radius",cy:Ea,y:Ea,display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing","text-decoration-thickness":tp},VE="font-size",HE="clip-path";W3(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]);W3(["symbol","image","marker","pattern","view","svg"]);const iH=W3(["symbol","g","a","svg","clipPath","defs"]);new RegExp(String.raw(rH||(rH=Pc(["^s*(",")","(",")","(",")","(",")s*$"],["^\\s*(",")","(",")","(",")","(",")\\s*$"])),vl,UE,vl,UE,vl,UE,vl));const UYe=new be(1,0),Poe=new be,Ioe=(e,t)=>e.rotate(t),I7=(e,t)=>new be(t).subtract(e),F7=e=>e.distanceFrom(Poe),B7=(e,t)=>Math.atan2(ub(e,t),HYe(e,t)),VYe=e=>B7(UYe,e),fD=e=>e.eq(Poe)?e:e.scalarDivide(F7(e)),Foe=function(e){let t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return fD(new be(-e.y,e.x).scalarMultiply(t?1:-1))},ub=(e,t)=>e.x*t.y-e.y*t.x,HYe=(e,t)=>e.x*t.x+e.y*t.y,sH=(e,t,n)=>{if(e.eq(t)||e.eq(n))return!0;const r=ub(t,n),i=ub(t,e),s=ub(n,e);return r>=0?i>=0&&s<=0:!(i<=0&&s>=0)},aH="(-?\\d+(?:\\.\\d*)?(?:px)?(?:\\s?|$))?",oH=new RegExp("(?:\\s|^)"+aH+aH+"("+vl+"?(?:px)?)?(?:\\s?|$)(?:$|\\s)");class Au{constructor(t){const n=typeof t=="string"?Au.parseShadow(t):t;Object.assign(this,Au.ownDefaults,n),this.id=Jh()}static parseShadow(t){const n=t.trim(),[,r=0,i=0,s=0]=(oH.exec(n)||[]).map(a=>parseFloat(a)||0);return{color:(n.replace(oH,"")||"rgb(0,0,0)").trim(),offsetX:r,offsetY:i,blur:s}}toString(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")}toSVG(t){const n=Ioe(new be(this.offsetX,this.offsetY),ai(-t.angle)),r=new er(this.color);let i=40,s=40;return t.width&&t.height&&(i=100*wr((Math.abs(n.x)+this.blur)/t.width,Fn.NUM_FRACTION_DIGITS)+20,s=100*wr((Math.abs(n.y)+this.blur)/t.height,Fn.NUM_FRACTION_DIGITS)+20),t.flipX&&(n.x*=-1),t.flipY&&(n.y*=-1),'<filter id="SVGID_'.concat(this.id,'" y="-').concat(s,'%" height="').concat(100+2*s,'%" x="-').concat(i,'%" width="').concat(100+2*i,`%" > 1179 <feGaussianBlur in="SourceAlpha" stdDeviation="`).concat(wr(this.blur?this.blur/2:0,Fn.NUM_FRACTION_DIGITS),`"></feGaussianBlur> 1180 <feOffset dx="`).concat(wr(n.x,Fn.NUM_FRACTION_DIGITS),'" dy="').concat(wr(n.y,Fn.NUM_FRACTION_DIGITS),`" result="oBlur" ></feOffset> 1181 <feFlood flood-color="`).concat(r.toRgb(),'" flood-opacity="').concat(r.getAlpha(),`"/> 1182 <feComposite in2="oBlur" operator="in" /> 1183 <feMerge> 1184 <feMergeNode></feMergeNode> 1185 <feMergeNode in="SourceGraphic"></feMergeNode> 1186 </feMerge> 1187</filter> 1188`)}toObject(){const t={color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling,type:this.constructor.type},n=Au.ownDefaults;return this.includeDefaultValues?t:uD(t,(r,i)=>r!==n[i])}static async fromObject(t){return new this(t)}}ie(Au,"ownDefaults",{color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1}),ie(Au,"type","shadow"),ft.setClass(Au,"shadow");const ax=(e,t,n)=>Math.max(e,Math.min(t,n)),qYe=[Ea,Zn,Oa,Yo,"flipX","flipY","originX","originY","angle","opacity","globalCompositeOperation","shadow","visible",ny,ry],yd=[Pi,Na,"strokeWidth","strokeDashArray","width","height","paintFirst","strokeUniform","strokeLineCap","strokeDashOffset","strokeLineJoin","strokeMiterLimit","backgroundColor","clipPath"],GYe={top:0,left:0,width:0,height:0,angle:0,flipX:!1,flipY:!1,scaleX:1,scaleY:1,minScaleLimit:0,skewX:0,skewY:0,originX:Zn,originY:Ea,strokeWidth:1,strokeUniform:!1,padding:0,opacity:1,paintFirst:Pi,fill:"rgb(0,0,0)",fillRule:"nonzero",stroke:null,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,globalCompositeOperation:"source-over",backgroundColor:"",shadow:null,visible:!0,includeDefaultValues:!0,excludeFromExport:!1,objectCaching:!0,clipPath:void 0,inverted:!1,absolutePositioned:!1,centeredRotation:!0,centeredScaling:!1,dirty:!0},WYe=(e,t,n,r)=>
vendor: 28,024 bytes, line 1188
1188-n*Math.cos(e/r*vw)+n+t,YYe=()=>!1;class mD{constructor(t){let{startValue:n,byValue:r,duration:i=500,delay:s=0,easing:a=WYe,onStart:o=vC,onChange:c=vC,onComplete:u=vC,abort:d=YYe,target:h}=t;ie(this,"_state","pending"),ie(this,"durationProgress",0),ie(this,"valueProgress",0),this.tick=this.tick.bind(this),this.duration=i,this.delay=s,this.easing=a,this._onStart=o,this._onChange=c,this._onComplete=u,this._abort=d,this.target=h,this.startValue=n,this.byValue=r,this.value=this.startValue,this.endValue=Object.freeze(this.calculate(this.duration).value)}get state(){return this._state}isDone(){return this._state==="aborted"||this._state==="completed"}start(){const t=n=>{this._state==="pending"&&(this.startTime=n||+new Date,this._state="running",this._onStart(),this.tick(this.startTime))};this.register(),this.delay>0?setTimeout(()=>SC(t),this.delay):SC(t)}tick(t){const n=(t||+new Date)-this.startTime,r=Math.min(n,this.duration);this.durationProgress=r/this.duration;const{value:i,valueProgress:s}=this.calculate(r);this.value=Object.freeze(i),this.valueProgress=s,this._state!=="aborted"&&(this._abort(this.value,this.valueProgress,this.durationProgress)?(this._state="aborted",this.unregister()):n>=this.duration?(this.durationProgress=this.valueProgress=1,this._onChange(this.endValue,this.valueProgress,this.durationProgress),this._state="completed",this._onComplete(this.endValue,this.valueProgress,this.durationProgress),this.unregister()):(this._onChange(this.value,this.valueProgress,this.durationProgress),SC(this.tick)))}register(){_5.push(this)}unregister(){_5.remove(this)}abort(){this._state="aborted",this.unregister()}}const KYe=["startValue","endValue"];class XYe extends mD{constructor(t){let{startValue:n=0,endValue:r=100}=t;super(le(le({},Ar(t,KYe)),{},{startValue:n,byValue:r-n}))}calculate(t){const n=this.easing(t,this.startValue,this.byValue,this.duration);return{value:n,valueProgress:Math.abs((n-this.startValue)/this.byValue)}}}const QYe=["startValue","endValue"];class ZYe extends mD{constructor(t){let{startValue:n=[0],endValue:r=[100]}=t;super(le(le({},Ar(t,QYe)),{},{startValue:n,byValue:r.map((i,s)=>i-n[s])}))}calculate(t){const n=this.startValue.map((r,i)=>this.easing(t,r,this.byValue[i],this.duration,i));return{value:n,valueProgress:Math.abs((n[0]-this.startValue[0])/this.byValue[0])}}}const JYe=["startValue","endValue","easing","onChange","onComplete","abort"],eKe=(e,t,n,r)=>t+n*(1-Math.cos(e/r*vw)),qE=e=>e&&((t,n,r)=>e(new er(t).toRgba(),n,r));class tKe extends mD{constructor(t){let{startValue:n,endValue:r,easing:i=eKe,onChange:s,onComplete:a,abort:o}=t,c=Ar(t,JYe);const u=new er(n).getSource(),d=new er(r).getSource();super(le(le({},c),{},{startValue:u,byValue:d.map((h,f)=>h-u[f]),easing:i,onChange:qE(s),onComplete:qE(a),abort:qE(o)}))}calculate(t){const[n,r,i,s]=this.startValue.map((o,c)=>this.easing(t,o,this.byValue[c],this.duration,c)),a=[...[n,r,i].map(Math.round),ax(0,s,1)];return{value:a,valueProgress:a.map((o,c)=>this.byValue[c]!==0?Math.abs((o-this.startValue[c])/this.byValue[c]):0).find(o=>o!==0)||0}}}function Boe(e){const t=(n=>Array.isArray(n.startValue)||Array.isArray(n.endValue))(e)?new ZYe(e):new XYe(e);return t.start(),t}function nKe(e){const t=new tKe(e);return t.start(),t}class Vr{constructor(t){this.status=t,this.points=[]}includes(t){return this.points.some(n=>n.eq(t))}append(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.points=this.points.concat(n.filter(i=>!this.includes(i))),this}static isPointContained(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(n.eq(r))return t.eq(n);if(n.x===r.x)return t.x===n.x&&(i||t.y>=Math.min(n.y,r.y)&&t.y<=Math.max(n.y,r.y));if(n.y===r.y)return t.y===n.y&&(i||t.x>=Math.min(n.x,r.x)&&t.x<=Math.max(n.x,r.x));{const s=I7(n,r),a=I7(n,t).divide(s);return i?Math.abs(a.x)===Math.abs(a.y):a.x===a.y&&a.x>=0&&a.x<=1}}static isPointInPolygon(t,n){const r=new be(t).setX(Math.min(t.x-1,...n.map(s=>s.x)));let i=0;for(let s=0;s<n.length;s++){const a=this.intersectSegmentSegment(n[s],n[(s+1)%n.length],t,r);if(a.includes(t))return!0;i+=+(a.status==="Intersection")}return i%2==1}static intersectLineLine(t,n,r,i){let s=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=!(arguments.length>5&&arguments[5]!==void 0)||arguments[5];const o=n.x-t.x,c=n.y-t.y,u=i.x-r.x,d=i.y-r.y,h=t.x-r.x,f=t.y-r.y,m=u*f-d*h,p=o*f-c*h,x=d*o-u*c;if(x!==0){const v=m/x,g=p/x;return(s||0<=v&&v<=1)&&(a||0<=g&&g<=1)?new Vr("Intersection").append(new be(t.x+v*o,t.y+v*c)):new Vr}if(m===0||p===0){const v=s||a||Vr.isPointContained(t,r,i)||Vr.isPointContained(n,r,i)||Vr.isPointContained(r,t,n)||Vr.isPointContained(i,t,n);return new Vr(v?"Coincident":void 0)}return new Vr("Parallel")}static intersectSegmentLine(t,n,r,i){return Vr.intersectLineLine(t,n,r,i,!1,!0)}static intersectSegmentSegment(t,n,r,i){return Vr.intersectLineLine(t,n,r,i,!1,!1)}static intersectLinePolygon(t,n,r){let i=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];const s=new Vr,a=r.length;for(let o,c,u,d=0;d<a;d++){if(o=r[d],c=r[(d+1)%a],u=Vr.intersectLineLine(t,n,o,c,i,!1),u.status==="Coincident")return u;s.append(...u.points)}return s.points.length>0&&(s.status="Intersection"),s}static intersectSegmentPolygon(t,n,r){return Vr.intersectLinePolygon(t,n,r,!1)}static intersectPolygonPolygon(t,n){const r=new Vr,i=t.length,s=[];for(let a=0;a<i;a++){const o=t[a],c=t[(a+1)%i],u=Vr.intersectSegmentPolygon(o,c,n);u.status==="Coincident"?(s.push(u),r.append(o,c)):r.append(...u.points)}return s.length>0&&s.length===t.length?new Vr("Coincident"):(r.points.length>0&&(r.status="Intersection"),r)}static intersectPolygonRectangle(t,n,r){const i=n.min(r),s=n.max(r),a=new be(s.x,i.y),o=new be(i.x,s.y);return Vr.intersectPolygonPolygon(t,[i,a,s,o])}}class rKe extends poe{getX(){return this.getXY().x}setX(t){this.setXY(this.getXY().setX(t))}getY(){return this.getXY().y}setY(t){this.setXY(this.getXY().setY(t))}getRelativeX(){return this.left}setRelativeX(t){this.left=t}getRelativeY(){return this.top}setRelativeY(t){this.top=t}getXY(){const t=this.getRelativeXY();return this.group?fa(t,this.group.calcTransformMatrix()):t}setXY(t,n,r){this.group&&(t=fa(t,bl(this.group.calcTransformMatrix()))),this.setRelativeXY(t,n,r)}getRelativeXY(){return new be(this.left,this.top)}setRelativeXY(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.originX,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.originY;this.setPositionByOrigin(t,n,r)}isStrokeAccountedForInDimensions(){return!1}getCoords(){const{tl:t,tr:n,br:r,bl:i}=this.aCoords||(this.aCoords=this.calcACoords()),s=[t,n,r,i];if(this.group){const a=this.group.calcTransformMatrix();return s.map(o=>fa(o,a))}return s}intersectsWithRect(t,n){return Vr.intersectPolygonRectangle(this.getCoords(),t,n).status==="Intersection"}intersectsWithObject(t){const n=Vr.intersectPolygonPolygon(this.getCoords(),t.getCoords());return n.status==="Intersection"||n.status==="Coincident"||t.isContainedWithinObject(this)||this.isContainedWithinObject(t)}isContainedWithinObject(t){return this.getCoords().every(n=>t.containsPoint(n))}isContainedWithinRect(t,n){const{left:r,top:i,width:s,height:a}=this.getBoundingRect();return r>=t.x&&r+s<=n.x&&i>=t.y&&i+a<=n.y}isOverlapping(t){return this.intersectsWithObject(t)||this.isContainedWithinObject(t)||t.isContainedWithinObject(this)}containsPoint(t){return Vr.isPointInPolygon(t,this.getCoords())}isOnScreen(){if(!this.canvas)return!1;const{tl:t,br:n}=this.canvas.vptCoords;return!!this.getCoords().some(r=>r.x<=n.x&&r.x>=t.x&&r.y<=n.y&&r.y>=t.y)||!!this.intersectsWithRect(t,n)||this.containsPoint(t.midPointFrom(n))}isPartiallyOnScreen(){if(!this.canvas)return!1;const{tl:t,br:n}=this.canvas.vptCoords;return this.intersectsWithRect(t,n)?!0:this.getCoords().every(r=>(r.x>=n.x||r.x<=t.x)&&(r.y>=n.y||r.y<=t.y))&&this.containsPoint(t.midPointFrom(n))}getBoundingRect(){return Nu(this.getCoords())}getScaledWidth(){return this._getTransformedDimensions().x}getScaledHeight(){return this._getTransformedDimensions().y}scale(t){this._set(Oa,t),this._set(Yo,t),this.setCoords()}scaleToWidth(t){const n=this.getBoundingRect().width/this.getScaledWidth();return this.scale(t/this.width/n)}scaleToHeight(t){const n=this.getBoundingRect().height/this.getScaledHeight();return this.scale(t/this.height/n)}getCanvasRetinaScaling(){var t;return((t=this.canvas)===null||t===void 0?void 0:t.getRetinaScaling())||1}getTotalAngle(){return this.group?Zu(yoe(this.calcTransformMatrix())):this.angle}getViewportTransform(){var t;return((t=this.canvas)===null||t===void 0?void 0:t.viewportTransform)||ra.concat()}calcACoords(){const t=iy({angle:this.angle}),{x:n,y:r}=this.getRelativeCenterPoint(),i=ww(n,r),s=cs(i,t),a=this._getTransformedDimensions(),o=a.x/2,c=a.y/2;return{tl:fa({x:-o,y:-c},s),tr:fa({x:o,y:-c},s),bl:fa({x:-o,y:c},s),br:fa({x:o,y:c},s)}}setCoords(){this.aCoords=this.calcACoords()}transformMatrixKey(){let t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=[];return!t&&this.group&&(n=this.group.transformMatrixKey(t)),n.push(this.top,this.left,this.width,this.height,this.scaleX,this.scaleY,this.angle,this.strokeWidth,this.skewX,this.skewY,+this.flipX,+this.flipY,gi(this.originX),gi(this.originY)),n}calcTransformMatrix(){let t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=this.calcOwnMatrix();if(t||!this.group)return n;const r=this.transformMatrixKey(t),i=this.matrixCache;return i&&i.key.every((s,a)=>s===r[a])?i.value:(this.group&&(n=cs(this.group.calcTransformMatrix(!1),n)),this.matrixCache={key:r,value:n},n)}calcOwnMatrix(){const t=this.transformMatrixKey(!0),n=this.ownMatrixCache;if(n&&n.key===t)return n.value;const r=this.getRelativeCenterPoint(),i={angle:this.angle,translateX:r.x,translateY:r.y,scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY},s=_Ye(i);return this.ownMatrixCache={key:t,value:s},s}_getNonTransformedDimensions(){return new be(this.width,this.height).scalarAdd(this.strokeWidth)}_calculateCurrentDimensions(t){return this._getTransformedDimensions(t).transform(this.getViewportTransform(),!0).scalarAdd(2*this.padding)}_getTransformedDimensions(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=le({scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,width:this.width,height:this.height,strokeWidth:this.strokeWidth},t),r=n.strokeWidth;let i=r,s=0;this.strokeUniform&&(i=0,s=r);const a=n.width+i,o=n.height+i;let c;return c=n.skewX===0&&n.skewY===0?new be(a*n.scaleX,o*n.scaleY):dD(a,o,H3(n)),c.scalarAdd(s)}translateToGivenOrigin(t,n,r,i,s){let a=t.x,o=t.y;const c=gi(i)-gi(n),u=gi(s)-gi(r);if(c||u){const d=this._getTransformedDimensions();a+=c*d.x,o+=u*d.y}return new be(a,o)}translateToCenterPoint(t,n,r){if(n===pn&&r===pn)return t;const i=this.translateToGivenOrigin(t,n,r,pn,pn);return this.angle?i.rotate(ai(this.angle),t):i}translateToOriginPoint(t,n,r){const i=this.translateToGivenOrigin(t,pn,pn,n,r);return this.angle?i.rotate(ai(this.angle),t):i}getCenterPoint(){const t=this.getRelativeCenterPoint();return this.group?fa(t,this.group.calcTransformMatrix()):t}getRelativeCenterPoint(){return this.translateToCenterPoint(new be(this.left,this.top),this.originX,this.originY)}getPointByOrigin(t,n){return this.translateToOriginPoint(this.getRelativeCenterPoint(),t,n)}setPositionByOrigin(t,n,r){const i=this.translateToCenterPoint(t,n,r),s=this.translateToOriginPoint(i,this.originX,this.originY);this.set({left:s.x,top:s.y})}_getLeftTopCoords(){return this.translateToOriginPoint(this.getRelativeCenterPoint(),Zn,Ea)}}const iKe=["type"],sKe=["extraParam"];let Zc=class kC extends rKe{static getDefaults(){return kC.ownDefaults}get type(){const t=this.constructor.type;return t==="FabricObject"?"object":t.toLowerCase()}set type(t){Zh("warn","Setting type has no effect",t)}constructor(t){super(),ie(this,"_cacheContext",null),Object.assign(this,kC.ownDefaults),this.setOptions(t)}_createCacheCanvas(){this._cacheCanvas=Qu(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0}_limitCacheSize(t){const n=t.width,r=t.height,i=Fn.maxCacheSideLimit,s=Fn.minCacheSideLimit;if(n<=i&&r<=i&&n*r<=Fn.perfLimitSizeTotal)return n<s&&(t.width=s),r<s&&(t.height=s),t;const a=n/r,[o,c]=ob.limitDimsByArea(a),u=ax(s,o,i),d=ax(s,c,i);return n>u&&(t.zoomX/=n/u,t.width=u,t.capped=!0),r>d&&(t.zoomY/=r/d,t.height=d,t.capped=!0),t}_getCacheCanvasDimensions(){const t=this.getTotalObjectScaling(),n=this._getTransformedDimensions({skewX:0,skewY:0}),r=n.x*t.x/this.scaleX,i=n.y*t.y/this.scaleY;return{width:Math.ceil(r+2),height:Math.ceil(i+2),zoomX:t.x,zoomY:t.y,x:r,y:i}}_updateCacheCanvas(){const t=this._cacheCanvas,n=this._cacheContext,{width:r,height:i,zoomX:s,zoomY:a,x:o,y:c}=this._limitCacheSize(this._getCacheCanvasDimensions()),u=r!==t.width||i!==t.height,d=this.zoomX!==s||this.zoomY!==a;if(!t||!n)return!1;if(u||d){r!==t.width||i!==t.height?(t.width=r,t.height=i):(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height));const h=o/2,f=c/2;return this.cacheTranslationX=Math.round(t.width/2-h)+h,this.cacheTranslationY=Math.round(t.height/2-f)+f,n.translate(this.cacheTranslationX,this.cacheTranslationY),n.scale(s,a),this.zoomX=s,this.zoomY=a,!0}return!1}setOptions(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._setOptions(t)}transform(t){const n=this.group&&!this.group._transformDone||this.group&&this.canvas&&t===this.canvas.contextTop,r=this.calcTransformMatrix(!n);t.transform(r[0],r[1],r[2],r[3],r[4],r[5])}getObjectScaling(){if(!this.group)return new be(Math.abs(this.scaleX),Math.abs(this.scaleY));const t=T5(this.calcTransformMatrix());return new be(Math.abs(t.scaleX),Math.abs(t.scaleY))}getTotalObjectScaling(){const t=this.getObjectScaling();if(this.canvas){const n=this.canvas.getZoom(),r=this.getCanvasRetinaScaling();return t.scalarMultiply(n*r)}return t}getObjectOpacity(){let t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t}_constrainScale(t){return Math.abs(t)<this.minScaleLimit?t<0?-this.minScaleLimit:this.minScaleLimit:t===0?1e-4:t}_set(t,n){t!==Oa&&t!==Yo||(n=this._constrainScale(n)),t===Oa&&n<0?(this.flipX=!this.flipX,n*=-1):t==="scaleY"&&n<0?(this.flipY=!this.flipY,n*=-1):t!=="shadow"||!n||n instanceof Au||(n=new Au(n));const r=this[t]!==n;return this[t]=n,r&&this.constructor.cacheProperties.includes(t)&&(this.dirty=!0),this.parent&&(this.dirty||r&&this.constructor.stateProperties.includes(t))&&this.parent._set("dirty",!0),this}isNotVisible(){return this.opacity===0||!this.width&&!this.height&&this.strokeWidth===0||!this.visible}render(t){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),this.transform(t),this._setOpacity(t),this._setShadow(t),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(t)):(this._removeCacheCanvas(),this.drawObject(t,!1,{}),this.dirty=!1),t.restore())}drawSelectionBackground(t){}renderCache(t){if(t=t||{},this._cacheCanvas&&this._cacheContext||this._createCacheCanvas(),this.isCacheDirty()&&this._cacheContext){const{zoomX:n,zoomY:r,cacheTranslationX:i,cacheTranslationY:s}=this,{width:a,height:o}=this._cacheCanvas;this.drawObject(this._cacheContext,t.forClipping,{zoomX:n,zoomY:r,cacheTranslationX:i,cacheTranslationY:s,width:a,height:o,parentClipPaths:[]}),this.dirty=!1}}_removeCacheCanvas(){this._cacheCanvas=void 0,this._cacheContext=null}hasStroke(){return this.stroke&&this.stroke!=="transparent"&&this.strokeWidth!==0}hasFill(){return this.fill&&this.fill!=="transparent"}needsItsOwnCache(){return!!(this.paintFirst===Na&&this.hasFill()&&this.hasStroke()&&this.shadow)||!!this.clipPath}shouldCache(){return this.ownCaching=this.objectCaching&&(!this.parent||!this.parent.isOnACache())||this.needsItsOwnCache(),this.ownCaching}willDrawShadow(){return!!this.shadow&&(this.shadow.offsetX!==0||this.shadow.offsetY!==0)}drawClipPathOnCache(t,n,r){t.save(),n.inverted?t.globalCompositeOperation="destination-out":t.globalCompositeOperation="destination-in",t.setTransform(1,0,0,1,0,0),t.drawImage(r,0,0),t.restore()}drawObject(t,n,r){const i=this.fill,s=this.stroke;n?(this.fill="black",this.stroke="",this._setClippingProperties(t)):this._renderBackground(t),this._render(t),this._drawClipPath(t,this.clipPath,r),this.fill=i,this.stroke=s}createClipPathLayer(t,n){const r=Ko(n),i=r.getContext("2d");if(i.translate(n.cacheTranslationX,n.cacheTranslationY),i.scale(n.zoomX,n.zoomY),t._cacheCanvas=r,n.parentClipPaths.forEach(s=>{s.transform(i)}),n.parentClipPaths.push(t),t.absolutePositioned){const s=bl(this.calcTransformMatrix());i.transform(s[0],s[1],s[2],s[3],s[4],s[5])}return t.transform(i),t.drawObject(i,!0,n),r}_drawClipPath(t,n,r){if(!n)return;n._transformDone=!0;const i=this.createClipPathLayer(n,r);this.drawClipPathOnCache(t,n,i)}drawCacheOnCanvas(t){t.scale(1/this.zoomX,1/this.zoomY),t.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)}isCacheDirty(){let t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.isNotVisible())return!1;const n=this._cacheCanvas,r=this._cacheContext;return!(!n||!r||t||!this._updateCacheCanvas())||!!(this.dirty||this.clipPath&&this.clipPath.absolutePositioned)&&(n&&r&&!t&&(r.save(),r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,n.width,n.height),r.restore()),!0)}_renderBackground(t){if(!this.backgroundColor)return;const n=this._getNonTransformedDimensions();t.fillStyle=this.backgroundColor,t.fillRect(-n.x/2,-n.y/2,n.x,n.y),this._removeShadow(t)}_setOpacity(t){this.group&&!this.group._transformDone?t.globalAlpha=this.getObjectOpacity():t.globalAlpha*=this.opacity}_setStrokeStyles(t,n){const r=n.stroke;r&&(t.lineWidth=n.strokeWidth,t.lineCap=n.strokeLineCap,t.lineDashOffset=n.strokeDashOffset,t.lineJoin=n.strokeLineJoin,t.miterLimit=n.strokeMiterLimit,Po(r)?r.gradientUnits==="percentage"||r.gradientTransform||r.patternTransform?this._applyPatternForTransformedGradient(t,r):(t.strokeStyle=r.toLive(t),this._applyPatternGradientTransform(t,r)):t.strokeStyle=n.stroke)}_setFillStyles(t,n){let{fill:r}=n;r&&(Po(r)?(t.fillStyle=r.toLive(t),this._applyPatternGradientTransform(t,r)):t.fillStyle=r)}_setClippingProperties(t){t.globalAlpha=1,t.strokeStyle="transparent",t.fillStyle="#000000"}_setLineDash(t,n){n&&n.length!==0&&t.setLineDash(n)}_setShadow(t){if(!this.shadow)return;const n=this.shadow,r=this.canvas,i=this.getCanvasRetinaScaling(),[s,,,a]=(r==null?void 0:r.viewportTransform)||ra,o=s*i,c=a*i,u=n.nonScaling?new be(1,1):this.getObjectScaling();t.shadowColor=n.color,t.shadowBlur=n.blur*Fn.browserShadowBlurConstant*(o+c)*(u.x+u.y)/4,t.shadowOffsetX=n.offsetX*o*u.x,t.shadowOffsetY=n.offsetY*c*u.y}_removeShadow(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)}_applyPatternGradientTransform(t,n){if(!Po(n))return{offsetX:0,offsetY:0};const r=n.gradientTransform||n.patternTransform,i=-this.width/2+n.offsetX||0,s=-this.height/2+n.offsetY||0;return n.gradientUnits==="percentage"?t.transform(this.width,0,0,this.height,i,s):t.transform(1,0,0,1,i,s),r&&t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),{offsetX:i,offsetY:s}}_renderPaintInOrder(t){this.paintFirst===Na?(this._renderStroke(t),this._renderFill(t)):(this._renderFill(t),this._renderStroke(t))}_render(t){}_renderFill(t){this.fill&&(t.save(),this._setFillStyles(t,this),this.fillRule==="evenodd"?t.fill("evenodd"):t.fill(),t.restore())}_renderStroke(t){if(this.stroke&&this.strokeWidth!==0){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this.strokeUniform){const n=this.getObjectScaling();t.scale(1/n.x,1/n.y)}this._setLineDash(t,this.strokeDashArray),this._setStrokeStyles(t,this),t.stroke(),t.restore()}}_applyPatternForTransformedGradient(t,n){var r;const i=this._limitCacheSize(this._getCacheCanvasDimensions()),s=this.getCanvasRetinaScaling(),a=i.x/this.scaleX/s,o=i.y/this.scaleY/s,c=Ko({width:Math.ceil(a),height:Math.ceil(o)}),u=c.getContext("2d");u&&(u.beginPath(),u.moveTo(0,0),u.lineTo(a,0),u.lineTo(a,o),u.lineTo(0,o),u.closePath(),u.translate(a/2,o/2),u.scale(i.zoomX/this.scaleX/s,i.zoomY/this.scaleY/s),this._applyPatternGradientTransform(u,n),u.fillStyle=n.toLive(t),u.fill(),t.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),t.scale(s*this.scaleX/i.zoomX,s*this.scaleY/i.zoomY),t.strokeStyle=(r=u.createPattern(c,"no-repeat"))!==null&&r!==void 0?r:"")}_findCenterFromElement(){return new be(this.left+this.width/2,this.top+this.height/2)}clone(t){const n=this.toObject(t);return this.constructor.fromObject(n)}cloneAsImage(t){const n=this.toCanvasElement(t);return new(ft.getClass("image"))(n)}toCanvasElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=Toe(this),r=this.group,i=this.shadow,s=Math.abs,a=t.enableRetinaScaling?uoe():1,o=(t.multiplier||1)*a,c=t.canvasProvider||(y=>new Sw(y,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1}));delete this.group,t.withoutTransform&&RYe(this),t.withoutShadow&&(this.shadow=null),t.viewportTransform&&DYe(this,this.getViewportTransform()),this.setCoords();const u=Qu(),d=this.getBoundingRect(),h=this.shadow,f=new be;if(h){const y=h.blur,w=h.nonScaling?new be(1,1):this.getObjectScaling();f.x=2*Math.round(s(h.offsetX)+y)*s(w.x),f.y=2*Math.round(s(h.offsetY)+y)*s(w.y)}const m=d.width+f.x,p=d.height+f.y;u.width=Math.ceil(m),u.height=Math.ceil(p);const x=c(u);t.format==="jpeg"&&(x.backgroundColor="#fff"),this.setPositionByOrigin(new be(x.width/2,x.height/2),pn,pn);const v=this.canvas;x._objects=[this],this.set("canvas",x),this.setCoords();const g=x.toCanvasElement(o||1,t);return this.set("canvas",v),this.shadow=i,r&&(this.group=r),this.set(n),this.setCoords(),x._objects=[],x.destroy(),g}toDataURL(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return goe(this.toCanvasElement(t),t.format||"png",t.quality||1)}toBlob(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return xoe(this.toCanvasElement(t),t.format||"png",t.quality||1)}isType(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.includes(this.constructor.type)||n.includes(this.type)}complexity(){return 1}toJSON(){return this.toObject()}rotate(t){const{centeredRotation:n,originX:r,originY:i}=this;if(n){const{x:s,y:a}=this.getRelativeCenterPoint();this.originX=pn,this.originY=pn,this.left=s,this.top=a}if(this.set("angle",t),n){const{x:s,y:a}=this.translateToOriginPoint(this.getRelativeCenterPoint(),r,i);this.left=s,this.top=a,this.originX=r,this.originY=i}}setOnGroup(){}_setupCompositeOperation(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}dispose(){_5.cancelByTarget(this),this.off(),this._set("canvas",void 0),this._cacheCanvas&&Cc().dispose(this._cacheCanvas),this._cacheCanvas=void 0,this._cacheContext=null}animate(t,n){return Object.entries(t).reduce((r,i)=>{let[s,a]=i;return r[s]=this._animate(s,a,n),r},{})}_animate(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=t.split("."),s=this.constructor.colorProperties.includes(i[i.length-1]),{abort:a,startValue:o,onChange:c,onComplete:u}=r,d=le(le({},r),{},{target:this,startValue:o??i.reduce((h,f)=>h[f],this),endValue:n,abort:a==null?void 0:a.bind(this),onChange:(h,f,m)=>{i.reduce((p,x,v)=>(v===i.length-1&&(p[x]=h),p[x]),this),c&&c(h,f,m)},onComplete:(h,f,m)=>{this.setCoords(),u&&u(h,f,m)}});return s?nKe(d):Boe(d)}isDescendantOf(t){const{parent:n,group:r}=this;return n===t||r===t||!!n&&n.isDescendantOf(t)||!!r&&r!==n&&r.isDescendantOf(t)}getAncestors(){const t=[];let n=this;do n=n.parent,n&&t.push(n);while(n);return t}findCommonAncestors(t){if(this===t)return{fork:[],otherFork:[],common:[this,...this.getAncestors()]};const n=this.getAncestors(),r=t.getAncestors();if(n.length===0&&r.length>0&&this===r[r.length-1])return{fork:[],otherFork:[t,...r.slice(0,r.length-1)],common:[this]};for(let i,s=0;s<n.length;s++){if(i=n[s],i===t)return{fork:[this,...n.slice(0,s)],otherFork:[],common:n.slice(s)};for(let a=0;a<r.length;a++){if(this===r[a])return{fork:[],otherFork:[t,...r.slice(0,a)],common:[this,...n]};if(i===r[a])return{fork:[this,...n.slice(0,s)],otherFork:[t,...r.slice(0,a)],common:n.slice(s)}}}return{fork:[this,...n],otherFork:[t,...r],common:[]}}hasCommonAncestors(t){const n=this.findCommonAncestors(t);return n&&!!n.common.length}isInFrontOf(t){if(this===t)return;const n=this.findCommonAncestors(t);if(n.fork.includes(t))return!0;if(n.otherFork.includes(this))return!1;const r=n.common[0]||this.canvas;if(!r)return;const i=n.fork.pop(),s=n.otherFork.pop(),a=r._objects.indexOf(i),o=r._objects.indexOf(s);return a>-1&&a>o}toObject(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).concat(kC.customProperties,this.constructor.customProperties||[]);let n;const r=Fn.NUM_FRACTION_DIGITS,{clipPath:i,fill:s,stroke:a,shadow:o,strokeDashArray:c,left:u,top:d,originX:h,originY:f,width:m,height:p,strokeWidth:x,strokeLineCap:v,strokeDashOffset:g,strokeLineJoin:y,strokeUniform:w,strokeMiterLimit:S,scaleX:C,scaleY:k,angle:_,flipX:E,flipY:A,opacity:j,visible:D,backgroundColor:M,fillRule:$,paintFirst:B,globalCompositeOperation:z,skewX:O,skewY:P}=this;i&&!i.excludeFromExport&&(n=i.toObject(t.concat("inverted","absolutePositioned")));const I=R=>wr(R,r),q=le(le({},sy(this,t)),{},{type:this.constructor.type,version:O7,originX:h,originY:f,left:I(u),top:I(d),width:I(m),height:I(p),fill:GV(s)?s.toObject():s,stroke:GV(a)?a.toObject():a,strokeWidth:I(x),strokeDashArray:c&&c.concat(),strokeLineCap:v,strokeDashOffset:g,strokeLineJoin:y,strokeUniform:w,strokeMiterLimit:I(S),scaleX:I(C),scaleY:I(k),angle:I(_),flipX:E,flipY:A,opacity:I(j),shadow:o&&o.toObject(),visible:D,backgroundColor:M,fillRule:$,paintFirst:B,globalCompositeOperation:z,skewX:I(O),skewY:I(P)},n?{clipPath:n}:null);return this.includeDefaultValues?q:this._removeDefaultValues(q)}toDatalessObject(t){return this.toObject(t)}_removeDefaultValues(t){const n=this.constructor.getDefaults(),r=Object.keys(n).length>0?n:Object.getPrototypeOf(this);return uD(t,(i,s)=>{if(s===Zn||s===Ea||s==="type")return!0;const a=r[s];return i!==a&&!(Array.isArray(i)&&Array.isArray(a)&&i.length===0&&a.length===0)})}toString(){return"#<".concat(this.constructor.type,">")}static _fromObject(t){let n=Ar(t,iKe),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{extraParam:i}=r,s=Ar(r,sKe);return q3(n,s).then(a=>i?(delete a[i],new this(n[i],a)):new this(a))}static fromObject(t,n){return this._fromObject(t,n)}};ie(Zc,"stateProperties",qYe),ie(Zc,"cacheProperties",yd),ie(Zc,"ownDefaults",GYe),ie(Zc,"type","FabricObject"),ie(Zc,"colorProperties",[Pi,Na,"backgroundColor"]),ie(Zc,"customProperties",[]),ft.setClass(Zc),ft.setClass(Zc,"object");const ay=(e,t,n)=>(r,i,s,a)=>{const o=t(r,i,s,a);return o&&Eoe(e,le(le({},Noe(r,i,s,a)),n)),o};function oy(e){return(t,n,r,i)=>{const{target:s,originX:a,originY:o}=n,c=s.getRelativeCenterPoint(),u=s.translateToOriginPoint(c,a,o),d=e(t,n,r,i);return s.setPositionByOrigin(u,n.originX,n.originY),d}}const lH=ay(av,oy((e,t,n,r)=>{const i=hD(t,t.originX,t.originY,n,r);if(gi(t.originX)===gi(pn)||gi(t.originX)===gi(si)&&i.x<0||gi(t.originX)===gi(Zn)&&i.x>0){const{target:s}=t,a=s.strokeWidth/(s.strokeUniform?s.scaleX:1),o=joe(t)?2:1,c=s.width,u=Math.abs(i.x*o/s.scaleX)-a;return s.set("width",Math.max(u,1)),c!==s.width}return!1}));function aKe(e,t,n,r,i){r=r||{};const s=this.sizeX||r.cornerSize||i.cornerSize,a=this.sizeY||r.cornerSize||i.cornerSize,o=r.transparentCorners!==void 0?r.transparentCorners:i.transparentCorners,c=o?Na:Pi,u=!o&&(r.cornerStrokeColor||i.cornerStrokeColor);let d,h=t,f=n;e.save(),e.fillStyle=r.cornerColor||i.cornerColor||"",e.strokeStyle=r.cornerStrokeColor||i.cornerStrokeColor||"",s>a?(d=s,e.scale(1,a/s),f=n*s/a):a>s?(d=a,e.scale(s/a,1),h=t*a/s):d=s,e.beginPath(),e.arc(h,f,d/2,0,S5,!1),e[c](),u&&e.stroke(),e.restore(
vendor: 9,251 bytes, line 1188
1188)}function oKe(e,t,n,r,i){r=r||{};const s=this.sizeX||r.cornerSize||i.cornerSize,a=this.sizeY||r.cornerSize||i.cornerSize,o=r.transparentCorners!==void 0?r.transparentCorners:i.transparentCorners,c=o?Na:Pi,u=!o&&(r.cornerStrokeColor||i.cornerStrokeColor),d=s/2,h=a/2;e.save(),e.fillStyle=r.cornerColor||i.cornerColor||"",e.strokeStyle=r.cornerStrokeColor||i.cornerStrokeColor||"",e.translate(t,n);const f=i.getTotalAngle();e.rotate(ai(f)),e["".concat(c,"Rect")](-d,-h,s,a),u&&e.strokeRect(-d,-h,s,a),e.restore()}class ll{constructor(t){ie(this,"visible",!0),ie(this,"actionName",V3),ie(this,"angle",0),ie(this,"x",0),ie(this,"y",0),ie(this,"offsetX",0),ie(this,"offsetY",0),ie(this,"sizeX",0),ie(this,"sizeY",0),ie(this,"touchSizeX",0),ie(this,"touchSizeY",0),ie(this,"cursorStyle","crosshair"),ie(this,"withConnection",!1),Object.assign(this,t)}shouldActivate(t,n,r,i){var s;let{tl:a,tr:o,br:c,bl:u}=i;return((s=n.canvas)===null||s===void 0?void 0:s.getActiveObject())===n&&n.isControlVisible(t)&&Vr.isPointInPolygon(r,[a,o,c,u])}getActionHandler(t,n,r){return this.actionHandler}getMouseDownHandler(t,n,r){return this.mouseDownHandler}getMouseUpHandler(t,n,r){return this.mouseUpHandler}cursorStyleHandler(t,n,r){return n.cursorStyle}getActionName(t,n,r){return n.actionName}getVisibility(t,n){var r,i;return(r=(i=t._controlsVisibility)===null||i===void 0?void 0:i[n])!==null&&r!==void 0?r:this.visible}setVisibility(t,n,r){this.visible=t}positionHandler(t,n,r,i){return new be(this.x*t.x+this.offsetX,this.y*t.y+this.offsetY).transform(n)}calcCornerCoords(t,n,r,i,s,a){const o=lD([ww(r,i),iy({angle:t}),cD((s?this.touchSizeX:this.sizeX)||n,(s?this.touchSizeY:this.sizeY)||n)]);return{tl:new be(-.5,-.5).transform(o),tr:new be(.5,-.5).transform(o),br:new be(.5,.5).transform(o),bl:new be(-.5,.5).transform(o)}}render(t,n,r,i,s){((i=i||{}).cornerStyle||s.cornerStyle)==="circle"?aKe.call(this,t,n,r,i,s):oKe.call(this,t,n,r,i,s)}}const lKe=(e,t,n)=>n.lockRotation?j5:t.cursorStyle,cKe=ay(hoe,oy((e,t,n,r)=>{let{target:i,ex:s,ey:a,theta:o,originX:c,originY:u}=t;const d=i.translateToOriginPoint(i.getRelativeCenterPoint(),c,u);if(El(i,"lockRotation"))return!1;const h=Math.atan2(a-d.y,s-d.x),f=Math.atan2(r-d.y,n-d.x);let m=Zu(f-h+o);if(i.snapAngle&&i.snapAngle>0){const x=i.snapAngle,v=i.snapThreshold||x,g=Math.ceil(m/x)*x,y=Math.floor(m/x)*x;Math.abs(m-y)<v?m=y:Math.abs(m-g)<v&&(m=g)}m<0&&(m=360+m),m%=360;const p=i.angle!==m;return i.angle=m,p}));function zoe(e,t){const n=t.canvas,r=e[n.uniScaleKey];return n.uniformScaling&&!r||!n.uniformScaling&&r}function $oe(e,t,n){const r=El(e,"lockScalingX"),i=El(e,"lockScalingY");if(r&&i||!t&&(r||i)&&n||r&&t==="x"||i&&t==="y")return!0;const{width:s,height:a,strokeWidth:o}=e;return s===0&&o===0&&t!=="y"||a===0&&o===0&&t!=="x"}const uKe=["e","se","s","sw","w","nw","n","ne","e"],C1=(e,t,n)=>{const r=zoe(e,n);if($oe(n,t.x!==0&&t.y===0?"x":t.x===0&&t.y!==0?"y":"",r))return j5;const i=Aoe(n,t);return"".concat(uKe[i],"-resize")};function pD(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=t.target,a=i.by,o=zoe(e,s);let c,u,d,h,f,m;if($oe(s,a,o))return!1;if(t.gestureScale)u=t.scaleX*t.gestureScale,d=t.scaleY*t.gestureScale;else{if(c=hD(t,t.originX,t.originY,n,r),f=a!=="y"?Math.sign(c.x||t.signX||1):1,m=a!=="x"?Math.sign(c.y||t.signY||1):1,t.signX||(t.signX=f),t.signY||(t.signY=m),El(s,"lockScalingFlip")&&(t.signX!==f||t.signY!==m))return!1;if(h=s._getTransformedDimensions(),o&&!a){const v=Math.abs(c.x)+Math.abs(c.y),{original:g}=t,y=v/(Math.abs(h.x*g.scaleX/s.scaleX)+Math.abs(h.y*g.scaleY/s.scaleY));u=g.scaleX*y,d=g.scaleY*y}else u=Math.abs(c.x*s.scaleX/h.x),d=Math.abs(c.y*s.scaleY/h.y);joe(t)&&(u*=2,d*=2),t.signX!==f&&a!=="y"&&(t.originX=XV(t.originX),u*=-1,t.signX=f),t.signY!==m&&a!=="x"&&(t.originY=XV(t.originY),d*=-1,t.signY=m)}const p=s.scaleX,x=s.scaleY;return a?(a==="x"&&s.set(Oa,u),a==="y"&&s.set(Yo,d)):(!El(s,"lockScalingX")&&s.set(Oa,u),!El(s,"lockScalingY")&&s.set(Yo,d)),p!==s.scaleX||x!==s.scaleY}const U2=ay(U3,oy((e,t,n,r)=>pD(e,t,n,r))),dKe=ay(U3,oy((e,t,n,r)=>pD(e,t,n,r,{by:"x"}))),hKe=ay(U3,oy((e,t,n,r)=>pD(e,t,n,r,{by:"y"}))),fKe=["target","ex","ey","skewingSide"],GE={x:{counterAxis:"y",scale:Oa,skew:ny,lockSkewing:"lockSkewingX",origin:"originX",flip:"flipX"},y:{counterAxis:"x",scale:Yo,skew:ry,lockSkewing:"lockSkewingY",origin:"originY",flip:"flipY"}},mKe=["ns","nesw","ew","nwse"],pKe=(e,t,n)=>{if(t.x!==0&&El(n,"lockSkewingY")||t.y!==0&&El(n,"lockSkewingX"))return j5;const r=Aoe(n,t)%4;return"".concat(mKe[r],"-resize")};function Uoe(e,t,n,r,i){const{target:s}=n,{counterAxis:a,origin:o,lockSkewing:c,skew:u,flip:d}=GE[e];if(El(s,c))return!1;const{origin:h,flip:f}=GE[a],m=gi(n[h])*(s[f]?-1:1),p=-Math.sign(m)*(s[d]?-1:1),x=.5*-((s[u]===0&&hD(n,pn,pn,r,i)[e]>0||s[u]>0?1:-1)*p)+.5;return ay(foe,oy((g,y,w,S)=>function(C,k,_){let{target:E,ex:A,ey:j,skewingSide:D}=k,M=Ar(k,fKe);const{skew:$}=GE[C],B=_.subtract(new be(A,j)).divide(new be(E.scaleX,E.scaleY))[C],z=E[$],O=M[$],P=Math.tan(ai(O)),I=C==="y"?E._getTransformedDimensions({scaleX:1,scaleY:1,skewX:0}).x:E._getTransformedDimensions({scaleX:1,scaleY:1}).y,q=2*B*D/Math.max(I,1)+P,R=Zu(Math.atan(q));E.set($,R);const xe=z!==E[$];if(xe&&C==="y"){const{skewX:me,scaleX:U}=E,ae=E._getTransformedDimensions({skewY:z}),Ce=E._getTransformedDimensions(),je=me!==0?ae.x/Ce.x:1;je!==1&&E.set(Oa,je*U)}return xe}(e,y,new be(w,S))))(t,le(le({},n),{},{[o]:x,skewingSide:p}),r,i)}const gKe=(e,t,n,r)=>Uoe("x",e,t,n,r),xKe=(e,t,n,r)=>Uoe("y",e,t,n,r);function Y3(e,t){return e[t.canvas.altActionKey]}const V2=(e,t,n)=>{const r=Y3(e,n);return t.x===0?r?ny:Yo:t.y===0?r?ry:Oa:""},E0=(e,t,n)=>Y3(e,n)?pKe(0,t,n):C1(e,t,n),cH=(e,t,n,r)=>Y3(e,t.target)?xKe(e,t,n,r):dKe(e,t,n,r),uH=(e,t,n,r)=>Y3(e,t.target)?gKe(e,t,n,r):hKe(e,t,n,r),Voe=()=>({ml:new ll({x:-.5,y:0,cursorStyleHandler:E0,actionHandler:cH,getActionName:V2}),mr:new ll({x:.5,y:0,cursorStyleHandler:E0,actionHandler:cH,getActionName:V2}),mb:new ll({x:0,y:.5,cursorStyleHandler:E0,actionHandler:uH,getActionName:V2}),mt:new ll({x:0,y:-.5,cursorStyleHandler:E0,actionHandler:uH,getActionName:V2}),tl:new ll({x:-.5,y:-.5,cursorStyleHandler:C1,actionHandler:U2}),tr:new ll({x:.5,y:-.5,cursorStyleHandler:C1,actionHandler:U2}),bl:new ll({x:-.5,y:.5,cursorStyleHandler:C1,actionHandler:U2}),br:new ll({x:.5,y:.5,cursorStyleHandler:C1,actionHandler:U2}),mtr:new ll({x:0,y:-.5,actionHandler:cKe,cursorStyleHandler:lKe,offsetY:-40,withConnection:!0,actionName:aD})}),yKe=()=>({mr:new ll({x:.5,y:0,actionHandler:lH,cursorStyleHandler:E0,actionName:av}),ml:new ll({x:-.5,y:0,actionHandler:lH,cursorStyleHandler:E0,actionName:av})}),bKe=()=>le(le({},Voe()),yKe());class uv extends Zc{static getDefaults(){return le(le({},super.getDefaults()),uv.ownDefaults)}constructor(t){super(),Object.assign(this,this.constructor.createControls(),uv.ownDefaults),this.setOptions(t)}static createControls(){return{controls:Voe()}}_updateCacheCanvas(){const t=this.canvas;if(this.noScaleCache&&t&&t._currentTransform){const n=t._currentTransform,r=n.target,i=n.action;if(this===r&&i&&i.startsWith(V3))return!1}return super._updateCacheCanvas()}getActiveControl(){const t=this.__corner;return t?{key:t,control:this.controls[t],coord:this.oCoords[t]}:void 0}findControl(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!this.hasControls||!this.canvas)return;this.__corner=void 0;const r=Object.entries(this.oCoords);for(let i=r.length-1;i>=0;i--){const[s,a]=r[i],o=this.controls[s];if(o.shouldActivate(s,this,t,n?a.touchCorner:a.corner))return this.__corner=s,{key:s,control:o,coord:this.oCoords[s]}}}calcOCoords(){const t=this.getViewportTransform(),n=this.getCenterPoint(),r=ww(n.x,n.y),i=iy({angle:this.getTotalAngle()-(this.group&&this.flipX?180:0)}),s=cs(r,i),a=cs(t,s),o=cs(a,[1/t[0],0,0,1/t[3],0,0]),c=this.group?T5(this.calcTransformMatrix()):void 0;c&&(c.scaleX=Math.abs(c.scaleX),c.scaleY=Math.abs(c.scaleY));const u=this._calculateCurrentDimensions(c),d={};return this.forEachControl((h,f)=>{const m=h.positionHandler(u,o,this,h);d[f]=Object.assign(m,this._calcCornerCoords(h,m))}),d}_calcCornerCoords(t,n){const r=this.getTotalAngle();return{corner:t.calcCornerCoords(r,this.cornerSize,n.x,n.y,!1,this),touchCorner:t.calcCornerCoords(r,this.touchCornerSize,n.x,n.y,!0,this)}}setCoords(){super.setCoords(),this.canvas&&(this.oCoords=this.calcOCoords())}forEachControl(t){for(const n in this.controls)t(this.controls[n],n,this)}drawSelectionBackground(t){if(!this.selectionBackgroundColor||this.canvas&&this.canvas._activeObject!==this)return;t.save();const n=this.getRelativeCenterPoint(),r=this._calculateCurrentDimensions(),i=this.getViewportTransform();t.translate(n.x,n.y),t.scale(1/i[0],1/i[3]),t.rotate(ai(this.angle)),t.fillStyle=this.selectionBackgroundColor,t.fillRect(-r.x/2,-r.y/2,r.x,r.y),t.restore()}strokeBorders(t,n){t.strokeRect(-n.x/2,-n.y/2,n.x,n.y)}_drawBorders(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=le({hasControls:this.hasControls,borderColor:this.borderColor,borderDashArray:this.borderDashArray},r);t.save(),t.strokeStyle=i.borderColor,this._setLineDash(t,i.borderDashArray),this.strokeBorders(t,n),i.hasControls&&this.drawControlsConnectingLines(t,n),t.restore(
vendor: 5,127 bytes, line 1188
1188)}_renderControls(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{hasBorders:r,hasControls:i}=this,s=le({hasBorders:r,hasControls:i},n),a=this.getViewportTransform(),o=s.hasBorders,c=s.hasControls,u=cs(a,this.calcTransformMatrix()),d=T5(u);t.save(),t.translate(d.translateX,d.translateY),t.lineWidth=this.borderScaleFactor,this.group===this.parent&&(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(d.angle-=180),t.rotate(ai(this.group?d.angle:this.angle)),o&&this.drawBorders(t,d,n),c&&this.drawControls(t,n),t.restore()}drawBorders(t,n,r){let i;if(r&&r.forActiveSelection||this.group){const s=dD(this.width,this.height,H3(n)),a=this.isStrokeAccountedForInDimensions()?oD:(this.strokeUniform?new be().scalarAdd(this.canvas?this.canvas.getZoom():1):new be(n.scaleX,n.scaleY)).scalarMultiply(this.strokeWidth);i=s.add(a).scalarAdd(this.borderScaleFactor).scalarAdd(2*this.padding)}else i=this._calculateCurrentDimensions().scalarAdd(this.borderScaleFactor);this._drawBorders(t,i,r)}drawControlsConnectingLines(t,n){let r=!1;t.beginPath(),this.forEachControl((i,s)=>{i.withConnection&&i.getVisibility(this,s)&&(r=!0,t.moveTo(i.x*n.x,i.y*n.y),t.lineTo(i.x*n.x+i.offsetX,i.y*n.y+i.offsetY))}),r&&t.stroke()}drawControls(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.save();const r=this.getCanvasRetinaScaling(),{cornerStrokeColor:i,cornerDashArray:s,cornerColor:a}=this,o=le({cornerStrokeColor:i,cornerDashArray:s,cornerColor:a},n);t.setTransform(r,0,0,r,0,0),t.strokeStyle=t.fillStyle=o.cornerColor,this.transparentCorners||(t.strokeStyle=o.cornerStrokeColor),this._setLineDash(t,o.cornerDashArray),this.forEachControl((c,u)=>{if(c.getVisibility(this,u)){const d=this.oCoords[u];c.render(t,d.x,d.y,o,this)}}),t.restore()}isControlVisible(t){return this.controls[t]&&this.controls[t].getVisibility(this,t)}setControlVisible(t,n){this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[t]=n}setControlsVisibility(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.entries(t).forEach(n=>{let[r,i]=n;return this.setControlVisible(r,i)})}clearContextTop(t){if(!this.canvas)return;const n=this.canvas.contextTop;if(!n)return;const r=this.canvas.viewportTransform;n.save(),n.transform(r[0],r[1],r[2],r[3],r[4],r[5]),this.transform(n);const i=this.width+4,s=this.height+4;return n.clearRect(-i/2,-s/2,i,s),t||n.restore(),n}onDeselect(t){return!1}onSelect(t){return!1}shouldStartDragging(t){return!1}onDragStart(t){return!1}canDrop(t){return!1}renderDragSourceEffect(t){}renderDropTargetEffect(t){}}function Hoe(e,t){return t.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{r!=="constructor"&&Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)||Object.create(null))})}),e}ie(uv,"ownDefaults",{noScaleCache:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,cornerSize:13,touchCornerSize:24,transparentCorners:!0,cornerColor:"rgb(178,204,255)",cornerStrokeColor:"",cornerStyle:"rect",cornerDashArray:null,hasControls:!0,borderColor:"rgb(178,204,255)",borderDashArray:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,hasBorders:!0,selectionBackgroundColor:"",selectable:!0,evented:!0,perPixelTargetFind:!1,activeOn:"down",hoverCursor:null,moveCursor:null});class Rs extends uv{}Hoe(Rs,[Moe]),ft.setClass(Rs),ft.setClass(Rs,"object");const vKe=(e,t,n,r)=>{const i=2*(r=Math.round(r))+1,{data:s}=e.getImageData(t-r,n-r,i,i);for(let a=3;a<s.length;a+=4)if(s[a]>0)return!1;return!0};class qoe{constructor(t){this.options=t,this.strokeProjectionMagnitude=this.options.strokeWidth/2,this.scale=new be(this.options.scaleX,this.options.scaleY),this.strokeUniformScalar=this.options.strokeUniform?new be(1/this.options.scaleX,1/this.options.scaleY):new be(1,1)}createSideVector(t,n){const r=I7(t,n);return this.options.strokeUniform?r.multiply(this.scale):r}projectOrthogonally(t,n,r){return this.applySkew(t.add(this.calcOrthogonalProjection(t,n,r)))}isSkewed(){return this.options.skewX!==0||this.options.skewY!==0}applySkew(t){const n=new be(t);return n.y+=n.x*Math.tan(ai(this.options.skewY)),n.x+=n.y*Math.tan(ai(this.options.skewX)),n}scaleUnitVector(t,n){return t.multiply(this.strokeUniformScalar).scalarMultiply(n)}}const wKe=new be;class Z0 extends qoe{static getOrthogonalRotationFactor(t,n){const r=n?B7(t,n):VYe(t);return Math.abs(r)<vw?-1:1}constructor(t,n,r,i){super(i),ie(this,"AB",void 0),ie(this,"AC",void 0),ie(this,"alpha",void 0),ie(this,"bisector",void 0),this.A=new be(t),this.B=new be(n),this.C=new be(r),this.AB=this.createSideVector(this.A,this.B),this.AC=this.createSideVector(this.A,this.C),this.alpha=B7(this.AB,this.AC),this.bisector=fD(Ioe(this.AB.eq(wKe)?this.AC:this.AB,this.alpha/2))}calcOrthogonalProjection(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.strokeProjectionMagnitude;const i=this.createSideVector(t,n),s=Foe(i),a=Z0.getOrthogonalRotationFactor(s,this.bisector);return this.scaleUnitVector(s,r*a)}projectBevel(){const t=[];
vendor: 1,236 bytes, line 1188
1188return(this.alpha%S5==0?[this.B]:[this.B,this.C]).forEach(n=>{t.push(this.projectOrthogonally(this.A,n)),t.push(this.projectOrthogonally(this.A,n,-this.strokeProjectionMagnitude))}),t}projectMiter(){const t=[],n=Math.abs(this.alpha),r=1/Math.sin(n/2),i=this.scaleUnitVector(this.bisector,-this.strokeProjectionMagnitude*r),s=this.options.strokeUniform?F7(this.scaleUnitVector(this.bisector,this.options.strokeMiterLimit)):this.options.strokeMiterLimit;return F7(i)/this.strokeProjectionMagnitude<=s&&t.push(this.applySkew(this.A.add(i))),t.push(...this.projectBevel()),t}projectRoundNoSkew(t,n){const r=[],i=new be(Z0.getOrthogonalRotationFactor(this.bisector),Z0.getOrthogonalRotationFactor(new be(this.bisector.y,this.bisector.x)));return[new be(1,0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i),new be(0,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i)].forEach(s=>{sH(s,t,n)&&r.push(this.A.add(s))}),r}projectRoundWithSkew(t,n){const r=[],{skewX:i,skewY:s,scaleX:a,scaleY:o,strokeUniform:c}=this.options,u=new be(Math.tan(ai(i)),Math.tan(ai(s))),d=this.strokeProjectionMagnitude,h=c?d/o/Math.sqrt(1/o**2+1/a**2*u.y**2):d/Math.sqrt(1+u.
vendor: 140,050 bytes, lines 1188-1208
1188y**2),f=new be(Math.sqrt(Math.max(d**2-h**2,0)),h),m=c?d/Math.sqrt(1+u.x**2*(1/o)**2/(1/a+1/a*u.x*u.y)**2):d/Math.sqrt(1+u.x**2/(1+u.x*u.y)**2),p=new be(m,Math.sqrt(Math.max(d**2-m**2,0)));return[p,p.scalarMultiply(-1),f,f.scalarMultiply(-1)].map(x=>this.applySkew(c?x.multiply(this.strokeUniformScalar):x)).forEach(x=>{sH(x,t,n)&&r.push(this.applySkew(this.A).add(x))}),r}projectRound(){const t=[];t.push(...this.projectBevel());const n=this.alpha%S5==0,r=this.applySkew(this.A),i=t[n?0:2].subtract(r),s=t[n?1:0].subtract(r),a=n?this.applySkew(this.AB.scalarMultiply(-1)):this.applySkew(this.bisector.multiply(this.strokeUniformScalar).scalarMultiply(-1)),o=ub(i,a)>0,c=o?i:s,u=o?s:i;return this.isSkewed()?t.push(...this.projectRoundWithSkew(c,u)):t.push(...this.projectRoundNoSkew(c,u)),t}projectPoints(){switch(this.options.strokeLineJoin){case"miter":return this.projectMiter();case"round":return this.projectRound();default:return this.projectBevel()}}project(){return this.projectPoints().map(t=>({originPoint:this.A,projectedPoint:t,angle:this.alpha,bisector:this.bisector}))}}class dH extends qoe{constructor(t,n,r){super(r),this.A=new be(t),this.T=new be(n)}calcOrthogonalProjection(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.strokeProjectionMagnitude;const i=this.createSideVector(t,n);return this.scaleUnitVector(Foe(i),r)}projectButt(){return[this.projectOrthogonally(this.A,this.T,this.strokeProjectionMagnitude),this.projectOrthogonally(this.A,this.T,-this.strokeProjectionMagnitude)]}projectRound(){const t=[];if(!this.isSkewed()&&this.A.eq(this.T)){const n=new be(1,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);t.push(this.applySkew(this.A.add(n)),this.applySkew(this.A.subtract(n)))}else t.push(...new Z0(this.A,this.T,this.T,this.options).projectRound());return t}projectSquare(){const t=[];if(this.A.eq(this.T)){const n=new be(1,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);t.push(this.A.add(n),this.A.subtract(n))}else{const n=this.calcOrthogonalProjection(this.A,this.T,this.strokeProjectionMagnitude),r=this.scaleUnitVector(fD(this.createSideVector(this.A,this.T)),-this.strokeProjectionMagnitude),i=this.A.add(r);t.push(i.add(n),i.subtract(n))}return t.map(n=>this.applySkew(n))}projectPoints(){switch(this.options.strokeLineCap){case"round":return this.projectRound();case"square":return this.projectSquare();default:return this.projectButt()}}project(){return this.projectPoints().map(t=>({originPoint:this.A,projectedPoint:t}))}}const SKe=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const r=[];if(e.length===0)return r;const i=e.reduce((s,a)=>(s[s.length-1].eq(a)||s.push(new be(a)),s),[new be(e[0])]);if(i.length===1)n=!0;else if(!n){const s=i[0],a=((o,c)=>{for(let u=o.length-1;u>=0;u--)if(c(o[u],u,o))return u;return-1})(i,o=>!o.eq(s));i.splice(a+1)}return i.forEach((s,a,o)=>{let c,u;a===0?(u=o[1],c=n?s:o[o.length-1]):a===o.length-1?(c=o[a-1],u=n?s:o[0]):(c=o[a-1],u=o[a+1]),n&&o.length===1?r.push(...new dH(s,s,t).project()):!n||a!==0&&a!==o.length-1?r.push(...new Z0(s,c,u,t).project()):r.push(...new dH(s,a===0?u:c,t).project())}),r},gD=e=>{const t={};return Object.keys(e).forEach(n=>{t[n]={},Object.keys(e[n]).forEach(r=>{t[n][r]=le({},e[n][r])})}),t},CKe=e=>e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">");let By;const xD=e=>{if(By||By||(By="Intl"in $3()&&"Segmenter"in Intl&&new Intl.Segmenter(void 0,{granularity:"grapheme"})),By){const t=By.segment(e);return Array.from(t).map(n=>{let{segment:r}=n;return r})}return kKe(e)},kKe=e=>{const t=[];for(let n,r=0;r<e.length;r++)(n=_Ke(e,r))!==!1&&t.push(n);return t},_Ke=(e,t)=>{const n=e.charCodeAt(t);if(isNaN(n))return"";if(n<55296||n>57343)return e.charAt(t);if(55296<=n&&n<=56319){if(e.length<=t+1)throw"High surrogate without following low surrogate";const i=e.charCodeAt(t+1);if(56320>i||i>57343)throw"High surrogate without following low surrogate";return e.charAt(t)+e.charAt(t+1)}if(t===0)throw"Low surrogate without preceding high surrogate";const r=e.charCodeAt(t-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1},yD=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.fill!==t.fill||e.stroke!==t.stroke||e.strokeWidth!==t.strokeWidth||e.fontSize!==t.fontSize||e.fontFamily!==t.fontFamily||e.fontWeight!==t.fontWeight||e.fontStyle!==t.fontStyle||e.textDecorationThickness!==t.textDecorationThickness||e.textBackgroundColor!==t.textBackgroundColor||e.deltaY!==t.deltaY||n&&(e.overline!==t.overline||e.underline!==t.underline||e.linethrough!==t.linethrough)},TKe=(e,t)=>{const n=t.split(` 1189`),r=[];let i=-1,s={};e=gD(e);for(let a=0;a<n.length;a++){const o=xD(n[a]);if(e[a])for(let c=0;c<o.length;c++){i++;const u=e[a][c];u&&Object.keys(u).length>0&&(yD(s,u,!0)?r.push({start:i,end:i+1,style:u}):r[r.length-1].end++),s=u||{}}else i+=o.length,s={}}return r},EKe=(e,t)=>{if(!Array.isArray(e))return gD(e);const n=t.split(sD),r={};let i=-1,s=0;for(let a=0;a<n.length;a++){const o=xD(n[a]);for(let c=0;c<o.length;c++)i++,e[s]&&e[s].start<=i&&i<e[s].end&&(r[a]=r[a]||{},r[a][c]=le({},e[s].style),i===e[s].end-1&&s++)}return r},xf=["display","transform",Pi,"fill-opacity","fill-rule","opacity",Na,"stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"];function hH(e,t){const n=e.nodeName,r=e.getAttribute("class"),i=e.getAttribute("id"),s="(?![a-zA-Z\\-]+)";let a;if(a=new RegExp("^"+n,"i"),t=t.replace(a,""),i&&t.length&&(a=new RegExp("#"+i+s,"i"),t=t.replace(a,"")),r&&t.length){const o=r.split(" ");for(let c=o.length;c--;)a=new RegExp("\\."+o[c]+s,"i"),t=t.replace(a,"")}return t.length===0}function jKe(e,t){let n=!0;const r=hH(e,t.pop());return r&&t.length&&(n=function(i,s){let a,o=!0;for(;i.parentElement&&i.parentElement.nodeType===1&&s.length;)o&&(a=s.pop()),o=hH(i=i.parentElement,a);return s.length===0}(e,t)),r&&n&&t.length===0}const NKe=e=>{var t;return(t=$Ye[e])!==null&&t!==void 0?t:e},AKe=new RegExp("(".concat(vl,")"),"gi"),MKe=e=>N5(e.replace(AKe," $1 ").replace(/,/gi," "));var fH,mH,pH,gH,xH,yH,bH;const Gs="(".concat(vl,")"),RKe=String.raw(fH||(fH=Pc(["(skewX)(",")"],["(skewX)\\(","\\)"])),Gs),OKe=String.raw(mH||(mH=Pc(["(skewY)(",")"],["(skewY)\\(","\\)"])),Gs),DKe=String.raw(pH||(pH=Pc(["(rotate)(","(?: "," ",")?)"],["(rotate)\\(","(?: "," ",")?\\)"])),Gs,Gs,Gs),LKe=String.raw(gH||(gH=Pc(["(scale)(","(?: ",")?)"],["(scale)\\(","(?: ",")?\\)"])),Gs,Gs),PKe=String.raw(xH||(xH=Pc(["(translate)(","(?: ",")?)"],["(translate)\\(","(?: ",")?\\)"])),Gs,Gs),IKe=String.raw(yH||(yH=Pc(["(matrix)("," "," "," "," "," ",")"],["(matrix)\\("," "," "," "," "," ","\\)"])),Gs,Gs,Gs,Gs,Gs,Gs),bD="(?:".concat(IKe,"|").concat(PKe,"|").concat(DKe,"|").concat(LKe,"|").concat(RKe,"|").concat(OKe,")"),FKe="(?:".concat(bD,"*)"),BKe=String.raw(bH||(bH=Pc(["^s*(?:","?)s*$"],["^\\s*(?:","?)\\s*$"])),FKe),zKe=new RegExp(BKe),$Ke=new RegExp(bD),UKe=new RegExp(bD,"g");function z7(e){const t=[];if(!(e=MKe(e).replace(/\s*([()])\s*/gi,"$1"))||e&&!zKe.test(e))return[...ra];for(const n of e.matchAll(UKe)){const r=$Ke.exec(n[0]);if(!r)continue;let i=ra;const s=r.filter(p=>!!p),[,a,...o]=s,[c,u,d,h,f,m]=o.map(p=>parseFloat(p));switch(a){case"translate":i=ww(c,u);break;case aD:i=iy({angle:c},{x:u,y:d});break;case V3:i=cD(c,u);break;case ny:i=voe(c);break;case ry:i=woe(c);break;case"matrix":i=[c,u,d,h,f,m]}t.push(i)}return lD(t)}function VKe(e,t,n,r){const i=Array.isArray(t);let s,a=t;if(e!==Pi&&e!==Na||t!==ja){if(e==="strokeUniform")return t==="non-scaling-stroke";if(e==="strokeDashArray")a=t===ja?null:t.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(e==="transformMatrix")a=n&&n.transformMatrix?cs(n.transformMatrix,z7(t)):z7(t);else if(e==="visible")a=t!==ja&&t!=="hidden",n&&n.visible===!1&&(a=!1);else if(e==="opacity")a=parseFloat(t),n&&n.opacity!==void 0&&(a*=n.opacity);else if(e==="textAnchor")a=t==="start"?Zn:t==="end"?si:pn;else if(e==="charSpacing"||e===tp)s=Q0(t,r)/r*1e3;else if(e==="paintFirst"){const o=t.indexOf(Pi),c=t.indexOf(Na);a=Pi,(o>-1&&c>-1&&c<o||o===-1&&c>-1)&&(a=Na)}else{if(e==="href"||e==="xlink:href"||e==="font"||e==="id")return t;if(e==="imageSmoothing")return t==="optimizeQuality";s=i?t.map(Q0):Q0(t,r)}}else a="";return!i&&isNaN(s)?a:s}function HKe(e,t){const n=e.match(zYe);if(!n)return;const r=n[1],i=n[3],s=n[4],a=n[5],o=n[6];r&&(t.fontStyle=r),i&&(t.fontWeight=isNaN(parseFloat(i))?i:parseFloat(i)),s&&(t.fontSize=Q0(s)),o&&(t.fontFamily=o),a&&(t.lineHeight=a==="normal"?1:a)}function qKe(e,t){e.replace(/;\s*$/,"").split(";").forEach(n=>{if(!n)return;const[r,i]=n.split(":");t[r.trim().toLowerCase()]=i.trim()})}function GKe(e){const t={},n=e.getAttribute("style");return n&&(typeof n=="string"?qKe(n,t):function(r,i){Object.entries(r).forEach(s=>{let[a,o]=s;o!==void 0&&(i[a.toLowerCase()]=o)})}(n,t)),t}const WKe={stroke:"strokeOpacity",fill:"fillOpacity"};function bd(e,t,n){if(!e)return{};let r,i={},s=iD;e.parentNode&&iH.test(e.parentNode.nodeName)&&(i=bd(e.parentElement,t,n),i.fontSize&&(r=s=Q0(i.fontSize)));const a=le(le(le({},t.reduce((u,d)=>{const h=e.getAttribute(d);return h&&(u[d]=h),u},{})),function(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h={};for(const f in d)jKe(u,f.split(" "))&&(h=le(le({},h),d[f]));return h}(e,n)),GKe(e));a[HE]&&e.setAttribute(HE,a[HE]),a[VE]&&(r=Q0(a[VE],s),a[VE]="".concat(r));const o={};for(const u in a){const d=NKe(u),h=VKe(d,a[u],i,r);o[d]=h}o&&o.font&&HKe(o.font,o);const c=le(le({},i),o);return iH.test(e.nodeName)?c:function(u){const d=Rs.getDefaults();return Object.entries(WKe).forEach(h=>{let[f,m]=h;if(u[m]===void 0||u[f]==="")return;if(u[f]===void 0){if(!d[f])return;u[f]=d[f]}if(u[f].indexOf("url(")===0)return;const p=new er(u[f]);u[f]=p.setAlpha(wr(p.getAlpha()*u[m],2)).toRgba()}),u}(c)}const YKe=["left","top","width","height","visible"],Goe=["rx","ry"];class Ts extends Rs{static getDefaults(){return le(le({},super.getDefaults()),Ts.ownDefaults)}constructor(t){super(),Object.assign(this,Ts.ownDefaults),this.setOptions(t),this._initRxRy()}_initRxRy(){const{rx:t,ry:n}=this;t&&!n?this.ry=t:n&&!t&&(this.rx=n)}_render(t){const{width:n,height:r}=this,i=-n/2,s=-r/2,a=this.rx?Math.min(this.rx,n/2):0,o=this.ry?Math.min(this.ry,r/2):0,c=a!==0||o!==0;t.beginPath(),t.moveTo(i+a,s),t.lineTo(i+n-a,s),c&&t.bezierCurveTo(i+n-Rd*a,s,i+n,s+Rd*o,i+n,s+o),t.lineTo(i+n,s+r-o),c&&t.bezierCurveTo(i+n,s+r-Rd*o,i+n-Rd*a,s+r,i+n-a,s+r),t.lineTo(i+a,s+r),c&&t.bezierCurveTo(i+Rd*a,s+r,i,s+r-Rd*o,i,s+r-o),t.lineTo(i,s+o),c&&t.bezierCurveTo(i,s+Rd*o,i+Rd*a,s,i+a,s),t.closePath(),this._renderPaintInOrder(t)}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...Goe,...t])}_toSVG(){const{width:t,height:n,rx:r,ry:i}=this;return["<rect ","COMMON_PARTS",'x="'.concat(-t/2,'" y="').concat(-n/2,'" rx="').concat(r,'" ry="').concat(i,'" width="').concat(t,'" height="').concat(n,`" /> 1190`)]}static async fromElement(t,n,r){const i=bd(t,this.ATTRIBUTE_NAMES,r),{left:s=0,top:a=0,width:o=0,height:c=0,visible:u=!0}=i,d=Ar(i,YKe);return new this(le(le(le({},n),d),{},{left:s,top:a,width:o,height:c,visible:!!(u&&o&&c)}))}}ie(Ts,"type","Rect"),ie(Ts,"cacheProperties",[...yd,...Goe]),ie(Ts,"ownDefaults",{rx:0,ry:0}),ie(Ts,"ATTRIBUTE_NAMES",[...xf,"x","y","rx","ry","width","height"]),ft.setClass(Ts),ft.setSVGClass(Ts);const mu="initialization",M5="added",vD="removed",R5="imperative",Woe=(e,t)=>{const{strokeUniform:n,strokeWidth:r,width:i,height:s,group:a}=t,o=a&&a!==e?G3(a.calcTransformMatrix(),e.calcTransformMatrix()):null,c=o?t.getRelativeCenterPoint().transform(o):t.getRelativeCenterPoint(),u=!t.isStrokeAccountedForInDimensions(),d=n&&u?OYe(new be(r,r),void 0,e.calcTransformMatrix()):oD,h=!n&&u?r:0,f=dD(i+h,s+h,lD([o,t.calcOwnMatrix()],!0)).add(d).scalarDivide(2);return[c.subtract(f),c.add(f)]};class K3{calcLayoutResult(t,n){if(this.shouldPerformLayout(t))return this.calcBoundingBox(n,t)}shouldPerformLayout(t){let{type:n,prevStrategy:r,strategy:i}=t;return n===mu||n===R5||!!r&&i!==r}shouldLayoutClipPath(t){let{type:n,target:{clipPath:r}}=t;return n!==mu&&r&&!r.absolutePositioned}getInitialSize(t,n){return n.size}calcBoundingBox(t,n){const{type:r,target:i}=n;if(r===R5&&n.overrides)return n.overrides;if(t.length===0)return;const{left:s,top:a,width:o,height:c}=Nu(t.map(h=>Woe(i,h)).reduce((h,f)=>h.concat(f),[])),u=new be(o,c),d=new be(s,a).add(u.scalarDivide(2));if(r===mu){const h=this.getInitialSize(n,{size:u,center:d});return{center:d,relativeCorrection:new be(0,0),size:h}}return{center:d.transform(i.calcOwnMatrix()),size:u}}}ie(K3,"type","strategy");class $7 extends K3{shouldPerformLayout(t){return!0}}ie($7,"type","fit-content"),ft.setClass($7);const KKe=["strategy"],XKe=["target","strategy","bubbles","prevStrategy"],Yoe="layoutManager";class dv{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new $7;ie(this,"strategy",void 0),this.strategy=t,this._subscriptions=new Map}performLayout(t){const n=le(le({bubbles:!0,strategy:this.strategy},t),{},{prevStrategy:this._prevLayoutStrategy,stopPropagation(){this.bubbles=!1}});this.onBeforeLayout(n);const r=this.getLayoutResult(n);r&&this.commitLayout(n,r),this.onAfterLayout(n,r),this._prevLayoutStrategy=n.strategy}attachHandlers(t,n){const{target:r}=n;return[k5,doe,av,hoe,U3,foe,C5,yYe,bYe].map(i=>t.on(i,s=>this.performLayout(i===k5?{type:"object_modified",trigger:i,e:s,target:r}:{type:"object_modifying",trigger:i,e:s,target:r})))}subscribe(t,n){this.unsubscribe(t,n);const r=this.attachHandlers(t,n);this._subscriptions.set(t,r)}unsubscribe(t,n){(this._subscriptions.get(t)||[]).forEach(r=>r()),this._subscriptions.delete(t)}unsubscribeTargets(t){t.targets.forEach(n=>this.unsubscribe(n,t))}subscribeTargets(t){t.targets.forEach(n=>this.subscribe(n,t))}onBeforeLayout(t){const{target:n,type:r}=t,{canvas:i}=n;if(r===mu||r===M5?this.subscribeTargets(t):r===vD&&this.unsubscribeTargets(t),n.fire("layout:before",{context:t}),i&&i.fire("object:layout:before",{target:n,context:t}),r===R5&&t.deep){const s=Ar(t,KKe);n.forEachObject(a=>a.layoutManager&&a.layoutManager.performLayout(le(le({},s),{},{bubbles:!1,target:a})))}}getLayoutResult(t){const{target:n,strategy:r,type:i}=t,s=r.calcLayoutResult(t,n.getObjects());if(!s)return;const a=i===mu?new be:n.getRelativeCenterPoint(),{center:o,correction:c=new be,relativeCorrection:u=new be}=s,d=a.subtract(o).add(c).transform(i===mu?ra:bl(n.calcOwnMatrix()),!0).add(u);return{result:s,prevCenter:a,nextCenter:o,offset:d}}commitLayout(t,n){const{target:r}=t,{result:{size:i},nextCenter:s}=n;var a,o;r.set({width:i.x,height:i.y}),this.layoutObjects(t,n),t.type===mu?r.set({left:(a=t.x)!==null&&a!==void 0?a:s.x+i.x*gi(r.originX),top:(o=t.y)!==null&&o!==void 0?o:s.y+i.y*gi(r.originY)}):(r.setPositionByOrigin(s,pn,pn),r.setCoords(),r.set("dirty",!0))}layoutObjects(t,n){const{target:r}=t;r.forEachObject(i=>{i.group===r&&this.layoutObject(t,n,i)}),t.strategy.shouldLayoutClipPath(t)&&this.layoutObject(t,n,r.clipPath)}layoutObject(t,n,r){let{offset:i}=n;r.set({left:r.left+i.x,top:r.top+i.y})}onAfterLayout(t,n){const{target:r,strategy:i,bubbles:s,prevStrategy:a}=t,o=Ar(t,XKe),{canvas:c}=r;r.fire("layout:after",{context:t,result:n}),c&&c.fire("object:layout:after",{context:t,result:n,target:r});const u=r.parent;s&&u!=null&&u.layoutManager&&((o.path||(o.path=[])).push(r),u.layoutManager.performLayout(le(le({},o),{},{target:u}))),r.set("dirty",!0)}dispose(){const{_subscriptions:t}=this;t.forEach(n=>n.forEach(r=>r())),t.clear()}toObject(){return{type:Yoe,strategy:this.strategy.constructor.type}}toJSON(){return this.toObject()}}ft.setClass(dv,Yoe);const QKe=["type","objects","layoutManager"];class ZKe extends dv{performLayout(){}}class Mu extends moe(Rs){static getDefaults(){return le(le({},super.getDefaults()),Mu.ownDefaults)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ie(this,"_activeObjects",[]),ie(this,"__objectSelectionTracker",void 0),ie(this,"__objectSelectionDisposer",void 0),Object.assign(this,Mu.ownDefaults),this.setOptions(n),this.groupInit(t,n)}groupInit(t,n){var r;this._objects=[...t],this.__objectSelectionTracker=this.__objectSelectionMonitor.bind(this,!0),this.__objectSelectionDisposer=this.__objectSelectionMonitor.bind(this,!1),this.forEachObject(i=>{this.enterGroup(i,!1)}),this.layoutManager=(r=n.layoutManager)!==null&&r!==void 0?r:new dv,this.layoutManager.performLayout({type:mu,target:this,targets:[...t],x:n.left,y:n.top})}canEnterGroup(t){return t===this||this.isDescendantOf(t)?(Zh("error","Group: circular object trees are not supported, this call has no effect"),!1):this._objects.indexOf(t)===-1||(Zh("error","Group: duplicate objects are not supported inside group, this call has no effect"),!1)}_filterObjectsBeforeEnteringGroup(t){return t.filter((n,r,i)=>this.canEnterGroup(n)&&i.indexOf(n)===r)}add(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=this._filterObjectsBeforeEnteringGroup(n),s=super.add(...i);return this._onAfterObjectsChange(M5,i),s}insertAt(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const s=this._filterObjectsBeforeEnteringGroup(r),a=super.insertAt(t,...s);return this._onAfterObjectsChange(M5,s),a}remove(){const t=super.remove(...arguments);return this._onAfterObjectsChange(vD,t),t}_onObjectAdded(t){this.enterGroup(t,!0),this.fire("object:added",{target:t}),t.fire("added",{target:this})}_onObjectRemoved(t,n){this.exitGroup(t,n),this.fire("object:removed",{target:t}),t.fire("removed",{target:this})}_onAfterObjectsChange(t,n){this.layoutManager.performLayout({type:t,targets:n,target:this})}_onStackOrderChanged(){this._set("dirty",!0)}_set(t,n){const r=this[t];return super._set(t,n),t==="canvas"&&r!==n&&(this._objects||[]).forEach(i=>{i._set(t,n)}),this}_shouldSetNestedCoords(){return this.subTargetCheck}removeAll(){return this._activeObjects=[],this.remove(...this._objects)}__objectSelectionMonitor(t,n){let{target:r}=n;const i=this._activeObjects;if(t)i.push(r),this._set("dirty",!0);else if(i.length>0){const s=i.indexOf(r);s>-1&&(i.splice(s,1),this._set("dirty",!0))}}_watchObject(t,n){t&&this._watchObject(!1,n),t?(n.on("selected",this.__objectSelectionTracker),n.on("deselected",this.__objectSelectionDisposer)):(n.off("selected",this.__objectSelectionTracker),n.off("deselected",this.__objectSelectionDisposer))}enterGroup(t,n){t.group&&t.group.remove(t),t._set("parent",this),this._enterGroup(t,n)}_enterGroup(t,n){n&&E5(t,cs(bl(this.calcTransformMatrix()),t.calcTransformMatrix())),this._shouldSetNestedCoords()&&t.setCoords(),t._set("group",this),t._set("canvas",this.canvas),this._watchObject(!0,t);const r=this.canvas&&this.canvas.getActiveObject&&this.canvas.getActiveObject();r&&(r===t||t.isDescendantOf(r))&&this._activeObjects.push(t)}exitGroup(t,n){this._exitGroup(t,n),t._set("parent",void 0),t._set("canvas",void 0)}_exitGroup(t,n){t._set("group",void 0),n||(E5(t,cs(this.calcTransformMatrix(),t.calcTransformMatrix())),t.setCoords()),this._watchObject(!1,t);const r=this._activeObjects.length>0?this._activeObjects.indexOf(t):-1;r>-1&&this._activeObjects.splice(r,1)}shouldCache(){const t=Rs.prototype.shouldCache.call(this);if(t){for(let n=0;n<this._objects.length;n++)if(this._objects[n].willDrawShadow())return this.ownCaching=!1,!1}return t}willDrawShadow(){if(super.willDrawShadow())return!0;for(let t=0;t<this._objects.length;t++)if(this._objects[t].willDrawShadow())return!0;return!1}isOnACache(){return this.ownCaching||!!this.parent&&this.parent.isOnACache()}drawObject(t,n,r){this._renderBackground(t);for(let s=0;s<this._objects.length;s++){var i;const a=this._objects[s];(i=this.canvas)!==null&&i!==void 0&&i.preserveObjectStacking&&a.group!==this?(t.save(),t.transform(...bl(this.calcTransformMatrix())),a.render(t),t.restore()):a.group===this&&a.render(t)}this._drawClipPath(t,this.clipPath,r)}setCoords(){super.setCoords(),this._shouldSetNestedCoords()&&this.forEachObject(t=>t.setCoords())}triggerLayout(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.layoutManager.performLayout(le({target:this,type:R5},t))}render(t){this._transformDone=!0,super.render(t),this._transformDone=!1}__serializeObjects(t,n){const r=this.includeDefaultValues;return this._objects.filter(function(i){return!i.excludeFromExport}).map(function(i){const s=i.includeDefaultValues;i.includeDefaultValues=r;const a=i[t||"toObject"](n);return i.includeDefaultValues=s,a})}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const n=this.layoutManager.toObject();return le(le(le({},super.toObject(["subTargetCheck","interactive",...t])),n.strategy!=="fit-content"||this.includeDefaultValues?{layoutManager:n}:{}),{},{objects:this.__serializeObjects("toObject",t)})}toString(){return"#<Group: (".concat(this.complexity(),")>")}dispose(){this.layoutManager.unsubscribeTargets({targets:this.getObjects(),target:this}),this._activeObjects=[],this.forEachObject(t=>{this._watchObject(!1,t),t.dispose()}),super.dispose()}_createSVGBgRect(t){if(!this.backgroundColor)return"";const n=Ts.prototype._toSVG.call(this),r=n.indexOf("COMMON_PARTS");n[r]='for="group" ';const i=n.join("");return t?t(i):i}_toSVG(t){const n=["<g ","COMMON_PARTS",` > 1191`],r=this._createSVGBgRect(t);r&&n.push(" ",r);for(let i=0;i<this._objects.length;i++)n.push(" ",this._objects[i].toSVG(t));return n.push(`</g> 1192`),n}getSvgStyles(){const t=this.opacity!==void 0&&this.opacity!==1?"opacity: ".concat(this.opacity,";"):"",n=this.visible?"":" visibility: hidden;";return[t,this.getSvgFilter(),n].join("")}toClipPathSVG(t){const n=[],r=this._createSVGBgRect(t);r&&n.push(" ",r);for(let i=0;i<this._objects.length;i++)n.push(" ",this._objects[i].toClipPathSVG(t));return this._createBaseClipPathSVGMarkup(n,{reviver:t})}static fromObject(t,n){let{type:r,objects:i=[],layoutManager:s}=t,a=Ar(t,QKe);return Promise.all([ov(i,n),q3(a,n)]).then(o=>{let[c,u]=o;const d=new this(c,le(le(le({},a),u),{},{layoutManager:new ZKe}));if(s){const h=ft.getClass(s.type),f=ft.getClass(s.strategy);d.layoutManager=new h(new f)}else d.layoutManager=new dv;return d.layoutManager.subscribeTargets({type:mu,target:d,targets:d.getObjects()}),d.setCoords(),d})}}ie(Mu,"type","Group"),ie(Mu,"ownDefaults",{strokeWidth:0,subTargetCheck:!1,interactive:!1}),ft.setClass(Mu);const JKe=(e,t)=>Math.min(t.width/e.width,t.height/e.height),eXe=(e,t)=>Math.max(t.width/e.width,t.height/e.height),U7="\\s*,?\\s*",zy="".concat(U7,"(").concat(vl,")"),tXe="".concat(zy).concat(zy).concat(zy).concat(U7,"([01])").concat(U7,"([01])").concat(zy).concat(zy),nXe={m:"l",M:"L"},rXe=(e,t,n,r,i,s,a,o,c,u,d)=>{const h=Ku(e),f=Xu(e),m=Ku(t),p=Xu(t),x=n*i*m-r*s*p+a,v=r*i*m+n*s*p+o;return["C",u+c*(-n*i*f-r*s*h),d+c*(-r*i*f+n*s*h),x+c*(n*i*p+r*s*m),v+c*(r*i*p-n*s*m),x,v]},vH=(e,t,n,r)=>{const i=Math.atan2(t,e),s=Math.atan2(r,n);return s>=i?s-i:2*Math.PI-(i-s)};function wH(e,t,n,r,i,s,a,o){let c;if(Fn.cachesBoundsOfCurve&&(c=[...arguments].join(),ob.boundsOfCurveCache[c]))return ob.boundsOfCurveCache[c];const u=Math.sqrt,d=Math.abs,h=[],f=[[0,0],[0,0]];let m=6*e-12*n+6*i,p=-3*e+9*n-9*i+3*a,x=3*n-3*e;for(let S=0;S<2;++S){if(S>0&&(m=6*t-12*r+6*s,p=-3*t+9*r-9*s+3*o,x=3*r-3*t),d(p)<1e-12){if(d(m)<1e-12)continue;const A=-x/m;0<A&&A<1&&h.push(A);continue}const C=m*m-4*x*p;if(C<0)continue;const k=u(C),_=(-m+k)/(2*p);0<_&&_<1&&h.push(_);const E=(-m-k)/(2*p);0<E&&E<1&&h.push(E)}let v=h.length;const g=v,y=Koe(e,t,n,r,i,s,a,o);for(;v--;){const{x:S,y:C}=y(h[v]);f[0][v]=S,f[1][v]=C}f[0][g]=e,f[1][g]=t,f[0][g+1]=a,f[1][g+1]=o;const w=[new be(Math.min(...f[0]),Math.min(...f[1])),new be(Math.max(...f[0]),Math.max(...f[1]))];return Fn.cachesBoundsOfCurve&&(ob.boundsOfCurveCache[c]=w),w}const iXe=(e,t,n)=>{let[r,i,s,a,o,c,u,d]=n;const h=((f,m,p,x,v,g,y)=>{if(p===0||x===0)return[];let w=0,S=0,C=0;const k=Math.PI,_=y*rD,E=Xu(_),A=Ku(_),j=.5*(-A*f-E*m),D=.5*(-A*m+E*f),M=p**2,$=x**2,B=D**2,z=j**2,O=M*$-M*B-$*z;let P=Math.abs(p),I=Math.abs(x);if(O<0){const He=Math.sqrt(1-O/(M*$));P*=He,I*=He}else C=(v===g?-1:1)*Math.sqrt(O/(M*B+$*z));const q=C*P*D/I,R=-C*I*j/P,xe=A*q-E*R+.5*f,me=E*q+A*R+.5*m;let U=vH(1,0,(j-q)/P,(D-R)/I),ae=vH((j-q)/P,(D-R)/I,(-j-q)/P,(-D-R)/I);g===0&&ae>0?ae-=2*k:g===1&&ae<0&&(ae+=2*k);const Ce=Math.ceil(Math.abs(ae/k*2)),je=[],ve=ae/Ce,Te=8/3*Math.sin(ve/4)*Math.sin(ve/4)/Math.sin(ve/2);let Se=U+ve;for(let He=0;He<Ce;He++)je[He]=rXe(U,Se,A,E,P,I,xe,me,Te,w,S),w=je[He][5],S=je[He][6],U=Se,Se+=ve;return je})(u-e,d-t,i,s,o,c,a);for(let f=0,m=h.length;f<m;f++)h[f][1]+=e,h[f][2]+=t,h[f][3]+=e,h[f][4]+=t,h[f][5]+=e,h[f][6]+=t;return h},sXe=e=>{let t=0,n=0,r=0,i=0;const s=[];let a,o=0,c=0;for(const u of e){const d=[...u];let h;switch(d[0]){case"l":d[1]+=t,d[2]+=n;case"L":t=d[1],n=d[2],h=["L",t,n];break;case"h":d[1]+=t;case"H":t=d[1],h=["L",t,n];break;case"v":d[1]+=n;case"V":n=d[1],h=["L",t,n];break;case"m":d[1]+=t,d[2]+=n;case"M":t=d[1],n=d[2],r=d[1],i=d[2],h=["M",t,n];break;case"c":d[1]+=t,d[2]+=n,d[3]+=t,d[4]+=n,d[5]+=t,d[6]+=n;case"C":o=d[3],c=d[4],t=d[5],n=d[6],h=["C",d[1],d[2],o,c,t,n];break;case"s":d[1]+=t,d[2]+=n,d[3]+=t,d[4]+=n;case"S":a==="C"?(o=2*t-o,c=2*n-c):(o=t,c=n),t=d[3],n=d[4],h=["C",o,c,d[1],d[2],t,n],o=h[3],c=h[4];break;case"q":d[1]+=t,d[2]+=n,d[3]+=t,d[4]+=n;case"Q":o=d[1],c=d[2],t=d[3],n=d[4],h=["Q",o,c,t,n];break;case"t":d[1]+=t,d[2]+=n;case"T":a==="Q"?(o=2*t-o,c=2*n-c):(o=t,c=n),t=d[1],n=d[2],h=["Q",o,c,t,n];break;case"a":d[6]+=t,d[7]+=n;case"A":iXe(t,n,d).forEach(f=>s.push(f)),t=d[6],n=d[7];break;case"z":case"Z":t=r,n=i,h=["Z"]}h?(s.push(h),a=h[0]):a=""}return s},O5=(e,t,n,r)=>Math.sqrt((n-e)**2+(r-t)**2),Koe=(e,t,n,r,i,s,a,o)=>c=>{const u=c**3,d=(m=>3*m**2*(1-m))(c),h=(m=>3*m*(1-m)**2)(c),f=(m=>(1-m)**3)(c);return new be(a*u+i*d+n*h+e*f,o*u+s*d+r*h+t*f)},Xoe=e=>e**2,Qoe=e=>2*e*(1-e),Zoe=e=>(1-e)**2,aXe=(e,t,n,r,i,s,a,o)=>c=>{const u=Xoe(c),d=Qoe(c),h=Zoe(c),f=3*(h*(n-e)+d*(i-n)+u*(a-i)),m=3*(h*(r-t)+d*(s-r)+u*(o-s));return Math.atan2(m,f)},oXe=(e,t,n,r,i,s)=>a=>{const o=Xoe(a),c=Qoe(a),u=Zoe(a);return new be(i*o+n*c+e*u,s*o+r*c+t*u)},lXe=(e,t,n,r,i,s)=>a=>{const o=1-a,c=2*(o*(n-e)+a*(i-n)),u=2*(o*(r-t)+a*(s-r));return Math.atan2(u,c)},SH=(e,t,n)=>{let r=new be(t,n),i=0;for(let s=1;s<=100;s+=1){const a=e(s/100);i+=O5(r.x,r.y,a.x,a.y),r=a}return i},cXe=(e,t)=>{let n,r=0,i=0,s={x:e.x,y:e.y},a=le({},s),o=.01,c=0;const u=e.iterator,d=e.angleFinder;for(;i<t&&o>1e-4;)a=u(r),c=r,n=O5(s.x,s.y,a.x,a.y),n+i>t?(r-=o,o/=2):(s=a,r+=o,i+=n);return le(le({},a),{},{angle:d(c)})},Joe=e=>{let t,n,r=0,i=0,s=0,a=0,o=0;const c=[];for(const u of e){const d={x:i,y:s,command:u[0],length:0};switch(u[0]){case"M":n=d,n.x=a=i=u[1],n.y=o=s=u[2];break;case"L":n=d,n.length=O5(i,s,u[1],u[2]),i=u[1],s=u[2];break;case"C":t=Koe(i,s,u[1],u[2],u[3],u[4],u[5],u[6]),n=d,n.iterator=t,n.angleFinder=aXe(i,s,u[1],u[2],u[3],u[4],u[5],u[6]),n.length=SH(t,i,s),i=u[5],s=u[6];break;case"Q":t=oXe(i,s,u[1],u[2],u[3],u[4]),n=d,n.iterator=t,n.angleFinder=lXe(i,s,u[1],u[2],u[3],u[4]),n.length=SH(t,i,s),i=u[3],s=u[4];break;case"Z":n=d,n.destX=a,n.destY=o,n.length=O5(i,s,a,o),i=a,s=o}r+=n.length,c.push(n)}return c.push({length:r,x:i,y:s}),c},uXe=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Joe(e),r=0;for(;t-n[r].length>0&&r<n.length-2;)t-=n[r].length,r++;const i=n[r],s=t/i.length,a=e[r];switch(i.command){case"M":return{x:i.x,y:i.y,angle:0};case"Z":return le(le({},new be(i.x,i.y).lerp(new be(i.destX,i.destY),s)),{},{angle:Math.atan2(i.destY-i.y,i.destX-i.x)});case"L":return le(le({},new be(i.x,i.y).lerp(new be(a[1],a[2]),s)),{},{angle:Math.atan2(a[2]-i.y,a[1]-i.x)});case"C":case"Q":return cXe(i,t)}},dXe=new RegExp("[mzlhvcsqta][^mzlhvcsqta]*","gi"),CH=new RegExp(tXe,"g"),hXe=new RegExp(vl,"gi"),fXe={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},mXe=e=>{var t;const n=[],r=(t=e.match(dXe))!==null&&t!==void 0?t:[];for(const i of r){const s=i[0];if(s==="z"||s==="Z"){n.push([s]);continue}const a=fXe[s.toLowerCase()];let o=[];if(s==="a"||s==="A"){CH.lastIndex=0;for(let c=null;c=CH.exec(i);)o.push(...c.slice(1))}else o=i.match(hXe)||[];for(let c=0;c<o.length;c+=a){const u=new Array(a),d=nXe[s];u[0]=c>0&&d?d:s;for(let h=0;h<a;h++)u[h+1]=parseFloat(o[c+h]);n.push(u)}}return n},pXe=(e,t)=>e.map(n=>n.map((r,i)=>i===0||t===void 0?r:wr(r,t)).join(" ")).join(" ");function V7(e,t){const n=e.style;n&&t&&(typeof t=="string"?n.cssText+=";"+t:Object.entries(t).forEach(r=>{let[i,s]=r;return n.setProperty(i,s)}))}class gXe extends _oe{constructor(t){let{allowTouchScrolling:n=!1,containerClass:r=""}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(t),ie(this,"upper",void 0),ie(this,"container",void 0);const{el:i}=this.lower,s=this.createUpperCanvas();this.upper={el:s,ctx:s.getContext("2d")},this.applyCanvasStyle(i,{allowTouchScrolling:n}),this.applyCanvasStyle(s,{allowTouchScrolling:n,styles:{position:"absolute",left:"0",top:"0"}});const a=this.createContainerElement();a.classList.add(r),i.parentNode&&i.parentNode.replaceChild(a,i),a.append(i,s),this.container=a}createUpperCanvas(){const{el:t}=this.lower,n=Qu();return n.className=t.className,n.classList.remove("lower-canvas"),n.classList.add("upper-canvas"),n.setAttribute("data-fabric","top"),n.style.cssText=t.style.cssText,n.setAttribute("draggable","true"),n}createContainerElement(){const t=ty().createElement("div");return t.setAttribute("data-fabric","wrapper"),V7(t,{position:"relative"}),YV(t),t}applyCanvasStyle(t,n){const{styles:r,allowTouchScrolling:i}=n;V7(t,le(le({},r),{},{"touch-action":i?"manipulation":ja})),YV(t)}setDimensions(t,n){super.setDimensions(t,n);const{el:r,ctx:i}=this.upper;koe(r,i,t,n)}setCSSDimensions(t){super.setCSSDimensions(t),L7(this.upper.el,t),L7(this.container,t)}cleanupDOM(t){const n=this.container,{el:r}=this.lower,{el:i}=this.upper;super.cleanupDOM(t),n.removeChild(i),n.removeChild(r),n.parentNode&&n.parentNode.replaceChild(r,n)}dispose(){super.dispose(),Cc().dispose(this.upper.el),delete this.upper,delete this.container}}class X3 extends Sw{constructor(){super(...arguments),ie(this,"targets",[]),ie(this,"_hoveredTargets",[]),ie(this,"_currentTransform",null),ie(this,"_groupSelector",null),ie(this,"contextTopDirty",!1)}static getDefaults(){return le(le({},super.getDefaults()),X3.ownDefaults)}get upperCanvasEl(){var t;return(t=this.elements.upper)===null||t===void 0?void 0:t.el}get contextTop(){var t;return(t=this.elements.upper)===null||t===void 0?void 0:t.ctx}get wrapperEl(){return this.elements.container}initElements(t){this.elements=new gXe(t,{allowTouchScrolling:this.allowTouchScrolling,containerClass:this.containerClass}),this._createCacheCanvas()}_onObjectAdded(t){this._objectsToRender=void 0,super._onObjectAdded(t)}_onObjectRemoved(t){this._objectsToRender=void 0,t===this._activeObject&&(this.fire("before:selection:cleared",{deselected:[t]}),this._discardActiveObject(),this.fire("selection:cleared",{deselected:[t]}),t.fire("deselected",{target:t})),t===this._hoveredTarget&&(this._hoveredTarget=void 0,this._hoveredTargets=[]),super._onObjectRemoved(t)}_onStackOrderChanged(){this._objectsToRender=void 0,super._onStackOrderChanged()}_chooseObjectsToRender(){const t=this._activeObject;return!this.preserveObjectStacking&&t?this._objects.filter(n=>!n.group&&n!==t).concat(t):this._objects}renderAll(){this.cancelRequestedRender(),this.destroyed||(!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1),!this._objectsToRender&&(this._objectsToRender=this._chooseObjectsToRender()),this.renderCanvas(this.getContext(),this._objectsToRender))}renderTopLayer(t){t.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(t),this.contextTopDirty=!0),t.restore()}renderTop(){const t=this.contextTop;this.clearContext(t),this.renderTopLayer(t),this.fire("after:render",{ctx:t})}setTargetFindTolerance(t){t=Math.round(t),this.targetFindTolerance=t;const n=this.getRetinaScaling(),r=Math.ceil((2*t+1)*n);this.pixelFindCanvasEl.width=this.pixelFindCanvasEl.height=r,this.pixelFindContext.scale(n,n)}isTargetTransparent(t,n,r){const i=this.targetFindTolerance,s=this.pixelFindContext;this.clearContext(s),s.save(),s.translate(-n+i,-r+i),s.transform(...this.viewportTransform);const a=t.selectionBackgroundColor;t.selectionBackgroundColor="",t.render(s),t.selectionBackgroundColor=a,s.restore();const o=Math.round(i*this.getRetinaScaling());return vKe(s,o,o,o)}_isSelectionKeyPressed(t){const n=this.selectionKey;return!!n&&(Array.isArray(n)?!!n.find(r=>!!r&&t[r]===!0):t[n])}_shouldClearSelection(t,n){const r=this.getActiveObjects(),i=this._activeObject;return!!(!n||n&&i&&r.length>1&&r.indexOf(n)===-1&&i!==n&&!this._isSelectionKeyPressed(t)||n&&!n.evented||n&&!n.selectable&&i&&i!==n)}_shouldCenterTransform(t,n,r){if(!t)return;let i;return n===V3||n===Oa||n===Yo||n===av?i=this.centeredScaling||t.centeredScaling:n===aD&&(i=this.centeredRotation||t.centeredRotation),i?!r:r}_getOriginFromCorner(t,n){const r={x:t.originX,y:t.originY};return n&&(["ml","tl","bl"].includes(n)?r.x=si:["mr","tr","br"].includes(n)&&(r.x=Zn),["tl","mt","tr"].includes(n)?r.y=D7:["bl","mb","br"].includes(n)&&(r.y=Ea)),r}_setupCurrentTransform(t,n,r){var i;const s=n.group?X0(this.getScenePoint(t),void 0,n.group.calcTransformMatrix()):this.getScenePoint(t),{key:a="",control:o}=n.getActiveControl()||{},c=r&&o?(i=o.getActionHandler(t,n,o))===null||i===void 0?void 0:i.bind(o):PYe,u=((m,p,x,v)=>{if(!p||!m)return"drag";const g=v.controls[p];return g.getActionName(x,g,v)})(r,a,t,n),d=t[this.centeredKey],h=this._shouldCenterTransform(n,u,d)?{x:pn,y:pn}:this._getOriginFromCorner(n,a),f={target:n,action:u,actionHandler:c,actionPerformed:!1,corner:a,scaleX:n.scaleX,scaleY:n.scaleY,skewX:n.skewX,skewY:n.skewY,offsetX:s.x-n.left,offsetY:s.y-n.top,originX:h.x,originY:h.y,ex:s.x,ey:s.y,lastX:s.x,lastY:s.y,theta:ai(n.angle),width:n.width,height:n.height,shiftKey:t.shiftKey,altKey:d,original:le(le({},Toe(n)),{},{originX:h.x,originY:h.y})};this._currentTransform=f,this.fire("before:transform",{e:t,transform:f})}setCursor(t){this.upperCanvasEl.style.cursor=t}_drawSelection(t){const{x:n,y:r,deltaX:i,deltaY:s}=this._groupSelector,a=new be(n,r).transform(this.viewportTransform),o=new be(n+i,r+s).transform(this.viewportTransform),c=this.selectionLineWidth/2;let u=Math.min(a.x,o.x),d=Math.min(a.y,o.y),h=Math.max(a.x,o.x),f=Math.max(a.y,o.y);this.selectionColor&&(t.fillStyle=this.selectionColor,t.fillRect(u,d,h-u,f-d)),this.selectionLineWidth&&this.selectionBorderColor&&(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,u+=c,d+=c,h-=c,f-=c,Rs.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(u,d,h-u,f-d))}findTarget(t){if(this.skipTargetFind)return;const n=this.getViewportPoint(t),r=this._activeObject,i=this.getActiveObjects();if(this.targets=[],r&&i.length>=1){if(r.findControl(n,P7(t))||i.length>1&&this.searchPossibleTargets([r],n))return r;if(r===this.searchPossibleTargets([r],n)){if(this.preserveObjectStacking){const s=this.targets;this.targets=[];const a=this.searchPossibleTargets(this._objects,n);return t[this.altSelectionKey]&&a&&a!==r?(this.targets=s,r):a}return r}}return this.searchPossibleTargets(this._objects,n)}_pointIsInObjectSelectionArea(t,n){let r=t.getCoords();const i=this.getZoom(),s=t.padding/i;if(s){const[a,o,c,u]=r,d=Math.atan2(o.y-a.y,o.x-a.x),h=Ku(d)*s,f=Xu(d)*s,m=h+f,p=h-f;r=[new be(a.x-p,a.y-m),new be(o.x+m,o.y-p),new be(c.x+p,c.y+m),new be(u.x-m,u.y+p)]}return Vr.isPointInPolygon(n,r)}_checkTarget(t,n){return!!(t&&t.visible&&t.evented&&this._pointIsInObjectSelectionArea(t,X0(n,void 0,this.viewportTransform))&&(!this.perPixelTargetFind&&!t.perPixelTargetFind||t.isEditing||!this.isTargetTransparent(t,n.x,n.y)))}_searchPossibleTargets(t,n){let r=t.length;for(;r--;){const i=t[r];if(this._checkTarget(i,n)){if(wC(i)&&i.subTargetCheck){const s=this._searchPossibleTargets(i._objects,n);s&&this.targets.push(s)}return i}}}searchPossibleTargets(t,n){const r=this._searchPossibleTargets(t,n);if(r&&wC(r)&&r.interactive&&this.targets[0]){const i=this.targets;for(let s=i.length-1;s>0;s--){const a=i[s];if(!wC(a)||!a.interactive)return a}return i[0]}return r}getViewportPoint(t){return this._pointer?this._pointer:this.getPointer(t,!0)}getScenePoint(t){return this._absolutePointer?this._absolutePointer:this.getPointer(t)}getPointer(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const r=this.upperCanvasEl,i=r.getBoundingClientRect();let s=NYe(t),a=i.width||0,o=i.height||0;a&&o||(Ea in i&&D7 in i&&(o=Math.abs(i.top-i.bottom)),si in i&&Zn in i&&(a=Math.abs(i.right-i.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,n||(s=X0(s,void 0,this.viewportTransform));const c=this.getRetinaScaling();c!==1&&(s.x/=c,s.y/=c);const u=a===0||o===0?new be(1,1):new be(r.width/a,r.height/o);return s.multiply(u)}_setDimensionsImpl(t,n){this._resetTransformEventData(),super._setDimensionsImpl(t,n),this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop)}_createCacheCanvas(){this.pixelFindCanvasEl=Qu(),this.pixelFindContext=this.pixelFindCanvasEl.getContext("2d",{willReadFrequently:!0}),this.setTargetFindTolerance(this.targetFindTolerance)}getTopContext(){return this.elements.upper.ctx}getSelectionContext(){return this.elements.upper.ctx}getSelectionElement(){return this.elements.upper.el}getActiveObject(){return this._activeObject}getActiveObjects(){const t=this._activeObject;return Hf(t)?t.getObjects():t?[t]:[]}_fireSelectionEvents(t,n){let r=!1,i=!1;const s=this.getActiveObjects(),a=[],o=[];t.forEach(c=>{s.includes(c)||(r=!0,c.fire("deselected",{e:n,target:c}),o.push(c))}),s.forEach(c=>{t.includes(c)||(r=!0,c.fire("selected",{e:n,target:c}),a.push(c))}),t.length>0&&s.length>0?(i=!0,r&&this.fire("selection:updated",{e:n,selected:a,deselected:o})):s.length>0?(i=!0,this.fire("selection:created",{e:n,selected:a})):t.length>0&&(i=!0,this.fire("selection:cleared",{e:n,deselected:o})),i&&(this._objectsToRender=void 0)}setActiveObject(t,n){const r=this.getActiveObjects(),i=this._setActiveObject(t,n);return this._fireSelectionEvents(r,n),i}_setActiveObject(t,n){const r=this._activeObject;return r!==t&&!(!this._discardActiveObject(n,t)&&this._activeObject)&&!t.onSelect({e:n})&&(this._activeObject=t,Hf(t)&&r!==t&&t.set("canvas",this),t.setCoords(),!0)}_discardActiveObject(t,n){const r=this._activeObject;return!!r&&!r.onDeselect({e:t,object:n})&&(this._currentTransform&&this._currentTransform.target===r&&this.endCurrentTransform(t),Hf(r)&&r===this._hoveredTarget&&(this._hoveredTarget=void 0),this._activeObject=void 0,!0)}discardActiveObject(t){const n=this.getActiveObjects(),r=this.getActiveObject();n.length&&this.fire("before:selection:cleared",{e:t,deselected:[r]});const i=this._discardActiveObject(t);return this._fireSelectionEvents(n,t),i}endCurrentTransform(t){const n=this._currentTransform;this._finalizeCurrentTransform(t),n&&n.target&&(n.target.isMoving=!1),this._currentTransform=null}_finalizeCurrentTransform(t){const n=this._currentTransform,r=n.target,i={e:t,target:r,transform:n,action:n.action};r._scaling&&(r._scaling=!1),r.setCoords(),n.actionPerformed&&(this.fire("object:modified",i),r.fire(k5,i))}setViewportTransform(t){super.setViewportTransform(t);const n=this._activeObject;n&&n.setCoords()}destroy(){const t=this._activeObject;Hf(t)&&(t.removeAll(),t.dispose()),delete this._activeObject,super.destroy(),this.pixelFindContext=null,this.pixelFindCanvasEl=void 0}clear(){this.discardActiveObject(),this._activeObject=void 0,this.clearContext(this.contextTop),super.clear()}drawControls(t){const n=this._activeObject;n&&n._renderControls(t)}_toObject(t,n,r){const i=this._realizeGroupTransformOnObject(t),s=super._toObject(t,n,r);return t.set(i),s}_realizeGroupTransformOnObject(t){const{group:n}=t;if(n&&Hf(n)&&this._activeObject===n){const r=sy(t,["angle","flipX","flipY",Zn,Oa,Yo,ny,ry,Ea]);return MYe(t,n.calcOwnMatrix()),r}return{}}_setSVGObject(t,n,r){const i=this._realizeGroupTransformOnObject(n);super._setSVGObject(t,n,r),n.set(i)}}ie(X3,"ownDefaults",{uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",selection:!0,selectionKey:"shiftKey",selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",notAllowedCursor:"not-allowed",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,enablePointerEvents:!1,containerClass:"canvas-container",preserveObjectStacking:!1});class xXe{constructor(t){ie(this,"targets",[]),ie(this,"__disposer",void 0);const n=()=>{const{hiddenTextarea:i}=t.getActiveObject()||{};i&&i.focus()},r=t.upperCanvasEl;r.addEventListener("click",n),this.__disposer=()=>r.removeEventListener("click",n)}exitTextEditing(){this.target=void 0,this.targets.forEach(t=>{t.isEditing&&t.exitEditing()})}add(t){this.targets.push(t)}remove(t){this.unregister(t),i0(this.targets,t)}register(t){this.target=t}unregister(t){t===this.target&&(this.target=void 0)}onMouseMove(t){var n;!((n=this.target)===null||n===void 0)&&n.isEditing&&this.target.updateSelectionOnMouseMove(t)}clear(){this.targets=[],this.target=void 0}dispose(){this.clear(),this.__disposer(),delete this.__disposer}}const yXe=["target","oldTarget","fireCanvas","e"],Fa={passive:!1},Vp=(e,t)=>{const n=e.getViewportPoint(t),r=e.getScenePoint(t);return{viewportPoint:n,scenePoint:r,pointer:n,absolutePointer:r}},Od=function(e){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.addEventListener(...n)},vo=function(e){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.removeEventListener(...n)},bXe={mouse:{in:"over",out:"out",targetIn:"mouseover",targetOut:"mouseout",canvasIn:"mouse:over",canvasOut:"mouse:out"},drag:{in:"enter",out:"leave",targetIn:"dragenter",targetOut:"dragleave",canvasIn:"drag:enter",canvasOut:"drag:leave"}};class H7 extends X3{constructor(t){super(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}),ie(this,"_isClick",void 0),ie(this,"textEditingManager",new xXe(this)),["_onMouseDown","_onTouchStart","_onMouseMove","_onMouseUp","_onTouchEnd","_onResize","_onMouseWheel","_onMouseOut","_onMouseEnter","_onContextMenu","_onClick","_onDragStart","_onDragEnd","_onDragProgress","_onDragOver","_onDragEnter","_onDragLeave","_onDrop"].forEach(n=>{this[n]=this[n].bind(this)}),this.addOrRemove(Od,"add")}_getEventPrefix(){return this.enablePointerEvents?"pointer":"mouse"}addOrRemove(t,n){const r=this.upperCanvasEl,i=this._getEventPrefix();t(Coe(r),"resize",this._onResize),t(r,i+"down",this._onMouseDown),t(r,"".concat(i,"move"),this._onMouseMove,Fa),t(r,"".concat(i,"out"),this._onMouseOut),t(r,"".concat(i,"enter"),this._onMouseEnter),t(r,"wheel",this._onMouseWheel,{passive:!1}),t(r,"contextmenu",this._onContextMenu),t(r,"click",this._onClick),t(r,"dblclick",this._onClick),t(r,"dragstart",this._onDragStart),t(r,"dragend",this._onDragEnd),t(r,"dragover",this._onDragOver),t(r,"dragenter",this._onDragEnter),t(r,"dragleave",this._onDragLeave),t(r,"drop",this._onDrop),this.enablePointerEvents||t(r,"touchstart",this._onTouchStart,Fa)}removeListeners(){this.addOrRemove(vo,"remove");const t=this._getEventPrefix(),n=gl(this.upperCanvasEl);vo(n,"".concat(t,"up"),this._onMouseUp),vo(n,"touchend",this._onTouchEnd,Fa),vo(n,"".concat(t,"move"),this._onMouseMove,Fa),vo(n,"touchmove",this._onMouseMove,Fa),clearTimeout(this._willAddMouseDown)}_onMouseWheel(t){this.__onMouseWheel(t)}_onMouseOut(t){const n=this._hoveredTarget,r=le({e:t},Vp(this,t));this.fire("mouse:out",le(le({},r),{},{target:n})),this._hoveredTarget=void 0,n&&n.fire("mouseout",le({},r)),this._hoveredTargets.forEach(i=>{this.fire("mouse:out",le(le({},r),{},{target:i})),i&&i.fire("mouseout",le({},r))}),this._hoveredTargets=[]}_onMouseEnter(t){this._currentTransform||this.findTarget(t)||(this.fire("mouse:over",le({e:t},Vp(this,t))),this._hoveredTarget=void 0,this._hoveredTargets=[])}_onDragStart(t){this._isClick=!1;const n=this.getActiveObject();if(n&&n.onDragStart(t)){this._dragSource=n;const r={e:t,target:n};return this.fire("dragstart",r),n.fire("dragstart",r),void Od(this.upperCanvasEl,"drag",this._onDragProgress)}KV(t)}_renderDragEffects(t,n,r){let i=!1;const s=this._dropTarget;s&&s!==n&&s!==r&&(s.clearContextTop(),i=!0),n==null||n.clearContextTop(),r!==n&&(r==null||r.clearContextTop());const a=this.contextTop;a.save(),a.transform(...this.viewportTransform),n&&(a.save(),n.transform(a),n.renderDragSourceEffect(t),a.restore(),i=!0),r&&(a.save(),r.transform(a),r.renderDropTargetEffect(t),a.restore(),i=!0),a.restore(),i&&(this.contextTopDirty=!0)}_onDragEnd(t){const n=!!t.dataTransfer&&t.dataTransfer.dropEffect!==ja,r=n?this._activeObject:void 0,i={e:t,target:this._dragSource,subTargets:this.targets,dragSource:this._dragSource,didDrop:n,dropTarget:r};vo(this.upperCanvasEl,"drag",this._onDragProgress),this.fire("dragend",i),this._dragSource&&this._dragSource.fire("dragend",i),delete this._dragSource,this._onMouseUp(t)}_onDragProgress(t){const n={e:t,target:this._dragSource,dragSource:this._dragSource,dropTarget:this._draggedoverTarget};this.fire("drag",n),this._dragSource&&this._dragSource.fire("drag",n)}findDragTargets(t){return this.targets=[],{target:this._searchPossibleTargets(this._objects,this.getViewportPoint(t)),targets:[...this.targets]}}_onDragOver(t){const n="dragover",{target:r,targets:i}=this.findDragTargets(t),s=this._dragSource,a={e:t,target:r,subTargets:i,dragSource:s,canDrop:!1,dropTarget:void 0};let o;this.fire(n,a),this._fireEnterLeaveEvents(r,a),r&&(r.canDrop(t)&&(o=r),r.fire(n,a));for(let c=0;c<i.length;c++){const u=i[c];u.canDrop(t)&&(o=u),u.fire(n,a)}this._renderDragEffects(t,s,o),this._dropTarget=o}_onDragEnter(t){const{target:n,targets:r}=this.findDragTargets(t),i={e:t,target:n,subTargets:r,dragSource:this._dragSource};this.fire("dragenter",i),this._fireEnterLeaveEvents(n,i)}_onDragLeave(t){const n={e:t,target:this._draggedoverTarget,subTargets:this.targets,dragSource:this._dragSource};this.fire("dragleave",n),this._fireEnterLeaveEvents(void 0,n),this._renderDragEffects(t,this._dragSource),this._dropTarget=void 0,this.targets=[],this._hoveredTargets=[]}_onDrop(t){const{target:n,targets:r}=this.findDragTargets(t),i=this._basicEventHandler("drop:before",le({e:t,target:n,subTargets:r,dragSource:this._dragSource},Vp(this,t)));i.didDrop=!1,i.dropTarget=void 0,this._basicEventHandler("drop",i),this.fire("drop:after",i)}_onContextMenu(t){const n=this.findTarget(t),r=this.targets||[],i=this._basicEventHandler("contextmenu:before",{e:t,target:n,subTargets:r});return this.stopContextMenu&&KV(t),this._basicEventHandler("contextmenu",i),!1}_onClick(t){const n=t.detail;n>3||n<2||(this._cacheTransformEventData(t),n==2&&t.type==="dblclick"&&this._handleEvent(t,"dblclick"),n==3&&this._handleEvent(t,"tripleclick"),this._resetTransformEventData())}getPointerId(t){const n=t.changedTouches;return n?n[0]&&n[0].identifier:this.enablePointerEvents?t.pointerId:-1}_isMainEvent(t){return t.isPrimary===!0||t.isPrimary!==!1&&(t.type==="touchend"&&t.touches.length===0||!t.changedTouches||t.changedTouches[0].identifier===this.mainTouchId)}_onTouchStart(t){let n=!this.allowTouchScrolling;const r=this._activeObject;this.mainTouchId===void 0&&(this.mainTouchId=this.getPointerId(t)),this.__onMouseDown(t),(this.isDrawingMode||r&&this._target===r)&&(n=!0),n&&t.preventDefault(),this._resetTransformEventData();const i=this.upperCanvasEl,s=this._getEventPrefix(),a=gl(i);Od(a,"touchend",this._onTouchEnd,Fa),n&&Od(a,"touchmove",this._onMouseMove,Fa),vo(i,"".concat(s,"down"),this._onMouseDown)}_onMouseDown(t){this.__onMouseDown(t),this._resetTransformEventData();const n=this.upperCanvasEl,r=this._getEventPrefix();vo(n,"".concat(r,"move"),this._onMouseMove,Fa);const i=gl(n);Od(i,"".concat(r,"up"),this._onMouseUp),Od(i,"".concat(r,"move"),this._onMouseMove,Fa)}_onTouchEnd(t){if(t.touches.length>0)return;this.__onMouseUp(t),this._resetTransformEventData(),delete this.mainTouchId;const n=this._getEventPrefix(),r=gl(this.upperCanvasEl);vo(r,"touchend",this._onTouchEnd,Fa),vo(r,"touchmove",this._onMouseMove,Fa),this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(()=>{Od(this.upperCanvasEl,"".concat(n,"down"),this._onMouseDown),this._willAddMouseDown=0},400)}_onMouseUp(t){this.__onMouseUp(t),this._resetTransformEventData();const n=this.upperCanvasEl,r=this._getEventPrefix();if(this._isMainEvent(t)){const i=gl(this.upperCanvasEl);vo(i,"".concat(r,"up"),this._onMouseUp),vo(i,"".concat(r,"move"),this._onMouseMove,Fa),Od(n,"".concat(r,"move"),this._onMouseMove,Fa)}}_onMouseMove(t){const n=this.getActiveObject();!this.allowTouchScrolling&&(!n||!n.shouldStartDragging(t))&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)}_onResize(){this.calcOffset(),this._resetTransformEventData()}_shouldRender(t){const n=this.getActiveObject();return!!n!=!!t||n&&t&&n!==t}__onMouseUp(t){var n;this._cacheTransformEventData(t),this._handleEvent(t,"up:before");const r=this._currentTransform,i=this._isClick,s=this._target,{button:a}=t;if(a)return(this.fireMiddleClick&&a===1||this.fireRightClick&&a===2)&&this._handleEvent(t,"up"),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)return void this._onMouseUpInDrawingMode(t);if(!this._isMainEvent(t))return;let o,c,u=!1;if(r&&(this._finalizeCurrentTransform(t),u=r.actionPerformed),!i){const d=s===this._activeObject;this.handleSelection(t),u||(u=this._shouldRender(s)||!d&&s===this._activeObject)}if(s){const d=s.findControl(this.getViewportPoint(t),P7(t)),{key:h,control:f}=d||{};if(c=h,s.selectable&&s!==this._activeObject&&s.activeOn==="up")this.setActiveObject(s,t),u=!0;else if(f){const m=f.getMouseUpHandler(t,s,f);m&&(o=this.getScenePoint(t),m.call(f,t,r,o.x,o.y))}s.isMoving=!1}if(r&&(r.target!==s||r.corner!==c)){const d=r.target&&r.target.controls[r.corner],h=d&&d.getMouseUpHandler(t,r.target,d);o=o||this.getScenePoint(t),h&&h.call(d,t,r,o.x,o.y)}this._setCursorFromEvent(t,s),this._handleEvent(t,"up"),this._groupSelector=null,this._currentTransform=null,s&&(s.__corner=void 0),u?this.requestRenderAll():i||(n=this._activeObject)!==null&&n!==void 0&&n.isEditing||this.renderTop()}_basicEventHandler(t,n){const{target:r,subTargets:i=[]}=n;this.fire(t,n),r&&r.fire(t,n);for(let s=0;s<i.length;s++)i[s]!==r&&i[s].fire(t,n);return n}_handleEvent(t,n,r){const i=this._target,s=this.targets||[],a=le(le(le({e:t,target:i,subTargets:s},Vp(this,t)),{},{transform:this._currentTransform},n==="up:before"||n==="up"?{isClick:this._isClick,currentTarget:this.findTarget(t),currentSubTargets:this.targets}:{}),n==="down:before"||n==="down"?r:{});this.fire("mouse:".concat(n),a),i&&i.fire("mouse".concat(n),a);for(let o=0;o<s.length;o++)s[o]!==i&&s[o].fire("mouse".concat(n),a)}_onMouseDownInDrawingMode(t){this._isCurrentlyDrawing=!0,this.getActiveObject()&&(this.discardActiveObject(t),this.requestRenderAll());const n=this.getScenePoint(t);this.freeDrawingBrush&&this.freeDrawingBrush.onMouseDown(n,{e:t,pointer:n}),this._handleEvent(t,"down",{alreadySelected:!1})}_onMouseMoveInDrawingMode(t){if(this._isCurrentlyDrawing){const n=this.getScenePoint(t);this.freeDrawingBrush&&this.freeDrawingBrush.onMouseMove(n,{e:t,pointer:n})}this.setCursor(this.freeDrawingCursor),this._handleEvent(t,"move")}_onMouseUpInDrawingMode(t){const n=this.getScenePoint(t);this.freeDrawingBrush?this._isCurrentlyDrawing=!!this.freeDrawingBrush.onMouseUp({e:t,pointer:n}):this._isCurrentlyDrawing=!1,this._handleEvent(t,"up")}__onMouseDown(t){this._isClick=!0,this._cacheTransformEventData(t),this._handleEvent(t,"down:before");let n=this._target,r=!!n&&n===this._activeObject;const{button:i}=t;if(i)return(this.fireMiddleClick&&i===1||this.fireRightClick&&i===2)&&this._handleEvent(t,"down",{alreadySelected:r}),void this._resetTransformEventData();if(this.isDrawingMode)return void this._onMouseDownInDrawingMode(t);if(!this._isMainEvent(t)||this._currentTransform)return;let s=this._shouldRender(n),a=!1;if(this.handleMultiSelection(t,n)?(n=this._activeObject,a=!0,s=!0):this._shouldClearSelection(t,n)&&this.discardActiveObject(t),this.selection&&(!n||!n.selectable&&!n.isEditing&&n!==this._activeObject)){const o=this.getScenePoint(t);this._groupSelector={x:o.x,y:o.y,deltaY:0,deltaX:0}}if(r=!!n&&n===this._activeObject,n){n.selectable&&n.activeOn==="down"&&this.setActiveObject(n,t);const o=n.findControl(this.getViewportPoint(t),P7(t));if(n===this._activeObject&&(o||!a)){this._setupCurrentTransform(t,n,r);const c=o?o.control:void 0,u=this.getScenePoint(t),d=c&&c.getMouseDownHandler(t,n,c);d&&d.call(c,t,this._currentTransform,u.x,u.y)}}s&&(this._objectsToRender=void 0),this._handleEvent(t,"down",{alreadySelected:r}),s&&this.requestRenderAll()}_resetTransformEventData(){this._target=this._pointer=this._absolutePointer=void 0}_cacheTransformEventData(t){this._resetTransformEventData(),this._pointer=this.getViewportPoint(t),this._absolutePointer=X0(this._pointer,void 0,this.viewportTransform),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(t)}__onMouseMove(t){if(this._isClick=!1,this._cacheTransformEventData(t),this._handleEvent(t,"move:before"),this.isDrawingMode)return void this._onMouseMoveInDrawingMode(t);if(!this._isMainEvent(t))return;const n=this._groupSelector;if(n){const r=this.getScenePoint(t);n.deltaX=r.x-n.x,n.deltaY=r.y-n.y,this.renderTop()}else if(this._currentTransform)this._transformObject(t);else{const r=this.findTarget(t);this._setCursorFromEvent(t,r),this._fireOverOutEvents(t,r)}this.textEditingManager.onMouseMove(t),this._handleEvent(t,"move"),this._resetTransformEventData()}_fireOverOutEvents(t,n){const r=this._hoveredTarget,i=this._hoveredTargets,s=this.targets,a=Math.max(i.length,s.length);this.fireSyntheticInOutEvents("mouse",{e:t,target:n,oldTarget:r,fireCanvas:!0});for(let o=0;o<a;o++)s[o]===n||i[o]&&i[o]===r||this.fireSyntheticInOutEvents("mouse",{e:t,target:s[o],oldTarget:i[o]});this._hoveredTarget=n,this._hoveredTargets=this.targets.concat()}_fireEnterLeaveEvents(t,n){const r=this._draggedoverTarget,i=this._hoveredTargets,s=this.targets,a=Math.max(i.length,s.length);this.fireSyntheticInOutEvents("drag",le(le({},n),{},{target:t,oldTarget:r,fireCanvas:!0}));for(let o=0;o<a;o++)this.fireSyntheticInOutEvents("drag",le(le({},n),{},{target:s[o],oldTarget:i[o]}));this._draggedoverTarget=t}fireSyntheticInOutEvents(t,n){let{target:r,oldTarget:i,fireCanvas:s,e:a}=n,o=Ar(n,yXe);const{targetIn:c,targetOut:u,canvasIn:d,canvasOut:h}=bXe[t],f=i!==r;if(i&&f){const m=le(le({},o),{},{e:a,target:i,nextTarget:r},Vp(this,a));s&&this.fire(h,m),i.fire(u,m)}if(r&&f){const m=le(le({},o),{},{e:a,target:r,previousTarget:i},Vp(this,a));s&&this.fire(d,m),r.fire(c,m)}}__onMouseWheel(t){this._cacheTransformEventData(t),this._handleEvent(t,"wheel"),this._resetTransformEventData()}_transformObject(t){const n=this.getScenePoint(t),r=this._currentTransform,i=r.target,s=i.group?X0(n,void 0,i.group.calcTransformMatrix()):n;r.shiftKey=t.shiftKey,r.altKey=!!this.centeredKey&&t[this.centeredKey],this._performTransformAction(t,r,s),r.actionPerformed&&this.requestRenderAll()}_performTransformAction(t,n,r){const{action:i,actionHandler:s,target:a}=n,o=!!s&&s(t,n,r.x,r.y);o&&a.setCoords(),i==="drag"&&o&&(n.target.isMoving=!0,this.setCursor(n.target.moveCursor||this.moveCursor)),n.actionPerformed=n.actionPerformed||o}_setCursorFromEvent(t,n){if(!n)return void this.setCursor(this.defaultCursor);let r=n.hoverCursor||this.hoverCursor;const i=Hf(this._activeObject)?this._activeObject:null,s=(!i||n.group!==i)&&n.findControl(this.getViewportPoint(t));if(s){const a=s.control;this.setCursor(a.cursorStyleHandler(t,a,n))}else n.subTargetCheck&&this.targets.concat().reverse().map(a=>{r=a.hoverCursor||r}),this.setCursor(r)}handleMultiSelection(t,n){const r=this._activeObject,i=Hf(r);if(r&&this._isSelectionKeyPressed(t)&&this.selection&&n&&n.selectable&&(r!==n||i)&&(i||!n.isDescendantOf(r)&&!r.isDescendantOf(n))&&!n.onSelect({e:t})&&!r.getActiveControl()){if(i){const s=r.getObjects();if(n===r){const a=this.getViewportPoint(t);if(!(n=this.searchPossibleTargets(s,a)||this.searchPossibleTargets(this._objects,a))||!n.selectable)return!1}n.group===r?(r.remove(n),this._hoveredTarget=n,this._hoveredTargets=[...this.targets],r.size()===1&&this._setActiveObject(r.item(0),t)):(r.multiSelectAdd(n),this._hoveredTarget=r,this._hoveredTargets=[...this.targets]),this._fireSelectionEvents(s,t)}else{r.isEditing&&r.exitEditing();const s=new(ft.getClass("ActiveSelection"))([],{canvas:this});s.multiSelectAdd(r,n),this._hoveredTarget=s,this._setActiveObject(s,t),this._fireSelectionEvents([r],t)}return!0}return!1}handleSelection(t){if(!this.selection||!this._groupSelector)return!1;const{x:n,y:r,deltaX:i,deltaY:s}=this._groupSelector,a=new be(n,r),o=a.add(new be(i,s)),c=a.min(o),u=a.max(o).subtract(c),d=this.collectObjects({left:c.x,top:c.y,width:u.x,height:u.y},{includeIntersecting:!this.selectionFullyContained}),h=a.eq(o)?d[0]?[d[0]]:[]:d.length>1?d.filter(f=>!f.onSelect({e:t})).reverse():d;if(h.length===1)this.setActiveObject(h[0],t);else if(h.length>1){const f=ft.getClass("ActiveSelection");this.setActiveObject(new f(h,{canvas:this}),t)}return this._groupSelector=null,!0}toCanvasElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,n=arguments.length>1?arguments[1]:void 0;const{upper:r}=this.elements;r.ctx=void 0;const i=super.toCanvasElement(t,n);return r.ctx=r.el.getContext("2d"),i}clear(){this.textEditingManager.clear(),super.clear()}destroy(){this.removeListeners(),this.textEditingManager.dispose(),super.destroy()}}const ele={x1:0,y1:0,x2:0,y2:0},vXe=le(le({},ele),{},{r1:0,r2:0}),j0=(e,t)=>isNaN(e)&&typeof t=="number"?t:e;function tle(e){return e&&/%$/.test(e)&&Number.isFinite(parseFloat(e))}function nle(e,t){const n=typeof e=="number"?e:typeof e=="string"?parseFloat(e)/(tle(e)?100:1):NaN;return ax(0,j0(n,t),1)}const wXe=/\s*;\s*/,SXe=/\s*:\s*/;function CXe(e,t){let n,r;const i=e.getAttribute("style");if(i){const a=i.split(wXe);a[a.length-1]===""&&a.pop();for(let o=a.length;o--;){const[c,u]=a[o].split(SXe).map(d=>d.trim());c==="stop-color"?n=u:c==="stop-opacity"&&(r=u)}}const s=new er(n||e.getAttribute("stop-color")||"rgb(0,0,0)");return{offset:nle(e.getAttribute("offset"),0),color:s.toRgb(),opacity:j0(parseFloat(r||e.getAttribute("stop-opacity")||""),1)*s.getAlpha()*t}}function kXe(e,t){const n=[],r=e.getElementsByTagName("stop"),i=nle(t,1);for(let s=r.length;s--;)n.push(CXe(r[s],i));return n}function rle(e){return e.nodeName==="linearGradient"||e.nodeName==="LINEARGRADIENT"?"linear":"radial"}function ile(e){return e.getAttribute("gradientUnits")==="userSpaceOnUse"?"pixels":"percentage"}function il(e,t){return e.getAttribute(t)}function _Xe(e,t){return function(n,r){let i,{width:s,height:a,gradientUnits:o}=r;return Object.entries(n).reduce((c,u)=>{let[d,h]=u;if(h==="Infinity")i=1;else if(h==="-Infinity")i=0;else{const f=typeof h=="string";i=f?parseFloat(h):h,f&&tle(h)&&(i*=.01,o==="pixels"&&(d!=="x1"&&d!=="x2"&&d!=="r2"||(i*=s),d!=="y1"&&d!=="y2"||(i*=a)))}return c[d]=i,c},{})}(rle(e)==="linear"?function(n){return{x1:il(n,"x1")||0,y1:il(n,"y1")||0,x2:il(n,"x2")||"100%",y2:il(n,"y2")||0}}(e):function(n){return{x1:il(n,"fx")||il(n,"cx")||"50%",y1:il(n,"fy")||il(n,"cy")||"50%",r1:0,x2:il(n,"cx")||"50%",y2:il(n,"cy")||"50%",r2:il(n,"r")||"50%"}}(e),le(le({},t),{},{gradientUnits:ile(e)}))}class H2{constructor(t){const{type:n="linear",gradientUnits:r="pixels",coords:i={},colorStops:s=[],offsetX:a=0,offsetY:o=0,gradientTransform:c,id:u}=t||{};Object.assign(this,{type:n,gradientUnits:r,coords:le(le({},n==="radial"?vXe:ele),i),colorStops:s,offsetX:a,offsetY:o,gradientTransform:c,id:u?"".concat(u,"_").concat(Jh()):Jh()})}addColorStop(t){for(const n in t){const r=new er(t[n]);this.colorStops.push({offset:parseFloat(n),color:r.toRgb(),opacity:r.getAlpha()})}return this}toObject(t){return le(le({},sy(this,t)),{},{type:this.type,coords:le({},this.coords),colorStops:this.colorStops.map(n=>le({},n)),offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?[...this.gradientTransform]:void 0})}toSVG(t){let{additionalTransform:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=[],i=this.gradientTransform?this.gradientTransform.concat():ra.concat(),s=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox",a=this.colorStops.map(h=>le({},h)).sort((h,f)=>h.offset-f.offset);let o=-this.offsetX,c=-this.offsetY;var u;s==="objectBoundingBox"?(o/=t.width,c/=t.height):(o+=t.width/2,c+=t.height/2),(u=t)&&typeof u._renderPathCommands=="function"&&this.gradientUnits!=="percentage"&&(o-=t.pathOffset.x,c-=t.pathOffset.y),i[4]-=o,i[5]-=c;const d=['id="SVGID_'.concat(this.id,'"'),'gradientUnits="'.concat(s,'"'),'gradientTransform="'.concat(n?n+" ":"").concat(lv(i),'"'),""].join(" ");if(this.type==="linear"){const{x1:h,y1:f,x2:m,y2:p}=this.coords;r.push("<linearGradient ",d,' x1="',h,'" y1="',f,'" x2="',m,'" y2="',p,`"> 1193`)}else if(this.type==="radial"){const{x1:h,y1:f,x2:m,y2:p,r1:x,r2:v}=this.coords,g=x>v;r.push("<radialGradient ",d,' cx="',g?h:m,'" cy="',g?f:p,'" r="',g?x:v,'" fx="',g?m:h,'" fy="',g?p:f,`"> 1194`),g&&(a.reverse(),a.forEach(w=>{w.offset=1-w.offset}));const y=Math.min(x,v);if(y>0){const w=y/Math.max(x,v);a.forEach(S=>{S.offset+=w*(1-S.offset)})}}return a.forEach(h=>{let{color:f,offset:m,opacity:p}=h;r.push("<stop ",'offset="',100*m+"%",'" style="stop-color:',f,p!==void 0?";stop-opacity: "+p:";",`"/> 1195`)}),r.push(this.type==="linear"?"</linearGradient>":"</radialGradient>",` 1196`),r.join("")}toLive(t){const{x1:n,y1:r,x2:i,y2:s,r1:a,r2:o}=this.coords,c=this.type==="linear"?t.createLinearGradient(n,r,i,s):t.createRadialGradient(n,r,a,i,s,o);return this.colorStops.forEach(u=>{let{color:d,opacity:h,offset:f}=u;c.addColorStop(f,h!==void 0?new er(d).setAlpha(h).toRgba():d)}),c}static async fromObject(t){const{colorStops:n,gradientTransform:r}=t;return new this(le(le({},t),{},{colorStops:n?n.map(i=>le({},i)):void 0,gradientTransform:r?[...r]:void 0}))}static fromElement(t,n,r){const i=ile(t),s=n._findCenterFromElement();return new this(le({id:t.getAttribute("id")||void 0,type:rle(t),coords:_Xe(t,{width:r.viewBoxWidth||r.width,height:r.viewBoxHeight||r.height}),colorStops:kXe(t,r.opacity),gradientUnits:i,gradientTransform:z7(t.getAttribute("gradientTransform")||"")},i==="pixels"?{offsetX:n.width/2-s.x,offsetY:n.height/2-s.y}:{offsetX:0,offsetY:0}))}}ie(H2,"type","Gradient"),ft.setClass(H2,"gradient"),ft.setClass(H2,"linear"),ft.setClass(H2,"radial");const TXe=["type","source","patternTransform"];class WE{get type(){return"pattern"}set type(t){Zh("warn","Setting type has no effect",t)}constructor(t){ie(this,"repeat","repeat"),ie(this,"offsetX",0),ie(this,"offsetY",0),ie(this,"crossOrigin",""),this.id=Jh(),Object.assign(this,t)}isImageSource(){return!!this.source&&typeof this.source.src=="string"}isCanvasSource(){return!!this.source&&!!this.source.toDataURL}sourceToString(){return this.isImageSource()?this.source.src:this.isCanvasSource()?this.source.toDataURL():""}toLive(t){return this.source&&(!this.isImageSource()||this.source.complete&&this.source.naturalWidth!==0&&this.source.naturalHeight!==0)?t.createPattern(this.source,this.repeat):null}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const{repeat:n,crossOrigin:r}=this;return le(le({},sy(this,t)),{},{type:"pattern",source:this.sourceToString(),repeat:n,crossOrigin:r,offsetX:wr(this.offsetX,Fn.NUM_FRACTION_DIGITS),offsetY:wr(this.offsetY,Fn.NUM_FRACTION_DIGITS),patternTransform:this.patternTransform?[...this.patternTransform]:null})}toSVG(t){let{width:n,height:r}=t;const{source:i,repeat:s,id:a}=this,o=j0(this.offsetX/n,0),c=j0(this.offsetY/r,0),u=s==="repeat-y"||s==="no-repeat"?1+Math.abs(o||0):j0(i.width/n,0),d=s==="repeat-x"||s==="no-repeat"?1+Math.abs(c||0):j0(i.height/r,0);return['<pattern id="SVGID_'.concat(a,'" x="').concat(o,'" y="').concat(c,'" width="').concat(u,'" height="').concat(d,'">'),'<image x="0" y="0" width="'.concat(i.width,'" height="').concat(i.height,'" xlink:href="').concat(this.sourceToString(),'"></image>'),"</pattern>",""].join(` 1197`)}static async fromObject(t,n){let{type:r,source:i,patternTransform:s}=t,a=Ar(t,TXe);const o=await CC(i,le(le({},n),{},{crossOrigin:a.crossOrigin}));return new this(le(le({},a),{},{patternTransform:s&&s.slice(0),source:o}))}}ie(WE,"type","Pattern"),ft.setClass(WE),ft.setClass(WE,"pattern");const EXe=["path","left","top"],jXe=["d"];class qf extends Rs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{path:r,left:i,top:s}=n,a=Ar(n,EXe);super(),Object.assign(this,qf.ownDefaults),this.setOptions(a),this._setPath(t||[],!0),typeof i=="number"&&this.set(Zn,i),typeof s=="number"&&this.set(Ea,s)}_setPath(t,n){this.path=sXe(Array.isArray(t)?t:mXe(t)),this.setBoundingBox(n)}_findCenterFromElement(){const t=this._calcBoundsFromPath();return new be(t.left+t.width/2,t.top+t.height/2)}_renderPathCommands(t){const n=-this.pathOffset.x,r=-this.pathOffset.y;t.beginPath();for(const i of this.path)switch(i[0]){case"L":t.lineTo(i[1]+n,i[2]+r);break;case"M":t.moveTo(i[1]+n,i[2]+r);break;case"C":t.bezierCurveTo(i[1]+n,i[2]+r,i[3]+n,i[4]+r,i[5]+n,i[6]+r);break;case"Q":t.quadraticCurveTo(i[1]+n,i[2]+r,i[3]+n,i[4]+r);break;case"Z":t.closePath()}}_render(t){this._renderPathCommands(t),this._renderPaintInOrder(t)}toString(){return"#<Path (".concat(this.complexity(),'): { "top": ').concat(this.top,', "left": ').concat(this.left," }>")}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return le(le({},super.toObject(t)),{},{path:this.path.map(n=>n.slice())})}toDatalessObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const n=this.toObject(t);return this.sourcePath&&(delete n.path,n.sourcePath=this.sourcePath),n}_toSVG(){const t=pXe(this.path,Fn.NUM_FRACTION_DIGITS);return["<path ","COMMON_PARTS",'d="'.concat(t,`" stroke-linecap="round" /> 1198`)]}_getOffsetTransform(){const t=Fn.NUM_FRACTION_DIGITS;return" translate(".concat(wr(-this.pathOffset.x,t),", ").concat(wr(-this.pathOffset.y,t),")")}toClipPathSVG(t){const n=this._getOffsetTransform();return" "+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:n})}toSVG(t){const n=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:n})}complexity(){return this.path.length}setDimensions(){this.setBoundingBox()}setBoundingBox(t){const{width:n,height:r,pathOffset:i}=this._calcDimensions();this.set({width:n,height:r,pathOffset:i}),t&&this.setPositionByOrigin(i,pn,pn)}_calcBoundsFromPath(){const t=[];let n=0,r=0,i=0,s=0;for(const a of this.path)switch(a[0]){case"L":i=a[1],s=a[2],t.push({x:n,y:r},{x:i,y:s});break;case"M":i=a[1],s=a[2],n=i,r=s;break;case"C":t.push(...wH(i,s,a[1],a[2],a[3],a[4],a[5],a[6])),i=a[5],s=a[6];break;case"Q":t.push(...wH(i,s,a[1],a[2],a[1],a[2],a[3],a[4])),i=a[3],s=a[4];break;case"Z":i=n,s=r}return Nu(t)}_calcDimensions(){const t=this._calcBoundsFromPath();return le(le({},t),{},{pathOffset:new be(t.left+t.width/2,t.top+t.height/2)})}static fromObject(t){return this._fromObject(t,{extraParam:"path"})}static async fromElement(t,n,r){const i=bd(t,this.ATTRIBUTE_NAMES,r),{d:s}=i;return new this(s,le(le(le({},Ar(i,jXe)),n),{},{left:void 0,top:void 0}))}}ie(qf,"type","Path"),ie(qf,"cacheProperties",[...yd,"path","fillRule"]),ie(qf,"ATTRIBUTE_NAMES",[...xf,"d"]),ft.setClass(qf),ft.setSVGClass(qf);const NXe=["left","top","radius"],sle=["radius","startAngle","endAngle","counterClockwise"];class ru extends Rs{static getDefaults(){return le(le({},super.getDefaults()),ru.ownDefaults)}constructor(t){super(),Object.assign(this,ru.ownDefaults),this.setOptions(t)}_set(t,n){return super._set(t,n),t==="radius"&&this.setRadius(n),this}_render(t){t.beginPath(),t.arc(0,0,this.radius,ai(this.startAngle),ai(this.endAngle),this.counterClockwise),this._renderPaintInOrder(t)}getRadiusX(){return this.get("radius")*this.get(Oa)}getRadiusY(){return this.get("radius")*this.get(Yo)}setRadius(t){this.radius=t,this.set({width:2*t,height:2*t})}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...sle,...t])}_toSVG(){const t=(this.endAngle-this.startAngle)%360;if(t===0)return["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',"".concat(this.radius),`" /> 1199`];{const{radius:n}=this,r=ai(this.startAngle),i=ai(this.endAngle),s=Ku(r)*n,a=Xu(r)*n,o=Ku(i)*n,c=Xu(i)*n,u=t>180?1:0,d=this.counterClockwise?0:1;return['<path d="M '.concat(s," ").concat(a," A ").concat(n," ").concat(n," 0 ").concat(u," ").concat(d," ").concat(o," ").concat(c,'" '),"COMMON_PARTS",` /> 1200`]}}static async fromElement(t,n,r){const i=bd(t,this.ATTRIBUTE_NAMES,r),{left:s=0,top:a=0,radius:o=0}=i;return new this(le(le({},Ar(i,NXe)),{},{radius:o,left:s-o,top:a-o}))}static fromObject(t){return super._fromObject(t)}}ie(ru,"type","Circle"),ie(ru,"cacheProperties",[...yd,...sle]),ie(ru,"ownDefaults",{radius:0,startAngle:0,endAngle:360,counterClockwise:!1}),ie(ru,"ATTRIBUTE_NAMES",["cx","cy","r",...xf]),ft.setClass(ru),ft.setSVGClass(ru);const AXe=["x1","y1","x2","y2"],MXe=["x1","y1","x2","y2"],q7=["x1","x2","y1","y2"];class Gf extends Rs{constructor(){let[t,n,r,i]=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[0,0,0,0],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,Gf.ownDefaults),this.setOptions(s),this.x1=t,this.x2=r,this.y1=n,this.y2=i,this._setWidthHeight();const{left:a,top:o}=s;typeof a=="number"&&this.set(Zn,a),typeof o=="number"&&this.set(Ea,o)}_setWidthHeight(){const{x1:t,y1:n,x2:r,y2:i}=this;this.width=Math.abs(r-t),this.height=Math.abs(i-n);const{left:s,top:a,width:o,height:c}=Nu([{x:t,y:n},{x:r,y:i}]),u=new be(s+o/2,a+c/2);this.setPositionByOrigin(u,pn,pn)}_set(t,n){return super._set(t,n),q7.includes(t)&&this._setWidthHeight(),this}_render(t){t.beginPath();const n=this.calcLinePoints();t.moveTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineWidth=this.strokeWidth;const r=t.strokeStyle;var i;Po(this.stroke)?t.strokeStyle=this.stroke.toLive(t):t.strokeStyle=(i=this.stroke)!==null&&i!==void 0?i:t.fillStyle,this.stroke&&this._renderStroke(t),t.strokeStyle=r}_findCenterFromElement(){return new be((this.x1+this.x2)/2,(this.y1+this.y2)/2)}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return le(le({},super.toObject(t)),this.calcLinePoints())}_getNonTransformedDimensions(){const t=super._getNonTransformedDimensions();return this.strokeLineCap==="butt"&&(this.width===0&&(t.y-=this.strokeWidth),this.height===0&&(t.x-=this.strokeWidth)),t}calcLinePoints(){const{x1:t,x2:n,y1:r,y2:i,width:s,height:a}=this,o=t<=n?-1:1,c=r<=i?-1:1;return{x1:o*s/2,x2:o*-s/2,y1:c*a/2,y2:c*-a/2}}_toSVG(){const{x1:t,x2:n,y1:r,y2:i}=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="'.concat(t,'" y1="').concat(r,'" x2="').concat(n,'" y2="').concat(i,`" /> 1201`)]}static async fromElement(t,n,r){const i=bd(t,this.ATTRIBUTE_NAMES,r),{x1:s=0,y1:a=0,x2:o=0,y2:c=0}=i;return new this([s,a,o,c],Ar(i,AXe))}static fromObject(t){let{x1:n,y1:r,x2:i,y2:s}=t,a=Ar(t,MXe);return this._fromObject(le(le({},a),{},{points:[n,r,i,s]}),{extraParam:"points"})}}ie(Gf,"type","Line"),ie(Gf,"cacheProperties",[...yd,...q7]),ie(Gf,"ATTRIBUTE_NAMES",xf.concat(q7)),ft.setClass(Gf),ft.setSVGClass(Gf);class tm extends Rs{static getDefaults(){return le(le({},super.getDefaults()),tm.ownDefaults)}constructor(t){super(),Object.assign(this,tm.ownDefaults),this.setOptions(t)}_render(t){const n=this.width/2,r=this.height/2;t.beginPath(),t.moveTo(-n,r),t.lineTo(0,-r),t.lineTo(n,r),t.closePath(),this._renderPaintInOrder(t)}_toSVG(){const t=this.width/2,n=this.height/2;return["<polygon ","COMMON_PARTS",'points="',"".concat(-t," ").concat(n,",0 ").concat(-n,",").concat(t," ").concat(n),'" />']}}ie(tm,"type","Triangle"),ie(tm,"ownDefaults",{width:100,height:100}),ft.setClass(tm),ft.setSVGClass(tm);const ale=["rx","ry"];class iu extends Rs{static getDefaults(){return le(le({},super.getDefaults()),iu.ownDefaults)}constructor(t){super(),Object.assign(this,iu.ownDefaults),this.setOptions(t)}_set(t,n){switch(super._set(t,n),t){case"rx":this.rx=n,this.set("width",2*n);break;case"ry":this.ry=n,this.set("height",2*n)}return this}getRx(){return this.get("rx")*this.get(Oa)}getRy(){return this.get("ry")*this.get(Yo)}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...ale,...t])}_toSVG(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" rx="'.concat(this.rx,'" ry="').concat(this.ry,`" /> 1202`)]}_render(t){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(0,0,this.rx,0,S5,!1),t.restore(),this._renderPaintInOrder(t)}static async fromElement(t,n,r){const i=bd(t,this.ATTRIBUTE_NAMES,r);return i.left=(i.left||0)-i.rx,i.top=(i.top||0)-i.ry,new this(i)}}function RXe(e){if(!e)return[];const t=e.replace(/,/g," ").trim().split(/\s+/),n=[];for(let r=0;r<t.length;r+=2)n.push({x:parseFloat(t[r]),y:parseFloat(t[r+1])});return n}ie(iu,"type","Ellipse"),ie(iu,"cacheProperties",[...yd,...ale]),ie(iu,"ownDefaults",{rx:0,ry:0}),ie(iu,"ATTRIBUTE_NAMES",[...xf,"cx","cy","rx","ry"]),ft.setClass(iu),ft.setSVGClass(iu);const OXe=["left","top"],ole={exactBoundingBox:!1};class fl extends Rs{static getDefaults(){return le(le({},super.getDefaults()),fl.ownDefaults)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ie(this,"strokeDiff",void 0),Object.assign(this,fl.ownDefaults),this.setOptions(n),this.points=t;const{left:r,top:i}=n;this.initialized=!0,this.setBoundingBox(!0),typeof r=="number"&&this.set(Zn,r),typeof i=="number"&&this.set(Ea,i)}isOpen(){return!0}_projectStrokeOnPoints(t){return SKe(this.points,t,this.isOpen())}_calcDimensions(t){t=le({scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:this.strokeMiterLimit,strokeUniform:this.strokeUniform,strokeWidth:this.strokeWidth},t||{});const n=this.exactBoundingBox?this._projectStrokeOnPoints(t).map(u=>u.projectedPoint):this.points;if(n.length===0)return{left:0,top:0,width:0,height:0,pathOffset:new be,strokeOffset:new be,strokeDiff:new be};const r=Nu(n),i=H3(le(le({},t),{},{scaleX:1,scaleY:1})),s=Nu(this.points.map(u=>fa(u,i,!0))),a=new be(this.scaleX,this.scaleY);let o=r.left+r.width/2,c=r.top+r.height/2;return this.exactBoundingBox&&(o-=c*Math.tan(ai(this.skewX)),c-=o*Math.tan(ai(this.skewY))),le(le({},r),{},{pathOffset:new be(o,c),strokeOffset:new be(s.left,s.top).subtract(new be(r.left,r.top)).multiply(a),strokeDiff:new be(r.width,r.height).subtract(new be(s.width,s.height)).multiply(a)})}_findCenterFromElement(){const t=Nu(this.points);return new be(t.left+t.width/2,t.top+t.height/2)}setDimensions(){this.setBoundingBox()}setBoundingBox(t){const{left:n,top:r,width:i,height:s,pathOffset:a,strokeOffset:o,strokeDiff:c}=this._calcDimensions();this.set({width:i,height:s,pathOffset:a,strokeOffset:o,strokeDiff:c}),t&&this.setPositionByOrigin(new be(n+i/2,r+s/2),pn,pn)}isStrokeAccountedForInDimensions(){return this.exactBoundingBox}_getNonTransformedDimensions(){return this.exactBoundingBox?new be(this.width,this.height):super._getNonTransformedDimensions()}_getTransformedDimensions(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.exactBoundingBox){let a;if(Object.keys(t).some(o=>this.strokeUniform||this.constructor.layoutProperties.includes(o))){var n,r;const{width:o,height:c}=this._calcDimensions(t);a=new be((n=t.width)!==null&&n!==void 0?n:o,(r=t.height)!==null&&r!==void 0?r:c)}else{var i,s;a=new be((i=t.width)!==null&&i!==void 0?i:this.width,(s=t.height)!==null&&s!==void 0?s:this.height)}return a.multiply(new be(t.scaleX||this.scaleX,t.scaleY||this.scaleY))}return super._getTransformedDimensions(t)}_set(t,n){const r=this.initialized&&this[t]!==n,i=super._set(t,n);return this.exactBoundingBox&&r&&((t===Oa||t===Yo)&&this.strokeUniform&&this.constructor.layoutProperties.includes("strokeUniform")||this.constructor.layoutProperties.includes(t))&&this.setDimensions(),i}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return le(le({},super.toObject(t)),{},{points:this.points.map(n=>{let{x:r,y:i}=n;return{x:r,y:i}})})}_toSVG(){const t=[],n=this.pathOffset.x,r=this.pathOffset.y,i=Fn.NUM_FRACTION_DIGITS;for(let s=0,a=this.points.length;s<a;s++)t.push(wr(this.points[s].x-n,i),",",wr(this.points[s].y-r,i)," ");return["<".concat(this.constructor.type.toLowerCase()," "),"COMMON_PARTS",'points="'.concat(t.join(""),`" /> 1203`)]}_render(t){const n=this.points.length,r=this.pathOffset.x,i=this.pathOffset.y;if(n&&!isNaN(this.points[n-1].y)){t.beginPath(),t.moveTo(this.points[0].x-r,this.points[0].y-i);for(let s=0;s<n;s++){const a=this.points[s];t.lineTo(a.x-r,a.y-i)}!this.isOpen()&&t.closePath(),this._renderPaintInOrder(t)}}complexity(){return this.points.length}static async fromElement(t,n,r){return new this(RXe(t.getAttribute("points")),le(le({},Ar(bd(t,this.ATTRIBUTE_NAMES,r),OXe)),n))}static fromObject(t){return this._fromObject(t,{extraParam:"points"})}}ie(fl,"ownDefaults",ole),ie(fl,"type","Polyline"),ie(fl,"layoutProperties",[ny,ry,"strokeLineCap","strokeLineJoin","strokeMiterLimit","strokeWidth","strokeUniform","points"]),ie(fl,"cacheProperties",[...yd,"points"]),ie(fl,"ATTRIBUTE_NAMES",[...xf]),ft.setClass(fl),ft.setSVGClass(fl);class q2 extends fl{isOpen(){return!1}}ie(q2,"ownDefaults",ole),ie(q2,"type","Polygon"),ft.setClass(q2),ft.setSVGClass(q2);class lle extends Rs{isEmptyStyles(t){if(!this.styles||t!==void 0&&!this.styles[t])return!0;const n=t===void 0?this.styles:{line:this.styles[t]};for(const r in n)for(const i in n[r])for(const s in n[r][i])return!1;return!0}styleHas(t,n){if(!this.styles||n!==void 0&&!this.styles[n])return!1;const r=n===void 0?this.styles:{0:this.styles[n]};for(const i in r)for(const s in r[i])if(r[i][s][t]!==void 0)return!0;return!1}cleanStyle(t){if(!this.styles)return!1;const n=this.styles;let r,i,s=0,a=!0,o=0;for(const c in n){r=0;for(const u in n[c]){const d=n[c][u]||{};s++,d[t]!==void 0?(i?d[t]!==i&&(a=!1):i=d[t],d[t]===this[t]&&delete d[t]):a=!1,Object.keys(d).length!==0?r++:delete n[c][u]}r===0&&delete n[c]}for(let c=0;c<this._textLines.length;c++)o+=this._textLines[c].length;a&&s===o&&(this[t]=i,this.removeStyle(t))}removeStyle(t){if(!this.styles)return;const n=this.styles;let r,i,s;for(i in n){for(s in r=n[i],r)delete r[s][t],Object.keys(r[s]).length===0&&delete r[s];Object.keys(r).length===0&&delete n[i]}}_extendStyles(t,n){const{lineIndex:r,charIndex:i}=this.get2DCursorLocation(t);this._getLineStyle(r)||this._setLineStyle(r);const s=uD(le(le({},this._getStyleDeclaration(r,i)),n),a=>a!==void 0);this._setStyleDeclaration(r,i,s)}getSelectionStyles(t,n,r){const i=[];for(let s=t;s<(n||t);s++)i.push(this.getStyleAtPosition(s,r));return i}getStyleAtPosition(t,n){const{lineIndex:r,charIndex:i}=this.get2DCursorLocation(t);return n?this.getCompleteStyleDeclaration(r,i):this._getStyleDeclaration(r,i)}setSelectionStyles(t,n,r){for(let i=n;i<(r||n);i++)this._extendStyles(i,t);this._forceClearCache=!0}_getStyleDeclaration(t,n){var r;const i=this.styles&&this.styles[t];return i&&(r=i[n])!==null&&r!==void 0?r:{}}getCompleteStyleDeclaration(t,n){return le(le({},sy(this,this.constructor._styleProperties)),this._getStyleDeclaration(t,n))}_setStyleDeclaration(t,n,r){this.styles[t][n]=r}_deleteStyleDeclaration(t,n){delete this.styles[t][n]}_getLineStyle(t){return!!this.styles[t]}_setLineStyle(t){this.styles[t]={}}_deleteLineStyle(t){delete this.styles[t]}}ie(lle,"_styleProperties",FYe);const DXe=/ +/g,LXe=/"/g;function YE(e,t,n,r,i){return" ".concat(function(s,a){let{left:o,top:c,width:u,height:d}=a,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fn.NUM_FRACTION_DIGITS;const f=cv(Pi,s,!1),[m,p,x,v]=[o,c,u,d].map(g=>wr(g,h));return"<rect ".concat(f,' x="').concat(m,'" y="').concat(p,'" width="').concat(x,'" height="').concat(v,'"></rect>')}(e,{left:t,top:n,width:r,height:i}),` 1204`)}const PXe=["textAnchor","textDecoration","dx","dy","top","left","fontSize","strokeWidth"];let KE;class Gi extends lle{static getDefaults(){return le(le({},super.getDefaults()),Gi.ownDefaults)}constructor(t,n){super(),ie(this,"__charBounds",[]),Object.assign(this,Gi.ownDefaults),this.setOptions(n),this.styles||(this.styles={}),this.text=t,this.initialized=!0,this.path&&this.setPathInfo(),this.initDimensions(),this.setCoords()}setPathInfo(){const t=this.path;t&&(t.segmentsInfo=Joe(t.path))}_splitText(){const t=this._splitTextIntoLines(this.text);return this.textLines=t.lines,this._textLines=t.graphemeLines,this._unwrappedTextLines=t._unwrappedLines,this._text=t.graphemeText,t}initDimensions(){this._splitText(),this._clearCache(),this.dirty=!0,this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),this.textAlign.includes(Kl)&&this.enlargeSpaces()}enlargeSpaces(){let t,n,r,i,s,a,o;for(let c=0,u=this._textLines.length;c<u;c++)if((this.textAlign===Kl||c!==u-1&&!this.isEndOfWrapping(c))&&(i=0,s=this._textLines[c],n=this.getLineWidth(c),n<this.width&&(o=this.textLines[c].match(this._reSpacesAndTabs)))){r=o.length,t=(this.width-n)/r;for(let d=0;d<=s.length;d++)a=this.__charBounds[c][d],this._reSpaceAndTab.test(s[d])?(a.width+=t,a.kernedWidth+=t,a.left+=i,i+=t):a.left+=i}}isEndOfWrapping(t){return t===this._textLines.length-1}missingNewlineOffset(t){return 1}get2DCursorLocation(t,n){const r=n?this._unwrappedTextLines:this._textLines;let i;for(i=0;i<r.length;i++){if(t<=r[i].length)return{lineIndex:i,charIndex:t};t-=r[i].length+this.missingNewlineOffset(i,n)}return{lineIndex:i-1,charIndex:r[i-1].length<t?r[i-1].length:t}}toString(){return"#<Text (".concat(this.complexity(),'): { "text": "').concat(this.text,'", "fontFamily": "').concat(this.fontFamily,'" }>')}_getCacheCanvasDimensions(){const t=super._getCacheCanvasDimensions(),n=this.fontSize;return t.width+=n*t.zoomX,t.height+=n*t.zoomY,t}_render(t){const n=this.path;n&&!n.isNotVisible()&&n._render(t),this._setTextStyles(t),this._renderTextLinesBackground(t),this._renderTextDecoration(t,"underline"),this._renderText(t),this._renderTextDecoration(t,"overline"),this._renderTextDecoration(t,"linethrough")}_renderText(t){this.paintFirst===Na?(this._renderTextStroke(t),this._renderTextFill(t)):(this._renderTextFill(t),this._renderTextStroke(t))}_setTextStyles(t,n,r){if(t.textBaseline="alphabetic",this.path)switch(this.pathAlign){case pn:t.textBaseline="middle";break;case"ascender":t.textBaseline=Ea;break;case"descender":t.textBaseline=D7}t.font=this._getFontDeclaration(n,r)}calcTextWidth(){let t=this.getLineWidth(0);for(let n=1,r=this._textLines.length;n<r;n++){const i=this.getLineWidth(n);i>t&&(t=i)}return t}_renderTextLine(t,n,r,i,s,a){this._renderChars(t,n,r,i,s,a)}_renderTextLinesBackground(t){if(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor"))return;const n=t.fillStyle,r=this._getLeftOffset();let i=this._getTopOffset();for(let s=0,a=this._textLines.length;s<a;s++){const o=this.getHeightOfLine(s);if(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor",s)){i+=o;continue}const c=this._textLines[s].length,u=this._getLineLeftOffset(s);let d,h,f=0,m=0,p=this.getValueOfPropertyAt(s,0,"textBackgroundColor");const x=this.getHeightOfLineImpl(s);for(let v=0;v<c;v++){const g=this.__charBounds[s][v];h=this.getValueOfPropertyAt(s,v,"textBackgroundColor"),this.path?(t.save(),t.translate(g.renderLeft,g.renderTop),t.rotate(g.angle),t.fillStyle=h,h&&t.fillRect(-g.width/2,-x*(1-this._fontSizeFraction),g.width,x),t.restore()):h!==p?(d=r+u+m,this.direction==="rtl"&&(d=this.width-d-f),t.fillStyle=p,p&&t.fillRect(d,i,f,x),m=g.left,f=g.width,p=h):f+=g.kernedWidth}h&&!this.path&&(d=r+u+m,this.direction==="rtl"&&(d=this.width-d-f),t.fillStyle=h,t.fillRect(d,i,f,x)),i+=o}t.fillStyle=n,this._removeShadow(t)}_measureChar(t,n,r,i){const s=ob.getFontCache(n),a=this._getFontDeclaration(n),o=r?r+t:t,c=r&&a===this._getFontDeclaration(i),u=n.fontSize/this.CACHE_FONT_SIZE;let d,h,f,m;if(r&&s.has(r)&&(f=s.get(r)),s.has(t)&&(m=d=s.get(t)),c&&s.has(o)&&(h=s.get(o),m=h-f),d===void 0||f===void 0||h===void 0){const p=function(){return KE||(KE=Ko({width:0,height:0}).getContext("2d")),KE}();this._setTextStyles(p,n,!0),d===void 0&&(m=d=p.measureText(t).width,s.set(t,d)),f===void 0&&c&&r&&(f=p.measureText(r).width,s.set(r,f)),c&&h===void 0&&(h=p.measureText(o).width,s.set(o,h),m=h-f)}return{width:d*u,kernedWidth:m*u}}getHeightOfChar(t,n){return this.getValueOfPropertyAt(t,n,"fontSize")}measureLine(t){const n=this._measureLine(t);return this.charSpacing!==0&&(n.width-=this._getWidthOfCharSpacing()),n.width<0&&(n.width=0),n}_measureLine(t){let n,r,i=0;const s=this.pathSide===si,a=this.path,o=this._textLines[t],c=o.length,u=new Array(c);this.__charBounds[t]=u;for(let d=0;d<c;d++){const h=o[d];r=this._getGraphemeBox(h,t,d,n),u[d]=r,i+=r.kernedWidth,n=h}if(u[c]={left:r?r.left+r.width:0,width:0,kernedWidth:0,height:this.fontSize,deltaY:0},a&&a.segmentsInfo){let d=0;const h=a.segmentsInfo[a.segmentsInfo.length-1].length;switch(this.textAlign){case Zn:d=s?h-i:0;break;case pn:d=(h-i)/2;break;case si:d=s?0:h-i}d+=this.pathStartOffset*(s?-1:1);for(let f=s?c-1:0;s?f>=0:f<c;s?f--:f++)r=u[f],d>h?d%=h:d<0&&(d+=h),this._setGraphemeOnPath(d,r),d+=r.kernedWidth}return{width:i,numOfSpaces:0}}_setGraphemeOnPath(t,n){const r=t+n.kernedWidth/2,i=this.path,s=uXe(i.path,r,i.segmentsInfo);n.renderLeft=s.x-i.pathOffset.x,n.renderTop=s.y-i.pathOffset.y,n.angle=s.angle+(this.pathSide===si?Math.PI:0)}_getGraphemeBox(t,n,r,i,s){const a=this.getCompleteStyleDeclaration(n,r),o=i?this.getCompleteStyleDeclaration(n,r-1):{},c=this._measureChar(t,a,i,o);let u,d=c.kernedWidth,h=c.width;this.charSpacing!==0&&(u=this._getWidthOfCharSpacing(),h+=u,d+=u);const f={width:h,left:0,height:a.fontSize,kernedWidth:d,deltaY:a.deltaY};if(r>0&&!s){const m=this.__charBounds[n][r-1];f.left=m.left+m.width+c.kernedWidth-c.width}return f}getHeightOfLineImpl(t){const n=this.__lineHeights;if(n[t])return n[t];let r=this.getHeightOfChar(t,0);for(let i=1,s=this._textLines[t].length;i<s;i++)r=Math.max(this.getHeightOfChar(t,i),r);return n[t]=r*this._fontSizeMult}getHeightOfLine(t){return this.getHeightOfLineImpl(t)*this.lineHeight}calcTextHeight(){let t=0;for(let n=0,r=this._textLines.length;n<r;n++)t+=n===r-1?this.getHeightOfLineImpl(n):this.getHeightOfLine(n);return t}_getLeftOffset(){return this.direction==="ltr"?-this.width/2:this.width/2}_getTopOffset(){return-this.height/2}_renderTextCommon(t,n){t.save();let r=0;const i=this._getLeftOffset(),s=this._getTopOffset();for(let a=0,o=this._textLines.length;a<o;a++)this._renderTextLine(n,t,this._textLines[a],i+this._getLineLeftOffset(a),s+r+this.getHeightOfLineImpl(a),a),r+=this.getHeightOfLine(a);t.restore()}_renderTextFill(t){(this.fill||this.styleHas(Pi))&&this._renderTextCommon(t,"fillText")}_renderTextStroke(t){(this.stroke&&this.strokeWidth!==0||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray),t.beginPath(),this._renderTextCommon(t,"strokeText"),t.closePath(),t.restore())}_renderChars(t,n,r,i,s,a){const o=this.textAlign.includes(Kl),c=this.path,u=!o&&this.charSpacing===0&&this.isEmptyStyles(a)&&!c,d=this.direction==="ltr",h=this.direction==="ltr"?1:-1,f=n.direction;let m,p,x,v,g,y="",w=0;if(n.save(),f!==this.direction&&(n.canvas.setAttribute("dir",d?"ltr":"rtl"),n.direction=d?"ltr":"rtl",n.textAlign=d?Zn:si),s-=this.getHeightOfLineImpl(a)*this._fontSizeFraction,u)return this._renderChar(t,n,a,0,r.join(""),i,s),void n.restore();for(let S=0,C=r.length-1;S<=C;S++)v=S===C||this.charSpacing||c,y+=r[S],x=this.__charBounds[a][S],w===0?(i+=h*(x.kernedWidth-x.width),w+=x.width):w+=x.kernedWidth,o&&!v&&this._reSpaceAndTab.test(r[S])&&(v=!0),v||(m=m||this.getCompleteStyleDeclaration(a,S),p=this.getCompleteStyleDeclaration(a,S+1),v=yD(m,p,!1)),v&&(c?(n.save(),n.translate(x.renderLeft,x.renderTop),n.rotate(x.angle),this._renderChar(t,n,a,S,y,-w/2,0),n.restore()):(g=i,this._renderChar(t,n,a,S,y,g,s)),y="",m=p,i+=h*w,w=0);n.restore()}_applyPatternGradientTransformText(t){const n=this.width+this.strokeWidth,r=this.height+this.strokeWidth,i=Ko({width:n,height:r}),s=i.getContext("2d");return i.width=n,i.height=r,s.beginPath(),s.moveTo(0,0),s.lineTo(n,0),s.lineTo(n,r),s.lineTo(0,r),s.closePath(),s.translate(n/2,r/2),s.fillStyle=t.toLive(s),this._applyPatternGradientTransform(s,t),s.fill(),s.createPattern(i,"no-repeat")}handleFiller(t,n,r){let i,s;return Po(r)?r.gradientUnits==="percentage"||r.gradientTransform||r.patternTransform?(i=-this.width/2,s=-this.height/2,t.translate(i,s),t[n]=this._applyPatternGradientTransformText(r),{offsetX:i,offsetY:s}):(t[n]=r.toLive(t),this._applyPatternGradientTransform(t,r)):(t[n]=r,{offsetX:0,offsetY:0})}_setStrokeStyles(t,n){let{stroke:r,strokeWidth:i}=n;return t.lineWidth=i,t.lineCap=this.strokeLineCap,t.lineDashOffset=this.strokeDashOffset,t.lineJoin=this.strokeLineJoin,t.miterLimit=this.strokeMiterLimit,this.handleFiller(t,"strokeStyle",r)}_setFillStyles(t,n){let{fill:r}=n;return this.handleFiller(t,"fillStyle",r)}_renderChar(t,n,r,i,s,a,o){const c=this._getStyleDeclaration(r,i),u=this.getCompleteStyleDeclaration(r,i),d=t==="fillText"&&u.fill,h=t==="strokeText"&&u.stroke&&u.strokeWidth;if(h||d){if(n.save(),n.font=this._getFontDeclaration(u),c.textBackgroundColor&&this._removeShadow(n),c.deltaY&&(o+=c.deltaY),d){const f=this._setFillStyles(n,u);n.fillText(s,a-f.offsetX,o-f.offsetY)}if(h){const f=this._setStrokeStyles(n,u);n.strokeText(s,a-f.offsetX,o-f.offsetY)}n.restore()}}setSuperscript(t,n){this._setScript(t,n,this.superscript)}setSubscript(t,n){this._setScript(t,n,this.subscript)}_setScript(t,n,r){const i=this.get2DCursorLocation(t,!0),s=this.getValueOfPropertyAt(i.lineIndex,i.charIndex,"fontSize"),a=this.getValueOfPropertyAt(i.lineIndex,i.charIndex,"deltaY"),o={fontSize:s*r.size,deltaY:a+s*r.baseline};this.setSelectionStyles(o,t,n)}_getLineLeftOffset(t){const n=this.getLineWidth(t),r=this.width-n,i=this.textAlign,s=this.direction,a=this.isEndOfWrapping(t);let o=0;return i===Kl||i===cb&&!a||i===lb&&!a||i===A5&&!a?0:(i===pn&&(o=r/2),i===si&&(o=r),i===cb&&(o=r/2),i===lb&&(o=r),s==="rtl"&&(i===si||i===Kl||i===lb?o=0:i===Zn||i===A5?o=-r:i!==pn&&i!==cb||(o=-r/2)),o)}_clearCache(){this._forceClearCache=!1,this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]}getLineWidth(t){if(this.__lineWidths[t]!==void 0)return this.__lineWidths[t];const{width:n}=this.measureLine(t);return this.__lineWidths[t]=n,n}_getWidthOfCharSpacing(){return this.charSpacing!==0?this.fontSize*this.charSpacing/1e3:0}getValueOfPropertyAt(t,n,r){var i;return(i=this._getStyleDeclaration(t,n)[r])!==null&&i!==void 0?i:this[r]}_renderTextDecoration(t,n){if(!this[n]&&!this.styleHas(n))return;let r=this._getTopOffset();const i=this._getLeftOffset(),s=this.path,a=this._getWidthOfCharSpacing(),o=n==="linethrough"?.5:n==="overline"?1:0,c=this.offsets[n];for(let u=0,d=this._textLines.length;u<d;u++){const h=this.getHeightOfLine(u);if(!this[n]&&!this.styleHas(n,u)){r+=h;continue}const f=this._textLines[u],m=h/this.lineHeight,p=this._getLineLeftOffset(u);let x=0,v=0,g=this.getValueOfPropertyAt(u,0,n),y=this.getValueOfPropertyAt(u,0,Pi),w=this.getValueOfPropertyAt(u,0,tp),S=g,C=y,k=w;const _=r+m*(1-this._fontSizeFraction);let E=this.getHeightOfChar(u,0),A=this.getValueOfPropertyAt(u,0,"deltaY");for(let M=0,$=f.length;M<$;M++){const B=this.__charBounds[u][M];S=this.getValueOfPropertyAt(u,M,n),C=this.getValueOfPropertyAt(u,M,Pi),k=this.getValueOfPropertyAt(u,M,tp);const z=this.getHeightOfChar(u,M),O=this.getValueOfPropertyAt(u,M,"deltaY");if(s&&S&&C){const P=this.fontSize*k/1e3;t.save(),t.fillStyle=y,t.translate(B.renderLeft,B.renderTop),t.rotate(B.angle),t.fillRect(-B.kernedWidth/2,c*z+O-o*P,B.kernedWidth,P),t.restore()}else if((S!==g||C!==y||z!==E||k!==w||O!==A)&&v>0){const P=this.fontSize*w/1e3;let I=i+p+x;this.direction==="rtl"&&(I=this.width-I-v),g&&y&&w&&(t.fillStyle=y,t.fillRect(I,_+c*E+A-o*P,v,P)),x=B.left,v=B.width,g=S,w=k,y=C,E=z,A=O}else v+=B.kernedWidth}let j=i+p+x;this.direction==="rtl"&&(j=this.width-j-v),t.fillStyle=C;const D=this.fontSize*k/1e3;S&&C&&k&&t.fillRect(j,_+c*E+A-o*D,v-a,D),r+=h}this._removeShadow(t)}_getFontDeclaration(){let{fontFamily:t=this.fontFamily,fontStyle:n=this.fontStyle,fontWeight:r=this.fontWeight,fontSize:i=this.fontSize}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;const a=t.includes("'")||t.includes('"')||t.includes(",")||Gi.genericFonts.includes(t.toLowerCase())?t:'"'.concat(t,'"');return[n,r,"".concat(s?this.CACHE_FONT_SIZE:i,"px"),a].join(" ")}render(t){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._forceClearCache&&this.initDimensions(),super.render(t)))}graphemeSplit(t){return xD(t)}_splitTextIntoLines(t){const n=t.split(this._reNewline),r=new Array(n.length),i=[` 1205`];let s=[];for(let a=0;a<n.length;a++)r[a]=this.graphemeSplit(n[a]),s=s.concat(r[a],i);return s.pop(),{_unwrappedLines:r,lines:n,graphemeText:s,graphemeLines:r}}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return le(le({},super.toObject([...Loe,...t])),{},{styles:TKe(this.styles,this.text)},this.path?{path:this.path.toObject()}:{})}set(t,n){const{textLayoutProperties:r}=this.constructor;super.set(t,n);let i=!1,s=!1;if(typeof t=="object")for(const a in t)a==="path"&&this.setPathInfo(),i=i||r.includes(a),s=s||a==="path";else i=r.includes(t),s=t==="path";return s&&this.setPathInfo(),i&&this.initialized&&(this.initDimensions(),this.setCoords()),this}complexity(){return 1}static async fromElement(t,n,r){const i=bd(t,Gi.ATTRIBUTE_NAMES,r),s=le(le({},n),i),{textAnchor:a=Zn,textDecoration:o="",dx:c=0,dy:u=0,top:d=0,left:h=0,fontSize:f=iD,strokeWidth:m=1}=s,p=Ar(s,PXe),x=new this(N5(t.textContent||"").trim(),le({left:h+c,top:d+u,underline:o.includes("underline"),overline:o.includes("overline"),linethrough:o.includes("line-through"),strokeWidth:0,fontSize:f},p)),v=x.getScaledHeight()/x.height,g=((x.height+x.strokeWidth)*x.lineHeight-x.height)*v,y=x.getScaledHeight()+g;let w=0;return a===pn&&(w=x.getScaledWidth()/2),a===si&&(w=x.getScaledWidth()),x.set({left:x.left-w,top:x.top-(y-x.fontSize*(.07+x._fontSizeFraction))/x.lineHeight,strokeWidth:m}),x}static fromObject(t){return this._fromObject(le(le({},t),{},{styles:EKe(t.styles||{},t.text)}),{extraParam:"text"})}}ie(Gi,"textLayoutProperties",Doe),ie(Gi,"cacheProperties",[...yd,...Loe]),ie(Gi,"ownDefaults",BYe),ie(Gi,"type","Text"),ie(Gi,"genericFonts",["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]),ie(Gi,"ATTRIBUTE_NAMES",xf.concat("x","y","dx","dy","font-family","font-style","font-weight","font-size","letter-spacing","text-decoration","text-anchor")),Hoe(Gi,[class extends Moe{_toSVG(){const e=this._getSVGLeftTopOffsets(),t=this._getSVGTextAndBg(e.textTop,e.textLeft);return this._wrapSVGTextAndBg(t)}toSVG(e){const t=this._createBaseSVGMarkup(this._toSVG(),{reviver:e,noStyle:!0,withShadow:!0}),n=this.path;return n?t+n._createBaseSVGMarkup(n._toSVG(),{reviver:e,withShadow:!0,additionalTransform:lv(this.calcOwnMatrix())}):t}_getSVGLeftTopOffsets(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}}_wrapSVGTextAndBg(e){let{textBgRects:t,textSpans:n}=e;const r=this.getSvgTextDecoration(this);return[t.join(""),' <text xml:space="preserve" ','font-family="'.concat(this.fontFamily.replace(LXe,"'"),'" '),'font-size="'.concat(this.fontSize,'" '),this.fontStyle?'font-style="'.concat(this.fontStyle,'" '):"",this.fontWeight?'font-weight="'.concat(this.fontWeight,'" '):"",r?'text-decoration="'.concat(r,'" '):"",this.direction==="rtl"?'direction="'.concat(this.direction,'" '):"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",n.join(""),`</text> 1206`]}_getSVGTextAndBg(e,t){const n=[],r=[];let i,s=e;this.backgroundColor&&r.push(...YE(this.backgroundColor,-this.width/2,-this.height/2,this.width,this.height));for(let a=0,o=this._textLines.length;a<o;a++)i=this._getLineLeftOffset(a),this.direction==="rtl"&&(i+=this.width),(this.textBackgroundColor||this.styleHas("textBackgroundColor",a))&&this._setSVGTextLineBg(r,a,t+i,s),this._setSVGTextLineText(n,a,t+i,s),s+=this.getHeightOfLine(a);return{textSpans:n,textBgRects:r}}_createTextCharSpan(e,t,n,r,i){const s=Fn.NUM_FRACTION_DIGITS,a=this.getSvgSpanStyles(t,e!==e.trim()||!!e.match(DXe)),o=a?'style="'.concat(a,'"'):"",c=t.deltaY,u=c?' dy="'.concat(wr(c,s),'" '):"",{angle:d,renderLeft:h,renderTop:f,width:m}=i;let p="";if(h!==void 0){const x=m/2;d&&(p=' rotate="'.concat(wr(Zu(d),s),'"'));const v=iy({angle:Zu(d)});v[4]=h,v[5]=f;const g=new be(-x,0).transform(v);n=g.x,r=g.y}return'<tspan x="'.concat(wr(n,s),'" y="').concat(wr(r,s),'" ').concat(u).concat(p).concat(o,">").concat(CKe(e),"</tspan>")}_setSVGTextLineText(e,t,n,r){const i=this.getHeightOfLine(t),s=this.textAlign.includes(Kl),a=this._textLines[t];let o,c,u,d,h,f="",m=0;r+=i*(1-this._fontSizeFraction)/this.lineHeight;for(let p=0,x=a.length-1;p<=x;p++)h=p===x||this.charSpacing||this.path,f+=a[p],u=this.__charBounds[t][p],m===0?(n+=u.kernedWidth-u.width,m+=u.width):m+=u.kernedWidth,s&&!h&&this._reSpaceAndTab.test(a[p])&&(h=!0),h||(o=o||this.getCompleteStyleDeclaration(t,p),c=this.getCompleteStyleDeclaration(t,p+1),h=yD(o,c,!0)),h&&(d=this._getStyleDeclaration(t,p),e.push(this._createTextCharSpan(f,d,n,r,u)),f="",o=c,this.direction==="rtl"?n-=m:n+=m,m=0)}_setSVGTextLineBg(e,t,n,r){const i=this._textLines[t],s=this.getHeightOfLine(t)/this.lineHeight;let a,o=0,c=0,u=this.getValueOfPropertyAt(t,0,"textBackgroundColor");for(let d=0;d<i.length;d++){const{left:h,width:f,kernedWidth:m}=this.__charBounds[t][d];a=this.getValueOfPropertyAt(t,d,"textBackgroundColor"),a!==u?(u&&e.push(...YE(u,n+c,r,o,s)),c=h,o=f,u=a):o+=m}a&&e.push(...YE(u,n+c,r,o,s))}_getSVGLineTopOffset(e){let t,n=0;for(t=0;t<e;t++)n+=this.getHeightOfLine(t);const r=this.getHeightOfLine(t);return{lineTop:n,offset:(this._fontSizeMult-this._fontSizeFraction)*r/(this.lineHeight*this._fontSizeMult)}}getSvgStyles(e){return"".concat(super.getSvgStyles(e)," text-decoration-thickness: ").concat(wr(this.textDecorationThickness*this.getObjectScaling().y/10,Fn.NUM_FRACTION_DIGITS),"%; white-space: pre;")}getSvgSpanStyles(e,t){const{fontFamily:n,strokeWidth:r,stroke:i,fill:s,fontSize:a,fontStyle:o,fontWeight:c,deltaY:u,textDecorationThickness:d,linethrough:h,overline:f,underline:m}=e,p=this.getSvgTextDecoration({underline:m??this.underline,overline:f??this.overline,linethrough:h??this.linethrough}),x=d||this.textDecorationThickness;return[i?cv(Na,i):"",r?"stroke-width: ".concat(r,"; "):"",n?"font-family: ".concat(n.includes("'")||n.includes('"')?n:"'".concat(n,"'"),"; "):"",a?"font-size: ".concat(a,"px; "):"",o?"font-style: ".concat(o,"; "):"",c?"font-weight: ".concat(c,"; "):"",p?"text-decoration: ".concat(p,"; text-decoration-thickness: ").concat(wr(x*this.getObjectScaling().y/10,Fn.NUM_FRACTION_DIGITS),"%; "):"",s?cv(Pi,s):"",u?"baseline-shift: ".concat(-u,"; "):"",t?"white-space: pre; ":""].join("")}getSvgTextDecoration(e){return["overline","underline","line-through"].filter(t=>e[t.replace("-","")]).join(" ")}}]),ft.setClass(Gi),ft.setSVGClass(Gi);class IXe{constructor(t){ie(this,"target",void 0),ie(this,"__mouseDownInPlace",!1),ie(this,"__dragStartFired",!1),ie(this,"__isDraggingOver",!1),ie(this,"__dragStartSelection",void 0),ie(this,"__dragImageDisposer",void 0),ie(this,"_dispose",void 0),this.target=t;const n=[this.target.on("dragenter",this.dragEnterHandler.bind(this)),this.target.on("dragover",this.dragOverHandler.bind(this)),this.target.on("dragleave",this.dragLeaveHandler.bind(this)),this.target.on("dragend",this.dragEndHandler.bind(this)),this.target.on("drop",this.dropHandler.bind(this))];this._dispose=()=>{n.forEach(r=>r()),this._dispose=void 0}}isPointerOverSelection(t){const n=this.target,r=n.getSelectionStartFromPointer(t);return n.isEditing&&r>=n.selectionStart&&r<=n.selectionEnd&&n.selectionStart<n.selectionEnd}start(t){return this.__mouseDownInPlace=this.isPointerOverSelection(t)}isActive(){return this.__mouseDownInPlace}end(t){const n=this.isActive();return n&&!this.__dragStartFired&&(this.target.setCursorByClick(t),this.target.initDelayedCursor(!0)),this.__mouseDownInPlace=!1,this.__dragStartFired=!1,this.__isDraggingOver=!1,n}getDragStartSelection(){return this.__dragStartSelection}setDragImage(t,n){var r;let{selectionStart:i,selectionEnd:s}=n;const a=this.target,o=a.canvas,c=new be(a.flipX?-1:1,a.flipY?-1:1),u=a._getCursorBoundaries(i),d=new be(u.left+u.leftOffset,u.top+u.topOffset).multiply(c).transform(a.calcTransformMatrix()),h=o.getScenePoint(t).subtract(d),f=a.getCanvasRetinaScaling(),m=a.getBoundingRect(),p=d.subtract(new be(m.left,m.top)),x=o.viewportTransform,v=p.add(h).transform(x,!0),g=a.backgroundColor,y=gD(a.styles);a.backgroundColor="";const w={stroke:"transparent",fill:"transparent",textBackgroundColor:"transparent"};a.setSelectionStyles(w,0,i),a.setSelectionStyles(w,s,a.text.length),a.dirty=!0;const S=a.toCanvasElement({enableRetinaScaling:o.enableRetinaScaling,viewportTransform:!0});a.backgroundColor=g,a.styles=y,a.dirty=!0,V7(S,{position:"fixed",left:"".concat(-S.width,"px"),border:ja,width:"".concat(S.width/f,"px"),height:"".concat(S.height/f,"px")}),this.__dragImageDisposer&&this.__dragImageDisposer(),this.__dragImageDisposer=()=>{S.remove()},gl(t.target||this.target.hiddenTextarea).body.appendChild(S),(r=t.dataTransfer)===null||r===void 0||r.setDragImage(S,v.x,v.y)}onDragStart(t){this.__dragStartFired=!0;const n=this.target,r=this.isActive();if(r&&t.dataTransfer){const i=this.__dragStartSelection={selectionStart:n.selectionStart,selectionEnd:n.selectionEnd},s=n._text.slice(i.selectionStart,i.selectionEnd).join(""),a=le({text:n.text,value:s},i);t.dataTransfer.setData("text/plain",s),t.dataTransfer.setData("application/fabric",JSON.stringify({value:s,styles:n.getSelectionStyles(i.selectionStart,i.selectionEnd,!0)})),t.dataTransfer.effectAllowed="copyMove",this.setDragImage(t,a)}return n.abortCursorAnimation(),r}canDrop(t){if(this.target.editable&&!this.target.getActiveControl()&&!t.defaultPrevented){if(this.isActive()&&this.__dragStartSelection){const n=this.target.getSelectionStartFromPointer(t),r=this.__dragStartSelection;return n<r.selectionStart||n>r.selectionEnd}return!0}return!1}targetCanDrop(t){return this.target.canDrop(t)}dragEnterHandler(t){let{e:n}=t;const r=this.targetCanDrop(n);!this.__isDraggingOver&&r&&(this.__isDraggingOver=!0)}dragOverHandler(t){const{e:n}=t,r=this.targetCanDrop(n);!this.__isDraggingOver&&r?this.__isDraggingOver=!0:this.__isDraggingOver&&!r&&(this.__isDraggingOver=!1),this.__isDraggingOver&&(n.preventDefault(),t.canDrop=!0,t.dropTarget=this.target)}dragLeaveHandler(){(this.__isDraggingOver||this.isActive())&&(this.__isDraggingOver=!1)}dropHandler(t){var n;const{e:r}=t,i=r.defaultPrevented;this.__isDraggingOver=!1,r.preventDefault();let s=(n=r.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain");if(s&&!i){const a=this.target,o=a.canvas;let c=a.getSelectionStartFromPointer(r);const{styles:u}=r.dataTransfer.types.includes("application/fabric")?JSON.parse(r.dataTransfer.getData("application/fabric")):{},d=s[Math.max(0,s.length-1)],h=0;if(this.__dragStartSelection){const f=this.__dragStartSelection.selectionStart,m=this.__dragStartSelection.selectionEnd;c>f&&c<=m?c=f:c>m&&(c-=m-f),a.removeChars(f,m),delete this.__dragStartSelection}a._reNewline.test(d)&&(a._reNewline.test(a._text[c])||c===a._text.length)&&(s=s.trimEnd()),t.didDrop=!0,t.dropTarget=a,a.insertChars(s,u,c),o.setActiveObject(a),a.enterEditing(r),a.selectionStart=Math.min(c+h,a._text.length),a.selectionEnd=Math.min(a.selectionStart+s.length,a._text.length),a.hiddenTextarea.value=a.text,a._updateTextarea(),a.hiddenTextarea.focus(),a.fire(C5,{index:c+h,action:"drop"}),o.fire("text:changed",{target:a}),o.contextTopDirty=!0,o.requestRenderAll()}}dragEndHandler(t){let{e:n}=t;if(this.isActive()&&this.__dragStartFired&&this.__dragStartSelection){var r;const i=this.target,s=this.target.canvas,{selectionStart:a,selectionEnd:o}=this.__dragStartSelection,c=((r=n.dataTransfer)===null||r===void 0?void 0:r.dropEffect)||ja;c===ja?(i.selectionStart=a,i.selectionEnd=o,i._updateTextarea(),i.hiddenTextarea.focus()):(i.clearContextTop(),c==="move"&&(i.removeChars(a,o),i.selectionStart=i.selectionEnd=a,i.hiddenTextarea&&(i.hiddenTextarea.value=i.text),i._updateTextarea(),i.fire(C5,{index:a,action:"dragend"}),s.fire("text:changed",{target:i}),s.requestRenderAll()),i.exitEditing())}this.__dragImageDisposer&&this.__dragImageDisposer(),delete this.__dragImageDisposer,delete this.__dragStartSelection,this.__isDraggingOver=!1}dispose(){this._dispose&&this._dispose()}}const kH=/[ \n\.,;!\?\-]/;class FXe extends Gi{constructor(){super(...arguments),ie(this,"_currentCursorOpacity",1)}initBehavior(){this._tick=this._tick.bind(this),this._onTickComplete=this._onTickComplete.bind(this),this.updateSelectionOnMouseMove=this.updateSelectionOnMouseMove.bind(this)}onDeselect(t){return this.isEditing&&this.exitEditing(),this.selected=!1,super.onDeselect(t)}_animateCursor(t){let{toValue:n,duration:r,delay:i,onComplete:s}=t;return Boe({startValue:this._currentCursorOpacity,endValue:n,duration:r,delay:i,onComplete:s,abort:()=>!this.canvas||this.selectionStart!==this.selectionEnd,onChange:a=>{this._currentCursorOpacity=a,this.renderCursorOrSelection()}})}_tick(t){this._currentTickState=this._animateCursor({toValue:0,duration:this.cursorDuration/2,delay:Math.max(t||0,100),onComplete:this._onTickComplete})}_onTickComplete(){var t;(t=this._currentTickCompleteState)===null||t===void 0||t.abort(),this._currentTickCompleteState=this._animateCursor({toValue:1,duration:this.cursorDuration,onComplete:this._tick})}initDelayedCursor(t){this.abortCursorAnimation(),this._tick(t?0:this.cursorDelay)}abortCursorAnimation(){let t=!1;[this._currentTickState,this._currentTickCompleteState].forEach(n=>{n&&!n.isDone()&&(t=!0,n.abort())}),this._currentCursorOpacity=1,t&&this.clearContextTop()}restartCursorIfNeeded(){[this._currentTickState,this._currentTickCompleteState].some(t=>!t||t.isDone())&&this.initDelayedCursor()}selectAll(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this}cmdAll(){this.selectAll(),this.renderCursorOrSelection()}getSelectedText(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")}findWordBoundaryLeft(t){let n=0,r=t-1;if(this._reSpace.test(this._text[r]))for(;this._reSpace.test(this._text[r]);)n++,r--;for(;/\S/.test(this._text[r])&&r>-1;)n++,r--;return t-n}findWordBoundaryRight(t){let n=0,r=t;if(this._reSpace.test(this._text[r]))for(;this._reSpace.test(this._text[r]);)n++,r++;for(;/\S/.test(this._text[r])&&r<this._text.length;)n++,r++;return t+n}findLineBoundaryLeft(t){let n=0,r=t-1;for(;!/\n/.test(this._text[r])&&r>-1;)n++,r--;return t-n}findLineBoundaryRight(t){let n=0,r=t;for(;!/\n/.test(this._text[r])&&r<this._text.length;)n++,r++;return t+n}searchWordBoundary(t,n){const r=this._text;let i=t>0&&this._reSpace.test(r[t])&&(n===-1||!sD.test(r[t-1]))?t-1:t,s=r[i];for(;i>0&&i<r.length&&!kH.test(s);)i+=n,s=r[i];return n===-1&&kH.test(s)&&i++,i}selectWord(t){var n;t=(n=t)!==null&&n!==void 0?n:this.selectionStart;const r=this.searchWordBoundary(t,-1),i=Math.max(r,this.searchWordBoundary(t,1));this.selectionStart=r,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()}selectLine(t){var n;t=(n=t)!==null&&n!==void 0?n:this.selectionStart;const r=this.findLineBoundaryLeft(t),i=this.findLineBoundaryRight(t);this.selectionStart=r,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea()}enterEditing(t){!this.isEditing&&this.editable&&(this.enterEditingImpl(),this.fire("editing:entered",t?{e:t}:void 0),this._fireSelectionChanged(),this.canvas&&(this.canvas.fire("text:editing:entered",{target:this,e:t}),this.canvas.requestRenderAll()))}enterEditingImpl(){this.canvas&&(this.canvas.calcOffset(),this.canvas.textEditingManager.exitTextEditing()),this.isEditing=!0,this.initHiddenTextarea(),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick()}updateSelectionOnMouseMove(t){if(this.getActiveControl())return;const n=this.hiddenTextarea;gl(n).activeElement!==n&&n.focus();const r=this.getSelectionStartFromPointer(t),i=this.selectionStart,s=this.selectionEnd;(r===this.__selectionStartOnMouseDown&&i!==s||i!==r&&s!==r)&&(r>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=r):(this.selectionStart=r,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===s||(this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}_setEditingProps(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0}fromStringToGraphemeSelection(t,n,r){const i=r.slice(0,t),s=this.graphemeSplit(i).length;if(t===n)return{selectionStart:s,selectionEnd:s};const a=r.slice(t,n);return{selectionStart:s,selectionEnd:s+this.graphemeSplit(a).length}}fromGraphemeToStringSelection(t,n,r){const i=r.slice(0,t).join("").length;return t===n?{selectionStart:i,selectionEnd:i}:{selectionStart:i,selectionEnd:i+r.slice(t,n).join("").length}}_updateTextarea(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){const t=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=t.selectionStart,this.hiddenTextarea.selectionEnd=t.selectionEnd}this.updateTextareaPosition()}}updateFromTextArea(){if(!this.hiddenTextarea)return;this.cursorOffsetCache={};const t=this.hiddenTextarea;this.text=t.value,this.set("dirty",!0),this.initDimensions(),this.setCoords();const n=this.fromStringToGraphemeSelection(t.selectionStart,t.selectionEnd,t.value);this.selectionEnd=this.selectionStart=n.selectionEnd,this.inCompositionMode||(this.selectionStart=n.selectionStart),this.updateTextareaPosition()}updateTextareaPosition(){if(this.selectionStart===this.selectionEnd){const t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top}}_calcTextareaPosition(){if(!this.canvas)return{left:"1px",top:"1px"};const t=this.inCompositionMode?this.compositionStart:this.selectionStart,n=this._getCursorBoundaries(t),r=this.get2DCursorLocation(t),i=r.lineIndex,s=r.charIndex,a=this.getValueOfPropertyAt(i,s,"fontSize")*this.lineHeight,o=n.leftOffset,c=this.getCanvasRetinaScaling(),u=this.canvas.upperCanvasEl,d=u.width/c,h=u.height/c,f=d-a,m=h-a,p=new be(n.left+o,n.top+n.topOffset+a).transform(this.calcTransformMatrix()).transform(this.canvas.viewportTransform).multiply(new be(u.clientWidth/d,u.clientHeight/h));return p.x<0&&(p.x=0),p.x>f&&(p.x=f),p.y<0&&(p.y=0),p.y>m&&(p.y=m),p.x+=this.canvas._offset.left,p.y+=this.canvas._offset.top,{left:"".concat(p.x,"px"),top:"".concat(p.y,"px"),fontSize:"".concat(a,"px"),charHeight:a}}_saveEditingProps(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}}_restoreEditingProps(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor||this.canvas.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor||this.canvas.moveCursor),delete this._savedProps)}_exitEditing(){const t=this.hiddenTextarea;this.selected=!1,this.isEditing=!1,t&&(t.blur&&t.blur(),t.parentNode&&t.parentNode.removeChild(t)),this.hiddenTextarea=null,this.abortCursorAnimation(),this.selectionStart!==this.selectionEnd&&this.clearContextTop()}exitEditingImpl(){this._exitEditing(),this.selectionEnd=this.selectionStart,this._restoreEditingProps(),this._forceClearCache&&(this.initDimensions(),this.setCoords())}exitEditing(){const t=this._textBeforeEdit!==this.text;return this.exitEditingImpl(),this.fire("editing:exited"),t&&this.fire(k5),this.canvas&&(this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this}_removeExtraneousStyles(){for(const t in this.styles)this._textLines[t]||delete this.styles[t]}removeStyleFromTo(t,n){const{lineIndex:r,charIndex:i}=this.get2DCursorLocation(t,!0),{lineIndex:s,charIndex:a}=this.get2DCursorLocation(n,!0);if(r!==s){if(this.styles[r])for(let o=i;o<this._unwrappedTextLines[r].length;o++)delete this.styles[r][o];if(this.styles[s])for(let o=a;o<this._unwrappedTextLines[s].length;o++){const c=this.styles[s][o];c&&(this.styles[r]||(this.styles[r]={}),this.styles[r][i+o-a]=c)}for(let o=r+1;o<=s;o++)delete this.styles[o];this.shiftLineStyles(s,r-s)}else if(this.styles[r]){const o=this.styles[r],c=a-i;for(let u=i;u<a;u++)delete o[u];for(const u in this.styles[r]){const d=parseInt(u,10);d>=a&&(o[d-c]=o[u],delete o[u])}}}shiftLineStyles(t,n){const r=Object.assign({},this.styles);for(const i in this.styles){const s=parseInt(i,10);s>t&&(this.styles[s+n]=r[s],r[s-n]||delete this.styles[s])}}insertNewlineStyleObject(t,n,r,i){const s={},a=this._unwrappedTextLines[t].length,o=a===n;let c=!1;r||(r=1),this.shiftLineStyles(t,r);const u=this.styles[t]?this.styles[t][n===0?n:n-1]:void 0;for(const h in this.styles[t]){const f=parseInt(h,10);f>=n&&(c=!0,s[f-n]=this.styles[t][h],o&&n===0||delete this.styles[t][h])}let d=!1;for(c&&!o&&(this.styles[t+r]=s,d=!0),(d||a>n)&&r--;r>0;)i&&i[r-1]?this.styles[t+r]={0:le({},i[r-1])}:u?this.styles[t+r]={0:le({},u)}:delete this.styles[t+r],r--;this._forceClearCache=!0}insertCharStyleObject(t,n,r,i){this.styles||(this.styles={});const s=this.styles[t],a=s?le({},s):{};r||(r=1);for(const c in a){const u=parseInt(c,10);u>=n&&(s[u+r]=a[u],a[u-r]||delete s[u])}if(this._forceClearCache=!0,i){for(;r--;)Object.keys(i[r]).length&&(this.styles[t]||(this.styles[t]={}),this.styles[t][n+r]=le({},i[r]));return}if(!s)return;const o=s[n?n-1:1];for(;o&&r--;)this.styles[t][n+r]=le({},o)}insertNewStyleBlock(t,n,r){const i=this.get2DCursorLocation(n,!0),s=[0];let a,o=0;for(let c=0;c<t.length;c++)t[c]===` 1207`?(o++,s[o]=0):s[o]++;for(s[0]>0&&(this.insertCharStyleObject(i.lineIndex,i.charIndex,s[0],r),r=r&&r.slice(s[0]+1)),o&&this.insertNewlineStyleObject(i.lineIndex,i.charIndex+s[0],o),a=1;a<o;a++)s[a]>0?this.insertCharStyleObject(i.lineIndex+a,0,s[a],r):r&&this.styles[i.lineIndex+a]&&r[0]&&(this.styles[i.lineIndex+a][0]=r[0]),r=r&&r.slice(s[a]+1);s[a]>0&&this.insertCharStyleObject(i.lineIndex+a,0,s[a],r)}removeChars(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t+1;this.removeStyleFromTo(t,n),this._text.splice(t,n-t),this.text=this._text.join(""),this.set("dirty",!0),this.initDimensions(),this.setCoords(),this._removeExtraneousStyles()}insertChars(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r;i>r&&this.removeStyleFromTo(r,i);const s=this.graphemeSplit(t);this.insertNewStyleBlock(s,r,n),this._text=[...this._text.slice(0,r),...s,...this._text.slice(i)],this.text=this._text.join(""),this.set("dirty",!0),this.initDimensions(),this.setCoords(),this._removeExtraneousStyles()}setSelectionStartEndWithShift(t,n,r){r<=t?(n===t?this._selectionDirection=Zn:this._selectionDirection===si&&(this._selectionDirection=Zn,this.selectionEnd=t),this.selectionStart=r):r>t&&r<n?this._selectionDirection===si?this.selectionEnd=r:this.selectionStart=r:(n===t?this._selectionDirection=si:this._selectionDirection===Zn&&(this._selectionDirection=si,this.selectionStart=n),this.selectionEnd=r)}}class BXe extends FXe{initHiddenTextarea(){const t=this.canvas&&gl(this.canvas.getElement())||ty(),n=t.createElement("textarea");Object.entries({autocapitalize:"off",autocorrect:"off",autocomplete:"off",spellcheck:"false","data-fabric":"textarea",wrap:"off",name:"fabricTextarea"}).map(a=>{let[o,c]=a;return n.setAttribute(o,c)});const{top:r,left:i,fontSize:s}=this._calcTextareaPosition();n.style.cssText="position: absolute; top: ".concat(r,"; left: ").concat(i,"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(s,";"),(this.hiddenTextareaContainer||t.body).appendChild(n),Object.entries({blur:"blur",keydown:"onKeyDown",keyup:"onKeyUp",input:"onInput",copy:"copy",cut:"copy",paste:"paste",compositionstart:"onCompositionStart",compositionupdate:"onCompositionUpdate",compositionend:"onCompositionEnd"}).map(a=>{let[o,c]=a;return n.addEventListener(o,this[c].bind(this))}),this.hiddenTextarea=n}blur(){this.abortCursorAnimation()}onKeyDown(t){if(!this.isEditing)return;const n=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(t.keyCode in n)this[n[t.keyCode]](t);else{if(!(t.keyCode in this.ctrlKeysMapDown)||!t.ctrlKey&&!t.metaKey)return;this[this.ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}onKeyUp(t){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:t.keyCode in this.ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this.ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.requestRenderAll())}onInput(t){const n=this.fromPaste,{value:r,selectionStart:i,selectionEnd:s}=this.hiddenTextarea;if(this.fromPaste=!1,t&&t.stopPropagation(),!this.isEditing)return;const a=()=>{this.updateFromTextArea(),this.fire(C5),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())};if(this.hiddenTextarea.value==="")return this.styles={},void a();const o=this._splitTextIntoLines(r).graphemeText,c=this._text.length,u=o.length,d=this.selectionStart,h=this.selectionEnd,f=d!==h;let m,p,x,v,g=u-c;const y=this.fromStringToGraphemeSelection(i,s,r),w=d>y.selectionStart;f?(p=this._text.slice(d,h),g+=h-d):u<c&&(p=w?this._text.slice(h+g,h):this._text.slice(d,d-g));const S=o.slice(y.selectionEnd-g,y.selectionEnd);if(p&&p.length&&(S.length&&(m=this.getSelectionStyles(d,d+1,!1),m=S.map(()=>m[0])),f?(x=d,v=h):w?(x=h-p.length,v=h):(x=h,v=h+p.length),this.removeStyleFromTo(x,v)),S.length){const{copyPasteData:C}=Cc();n&&S.join("")===C.copiedText&&!Fn.disableStyleCopyPaste&&(m=C.copiedTextStyle),this.insertNewStyleBlock(S,d,m)}a()}onCompositionStart(){this.inCompositionMode=!0}onCompositionEnd(){this.inCompositionMode=!1}onCompositionUpdate(t){let{target:n}=t;const{selectionStart:r,selectionEnd:i}=n;this.compositionStart=r,this.compositionEnd=i,this.updateTextareaPosition()}copy(){if(this.selectionStart===this.selectionEnd)return;const{copyPasteData:t}=Cc();t.copiedText=this.getSelectedText(),Fn.disableStyleCopyPaste?t.copiedTextStyle=void 0:t.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0}paste(){this.fromPaste=!0}_getWidthBeforeCursor(t,n){let r,i=this._getLineLeftOffset(t);return n>0&&(r=this.__charBounds[t][n-1],i+=r.left+r.width),i}getDownCursorOffset(t,n){const r=this._getSelectionForOffset(t,n),i=this.get2DCursorLocation(r),s=i.lineIndex;if(s===this._textLines.length-1||t.metaKey||t.keyCode===34)return this._text.length-r;const a=i.charIndex,o=this._getWidthBeforeCursor(s,a),c=this._getIndexOnLine(s+1,o);return this._textLines[s].slice(a).length+c+1+this.missingNewlineOffset(s)}_getSelectionForOffset(t,n){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&n?this.selectionEnd:this.selectionStart}getUpCursorOffset(t,n){const r=this._getSelectionForOffset(t,n),i=this.get2DCursorLocation(r),s=i.lineIndex;if(s===0||t.metaKey||t.keyCode===33)return-r;const a=i.charIndex,o=this._getWidthBeforeCursor(s,a),c=this._getIndexOnLine(s-1,o),u=this._textLines[s].slice(0,a),d=this.missingNewlineOffset(s-1);return-this._textLines[s-1].length+c-u.length+(1-d)}_getIndexOnLine(t,n){const r=this._textLines[t];let i,s,a=this._getLineLeftOffset(t),o=0;for(let c=0,u=r.length;c<u;c++)if(i=this.__charBounds[t][c].width,a+=i,a>n){s=!0;const d=a-i,h=a,f=Math.abs(d-n);o=Math.abs(h-n)<f?c:c-1;break}return s||(o=r.length-1),o}moveCursorDown(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)}moveCursorUp(t){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",t)}_moveCursorUpOrDown(t,n){const r=this["get".concat(t,"CursorOffset")](n,this._selectionDirection===si);if(n.shiftKey?this.moveCursorWithShift(r):this.moveCursorWithoutShift(r),r!==0){const i=this.text.length;this.selectionStart=ax(0,this.selectionStart,i),this.selectionEnd=ax(0,this.selectionEnd,i),this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea()}}moveCursorWithShift(t){const n=this._selectionDirection===Zn?this.selectionStart+t:this.selectionEnd+t;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,n),t!==0}moveCursorWithoutShift(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),t!==0}moveCursorLeft(t){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",t)}_move(t,n,r){let i;if(t.altKey)i=this["findWordBoundary".concat(r)](this[n]);else{if(!t.metaKey&&t.keyCode!==35&&t.keyCode!==36)return this[n]+=r==="Left"?-1:1,!0;i=this["findLineBoundary".concat(r)](this[n])}return i!==void 0&&this[n]!==i&&(this[n]=i,!0)}_moveLeft(t,n){return this._move(t,n,"Left")}_moveRight(t,n){return this._move(t,n,"Right")}moveCursorLeftWithoutShift(t){let n=!0;return this._selectionDirection=Zn,this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(n=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,n}moveCursorLeftWithShift(t){return this._selectionDirection===si&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):this.selectionStart!==0?(this._selectionDirection=Zn,this._moveLeft(t,"selectionStart")):void 0}moveCursorRight(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)}_moveCursorLeftOrRight(t,n){const r="moveCursor".concat(t).concat(n.shiftKey?"WithShift":"WithoutShift");this._currentCursorOpacity=1,this[r](n)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())}moveCursorRightWithShift(t){return this._selectionDirection===Zn&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection=si,this._moveRight(t,"selectionEnd")):void 0}moveCursorRightWithoutShift(t){let n=!0;return this._selectionDirection=si,this.selectionStart===this.selectionEnd?(n=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,n}}const _H=e=>!!e.button;class zXe extends BXe{constructor(){super(...arguments),ie(this,"draggableTextDelegate",void 0)}initBehavior(){this.on("mousedown",this._mouseDownHandler),this.on("mouseup",this.mouseUpHandler),this.on("mousedblclick",this.doubleClickHandler),this.on("mousetripleclick",this.tripleClickHandler),this.draggableTextDelegate=new IXe(this),super.initBehavior()}shouldStartDragging(){return this.draggableTextDelegate.isActive()}onDragStart(t){return this.draggableTextDelegate.onDragStart(t)}canDrop(t){return this.draggableTextDelegate.canDrop(t)}doubleClickHandler(t){this.isEditing&&(this.selectWord(this.getSelectionStartFromPointer(t.e)),this.renderCursorOrSelection())}tripleClickHandler(t){this.isEditing&&(this.selectLine(this.getSelectionStartFromPointer(t.e)),this.renderCursorOrSelection())}_mouseDownHandler(t){let{e:n,alreadySelected:r}=t;this.canvas&&this.editable&&!_H(n)&&!this.getActiveControl()&&(this.draggableTextDelegate.start(n)||(this.canvas.textEditingManager.register(this),r&&(this.inCompositionMode=!1,this.setCursorByClick(n)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()),this.selected||(this.selected=r||this.isEditing)))}mouseUpHandler(t){let{e:n,transform:r}=t;const i=this.draggableTextDelegate.end(n);if(this.canvas){this.canvas.textEditingManager.unregister(this);const s=this.canvas._activeObject;if(s&&s!==this)return}!this.editable||this.group&&!this.group.interactive||r&&r.actionPerformed||_H(n)||i||this.selected&&!this.getActiveControl()&&(this.enterEditing(n),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection())}setCursorByClick(t){const n=this.getSelectionStartFromPointer(t),r=this.selectionStart,i=this.selectionEnd;t.shiftKey?this.setSelectionStartEndWithShift(r,i,n):(this.selectionStart=n,this.selectionEnd=n),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())}getSelectionStartFromPointer(t){const n=this.canvas.getScenePoint(t).transform(bl(this.calcTransformMatrix())).add(new be(-this._getLeftOffset(),-this._getTopOffset()));let r=0,i=0,s=0;for(let u=0;u<this._textLines.length&&r<=n.y;u++)r+=this.getHeightOfLine(u),s=u,u>0&&(i+=this._textLines[u-1].length+this.missingNewlineOffset(u-1));let a=Math.abs(this._getLineLeftOffset(s));const o=this._textLines[s].length,c=this.__charBounds[s];for(let u=0;u<o;u++){const d=a+c[u].kernedWidth;if(n.x<=d){Math.abs(n.x-d)<=Math.abs(n.x-a)&&i++;break}a=d,i++}return Math.min(this.flipX?o-i:i,this._text.length)}}const G2="moveCursorUp",W2="moveCursorDown",Y2="moveCursorLeft",K2="moveCursorRight",X2="exitEditing",TH=(e,t)=>{const n=t.getRetinaScaling();e.setTransform(n,0,0,n,0,0);const r=t.viewportTransform;e.transform(r[0],r[1],r[2],r[3],r[4],r[5])},$Xe=le({selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,keysMap:{9:X2,27:X2,33:G2,34:W2,35:K2,36:Y2,37:Y2,38:G2,39:K2,40:W2},keysMapRtl:{9:X2,27:X2,33:G2,34:W2,35:Y2,36:K2,37:K2,38:G2,39:Y2,40:W2},ctrlKeysMapDown:{65:"cmdAll"},ctrlKeysMapUp:{67:"copy",88:"cut"}},{_selectionDirection:null,_reSpace:/\s|\r?\n/,inCompositionMode:!1});class pu extends zXe{static getDefaults(){return le(le({},super.getDefaults()),pu.ownDefaults)}get type(){const t=super.type;return t==="itext"?"i-text":t}constructor(t,n){super(t,le(le({},pu.ownDefaults),n)),this.initBehavior()}_set(t,n){return this.isEditing&&this._savedProps&&t in this._savedProps?(this._savedProps[t]=n,this):(t==="canvas"&&(this.canvas instanceof H7&&this.canvas.textEditingManager.remove(this),n instanceof H7&&n.textEditingManager.add(this)),super._set(t,n))}setSelectionStart(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)}setSelectionEnd(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)}_updateAndFire(t,n){this[t]!==n&&(this._fireSelectionChanged(),this[t]=n),this._updateTextarea()}_fireSelectionChanged(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})}initDimensions(){this.isEditing&&this.initDelayedCursor(),super.initDimensions()}getSelectionStyles(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart||0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selectionEnd,r=arguments.length>2?arguments[2]:void 0;return super.getSelectionStyles(t,n,r)}setSelectionStyles(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selectionStart||0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.selectionEnd;return super.setSelectionStyles(t,n,r)}get2DCursorLocation(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,n=arguments.length>1?arguments[1]:void 0;return super.get2DCursorLocation(t,n)}render(t){super.render(t),this.cursorOffsetCache={},this.renderCursorOrSelection()}toCanvasElement(t){const n=this.isEditing;this.isEditing=!1;const r=super.toCanvasElement(t);return this.isEditing=n,r}renderCursorOrSelection(){if(!this.isEditing||!this.canvas)return;const t=this.clearContextTop(!0);if(!t)return;const n=this._getCursorBoundaries(),r=this.findAncestorsWithClipPath(),i=r.length>0;let s,a=t;if(i){s=Ko(t.canvas),a=s.getContext("2d"),TH(a,this.canvas);const o=this.calcTransformMatrix();a.transform(o[0],o[1],o[2],o[3],o[4],o[5])}if(this.selectionStart!==this.selectionEnd||this.inCompositionMode?this.renderSelection(a,n):this.renderCursor(a,n),i)for(const o of r){const c=o.clipPath,u=Ko(t.canvas),d=u.getContext("2d");if(TH(d,this.canvas),!c.absolutePositioned){const h=o.calcTransformMatrix();d.transform(h[0],h[1],h[2],h[3],h[4],h[5])}c.transform(d),c.drawObject(d,!0,{}),this.drawClipPathOnCache(a,c,u)}i&&(t.setTransform(1,0,0,1,0,0),t.drawImage(s,0,0)),this.canvas.contextTopDirty=!0,t.restore()}findAncestorsWithClipPath(){const t=[];let n=this;for(;n;)n.clipPath&&t.push(n),n=n.parent;return t}_getCursorBoundaries(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,n=arguments.length>1?arguments[1]:void 0;const r=this._getLeftOffset(),i=this._getTopOffset(),s=this._getCursorBoundariesOffsets(t,n);return{left:r,top:i,leftOffset:s.left,topOffset:s.top}}_getCursorBoundariesOffsets(t,n){return n?this.__getCursorBoundariesOffsets(t):this.cursorOffsetCache&&"top"in this.cursorOffsetCache?this.cursorOffsetCache:this.cursorOffsetCache=this.__getCursorBoundariesOffsets(t)}__getCursorBoundariesOffsets(t){let n=0,r=0;const{charIndex:i,lineIndex:s}=this.get2DCursorLocation(t);for(let u=0;u<s;u++)n+=this.getHeightOfLine(u);const a=this._getLineLeftOffset(s),o=this.__charBounds[s][i];o&&(r=o.left),this.charSpacing!==0&&i===this._textLines[s].length&&(r-=this._getWidthOfCharSpacing());const c={top:n,left:a+(r>0?r:0)};return this.direction==="rtl"&&(this.textAlign===si||this.textAlign===Kl||this.textAlign===lb?c.left*=-1:this.textAlign===Zn||this.textAlign===A5?c.left=a-(r>0?r:0):this.textAlign!==pn&&this.textAlign!==cb||(c.left=a-(r>0?r:0))),c}renderCursorAt(t){this._renderCursor(this.canvas.contextTop,this._getCursorBoundaries(t,!0),t)}renderCursor(t,n){this._renderCursor(t,n,this.selectionStart)}getCursorRenderingData(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getCursorBoundaries(t);const r=this.get2DCursorLocation(t),i=r.lineIndex,s=r.charIndex>0?r.charIndex-1:0,a=this.getValueOfPropertyAt(i,s,"fontSize"),o=this.getObjectScaling().x*this.canvas.getZoom(),c=this.cursorWidth/o,u=this.getValueOfPropertyAt(i,s,"deltaY"),d=n.topOffset+(1-this._fontSizeFraction)*this.getHeightOfLine(i)/this.lineHeight-a*(1-this._fontSizeFraction);return{color:this.cursorColor||this.getValueOfPropertyAt(i,s,"fill"),opacity:this._currentCursorOpacity,left:n.left+n.leftOffset-c/2,top:d+n.top+u,width:c,height:a}}_renderCursor(t,n,r){const{color:i,opacity:s,left:a,top:o,width:c,height:u}=this.getCursorRenderingData(r,n);t.fillStyle=i,t.globalAlpha=s,t.fillRect(a,o,c,u)}renderSelection(t,n){const r={selectionStart:this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,selectionEnd:this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd};this._renderSelection(t,r,n)}renderDragSourceEffect(){const t=this.draggableTextDelegate.getDragStartSelection();this._renderSelection(this.canvas.contextTop,t,this._getCursorBoundaries(t.selectionStart,!0))}renderDropTargetEffect(t){const n=this.getSelectionStartFromPointer(t);this.renderCursorAt(n)}_renderSelection(t,n,r){const i=n.selectionStart,s=n.selectionEnd,a=this.textAlign.includes(Kl),o=this.get2DCursorLocation(i),c=this.get2DCursorLocation(s),u=o.lineIndex,d=c.lineIndex,h=o.charIndex<0?0:o.charIndex,f=c.charIndex<0?0:c.charIndex;for(let m=u;m<=d;m++){const p=this._getLineLeftOffset(m)||0;let x=this.getHeightOfLine(m),v=0,g=0,y=0;if(m===u&&(g=this.__charBounds[u][h].left),m>=u&&m<d)y=a&&!this.isEndOfWrapping(m)?this.width:this.getLineWidth(m)||5;else if(m===d)if(f===0)y=this.__charBounds[d][f].left;else{const _=this._getWidthOfCharSpacing();y=this.__charBounds[d][f-1].left+this.__charBounds[d][f-1].width-_}v=x,(this.lineHeight<1||m===d&&this.lineHeight>1)&&(x/=this.lineHeight);let w=r.left+p+g,S=x,C=0;const k=y-g;this.inCompositionMode?(t.fillStyle=this.compositionColor||"black",S=1,C=x):t.fillStyle=this.selectionColor,this.direction==="rtl"&&(this.textAlign===si||this.textAlign===Kl||this.textAlign===lb?w=this.width-w-k:this.textAlign===Zn||this.textAlign===A5?w=r.left+p-y:this.textAlign!==pn&&this.textAlign!==cb||(w=r.left+p-y)),t.fillRect(w,r.top+r.topOffset+C,k,S),r.topOffset+=v}}getCurrentCharFontSize(){const t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fontSize")}getCurrentCharColor(){const t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,Pi)}_getCurrentCharIndex(){const t=this.get2DCursorLocation(this.selectionStart,!0),n=t.charIndex>0?t.charIndex-1:0;return{l:t.lineIndex,c:n}}dispose(){this.exitEditingImpl(),this.draggableTextDelegate.dispose(),super.dispose()}}ie(pu,"ownDefaults",$Xe),ie(pu,"type","IText"),ft.setClass(pu),ft.setClass(pu,"i-text");class xh extends pu{static getDefaults(){return le(le({},super.getDefaults()),xh.ownDefaults)}constructor(t,n){super(t,le(le({},xh.ownDefaults),n))}static createControls(){return{controls:bKe()}}initDimensions(){this.initialized&&(this.isEditing&&this.initDelayedCursor(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.includes(Kl)&&this.enlargeSpaces(),this.height=this.calcTextHeight())}_generateStyleMap(t){let n=0,r=0,i=0;const s={};for(let a=0;a<t.graphemeLines.length;a++)t.graphemeText[i]===` 1208`&&a>0?(r=0,i++,n++):!this.splitByGrapheme&&this._reSpaceAndTab.test(t.graphemeText[i])&&a>0&&(r++,i++),s[a]={line:n,offset:r},i+=t.graphemeLines[a].length,r+=t.graphemeLines[a].length;return s}styleHas(t,n){if(this._styleMap&&!this.isWrapping){const r=this._styleMap[n];r&&(n=r.line)}return super.styleHas(t,n)}isEmptyStyles(t){if(!this.styles)return!0;let n,r=0,i=t+1,s=!1;const a=this._styleMap[t],o=this._styleMap[t+1];a&&(t=a.line,r=a.offset),o&&(i=o.line,s=i===t,n=o.offset);const c=t===void 0?this.styles:{line:this.styles[t]};for(const u in c)for(const d in c[u]){const h=parseInt(d,10);if(h>=r&&(!s||h<n))for(const f in c[u][d])return!1}return!0}_getStyleDeclaration(t,n){if(this._styleMap&&!this.isWrapping){const r=this._styleMap[t];if(!r)return{};t=r.line,n=r.offset+n}return super._getStyleDeclaration(t,n)}_setStyleDeclaration(t,n,r){const i=this._styleMap[t];super._setStyleDeclaration(i.line,i.offset+n,r)}_deleteStyleDeclaration(t,n){const r=this._styleMap[t];super._deleteStyleDeclaration(r.line,r.offset+n)}_getLineStyle(t){const n=this._styleMap[t];return!!this.styles[n.line]}_setLineStyle(t){const n=this._styleMap[t];super._setLineStyle(n.line)}_wrapText(t,n){this.isWrapping=!0;const r=this.getGraphemeDataForRender(t),i=[];for(let s=0;s<r.wordsData.length;s++)i.push(...this._wrapLine(s,n,r));return this.isWrapping=!1,i}getGraphemeDataForRender(t){const n=this.splitByGrapheme,r=n?"":" ";let i=0;return{wordsData:t.map((s,a)=>{let o=0;const c=n?this.graphemeSplit(s):this.wordSplit(s);return c.length===0?[{word:[],width:0}]:c.map(u=>{const d=n?[u]:this.graphemeSplit(u),h=this._measureWord(d,a,o);return i=Math.max(h,i),o+=d.length+r.length,{word:d,width:h}})}),largestWordWidth:i}}_measureWord(t,n){let r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=0;for(let a=0,o=t.length;a<o;a++)s+=this._getGraphemeBox(t[a],n,a+i,r,!0).kernedWidth,r=t[a];return s}wordSplit(t){return t.split(this._wordJoiners)}_wrapLine(t,n,r){let{largestWordWidth:i,wordsData:s}=r,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;const o=this._getWidthOfCharSpacing(),c=this.splitByGrapheme,u=[],d=c?"":" ";let h=0,f=[],m=0,p=0,x=!0;n-=a;const v=Math.max(n,i,this.dynamicMinWidth),g=s[t];let y;for(m=0,y=0;y<g.length;y++){const{word:w,width:S}=g[y];m+=w.length,h+=p+S-o,h>v&&!x?(u.push(f),f=[],h=S,x=!0):h+=o,x||c||f.push(d),f=f.concat(w),p=c?0:this._measureWord([d],t,m),m++,x=!1}return y&&u.push(f),i+a>this.dynamicMinWidth&&(this.dynamicMinWidth=i-o+a),u}isEndOfWrapping(t){return!this._styleMap[t+1]||this._styleMap[t+1].line!==this._styleMap[t].line}missingNewlineOffset(t,n){return this.splitByGrapheme&&!n?this.isEndOfWrapping(t)?1:0:1}_splitTextIntoLines(t){const n=super._splitTextIntoLines(t),r=this._wrapText(n.lines,this.width),i=new Array(r.length);for(let s=0;s<r.length;s++)i[s]=r[s].join("");return n.lines=i,n.graphemeLines=r,n}getMinWidth(){return Math.max(this.minWidth,this.dynamicMinWidth)}_removeExtraneousStyles(){const t=new Map;for(const n in this._styleMap){const r=parseInt(n,10);if(this._textLines[r]){const i=this._styleMap[n].line;t.set("".concat(i),!0)}}for(const n in this.styles)t.has(n)||delete this.styles[n]}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject(["minWidth","splitByGrapheme",...t])}}ie(xh,"type","Textbox"),ie(xh,"textLayoutProperties",[...pu.textLayoutProperties,"width"]),ie(xh,"ownDefaults",{minWidth:20,dynamicMinWidth:2,lockScalingFlip:!0,noScaleCache:!1,_wordJoiners:/[ \t\r]/,splitByGrapheme:!1}),ft.setClass(xh);class EH extends K3{shouldPerformLayout(t){return!!t.target.clipPath&&super.shouldPerformLayout(t)}shouldLayoutClipPath(){return!1}calcLayoutResult(t,n){const{target:r}=t,{clipPath:i,group:s}=r;if(!i||!this.shouldPerformLayout(t))return;const{width:a,height:o}=Nu(Woe(r,i)),c=new be(a,o);if(i.absolutePositioned)return{center:X0(i.getRelativeCenterPoint(),void 0,s?s.calcTransformMatrix():void 0),size:c};{const u=i.getRelativeCenterPoint().transform(r.calcOwnMatrix(),!0);if(this.shouldPerformLayout(t)){const{center:d=new be,correction:h=new be}=this.calcBoundingBox(n,t)||{};return{center:d.add(u),correction:h.subtract(u),size:c}}return{center:r.getRelativeCenterPoint().add(u),size:c}}}}
1208ie(EH,"type","clip-path"),ft.setClass(EH);class jH extends K3{getInitialSize(t,n){let{target:r}=t,{size:i}=n;return new be(r.width||i.x,r.height||i.y)}}ie(jH,"type","fixed"),ft.setClass(jH);class UXe extends dv{subscribeTargets(t){const n=t.target;t.targets.reduce((r,i)=>(i.parent&&r.add(i.parent),r),new Set).forEach(r=>{r.layoutManager.subscribeTargets({target:r,targets:[n]})})}unsubscribeTargets(t){const n=t.target,r=n.getObjects();t.targets.reduce((i,s)=>(s.parent&&i.add(s.parent),i),new Set).forEach(i=>{!r.some(s=>s.parent===i)&&i.layoutManager.unsubscribeTargets({target:i,targets:[n]})})}}class nm extends Mu{static getDefaults(){return le(le({},super.getDefaults()),nm.ownDefaults)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,nm.ownDefaults),this.setOptions(n);const{left:r,top:i,layoutManager:s}=n;this.groupInit(t,{left:r,top:i,layoutManager:s??new UXe})}_shouldSetNestedCoords(){return!0}__objectSelectionMonitor(){}multiSelectAdd(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.multiSelectionStacking==="selection-order"?this.add(...n):n.forEach(i=>{const s=this._objects.findIndex(o=>o.isInFrontOf(i)),a=s===-1?this.size():s;this.insertAt(a,i)})}canEnterGroup(t){return this.getObjects().some(n=>n.isDescendantOf(t)||t.isDescendantOf(n))?(Zh("error","ActiveSelection: circular object trees are not supported, this call has no effect"),!1):super.canEnterGroup(t)}enterGroup(t,n){t.parent&&t.parent===t.group?t.parent._exitGroup(t):t.group&&t.parent!==t.group&&t.group.remove(t),this._enterGroup(t,n)}exitGroup(t,n){this._exitGroup(t,n),t.parent&&t.parent._enterGroup(t,!0)}_onAfterObjectsChange(t,n){super._onAfterObjectsChange(t,n);const r=new Set;n.forEach(i=>{const{parent:s}=i;s&&r.add(s)}),t===vD?r.forEach(i=>{i._onAfterObjectsChange(M5,n)}):r.forEach(i=>{i._set("dirty",!0)})}onDeselect(){return this.removeAll(),!1}toString(){return"#<ActiveSelection: (".concat(this.complexity(),")>")}shouldCache(){return!1}isOnACache(){return!1}_renderControls(t,n,r){t.save(),t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;const i=le(le({hasControls:!1},r),{},{forActiveSelection:!0}
vendor: 20,340 bytes, lines 1208-1296
1208);for(let s=0;s<this._objects.length;s++)this._objects[s]._renderControls(t,i);super._renderControls(t,n),t.restore()}}ie(nm,"type","ActiveSelection"),ie(nm,"ownDefaults",{multiSelectionStacking:"canvas-stacking"}),ft.setClass(nm),ft.setClass(nm,"activeSelection");class VXe{constructor(){ie(this,"resources",{})}applyFilters(t,n,r,i,s){const a=s.getContext("2d");if(!a)return;a.drawImage(n,0,0,r,i);const o={sourceWidth:r,sourceHeight:i,imageData:a.getImageData(0,0,r,i),originalEl:n,originalImageData:a.getImageData(0,0,r,i),canvasEl:s,ctx:a,filterBackend:this};t.forEach(u=>{u.applyTo(o)});const{imageData:c}=o;return c.width===r&&c.height===i||(s.width=c.width,s.height=c.height),a.putImageData(c,0,0),o}}class cle{constructor(){let{tileSize:t=Fn.textureSize}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ie(this,"aPosition",new Float32Array([0,0,0,1,1,0,1,1])),ie(this,"resources",{}),this.tileSize=t,this.setupGLContext(t,t),this.captureGPUInfo()}setupGLContext(t,n){this.dispose(),this.createWebGLCanvas(t,n)}createWebGLCanvas(t,n){const r=Ko({width:t,height:n}),i=r.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1});i&&(i.clearColor(0,0,0,0),this.canvas=r,this.gl=i)}applyFilters(t,n,r,i,s,a){const o=this.gl,c=s.getContext("2d");if(!o||!c)return;let u;a&&(u=this.getCachedTexture(a,n));const d={originalWidth:n.width||n.naturalWidth||0,originalHeight:n.height||n.naturalHeight||0,sourceWidth:r,sourceHeight:i,destinationWidth:r,destinationHeight:i,context:o,sourceTexture:this.createTexture(o,r,i,u?void 0:n),targetTexture:this.createTexture(o,r,i),originalTexture:u||this.createTexture(o,r,i,u?void 0:n),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:s},h=o.createFramebuffer();return o.bindFramebuffer(o.FRAMEBUFFER,h),t.forEach(f=>{f&&f.applyTo(d)}),function(f){const m=f.targetCanvas,p=m.width,x=m.height,v=f.destinationWidth,g=f.destinationHeight;p===v&&x===g||(m.width=v,m.height=g)}(d),this.copyGLTo2D(o,d),o.bindTexture(o.TEXTURE_2D,null),o.deleteTexture(d.sourceTexture),o.deleteTexture(d.targetTexture),o.deleteFramebuffer(h),c.setTransform(1,0,0,1,0,0),d}dispose(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()}clearWebGLCaches(){this.programCache={},this.textureCache={}}createTexture(t,n,r,i,s){const{NEAREST:a,TEXTURE_2D:o,RGBA:c,UNSIGNED_BYTE:u,CLAMP_TO_EDGE:d,TEXTURE_MAG_FILTER:h,TEXTURE_MIN_FILTER:f,TEXTURE_WRAP_S:m,TEXTURE_WRAP_T:p}=t,x=t.createTexture();return t.bindTexture(o,x),t.texParameteri(o,h,s||a),t.texParameteri(o,f,s||a),t.texParameteri(o,m,d),t.texParameteri(o,p,d),i?t.texImage2D(o,0,c,c,u,i):t.texImage2D(o,0,c,n,r,0,c,u,null),x}getCachedTexture(t,n,r){const{textureCache:i}=this;if(i[t])return i[t];{const s=this.createTexture(this.gl,n.width,n.height,n,r);return s&&(i[t]=s),s}}evictCachesForKey(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])}copyGLTo2D(t,n){const r=t.canvas,i=n.targetCanvas,s=i.getContext("2d");if(!s)return;s.translate(0,i.height),s.scale(1,-1);const a=r.height-i.height;s.drawImage(r,0,a,i.width,i.height,0,0,i.width,i.height)}copyGLTo2DPutImageData(t,n){const r=n.targetCanvas.getContext("2d"),i=n.destinationWidth,s=n.destinationHeight,a=i*s*4;if(!r)return;const o=new Uint8Array(this.imageBuffer,0,a),c=new Uint8ClampedArray(this.imageBuffer,0,a);t.readPixels(0,0,i,s,t.RGBA,t.UNSIGNED_BYTE,o);const u=new ImageData(c,i,s);r.putImageData(u,0,0)}captureGPUInfo(){if(this.gpuInfo)return this.gpuInfo;const t=this.gl,n={renderer:"",vendor:""};if(!t)return n;const r=t.getExtension("WEBGL_debug_renderer_info");if(r){const i=t.getParameter(r.UNMASKED_RENDERER_WEBGL),s=t.getParameter(r.UNMASKED_VENDOR_WEBGL);i&&(n.renderer=i.toLowerCase()),s&&(n.vendor=s.toLowerCase())}return this.gpuInfo=n,n}}let XE;function HXe(){const{WebGLProbe:e}=Cc();return e.queryWebGL(Qu()),Fn.enableGLFiltering&&e.isSupported(Fn.textureSize)?new cle({tileSize:Fn.textureSize}):new VXe}function QE(){return!XE&&(!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&(XE=HXe()),XE}const qXe=["filters","resizeFilter","src","crossOrigin","type"],ule=["cropX","cropY"];class ya extends Rs{static getDefaults(){return le(le({},super.getDefaults()),ya.ownDefaults)}constructor(t,n){super(),ie(this,"_lastScaleX",1),ie(this,"_lastScaleY",1),ie(this,"_filterScalingX",1),ie(this,"_filterScalingY",1),this.filters=[],Object.assign(this,ya.ownDefaults),this.setOptions(n),this.cacheKey="texture".concat(Jh()),this.setElement(typeof t=="string"?(this.canvas&&gl(this.canvas.getElement())||ty()).getElementById(t):t,n)}getElement(){return this._element}setElement(t){var n;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.removeTexture(this.cacheKey),this.removeTexture("".concat(this.cacheKey,"_filtered")),this._element=t,this._originalElement=t,this._setWidthHeight(r),(n=t.classList)===null||n===void 0||n.add(ya.CSS_CANVAS),this.filters.length!==0&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters()}removeTexture(t){const n=QE(!1);n instanceof cle&&n.evictCachesForKey(t)}dispose(){super.dispose(),this.removeTexture(this.cacheKey),this.removeTexture("".concat(this.cacheKey,"_filtered")),this._cacheContext=null,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(t=>{const n=this[t];n&&Cc().dispose(n),this[t]=void 0})}getCrossOrigin(){return this._originalElement&&(this._originalElement.crossOrigin||null)}getOriginalSize(){const t=this.getElement();return t?{width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}:{width:0,height:0}}_stroke(t){if(!this.stroke||this.strokeWidth===0)return;const n=this.width/2,r=this.height/2;t.beginPath(),t.moveTo(-n,-r),t.lineTo(n,-r),t.lineTo(n,r),t.lineTo(-n,r),t.lineTo(-n,-r),t.closePath()}toObject(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const n=[];return this.filters.forEach(r=>{r&&n.push(r.toObject())}),le(le({},super.toObject([...ule,...t])),{},{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:n},this.resizeFilter?{resizeFilter:this.resizeFilter.toObject()}:{})}hasCrop(){return!!this.cropX||!!this.cropY||this.width<this._element.width||this.height<this._element.height}_toSVG(){const t=[],n=this._element,r=-this.width/2,i=-this.height/2;let s=[],a=[],o="",c="";if(!n)return[];if(this.hasCrop()){const u=Jh();s.push('<clipPath id="imageCrop_'+u+`"> 1209`,' <rect x="'+r+'" y="'+i+'" width="'+this.width+'" height="'+this.height+`" /> 1210`,`</clipPath> 1211`),o=' clip-path="url(#imageCrop_'+u+')" '}if(this.imageSmoothing||(c=' image-rendering="optimizeSpeed"'),t.push(" <image ","COMMON_PARTS",'xlink:href="'.concat(this.getSvgSrc(!0),'" x="').concat(r-this.cropX,'" y="').concat(i-this.cropY,'" width="').concat(n.width||n.naturalWidth,'" height="').concat(n.height||n.naturalHeight,'"').concat(c).concat(o,`></image> 1212`)),this.stroke||this.strokeDashArray){const u=this.fill;this.fill=null,a=[' <rect x="'.concat(r,'" y="').concat(i,'" width="').concat(this.width,'" height="').concat(this.height,'" style="').concat(this.getSvgStyles(),`" /> 1213`)],this.fill=u}return s=this.paintFirst!==Pi?s.concat(a,t):s.concat(t,a),s}getSrc(t){const n=t?this._element:this._originalElement;return n?n.toDataURL?n.toDataURL():this.srcFromAttribute?n.getAttribute("src")||"":n.src:this.src||""}getSvgSrc(t){return this.getSrc(t)}setSrc(t){let{crossOrigin:n,signal:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return CC(t,{crossOrigin:n,signal:r}).then(i=>{n!==void 0&&this.set({crossOrigin:n}),this.setElement(i)})}toString(){return'#<Image: { src: "'.concat(this.getSrc(),'" }>')}applyResizeFilters(){const t=this.resizeFilter,n=this.minimumScaleTrigger,r=this.getTotalObjectScaling(),i=r.x,s=r.y,a=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!t||i>n&&s>n)return this._element=a,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=i,void(this._lastScaleY=s);const o=Ko(a),{width:c,height:u}=a;this._element=o,this._lastScaleX=t.scaleX=i,this._lastScaleY=t.scaleY=s,QE().applyFilters([t],a,c,u,this._element),this._filterScalingX=o.width/this._originalElement.width,this._filterScalingY=o.height/this._originalElement.height}applyFilters(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.filters||[];if(t=t.filter(s=>s&&!s.isNeutralState()),this.set("dirty",!0),this.removeTexture("".concat(this.cacheKey,"_filtered")),t.length===0)return this._element=this._originalElement,this._filteredEl=void 0,this._filterScalingX=1,void(this._filterScalingY=1);const n=this._originalElement,r=n.naturalWidth||n.width,i=n.naturalHeight||n.height;if(this._element===this._originalElement){const s=Ko({width:r,height:i});this._element=s,this._filteredEl=s}else this._filteredEl&&(this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,r,i),this._lastScaleX=1,this._lastScaleY=1);QE().applyFilters(t,this._originalElement,r,i,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height)}_render(t){t.imageSmoothingEnabled=this.imageSmoothing,this.isMoving!==!0&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(t),this._renderPaintInOrder(t)}drawCacheOnCanvas(t){t.imageSmoothingEnabled=this.imageSmoothing,super.drawCacheOnCanvas(t)}shouldCache(){return this.needsItsOwnCache()}_renderFill(t){const n=this._element;if(!n)return;const r=this._filterScalingX,i=this._filterScalingY,s=this.width,a=this.height,o=Math.max(this.cropX,0),c=Math.max(this.cropY,0),u=n.naturalWidth||n.width,d=n.naturalHeight||n.height,h=o*r,f=c*i,m=Math.min(s*r,u-h),p=Math.min(a*i,d-f),x=-s/2,v=-a/2,g=Math.min(s,u/r-o),y=Math.min(a,d/i-c);n&&t.drawImage(n,h,f,m,p,x,v,g,y)}_needsResize(){const t=this.getTotalObjectScaling();return t.x!==this._lastScaleX||t.y!==this._lastScaleY}_resetWidthHeight(){this.set(this.getOriginalSize())}_setWidthHeight(){let{width:t,height:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=this.getOriginalSize();this.width=t||r.width,this.height=n||r.height}parsePreserveAspectRatioAttribute(){const t=IYe(this.preserveAspectRatio||""),n=this.width,r=this.height,i={width:n,height:r};let s,a=this._element.width,o=this._element.height,c=1,u=1,d=0,h=0,f=0,m=0;return!t||t.alignX===ja&&t.alignY===ja?(c=n/a,u=r/o):(t.meetOrSlice==="meet"&&(c=u=JKe(this._element,i),s=(n-a*c)/2,t.alignX==="Min"&&(d=-s),t.alignX==="Max"&&(d=s),s=(r-o*u)/2,t.alignY==="Min"&&(h=-s),t.alignY==="Max"&&(h=s)),t.meetOrSlice==="slice"&&(c=u=eXe(this._element,i),s=a-n/c,t.alignX==="Mid"&&(f=s/2),t.alignX==="Max"&&(f=s),s=o-r/u,t.alignY==="Mid"&&(m=s/2),t.alignY==="Max"&&(m=s),a=n/c,o=r/u)),{width:a,height:o,scaleX:c,scaleY:u,offsetLeft:d,offsetTop:h,cropX:f,cropY:m}}static fromObject(t,n){let{filters:r,resizeFilter:i,src:s,crossOrigin:a,type:o}=t,c=Ar(t,qXe);return Promise.all([CC(s,le(le({},n),{},{crossOrigin:a})),r&&ov(r,n),i&&ov([i],n),q3(c,n)]).then(u=>{let[d,h=[],[f]=[],m={}]=u;return new this(d,le(le({},c),{},{src:s,filters:h,resizeFilter:f},m))})}static fromURL(t){let{crossOrigin:n=null,signal:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return CC(t,{crossOrigin:n,signal:r}).then(s=>new this(s,i))}static async fromElement(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const i=bd(t,this.ATTRIBUTE_NAMES,r);return this.fromURL(i["xlink:href"]||i.href,n,i).catch(s=>(Zh("log","Unable to parse Image",s),null))}}ie(ya,"type","Image"),ie(ya,"cacheProperties",[...yd,...ule]),ie(ya,"ownDefaults",{strokeWidth:0,srcFromAttribute:!1,minimumScaleTrigger:.5,cropX:0,cropY:0,imageSmoothing:!0}),ie(ya,"CSS_CANVAS","canvas-img"),ie(ya,"ATTRIBUTE_NAMES",[...xf,"x","y","width","height","preserveAspectRatio","xlink:href","href","crossOrigin","image-rendering"]),ft.setClass(ya),ft.setSVGClass(ya);W3(["pattern","defs","symbol","metadata","clipPath","mask","desc"]);const Q3=e=>e.webgl!==void 0,wD="precision highp float",GXe=` 1214 `.concat(wD,`; 1215 varying vec2 vTexCoord; 1216 uniform sampler2D uTexture; 1217 void main() { 1218 gl_FragColor = texture2D(uTexture, vTexCoord); 1219 }`),WXe=["type"],YXe=["type"],KXe=new RegExp(wD,"g");class zi{get type(){return this.constructor.type}constructor(){let t=Ar(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},WXe);Object.assign(this,this.constructor.defaults,t)}getFragmentSource(){return GXe}getVertexSource(){return` 1220 attribute vec2 aPosition; 1221 varying vec2 vTexCoord; 1222 void main() { 1223 vTexCoord = aPosition; 1224 gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0); 1225 }`}createProgram(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFragmentSource(),r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.getVertexSource();const{WebGLProbe:{GLPrecision:i="highp"}}=Cc();i!=="highp"&&(n=n.replace(KXe,wD.replace("highp",i)));const s=t.createShader(t.VERTEX_SHADER),a=t.createShader(t.FRAGMENT_SHADER),o=t.createProgram();if(!s||!a||!o)throw new sc("Vertex, fragment shader or program creation error");if(t.shaderSource(s,r),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw new sc("Vertex shader compile error for ".concat(this.type,": ").concat(t.getShaderInfoLog(s)));if(t.shaderSource(a,n),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))throw new sc("Fragment shader compile error for ".concat(this.type,": ").concat(t.getShaderInfoLog(a)));if(t.attachShader(o,s),t.attachShader(o,a),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw new sc('Shader link error for "'.concat(this.type,'" ').concat(t.getProgramInfoLog(o)));const c=this.getUniformLocations(t,o)||{};return c.uStepW=t.getUniformLocation(o,"uStepW"),c.uStepH=t.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:this.getAttributeLocations(t,o),uniformLocations:c}}getAttributeLocations(t,n){return{aPosition:t.getAttribLocation(n,"aPosition")}}getUniformLocations(t,n){const r=this.constructor.uniformLocations,i={};for(let s=0;s<r.length;s++)i[r[s]]=t.getUniformLocation(n,r[s]);return i}sendAttributeData(t,n,r){const i=n.aPosition,s=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,s),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,r,t.STATIC_DRAW)}_setupFrameBuffer(t){const n=t.context;if(t.passes>1){const r=t.destinationWidth,i=t.destinationHeight;t.sourceWidth===r&&t.sourceHeight===i||(n.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(n,r,i)),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,t.targetTexture,0)}else n.bindFramebuffer(n.FRAMEBUFFER,null),n.finish()}_swapTextures(t){t.passes--,t.pass++;const n=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=n}isNeutralState(t){return!1}applyTo(t){Q3(t)?(this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)}applyTo2d(t){}getCacheKey(){return this.type}retrieveShader(t){const n=this.getCacheKey();return t.programCache[n]||(t.programCache[n]=this.createProgram(t.context)),t.programCache[n]}applyToWebGL(t){const n=t.context,r=this.retrieveShader(t);t.pass===0&&t.originalTexture?n.bindTexture(n.TEXTURE_2D,t.originalTexture):n.bindTexture(n.TEXTURE_2D,t.sourceTexture),n.useProgram(r.program),this.sendAttributeData(n,r.attributeLocations,t.aPosition),n.uniform1f(r.uniformLocations.uStepW,1/t.sourceWidth),n.uniform1f(r.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(n,r.uniformLocations),n.viewport(0,0,t.destinationWidth,t.destinationHeight),n.drawArrays(n.TRIANGLE_STRIP,0,4)}bindAdditionalTexture(t,n,r){t.activeTexture(r),t.bindTexture(t.TEXTURE_2D,n),t.activeTexture(t.TEXTURE0)}unbindAdditionalTexture(t,n){t.activeTexture(n),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)}sendUniformData(t,n){}createHelpLayer(t){if(!t.helpLayer){const{sourceWidth:n,sourceHeight:r}=t,i=Ko({width:n,height:r});t.helpLayer=i}}toObject(){const t=Object.keys(this.constructor.defaults||{});return le({type:this.type},t.reduce((n,r)=>(n[r]=this[r],n),{}))}toJSON(){return this.toObject()}static async fromObject(t,n){return new this(Ar(t,YXe))}}ie(zi,"type","BaseFilter"),ie(zi,"uniformLocations",[]);const XXe={multiply:`gl_FragColor.rgb *= uColor.rgb; 1226`,screen:`gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb); 1227`,add:`gl_FragColor.rgb += uColor.rgb; 1228`,difference:`gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb); 1229`,subtract:`gl_FragColor.rgb -= uColor.rgb; 1230`,lighten:`gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb); 1231`,darken:`gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb); 1232`,exclusion:`gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb); 1233`,overlay:` 1234 if (uColor.r < 0.5) { 1235 gl_FragColor.r *= 2.0 * uColor.r; 1236 } else { 1237 gl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r); 1238 } 1239 if (uColor.g < 0.5) { 1240 gl_FragColor.g *= 2.0 * uColor.g; 1241 } else { 1242 gl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g); 1243 } 1244 if (uColor.b < 0.5) { 1245 gl_FragColor.b *= 2.0 * uColor.b; 1246 } else { 1247 gl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b); 1248 } 1249 `,tint:` 1250 gl_FragColor.rgb *= (1.0 - uColor.a); 1251 gl_FragColor.rgb += uColor.rgb; 1252 `};class Q2 extends zi{getCacheKey(){return"".concat(this.type,"_").concat(this.mode)}getFragmentSource(){return` 1253 precision highp float; 1254 uniform sampler2D uTexture; 1255 uniform vec4 uColor; 1256 varying vec2 vTexCoord; 1257 void main() { 1258 vec4 color = texture2D(uTexture, vTexCoord); 1259 gl_FragColor = color; 1260 if (color.a > 0.0) { 1261 `.concat(XXe[this.mode],` 1262 } 1263 } 1264 `)}applyTo2d(t){let{imageData:{data:n}}=t;const r=new er(this.color).getSource(),i=this.alpha,s=r[0]*i,a=r[1]*i,o=r[2]*i,c=1-i;for(let u=0;u<n.length;u+=4){const d=n[u],h=n[u+1],f=n[u+2];let m,p,x;switch(this.mode){case"multiply":m=d*s/255,p=h*a/255,x=f*o/255;break;case"screen":m=255-(255-d)*(255-s)/255,p=255-(255-h)*(255-a)/255,x=255-(255-f)*(255-o)/255;break;case"add":m=d+s,p=h+a,x=f+o;break;case"difference":m=Math.abs(d-s),p=Math.abs(h-a),x=Math.abs(f-o);break;case"subtract":m=d-s,p=h-a,x=f-o;break;case"darken":m=Math.min(d,s),p=Math.min(h,a),x=Math.min(f,o);break;case"lighten":m=Math.max(d,s),p=Math.max(h,a),x=Math.max(f,o);break;case"overlay":m=s<128?2*d*s/255:255-2*(255-d)*(255-s)/255,p=a<128?2*h*a/255:255-2*(255-h)*(255-a)/255,x=o<128?2*f*o/255:255-2*(255-f)*(255-o)/255;break;case"exclusion":m=s+d-2*s*d/255,p=a+h-2*a*h/255,x=o+f-2*o*f/255;break;case"tint":m=s+d*c,p=a+h*c,x=o+f*c}n[u]=m,n[u+1]=p,n[u+2]=x}}sendUniformData(t,n){const r=new er(this.color).getSource();r[0]=this.alpha*r[0]/255,r[1]=this.alpha*r[1]/255,r[2]=this.alpha*r[2]/255,r[3]=this.alpha,t.uniform4fv(n.uColor,r)}}ie(Q2,"defaults",{color:"#F95C63",mode:"multiply",alpha:1}),ie(Q2,"type","BlendColor"),ie(Q2,"uniformLocations",["uColor"]),ft.setClass(Q2);const QXe={multiply:` 1265 precision highp float; 1266 uniform sampler2D uTexture; 1267 uniform sampler2D uImage; 1268 uniform vec4 uColor; 1269 varying vec2 vTexCoord; 1270 varying vec2 vTexCoord2; 1271 void main() { 1272 vec4 color = texture2D(uTexture, vTexCoord); 1273 vec4 color2 = texture2D(uImage, vTexCoord2); 1274 color.rgba *= color2.rgba; 1275 gl_FragColor = color; 1276 } 1277 `,mask:` 1278 precision highp float; 1279 uniform sampler2D uTexture; 1280 uniform sampler2D uImage; 1281 uniform vec4 uColor; 1282 varying vec2 vTexCoord; 1283 varying vec2 vTexCoord2; 1284 void main() { 1285 vec4 color = texture2D(uTexture, vTexCoord); 1286 vec4 color2 = texture2D(uImage, vTexCoord2); 1287 color.a = color2.a; 1288 gl_FragColor = color; 1289 } 1290 `},ZXe=["type","image"];class Z2 extends zi{getCacheKey(){return"".concat(this.type,"_").concat(this.mode)}getFragmentSource(){return QXe[this.mode]}getVertexSource(){return` 1291 attribute vec2 aPosition; 1292 varying vec2 vTexCoord; 1293 varying vec2 vTexCoord2; 1294 uniform mat3 uTransformMatrix; 1295 void main() { 1296 vTexCoord = aPosition;
1297 vTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy; 1298 gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0); 1299 } 1300 `}applyToWebGL(t){const n=t.context,r=this.createTexture(t.filterBackend,this.image);this.bindAdditionalTexture(n,r,n.TEXTURE1),super.applyToWebGL(t),this.unbindAdditionalTexture(n,n.TEXTURE1)}createTexture(t,n){return t.getCachedTexture(n.cacheKey,n.getElement())}calculateMatrix(){const t=this.image,{width:n,height:r}=t.getElement();return[1/t.scaleX,0,0,0,1/t.scaleY,0,-t.left/n,-t.top/r,1]}applyTo2d(t){let{imageData:{data:n,width:r,height:i},filterBackend:{resources:s}}=t;const a=this.image;s.blendImage||(s.blendImage=Qu());const o=s.blendImage,c=o.getContext("2d");o.width!==r||o.height!==i?(o.width=r,o.height=i):c.clearRect(0,0,r,i),c.setTransform(a.scaleX,0,0,a.scaleY,a.left,a.top),c.drawImage(a.getElement(),0,0,r,i);const u=c.getImageData(0,0,r,i).data;for(let d=0;d<n.length;d+=4){const h=n[d],f=n[d+1],m=n[d+2],p=n[d+3],x=u[d],v=u[d+1],g=u[d+2],y=u[d+3];switch(this.mode){case"multiply":n[d]=h*x/255,n[d+1]=f*v/255,n[d+2]=m*g/255,n[d+3]=p*y/255;break;case"mask":n[d+3]=y}}}sendUniformData(t,n){const r=this.calculateMatrix();t.uniform1i(n.uImage,1),t.uniformMatrix3fv(n.uTransformMatrix,!1,r)}toObject(){return le(le({},super.toObject()),{},{image:this.image&&this.image.toObject()})}static async fromObject(t,n){let{type:r,image:i}=t,s=Ar(t,ZXe);return ya.fromObject(i,n).then(a=>new this(le(le({},s),{},{image:a})))}}ie(Z2,"type","BlendImage"),ie(Z2,"defaults",{mode:"multiply",alpha:1}),ie(Z2,"uniformLocations",["uTransformMatrix","uImage"]),ft.setClass(Z2);class J2 extends zi{getFragmentSource(){return` 1301 precision highp float; 1302 uniform sampler2D uTexture; 1303 uniform vec2 uDelta; 1304 varying vec2 vTexCoord; 1305 const float nSamples = 15.0; 1306 vec3 v3offset = vec3(12.9898, 78.233, 151.7182); 1307 float random(vec3 scale) { 1308 /* use the fragment position for a different seed per-pixel */ 1309 return fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453); 1310 } 1311 void main() { 1312 vec4 color = vec4(0.0); 1313 float totalC = 0.0; 1314 float totalA = 0.0; 1315 float offset = random(v3offset); 1316 for (float t = -nSamples; t <= nSamples; t++) { 1317 float percent = (t + offset - 0.5) / nSamples; 1318 vec4 sample = texture2D(uTexture, vTexCoord + uDelta * percent); 1319 float weight = 1.0 - abs(percent); 1320 float alpha = weight * sample.a; 1321 color.rgb += sample.rgb * alpha; 1322 color.a += alpha; 1323 totalA += weight; 1324 totalC += alpha; 1325 } 1326 gl_FragColor.rgb = color.rgb / totalC; 1327 gl_FragColor.a = color.a / totalA; 1328 } 1329 `}
vendor: 4,452 bytes, lines 1329-1350
1329applyTo(t){Q3(t)?(this.aspectRatio=t.sourceWidth/t.sourceHeight,t.passes++,this._setupFrameBuffer(t),this.horizontal=!0,this.applyToWebGL(t),this._swapTextures(t),this._setupFrameBuffer(t),this.horizontal=!1,this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)}applyTo2d(t){let{imageData:{data:n,width:r,height:i}}=t;this.aspectRatio=r/i,this.horizontal=!0;let s=this.getBlurValue()*r;const a=new Uint8ClampedArray(n),o=15,c=4*r;for(let u=0;u<n.length;u+=4){let d=0,h=0,f=0,m=0,p=0;const x=u-u%c,v=x+c;for(let g=-14;g<o;g++){const y=g/o,w=4*Math.floor(s*y),S=1-Math.abs(y);let C=u+w;C<x?C=x:C>v&&(C=v);const k=n[C+3]*S;d+=n[C]*k,h+=n[C+1]*k,f+=n[C+2]*k,m+=k,p+=S}a[u]=d/m,a[u+1]=h/m,a[u+2]=f/m,a[u+3]=m/p}this.horizontal=!1,s=this.getBlurValue()*i;for(let u=0;u<a.length;u+=4){let d=0,h=0,f=0,m=0,p=0;const x=u%c,v=a.length-c+x;for(let g=-14;g<o;g++){const y=g/o,w=Math.floor(s*y)*c,S=1-Math.abs(y);let C=u+w;C<x?C=x:C>v&&(C=v);const k=a[C+3]*S;d+=a[C]*k,h+=a[C+1]*k,f+=a[C+2]*k,m+=k,p+=S}n[u]=d/m,n[u+1]=h/m,n[u+2]=f/m,n[u+3]=m/p}}sendUniformData(t,n){const r=this.chooseRightDelta();t.uniform2fv(n.uDelta,r)}isNeutralState(){return this.blur===0}getBlurValue(){let t=1;const{horizontal:n,aspectRatio:r}=this;return n?r>1&&(t=1/r):r<1&&(t=r),t*this.blur*.12}chooseRightDelta(){const t=this.getBlurValue();return this.horizontal?[t,0]:[0,t]}}ie(J2,"type","Blur"),ie(J2,"defaults",{blur:0}),ie(J2,"uniformLocations",["uDelta"]),ft.setClass(J2);class eS extends zi{getFragmentSource(){return` 1330 precision highp float; 1331 uniform sampler2D uTexture; 1332 uniform float uBrightness; 1333 varying vec2 vTexCoord; 1334 void main() { 1335 vec4 color = texture2D(uTexture, vTexCoord); 1336 color.rgb += uBrightness; 1337 gl_FragColor = color; 1338 } 1339`}applyTo2d(t){let{imageData:{data:n}}=t;const r=Math.round(255*this.brightness);for(let i=0;i<n.length;i+=4)n[i]+=r,n[i+1]+=r,n[i+2]+=r}isNeutralState(){return this.brightness===0}sendUniformData(t,n){t.uniform1f(n.uBrightness,this.brightness)}}ie(eS,"type","Brightness"),ie(eS,"defaults",{brightness:0}),ie(eS,"uniformLocations",["uBrightness"]),ft.setClass(eS);const dle={matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],colorsOnly:!0};class N0 extends zi{getFragmentSource(){return` 1340 precision highp float; 1341 uniform sampler2D uTexture; 1342 varying vec2 vTexCoord; 1343 uniform mat4 uColorMatrix; 1344 uniform vec4 uConstants; 1345 void main() { 1346 vec4 color = texture2D(uTexture, vTexCoord); 1347 color *= uColorMatrix; 1348 color += uConstants; 1349 gl_FragColor = color; 1350 }`}applyTo2d(t){const n=t.imageData.data,r=this.matrix,i=this.colorsOnly;for(let s=0;s<n.length;s+=4){const a=n[s],o=n[s+1],c=n[s+2];if(n[s]=a*r[0]+o*r[1]+c*r[2]+255*r[4],n[s+1]=a*r[5]+o*r[6]+c*r[7]+255*r[9],n[s+2]=a*r[10]+o*r[11]+c*r[12]+255*r[14],!i){const u=n[s+3];n[s]+=u*r[3],n[s+1]+=u*r[8],n[s+2]+=u*r[13],n[s+3]=a*r[15]+o*r[16]+c*r[17]+u*r[18]+255*r[19]}}}sendUniformData(t,n){const r=this.matrix,i=[r[0],r[1],r[2],r[3],r[5],r[6],r[7],r[8],r[10],r[11],r[12],r[13],r[15],r[16],r[17],r[18]],s=[r[4],r[9],r[14],r[19]];t.uniformMatrix4fv(n.uColorMatrix,!1,i),t.uniform4fv(n.uConstants,s)}toObject(){return le(le({},super.toObject()),{},{matrix:[...this.matrix]})}}function kp(e,t){var n;const r=(ie(n=class extends N0{toObject(){return{type:this.type,colorsOnly:this.colorsOnly}}},"type",e),ie(n,"defaults",{colorsOnly:!1,matrix:t}),n);return ft.setClass(r,e),r}ie(N0,"type","ColorMatrix"),ie(N0,"defaults",dle),ie(N0,"uniformLocations",["uColorMatrix","uConstants"]),ft.setClass(N0);kp("Brownie",[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0]);kp("Vintage",[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0]);kp("Kodachrome",[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0]);kp("Technicolor",[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0]);kp("Polaroid",[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0]);kp("Sepia",[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0]);kp("BlackWhite",[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]);class NH extends zi{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.subFilters=t.subFilters||[]}applyTo(t){Q3(t)&&(t.passes+=this.subFilters.length-1),this.subFilters.forEac
1350h(n=>{n.applyTo(t)})}toObject(){return{type:this.type,subFilters:this.subFilters.map(t=>t.toObject())}}isNeutralState(){return!this.subFilters.some(t=>!t.isNeutralState())}static fromObject(t,n){return Promise.all((t.subFilters||[]).map(r=>ft.getClass(r.type).fromObject(r,n))).then(r=>new this({subFilters:r}))}}ie(NH,"type","Composed"),ft.setClass(NH);class tS extends zi{getFragmentSource(){return` 1351 precision highp float; 1352 uniform sampler2D uTexture; 1353 uniform float uContrast; 1354 varying vec2 vTexCoord; 1355 void main() { 1356 vec4 color = texture2D(uTexture, vTexCoord); 1357 float contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast)); 1358 color.rgb = contrastF * (color.rgb - 0.5) + 0.5; 1359 gl_FragColor = color; 1360 }`}isNeutralState(){return this.contrast===0}applyTo2d(t){let{imageData:{data:n}}=t;const r=Math.floor(255*this.contrast),i=259*(r+255)/(255*(259-r));for(let s=0;s<n.length;s+=4)n[s]=i*(n[s]-128)+128,n[s+1]=i*(n[s+1]-128)+128,n[s+2]=i*(n[s+2]-128)+128}sendUniformData(t,n){t.uniform1f(n.uContrast,this.contrast)}}ie(tS,"type","Contrast"),ie(tS,"defaults",{contrast:0}),ie(tS,"uniformLocations",["uContrast"]),ft.setClass(tS);const JXe={Convolute_3_1:` 1361 precision highp float; 1362 uniform sampler2D uTexture; 1363 uniform float uMatrix[9]; 1364 uniform float uStepW; 1365 uniform float uStepH; 1366 varying vec2 vTexCoord; 1367 void main() { 1368 vec4 color = vec4(0, 0, 0, 0); 1369 for (float h = 0.0; h < 3.0; h+=1.0) { 1370 for (float w = 0.0; w < 3.0; w+=1.0) { 1371 vec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1)); 1372 color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)]; 1373 } 1374 } 1375 gl_FragColor = color; 1376 } 1377 `,Convolute_3_0:` 1378 precision highp float; 1379 uniform sampler2D uTexture; 1380 uniform float uMatrix[9]; 1381 uniform float uStepW; 1382 uniform float uStepH; 1383 varying vec2 vTexCoord; 1384 void main() { 1385 vec4 color = vec4(0, 0, 0, 1); 1386 for (float h = 0.0; h < 3.0; h+=1.0) { 1387 for (float w = 0.0; w < 3.0; w+=1.0) { 1388 vec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0)); 1389 color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)]; 1390 } 1391 } 1392 float alpha = texture2D(uTexture, vTexCoord).a; 1393 gl_FragColor = color; 1394 gl_FragColor.a = alpha; 1395 } 1396 `,Convolute_5_1:` 1397 precision highp float; 1398 uniform sampler2D uTexture; 1399 uniform float uMatrix[25]; 1400 uniform float uStepW; 1401 uniform float uStepH; 1402 varying vec2 vTexCoord; 1403 void main() { 1404 vec4 color = vec4(0, 0, 0, 0); 1405 for (float h = 0.0; h < 5.0; h+=1.0) { 1406 for (float w = 0.0; w < 5.0; w+=1.0) { 1407 vec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0)); 1408 color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)]; 1409 } 1410 } 1411 gl_FragColor = color; 1412 } 1413 `,Convolute_5_0:` 1414 precision highp float; 1415 uniform sampler2D uTexture; 1416 uniform float uMatrix[25]; 1417 uniform float uStepW; 1418 uniform float uStepH; 1419 varying vec2 vTexCoord; 1420 void main() { 1421 vec4 color = vec4(0, 0, 0, 1); 1422 for (float h = 0.0; h < 5.0; h+=1.0) { 1423 for (float w = 0.0; w < 5.0; w+=1.0) { 1424 vec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0)); 1425 color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)]; 1426 } 1427 } 1428 float alpha = texture2D(uTexture, vTexCoord).a; 1429 gl_FragColor = color; 1430 gl_FragColor.a = alpha; 1431 } 1432 `,Convolute_7_1:` 1433 precision highp float; 1434 uniform sampler2D uTexture; 1435 uniform float uMatrix[49]; 1436 uniform float uStepW; 1437 uniform float uStepH; 1438 varying vec2 vTexCoord; 1439 void main() { 1440 vec4 color = vec4(0, 0, 0, 0); 1441 for (float h = 0.0; h < 7.0; h+=1.0) { 1442 for (float w = 0.0; w < 7.0; w+=1.0) { 1443 vec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0)); 1444 color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)]; 1445 } 1446 } 1447 gl_FragColor = color; 1448 } 1449 `,Convolute_7_0:` 1450 precision highp float; 1451 uniform sampler2D uTexture; 1452 uniform float uMatrix[49]; 1453 uniform float uStepW; 1454 uniform float uStepH; 1455 varying vec2 vTexCoord; 1456 void main() { 1457 vec4 color = vec4(0, 0, 0, 1); 1458 for (float h = 0.0; h < 7.0; h+=1.0) { 1459 for (float w = 0.0; w < 7.0; w+=1.0) { 1460 vec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0)); 1461 color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)]; 1462 } 1463 } 1464 float alpha = texture2D(uTexture, vTexCoord).a; 1465 gl_FragColor = color; 1466 gl_FragColor.a = alpha; 1467 } 1468 `,Convolute_9_1:` 1469 precision highp float; 1470 uniform sampler2D uTexture; 1471 uniform float uMatrix[81]; 1472 uniform float uStepW; 1473 uniform float uStepH; 1474 varying vec2 vTexCoord; 1475 void main() { 1476 vec4 color = vec4(0, 0, 0, 0); 1477 for (float h = 0.0; h < 9.0; h+=1.0) { 1478 for (float w = 0.0; w < 9.0; w+=1.0) { 1479 vec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0)); 1480 color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)]; 1481 } 1482 } 1483 gl_FragColor = color; 1484 } 1485 `,Convolute_9_0:` 1486 precision highp float; 1487 uniform sampler2D uTexture; 1488 uniform float uMatrix[81]; 1489 uniform float uStepW; 1490 uniform float uStepH; 1491 varying vec2 vTexCoord; 1492 void main() { 1493 vec4 color = vec4(0, 0, 0, 1); 1494 for (float h = 0.0; h < 9.0; h+=1.0) { 1495 for (float w = 0.0; w < 9.0; w+=1.0) { 1496 vec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0)); 1497 color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)]; 1498 } 1499 } 1500 float alpha = texture2D(uTexture, vTexCoord).a; 1501 gl_FragColor = color; 1502 gl_FragColor.a = alpha; 1503 } 1504 `};
vendor: 16,263 bytes, lines 1504-1655
1504class nS extends zi{getCacheKey(){return"".concat(this.type,"_").concat(Math.sqrt(this.matrix.length),"_").concat(this.opaque?1:0)}getFragmentSource(){return JXe[this.getCacheKey()]}applyTo2d(t){const n=t.imageData,r=n.data,i=this.matrix,s=Math.round(Math.sqrt(i.length)),a=Math.floor(s/2),o=n.width,c=n.height,u=t.ctx.createImageData(o,c),d=u.data,h=this.opaque?1:0;let f,m,p,x,v,g,y,w,S,C,k,_,E;for(k=0;k<c;k++)for(C=0;C<o;C++){for(v=4*(k*o+C),f=0,m=0,p=0,x=0,E=0;E<s;E++)for(_=0;_<s;_++)y=k+E-a,g=C+_-a,y<0||y>=c||g<0||g>=o||(w=4*(y*o+g),S=i[E*s+_],f+=r[w]*S,m+=r[w+1]*S,p+=r[w+2]*S,h||(x+=r[w+3]*S));d[v]=f,d[v+1]=m,d[v+2]=p,d[v+3]=h?r[v+3]:x}t.imageData=u}sendUniformData(t,n){t.uniform1fv(n.uMatrix,this.matrix)}toObject(){return le(le({},super.toObject()),{},{opaque:this.opaque,matrix:[...this.matrix]})}}ie(nS,"type","Convolute"),ie(nS,"defaults",{opaque:!1,matrix:[0,0,0,0,1,0,0,0,0]}),ie(nS,"uniformLocations",["uMatrix","uOpaque","uHalfSize","uSize"]),ft.setClass(nS);const hle="Gamma";class rS extends zi{getFragmentSource(){return` 1505 precision highp float; 1506 uniform sampler2D uTexture; 1507 uniform vec3 uGamma; 1508 varying vec2 vTexCoord; 1509 void main() { 1510 vec4 color = texture2D(uTexture, vTexCoord); 1511 vec3 correction = (1.0 / uGamma); 1512 color.r = pow(color.r, correction.r); 1513 color.g = pow(color.g, correction.g); 1514 color.b = pow(color.b, correction.b); 1515 gl_FragColor = color; 1516 gl_FragColor.rgb *= color.a; 1517 } 1518`}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.gamma=t.gamma||this.constructor.defaults.gamma.concat()}applyTo2d(t){let{imageData:{data:n}}=t;const r=this.gamma,i=1/r[0],s=1/r[1],a=1/r[2];this.rgbValues||(this.rgbValues={r:new Uint8Array(256),g:new Uint8Array(256),b:new Uint8Array(256)});const o=this.rgbValues;for(let c=0;c<256;c++)o.r[c]=255*Math.pow(c/255,i),o.g[c]=255*Math.pow(c/255,s),o.b[c]=255*Math.pow(c/255,a);for(let c=0;c<n.length;c+=4)n[c]=o.r[n[c]],n[c+1]=o.g[n[c+1]],n[c+2]=o.b[n[c+2]]}sendUniformData(t,n){t.uniform3fv(n.uGamma,this.gamma)}isNeutralState(){const{gamma:t}=this;return t[0]===1&&t[1]===1&&t[2]===1}toObject(){return{type:hle,gamma:this.gamma.concat()}}}ie(rS,"type",hle),ie(rS,"defaults",{gamma:[1,1,1]}),ie(rS,"uniformLocations",["uGamma"]),ft.setClass(rS);const eQe={average:` 1519 precision highp float; 1520 uniform sampler2D uTexture; 1521 varying vec2 vTexCoord; 1522 void main() { 1523 vec4 color = texture2D(uTexture, vTexCoord); 1524 float average = (color.r + color.b + color.g) / 3.0; 1525 gl_FragColor = vec4(average, average, average, color.a); 1526 } 1527 `,lightness:` 1528 precision highp float; 1529 uniform sampler2D uTexture; 1530 uniform int uMode; 1531 varying vec2 vTexCoord; 1532 void main() { 1533 vec4 col = texture2D(uTexture, vTexCoord); 1534 float average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0; 1535 gl_FragColor = vec4(average, average, average, col.a); 1536 } 1537 `,luminosity:` 1538 precision highp float; 1539 uniform sampler2D uTexture; 1540 uniform int uMode; 1541 varying vec2 vTexCoord; 1542 void main() { 1543 vec4 col = texture2D(uTexture, vTexCoord); 1544 float average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b; 1545 gl_FragColor = vec4(average, average, average, col.a); 1546 } 1547 `};class iS extends zi{applyTo2d(t){let{imageData:{data:n}}=t;for(let r,i=0;i<n.length;i+=4){const s=n[i],a=n[i+1],o=n[i+2];switch(this.mode){case"average":r=(s+a+o)/3;break;case"lightness":r=(Math.min(s,a,o)+Math.max(s,a,o))/2;break;case"luminosity":r=.21*s+.72*a+.07*o}n[i+2]=n[i+1]=n[i]=r}}getCacheKey(){return"".concat(this.type,"_").concat(this.mode)}getFragmentSource(){return eQe[this.mode]}sendUniformData(t,n){t.uniform1i(n.uMode,1)}isNeutralState(){return!1}}ie(iS,"type","Grayscale"),ie(iS,"defaults",{mode:"average"}),ie(iS,"uniformLocations",["uMode"]),ft.setClass(iS);const tQe=le(le({},dle),{},{rotation:0});class ZE extends N0{calculateMatrix(){const t=this.rotation*Math.PI,n=Ku(t),r=Xu(t),i=1/3,s=Math.sqrt(i)*r,a=1-n;this.matrix=[n+a/3,i*a-s,i*a+s,0,0,i*a+s,n+i*a,i*a-s,0,0,i*a-s,i*a+s,n+i*a,0,0,0,0,0,1,0]}isNeutralState(){return this.rotation===0}applyTo(t){this.calculateMatrix(),super.applyTo(t)}toObject(){return{type:this.type,rotation:this.rotation}}}ie(ZE,"type","HueRotation"),ie(ZE,"defaults",tQe),ft.setClass(ZE);class sS extends zi{applyTo2d(t){let{imageData:{data:n}}=t;for(let r=0;r<n.length;r+=4)n[r]=255-n[r],n[r+1]=255-n[r+1],n[r+2]=255-n[r+2],this.alpha&&(n[r+3]=255-n[r+3])}getFragmentSource(){return` 1548 precision highp float; 1549 uniform sampler2D uTexture; 1550 uniform int uInvert; 1551 uniform int uAlpha; 1552 varying vec2 vTexCoord; 1553 void main() { 1554 vec4 color = texture2D(uTexture, vTexCoord); 1555 if (uInvert == 1) { 1556 if (uAlpha == 1) { 1557 gl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,1.0 -color.a); 1558 } else { 1559 gl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a); 1560 } 1561 } else { 1562 gl_FragColor = color; 1563 } 1564 } 1565`}isNeutralState(){return!this.invert}sendUniformData(t,n){t.uniform1i(n.uInvert,Number(this.invert)),t.uniform1i(n.uAlpha,Number(this.alpha))}}ie(sS,"type","Invert"),ie(sS,"defaults",{alpha:!1,invert:!0}),ie(sS,"uniformLocations",["uInvert","uAlpha"]),ft.setClass(sS);class aS extends zi{getFragmentSource(){return` 1566 precision highp float; 1567 uniform sampler2D uTexture; 1568 uniform float uStepH; 1569 uniform float uNoise; 1570 uniform float uSeed; 1571 varying vec2 vTexCoord; 1572 float rand(vec2 co, float seed, float vScale) { 1573 return fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0); 1574 } 1575 void main() { 1576 vec4 color = texture2D(uTexture, vTexCoord); 1577 color.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise; 1578 gl_FragColor = color; 1579 } 1580`}applyTo2d(t){let{imageData:{data:n}}=t;const r=this.noise;for(let i=0;i<n.length;i+=4){const s=(.5-Math.random())*r;n[i]+=s,n[i+1]+=s,n[i+2]+=s}}sendUniformData(t,n){t.uniform1f(n.uNoise,this.noise/255),t.uniform1f(n.uSeed,Math.random())}isNeutralState(){return this.noise===0}}ie(aS,"type","Noise"),ie(aS,"defaults",{noise:0}),ie(aS,"uniformLocations",["uNoise","uSeed"]),ft.setClass(aS);class oS extends zi{applyTo2d(t){let{imageData:{data:n,width:r,height:i}}=t;for(let s=0;s<i;s+=this.blocksize)for(let a=0;a<r;a+=this.blocksize){const o=4*s*r+4*a,c=n[o],u=n[o+1],d=n[o+2],h=n[o+3];for(let f=s;f<Math.min(s+this.blocksize,i);f++)for(let m=a;m<Math.min(a+this.blocksize,r);m++){const p=4*f*r+4*m;n[p]=c,n[p+1]=u,n[p+2]=d,n[p+3]=h}}}isNeutralState(){return this.blocksize===1}getFragmentSource(){return` 1581 precision highp float; 1582 uniform sampler2D uTexture; 1583 uniform float uBlocksize; 1584 uniform float uStepW; 1585 uniform float uStepH; 1586 varying vec2 vTexCoord; 1587 void main() { 1588 float blockW = uBlocksize * uStepW; 1589 float blockH = uBlocksize * uStepH; 1590 int posX = int(vTexCoord.x / blockW); 1591 int posY = int(vTexCoord.y / blockH); 1592 float fposX = float(posX); 1593 float fposY = float(posY); 1594 vec2 squareCoords = vec2(fposX * blockW, fposY * blockH); 1595 vec4 color = texture2D(uTexture, squareCoords); 1596 gl_FragColor = color; 1597 } 1598`}sendUniformData(t,n){t.uniform1f(n.uBlocksize,this.blocksize)}}ie(oS,"type","Pixelate"),ie(oS,"defaults",{blocksize:4}),ie(oS,"uniformLocations",["uBlocksize"]),ft.setClass(oS);class lS extends zi{getFragmentSource(){return` 1599precision highp float; 1600uniform sampler2D uTexture; 1601uniform vec4 uLow; 1602uniform vec4 uHigh; 1603varying vec2 vTexCoord; 1604void main() { 1605 gl_FragColor = texture2D(uTexture, vTexCoord); 1606 if(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) { 1607 gl_FragColor.a = 0.0; 1608 } 1609} 1610`}applyTo2d(t){let{imageData:{data:n}}=t;const r=255*this.distance,i=new er(this.color).getSource(),s=[i[0]-r,i[1]-r,i[2]-r],a=[i[0]+r,i[1]+r,i[2]+r];for(let o=0;o<n.length;o+=4){const c=n[o],u=n[o+1],d=n[o+2];c>s[0]&&u>s[1]&&d>s[2]&&c<a[0]&&u<a[1]&&d<a[2]&&(n[o+3]=0)}}sendUniformData(t,n){const r=new er(this.color).getSource(),i=this.distance,s=[0+r[0]/255-i,0+r[1]/255-i,0+r[2]/255-i,1],a=[r[0]/255+i,r[1]/255+i,r[2]/255+i,1];t.uniform4fv(n.uLow,s),t.uniform4fv(n.uHigh,a)}}ie(lS,"type","RemoveColor"),ie(lS,"defaults",{color:"#FFFFFF",distance:.02,useAlpha:!1}),ie(lS,"uniformLocations",["uLow","uHigh"]),ft.setClass(lS);class cS extends zi{sendUniformData(t,n){t.uniform2fv(n.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),t.uniform1fv(n.uTaps,this.taps)}getFilterWindow(){const t=this.tempScale;return Math.ceil(this.lanczosLobes/t)}getCacheKey(){const t=this.getFilterWindow();return"".concat(this.type,"_").concat(t)}getFragmentSource(){const t=this.getFilterWindow();return this.generateShader(t)}getTaps(){const t=this.lanczosCreate(this.lanczosLobes),n=this.tempScale,r=this.getFilterWindow(),i=new Array(r);for(let s=1;s<=r;s++)i[s-1]=t(s*n);return i}generateShader(t){const n=new Array(t);for(let r=1;r<=t;r++)n[r-1]="".concat(r,".0 * uDelta");return` 1611 precision highp float; 1612 uniform sampler2D uTexture; 1613 uniform vec2 uDelta; 1614 varying vec2 vTexCoord; 1615 uniform float uTaps[`.concat(t,`]; 1616 void main() { 1617 vec4 color = texture2D(uTexture, vTexCoord); 1618 float sum = 1.0; 1619 `).concat(n.map((r,i)=>` 1620 color += texture2D(uTexture, vTexCoord + `.concat(r,") * uTaps[").concat(i,"] + texture2D(uTexture, vTexCoord - ").concat(r,") * uTaps[").concat(i,`]; 1621 sum += 2.0 * uTaps[`).concat(i,`]; 1622 `)).join(` 1623`),` 1624 gl_FragColor = color / sum; 1625 } 1626 `)}applyToForWebgl(t){t.passes++,this.width=t.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=t.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),t.destinationWidth=this.dW,super.applyTo(t),t.sourceWidth=t.destinationWidth,this.height=t.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),t.destinationHeight=this.dH,super.applyTo(t),t.sourceHeight=t.destinationHeight}applyTo(t){Q3(t)?this.applyToForWebgl(t):this.applyTo2d(t)}isNeutralState(){return this.scaleX===1&&this.scaleY===1}lanczosCreate(t){return n=>{if(n>=t||n<=-t)return 0;if(n<11920929e-14&&n>-11920929e-14)return 1;const r=(n*=Math.PI)/t;return Math.sin(n)/n*Math.sin(r)/r}}applyTo2d(t){const n=t.imageData,r=this.scaleX,i=this.scaleY;this.rcpScaleX=1/r,this.rcpScaleY=1/i;const s=n.width,a=n.height,o=Math.round(s*r),c=Math.round(a*i);let u;u=this.resizeType==="sliceHack"?this.sliceByTwo(t,s,a,o,c):this.resizeType==="hermite"?this.hermiteFastResize(t,s,a,o,c):this.resizeType==="bilinear"?this.bilinearFiltering(t,s,a,o,c):this.resizeType==="lanczos"?this.lanczosResize(t,s,a,o,c):new ImageData(o,c),t.imageData=u}sliceByTwo(t,n,r,i,s){const a=t.imageData,o=.5;let c=!1,u=!1,d=n*o,h=r*o;const f=t.filterBackend.resources;let m=0,p=0;const x=n;let v=0;f.sliceByTwo||(f.sliceByTwo=Qu());const g=f.sliceByTwo;(g.width<1.5*n||g.height<r)&&(g.width=1.5*n,g.height=r);const y=g.getContext("2d");for(y.clearRect(0,0,1.5*n,r),y.putImageData(a,0,0),i=Math.floor(i),s=Math.floor(s);!c||!u;)n=d,r=h,i<Math.floor(d*o)?d=Math.floor(d*o):(d=i,c=!0),s<Math.floor(h*o)?h=Math.floor(h*o):(h=s,u=!0),y.drawImage(g,m,p,n,r,x,v,d,h),m=x,p=v,v+=h;return y.getImageData(m,p,i,s)}lanczosResize(t,n,r,i,s){const a=t.imageData.data,o=t.ctx.createImageData(i,s),c=o.data,u=this.lanczosCreate(this.lanczosLobes),d=this.rcpScaleX,h=this.rcpScaleY,f=2/this.rcpScaleX,m=2/this.rcpScaleY,p=Math.ceil(d*this.lanczosLobes/2),x=Math.ceil(h*this.lanczosLobes/2),v={},g={x:0,y:0},y={x:0,y:0};return function w(S){let C,k,_,E,A,j,D,M,$,B,z;for(g.x=(S+.5)*d,y.x=Math.floor(g.x),C=0;C<s;C++){for(g.y=(C+.5)*h,y.y=Math.floor(g.y),A=0,j=0,D=0,M=0,$=0,k=y.x-p;k<=y.x+p;k++)if(!(k<0||k>=n)){B=Math.floor(1e3*Math.abs(k-g.x)),v[B]||(v[B]={});for(let O=y.y-x;O<=y.y+x;O++)O<0||O>=r||(z=Math.floor(1e3*Math.abs(O-g.y)),v[B][z]||(v[B][z]=u(Math.sqrt(Math.pow(B*f,2)+Math.pow(z*m,2))/1e3)),_=v[B][z],_>0&&(E=4*(O*n+k),A+=_,j+=_*a[E],D+=_*a[E+1],M+=_*a[E+2],$+=_*a[E+3]))}E=4*(C*i+S),c[E]=j/A,c[E+1]=D/A,c[E+2]=M/A,c[E+3]=$/A}return++S<i?w(S):o}(0)}bilinearFiltering(t,n,r,i,s){let a,o,c,u,d,h,f,m,p,x,v,g,y,w=0;const S=this.rcpScaleX,C=this.rcpScaleY,k=4*(n-1),_=t.imageData.data,E=t.ctx.createImageData(i,s),A=E.data;for(f=0;f<s;f++)for(m=0;m<i;m++)for(d=Math.floor(S*m),h=Math.floor(C*f),p=S*m-d,x=C*f-h,y=4*(h*n+d),v=0;v<4;v++)a=_[y+v],o=_[y+4+v],c=_[y+k+v],u=_[y+k+4+v],g=a*(1-p)*(1-x)+o*p*(1-x)+c*x*(1-p)+u*p*x,A[w++]=g;return E}hermiteFastResize(t,n,r,i,s){const a=this.rcpScaleX,o=this.rcpScaleY,c=Math.ceil(a/2),u=Math.ceil(o/2),d=t.imageData.data,h=t.ctx.createImageData(i,s),f=h.data;for(let m=0;m<s;m++)for(let p=0;p<i;p++){const x=4*(p+m*i);let v=0,g=0,y=0,w=0,S=0,C=0,k=0;const _=(m+.5)*o;for(let E=Math.floor(m*o);E<(m+1)*o;E++){const A=Math.abs(_-(E+.5))/u,j=(p+.5)*a,D=A*A;for(let M=Math.floor(p*a);M<(p+1)*a;M++){let $=Math.abs(j-(M+.5))/c;const B=Math.sqrt(D+$*$);B>1&&B<-1||(v=2*B*B*B-3*B*B+1,v>0&&($=4*(M+E*n),k+=v*d[$+3],y+=v,d[$+3]<255&&(v=v*d[$+3]/250),w+=v*d[$],S+=v*d[$+1],C+=v*d[$+2],g+=v))}}f[x]=w/g,f[x+1]=S/g,f[x+2]=C/g,f[x+3]=k/y}return h}}ie(cS,"type","Resize"),ie(cS,"defaults",{resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3}),ie(cS,"uniformLocations",["uDelta","uTaps"]),ft.setClass(cS);class uS extends zi{getFragmentSource(){return` 1627 precision highp float; 1628 uniform sampler2D uTexture; 1629 uniform float uSaturation; 1630 varying vec2 vTexCoord; 1631 void main() { 1632 vec4 color = texture2D(uTexture, vTexCoord); 1633 float rgMax = max(color.r, color.g); 1634 float rgbMax = max(rgMax, color.b); 1635 color.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00; 1636 color.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00; 1637 color.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00; 1638 gl_FragColor = color; 1639 } 1640`}applyTo2d(t){let{imageData:{data:n}}=t;const r=-this.saturation;for(let i=0;i<n.length;i+=4){const s=n[i],a=n[i+1],o=n[i+2],c=Math.max(s,a,o);n[i]+=c!==s?(c-s)*r:0,n[i+1]+=c!==a?(c-a)*r:0,n[i+2]+=c!==o?(c-o)*r:0}}sendUniformData(t,n){t.uniform1f(n.uSaturation,-this.saturation)}isNeutralState(){return this.saturation===0}}ie(uS,"type","Saturation"),ie(uS,"defaults",{saturation:0}),ie(uS,"uniformLocations",["uSaturation"]),ft.setClass(uS);class dS extends zi{getFragmentSource(){return` 1641 precision highp float; 1642 uniform sampler2D uTexture; 1643 uniform float uVibrance; 1644 varying vec2 vTexCoord; 1645 void main() { 1646 vec4 color = texture2D(uTexture, vTexCoord); 1647 float max = max(color.r, max(color.g, color.b)); 1648 float avg = (color.r + color.g + color.b) / 3.0; 1649 float amt = (abs(max - avg) * 2.0) * uVibrance; 1650 color.r += max != color.r ? (max - color.r) * amt : 0.00; 1651 color.g += max != color.g ? (max - color.g) * amt : 0.00; 1652 color.b += max != color.b ? (max - color.b) * amt : 0.00; 1653 gl_FragColor = color; 1654 } 1655`}applyTo2d(t){let{imageData:{data:n}}=t;const r=-this.vibrance;for(let i=0;i<n.length;i+=4){const s=n[i],a=n[i+1],o=n[i+2],c=Math.max(s,a,o),u=(s+a+o)/3,d=2*Math.abs(c-u)/255*r;n[i]+=c!==s?(c-s)*d:0,n[i+1]+=c!==a?(c-a)*d:0,n[i+2]+=c!==o?(c-o)*d:0}}sendUniformData(t,n){t.uniform1f(n.uVibrance,-this.vibrance)}isNeutralState(){return this.vibrance===0}}ie(dS,"type","Vibrance"),ie(dS,"defaults",{vibrance:0}),ie(dS,"uniformLocations",["uVibrance"]),ft.setClass(dS);const Hp=5,hS=20;function fS(e){const t={type:e.type??"unknown",left:e.left??0,top:e.top??0,width:e.width??0,height:e.height??0,angle:e.angle??0,opacity:e.opacity??1,fill:typeof e.fill=="string"?e.fill:void 0,stroke:typeof e.stroke=="string"?e.stroke:void 0,strokeWidth:e.strokeWidth,scaleX:e.scaleX,scaleY:e.scaleY,lockMovementX:e.lockMovementX,lockMovementY:e.lockMovementY};if((e instanceof xh||e instanceof Gi)&&(t.text=e.text,t.fontSize=e.fontSize,t.fontFamily=e.fontFamily,t.fontWeight=String(e.fontWeight),t.fontStyle=e.fontStyle,t.textAlign=e.textAlign,t.underline=e.underline),e instanceof Ts&&(t.rx=e.rx),e instanceof ya){const n=e.getElement();t.src=n==null?void 0:n.src}return t}function JE(e,t,n,r){const i=new Ts({left:0,top:0,width:e,height:n,fill:r.bgColor}),s=new Gi("PROPRIETARY AND CONFIDENTIAL · Copyright © 2026 Ava-Education, LLC. All rights reserved.",{left
1655:e/2,top:n/2-6,fontSize:12,fill:r.textColor,fontFamily:"Arial, sans-serif",opacity:.65,originX:"center"}),a=new Ts({left:e-66,top:5,width:n-10,height:n-10,fill:"rgba(255,255,255,0.1)",stroke:r.textColor,strokeWidth:1,strokeDashArray:[4,3],rx:4,opacity:.5}),o=new Gi("QR",{left:e-50,top:n/2-7,fontSize:14,fill:r.textColor,fontFamily:"Arial, sans-serif",opacity:.4});return new Mu([i,s,a,o],{left:0,top:t-n,selectable:!1,evented:!1,hasControls:!1,lockMovementX:!0,lockMovementY:!0,hoverCursor:"default",data:{isFooter:!0},name:"lockedFooter"})}function nQe(e,t){const n=[];for(let r=hS;r<e;r+=hS)n.push(new Ts({left:r,top:0,width:.5,height:t,fill:"#e0e0e0"}));for(let r=hS;r<t;r+=hS)n.push(new Ts({left:0,top:r,width:e,height:.5,fill:"#e0e0e0"}));return new Mu(n,{selectable:!1,evented:!1,hasControls:!1,lockMovementX:!0,lockMovementY:!0,data:{isGrid:!0},name:"gridOverlay"})}Y.memo(function({width:t,height:n,footerHeight:r,canvasJson:i,footerConfig:s,showGrid:a,zoom:o,onCanvasReady:c,onObjectSelected:u,onCanvasModified:d}){const h=b.useRef(null),f=b.useRef(null),m=b.useRef([]),p=b.useCallback(()=>{const v=f.current;v&&(m.current.forEach(g=>v.remove(g)),m.current=[])},[]),x=b.useCallback((v,g,y,w)=>{const S=f.current;if(!S)return;const C=new Ts({left:v,top:g,width:y,height:w,fill:"red",selectable:!1,evented:!1,data:{isGuide:!0}});m.current.push(C),S.add(C)},[]);return b.useEffect(()=>{const v=h.current;if(!v||f.current)return;const g=new H7(v,{width:t,height:n,selection:!0,preserveObjectStacking:!0});f.current=g;const y=JE(t,n,r,s);g.add(y),ya.fromURL("/favicon.png").then(C=>{const _=(r-14)/(C.height||40);C.set({left:16,top:n-r+7,scaleX:_,scaleY:_,selectable:!1,evented:!1,hasControls:!1,lockMovementX:!0,lockMovementY:!0,hoverCursor:"default",data:{isFooter:!0},name:"footerLogo"}),g.add(C),g.renderAll()}).catch(()=>{});const w=()=>{const C=g.getActiveObject();C&&u(fS(C))};g.on("selection:created",w),g.on("selection:updated",w),g.on("selection:cleared",()=>u(null));const S=()=>{p();const C=g.getActiveObject();C&&u(fS(C)),d()};return g.on("object:modified",S),g.on("object:added",S),g.on("object:removed",S),g.on("object:scaling",()=>{const C=g.getActiveObject();C&&u(fS(C))}),g.on("object:moving",()=>{const C=g.getActiveObject();C&&u(fS(C))}),g.on("object:moving",C=>{var D,M,$;const k=C.target;if(!k||(D=k.data)!=null&&D.isFooter||(M=k.data)!=null&&M.isGrid||($=k.data)!=null&&$.isGuide)return;const _=n-r-k.getScaledHeight();(k.top??0)>_&&k.set("top",_),p();const E=k.getBoundingRect(),A=E.left+E.width/2,j=E.top+E.height/2;g.getObjects().forEach(B=>{var me,U,ae;if(B===k||(me=B.data)!=null&&me.isFooter||(U=B.data)!=null&&U.isGrid||(ae=B.data)!=null&&ae.isGuide)return;const z=B.getBoundingRect(),O=z.left+z.width/2,P=z.top+z.height/2,I=E.left+E.width,q=E.top+E.height,R=z.left+z.width,xe=z.top+z.height;Math.abs(A-O)<Hp&&(k.set("left",(k.left??0)+(O-A)),x(O,0,.5,n)),Math.abs(j-P)<Hp&&(k.set("top",(k.top??0)+(P-j)),x(0,P,t,.5)),Math.abs(E.left-z.left)<Hp&&(k.set("left",(k.left??0)+(z.left-E.left)),x(z.left,0,.5,n)),Math.abs(E.top-z.top)<Hp&&(k.set("top",(k.top??0)+(z.top-E.top)),x(0,z.top,t,.5)),Math.abs(I-R)<Hp&&(k.set("left",(k.left??0)+(R-I)),x(R,0,.5,n)),Math.abs(q-xe)<Hp&&(k.set("top",(k.top??0)+(xe-q)),x(0,xe,t,.5))})}),g.on("mouse:up",p),c(g),()=>{g.dispose(),f.current=null}},[]),b.useEffect(()=>{const v=f.current;if(!v)return;const g=v.getObjects().find(w=>w.name==="lockedFooter");g&&v.remove(g);const y=JE(t,n,r,s);v.add(y),v.renderAll()},[s,t,n,r]),b.useEffect(()=>{const v=f.current;if(!v)return;const g=v.getObjects().find(y=>y.name==="gridOverlay");if(g&&v.remove(g),a){const y=nQe(t,n);v.insertAt(0,y)}v.renderAll()},[a,t,n]),b.useEffect(()=>{const v=f.current;!v||!i||v.loadFromJSON(i).then(()=>{const g=v.getObjects().find(w=>w.name==="lockedFooter");g&&v.remove(g);const y=JE(t,n,r,s);v.add(y),v.renderAll()})},[i,t,n,r,s]),b.useEffect(()=>{const v=g=>{var k,_,E;const y=f.current;if(!y)return;const w=g.target;if(w.tagName==="INPUT"||w.tagName==="TEXTAREA"||w.isContentEditable)return;const S=y.getActiveObject();if((g.key==="Delete"||g.key==="Backspace")&&S){g.preventDefault(),(k=S.data)!=null&&k.isFooter||(y.remove(S),y.discardActiveObject(),y.renderAll());return}if(g.key==="d"&&(g.ctrlKey||g.metaKey)&&S){if(g.preventDefault(),(_=S.data)!=null&&_.isFooter)return;S.clone().then(A=>{A.set({left:(A.left??0)+20,top:(A.top??0)+20}),y.add(A),y.setActiveObject(A),y.renderAll()});return}const C=g.shiftKey?10:1;
1655if(S&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(g.key)){if(g.preventDefault(),(E=S.data)!=null&&E.isFooter)return;switch(g.key){case"ArrowUp":S.set("top",(S.top??0)-C);break;case"ArrowDown":S.set("top",Math.min((S.top??0)+C,n-r-S.getScaledHeight()));break;case"ArrowLeft":S.set("left",(S.left??0)-C);break;case"ArrowRight":S.set("left",(S.left??0)+C);break}S.setCoords(),y.renderAll(),d()}};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[n,r,d]),l.jsx("div",{style:{width:t*o,height:n*o,overflow:"hidden"},children:l.jsx("div",{style:{boxShadow:"0 4px 20px rgba(0,0,0,0.10)",borderRadius:"6px",border:"1px solid #d1d5db",background:"#ffffff",transformOrigin:"top left",transform:`scale(${o})`,width:t,height:n},children:l.jsx("canvas",{ref:h,width:t,height:n})})})});function rQe({content:e,isReading:t,activeSentenceIndex:n,activeWordIndex:r}){return l.jsx("div",{className:"mb-6 text-[15.5px] leading-[1.8]",children:t?l.jsx(AJ,{text:e,activeSentenceIndex:n??null,activeWordIndex:r??null,autoScroll:!0}):l.jsx(Jx,{content:e})})}const iQe=["tip","warning","note","important"],sQe={info:"note",caution:"warning",danger:"warning",error:"warning",alert:"warning",success:"tip"};function fle(e){if(typeof e!="string")return"note";const t=e.trim().toLowerCase();return iQe.includes(t)?t:sQe[t]??"note"}function aQe(e){const t=typeof e.title=="string"&&e.title.trim().length>0?e.title.trim():"Note",n=typeof e.content=="string"?e.content:typeof e.body=="string"?e.body:typeof e.text=="string"?e.text:"";return{variant:fle(e.variant??e.tone),title:t,content:n}}const AH={tip:{Icon:_Q,bg:"bg-gradient-to-br from-emerald-50/80 via-green-50/60 to-teal-50/40",border:"border-emerald-200/60",label:"text-emerald-700",iconGradient:"from-emerald-500 to-teal-500",iconShadow:"shadow-emerald-500/25",iconText:"text-white",accentBar:"from-emerald-400 to-teal-500"},warning:{Icon:lf,bg:"bg-gradient-to-br from-amber-50/80 via-orange-50/60 to-yellow-50/40",border:"border-amber-200/60",label:"text-amber-700",iconGradient:"from-amber-500 to-orange-500",iconShadow:"shadow-amber-500/25",iconText:"text-white",accentBar:"from-amber-400 to-orange-500"},note:{Icon:VM,bg:"bg-gradient-to-br from-blue-50/80 via-indigo-50/60 to-sky-50/40",border:"border-blue-200/60",label:"text-blue-700",iconGradient:"from-blue-500 to-indigo-500",iconShadow:"shadow-blue-500/25",iconText:"text-white",accentBar:"from-blue-400 to-indigo-500"},important:{Icon:ki,bg:"",border:"",label:"",iconGradient:"",iconShadow:"",iconText:"text-white",accentBar:""}};function oQe({variant:e,title:t,content:n,isReading:r,activeSentenceIndex:i,activeWordIndex:s}){const a=fle(e),o=AH[a]??AH.note,c=a==="important",u=o.Icon;return l.jsxs("div",{className:re("group relative mb-6 flex gap-4 items-start rounded-2xl border px-5 py-4 overflow-hidden transition-shadow duration-300 hover:shadow-md",c?"border-institution/20 bg-institution/4":`${o.border} ${o.bg}`),children:[l.jsx("div",{className:re("absolute inset-y-0 start-0 w-1 rounded-s-2xl",c?"bg-institution":`bg-gradient-to-b ${o.accentBar}`)}),l.jsx("div",{className:re("relative flex h-9 w-9 shrink-0 items-center justify-center rounded-xl shadow-lg transition-transform duration-300 group-hover:scale-110",c?"":`bg-gradient-to-br ${o.iconGradient} ${o.iconShadow}`,o.iconText),style:c?{background:"linear-gradient(135deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))",boxShadow:"0 4px 12px rgba(var(--arthur-primary-rgb), 0.3)"}:void 0,children:l.jsx(u,{className:"h-[18px] w-[18px]",strokeWidth:2.25})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:re("mb-1 text-[11px] font-bold uppercase tracking-widest",c?"text-institution":o.label),children:t}),l.jsx("div",{className:"text-sm leading-relaxed text-foreground/90",children:r?l.jsx(AJ,{text:n,activeSentenceIndex:i??null,activeWordIndex:s??null,autoScroll:!0}):n})]})]})}function lQe({language:e,title:t,code:n}){const{t:r}=J("common"),[i,s]=b.useState(!1),a=b.useRef(void 0);b.useEffect(()=>()=>clearTimeout(a.current),[]);const o=b.useCallback(async()=>{try{await navigator.clipboard.writeText(n),s(!0),clearTimeout(a.current),a.current=setTimeout(()=>s(!1),1500)}catch{}},[n]);if(e==="latex"){let c;try{c=G4.renderToString(n,{displayMode:!0,throwOnError:!1})}catch{c=`<span class="text-red-500">${r("errors.latexRenderError")}</span>`}return l.jsx("div",{className:"mb-6 overflow-x-auto p-4 text-center",children:l.jsx("div",{dangerouslySetInnerHTML:{__html:Kh.sanitize(c)}})})}return l.jsxs("div",{className:"mb-6 overflow-hidden rounded-xl shadow-md",style:{backgroundColor:"#1e1e2e"},children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-[#313244] bg-[#181825] px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-institution","aria-hidden":!0}),l.jsx("span",{className:"text-xs font-semibold text-[#a6adc8]",children:t??e})]}),l.jsx(ce,{variant:"ghost",size:"sm",onClick:o,className:"cursor-pointer rounded-md bg-[#313244] px-3 py-1 text-xs text-[#a6adc8] hover:bg-[#45475a] hover:text-white h-auto",children:r(i?"buttons.copied":"buttons.copy")})]}),l.jsx("pre",{className:"overflow-x-auto p-5 font-mono text-[13px] leading-relaxed text-[#cdd6f4]",children:l.jsx("code",{children:n})})]})}function cQe({left:e,right:t}){return l.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"overflow-hidden rounded-xl border border-border shadow-sm",children:[l.jsx("div",{className:"px-4 py-3 text-center text-sm font-bold text-white bg-institution",children:e.title}),l.jsx("div",{className:"p-4",children:l.jsx("ul",{className:"space-y-2 list-none",children:e.items.map((n,r)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[l.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-institution","aria-hidden":!0}),n]},r))})})]}),l.jsxs("div",{className:"overflow-hidden rounded-xl border border-border shadow-sm",children:[l.jsx("div",{className:"bg-purple-500 px-4 py-3 text-center text-sm font-bold text-white",children:t.title}),l.jsx("div",{className:"p-4",children:l.jsx("ul",{className:"space-y-2 list-none",children:t.items.map((n,r)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[l.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-purple-500","aria-hidden":!0}),n]},r))})})]})]})}function uQe({term:e,definition:t}){const{t:n}=J("common"),[r,i]=b.useState(!1);return l.jsxs(ce,{variant:"ghost",onClick:()=>i(s=>!s),className:re("group mb-6 cursor-pointer whitespace-normal rounded-2xl border border-border/60 bg-card shadow-sm transition-all duration-300 hover:shadow-lg w-full h-auto p-0 flex-col items-stretch text-left"),"aria-expanded":r,children:[l.jsxs("div",{className:"flex items-center justify-between gap-3 px-5 py-3.5",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2.5 text-[15px] font-bold",children:[l.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg shadow-md transition-transform duration-300 group-hover:scale-110",style:{background:"linear-gradient(135deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))",boxShadow:"0 3px 10px rgba(var(--arthur-primary-rgb), 0.25)"},children:l.jsx(Ci,{className:"h-4 w-4 text-white",strokeWidth:2.25})}),l.jsx("span",{className:"min-w-0 break-words text-institution",children:e})]}),!r&&l.jsx("span",{className:"shrink-0 rounded-full bg-institution/10 px-3 py-1 text-xs font-medium text-institution transition-colors hover:bg-institution/18",children:n("blocks.clickToReveal")})]}),l.jsx("div",{className:re("overflow-hidden transition-all",r?"max-h-[2000px]":"max-h-0"),children:l.jsx("div",{className:"whitespace-normal break-words border-t border-border px-5 py-3.5 text-sm leading-relaxed text-muted-foreground",children:t})})]})}function dQe({items:e}){const{t}=J("common");return l.jsxs("div",{className:"group relative mb-6 overflow-hidden rounded-2xl border border-border/60 bg-card p-5 shadow-sm transition-shadow duration-300 hover:shadow-md",children:[l.jsx("div",{className:"absolute inset-y-0 start-0 w-1.5 rounded-s-2xl",style:{background:"linear-gradient(180deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))"}}),l.jsxs("div",{className:"mb-4 flex items-center gap-2.5 ps-3",children:[l.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg shadow-lg transition-transform duration-300 group-hover:scale-110",style:{background:"linear-gradient(135deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))",boxShadow:"0 4px 12px rgba(var(--arthur-primary-rgb), 0.3)"},children:l.jsx(ki,{className:"h-4 w-4 text-white",strokeWidth:2.5})}),l.jsx("span",{className:"text-sm font-bold tracking-wide text-institution",children:t("blocks.keyTakeaways")})]}),l.jsx("ul",{className:"list-none space-y-2 ps-3",children:e.map((n,r)=>l.jsxs("li",{className:"flex items-start gap-3 py-1 text-sm leading-relaxed text-muted-foreground",children:[l.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-green-500 shadow-sm shadow-emerald-500/20",children:l.jsx(Kn,{className:"h-3 w-3 text-white",strokeWidth:3,"aria-hidden":!0})}),l.jsx("span",{children:n})]},r))})]})}function hQe({title:e,headers:t,rows:n}){return l.jsxs("div",{className:"mb-6 overflow-hidden rounded-xl border border-border shadow-sm",children:[e&&l.jsx("div",{className:"border-b border-border bg-muted/50 px-4 py-2.5 text-sm font-semibold",children:e}),l.jsxs(TR,{className:"min-w-full",children:[l.jsx(ER,{className:"bg-muted/50",children:l.jsx(b4,{children:t.map((r,i)=>l.jsx(NR,{className:"px-4 py-2.5 text-start text-xs font-semibold uppercase tracking-wide text-foreground",children:r},i))})}),l.jsx(jR,{children:n.map((r,i)=>l.jsx(b4,{className:"even:bg-muted/20",children:r.map((s,a)=>l.jsx(AR,{className:"px-4 py-2.5 text-sm text-muted-foreground",children:s},a))},i))})]})]})}function fQe({items:e}){return l.jsxs("div",{className:"relative mb-6 ps-7",children:[l.jsx("div",{className:"absolute start-[11px] top-1 bottom-1 w-0.5 rounded-full",style:{background:"linear-gradient(to bottom, var(--arthur-primary), rgba(var(--arthur-primary-rgb), 0.2))"}}),e.map((t,n)=>l.jsxs("div",{className:"relative mb-5 last:mb-0",children:[l.jsx("div",{className:"absolute -start-[22px] top-[18px] h-2.5 w-2.5 rounded-full border-2 border-white bg-institution shadow-[0_0_0_2px_var(--arthur-primary)]","aria-hidden":!0}),l.jsxs("div",{className:"rounded-xl border border-border bg-card p-3.5 px-4.5 shadow-sm transition-all hover:translate-x-1 hover:shadow-md",children:[l.jsx("div",{className:"mb-1 text-[11px] font-bold uppercase tracking-wide text-institution",children:t.date}),l.jsx("div",{className:"mb-1 text-[15px] font-semibold text-foreground",children:t.title}),l.jsx("div",{className:"text-[13px] leading-relaxed text-muted-foreground",children:t.description})]})]},n))]})}function mQe({items:e}){return l.jsx("div",{className:"mb-6 overflow-hidden rounded-xl border border-border shadow-sm",children:l.jsx(y4,{type:"single",collapsible:!0,className:"bg-card",children:e.map((t,n)=>l.jsxs(CR,{value:`item-${n}`,className:"border-b border-border last:border-b-0",children:[l.jsx(kR,{className:"px-5 py-3.5 text-sm font-semibold text-foreground hover:bg-muted/50",children:t.title}),l.jsx(_R,{className:"bg-muted/30 px-5 py-3.5 text-sm leading-relaxed text-muted-foreground",children:l.jsx(Jx,{content:t.content})})]},n))})})}function pQe({src:e,status:t,alt:n,isError:r,caption:i,onImgError:s}){return t==="failed"||r?null:t==="queued"||!e?l.jsxs("div",{className:"mb-6 flex flex-col items-center justify-center rounded-2xl border border-border/40 bg-muted/30 px-6 py-10",children:[l.jsx("div",{className:"mb-3 flex h-12 w-12 items-center justify-center rounded-xl shadow-md",style:{background:"linear-gradient(135deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))",boxShadow:"0 4px 12px rgba(var(--arthur-primary-rgb), 0.2)"},children:l.jsx(Qo,{className:"h-6 w-6 animate-spin text-white"})}),l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Creating your visual..."}
1655),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground/60",children:"This may take a few moments"})]}):l.jsxs("figure",{className:"group mx-auto mb-6 max-w-md overflow-hidden rounded-2xl border border-border/40 bg-card shadow-sm transition-shadow duration-300 hover:shadow-lg",children:[l.jsxs("div",{className:"relative overflow-hidden",children:[l.jsx("img",{src:e,alt:n,loading:"lazy",onError:s,className:"w-full object-contain"}),l.jsx("div",{className:"absolute inset-0 rounded-t-2xl ring-1 ring-inset ring-black/5"})]}),i&&l.jsxs("figcaption",{className:"flex items-center gap-2 border-t border-border/40 px-5 py-3",children:[l.jsx(Dxe,{className:"h-4 w-4 shrink-0 text-institution"}),l.jsx("span",{className:"text-sm leading-relaxed text-muted-foreground",children:i})]})]})}const gQe=["A","B","C","D"],xQe=/^\s*[(\[]?[A-Da-d][)\].:\-]\s+/;function yQe(e){return e.replace(xQe,"")}function bQe({question:e,options:t,correctIndex:n,explanation:r}){const{t:i}=J("common"),[s,a]=b.useState(null),[o,c]=b.useState(!1),u=()=>{s===null||o||c(!0)},d=o&&s===n,h=f=>o?f===n?"correct":f===s&&s!==n?"incorrect":"idle":s===f?"selected":"idle";return l.jsxs("div",{className:"mb-6 rounded-2xl p-6 transition-shadow duration-300 hover:shadow-md",style:{background:"linear-gradient(135deg, rgba(var(--arthur-primary-rgb), 0.05), rgba(var(--arthur-primary-rgb), 0.02))",border:"2px solid rgba(var(--arthur-primary-rgb), 0.15)"},children:[l.jsxs("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full px-4 py-1.5 text-[11px] font-bold uppercase tracking-widest shadow-sm",style:{background:"linear-gradient(135deg, rgba(var(--arthur-primary-rgb), 0.15), rgba(var(--arthur-primary-rgb), 0.08))",color:"var(--arthur-primary)"},children:[l.jsx("span",{className:"flex h-6 w-6 items-center justify-center rounded-full shadow-sm",style:{background:"linear-gradient(135deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))",boxShadow:"0 2px 8px rgba(var(--arthur-primary-rgb), 0.3)"},children:l.jsx(Fi,{className:"h-3.5 w-3.5 text-white",strokeWidth:2.5})}),i("blocks.knowledgeCheck")]}),l.jsx("p",{className:"mb-4 text-base font-semibold leading-snug text-foreground",children:e}),l.jsx("div",{className:"flex flex-col gap-2.5",children:t.map((f,m)=>{const p=h(m);return l.jsx(Fk,{state:p,optionLabel:gQe[m]??String.fromCharCode(65+m),disabled:o,onClick:()=>!o&&a(m),className:re(!o&&"hover:translate-x-1"),children:yQe(f)},m)})}),!o&&l.jsx(ce,{disabled:s===null,onClick:u,className:"mt-4 rounded-lg px-6 py-2.5 text-sm font-semibold text-white bg-institution",children:i("buttons.checkAnswer")}),o&&l.jsxs("div",{className:re("mt-3.5 flex items-start gap-2.5 rounded-xl p-3.5 text-sm","animate-in fade-in duration-300",d?"border border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-950/40 dark:text-green-200":"border border-red-200 bg-red-50 text-red-800 dark:border-red-800 dark:bg-red-950/40 dark:text-red-200"),children:[d?l.jsx(Kn,{className:"h-5 w-5 shrink-0","aria-hidden":!0}):l.jsx(ar,{className:"h-5 w-5 shrink-0","aria-hidden":!0}),l.jsxs("div",{children:[l.jsx("p",{className:"font-semibold",children:i(d?"blocks.correct":"blocks.notQuite")}),l.jsx("p",{className:"mt-1 leading-relaxed opacity-90",children:r})]})]})]})}const MH=[{bg:"bg-blue-50",border:"border-blue-400",text:"text-blue-700",dot:"bg-blue-500"},{bg:"bg-purple-50",border:"border-purple-400",text:"text-purple-700",dot:"bg-purple-500"},{bg:"bg-amber-50",border:"border-amber-400",text:"text-amber-700",dot:"bg-amber-500"},{bg:"bg-cyan-50",border:"border-cyan-400",text:"text-cyan-700",dot:"bg-cyan-500"},{bg:"bg-rose-50",border:"border-rose-400",text:"text-rose-700",dot:"bg-rose-500"}],vQe=e=>MH[e%MH.length];function RH(e,t){let n=0;for(let s=0;s<t.length;s+=1)n=n*31+t.charCodeAt(s)|0;const r=()=>(n^=n<<13,n^=n>>>17,n^=n<<5,(n>>>0)%1e6/1e6),i=e.slice();for(let s=i.length-1;s>0;s-=1){const a=Math.floor(r()*(s+1));[i[s],i[a]]=[i[a],i[s]]}return i}function wQe({instruction:e,pairs:t,explanation:n}){const{t:r}=J("common"),i=Array.isArray(t)?t:[],s=b.useMemo(()=>i.map(_=>_.term).join("|"),[i]),a=b.useMemo(()=>RH(i.map((_,E)=>({pairIndex:E,text:_.term})),`${s}::L`),[i,s]),o=b.useMemo(()=>RH(i.map((_,E)=>({pairIndex:E,text:_.definition})),`${s}::R`),[i,s]),[c,u]=b.useState(new Map),[d,h]=b.useState(null),[f,m]=b.useState(!1),p=b.useMemo(()=>
1655new Set(Array.from(c.values())),[c]),x=c.size===i.length,v=b.useMemo(()=>{let _=0;return c.forEach((E,A)=>{E===A&&(_+=1)}),_},[c]),g=b.useMemo(()=>Array.from(c.keys()),[c]),y=_=>{if(!f){if(c.has(_)){const E=new Map(c);E.delete(_),u(E),h(null);return}h(_===d?null:_)}},w=_=>{if(f||d===null)return;const E=new Map(c);E.forEach((A,j)=>{A===_&&E.delete(j)}),E.set(d,_),u(E),h(null)},S=()=>{!x||f||m(!0)},C=()=>{u(new Map),h(null),m(!1)},k=(_,E)=>{var P;const A=E==="left",j=A?c.get(_.pairIndex):(P=Array.from(c.entries()).find(([,I])=>I===_.pairIndex))==null?void 0:P[0],D=A?c.has(_.pairIndex):p.has(_.pairIndex),M=D?A?g.indexOf(_.pairIndex):g.indexOf(j):-1,$=D?vQe(M):null,B=A&&d===_.pairIndex,z=f&&D&&j===_.pairIndex,O=f&&D&&j!==_.pairIndex;return l.jsxs(ce,{type:"button",variant:"outline",disabled:f||E==="right"&&d===null&&!D,onClick:()=>A?y(_.pairIndex):w(_.pairIndex),className:re("h-full w-full justify-start whitespace-normal py-3 px-4 text-start text-sm transition-all",B&&"ring-2 ring-primary border-primary bg-primary/5",D&&!B&&!f&&`${$==null?void 0:$.bg} ${$==null?void 0:$.border} ${$==null?void 0:$.text}`,E==="right"&&d!==null&&!D&&!f&&"border-primary/40 bg-primary/5",z&&"border-green-500 bg-green-50 text-green-800 dark:bg-green-950/40 dark:text-green-200",O&&"border-red-500 bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200"),children:[D&&!f&&l.jsx("span",{className:re("me-2 h-3 w-3 shrink-0 rounded-full",$==null?void 0:$.dot),"aria-hidden":!0}),f&&z&&l.jsx(Kn,{className:"me-2 h-4 w-4 shrink-0 text-green-600 dark:text-green-400","aria-hidden":!0}),f&&O&&l.jsx(ar,{className:"me-2 h-4 w-4 shrink-0 text-red-600 dark:text-red-400","aria-hidden":!0}),l.jsx("span",{children:_.text})]})};return i.length===0?null:l.jsxs("div",{className:"mb-6 rounded-2xl p-6 transition-shadow duration-300 hover:shadow-md",style:{background:"linear-gradient(135deg, rgba(var(--arthur-primary-rgb), 0.05), rgba(var(--arthur-primary-rgb), 0.02))",border:"2px solid rgba(var(--arthur-primary-rgb), 0.15)"},children:[l.jsxs("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full px-4 py-1.5 text-[11px] font-bold uppercase tracking-widest shadow-sm",style:{background:"linear-gradient(135deg, rgba(var(--arthur-primary-rgb), 0.15), rgba(var(--arthur-primary-rgb), 0.08))",color:"var(--arthur-primary)"},children:[l.jsx("span",{className:"flex h-6 w-6 items-center justify-center rounded-full shadow-sm",style:{background:"linear-gradient(135deg, var(--arthur-primary), var(--arthur-accent, var(--arthur-primary)))",boxShadow:"0 2px 8px rgba(var(--arthur-primary-rgb), 0.3)"},children:l.jsx(Fi,{className:"h-3.5 w-3.5 text-white",strokeWidth:2.5})}),r("blocks.matchTerms")]}),l.jsx("p",{className:"mb-4 text-base font-semibold leading-snug text-foreground",children:e??r("blocks.matchInstruction")}),l.jsxs("div",{className:"grid grid-cols-2 gap-x-3 gap-y-2 sm:gap-x-6",children:[l.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:r("blocks.terms")}),l.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:r("blocks.definitions")}),Array.from({length:i.length}).map((_,E)=>l.jsxs(Y.Fragment,{children:[k(a[E],"left"),k(o[E],"right")]},`row-${E}`))]}),f?l.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[l.jsxs("div",{className:re("flex items-start gap-2.5 rounded-xl p-3.5 text-sm","animate-in fade-in duration-300",v===i.length?"border border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-950/40 dark:text-green-200":"border border-amber-200 bg-amber-50 text-amber-800 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-200"),children:[v===i.length?l.jsx(Kn,{className:"h-5 w-5 shrink-0","aria-hidden":!0}):l.jsx(ar,{className:"h-5 w-5 shrink-0","aria-hidden":!0}),l.jsxs("div",{children:[l.jsx("p",{className:"font-semibold",children:v===i.length?r("blocks.allCorrect"):r("blocks.matchScore",{correct:v,total:i.length})}),n&&l.jsx("p",{className:"mt-1 leading-relaxed opacity-90",children:n})]})]}),l.jsxs("div",{className:"rounded-xl border border-border p-3.5",children:[l.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:r("blocks.correctAnswers")}),l.jsx("div",{className:"space-y-1.5",children:i.map((_,E)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[l.jsx("span",{className:"font-semibold",children:_.term}),l.jsx(gn,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"text-muted-foreground",children:_.definition})]},E))}),l.jsx(ce,{type:"button",variant:"ghost",onClick:C,className:"mt-3 text-sm",children:r("blocks.tryAgain")})]})]}):l.jsx(ce,{type:"button",disabled:!x,onClick:S,className:"mt-4 rounded-lg bg-institution px-6 py-2.5 text-sm font-semibold text-white",children:r("buttons.checkAnswer")})]})}function ms(e){return e&&typeof e=="object"?e:{}}function Nr(e,t=""){return typeof e=="string"?e:t}function SQe(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}function ly(e){return Array.isArray(e)?e:[]}function hv(e){return ly(e).filter(t=>typeof t=="string")}function OH(e,t){const n=ms(e);return{title:Nr(n.title,t),items:hv(n.items)}}function CQe(e){const t=ms(e);return{left:OH(t.left,""),right:OH(t.right,"")}}function kQe(e){const t=ms(e),n=typeof t.title=="string"?t.title:void 0,r=hv(t.headers),i=ly(t.rows).map(s=>hv(s)).filter(s=>s.length>0||r.length===0);return{title:n,headers:r,rows:i}}function _Qe(e){return ly(ms(e).items).map(t=>{const n=ms(t);return{date:Nr(n.date),title:Nr(n.title),description:Nr(n.description)}})}function TQe(e){const t=ms(e);return{question:Nr(t.question),options:hv(t.options),correctIndex:SQe(t.correctIndex),explanation:Nr(t.explanation)}}function EQe(e){const t=ms(e),n=ly(t.pairs).map(r=>{const i=ms(r);return{term:Nr(i.term),definition:Nr(i.definition)}});return{instruction:Nr(t.instruction),pairs:n,explanation:Nr(t.explanation)}}function jQe(e){const t=ms(e);return{language:Nr(t.language,"plaintext"),title:typeof t.title=="string"?t.title:void 0,code:Nr(t.code)}}function NQe(e){return ly(ms(e).items).map(t=>{const n=ms(t);return{title:Nr(n.title),content:Nr(n.content,Nr(n.body,Nr(n.text)))}})}function AQe(e){return hv(ms(e).items)}function mle(e,t){const n=ms(e),r=ly(n.children).map((i,s)=>mle(i,`${t}-${s}`));return{id:Nr(n.id,t),label:Nr(n.label),description:typeof n.description=="str
1655ing"?n.description:void 0,children:r.length>0?r:void 0}}function MQe(e){const t=ms(e);return{title:Nr(t.title),root:mle(t.root,"root"),steps:Array.isArray(t.steps)?t.steps:void 0}}function RQe(e){const t=ms(e);return{term:Nr(t.term),definition:Nr(t.definition)}}function OQe(e){const t=ms(e);return{title:Nr(t.title),mermaid:Nr(t.mermaid)}}function DQe(e){const t=ms(e);return{src:Nr(t.src),status:typeof t.status=="string"?t.status:void 0,alt:Nr(t.alt),caption:typeof t.caption=="string"?t.caption:void 0}}const LQe="Eve-Education F5/reasoner",PQe=`This lesson content was generated by AI (${LQe}) and may contain mistakes â check anything important.`;function ple(){return l.jsx("p",{className:"block-renderer-ai-generated-disclosure mt-6 text-xs italic text-slate-500 opacity-80",children:PQe})}function gle(e,t){return e.id??`${e.type}-${t}`}function IQe(e){const t=e;return typeof t.content=="string"?t.content:typeof t.body=="string"?t.body:typeof t.text=="string"?t.text:""}function FQe(e,t,n,r,i){const s=gle(e,t);switch(e.type){case"text":return l.jsx(rQe,{content:IQe(e),isReading:n,activeSentenceIndex:r,activeWordIndex:i},s);case"callout":{const a=aQe(e);return l.jsx(oQe,{variant:a.variant,title:a.title,content:a.content,isReading:n,activeSentenceIndex:r,activeWordIndex:i},s)}case"definition":{const a=RQe(e);return l.jsx(uQe,{term:a.term,definition:a.definition},s)}case"diagram":case"guided_diagram":{const a=OQe(e);return l.jsx(Tae,{title:a.title,mermaid:a.mermaid},s)}case"hierarchy_tree":{const a=MQe(e);return l.jsx(Nae,{title:a.title,root:a.root,steps:a.steps},s)}case"comparison":{const a=CQe(e);return l.jsx(cQe,{left:a.left,right:a.right},s)}case"table":{const a=kQe(e);return l.jsx(hQe,{title:a.title,headers:a.headers,rows:a.rows},s)}case"timeline":return l.jsx(fQe,{items:_Qe(e)},s);case"quiz_inline":{const a=TQe(e);return l.jsx(bQe,{question:a.question,options:a.options,correctIndex:a.correctIndex,explanation:a.explanation},s)}case"match":{const a=EQe(e);return l.jsx(wQe,{instruction:a.instruction,pairs:a.pairs,explanation:a.explanation},s)}case"code":{const a=jQe(e);return l.jsx(lQe,{language:a.language,title:a.title,code:a.code},s)}case"accordion":return l.jsx(mQe,{items:NQe(e)},s);case"key_takeaway":return l.jsx(dQe,{items:AQe(e)},s);case"image":{const a=DQe(e);return l.jsx(pQe,{src:a.src,status:a.status,alt:a.alt,isError:!1,caption:a.caption},s)}default:return null}}function BQe({type:e}){return l.jsxs("div",{className:"mb-6 rounded-xl border border-dashed border-amber-300 bg-amber-50/60 px-4 py-3 text-sm text-amber-800",children:["This ",l.jsx("code",{className:"font-mono text-xs",children:e})," block could not be rendered."]})}function xle({blocks:e,activeBlockIndex:t,activeSentenceIndex:n,activeWordIndex:r,renderAiDisclosure:i=!0}){const s=Array.isArray(e)?e:[];return l.jsxs("div",{className:"block-renderer",children:[s.map((a,o)=>{const c=t===o,u=gle(a,o);return l.jsx("div",{children:l.jsx(NO,{fallback:l.jsx(BQe,{type:(a==null?void 0:a.type)??"unknown"}),children:FQe(a,o,c,c?n??null:null,c?r??null:null)})},u)}),i?l.jsx(ple,{}):null]})}const zQe=72,$Qe=240,DH=99;function UQe(e){return e==null?null:typeof e=="number"?!Number.isFinite(e)||e<=0?null:e>DH?`${DH}+`:String(e):e.length>0?e:null}const LH=({item:e,isExpanded:t,isLight:n=!1,onNavigate:r})=>{const i=UQe(e.badge),s=n?"bg-[color:var(--color-edition-pale)] text-[color:var(--color-edition-deeper)]":"bg-white/20 text-white shadow-sm backdrop-blur-sm",a=n?"text-[color:var(--text-body)] hover:bg-[color:var(--color-edition-pale)] hover:text-[color:var(--color-edition-deeper)]":"text-white/80 hover:bg-white/10 hover:text-white",o=n?"bg-[color:var(--color-edition-deeper)]":"bg-white",c=n?"bg-[color:var(--color-edition-pale)] text-[color:var(--color-edition-deeper)]":"bg-white/20 text-white",u=n?"bg-[color:var(--color-edition-deeper)] ring-[color:var(--surface-card)]":"bg-white ring-white/30";return l.jsx(yk,{to:e.href,onClick:r,className:"relative group ds-touch-target flex items-center",title:e.label,"aria-label":e.label,children:({isActive:d})=>l.jsxs("div",{className:`relative h-10 rounded-lg flex items-center transition-colors duration-200 ${t?"px-3 gap-3 w-full":"w-10 justify-center mx-auto"} ${d?s:a}`,children:[d&&t&&l.jsx("span",{"aria-hidden":"true",className:`absolute start-0 top-1/2 -translate-y-1/2 h-5 w-0.5 rounded-full ${o}`}),d&&!t&&l.jsx("span",{"aria-hidden":"true",className:`absolute end-1 top-1 h-1.5 w-1.5 rounded-full ${o}`}),l.jsx("span",{className:"[&>svg]:w-5 [&>svg]:h-5 flex-shrink-0","aria-hidden":"true",children:e.icon}),t&&l.jsx("span",{className:"text-sm font-medium truncate",children:e.label}),t&&i!==null&&l.jsx("span",{"aria-hidden":"true",className:`ms-auto rounded-full px-1.5 py-px text-[10px] font-bold leading-none ${c}`,children:i}),!t&&i!==null&&l.jsx("span",{"aria-hidden":"true",className:`absolute -end-0.5 -top-0.5 h-2 w-2 rounded-full ring-2 ${u}`})]})},e.href)},yle=({navItems:e,sections:t,collapsed:n,onToggleCollapsed:r,mobileOpen:i,onMobileOpenChange:s,institution:a,defaultLogoSrc:o,defaultLogoFilter:c,brandMarkSrc:u,brandSubtitle:d,primaryColor:h="var(--primary-gradient, var(--arthur-primary, #ec4899))",helpRoutes:f=[],bottomSlot:m,variant:p="rail",brandName:x,labels:v})=>{const g=!n,y=p==="light",w=g?$Qe:zQe,S=new Set(f),C=t?t.map(A=>({label:A.label,items:A.items.filter(j=>!S.has(j.href))})):[{label:"",items:(e??[]).filter(A=>!S.has(A.href))}],_=(t?t.flatMap(A=>A.items):e??[]).find(A=>S.has(A.href)),E=()=>{i&&s(!1)};return l.jsxs(l.Fragment,{children:[i&&l.jsx("div",{className:"fixed inset-0 z-40 md:hidden bg-black/50",onClick:()=>s(!1),"aria-hidden":"true"}),l.jsx("aside",{className:` 1656 flex-shrink-0 h-full z-50 1657 transition-all duration-300 ease-in-out rounded-2xl
1658 ${y?"border border-[color:var(--rule)] bg-[color:var(--surface-card)] text-[color:var(--text-strong)]":"border border-white/10 shadow-elevated text-white"} 1659 ${i?"fixed inset-y-3 start-3 translate-x-0 md:relative md:inset-auto":"fixed inset-y-3 start-3 -translate-x-full md:relative md:inset-auto md:translate-x-0"} 1660 `,style:{width:w,background:y?void 0:h},"aria-label":v.ariaLabel,children:l.jsxs("div",{className:"h-full flex flex-col py-5 px-3 items-center relative overflow-y-auto overflow-x-hidden",children:[l.jsxs("div",{className:`mb-5 ${g?`w-full flex items-center gap-1 px-1 overflow-hidden pb-4 border-b ${y?"border-[color:var(--rule)]":"border-white/10"}`:""}`,children:[l.jsx("div",{className:"w-14 h-14 flex items-center justify-center flex-shrink-0",children:l.jsx("img",{src:(a==null?void 0:a.logo)??o,alt:v.logoAlt??"Logo",className:"w-full h-full object-contain",style:!(a!=null&&a.logo)&&c?{filter:c}:void 0})}),g&&y&&(x||d)&&l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[x&&l.jsx("span",{className:"truncate text-[15px] font-semibold tracking-tight text-[color:var(--text-strong)]",children:x}),d&&l.jsx("span",{className:"truncate text-[9px] font-semibold uppercase tracking-[0.18em] text-[color:var(--color-edition-deeper)]",children:d})]}),g&&!y&&(u||d)&&l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[u&&l.jsx("img",{src:u,alt:v.brandMarkAlt??"Brand",className:"object-contain flex-shrink min-w-0
1660w-auto",style:{filter:"brightness(0) invert(1)",height:"2.25rem",maxWidth:"160px"}}),d&&l.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[0.18em] text-white/75 truncate",children:d})]})]}),l.jsx("nav",{"aria-label":v.primaryNavAriaLabel,className:"flex-1 flex flex-col w-full",children:C.map((A,j)=>l.jsxs("div",{className:j>0?"mt-3":void 0,children:[g&&A.label&&l.jsx("div",{className:`px-3 pb-1 pt-1 text-[9px] font-bold uppercase tracking-[0.14em] ${y?"text-[color:var(--text-muted)]":"text-white/55"}`,children:A.label}),l.jsx("div",{className:"flex flex-col gap-0.5",children:A.items.map(D=>l.jsx(LH,{item:D,isExpanded:g,isLight:y,onNavigate:E},D.href))})]},A.label||`section-${j}`))}),g&&m&&l.jsx("div",{className:"mt-3 w-full",children:m}),_&&l.jsx("div",{className:"mt-3 w-full",children:l.jsx(LH,{item:_,isExpanded:g,isLight:y,onNavigate:E})}),l.jsxs(Pn,{onClick:r,className:`mt-3 h-9 rounded-lg flex items-center transition-colors duration-200 ${y?"text-[color:var(--text-muted)] hover:bg-[color:var(--color-edition-pale)] hover:text-[color:var(--color-edition-deeper)]":"text-white/75 hover:bg-white/10 hover:text-white"} ${g?"px-3 gap-3 w-full":"w-10 justify-center mx-auto"}`,"aria-label":g?v.collapseSidebar:v.expandSidebar,title:g?v.collapseSidebar:v.expandSidebar,children:[g?l.jsx(Gxe,{className:"w-4 h-4 flex-shrink-0"}):l.jsx(Wxe,{className:"w-4 h-4 flex-shrink-0"}),g&&l.jsx("span",{className:"text-xs font-medium truncate",children:v.collapseSidebar})]})]})})]})};yle.displayName="Sidebar";const VQe=new Date().getFullYear(),HQe=`© ${VQe} MindHYVE.ai, Inc. All Rights Reserved.`,ble=({copyright:e,className:t})=>l.jsx("footer",{className:re("flex h-9 shrink-0 items-center justify-center border-t border-border bg-background px-6 text-[11px] font-medium text-muted-foreground",t),role:"contentinfo",children:l.jsx("span",{children:e??HQe})});ble.displayName="Footer";const SD=Y.forwardRef(({eyebrow:e,title:t,subtitle:n,description:r,meta:i,tags:s,coverImageUrl:a,coverImageAlt:o,ctaSlot:c,className:u},d)=>l.jsx("section",{ref:d,className:re("relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-soft",u),"aria-labelledby":"course-overview-hero-title",children:l.jsxs("div",{className:"grid gap-6 p-6 sm:p-8 lg:grid-cols-[1.4fr_1fr] lg:gap-10",children:[l.jsxs("div",{className:"min-w-0",children:[e&&l.jsx("div",{className:"mb-3 text-[11px] font-bold uppercase tracking-[0.14em] text-muted-foreground",children:e}),l.jsx("h1",{id:"course-overview-hero-title",className:"text-2xl font-bold leading-tight text-foreground sm:text-3xl",children:t}),n&&l.jsx("p",{className:"mt-2 text-base font-medium text-muted-foreground",children:n}),r&&l.jsx("p",{className:"mt-4 max-w-2xl text-sm leading-relaxed text-foreground/90",children:r}),i&&i.length>0&&l.jsx("dl",{className:"mt-5 flex flex-wrap items-center gap-x-5 gap-y-2 text-sm text-muted-foreground",children:i.map(h=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[h.icon&&l.jsx("span",{"aria-hidden":"true",className:"text-foreground/70",children:h.icon}),l.jsx("dd",{className:"font-medium text-foreground/90",children:h.label})]},h.key))}),s&&s.length>0&&l.jsx("ul",{className:"mt-4 flex flex-wrap gap-2","aria-label":"Tags",children:s.map(h=>l.jsx("li",{className:"rounded-full border border-border bg-muted px-3 py-1 text-xs font-medium text-foreground",children:h.label},h.key))})]}),l.jsxs("div",{className:"flex flex-col gap-4 lg:items-end lg:text-right",children:[a&&l.jsx("div",{className:"w-full overflow-hidden rounded-xl border border-border bg-muted",children:l.jsx("img",{src:a,alt:o??"",className:"aspect-video w-full object-cover",loading:"lazy"})}),c&&l.jsx("div",{className:"flex w-full flex-col items-stretch gap-2 lg:items-end",children:c})]})]})}));SD.displayName="CourseOverviewHero";function vle(e,t){return function(){return e.apply(t,arguments)}}const{toString:qQe}=Object.prototype,{getPrototypeOf:ef}=Object,{iterator:Cw,toStringTag:wle}=Symbol,fv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Sle=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Cle=(e,t,n
1660)=>e===Object.prototype||!n&&t===null,GQe=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Sle(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},mv=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const i=ef(n);if(Cle(n,i,n===e))return!1;if(fv(n,t))return!0;n=i}return!1},WQe=(e,t)=>e!=null&&mv(e,t)?e[t]:void 0,YQe=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=ef(e);if(t===null&&GQe(e))return e;const n=Object.create(null),r=Object.create(null),i=[];let s=e;for(;s!=null&&i.indexOf(s)===-1;){i.push(s);const a=s===e?t:ef(s);if(Cle(s,a,s===e))break;const o=Object.getOwnPropertyNames(s);Object.getOwnPropertySymbols&&o.push(...Object.getOwnPropertySymbols(s));for(const c of o)Sle(c)||fv(r,c)||(n[c]=e[c],r[c]=!0);s=a}return n},CD=(e=>t=>{const n=qQe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),el=e=>(e=e.toLowerCase(),t=>CD(t)===e),Z3=e=>t=>typeof t===e,{isArray:np}=Array,rp=Z3("undefined");function cy(e){return e!==null&&!rp(e)&&e.constructor!==null&&!rp(e.constructor)&&Aa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kle=el("ArrayBuffer");function KQe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kle(e.buffer),t}const XQe=Z3("string"),Aa=Z3("function"),_le=Z3("number"),uy=e=>e!==null&&typeof e=="object",QQe=e=>e===!0||e===!1,_C=e=>{if(!uy(e))return!1;const t=ef(e);return(t===null||t===Object.prototype||ef(t)===null)&&!mv(e,wle)&&!mv(e,Cw)},ZQe=e=>{if(!uy(e)||cy(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},JQe=el("Date"),eZe=el("File"),tZe=e=>!!(e&&typeof e.uri<"u"),nZe=e=>e&&typeof e.getParts<"u",rZe=el("Blob"),iZe=el("FileList"),sZe=el("Set"),aZe=e=>uy(e)&&Aa(e.pipe);function oZe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const PH=oZe(),IH=typeof PH.FormData<"u"?PH.FormData:void 0,lZe=e=>{if(!e)return!1;if(IH&&e instanceof IH)return!0;const t=ef(e);if(!t||t===Object.prototype||!Aa(e.append))return!1;const n=CD(e);return n==="formdata"||n==="object"&&Aa(e.toString)&&e.toString()==="[object FormData]"},cZe=el("URLSearchParams"),[uZe,dZe,hZe,fZe]=["ReadableStream","Request","Response","Headers"].map(el),mZe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function kw(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),np(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(cy(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Tle(e,t){if(cy(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const rm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ele=e=>!rp(e)&&e!==rm;function G7(...e){const{caseless:t,skipUndefined:n}=Ele(this)&&this||{},r={},i=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const o=t&&typeof a=="string"&&Tle(r,a)||a,c=fv(r,o)?r[o]:void 0;_C(c)&&_C(s)?r[o]=G7(c,s):_C(s)?r[o]=G7({},s):np(s)?r[o]=s.slice():(!n||!rp(s))&&(r[o]=s)};for(let s=0,a=e.length;s<a;s++){const o=e[s];if(!o||cy(o)||(kw(o,i),typeof o!="object"||np(o)))continue;const c=Object.getOwnPropertySymbols(o);for(let u=0;u<c.length;u++){const d=c[u];TZe.call(o,d)&&i(o[d],d)}}return r}const pZe=(e,t,n,{allOwnKeys:r}={})=>(kw(t,(i,s)=>{n&&Aa(i)?Object.defineProperty(e,s,{__proto__:null,value:vle(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),gZe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xZe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,
vendor: 8,447 bytes, lines 1660-1662
1660configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},yZe=(e,t,n,r)=>{let i,s,a;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],(!r||r(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=n!==!1&&ef(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bZe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},vZe=e=>{if(!e)return null;if(np(e))return e;let t=e.length;if(!_le(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wZe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ef(Uint8Array)),SZe=(e,t)=>{const r=(e&&e[Cw]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},CZe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kZe=el("HTMLFormElement"),_Ze=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:TZe}=Object.prototype,EZe=el("RegExp"),jle=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};kw(n,(i,s)=>{let a;(a=t(i,s,e))!==!1&&(r[s]=a||i)}),Object.defineProperties(e,r)},jZe=e=>{jle(e,(t,n)=>{if(Aa(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Aa(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},NZe=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return np(e)?r(e):r(String(e).split(t)),n},AZe=()=>{},MZe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function RZe(e){return!!(e&&Aa(e.append)&&e[wle]==="FormData"&&e[Cw])}const OZe=e=>{const t=new WeakSet,n=r=>{if(uy(r)){if(t.has(r))return;if(cy(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(sZe(r)){i=[];for(const s of r){const a=n(s);!rp(a)&&i.push(a)}}else i=np(r)?[]:{},kw(r,(s,a)=>{const o=n(s);!rp(o)&&(i[a]=o)});return t.delete(r),i}}return r};return n(e)},DZe=el("AsyncFunction"),LZe=e=>e&&(uy(e)||Aa(e))&&Aa(e.then)&&Aa(e.catch),Nle=((e,t)=>e?setImmediate:t?((n,r)=>(rm.addEventListener("message",({source:i,data:s})=>{i===rm&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),rm.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Aa(rm.postMessage)),PZe=typeof queueMicrotask<"u"?queueMicrotask.bind(rm):typeof process<"u"&&process.nextTick||Nle,Ale=e=>e!=null&&Aa(e[Cw]),IZe=e=>e!=null&&mv(e,Cw)&&Ale(e),ne={isArray:np,isArrayBuffer:kle,isBuffer:cy,isFormData:lZe,isArrayBufferView:KQe,isString:XQe,isNumber:_le,isBoolean:QQe,isObject:uy,isPlainObject:_C,isEmptyObject:ZQe,isReadableStream:uZe,isRequest:dZe,isResponse:hZe,isHeaders:fZe,isUndefined:rp,isDate:JQe,isFile:eZe,isReactNativeBlob:tZe,isReactNative:nZe,isBlob:rZe,isRegExp:EZe,isFunction:Aa,isStream:aZe,isURLSearchParams:cZe,isTypedArray:wZe,isFileList:iZe,forEach:kw,merge:G7,extend:pZe,trim:mZe,stripBOM:gZe,inherits:xZe,toFlatObject:yZe,kindOf:CD,kindOfTest:el,endsWith:bZe,toArray:vZe,forEachEntry:SZe,matchAll:CZe,isHTMLForm:kZe,hasOwnProperty:fv,hasOwnProp:fv,hasOwnInPrototypeChain:mv,getSafeProp:WQe,toSafeFlatObject:YQe,reduceDescriptors:jle,freezeMethods:jZe,toObjectSet:NZe,toCamelCase:_Ze,noop:AZe,toFiniteNumber:MZe,findKey:Tle,global:rm,isContextDefined:Ele,isSpecCompliantForm:RZe,toJSONObject:OZe,isAsyncFn:DZe,isThenable:LZe,setImmediate:Nle,asap:PZe,isIterable:Ale,isSafeIterable:IZe},FZe=ne.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"]),BZe=e=>{const t={};let n,r,i;return e&&e.split(` 1661`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim();const o=ne.hasOwnProp(t,n);!n||o&&ne.hasOwnProp(FZe,n)||(n==="set-cookie"?o?t[n].push(r):t[n]=[r]:t[n]=o?t[n]+", "+r:r)}),t};function zZe(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const $Ze=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),UZe=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function kD(e,t){return ne.isArray(e)?e.map(n=>kD(n,t)):zZe(String(e).replace(t,""))}const VZe=e=>kD(e,$Ze),HZe=e=>kD(e,UZe);function Mle(e){const t=Object.create(null);return ne.forEach(e.toJSON(),(n,r)=>{t[r]=HZe(n)}),t}const FH=Symbol("internals");function $y(e){return e&&String(e).trim().toLowerCase()}function TC(e){return e===!1||e==null?e:ne.isArray(e)?e.map(TC):VZe(String(e))}function qZe(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}const GZe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ej(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function WZe(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function YZe(e){const t=Object.create(null),n=String(e);let r=0,i=!1,s=!1;function a(o){const c=ej(n.slice(r,o)),u=c.indexOf("=");if(u<1)return;const d=ej(c.slice(0,u));if(!GZe.test(d))return;const h=d.toLowerCase();if(h==="__proto__"||h==="constructor"||h==="prototype")return;const f=ej(c.slice(u+1));t[h]=WZe(f)}for(let o=0;o<n.length;o++){const c=n.charCodeAt(o);i?s?s=!1:c===92?s=!0:c===34&&(i=!1):c===34?i=!0:(c===44||c===59)&&(a(o),r=o+1)}return a(n.length),t}const KZe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tj(e,t,n,r,i){if(ne.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ne.isString(t)){if(ne.isString(r))return t.indexOf(r)!==-1;if(ne.isRegExp(r))return r.test(t)}}function XZe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function QZe(e,t){const n=ne.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,s,a){return this[r].call(this,t,i,s,a)},configurable:!0})})}let Os=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(o,c,u){const d=$y(c);if(!d)return;const h=ne.findKey(i,d);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||c]=TC(o))}const a=(o,c)=>ne.forEach(o,(u,d)=>s(u,d,c));if(ne.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(ne.isString(t)&&(t=t.trim())&&!KZe(t))a(BZe(t),n);else if(ne.isObject(t)&&ne.isSafeIterable(t)){let o=Object.create(null),c,u;for(const d of t){if(!ne.isArray(d))throw new TypeError("Object iterator must return a key-value pair");u=d[0],ne.hasOwnProp(o,u)?(c=o[u],o[u]=ne.isArray(c)?[...c,d[1]]:[c,d[1]]):o[u]=d[1]}a(o,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=$y(t),t){const r=ne.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return qZe(i);if(ne.isFunction(n))return n.call(this,i,r);if(ne.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$y(t),t){const r=ne.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||tj(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(a){if(a=$y(a),a){const o=ne.findKey(r,a);o&&(!n||tj(r,r[o],o,n))&&(delete r[o],i=!0)}}return ne.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||tj(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return ne.forEach(this,(i,s)=>{const a=ne.findKey(r,s);if(a){n[a]=TC(i),delete n[s];return}const o=t?XZe(s):String(s).trim();o!==s&&delete n[s],n[o]=TC(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ne.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ne.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 1662`)}getSetCookie(){const t=this.get("set-cookie");return ne.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return YZe(t)}static concat(t,...n){const r=new this(t);
1662return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[FH]=this[FH]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=$y(a);r[o]||(QZe(i,a),r[o]=!0)}return ne.isArray(t)?t.forEach(s):s(t),this}};Os.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ne.reduceDescriptors(Os.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ne.freezeMethods(Os);const D5="[REDACTED ****]";function ZZe(e){if(ne.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ne.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function JZe(e,t){const n=new Set(t.map(s=>String(s).toLowerCase())),r=[],i=s=>{if(s===null||typeof s!="object"||ne.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof Os&&(s=s.toJSON()),r.push(s);let a;if(ne.isArray(s))a=[],s.forEach((o,c)=>{const u=i(o);ne.isUndefined(u)||(a[c]=u)});else{if(!ne.isPlainObject(s)&&ZZe(s))return r.pop(),s;a=Object.create(null);for(const[o,c]of Object.entries(s)){const u=n.has(o.toLowerCase())?D5:i(c);ne.isUndefined(u)||(a[o]=u)}}return r.pop(),a};return i(e)}function BH(e){try{return String(e)}catch{return""}}function eJe(e){return e.errors.map(n=>{try{return n&&n.message?BH(n.message):BH(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let st=class Rle extends Error{static from(t,n,r,i,s,a){let o=t.message;!o&&ne.isArray(t.errors)&&t.errors.length&&(o=eJe(t));const c=new Rle(o,n||t.code,r,i,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,n,r,i,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,n=t&&ne.hasOwnProp(t,"redact")?t.redact:void 0,r=ne.isArray(n)&&n.length>0?JZe(t,n):ne.toJSONObject(t);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:r,code:this.code,status:this.status}}};st.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";st.ERR_BAD_OPTION="ERR_BAD_OPTION";st.ECONNABORTED="ECONNABORTED";st.ETIMEDOUT="ETIMEDOUT";st.ECONNREFUSED="ECONNREFUSED";st.ERR_NETWORK="ERR_NETWORK";st.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";st.ERR_DEPRECATED="ERR_DEPRECATED";st.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";st.ERR_BAD_REQUEST="ERR_BAD_REQUEST";st.ERR_CANCELED="ERR_CANCELED";st.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";st.ERR_INVALID_URL="ERR_INVALID_URL";st.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const tJe=null,Ole=100;function W7(e){return ne.isPlainObject(e)||ne.isArray(e)}function Dle(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function nj(e,t,n){return e?e.concat(t).map(function(i,s){return i=Dle(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function nJe(e){return ne.isArray(e)&&!e.some(W7)}const rJe=ne.toFlatObject(ne,{},null,function(t){return/^is[A-Z]/.test(t)});function J3(e,t,n){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(y,w)=>{const S=ne.getSafeProp(n,y);return ne.isUndefined(S)?w:S},i=r("metaTokens",!0),s=r("visitor")||x,a=r("dots",!1),o=r("indexes",!1),c=r("Blob")||typeof Blob<"u"&&Blob,u=r("maxDepth",Ole),d=c&&ne.isSpecCompliantForm(t),h=[];if(!ne.isFunction(s))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if(ne.isDate(y))return y.toISOString();if(ne.isBoolean(y))return y.toString();if(!d&&ne.isBlob(y))throw new st("Blob is not supported. Use a Buffer instead.");if(ne.isArrayBuffer(y)||ne.isTypedArray(y)){if(d&&typeof c=="function")return new c([y]);throw new st("Blob is not supported. Use a Buffer instead.",st.ERR_NOT_SUPPORT)}return y}function m(y){if(y>u)throw new st("Object is too deeply nested ("+y+" levels). Max depth: "+u,st.E
1662RR_FORM_DATA_DEPTH_EXCEEDED)}function p(y,w){if(u===1/0)return JSON.stringify(y);const S=[];return JSON.stringify(y,function(k,_){if(!ne.isObject(_))return _;for(;S.length&&S[S.length-1]!==this;)S.pop();return S.push(_),m(w+S.length-1),_})}function x(y,w,S){let C=y;if(ne.isReactNative(t)&&ne.isReactNativeBlob(y))return t.append(nj(S,w,a),f(y)),!1;if(y&&!S&&typeof y=="object"){if(ne.endsWith(w,"{}"))w=i?w:w.slice(0,-2),y=p(y,1);else if(ne.isArray(y)&&nJe(y)||(ne.isFileList(y)||ne.endsWith(w,"[]"))&&(C=ne.toArray(y)))return w=Dle(w),C.forEach(function(_,E){!(ne.isUndefined(_)||_===null)&&t.append(o===!0?nj([w],E,a):o===null?w:w+"[]",f(_))}),!1}return W7(y)?!0:(t.append(nj(S,w,a),f(y)),!1)}const v=Object.assign(rJe,{defaultVisitor:x,convertValue:f,isVisitable:W7});function g(y,w,S=0){if(!ne.isUndefined(y)){if(m(S),h.indexOf(y)!==-1)throw new Error("Circular reference detected in "+w.join("."));h.push(y),ne.forEach(y,function(k,_){(!(ne.isUndefined(k)||k===null)&&s.call(t,k,ne.isString(_)?_.trim():_,w,v))===!0&&g(k,w?w.concat(_):[_],S+1)}),h.pop()}}if(!ne.isObject(e))throw new TypeError("data must be an object");return g(e),t}function zH(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function _D(e,t){this._pairs=[],e&&J3(e,this,t)}const Lle=_D.prototype;Lle.append=function(t,n){this._pairs.push([t,n])};Lle.toString=function(t){const n=t?r=>t.call(this,r,zH):zH;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function iJe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ple(e,t,n){if(!t)return e;e=e||"";const r=ne.isFunction(n)?{serialize:n}:n,i=ne.getSafeProp(r,"encode")||iJe,s=ne.getSafeProp(r,"serialize");let a;if(s?a=s(t,r):a=ne.isURLSearchParams(t)?t.toString():new _D(t,r).toString(i),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}const Uy=Symbol("internals");function Ile(e){return e?e.length:0}function $H(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Vy(e,t){const n=e.handlers,r=Ile(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(s,a){n[s.index]!==s.handler&&t.handlerEntries.delete(a)}):t.handlerEntries.clear()),t.handlersLength=r}class UH{constructor(){this.handlers=[],this[Uy]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const i={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},s=this[Uy];this.handlers==null&&(this.handlers=[]),Vy(this,s);const a=s.nextId++;return this.handlers.push(i),s.handlerEntries.set(a,{handler:i,index:this.handlers.length-1}),s.handlersLength=this.handlers.length,a}eject(t){const n=this[Uy];Vy(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||($H(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Vy(this,this[Uy]))}forEach(t){const n=this[Uy];Vy(this,n),n.iterationDepth++;try{ne.forEach(this.handlers,function(i){i!==null&&t(i)})}finally{--n.iterationDepth||(Vy(this,n),$H(this.handlers),n.handlersLength=Ile(this.handlers))}}}const TD={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},sJe=typeof URLSearchParams<"u"?URLSearchParams:_D,aJe=typeof FormData<"u"?FormData:null,oJe=typeof Blob<"u"?Blob:null,lJe={isBrowser:!0,classes:{URLSearchParams:sJe,FormData:aJe,Blob:oJe},protocols:["http","https","file","blob","url","data"]},ED=typeof window<"u"&&typeof document<"u",Y7=typeof navigator=="object"&&navigator||void 0,cJe=ED&&(!Y7||["ReactNative","NativeScript","NS"].indexOf(Y7.product)<0),uJe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dJe=ED&&window.location.href||"http://localhost",hJe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ED,hasStandardBrowserEnv:cJe,hasStandardBrowserWebWorkerEnv:uJe,navigator:Y7,origin:dJe},Symbol.toStringTag,{value:"Module"})),es={...hJe,...lJe};function fJe(e,t){return J3(e,new es.classes.URLSearchParams,{visitor:function(n,r,i,s){return es.isNode&&ne.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const VH=Ole;function Fle(e){if(e>VH)throw new st("FormData field is too deeply nested ("+e+" levels). Max depth: "+VH,st.ERR_FORM_DATA_DEPTH_EXCEEDED)}function mJe(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Fle(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function pJe(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Ble(e){function t(n,r,i,s){Fle(s);let a=n[s++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),c=s>=n.length;return a=!a&&ne.isArray(i)?i.length:a,c?(ne.hasOwnProp(i,a)?i[a]=ne.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!o):((!ne.hasOwnProp(i,a)||!ne.isObject(i[a]))&&
vendor: 12,841 bytes, line 1662
1662(i[a]=[]),t(n,r,i[a],s)&&ne.isArray(i[a])&&(i[a]=pJe(i[a])),!o)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const n={};return ne.forEachEntry(e,(r,i)=>{t(mJe(r),i,n,0)}),n}return null}const zle=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),qp=(e,t)=>e!=null&&ne.hasOwnProp(e,t)?e[t]:void 0;function gJe(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _w={transitional:TD,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ne.isObject(t);if(s&&ne.isHTMLForm(t)&&(t=new FormData(t)),ne.isFormData(t))return i?JSON.stringify(Ble(t)):t;if(ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t)||ne.isReadableStream(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){const c=qp(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return fJe(t,c).toString();if((o=ne.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=qp(this,"env"),d=u&&u.FormData;return J3(o?{"files[]":t}:t,d&&new d,c)}}return s||i?(n.setContentType("application/json",!1),gJe(t)):t}],transformResponse:[function(t){const n=qp(this,"transitional")||_w.transitional,r=n&&n.forcedJSONParsing,i=qp(this,"responseType"),s=i==="json";if(ne.isResponse(t)||ne.isReadableStream(t))return t;if(t&&ne.isString(t)&&(r&&!i||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,qp(this,"parseReviver"))}catch(c){if(o)throw c.name==="SyntaxError"?st.from(c,st.ERR_BAD_RESPONSE,this,null,qp(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:es.classes.FormData,Blob:es.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(zle,e=>{_w.headers[e]={}});function rj(e,t){const n=this||_w,r=t||n,i=Os.from(r.headers);let s=r.data;return ne.forEach(e,function(o){s=o.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function $le(e){return!!(e&&e.__CANCEL__)}let Tw=class extends st{constructor(t,n,r){super(t??"canceled",st.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ule(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new st("Request failed with status code "+n.status,n.status>=400&&n.status<500?st.ERR_BAD_REQUEST:st.ERR_BAD_RESPONSE,n.config,n.request,n))}const xJe=/[\t\n\r]/g;function Vle(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(xJe,"")}function ij(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function yJe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[s];a||(a=u),n[i]=c,r[i]=u;let h=s,f=0;for(;h!==i;)f+=n[h++],h=h%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-a<t)return;const m=d&&u-d;return m?Math.round(f*1e3/m):void 0}}function bJe(e,t){let n=0,r=1e3/t,i,s;const a=(d,h=Date.now())=>{n=h,i=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const h=Date.now(),f=h-n;f>=r?a(d,h):(i=d,s||(s=setTimeout(()=>{s=null,a(i)},r-f)))},()=>i&&a(i),(...d)=>a(d)]}const L5=(e,t,n=3)=>{let r=0;const i=yJe(50,250);return bJe(s=>{if(!s||!ne.isNumber(s.loaded))return;const a=s.loaded,o=s.lengthComputable?s.total:void 0,c=Math.max(0,o!=null?Math.min(a,o):a),u=Math.max(0,c-r),d=i(u);r=Math.max(r,c);const h={loaded:c,total:o,progress:o?c/o:void 0,bytes:u,rate:d||void 0,estimated:d&&o?(o-c)/d:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(h)},n)},HH=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qH=(e,t=ne.asap)=>(...n)=>t(()=>e(...n)),vJe=es.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,es.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(es.origin),es.navigator&&/(msie|trident)/i.test(es.navigator.userAgent)):()=>!0,wJe=es.hasStandardBrowserEnv?{write(e,t,n,r,i,s,a){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];ne.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),ne.isString(r)&&o.push(`path=${r}`),ne.isString(i)&&o.push(`domain=${i}`),s===!0&&o.push("secure"),ne.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function SJe(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function CJe(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const kJe=/^https?:(?!\/\/)/i;function _Je(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${D5}`)}function TJe(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${D5}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${D5}`);return n===-1?i:`${i}#${_Je(t.slice(n+1))}`}function GH(e,t){if(typeof e=="string"){const n=Vle(e);if(kJe.test(n))throw new st(`Invalid URL ${JSON.stringify(TJe(n))}: missing "//" after protocol`,st.ERR_INVALID_URL,t)}}function Hle(e,t,n,r){GH(t,r);let i=!SJe(t);return e&&(i||n===!1)?(GH(e,r),CJe(e,t)):t}const WH=e=>e instanceof Os?{...e}:e,EJe=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ip(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,h,f,m){return ne.isPlainObject(d)&&ne.isPlainObject(h)?ne.merge.call({caseless:m},d,h):ne.isPlainObject(h)?ne.merge({},h):ne.isArray(h)?h.slice():h}function i(d,h,f,m){if(ne.isUndefined(h)){if(!ne.isUndefined(d))return r(void 0,d,f,m)}else return r(d,h,f,m)}function s(d,h){if(!ne.isUndefined(h))return r(void 0,h)}function a(d,h){if(ne.isUndefined(h)){if(!ne.isUndefined(d))return r(void 0,d)}else return r(void 0,h)}function o(d){const h=ne.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ne.isUndefined(h))if(ne.isPlainObject(h)){if(ne.hasOwnProp(h,d))return h[d]}else return;const f=ne.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ne.isPlainObject(f)&&ne.hasOwnProp(f,d))return f[d]}function c(d,h,f){if(ne.hasOwnProp(t,f))return r(d,h);if(ne.hasOwnProp(e,f))return r(void 0,d)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutErrorMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(d,h,f)=>i(WH(d),WH(h),f,!0)};return ne.forEach(EJe({...e,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const f=ne.hasOwnProp(u,h)?u[h]:i,m=ne.hasOwnProp(e,h)?e[h]:void 0,p=ne.hasOwnProp(t,h)?t[h]:void 0,x=f(m,p,h);ne.isUndefined(x)&&f!==c||(n[h]=x)}),ne.hasOwnProp(t,"validateStatus")&&ne.isUndefined(t.validateStatus)&&o("validateStatusUndefinedResolves")===!1&&(ne.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const jJe=["content-type","content-length"];function NJe(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{jJe.includes(r.toLowerCase())&&e.set(r,i)})}const AJe=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function qle(e){const t=ip({},e),n=f=>ne.hasOwnProp(t,f)?t[f]:void 0,r=n("data");let i=n("withXSRFToken");const s=n("xsrfHeaderName"),a=n("xsrfCookieName");let o=n("headers");const c=n("auth"),u=n("baseURL"),d=n("allowAbsoluteUrls"),h=n("url");if(t.headers=o=Os.from(o),t.url=Ple(Hle(u,h,d,t),n("params"),n("paramsSerializer")),c){const f=ne.getSafeProp(c,"username")||"",m=ne.getSafeProp(c,"password")||"";try{o.set("Authorization","Basic "+btoa(f+":"+(m?AJe(m):"")))}catch(p){throw st.from(p,st.ERR_BAD_OPTION_VALUE,e)}}if(ne.isFormData(r)){const f=ne.getSafeProp(r,"getHeaders");es.hasStandardBrowserEnv||es.hasStandardBrowserWebWorkerEnv||ne.isReactNative(r)?o.setContentType(void 0):ne.isFunction(f)&&NJe(o,f.call(r),n("formDataHeaderPolicy"))}if(es.hasStandardBrowserEnv&&(ne.isFunction(i)&&(i=i(t)),i===!0||i==null&&vJe(t.url))){const m=s&&a&&wJe.read(a);m&&o.set(s,m)}return t}const MJe=typeof XMLHttpRequest<"u",RJe=MJe&&function(e){return new Promise(function(n,r){const i=qle(e);let s=i.data;const a=Os.from(i.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:u}=i,d,h,f,m,p,x;function v(){m&&m(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function y(S){if(!g)return;if(g.status===0&&(ij(Vle(i.url))||ij(es.origin))!=="file"&&!(g.responseURL&&g.responseURL.startsWith("file:"))){r(new st("Request aborted",st.ECONNABORTED,e,g)),v(),g=null;return}try{S?x&&x(S):p&&p()}catch(E){setTimeout(()=>{throw E})}if(!g)return;const C=Os.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:C,config:e,request:g};Ule(function(A){n(A),v()},function(A){r(A),v()},_),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.startsWith("file:"))||setTimeout(y)},g.onabort=function(){g&&(r(new st("Request aborted",st.ECONNABORTED,e,g)),v(),g=null)},g.onerror=function(C){const k=C&&C.message?C.message:"Network Error",_=new st(k,st.ERR_NETWORK,e,g);_.event=C||null,r(_),v(),g=null},g.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||TD;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new st(C,k.clarifyTimeoutError?st.ETIMEDOUT:st.ECONNABORTED,e,g)),v(),g=null},s===void 0&&a.setContentType(null),"setRequestHeader"in g&&ne.forEach(Mle(a),function(C,k){g.setRequestHeader(k,C)}),ne.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),o&&o!=="json"&&(g.responseType=i.responseType),u&&([f,p,x]=L5(u,!0),g.addEventListener("progress",f)),c&&g.upload&&([h,m]=L5(c),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(d=S=>{g&&(r(!S||S.type?new Tw(null,e,g):S),g.abort(),v(),g=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const w=ij(i.url);if(w&&!es.protocols.includes(w)){r(new st("Unsupported protocol "+w+":",st.ERR_BAD_REQUEST,e)),v();return}g.send(s||null)})},OJe=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(c){if(!r){r=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof st?u:new Tw(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,i(new st(`timeout of ${t}ms exceeded`,st.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>{if(!r){if(c.aborted){i.call(c);return}c.addEventListener("abort",i,{once:!0})}});const{signal:o}=n;return o.unsubscribe=()=>ne.asap(a),o},DJe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},LJe=async function*(e,t){for await(const n of PJe(e))yield*DJe(n,t)},PJe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},YH=(e,t,n,r)=>{const i=LJe(e,t);let s=0,a,o=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){o(),c.close();return}let h=d.byteLength;if(n){let f=s+=h;n(f)}c.enqueue(new Uint8Array(d))}catch(u){throw o(u),u}},cancel(c){return o(c),i.return()}},{highWaterMark:2})},KH=e=>e>=48&&e<=57||e>=65&&e<=70||e>
1662=97&&e<=102,Gle=(e,t,n)=>t+2<n&&KH(e.charCodeAt(t+1))&&KH(e.charCodeAt(t+2)),XH=e=>e<=57?e-48:(e&223)-55,IJe=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,FJe=e=>e===9||e===10||e===12||e===13||e===32,BJe=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},zJe=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},$Je=e=>{const t=e.length;let n=0,r=0,i=!1;for(let s=0;s<t;s++){let a=e.charCodeAt(s);if(a===37&&Gle(e,s,t)&&(a=XH(e.charCodeAt(s+1))*16+XH(e.charCodeAt(s+2)),s+=2),!FJe(a)){if(a===61){r++;continue}if(!IJe(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?zJe(e):BJe(n)},UJe=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let o=0,c=i.length;o<c;o++){const u=i.charCodeAt(o);if(u===37&&Gle(i,o,c))a+=1,o+=2;else if(u<128)a+=1;else if(u<2048)a+=2;else if(u>=55296&&u<=56319&&o+1<c){const d=i.charCodeAt(o+1);d>=56320&&d<=57343?(a+=4,o++):a+=3}else a+=3}return a};function VJe(e){const t=typeof e=="string"?e.indexOf("#"):-1;return UJe(t===-1?e:e.slice(0,t),$Je)}const jD="1.20.0",QH=64*1024,HJe={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:mS}=ne,qJe=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),ZH=e=>{if(!ne.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},JH=(e,...t)=>{try{return!!e(...t)}catch{return!1}},GJe=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},WJe=e=>{const t=ne.global!==void 0&&ne.global!==null?ne.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ne.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:s,Response:a}=e,o=i?mS(i):typeof fetch=="function",c=mS(s),u=mS(a);if(!o)return!1;const d=o&&mS(n),h=o&&(typeof r=="function"?(g=>y=>g.encode(y))(new r):async g=>new Uint8Array(await new s(g).arrayBuffer())),f=c&&d&&JH(()=>{let g=!1;const y=new s(es.origin,{body:new n,method:"POST",get duplex(){return g=!0,"half"}}),w=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),g&&!w}),m=u&&d&&JH(()=>ne.isReadableStream(new a("").body)),p={stream:m&&(g=>g.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!p[g]&&(p[g]=(y,w)=>{let S=y&&y[g];if(S)return S.call(y);throw new st(`Response type '${g}' is not supported`,st.ERR_NOT_SUPPORT,w)})});const x=async g=>{if(g==null)return 0;if(ne.isBlob(g))return g.size;if(ne.isSpecCompliantForm(g))return(await new s(es.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ne.isArrayBufferView(g)||ne.isArrayBuffer(g))return g.byteLength;if(ne.isURLSearchParams(g)&&(g=g+""),ne.isString(g))return(await h(g)).byteLength},v=async(g,y)=>{const w=ne.toFiniteNumber(g.getContentLength());return w??x(y)};return async g=>{let{url:y,method:w,data:S,signal:C,cancelToken:k,timeout:_,onDownloadProgress:E,onUploadProgress:A,responseType:j,headers:D,withCredentials:M="same-origin",fetchOptions:$,maxContentLength:B,maxBodyLength:z,maxRedirects:O}=qle(g);const P=ne.isNumber(B)&&B>-1,I=ne.isNumber(z)&&z>-1,q=ve=>ne.hasOwnProp(g,ve)?g[ve]:void 0;let R=i||fetch;j=j?(j+"").toLowerCase():"text";let xe=OJe([C,k&&k.toAbortSignal()],_),me=null;const U=xe&&xe.unsubscribe&&(()=>{xe.unsubscribe()});let ae,Ce=null;const je=()=>new st("Request body larger than maxBodyLength limit",st.ERR_BAD_REQUEST,g,me);try{let ve;const Te=q("auth");if(Te){const Pe=ne.getSafeProp(Te,"username")||"",ct=ne.getSafeProp(Te,"password")||"";ve={username:Pe,password:ct}}if(GJe(y)){const Pe=new URL(y,es.origin);if(!ve&&(Pe.username||Pe.password)){const ct=ZH(Pe.username),Tn=ZH(Pe.password);ve={username:ct,password:Tn}}(Pe.username||Pe.password)&&(Pe.username="",Pe.password="",y=Pe.href)}if(ve&&(D.delete("authorization"),D.set("Authorization","Basic "+btoa(qJe((ve.username||"")+":"+(ve.password||""))))),P&&typeof y=="string"&&y.startsWith("data:")&&VJe(y)>B)throw new st("maxContentLength size of "+B+" exceeded",st.ERR_BAD_RESPONSE,g,me);if(I&&w!=="get"&&w!=="head"){const Pe=await x(S);if(typeof Pe=="number"&&isFinite(Pe)&&(ae=Pe,Pe>z))throw je()}
vendor: 4,286 bytes, lines 1662-1664
1662const Se=I&&(ne.isReadableStream(S)||ne.isStream(S)),He=(Pe,ct,Tn)=>YH(Pe,QH,Nn=>{if(I&&Nn>z)throw Ce=je();ct&&ct(Nn)},Tn);if(f&&w!=="get"&&w!=="head"&&(A||Se)){if(ae=ae??await v(D,S),ae!==0||Se){let Pe=new s(y,{method:"POST",body:S,duplex:"half"}),ct;if(ne.isFormData(S)&&(ct=Pe.headers.get("content-type"))&&D.setContentType(ct),Pe.body){const[Tn,Nn]=A&&HH(ae,L5(qH(A)))||[];S=He(Pe.body,Tn,Nn)}}}else if(Se&&!c&&d&&w!=="get"&&w!=="head")S=He(S);else if(Se&&c&&!f&&w!=="get"&&w!=="head")throw new st("Stream request bodies are not supported by the current fetch implementation",st.ERR_NOT_SUPPORT,g,me);ne.isString(M)||(M=M?"include":"omit");const tt=c&&"credentials"in s.prototype;if(ne.isFormData(S)){const Pe=D.getContentType();Pe&&/^multipart\/form-data/i.test(Pe)&&!/boundary=/i.test(Pe)&&D.delete("content-type")}D.set("User-Agent","axios/"+jD,!1);const we=$==null?$:Object.assign(Object.create(null),$);we&&(delete we.body,delete we.headers,delete we.method,delete we.signal,delete we.duplex,delete we.credentials);const Oe=Object.assign(Object.create(null),we,{signal:xe,method:w.toUpperCase(),headers:Mle(D.normalize()),body:S,duplex:"half",credentials:tt?M:void 0});c&&(ne.forEach(HJe,(Pe,ct)=>{Oe[ct]===void 0&&(Oe[ct]=Pe)}),Oe.signal===void 0&&(Oe.signal=null),Oe.body===void 0&&(Oe.body=null)),O===0&&(Oe.redirect="manual",we&&(we.redirect="manual")),me=c&&new s(y,Oe);let Je=await(c?R(me,we):R(y,Oe));const It=Os.from(Je.headers);if(P){const Pe=ne.toFiniteNumber(It.getContentLength());if(Pe!=null&&Pe>B)throw new st("maxContentLength size of "+B+" exceeded",st.ERR_BAD_RESPONSE,g,me)}const mt=m&&(j==="stream"||j==="response");if(m&&Je.body&&(E||P||mt&&U)){const Pe={};["status","statusText","headers"].forEach(Sn=>{Pe[Sn]=Je[Sn]});const ct=ne.toFiniteNumber(It.getContentLength()),[Tn,Nn]=E&&HH(ct,L5(qH(E),!0))||[];let ln=0;const Bn=Sn=>{if(P&&(ln=Sn,ln>B))throw new st("maxContentLength size of "+B+" exceeded",st.ERR_BAD_RESPONSE,g,me);Tn&&Tn(Sn)};Je=new a(YH(Je.body,QH,Bn,()=>{Nn&&Nn(),U&&U()}),Pe)}j=j||"text";let De=await p[ne.findKey(p,j)||"text"](Je,g);if(P&&!m&&!mt){let Pe;if(De!=null&&(typeof De.byteLength=="number"?Pe=De.byteLength:typeof De.size=="number"?Pe=De.size:typeof De=="string"&&(Pe=typeof r=="function"?new r().encode(De).byteLength:De.length)),typeof Pe=="number"&&Pe>B)throw new st("maxContentLength size of "+B+" exceeded",st.ERR_BAD_RESPONSE,g,me)}return!mt&&U&&U(),await new Promise((Pe,ct)=>{Ule(Pe,ct,{data:De,headers:Os.from(Je.headers),status:Je.status,statusText:Je.statusText,config:g,request:me})})}catch(ve){if(U&&U(),xe&&xe.aborted&&xe.reason instanceof st){const Te=xe.reason;throw Te.config=g,me&&(Te.request=me),ve!==Te&&Object.defineProperty(Te,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),Te}if(Ce)throw me&&!Ce.request&&(Ce.request=me),Ce;if(ve instanceof st)throw me&&!ve.request&&(ve.request=me),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){const Te=new st("Network Error",st.ERR_NETWORK,g,me,ve&&ve.response);throw Object.defineProperty(Te,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),Te}throw st.from(ve,ve&&ve.code,g,me,ve&&ve.response)}}},YJe=new Map,Wle=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let a=s.length,o=a,c,u,d=YJe;for(;o--;)c=s[o],u=d.get(c),u===void 0&&d.set(c,u=o?new Map:WJe(t)),d=u;return u};Wle();const ND={http:tJe,xhr:RJe,fetch:{get:Wle}};ne.forEach(ND,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const eq=e=>`- ${e}`,KJe=e=>ne.isFunction(e)||e===null||e===!1;function XJe(e,t){e=ne.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let a=0;a<n;a++){r=e[a];let o;if(i=r,!KJe(r)&&(i=ND[(o=String(r)).toLowerCase()],i===void 0))throw new st(`Unknown adapter '${o}'`);if(i&&(ne.isFunction(i)||(i=i.get(t))))break;s[o||"#"+a]=i}if(!i){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=n?a.length>1?`since : 1663`+a.map(eq).join(` 1664`):" "+eq(a[0]):"as no adapter specified";throw new st("There is no suitable adapter to dispatch the request "+o,st.ERR_NOT_SUPPORT)}return i}
vendor: 5,528 bytes, lines 1664-1668
1664const Yle={getAdapter:XJe,adapters:ND};function sj(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Tw(null,e)}function aj(e){const t=ne.toSafeFlatObject(e);return sj(t),t.headers=Os.from(ne.getSafeProp(t,"headers")),t.data=rj.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yle.getAdapter(t.adapter||_w.adapter,t)(t).then(function(i){sj(t),t.response=i;try{i.data=rj.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=Os.from(i.headers),i},function(i){if(!$le(i)&&(sj(t),i&&i.response)){t.response=i.response;try{i.response.data=rj.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=Os.from(i.response.headers)}return Promise.reject(i)})}const e_={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e_[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const tq={};e_.transitional=function(t,n,r){function i(s,a){return"[Axios v"+jD+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,o)=>{if(t===!1)throw new st(i(a," has been removed"+(n?" in "+n:"")),st.ERR_DEPRECATED);return n&&!tq[a]&&(tq[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,o):!0}};e_.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function QJe(e,t,n){if(typeof e!="object"||e===null)throw new st("options must be an object",st.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const o=e[s],c=o===void 0||a(o,s,e);if(c!==!0)throw new st("option "+s+" must be "+c,st.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new st("Unknown option "+s,st.ERR_BAD_OPTION)}}const EC={assertOptions:QJe,validators:e_},bs=EC.validators;let _m=class{constructor(t){this.defaults=t||{},this.interceptors={request:new UH,response:new UH}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack;let a="";if(typeof s=="string"){const o=s.indexOf(` 1665`);a=o===-1?"":s.slice(o+1)}if(!r.stack)r.stack=a;else if(a){const o=a.indexOf(` 1666`),c=o===-1?-1:a.indexOf(` 1667`,o+1),u=c===-1?"":a.slice(c+1);String(r.stack).endsWith(u)||(r.stack+=` 1668`+a)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ip(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&EC.assertOptions(r,{silentJSONParsing:bs.transitional(bs.boolean),forcedJSONParsing:bs.transitional(bs.boolean),clarifyTimeoutError:bs.transitional(bs.boolean),legacyInterceptorReqResOrdering:bs.transitional(bs.boolean),advertiseZstdAcceptEncoding:bs.transitional(bs.boolean),validateStatusUndefinedResolves:bs.transitional(bs.boolean)},!1),i!=null&&(ne.isFunction(i)?n.paramsSerializer={serialize:i}:EC.assertOptions(i,{encode:bs.function,serialize:bs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),EC.assertOptions(n,{baseUrl:bs.spelling("baseURL"),withXsrfToken:bs.spelling("withXSRFToken")},!0),n.method=(ne.getSafeProp(n,"method")||ne.getSafeProp(this.defaults,"method")||"get").toLowerCase();let a=s&&ne.merge(s.common,s[n.method]);s&&ne.forEach(zle.concat("common"),p=>{delete s[p]}),n.headers=Os.concat(a,s);const o=[];let c=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;c=c&&x.synchronous;const v=n.transitional||TD;v&&v.legacyInterceptorReqResOrdering?o.unshift(x.fulfilled,x.rejected):o.push(x.fulfilled,x.rejected)});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let d,h=0,f;if(!c){const p=[aj.bind(this),void 0];for(p.unshift(...o),p.push(...u),f=p.length,d=Promise.resolve(n);h<f;)d=d.then(p[h++],p[h++]);return d}f=o.length;let m=n;for(;h<f;){const p=o[h++],x=o[h++];try{m=p?p(m):m}catch(v){if(!x){d=Promise.reject(v);break}try{const g=x.call(this,v);ne.isThenable(g)&&(d=Promise.resolve(g).then(()=>aj.call(this,m)))}catch(g){d=Promise.reject(g)}break}}if(!d)try{d=aj.call(this,m)}catch(p){d=Promise.reject(p)}for(h=0,f=u.length;h<f;)d=d.then(u[h++],u[h++]);return d}getUri(t){t=ip(this.defaults,t);const n=Hle(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ple(n,t.params,t.paramsSerializer)}};ne.forEach(["delete","get","head","options"],function(t){_m.prototype[t]=function(n,r){return this.request(ip(r||{},{method:t,url:n,data:r&&ne.hasOwnProp(r,"data")?r.data:void 0}))}});ne.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,a,o){return this.request(ip(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}_m.prototype[t]=n(),t!=="query"&&(_m.prototype[t+"Form"]=n(!0))});let ZJe=class Kle{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,o){r.reason||(r.reason=new Tw(s,a,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
1668subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Kle(function(i){t=i}),cancel:t}}};function JJe(e){return function(n){return e.apply(null,n)}}function eet(e){return ne.isObject(e)&&e.isAxiosError===!0}const jC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent: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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jC).forEach(([e,t])=>{jC[t]===void 0&&(jC[t]=e)});function Xle(e){const t=new _m(e),n=vle(_m.prototype.request,t);return ne.extend(n,_m.prototype,t,{allOwnKeys:!0}),ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Xle(ip(e,i))},n}const Mr=Xle(_w);Mr.Axios=_m;Mr.CanceledError=Tw;Mr.CancelToken=ZJe;Mr.isCancel=$le;Mr.VERSION=jD;Mr.toFormData=J3;Mr.AxiosError=st;Mr.Cancel=Mr.CanceledError;Mr.all=function(t){return Promise.all(t)};Mr.spread=JJe;Mr.isAxiosError=eet;Mr.mergeConfig=ip;Mr.AxiosHeaders=Os;Mr.formToJSON=e=>Ble(ne.isHTMLForm(e)?new FormData(e):e);Mr.getAdapter=Yle.getAdapter;Mr.HttpStatusCode=jC;Mr.default=Mr;const{Axios:S0t,AxiosError:AD,CanceledError:C0t,isCancel:k0t,CancelToken:_0t,VERSION:T0t,all:E0t,Cancel:j0t,isAxiosError:MD,spread:N0t,toFormData:A0t,AxiosHeaders:M0t,HttpStatusCode:R0t,formToJSON:O0t,getAdapter:D0t,mergeConfig:L0t,create:P0t}=Mr,ea={ACCESS:"ple.accessToken",REFRESH:"ple.refreshToken",USER:"ple.user",ROLE:"ple.role",REMEMBERED_IDENTIFIER:"ple.rememberedIdentifier"};function Ic(){return typeof window<"u"}function J0(){return Ic()?localStorage.getItem(ea.ACCESS):null}function t_(){return Ic()?localStorage.getItem(ea.REFRESH):null}function n_(e,t){Ic()&&(localStorage.setItem(ea.ACCESS,e),localStorage.setItem(ea.REFRESH,t))}function Qle(){if(!Ic())return null;const e=localStorage.getItem(ea.USER);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function RD(e){Ic()&&(localStorage.setItem(ea.USER,JSON.stringify(e)),localStorage.setItem(ea.ROLE,e.role))}function tet(){var t;if(!Ic())return null;const e=localStorage.getItem(ea.ROLE);return e==="student"||e==="admin"?e:((t=Qle())==null?void 0:t.role)??null}function net(e,t,n){n_(e,t),RD({...n,role:"student"})}function ret(e,t,n){n_(e,t),RD({...n,role:"admin"})}function K7(){Ic()&&(localStorage.removeItem(ea.ACCESS),localStorage.removeItem(ea.REFRESH),localStorage.removeItem(ea.USER),localStorage.removeItem(ea.ROLE))}function iet(){return Ic()?localStorage.getItem(ea.REMEMBERED_IDENTIFIER):null}function set(e){Ic()&&localStorage.setItem(ea.REMEMBERED_IDENTIFIER,e)}function aet(){Ic()&&localStorage.removeItem(ea.REMEMBERED_IDENTIFIER)}const he={AUTH_SIGNUP:"/auth/signup",AUTH_SSO_PROVIDERS:"/auth/sso/providers",AUTH_SSO_EXCHANGE:"/auth/sso/exchange",AUTH_VERIFY_EMAIL:"/auth/verify-email",AUTH_RESEND_VERIFICATION:"/auth/resend-verification",AUTH_SIGNIN:"/auth/signin",AUTH_ADMIN_LOGIN:"/auth/admin-login",AUTH_REFRESH_TOKEN:"/auth/refresh-token",AUTH_FORGOT_PASSWORD:"/auth/forgot-password",AUTH_RESET_PASSWORD:"/auth/reset-password",AUTH_RECOVER_USERNAME:"/auth/recover-username",AUTH_VALIDATE_RESET_TOKEN:"/auth/validate-reset-token",AUTH_UPDATE_PASSWORD:"/auth/update-password",AUTH_LOGOUT:"/auth/logout",AUTH_SESSIONS:"/auth/sessions",AUTH_MFA_VERIFY:"/auth/mfa-verify",ME:"/me",USERS_PROFILE:"/users/profile",ME_PROFILE:"/me/profile",ME_PASSWORD_CHANGE:"/me/password/change",ME_SECURITY_SESSIONS:"/me/security/sessions",ME_SECURITY_SESSIONS_REVOKE_OTHERS:"/me/security/sessions/revoke-others",ME_SECURITY_MFA_ENROLL:"/me/security/mfa/enroll",ME_SECURITY_MFA_VERIFY:"/me/security/mfa/verify",ME_SECURITY_MFA:"/me/security/mfa",LCP_SESSION_START:"/lcp/session/start",LCP_SESSION_ANSWER:"/lcp/session/answer",LCP_SESSION_PRELOAD:"/lcp/session/preload",LCP_SESSION_STATUS:"/lcp/session/status",LCP_SESSION_COMPLETE:"/lcp/session/complete",LCP_PROFILE:"/lcp/profile",INTERVIEW:"/interview",INTERVIEW_PROFILE:"/interview/profile",INTERVIEW_CHAT:"/interview/chat",CAREER_PLAN:"/career/plan",CAREER_PLAN_HISTORY:"/career/plan/history",CAREER_SUGGESTIONS:"/career/suggestions",CAREER_PREFERENCES:"/career/preferences",CAREER_LOCK:"/career/lock",CAREER_BRIDGE:"/career/bridge",CAREER_COMPARE:"/career/compare",CAREER_MATERIALIZE:"/career/materialize",ME_COURSES:"/me/courses",ME_COURSES_GENERATE:"/me/courses/generate",meCourseDetail
1668:e=>`/me/courses/${encodeURIComponent(e)}`,meCourseCurriculum:e=>`/me/courses/${encodeURIComponent(e)}/curriculum`,meCourseLessonData:e=>`/me/courses/${encodeURIComponent(e)}/lesson-data`,meCourseStepComplete:e=>`/me/courses/${encodeURIComponent(e)}/step-complete`,meCoursePracticeAnswer:e=>`/me/courses/${encodeURIComponent(e)}/practice/answer`,meLessonSkip:(e,t,n,r)=>`/me/courses/${encodeURIComponent(e)}/lessons/${t}/${n}/${r}/skip`,meSupplementaryLesson:(e,t)=>`/me/courses/${encodeURIComponent(e)}/extra/${encodeURIComponent(t)}`,meSupplementaryLessonComplete:(e,t)=>`/me/courses/${encodeURIComponent(e)}/extra/${encodeURIComponent(t)}/complete`,meCourseUnenrol:e=>`/me/courses/${encodeURIComponent(e)}/unenrol`,meCourseArchive:e=>`/me/courses/${encodeURIComponent(e)}/archive`,meCourseUnarchive:e=>`/me/courses/${encodeURIComponent(e)}/unarchive`,meCourseCustomName:e=>`/me/courses/${encodeURIComponent(e)}/custom-name`,ME_TTS_GENERATE:"/me/tts/generate",ME_TTS_GENERATE_BATCH:"/me/tts/generate-batch",ME_TTS_SYNTHESIZE_TEXT:"/me/tts/synthesize-text",ME_TTS_VOICES:"/me/tts/voices",ME_TTS_PREFERENCES:"/me/tts/preferences",ME_LEARNING_NOTES:"/me/learning/notes",meLearningNote:e=>`/me/learning/notes/${encodeURIComponent(e)}`,HIGHLIGHTS:"/highlights",highlight:e=>`/highlights/${encodeURIComponent(e)}`,BOOKMARKS:"/bookmarks",bookmark:e=>`/bookmarks/${encodeURIComponent(e)}`,ME_LIBRARY:"/me/library",MARKETPLACE:"/marketplace",MARKETPLACE_CATALOG:"/marketplace/catalog",marketplaceCourse:e=>`/marketplace/courses/${encodeURIComponent(e)}`,marketplacePack:e=>`/marketplace/packs/${encodeURIComponent(e)}`,meCourseOverview:e=>`/me/courses/${encodeURIComponent(e)}/overview`,marketplaceCourseOverview:e=>`/marketplace/courses/${encodeURIComponent(e)}/overview`,ME_MARKETPLACE_RECOMMENDED:"/me/marketplace/recommended",MARKETPLACE_CATEGORY_RAILS:"/marketplace/category-rails",ME_COURSE_SUGGESTIONS:"/me/course-suggestions",meCourseSuggestionAccept:e=>`/me/course-suggestions/${encodeURIComponent(e)}/accept`,meCourseSuggestionDismiss:e=>`/me/course-suggestions/${encodeURIComponent(e)}/dismiss`,CHECKOUT_CLAIM:"/checkout/claim",CHECKOUT_SQUARE:"/checkout/square",CHECKOUT_SQUARE_CONFIG:"/checkout/square/config",CHECKOUT_PROVIDER:"/checkout/provider",CHECKOUT_STRIPE:"/checkout/stripe",ME_ORDERS:"/me/orders",meOrder:e=>`/me/orders/${encodeURIComponent(e)}`,meOrderReceipt:e=>`/me/orders/${encodeURIComponent(e)}/receipt`,ME_CALENDAR:"/me/calendar",ME_CALENDAR_GRID:"/me/calendar/grid",ME_CALENDAR_FOCUS:"/me/calendar/focus",ME_CALENDAR_EVENTS:"/me/calendar/events",meCalendarEvent:e=>`/me/calendar/events/${encodeURIComponent(e)}`,meCalendarEventMove:e=>`/me/calendar/events/${encodeURIComponent(e)}/move`,meCalendarPreferences:e=>`/me/calendar/preferences/${encodeURIComponent(e)}`,ME_CALENDAR_START_DATE:"/me/calendar/start-date",ME_CALENDAR_CONFLICTS_CHECK:"/me/calendar/conflicts/check",ME_CALENDAR_LESSONS_RESCHEDULE:"/me/calendar/lessons/reschedule",meCalendarLessonOverride:e=>`/me/calendar/lessons/reschedule/${encodeURIComponent(e)}`,ME_EXAM_TARGET:"/me/exam-target",ME_NOTIFICATIONS:"/me/notifications",ME_NOTIFICATIONS_UNREAD_COUNT:"/me/notifications/unread-count",ME_NOTIFICATIONS_READ_ALL:"/me/notifications/read-all",meNotificationRead:e=>`/me/notifications/${encodeURIComponent(e)}/read`,ME_REMINDER_PREFERENCES:"/me/reminder-preferences",ME_LEARNING_PREFERENCES:"/me/learning-preferences",PRACTICE_STATS:"/practice/stats",PRACTICE_DAILY:"/practice/daily",PRACTICE_QUIZ:"/practice/quiz",PRACTICE_SPEED:"/practice/speed",PRACTICE_SKILL:"/practice/skill",PRACTICE_SPACED:"/practice/spaced",PRACTICE_SUBMIT:"/practice/submit",PRACTICE_SESSIONS:"/practice/sessions",practiceSpacedItem:e=>`/practice/spaced/${encodeURIComponent(e)}`,practiceSession:e=>`/practice/sessions/${encodeURIComponent(e)}`,ME_PRACTICE_DUE_NOW:"/me/practice/due-now",ME_PRACTICE_WEAKNESSES:"/me/practice/weaknesses",ME_MASTERY_SUMMARY:"/me/mastery/summary",ME_CAREER_TRACK_PROGRESS:"/me/career/track-progress",ME_LEARNING_ACTIVITY:"/me/learning-activity",ME_SUPPORT_TICKETS:"/me/support/tickets",meSupportTicket:e=>`/me/support/tickets/${encodeURIComponent(e)}`,meSupportTicketComments:e=>`/me/support/tickets/${encodeURIComponent(e)}/comments`,ME_DATA_EXPORT:"/me/data-export",ME_ACCOUNT_DELETE:"/me/account/delete",ME_CERTIFICATES:"/me/certificates",meCertificateRetry:e=>`/me/certificates/${encodeURIComponent(e)}/retry`,certificateVerify:e=>`/certificates/verify/${encodeURIComponent(e)}`,meCertificateDownload:e=>`/me/certificates/${encodeURIComponent(e)}/download`,HELP_CATEGORIES:"/help/categories",HELP_ARTICLES:"/help/articles",helpArticle:e=>`/help/articles/${encodeURIComponent(e)}`,HELP_AI_ASSISTANT:"/help/ai-assistant",ME_SEARCH:"/me/search",VERSION_STATUS:"/version/status",CHAT_SESSIONS:"/chat/sessions",chatSession:e=>`/chat/sessions/${encodeURIComponent(e)}`,chatSessionMessages:e=>`/chat/sessions/${encodeURIComponent(e)}/messages`,chatSessionMessagesStream:e=>`/chat/sessions/${encodeURIComponent(e)}/messages/stream`,chatSessionMessagesAgentStream:e=>`/chat/sessions/${encodeURIComponent(e)}/messages/agent-stream`,authCheckEmail:e=>`/auth/check-email?email=${encodeURIComponent(e)}`,authRevokeSession:e=>`/auth/sessions/${encodeURIComponent(e)}`,meSecurityRevokeSession:e=>`/me/security/sessions/${encodeURIComponent(e)}`},Es={TOKENS_REFRESHED:"tokens:refreshed",TOKENS_CLEARED:"tokens:cleared",SESSION_TERMINATED:"session:terminated"};function oet(){if(typeof EventTarget<"u")return new EventTarget;const e=new Map;return{addEventListener(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},removeEventListener(t,n){var r;(r=e.get(t))==null||r.delete(n)},dispatchEvent(t){const n=e.get(t.type);if(n)for(const r of n)r(t);return!0}}}const ml=oet();function eg(e){ml.dispatchEvent(new Event(e))}function Ew(){const t="/api/v1".replace(/\/+$/,"");return/\/api(\/|$)/.test(t)?t:`${t}/api`}const Zle=Ew(),du=Mr.create({baseURL:Zle,headers:{"Content-Type":"application/json"},timeout:3e4}),cet=[he.AUTH_SIGNIN,he.AUTH_SSO_EXCHANGE,he.AUTH_SIGNUP,he.AUTH_ADMIN_LOGIN,he.AUTH_REFRESH_TOKEN,he.AUTH_FORGOT_PASSWORD,he.AUTH_RESET_PASSWORD,he.AUTH_RECOVER_USERNAME,he.AUTH_VERIFY_EMAIL,he.AUTH_RESEND_VERIFICATION],uet=[he.ME_ACCOUNT_DELETE,he.ME_SECURITY_MFA_VERIFY,he.ME_SECURITY_MFA];function det(e,t){return(t??"get").toLowerCase()!=="get"&&uet.some(n=>e.endsWith(n))}du.interceptors.request.use(e=>{const t=J0();return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e});let Hy=null;function het(){if(Hy)return Hy;const e=t_();return e?(Hy=(async()=>{var t;try{const r=(t=(await Mr.post(`${Zle}${he.AUTH_REFRESH_TOKEN}`,{refreshToken:e},{headers:{"Content-Type":"application/json"}})).data)==null?void 0:t.data;if(!(r!=null&&r.accessToken)||!(r!=null&&r.refreshToken))throw new Error("Refresh response missing tokens");return n_(r.accessToken,r.refreshToken),eg(Es.TOKENS_REFRESHED),r}finally{Hy=null}})(),Hy):Promise.reject(new Error("No refresh token available"))}du.interceptors.response.use(e=>e,async e=>{var i;const t=(i=e.response)==null?void 0:i.status,n=e.config??{},r=n.url??"";if(t!==401)return Promise.reject(e);
1668if(n.__retried)return det(r,n.method)?Promise.reject(e):oj(e);if(cet.some(s=>r.endsWith(s)))return Promise.reject(e);if(!t_())return oj(e);try{const s=await het();return n.__retried=!0,n.headers=n.headers??{},n.headers.Authorization=`Bearer ${s.accessToken}`,du.request(n)}catch{return oj(e)}});function oj(e){return K7(),eg(Es.TOKENS_CLEARED),eg(Es.SESSION_TERMINATED),Promise.reject(e)}function qy(e){return e.then(t=>{const n=t.data;if(n&&typeof n=="object"&&"meta"in n){if("pagination"in n){const r={...n};return delete r.meta,r}if("data"in n)return n.data}return n})}const _e={get:(e,t)=>qy(du.get(e,t)),post:(e,t,n)=>qy(du.post(e,t,n)),put:(e,t,n)=>qy(du.put(e,t,n)),patch:(e,t,n)=>qy(du.patch(e,t,n)),del:(e,t)=>qy(du.delete(e,t))};function ox(e,t="Something went wrong. Please try again."){var n;if(Mr.isAxiosError(e)){const r=(n=e.response)==null?void 0:n.data,i=r==null?void 0:r.message;if(typeof i=="string"&&i.trim())return i;if(Array.isArray(i)&&i.length>0)return String(i[0]);if(typeof e.message=="string"&&e.message)return e.message}return e instanceof Error&&e.message?e.message:t}const ee={ROOT:"/",AUTH_LOGIN:"/login",AUTH_SIGNUP:"/signup",AUTH_FORGOT_PASSWORD:"/forgot-password",AUTH_RESET_PASSWORD:"/reset-password",AUTH_RECOVER_USERNAME:"/recover-username",AUTH_VERIFY_EMAIL:"/verify-email",AUTH_MFA_VERIFY:"/auth/mfa-verify",AUTH_SSO_COMPLETE:"/auth/sso",PRIVACY:"/privacy",TERMS:"/terms",PUBLIC_COURSE_OVERVIEW:"/courses/:courseId",PUBLIC_CERTIFICATE_VERIFY:"/verify/:code",ME_ROOT:"/me",ME_HOME:"/me/home",ME_SETTINGS:"/me/settings",ME_SETTINGS_PROFILE:"/me/settings/profile",ME_SETTINGS_SECURITY:"/me/settings/security",ME_SETTINGS_APPEARANCE:"/me/settings/appearance",ME_SETTINGS_LEARNING_PREFERENCES:"/me/settings/learning-preferences",ME_SETTINGS_NOTIFICATIONS:"/me/settings/notifications",ME_SETTINGS_INVOICES:"/me/settings/invoices",ME_SETTINGS_BILLING:"/me/settings/billing",ME_LEARNING_PROFILE:"/me/settings/learning-profile",ME_LEARNING_PROFILE_REPORT:"/me/settings/learning-profile/report",ME_INTERVIEW:"/me/settings/interview",ME_CAREER:"/me/settings/career",ME_CAREER_PLAN_HISTORY:"/me/settings/career/history",ME_CAREER_COMPARE:"/me/settings/career/compare",ME_ORDERS:"/me/settings/orders",ME_ORDER_DETAIL:"/me/settings/orders/:id",ME_SETTINGS_CERTIFICATES:"/me/settings/certificates",ME_LEGACY_LEARNING_PROFILE:"/me/learning-profile",ME_LEGACY_LEARNING_PROFILE_REPORT:"/me/learning-profile/report",ME_LEGACY_INTERVIEW:"/me/interview",ME_LEGACY_CAREER:"/me/career",ME_LEGACY_CAREER_HISTORY:"/me/career/history",ME_LEGACY_CAREER_COMPARE:"/me/career/compare",ME_LEGACY_ORDERS:"/me/orders",ME_HELP:"/me/help",ME_HELP_ARTICLE:"/me/help/articles/:slug",ME_COURSES:"/me/courses",ME_COURSES_ACTIVE:"/me/courses/active",ME_COURSES_COMPLETED:"/me/courses/completed",ME_COURSES_ARCHIVED:"/me/courses/archived",ME_COURSES_CUSTOM:"/me/courses/custom",ME_COURSE_DETAIL:"/me/courses/:courseId",ME_COURSE_LEARN:"/me/courses/:courseId/learn",ME_NOTES:"/me/notes",ME_LIBRARY:"/me/library",ME_MARKETPLACE:"/me/course-marketplace",ME_MARKETPLACE_FOR_YOU:"/me/course-marketplace/for-you",ME_MARKETPLACE_BROWSE:"/me/course-marketplace/browse",ME_MARKETPLACE_CREATE:"/me/course-marketplace/create",ME_MARKETPLACE_DETAIL:"/me/course-marketplace/:courseId",ME_MARKETPLACE_PACK_DETAIL:"/me/course-marketplace/packs/:slug",ME_CHECKOUT_SUCCESS:"/me/checkout/success",ME_CHECKOUT_CANCEL:"/me/checkout/cancel",ME_CALENDAR:"/me/calendar",ME_PRACTICE:"/me/practice",ME_PRACTICE_DAILY:"/me/practice/daily",ME_PRACTICE_SPACED:"/me/practice/spaced",ME_PRACTICE_QUIZ:"/me/practice/quiz",ME_PRACTICE_SPEED:"/me/practice/speed",ME_PRACTICE_SKILL:"/me/practice/skill",ME_PRACTICE_RESULTS:"/me/practice/results",ME_PRACTICE_HISTORY:"/me/practice/history",ME_PRACTICE_WEAKNESSES:"/me/practice/weaknesses",ME_ASSISTANT:"/me/assistant",ME_ASK_ARTHUR:"/me/ask-arthur",ME_CAREER_PLAN:"/me/career-plan"},Wa=e=>`/me/courses/${encodeURIComponent(e)}`,fet=(e,t,n,r)=>{const i=`/me/courses/${encodeURIComponent(e)}/extra/${t}?w=${n.week}&d=${n.day}&l=${n.lesson}`;return r?`${i}&nw=${r.week}&nd=${r.day}&nl=${r.lesson}`:i},ts=(e,t,n,r)=>`/me/courses/${encodeURIComponent(e)}/learn?w=${t}&d=${n}&l=${r}`,met=(e,t,n,r,i={})=>{const s=ts(e,t,n,r),a=[];return i.stepKey&&a.push(`s=${encodeURIComponent(i.stepKey)}`),i.anchorBlockId&&a.push(`anchorBlockId=${encodeURIComponent(i.anchorBlockId)}`),a.length===0?s:`${s}&${a.join("&")}`},OD=e=>`/me/course-marketplace/${encodeURIComponent(e)}`,pet=e=>`${ee.AUTH_LOGIN}?returnTo=${encodeURIComponent(e)}`,Jle=e=>`/me/course-marketplace/packs/${encodeURIComponent(e)}`,lx=e=>`/me/checkout/success?orderId=${encodeURIComponent(e)}`,ece=e=>`/me/settings/orders/${encodeURIComponent(e)}`,X7=e=>`/me/practice/${e}`,get=(e,t)=>{const n=new URLSearchParams({skill:e});return t&&n.set("courseId",t),`/me/practice/skill?${n.toString()}`},xet=e=>`/me/practice/results?sessionId=${encodeURIComponent(e)}`,DD=e=>`/me/help/articles/${encodeURIComponent(e)}`,yet=e=>`/verify/${encodeURIComponent(e)}`,bet={viewBox:"0 0 24 24",strokeWidth:1.75,paths:["M12 4 2.5 8.5 12 13l9.5-4.5L12 4ZM6.6 10.8V15c0 1.5 2.5 3 5.4 3s5.4-1.5 5.4-3v-4.2M21.5 8.5v5"]},vet={viewBox:"0 0 120 120",strokeWidth:6,paths:[],logo:{viewBox:"0 0 120 120",frame:{x:3,y:3,width:114,height:114,rx:28,stroke:"#18181B",strokeWidth:6},bars:[{x:28,y:66,width:16,height:26,rx:4,fill:"#9A978F"},{x:52,y:48,width:16,height:44,rx:4,fill:"#B01E3C"},{x:76,y:30,width:16,height:62,rx:4,fill:"#18181B"}]}},wet={key:"arthur",name:"ArthurAI",productWithEdition:"ArthurAI PLE",productLongName:"ArthurAI Personal Learning Edition",subtitle:"Personal · PLE",htmlTitle:"ArthurAI⢠PLE | Personal Learning Edition",metaDescription:"ArthurAI Personal Learning Edition (PLE)",legal:{productName:"ArthurAI",trademarked:!0,editionTag:" PLE [Personal Learning Edition]",platform:"",operator:"",copyright:"© 2026 Eve-Education, LLC, a wholly-owned subsidiary of MindHYVE.ai, Inc. All rights reserved.",trademarks:"ArthurAIâ¢, MindHYVE.aiâ¢, Eve-Educationâ¢, Eve-Fusionâ¢, Eve-Gridâ¢, Eve-Genesisâ¢, HYVE⢠and HYVE Labs⢠are trademarks of MindHYVE.ai, Inc."},contact:{privacy:"[email protected]",legal:"[email protected]"},minSelfSignupAge:13,underMinAge:{message:"You must be 13 or older to create a personal account.",fleReferral:!0},faviconSrc:"/logos/mark-ple.svg",logoSrc:"/logos/mascot-512.png",logoFilter:"hue-rotate(212deg) saturate(0.85) brightness(0.95)",mark:bet,colors:{primary:"236 36% 45%",primaryForeground:"0 0% 100%",secondary:"236 52% 67%",secondaryForeground:"0 0% 100%",accent:"235 52% 95%",accentForeground:"236 36% 45%",ring:"236 36% 45%",gradientFrom:"#4A4F9E",gradientTo:"#7E84D6",editionPrimary:"#7E84D6",editionDeeper:"#4A4F9E",editionSoft:"#BFC2EC",editionPale:"#ECEDF9"}},Cet={key:"ciai",name:"CIAI",productWithEdition:"CIAI",productLongName:"California Institute of Artificial Intelligence",subtitle:"Personal learning",htmlTitle:"CIAI | Personal Learning Edition",metaDescription:"California Institute of Artificial Intelligence â Personal Learning Edition (PLE)",legal:{productName:"California Institute of Artificial Intelligence",trademarked:!1,editionTag:"",platform:"ArthurAIâ¢",operator:"",copyright:"© 2026 California Institute of Artificial Intelligence. Delivered on ArthurAIâ¢, licensed from MindHYVE.ai, Inc.",trademarks:"ArthurAI⢠is a trademark of MindHYVE.ai, Inc."},contact:{privacy:"[email protected]",legal:"[email protected]"},publishedLegal:{privacy:"https://www.ciai.ai/legal/privacy",terms:"https://www.ciai.ai/legal/terms",refunds:"https://www.ciai.ai/legal/refunds"},minSelfSignupAge:18,underMinAge:{message:"CIAI programmes are for adults (18+).",fleReferral:!1},faviconSrc:"/logos/ciai-mark.svg",logoSrc:"/logos/ciai-mark.svg",logoFilter:"none",mark:vet,colors:{primary:"348 71% 40%",primaryForeground:"0 0% 100%",secondary:"40 5% 58%",secondaryForeground:"240 6% 10%",accent:"350 60% 95%",accentForeground:"349 73% 34%",ring:"349 73% 34%",gradientFrom:"#B01E3C",gradientTo:"#97182F",editionPrimary:"#B01E3C",editionDeeper:"#18181B",editionSoft:"#9A978F",editionPale:"#FAF9F7"}},ket={arthur:wet,ciai:Cet};function _et(){return"ciai".toLowerCase().trim()==="ciai"?"ciai":"arthur"}const at=ket[_et()];function NC(e){const t=e.replace("#",""),n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return`${n} ${r} ${i}`}function tce(e){return NC(e).replace(/ /g,", ")}function nq(e,t){return`rgba(${tce(e)}, ${t})`}function Tet(e=at){if(e.key==="arthur")return;const t=e.colors,n=document.documentElement;n.setAttribute("data-brand",e.key);const r=(i,s)=>n.style.setProperty(i,s);r("--primary",t.primary),r("--primary-foreground",t.primaryForeground),r("--secondary",t.secondary),r("--secondary-foreground",t.secondaryForeground),r("--accent",t.accent),r("--accent-foreground",t.accentForeground),r("--ring",t.ring),r("--gradient-ple",`linear-gradient(125deg, ${t.gradientFrom} 0%, ${t.gradientTo} 78%)`),r("--gradient-ple-soft",`linear-gradient(105deg, ${nq(t.gradientFrom,.1)} 0%, ${nq(t.gradientTo,.12)} 100%)`),r("--ple-primary",NC(t.editionDeeper)),r("--ple-secondary",NC(t.editionPrimary)),r("--ple-accent",NC(t.editionSoft)),r("--arthur-primary",t.editionDeeper),r("--arthur-primary-rgb",tce(t.editionDeeper)),r("--arthur-secondary",t.editionPrimary),r("--arthur-accent",t.editionSoft),r("--color-edition-primary",t.editionPrimary),r("--color-edition-deeper",t.editionDeeper),r("--color-edition-soft",t.editionSoft),r("--color-edition-pale",t.editionPale)}function Eet(e=at){document.title=e.htmlTitle;const t=document.querySelector('meta[name="description"]');t&&(t.content=e.metaDescription),e.key!=="arthur"&&(document.querySelectorAll('link[rel="icon"]').forEach(n=>{if(n.type==="image/svg+xml"){n.href=e.faviconSrc;return}n.remove()}),document.querySelectorAll('link[rel="apple-touch-icon"], link[rel="shortcut icon"]').forEach(n=>n.remove()))}function jw(e=at.key){return!1}function jet(e=at.key){return!jw(e)}function Net(){return!!J0()}function r_(){if(!Net())throw c4(ee.AUTH_LOGIN);if(at.key==="ciai")return null;const e=tet();if(e&&e!=="student")throw c4(ee.AUTH_LOGIN);return null}let k1=null;const nce=3e4;async function Aet(){if(k1&&Date.now()-k1.cachedAt<nce)return k1.value?"complete":"incomplete";try{const e=await _e.get(he.ME),t=!!(e!=null&&e.completedFirstLCP);return k1={value:t,cachedAt:Date.now()},t?"complete":"incomplete"}catch{return"unknown"}}let _1=null;async function Met(){if(_1&&Date.now()-_1.cachedAt<nce)return _1.value?"complete":"incomplete";try{const e=await _e.get(he.INTERVIEW),t=(e==null?void 0:e.status)==="COMPLETED";return _1={value:t,cachedAt:Date.now()},t?"complete":"incomplete"}catch{return"unknown"}}function rce(){k1=null,_1=null}async function Ret(){if(r_(),await Aet()==="incomplete")throw c4(ee.ME_LEARNING_PROFILE);return null}async function lj(){if(r_(),await Met()==="incomplete")throw c4(ee.ME_INTERVIEW);return null}async function rq(){if(r_(),!jw())return null}const iq=b.lazy(()=>_r(()=>import("./AnalyticsConsent-C4EoQTmc.js"),[]));function Oet(){return l.jsxs(b.Suspense,{fallback:l.jsx("div",{role:"status","aria-live":"polite",className:"flex min-h-[100dvh] items-center justify-center text-slate-500",children:"Loadingâ¦"}),children:[l.jsx($v,{}),iq?l.jsx(b.Suspense,{fallback:null,children:l.jsx(iq,{})}):null]})}const LD=b.createContext(null);function Det({children:e}){const[t,n]=b.useState({}),r=b.useCallback(o=>{n(c=>{const u=o??{};return c.left===u.left&&c.actions===u.actions?c:u})},[]),i=b.useCallback(o=>{n(c=>c.left===o.left&&c.actions===o.actions?{}:c)},[]),s=b.useCallback(o=>{n(c=>c.left||c.actions||c.left===o.left&&c.actions===o.actions?c:o)},[]),a=b.useMemo(()=>({slot:t,setSlot:r,setSlotIfEmpty:s,clearIfOwner:i}
1668),[t,r,s,i]);return l.jsx(LD.Provider,{value:a,children:e})}function Let(){const e=b.useContext(LD);return(e==null?void 0:e.slot)??{}}function On(e,t){const n=b.useContext(LD),r=n==null?void 0:n.setSlot,i=n==null?void 0:n.setSlotIfEmpty,s=n==null?void 0:n.clearIfOwner,{left:a,actions:o}=e,c=(t==null?void 0:t.mode)??"override";b.useEffect(()=>{if(!(!r||!i||!s))return c==="default"?i({left:a,actions:o}):r({left:a,actions:o}),()=>s({left:a,actions:o})},[r,i,s,a,o,c])}const Q7=[{id:"welcome"},{id:"gettingStarted",target:'[data-tour="gettingStarted"]'},{id:"personalization",target:'[data-tour="personalization"]'},{id:"courses",target:'a[href="/me/courses"]',anchorsSidebar:!0},{id:"practice",target:'a[href="/me/practice"]',anchorsSidebar:!0},{id:"askArthur",target:'a[href="/me/assistant"]',anchorsSidebar:!0}],ice="ciai.tour.v1.done";let Gy=0,Ba=null;function Pet(){const e=document.getElementById("main-content");if(!e)return null;const t=window.getComputedStyle(e).overflowY;return t!=="auto"&&t!=="scroll"||e.scrollHeight<=e.clientHeight?null:e}function Iet(){if(Gy===0){const t=Pet();if(t)Ba={kind:"element",el:t,previousOverflow:t.style.overflow},t.style.overflow="hidden";else{const n=document.body,r=window.scrollY;Ba={kind:"document",scrollY:r,previous:{position:n.style.position,top:n.style.top,left:n.style.left,right:n.style.right,width:n.style.width}},n.style.position="fixed",n.style.top=`-${r}px`,n.style.left="0",n.style.right="0",n.style.width="100%"}}Gy+=1;let e=!1;return()=>{if(!e&&(e=!0,Gy=Math.max(0,Gy-1),!(Gy!==0||!Ba))){if(Ba.kind==="element")Ba.el.style.overflow=Ba.previousOverflow;else{const t=document.body;t.style.position=Ba.previous.position,t.style.top=Ba.previous.top,t.style.left=Ba.previous.left,t.style.right=Ba.previous.right,t.style.width=Ba.previous.width,window.scrollTo(0,Ba.scrollY)}Ba=null}}}function PD(e){b.useEffect(()=>{if(e)return Iet()},[e])}const sq=640,Fet=340,pS=6,aq=14;function oq(e){if(!e)return null;const t=Array.from(document.querySelectorAll(e));for(const n of t){const r=n.getBoundingClientRect(),i=r.width>0&&r.height>0,s=r.right>0&&r.bottom>0&&r.left<window.innerWidth&&r.top<window.innerHeight;if(i&&s)return n}return null}function Bet(){const{t:e}=J("me"),{stepIndex:t,total:n,next:r,back:i,skip:s,finish:a}=ID(),o=rw(),c=Q7[t],u=t===0,d=t===n-1,h=b.useRef(null),f=b.useRef(null),[m,p]=b.useState(()=>window.innerWidth<=sq),[x,v]=b.useState(null),[g,y]=b.useState(null),w=b.useCallback(()=>{const M=oq(c.target);if(M){const $=M.getBoundingClientRect();v({top:$.top,left:$.left,width:$.width,height:$.height})}else v(null)},[c.target]);b.useLayoutEffect(()=>{const M=oq(c.target);M&&M.scrollIntoView({block:"center",inline:"nearest",behavior:o?"auto":"smooth"}),w();const B=(o?[0]:[60,140,220,300,380]).map(z=>window.setTimeout(w,z));return()=>B.forEach(z=>window.clearTimeout(z))},[c.target,w,o]),b.useEffect(()=>{const M=()=>{p(window.innerWidth<=sq),w()};return window.addEventListener("resize",M),window.addEventListener("scroll",w,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",w,!0)}},[w]),b.useLayoutEffect(()=>{if(m||!x||!h.current){y(null);return}const M=h.current,$=M.offsetHeight,B=M.offsetWidth;let z=x.top+x.height+aq;z+$+12>window.innerHeight&&(z=x.top-$-aq),z=Math.max(12,Math.min(z,window.innerHeight-$-12));let O=x.left+x.width/2-B/2;O=Math.max(12,Math.min(O,window.innerWidth-B-12)),y({top:z,left:O})},[x,m,t]),b.useEffect(()=>{const M=window.setTimeout(()=>{var $;return($=f.current)==null?void 0:$.focus()},0);return()=>window.clearTimeout(M)},[t]),b.useEffect(()=>{const M=$=>{if($.key==="Escape"){$.preventDefault(),s();return}if($.key==="ArrowRight"){$.preventDefault(),r();return}if($.key==="ArrowLeft"){u||($.preventDefault(),i());return}if($.key==="Tab"&&h.current){const B=Array.from(h.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])'));if(B.length===0)return;const z=B[0],O=B[B.length-1],P=document.activeElement;$.shiftKey&&P===z?($.preventDefault(),O.focus()):!$.shiftKey&&P===O&&($.preventDefault(),z.focus())}};return document.addEventListener("keydown",M,!0),()=>document.removeEventListener("keydown",M,!0)},[u,s,r,i]),PD(!0);const S="guided-tour-title",C="guided-tour-desc",k=e(`tour.steps.${c.id}.title`,{brand:at.name}),_=e(`tour.steps.${c.id}.body`,{brand:at.name}),E=l.jsxs("div",{className:"mt-5 flex items-center justify-between gap-3",children:[l.jsx("button",{type:"button",onClick:s,className:"text-[13px] font-medium text-muted-foreground underline-offset-4 transition-colors hover:text-body-ink hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 motion-reduce:transition-none",children:e("tour.skip")}),l.jsxs("div",{className:"flex items-center gap-2",children:[!u&&l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:i,leftIcon:l.jsx(kx,{className:"h-3.5 w-3.5","aria-hidden":"true"}),children:e("tour.back")}),l.jsx(ce,{ref:f,type:"button",variant:"gradient",size:"sm",onClick:d?a:r,rightIcon:d?l.jsx(Kn,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.jsx(gn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),children:e(d?"tour.done":"tour.next")})]})]}),A=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.14em] text-primary",children:e("tour.progress",{current:t+1,total:n}
1668)}),l.jsx("button",{type:"button",onClick:s,"aria-label":e("tour.close"),className:"-me-1 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-body-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 motion-reduce:transition-none",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})})]}),l.jsx("h2",{id:S,className:"mt-2 text-lg font-medium tracking-tight text-strong",children:k}),l.jsx("p",{id:C,className:"mt-1.5 text-sm leading-relaxed text-body-ink",children:_}),d&&l.jsx("p",{className:"mt-2 text-[13px] font-medium text-primary",children:e("tour.allSet")}),E]}),j=!m&&x&&g,D="pointer-events-auto rounded-2xl border border-border bg-card p-5 shadow-overlay outline-none";return td.createPortal(l.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":S,"aria-describedby":C,"aria-label":e("tour.dialogAriaLabel"),className:"fixed inset-0 z-[110]",children:[l.jsx("div",{className:"fixed inset-0",onClick:s,"aria-hidden":"true",children:x?l.jsx("div",{className:"pointer-events-none fixed rounded-xl ring-2 ring-primary transition-all duration-200 motion-reduce:transition-none",style:{top:x.top-pS,left:x.left-pS,width:x.width+pS*2,height:x.height+pS*2,boxShadow:"0 0 0 9999px rgba(20, 22, 27, 0.55)"}}):l.jsx("div",{className:"pointer-events-none fixed inset-0 bg-[rgba(20,22,27,0.55)]"})}),m?l.jsx("div",{ref:h,className:`${D} fixed inset-x-0 bottom-0 rounded-b-none rounded-t-2xl border-x-0 border-b-0 pb-[max(1.25rem,env(safe-area-inset-bottom))]`,children:A}):j?l.jsx("div",{ref:h,className:`${D} fixed w-[min(340px,calc(100vw-1.5rem))]`,style:{top:g.top,left:g.left,maxWidth:Fet},children:A}):l.jsx("div",{className:"pointer-events-none fixed inset-0 flex items-center justify-center p-4",children:l.jsx("div",{ref:h,className:`${D} w-full max-w-md`,children:A})})]}),document.body)}const sce=b.createContext(null);function zet(){try{return localStorage.getItem(ice)==="1"}catch{return!1}}function cj(){try{localStorage.setItem(ice,"1")}catch{}}function $et({children:e}){var g;const t=at.key==="ciai",[n,r]=b.useState(!1),[i,s]=b.useState(0),a=Q7.length,o=b.useRef(!1),c=b.useCallback(()=>{t&&(s(0),r(!0))},[t]),u=b.useCallback(()=>!t||o.current||(o.current=!0,zet())?!1:(s(0),r(!0),!0),[t]),d=b.useCallback(()=>{r(!1),s(0)},[]),h=b.useCallback(()=>{cj(),d()},[d]),f=b.useCallback(()=>{cj(),d()},[d]),m=b.useCallback(()=>{s(y=>y>=a-1?(cj(),r(!1),0):y+1)},[a]),p=b.useCallback(()=>{s(y=>y>0?y-1:y)},[]),x=n&&!!((g=Q7[i])!=null&&g.anchorsSidebar),v=b.useMemo(()=>({enabled:t,active:n,stepIndex:i,total:a,currentStepTargetsSidebar:x,start:c,maybeAutoStart:u,next:m,back:p,skip:h,finish:f}),[t,n,i,a,x,c,u,m,p,h,f]);return l.jsxs(sce.Provider,{value:v,children:[e,t&&n&&l.jsx(Bet,{})]})}function ID(){const e=b.useContext(sce);if(!e)throw new Error("useGuidedTour must be used within a GuidedTourProvider");return e}const ace=["practice","stats"],Uet=["practice","sessions"],i_=9e4;function oce(){return At({queryKey:ace,queryFn:()=>_e.get(he.PRACTICE_STATS),staleTime:15e3})}function lce(){return At({queryKey:["me","practice","due-now"],queryFn:()=>_e.get(he.ME_PRACTICE_DUE_NOW),staleTime:3e4}).data??{count:0,soonestNextAt:null}}function Vet(){return rt({mutationFn:({count:e=10})=>_e.get(he.PRACTICE_DAILY,{params:{count:e},timeout:i_})})}function Het(){return rt({mutationFn:e=>_e.get(he.PRACTICE_QUIZ,{params:e,timeout:i_})})}function qet(){return rt({mutationFn:e=>_e.get(he.PRACTICE_SPEED,{params:e,timeout:i_})})}function Get(){return rt({mutationFn:({skill:e,courseId:t,difficulty:n,count:r})=>_e.get(he.PRACTICE_SKILL,{params:{skill:e,...t?{courseId:t}:{},...n?{difficulty:n}:{},...r?{count:r}:{}},timeout:i_})})}function Wet(e={},t=!0){const{skill:n,courseId:r}=e;return At({queryKey:["practice","spaced",n??null,r??null],queryFn:()=>_e.get(he.PRACTICE_SPACED,{params:{...n?{skill:n}:{},...r?{courseId:r}:{},adaptive:"true"}}),enabled:t,staleTime:0})}function Yet(){const e=Tt();return rt({mutationFn:({itemId:t,quality:n})=>_e.post(he.practiceSpacedItem(t),{quality:n}),onSuccess:()=>
1668{e.invalidateQueries({queryKey:["practice"]})}})}function Ket(){const e=Tt();return rt({mutationFn:t=>_e.post(he.PRACTICE_SUBMIT,t),onSuccess:()=>{e.invalidateQueries({queryKey:["practice"]})}})}function FD(e={}){const t=e.limit??20;return TM({queryKey:[...Uet,{limit:t}],initialPageParam:null,queryFn:({pageParam:n})=>_e.get(he.PRACTICE_SESSIONS,{params:{limit:t,...n?{cursor:n}:{}}}),getNextPageParam:n=>n.pagination.hasMore?n.pagination.nextCursor:void 0,staleTime:3e4})}function Xet(e={}){const{courseId:t,limit:n}=e;return At({queryKey:["me","practice","weaknesses",t??null,n??null],queryFn:()=>_e.get(he.ME_PRACTICE_WEAKNESSES,{params:{...t?{courseId:t}:{},...n?{limit:n}:{}}}),staleTime:6e4})}function Qet(e){return At({queryKey:e?["practice","session",e]:["practice","session","noop"],queryFn:()=>_e.get(he.practiceSession(e??"")),enabled:!!e})}const Vd=["me","learning-preferences"];function BD(){return At({queryKey:Vd,queryFn:()=>_e.get(he.ME_LEARNING_PREFERENCES),staleTime:6e4})}function s_(){const e=Tt();return rt({mutationFn:t=>_e.patch(he.ME_LEARNING_PREFERENCES,t),onMutate:async t=>{await e.cancelQueries({queryKey:Vd});const n=e.getQueryData(Vd);if(n){const r={...n,...t.weeklyGoalMinutes!==void 0&&{weeklyGoalMinutes:t.weeklyGoalMinutes},...t.reminderTime!==void 0&&{reminderTime:t.reminderTime},...t.subjectPreferences!==void 0&&{subjectPreferences:t.subjectPreferences},...t.timeZone!==void 0&&{timeZone:t.timeZone},...t.pace!==void 0&&{pace:t.pace}};e.setQueryData(Vd,r)}return{previous:n}},onError:(t,n,r)=>{r!=null&&r.previous?e.setQueryData(Vd,r.previous):e.removeQueries({queryKey:Vd})},onSuccess:(t,n)=>{e.setQueryData(Vd,t),n.weeklyGoalMinutes!==void 0&&e.invalidateQueries({queryKey:ace})},onSettled:()=>{e.invalidateQueries({queryKey:Vd})}})}function Zet(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&e.length>0?e:null}catch{return null}}function Jet(e,t){return e?e!==t:!1}function ett(){const e=BD(),t=s_(),n=b.useRef(!1);b.useEffect(()=>{if(n.current||!e.data)return;const r=Zet();Jet(r,e.data.timeZone)&&(n.current=!0,t.mutate({timeZone:r}))},[e.data])}function ttt(){const{pathname:e}=is(),t=F0e();b.useEffect(()=>{if(t==="POP")return;window.scrollTo({top:0,left:0,behavior:"auto"});const n=document.getElementById("main-content");n&&(n.scrollTop=0)},[e,t])}const ntt=60;function rtt(e={}){const t=e.leadSeconds??ntt,n=b.useRef(null);b.useEffect(()=>{function r(){n.current!==null&&(clearTimeout(n.current),n.current=null)}function i(c){r();const u=Math.max(0,c-t)*1e3;n.current=setTimeout(()=>{n.current=null,itt()},u)}function s(){const c=lq();c&&c>t&&i(c)}function a(){r()}const o=lq();return o&&o>t&&t_()&&i(o),ml.addEventListener(Es.TOKENS_REFRESHED,s),ml.addEventListener(Es.TOKENS_CLEARED,a),ml.addEventListener(Es.SESSION_TERMINATED,a),()=>{r(),ml.removeEventListener(Es.TOKENS_REFRESHED,s),ml.removeEventListener(Es.TOKENS_CLEARED,a),ml.removeEventListener(Es.SESSION_TERMINATED,a)}},[t])}let cce=null;function uce(e){typeof e=="number"&&Number.isFinite(e)&&e>0&&(cce=e)}function lq(){return cce}async function itt(){var t;const e=t_();if(e)try{const n=Ew(),i=(t=(await Mr.post(`${n}${he.AUTH_REFRESH_TOKEN}`,{refreshToken:e},{headers:{"Content-Type":"application/json"}})).data)==null?void 0:t.data;if(!(i!=null&&i.accessToken)||!(i!=null&&i.refreshToken))throw new Error("Refresh response missing tokens");n_(i.accessToken,i.refreshToken),typeof i.expiresIn=="number"&&uce(i.expiresIn),eg(Es.TOKENS_REFRESHED)}catch{eg(Es.TOKENS_CLEARED),eg(Es.SESSION_TERMINATED)}}const dce=b.createContext(null);function yf(){const e=b.useContext(dce);if(!e)throw new Error("useAuth must be used within <AuthProvider>");return e}function stt({children:e}){const t=b.useRef(!1),[n,r]=b.useState({user:null,isAuthenticated:!1,isHydrated:!1});rtt(),b.useEffect(()=>{if(t.current)return;t.current=!0;const c=J0(),u=Qle();r({user:u,isAuthenticated:!!c,isHydrated:!0})},[]),b.useEffect(()=>{const c=()=>{K7(),r({user:null,isAuthenticated:!1,isHydrated:!0}),typeof window<"u"&&!window.location.pathname.startsWith("/auth/")&&window.location.replace(ee.AUTH_LOGIN)},u=()=>{};return ml.addEventListener(Es.SESSION_TERMINATED,c),ml.addEventListener(Es.TOKENS_REFRESHED,u),()=>{ml.removeEventListener(Es.SESSION_TERMINATED,c),ml.removeEventListener(Es.TOKENS_REFRESHED,u)}},[]);const i=b.useCallback((c,u,d,h)=>{d.role==="admin"?ret(c,u,d):net(c,u,d),uce(h),r({user:d,isAuthenticated:!0,isHydrated:!0})},[]),s=b.useCallback(async()=>{try{J0()&&await _e.post(he.AUTH_LOGOUT)}catch{}K7(),r({user:null,isAuthenticated:!1,isHydrated:!0})},[]),a=b.useCallback(async()=>
1668{if(J0())try{const c=await _e.get(he.ME),u={id:c.id,email:c.email,username:c.username,firstName:c.firstName,lastName:c.lastName,role:c.role==="ADMIN"?"admin":"student",mustChangePassword:c.mustChangePassword};RD(u),r(d=>({...d,user:u}))}catch{}},[]),o=b.useMemo(()=>({...n,setSession:i,signOut:s,refreshUser:a}),[n,i,s,a]);return l.jsx(dce.Provider,{value:o,children:e})}function att({count:e}){return!e||e<=0?null:l.jsx("span",{"aria-hidden":"true",className:"absolute -end-2 -top-1 min-w-[1.125rem] rounded-full bg-primary px-1 text-center text-[0.625rem] font-semibold leading-[1.125rem] text-on-dark",children:e>9?"9+":e})}function ott({onOpenMore:e,coursesBadge:t,practiceBadge:n}){const{t:r}=J("me"),i=[{key:"home",to:ee.ME_HOME,icon:kQ,label:r("nav.tabs.home"),end:!0},{key:"courses",to:ee.ME_COURSES,icon:Ci,label:r("nav.tabs.courses"),badge:t},{key:"practice",to:ee.ME_PRACTICE,icon:f4,label:r("nav.tabs.practice"),badge:n},{key:"ask",to:ee.ME_ASSISTANT,icon:Rn,label:r("nav.tabs.ask")}];return l.jsx("nav",{"aria-label":r("nav.tabs.ariaLabel"),className:"fixed inset-x-0 bottom-0 z-40 border-t border-border bg-card/95 backdrop-blur-md pb-[env(safe-area-inset-bottom)] md:hidden",children:l.jsxs("ul",{className:"flex items-stretch",children:[i.map(({key:s,to:a,icon:o,label:c,end:u,badge:d})=>l.jsx("li",{className:"flex-1",children:l.jsx(yk,{to:a,end:u,className:({isActive:h})=>["flex min-h-[3.25rem] flex-col items-center justify-center gap-0.5 px-1 py-1.5","text-[0.6875rem] font-medium transition-colors",h?"text-primary":"text-muted-foreground"].join(" "),children:({isActive:h})=>l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"relative inline-flex",children:[l.jsx(o,{className:"h-5 w-5","aria-hidden":"true",strokeWidth:h?2.4:1.8}),l.jsx(att,{count:d})]}),l.jsx("span",{className:"max-w-full truncate",children:c})]})})},s)),l.jsx("li",{className:"flex-1",children:l.jsxs("button",{type:"button",onClick:e,className:"flex min-h-[3.25rem] w-full flex-col items-center justify-center gap-0.5 px-1 py-1.5 text-[0.6875rem] font-medium text-muted-foreground transition-colors",children:[l.jsx($xe,{className:"h-5 w-5","aria-hidden":"true",strokeWidth:1.8}),l.jsx("span",{className:"max-w-full truncate",children:r("nav.tabs.more")})]})})]})})}const zD=["me","notifications","list"],$D=["me","notifications","unread-count"],ltt=3e4;function ctt(e=ltt){return At({queryKey:$D,queryFn:()=>_e.get(he.ME_NOTIFICATIONS_UNREAD_COUNT),refetchInterval:e,refetchIntervalInBackground:!1,refetchOnWindowFocus:!0,staleTime:15e3})}function utt(e){const{page:t,size:n,unreadOnly:r=!1,enabled:i=!0}=e;return At({queryKey:[...zD,"paginated",t,n,r],queryFn:()=>{const s=new URLSearchParams({page:String(t),size:String(n),unreadOnly:r?"true":"false"});return _e.get(`${he.ME_NOTIFICATIONS}?${s.toString()}`)},enabled:i,staleTime:15e3,placeholderData:s=>s})}function dtt(){const e=Tt();return rt({mutationFn:t=>_e.patch(he.meNotificationRead(t)),onSuccess:()=>{e.invalidateQueries({queryKey:$D}),e.invalidateQueries({queryKey:zD})}})}function htt(){const e=Tt();return rt({mutationFn:()=>_e.patch(he.ME_NOTIFICATIONS_READ_ALL),onSuccess:()=>{e.invalidateQueries({queryKey:$D}),e.invalidateQueries({queryKey:zD})}})}const ftt=10,mtt=[10,20,50];function ptt({open:e,onOpenChange:t,unreadCount:n,onItemNavigated:r}){var w,S;const{t:i}=J("me"),s=St(),[a,o]=b.useState("all"),[c,u]=b.useState(1),[d,h]=b.useState(ftt);PD(e),b.useEffect(()=>{e&&u(1)},[e]);const f=utt({page:c,size:d,unreadOnly:a==="unread",enabled:e}),m=dtt(),p=htt(),x=((w=f.data)==null?void 0:w.items)??[],v=((S=f.data)==null?void 0:S.total)??0,g=C=>{o(C),u(1)},y=C=>{C.readAt||m.mutate(C.id),C.actionUrl&&s(C.actionUrl),t(!1),r==null||r()};return l.jsx(Px,{open:e,onOpenChange:t,children:l.jsxs(Ix,{children:[l.jsx(Fx,{className:["fixed inset-0 z-[100] bg-[rgba(20,22,27,0.42)]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","motion-reduce:animate-none"].join(" ")}),l.jsxs(Bx,{"aria-describedby":void 0,className:["fixed inset-y-0 right-0 z-[100]","flex w-full max-w-md flex-col border-l border-border bg-card shadow-overlay","focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right","data-[state=open]:duration-200 data-[state=closed]:duration-200","motion-reduce:animate-none"].join(" "),children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border px-5 py-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Rb,{className:"h-5 w-5 text-strong",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx(zx,{className:"text-base font-semibold text-strong",children:i("notifications.title")}),n>0&&l.jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-clay px-1.5 text-[10px] font-bold text-white","aria-label":i("notifications.unreadCountAriaLabel",{count:n}),children:n>99?"99+":n})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[n>0&&l.jsx(ce,{type:"button",variant:"ghost",size:"sm",leftIcon:l.jsx(Kn,{className:"h-3.5 w-3.5",
1668strokeWidth:1.75}),disabled:p.isPending,onClick:()=>p.mutate(),className:"text-primary hover:bg-edition-pale hover:text-edition-deeper",children:i("notifications.markAllRead")}),l.jsx(qu,{asChild:!0,children:l.jsx(Pn,{"aria-label":i("notifications.drawer.close"),className:"h-8 w-8 rounded-lg border border-border bg-background text-muted-ink hover:bg-edition-pale hover:text-edition-deeper",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75})})})]})]}),l.jsxs("div",{role:"tablist","aria-label":i("notifications.title"),className:"flex gap-2 border-b border-border px-5 py-3",children:[l.jsx(cq,{active:a==="all",label:i("notifications.drawer.tabs.all"),onClick:()=>g("all")}),l.jsx(cq,{active:a==="unread",label:i("notifications.drawer.tabs.unread"),onClick:()=>g("unread")})]}),l.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:f.isError?l.jsx("p",{role:"alert",className:"m-4 rounded-xl border border-clay/30 bg-clay/5 p-4 text-center text-sm text-clay",children:i("notifications.drawer.errorBody")}):f.isLoading?l.jsx("p",{className:"px-5 py-12 text-center text-sm text-muted-ink",children:i("notifications.loading")}):x.length===0?l.jsx(gtt,{title:i(a==="unread"?"notifications.drawer.empty.unreadTitle":"notifications.drawer.empty.allTitle"),description:i(a==="unread"?"notifications.drawer.empty.unreadBody":"notifications.drawer.empty.allBody")}):l.jsx("ul",{className:"divide-y divide-border/70","aria-busy":f.isFetching,"aria-label":i("notifications.title"),children:x.map(C=>l.jsx("li",{children:l.jsxs("button",{type:"button",onClick:()=>y(C),className:["flex w-full items-start gap-3 px-5 py-3.5 text-start transition-colors","focus-visible:outline-none",C.readAt?"hover:bg-edition-pale/40 focus-visible:bg-edition-pale/50":"bg-edition-pale hover:bg-edition-pale/70 focus-visible:bg-edition-pale/70"].join(" "),children:[l.jsx("span",{className:"mt-0.5 flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[10px] bg-edition-pale text-edition-deeper",children:l.jsx(Rb,{className:"h-[18px] w-[18px]",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsxs("span",{className:"flex w-full items-center justify-between gap-2",children:[l.jsx("span",{className:["truncate text-sm",C.readAt?"font-medium text-body-ink":"font-semibold text-strong"].join(" "),children:C.title}),!C.readAt&&l.jsx("span",{className:"flex-shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-edition-deeper","aria-label":i("notifications.unreadBadge"),children:i("notifications.newBadge")})]}),l.jsx("span",{className:"mt-1 line-clamp-2 block text-xs leading-relaxed text-muted-ink",children:C.body}),l.jsx("time",{className:"mt-1.5 block text-[10.5px] text-muted-ink",children:new Date(C.createdAt).toLocaleString()})]})]})},C.id))})}),!f.isLoading&&v>0&&l.jsx("div",{className:"border-t border-border bg-background px-3 py-2",children:l.jsx(ey,{mode:"page",page:c,size:d,total:v,onPageChange:C=>u(C),onSizeChange:C=>{h(C),u(1)},pageSizeOptions:mtt,labels:{prev:i("notifications.drawer.pagination.prev"),next:i("notifications.drawer.pagination.next"),pageSize:i("notifications.drawer.pagination.pageSize"),pageOf:(C,k)=>i("notifications.drawer.pagination.pageOf",{page:C,total:k}),summary:(C,k,_)=>i("notifications.drawer.pagination.summary",{from:C,to:k,total:_})}})})]})]})})}function cq({active:e,label:t,onClick:n}){return l.jsx("button",{type:"button",role:"tab","aria-selected":e,onClick:n,className:["rounded-full px-4 py-1.5 text-sm font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e?"bg-primary text-primary-foreground":"text-muted-ink hover:bg-edition-pale hover:text-edition-deeper"].join(" "),children:t})}function gtt({title:e,description:t}){return l.jsxs("div",{className:"flex flex-col items-center gap-2 px-6 py-12 text-center",children:[l.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(wxe,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("p",{className:"text-sm font-semibold text-strong",children:e}),l.jsx("p",{className:"max-w-[260px] text-xs text-muted-ink",children:t})]})}function xtt(){var s;const{t:e}=J("me"),[t,n]=b.useState(!1),i=((s=ctt().data)==null?void 0:s.count)??0;return l.jsxs("div",{className:"relative inline-block",children:[l.jsx(Mae,{unreadCount:i,open:t,onToggle:()=>n(a=>!a),labels:{ariaLabel:e("notifications.ariaLabel"),countAriaLabel:e("notifications.unreadCountAriaLabel",{count:i})}}),l.jsx(ptt,{open:t,onOpenChange:n,unreadCount:i})]})}function ytt(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{return[]}if(!Array.isArray(t))return[];const n=new Set,r=[];for(const i of t){if(!i||typeof i!="object")continue;const{course:s,location:a}=i;
1668if(typeof s!="string"||typeof a!="string"||!s.trim()||!a.trim())continue;const o=`${s}\0${a}`;n.has(o)||(n.add(o),r.push({course:s,location:a}))}return r}const btt={list_my_courses:{running:"Checking your coursesâ¦",done:"Reviewed your courses"},get_my_weak_skills:{running:"Finding where you need practiceâ¦",done:"Found where you need practice"},search_course_material:{running:"Searching your course materialâ¦",done:"Checked your course material"}};function vtt(e,t){const n=btt[e];if(n)return t==="running"?n.running:n.done;const r=e.replace(/_/g," ").trim();return t==="running"?`Working: ${r}â¦`:r}function hce({reasoning:e,steps:t,isStreaming:n=!1}){const{t:r}=J("assistant"),[i,s]=b.useState(!1),a=e.length===0&&t.length===0;return a&&!n?null:a?l.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-edition-pale/40 px-3 py-2 text-xs text-body-ink",children:[l.jsx(Fi,{className:"h-3.5 w-3.5 shrink-0 text-primary motion-safe:animate-pulse",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{className:"font-semibold text-strong",children:r("glassbox.thinking","Arthur is thinkingâ¦")}),l.jsx("span",{className:"text-muted-foreground",children:r("glassbox.thinkingHint","He shows his working here as it comes.")})]}):l.jsxs("div",{className:"rounded-xl border border-border bg-edition-pale/40",children:[l.jsxs("button",{type:"button",onClick:()=>s(o=>!o),"aria-expanded":i,className:"flex w-full items-center gap-2 px-3 py-2 text-start text-xs font-semibold text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1",children:[l.jsx(Fi,{className:"h-3.5 w-3.5 text-primary motion-safe:animate-pulse",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{children:r("glassbox.title","How Arthur is working")}),l.jsx(ad,{className:`ml-auto h-3.5 w-3.5 text-muted-foreground transition-transform ${i?"rotate-180":""}`,strokeWidth:1.75,"aria-hidden":"true"})]}),i&&l.jsxs("div",{className:"space-y-2 border-t border-border/70 px-3 py-2.5",children:[t.length>0&&l.jsx("ul",{className:"space-y-1.5",children:t.map(o=>{const c=o.status==="done"?ytt(o.result):[];return l.jsxs("li",{className:"flex flex-col gap-1 text-xs text-body-ink",children:[l.jsxs("span",{className:"flex items-center gap-2",children:[o.status==="running"?l.jsx(Qo,{className:"h-3.5 w-3.5 shrink-0 text-primary motion-safe:animate-spin",strokeWidth:1.75,"aria-hidden":"true"}):l.jsx(Kn,{className:"h-3.5 w-3.5 shrink-0 text-primary",strokeWidth:2,"aria-hidden":"true"}),l.jsx(LQ,{className:"h-3 w-3 shrink-0 text-muted-foreground",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{children:vtt(o.name,o.status)})]}),c.length>0&&l.jsx("ul",{className:"ml-5 space-y-1 border-l border-border/70 pl-3",children:c.map(u=>l.jsxs("li",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground",children:[l.jsx(Ci,{className:"mt-[2px] h-3 w-3 shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsxs("span",{children:[l.jsx("span",{className:"text-body-ink",children:u.course})," · ",u.location]})]},`${u.course} ${u.location}`))})]},o.id)})}),e.length>0&&l.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground",children:e})]})]})}function fce({size:e=36}){return l.jsx("span",{className:"inline-flex shrink-0 items-center justify-center rounded-full bg-brand-gradient text-white",style:{width:e,height:e},"aria-hidden":"true",children:l.jsx("svg",{width:Math.round(e*.52),height:Math.round(e*.52),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 4 2.5 8.5 12 13l9.5-4.5L12 4ZM6.6 10.8V15c0 1.5 2.5 3 5.4 3s5.4-1.5 5.4-3v-4.2M21.5 8.5v5"})})})}function mce({messages:e,streamingContent:t="",isStreaming:n=!1,userInitial:r="U",reasoning:i="",steps:s=[]}){const{t:a}=J("assistant"),o=b.useRef(null);return b.useEffect(()=>{const c=o.current;c&&(c.scrollTop=c.scrollHeight)},[e,t,n]),l.jsx("div",{ref:o,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-6",role:"log","aria-live":"polite","aria-label":a("messages.ariaLabel"),children:l.jsxs("ul",{className:"mx-auto flex max-w-3xl flex-col gap-6",children:[e.map(c=>l.jsx(wtt,{message:c,userInitial:r},c.id)),n&&l.jsxs("li",{className:"flex items-start gap-3",children:[l.jsx(fce,{}),l.jsxs("div",{className:"flex min-w-0 max-w-[85%] flex-col gap-1.5",children:[l.jsx("p",{className:"text-xs font-semibold text-strong",children:a("messages.assistantLabel")}),l.jsx(hce,{reasoning:i,steps:s,isStreaming:n}),t.length>0?l.jsx("div",{className:"rounded-2xl rounded-tl-sm border border-border bg-card px-4 py-3 text-sm leading-relaxed text-body-ink",children:l.jsx(Jx,{content:t})}):l.jsx("div",{className:"inline-flex w-fit items-center gap-2 rounded-2xl rounded-tl-sm border border-border bg-card px-4 py-3",children:l.jsx(Stt,{})})]})]})]})})}function wtt({message:e,userInitial:t}){const{t:n}=J("assistant");return e.role==="USER"?l.jsxs("li",{className:"flex flex-row-reverse items-start gap-3",children:[l.jsx(cR,{fallback:t,size:"sm",className:"mt-0.5 shrink-0 text-white",style:{background:"var(--primary-gradient)"}}),l.jsx("div",{className:"max-w-[85%] rounded-2xl rounded-tr-sm bg-primary px-4 py-3 text-sm leading-relaxed text-white",children:l.jsx("p",{className:"whitespace-pre-wrap break-words",children:e.content})})]}):l.jsxs("li",{className:"flex items-start gap-3",children:[l.jsx(fce,{}),l.jsxs("div",{className:"flex min-w-0 max-w-[85%] flex-col gap-1.5",children:[l.jsx("p",{className:"text-xs font-semibold text-strong",children:n("messages.assistantLabel")}),e.trace?l.jsx(hce,{reasoning:e.trace.reasoning,steps:e.trace.steps}
1668):null,l.jsx("div",{className:"rounded-2xl rounded-tl-sm border border-border bg-card px-4 py-3 text-sm leading-relaxed text-body-ink",children:l.jsx(Jx,{content:e.content})})]})]})}function Stt(){return l.jsxs("div",{className:"flex items-center gap-1.5 motion-reduce:animate-none","aria-hidden":"true",children:[l.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-edition-primary motion-reduce:animate-none"}),l.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-edition-primary/70 motion-reduce:animate-none",style:{animationDelay:"150ms"}}),l.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-edition-primary/40 motion-reduce:animate-none",style:{animationDelay:"300ms"}})]})}const uj=4e3;function pce({onSend:e,onStop:t,isStreaming:n=!1,disabled:r=!1,placeholder:i,initialValue:s}){const{t:a}=J("assistant"),[o,c]=b.useState(s??""),u=b.useRef(null),d=b.useRef(void 0);b.useEffect(()=>{s&&s!==d.current&&(d.current=s,c(s),window.setTimeout(()=>{var x;return(x=u.current)==null?void 0:x.focus()},0))},[s]),b.useEffect(()=>{const x=u.current;x&&(x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,160)}px`)},[o]);const h=o.trim(),f=!r&&!n&&h.length>0,m=()=>{f&&(e(h.slice(0,uj)),c(""))},p=x=>
1668{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),m())};return l.jsxs("div",{className:"bg-background px-4 pb-4 pt-3",children:[l.jsxs("div",{className:"mx-auto flex max-w-3xl items-end gap-2 rounded-2xl border border-border bg-card px-3 py-2.5 transition-colors focus-within:border-edition-soft",children:[l.jsx(Io,{ref:u,value:o,onChange:x=>c(x.target.value),onKeyDown:p,placeholder:i??a("placeholder"),rows:1,disabled:r,"aria-label":a("placeholder"),maxLength:uj,className:"min-h-[44px] max-h-40 flex-1 resize-none border-0 bg-transparent px-1 py-1.5 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0"}),n&&t?l.jsx(Pn,{type:"button",variant:"outline",size:"md","aria-label":a("stop"),onClick:t,className:"shrink-0 rounded-full",children:l.jsx(RQ,{className:"h-4 w-4 fill-current","aria-hidden":"true"})}):l.jsx(Pn,{type:"button",variant:"outline",size:"md","aria-label":a("send"),disabled:!f,onClick:m,className:f?"shrink-0 rounded-full border-transparent text-white transition-[filter] hover:brightness-110":"shrink-0 rounded-full border-edition-soft/60 bg-edition-pale text-edition-deeper/50",style:f?{background:"var(--primary-gradient)"}:void 0,children:l.jsx(Pg,{className:"h-4 w-4","aria-hidden":"true"})})]}),o.length>3500&&l.jsx("p",{className:"mx-auto mt-1 max-w-3xl text-end text-xs text-muted-foreground","aria-live":"polite",children:a("charCount",{current:o.length,max:uj})}),l.jsx("p",{className:"mx-auto mt-1.5 max-w-3xl text-center text-[11px] leading-tight text-muted-foreground",children:a("disclosure","Arthur is an AI tutor and can make mistakes. Check important information.")})]})}const Ctt=(e={})=>["me","notes",e];function ktt(e={}){return At({queryKey:Ctt(e),queryFn:()=>_e.get(he.ME_LEARNING_NOTES,{params:e}),staleTime:15e3})}function _tt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.ME_LEARNING_NOTES,t),onSuccess:()=>{e.invalidateQueries({queryKey:["me","notes"]})}})}function UD(){const e=Tt();return rt({mutationFn:({id:t,data:n})=>_e.patch(he.meLearningNote(t),n),onSuccess:()=>{e.invalidateQueries({queryKey:["me","notes"]})}})}function VD(){const e=Tt();return rt({mutationFn:t=>_e.del(he.meLearningNote(t)),onSuccess:()=>{e.invalidateQueries({queryKey:["me","notes"]})}})}const Ttt=e=>["notes",e.courseId,e.week,e.day,e.lesson];function HD(e){return At({queryKey:Ttt(e),queryFn:()=>_e.get(he.ME_LEARNING_NOTES,{params:e}),enabled:!!e.courseId,staleTime:3e4})}const Z7="arthur:jump-to-anchor";function Ett(e){typeof window>"u"||window.dispatchEvent(new CustomEvent(Z7,{detail:e}))}function jtt(e){if(typeof e.blockIndex=="number")return e.blockIndex;if(!e.anchorBlockId)return null;const t=Number.parseInt(e.anchorBlockId,10);return Number.isFinite(t)?t:null}function Ntt(e){const t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Att({courseId:e,week:t,day:n,lesson:r}){const{t:i}=J("assistant"),a=HD({courseId:t!==null&&n!==null&&r!==null?e:"",week:t??0,day:n??0,lesson:r??0});if(a.isLoading)return l.jsx("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:i("tabs.notes.loading")});if(a.isError)return l.jsx("p",{role:"alert",className:"mx-4 my-4 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive",children:i("tabs.notes.error")});const o=a.data??[];return o.length===0?l.jsx(bc,{icon:l.jsx(qxe,{"aria-hidden":"true"}),title:i("tabs.notes.emptyTitle"),description:i("tabs.notes.emptyBody")}):l.jsx("ul",{className:"flex flex-col gap-2 px-3 py-3",children:o.map(c=>{const u=jtt(c),d=u!==null,h=l.jsxs(l.Fragment,{children:[c.anchorText&&l.jsxs("p",{className:"mb-1 border-s-2 border-edition-soft ps-2 text-xs italic text-muted-foreground",children:["â",c.anchorText,"â"]}),l.jsx("p",{className:"whitespace-pre-wrap break-words text-body-ink",children:c.content}),l.jsx("p",{className:"mt-1.5 text-[11px] text-muted-foreground",children:Ntt(c.createdAt)})]});return l.jsx("li",{children:d?l.jsx("button",{type:"button",onClick:()=>Ett({stepKey:c.stepKey,blockIndex:u}),"aria-label":i("tabs.notes.jumpAria"),className:"w-full rounded-lg border border-border bg-card px-3 py-2.5 text-start text-sm transition-colors hover:border-edition-soft hover:bg-edition-pale/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:h}):l.jsx("div",{className:"rounded-lg border border-border bg-card px-3 py-2.5 text-sm",children:h})},c.id)})})}function Mtt(e){const t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Rtt({courseId:e}){const{t}=J("assistant"),n=St(),r=FD({limit:20}),i=b.useMemo(()=>{var o;return(((o=r.data)==null?void 0:o.pages.flatMap(c=>c.data))??[]).filter(c=>c.courseId===e)},[r.data,e]),s=l.jsxs("div",{className:"px-3 pb-3 pt-1",children:[l.jsx(ce,{type:"button",variant:"primary",size:"sm",className:"w-full",leftIcon:l.jsx(f4,{className:"h-4 w-4"}),onClick:()=>n(ee.ME_PRACTICE),children:t("tabs.practice.startCta")}),l.jsx("p",{className:"mt-2 text-center text-[11px] text-muted-foreground",children:t("tabs.practice.note")})]});return r.isLoading?l.jsx("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:t("tabs.practice.loading")}
1668):r.isError?l.jsx("p",{role:"alert",className:"mx-4 my-4 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive",children:t("tabs.practice.error")}):i.length===0?l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[l.jsx(bc,{icon:l.jsx(f4,{"aria-hidden":"true"}),title:t("tabs.practice.emptyTitle"),description:t("tabs.practice.emptyBody")}),s]}):l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[l.jsx("p",{className:"px-3 pb-1 pt-3 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:t("tabs.practice.historyTitle")}),l.jsx("ul",{className:"flex flex-col gap-2 px-3 py-1",children:i.map(a=>l.jsxs("li",{className:"flex items-center justify-between gap-2 rounded-lg border border-border bg-card px-3 py-2.5 text-sm",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"font-medium text-strong",children:a.type}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[t("tabs.practice.questionsLabel",{correct:a.correctCount,total:a.totalQuestions})," ","· ",Mtt(a.startedAt)]})]}),a.scorePct!==null&&l.jsx(Oi,{variant:"default",size:"sm",children:t("tabs.practice.scoreLabel",{score:Math.round(a.scorePct)})})]},a.id))}),s]})}const qD=["me"];function Ps(e=!0){return At({queryKey:qD,queryFn:()=>_e.get(he.ME),enabled:e,staleTime:5*60*1e3})}function GD(){const e=Tt();return rt({mutationFn:t=>_e.patch(he.ME_PROFILE,t),onSuccess:t=>{e.setQueryData(qD,t)}})}const gce=Ew();function Ott(e,t,n){return xce(`${gce}${he.chatSessionMessagesStream(e)}`,t,n)}function Dtt(e,t,n){return xce(`${gce}${he.chatSessionMessagesAgentStream(e)}`,t,n)}function xce(e,t,n){const r=new AbortController,i=J0();return(async()=>{try{const s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...i?{Authorization:`Bearer ${i}`}:{}},body:JSON.stringify({content:t}),signal:r.signal});if(!s.ok||!s.body){const u=await s.text().catch(()=>"");n.onError(`Stream failed (${s.status}): ${u.slice(0,200)||s.statusText}`);return}const a=s.body.getReader(),o=new TextDecoder;let c="";for(;;){const{value:u,done:d}=await a.read();if(d)break;c+=o.decode(u,{stream:!0});let h=c.indexOf(` 1669 1670`);for(;h!==-1;){const f=c.slice(0,h);c=c.slice(h+2),uq(f,n),h=c.indexOf(` 1671 1672`)}}c.trim().length>0&&uq(c,n)}catch(s){if(s.name==="AbortError")return;n.onError(s.message??"Network error")}})(),{cancel:()=>r.abort()}}function uq(e,t){var s,a,o;let n="message";const r=[];for(const c of e.split(` 1673`))c.startsWith("event:")?n=c.slice(6).trim():c.startsWith("data:")&&r.push(c.slice(5).trim());if(r.length===0)return;let i;try{i=JSON.parse(r.join(` 1674`))}catch{return}n==="token"&&typeof i.token=="string"?t.onToken(i.token):n==="reasoning"&&typeof i.text=="string"?(s=t.onReasoning)==null||s.call(t,i.text):n==="tool_call"?(a=t.onToolCall)==null||a.call(t,{id:String(i.id??""),name:String(i.name??""),arguments:String(i.arguments??"")}):n==="tool_result"?(o=t.onToolResult)==null||o.call(t,{id:String(i.id??""),name:String(i.name??""),result:String(i.result??"")}):n==="done"?t.onDone({id:String(i.id??""),sessionId:String(i.sessionId??""),title:String(i.title??"")}):n==="error"&&t.onError(String(i.message??"Unknown stream error"))}const Ltt=9e4,Nw=["chat","sessions"],im=e=>["chat","session",e];function WD(){return At({queryKey:Nw,queryFn:()=>_e.get(he.CHAT_SESSIONS),staleTime:15e3})}function yce(e){return At({queryKey:e?im(e):["chat","session","noop"],queryFn:()=>_e.get(he.chatSession(e)),enabled:!!e,staleTime:0})}function bce(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CHAT_SESSIONS,t,{timeout:Ltt}),onSuccess:t=>{e.invalidateQueries({queryKey:Nw}),e.setQueryData(im(t.session.id),t.session)}})}function Ptt(){const e=Tt();return rt({mutationFn:({sessionId:t,title:n})=>_e.patch(he.chatSession(t),{title:n}),onSuccess:t=>{e.invalidateQueries({queryKey:Nw}),e.invalidateQueries({queryKey:im(t.id)})}})}function Itt(){const e=Tt();return rt({mutationFn:t=>_e.del(he.chatSession(t)),onSuccess:()=>{e.invalidateQueries({queryKey:Nw})}})}function vce(){const e=Tt(),[t,n]=b.useState({isStreaming:!1,partial:"",error:null,reasoning:"",steps:[]}),r=b.useRef(null),i=b.useRef("");b.useEffect(()=>()=>{var o;(o=r.current)==null||o.cancel()},[]);const s=b.useCallback(({sessionId:o,content:c})=>{var h;(h=r.current)==null||h.cancel();const u=`optimistic-${Date.now()}`;e.setQueryData(im(o),f=>f&&{...f,messages:[...f.messages,{id:u,sessionId:o,role:"USER",content:c,model:null,tokenCount:null,createdAt:new Date().toISOString()}]}),i.current="",n({isStreaming:!0,partial:"",error:null,reasoning:"",steps:[]});const d=at.key==="ciai"?Dtt:Ott;r.current=d(o,c,{onToken:f=>{i.current+=f,n(m=>({...m,partial:m.partial+f}))},onReasoning:f=>{n(m=>({...m,reasoning:m.reasoning+f}))},onToolCall:f=>{n(m=>({...m,steps:[...m.steps,{id:f.id,name:f.name,args:f.arguments,status:"running"}]}))},onToolResult:f=>{n(m=>({...m,steps:m.steps.map(p=>p.id===f.id?{...p,status:"done",result:f.result}:p)}))},onDone:({id:f,sessionId:m,title:p})=>{const x=i.current;e.setQueryData(im(m),v=>v&&(v.messages.some(g=>g.id===f)?p&&p!==v.title?{...v,title:p}:v:{...v,title:p||v.title,messages:[...v.messages,{id:f,sessionId:m,role:"ASSISTANT",content:x,model:null,tokenCount:null,createdAt:new Date().toISOString()}]})),i.current="",n({isStreaming:!1,partial:"",error:null,reasoning:"",steps:[]}
1674),e.invalidateQueries({queryKey:im(m)}),e.invalidateQueries({queryKey:Nw}),r.current=null},onError:f=>{i.current="",n(m=>({...m,isStreaming:!1,error:f,reasoning:"",steps:[]})),e.invalidateQueries({queryKey:im(o)}),r.current=null}})},[e]),a=b.useCallback(()=>{var o;(o=r.current)==null||o.cancel(),r.current=null,i.current="",n(c=>({...c,isStreaming:!1,reasoning:"",steps:[]}))},[]);return{...t,send:s,cancel:a}}const Ftt=["chat","notes","practice"],dj="chatTab",Wy="ple.assistant.activeSessionId",Btt=/^\/me\/courses\/([^/]+)\/learn$/;function wce({size:e=32}){return l.jsx("span",{className:"flex shrink-0 items-center justify-center rounded-full bg-brand-gradient text-white",style:{width:e,height:e},"aria-hidden":"true",children:l.jsx("svg",{width:Math.round(e*.55),height:Math.round(e*.55),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 4 2.5 8.5 12 13l9.5-4.5L12 4ZM6.6 10.8V15c0 1.5 2.5 3 5.4 3s5.4-1.5 5.4-3v-4.2M21.5 8.5v5"})})})}const ztt=["Explain this in simpler terms.","Give me a simple example.","Quiz me with one question.","What should I review next?"],$tt=["Summarize this lesson in 3 bullets.","What are the most important concepts here?","Quiz me on this lesson with one question.","How would I use this in real life?"];function Utt({open:e,onClose:t,initialMessage:n}){var me,U,ae,Ce,je;const{t:r}=J("assistant"),i=Ps(),s=is(),{courseId:a}=Ec(),[o,c]=ps(),u=b.useMemo(()=>{if(!a||!Btt.test(s.pathname))return null;const ve=o.get("w"),Te=o.get("d"),Se=o.get("l"),He=Number(ve),tt=Number(Te),we=Number(Se);return ve!==null&&Te!==null&&Se!==null&&Number.isFinite(He)&&Number.isFinite(tt)&&Number.isFinite(we)?{courseId:a,lessonRefKey:`${a}:${He}:${tt}:${we}`,week:He,day:tt,lesson:we}:{courseId:a,lessonRefKey:null,week:null,day:null,lesson:null}},[a,s.pathname,o]),[d,h]=b.useState(()=>typeof window>"u"?null:window.localStorage.getItem(Wy)),[f,m]=b.useState("chat");b.useEffect(()=>{e||m("chat")},[e]);const p=yce(e?d:null),x=WD(),v=bce(),g=vce(),y=o.get(dj),w=y&&Ftt.includes(y)?y:"chat",S=ve=>{c(Te=>{const Se=new URLSearchParams(Te);return ve==="chat"?Se.delete(dj):Se.set(dj,ve),Se},{replace:!0})},k=((me=HD({courseId:(u==null?void 0:u.week)!=null?u.courseId:"",week:(u==null?void 0:u.week)??0,day:(u==null?void 0:u.day)??0,lesson:(u==null?void 0:u.lesson)??0}).data)==null?void 0:me.length)??0;b.useEffect(()=>{e||g.cancel()},[e]),b.useEffect(()=>{if(!e)return;const ve=Te=>{Te.key==="Escape"&&t()};return window.addEventListener("keydown",ve),()=>{window.removeEventListener("keydown",ve)}},[e,t]);const _=b.useRef(null);if(b.useEffect(()=>{var ve;e&&((ve=_.current)==null||ve.focus())},[e]),b.useEffect(()=>{d&&p.isError&&(window.localStorage.removeItem(Wy),h(null))},[d,p.isError]),!e)return null;const E=p.data,A=(E==null?void 0:E.messages)??[],j=v.isPending,D=g.isStreaming,M=j||D,$=((ae=(U=i.data)==null?void 0:U.firstName)==null?void 0:ae.charAt(0).toUpperCase())||((je=(Ce=i.data)==null?void 0:Ce.email)==null?void 0:je.charAt(0).toUpperCase())||"U",B=()=>{g.cancel(),h(null),window.localStorage.removeItem(Wy),m("chat")},z=ve=>{if(ve===d){m("chat");return}g.cancel(),h(ve),window.localStorage.setItem(Wy,ve),m("chat")},O=ve=>{if(d){g.send({sessionId:d,content:ve});return}v.mutate({courseId:u==null?void 0:u.courseId,lessonRefKey:(u==null?void 0:u.lessonRefKey)??void 0},{onSuccess:Te=>{const Se=Te.session.id;h(Se),window.localStorage.setItem(Wy,Se),g.send({sessionId:Se,content:ve})},onError:Te=>Vt.error(r("errors.sendFailed",{error:Te.message}))})},P=d?ee.ME_ASSISTANT:u?`${ee.ME_ASSISTANT}?courseId=${encodeURIComponent(u.courseId)}&lessonRefKey=${encodeURIComponent(u.lessonRefKey??"")}`:ee.ME_ASSISTANT,I=!d&&A.length===0&&!j,q=u?$tt:ztt,R=l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[d&&p.isLoading?l.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:r("loading")}):I?l.jsx(Htt,{suggestions:q,onPick:O,isBusy:M,hasContext:!!u}):l.jsx(mce,{messages:A,streamingContent:g.partial,isStreaming:D||j,userInitial:$,reasoning:g.reasoning,steps:g.steps}),!I&&g.error&&l.jsx("div",{role:"alert",className:"mx-3 mb-1 mt-2 rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:g.error}),l.jsx(pce,{onSend:O,onStop:g.cancel,isStreaming:M,disabled:p.isLoading||!!d&&!p.data,placeholder:r(u?"drawer.placeholderLesson":"placeholder"),initialValue:n})]}),xe=[{id:"chat",label:r("tabs.labels.chat")},{id:"notes",label:r("tabs.labels.notes"),badge:k},{id:"practice",label:r("tabs.labels.practice")}];return l.jsxs("aside",{ref:_,role:"dialog","aria-label":r("drawer.ariaLabel"),tabIndex:-1,
1674className:"fixed bottom-6 end-6 z-50 flex h-[min(70dvh,640px)] w-[min(420px,calc(100vw-3rem))] flex-col overflow-hidden rounded-2xl border border-border bg-background shadow-overlay outline-none",children:[l.jsxs("header",{className:"flex items-center justify-between gap-3 border-b border-border bg-card px-3 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[f==="history"?l.jsx(Pn,{"aria-label":r("drawer.backToChatAriaLabel"),size:"sm",variant:"ghost",onClick:()=>m("chat"),children:l.jsx(kx,{className:"h-4 w-4","aria-hidden":"true"})}):l.jsx(wce,{size:32}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-strong",children:r(f==="history"?"drawer.historyTitle":"drawer.title")}),f==="chat"&&u&&l.jsx("p",{className:"text-[11px] font-medium leading-tight text-primary",children:r("contextBanner.scoped")})]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[f==="chat"&&l.jsxs(l.Fragment,{children:[l.jsx(Pn,{"aria-label":r("drawer.showHistoryAriaLabel"),size:"sm",variant:"ghost",onClick:()=>m("history"),children:l.jsx(Hv,{className:"h-4 w-4","aria-hidden":"true"})}),l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:B,leftIcon:l.jsx(Gv,{className:"h-4 w-4"}),disabled:M&&!d,children:r("newChat")})]}),l.jsxs(ir,{to:P,onClick:t,className:"inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":r("drawer.openFullAriaLabel"),children:[l.jsx(IM,{className:"h-3.5 w-3.5","aria-hidden":"true"}),r("drawer.openFull")]}),l.jsx(Pn,{"aria-label":r("drawer.close"),size:"sm",variant:"ghost",onClick:t,children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f==="history"?l.jsx(Vtt,{sessionsQuery:x,activeSessionId:d,onSelect:z}):u?l.jsxs(Vae,{tabs:xe,activeTab:w,onTabChange:S,scrollable:w!=="chat","aria-label":r("tabs.ariaLabel"),children:[w==="chat"&&R,w==="notes"&&l.jsx(Att,{courseId:u.courseId,week:u.week,day:u.day,lesson:u.lesson}),w==="practice"&&l.jsx(Rtt,{courseId:u.courseId})]}):R]})}function Vtt({sessionsQuery:e,activeSessionId:t,onSelect:n}){const{t:r}=J("assistant");if(e.isLoading)return l.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:r("drawer.historyLoading")});if(e.isError)return l.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-destructive",children:r("drawer.historyError")});const i=e.data??[];return i.length===0?l.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:r("drawer.historyEmpty")}):l.jsx("ul",{className:"flex-1 overflow-y-auto overscroll-contain py-2",children:i.map(s=>{const a=s.id===t;return l.jsx("li",{children:l.jsxs("button",{type:"button",onClick:()=>n(s.id),className:`flex w-full items-start gap-2.5 px-3 py-2.5 text-start transition-colors focus-visible:outline-none ${a?"bg-edition-pale":"hover:bg-edition-pale/60 focus-visible:bg-edition-pale/60"}`,"aria-current":a?"true":void 0,children:[l.jsx(qv,{className:`mt-0.5 h-4 w-4 shrink-0 ${a?"text-primary":"text-edition-primary"}`,strokeWidth:1.75,"aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:`truncate text-sm font-medium ${a?"text-primary":"text-strong"}`,children:s.title}),s.lastMessage&&l.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:s.lastMessage})]})]})},s.id)})})}function Htt({suggestions:e,onPick:t,isBusy:n,hasContext:r}){const{t:i}=J("assistant");return l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-5 px-5 py-6 text-center",children:[l.jsx(wce,{size:56}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"text-card-title",children:i(r?"drawer.heroLesson.title":"drawer.hero.title")}),l.jsx("p",{className:"max-w-sm text-xs text-muted-foreground",children:i(r?"drawer.heroLesson.subtitle":"drawer.hero.subtitle")})]}),l.jsx("ul",{className:"grid w-full gap-2",children:e.map(s=>l.jsx("li",{children:l.jsx("button",{type:"button",disabled:n,onClick:()=>t(s),className:"w-full rounded-lg border border-border bg-card px-3 py-2.5 text-start text-xs text-body-ink transition-colors hover:border-edition-soft hover:bg-edition-pale/50 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",children:s})}
1674,s))})]})}const J7="arthur:ask-with-draft";function qtt(e){if(typeof window>"u")return;const t={text:e};window.dispatchEvent(new CustomEvent(J7,{detail:t}))}const Gtt=/^\/me\/courses\/[^/]+\/learn\/?$/;function Wtt(){const{t:e}=J("me"),t=is(),[n,r]=b.useState(!1),[i,s]=b.useState(!1),[a,o]=b.useState(void 0);return b.useEffect(()=>{const c=u=>{const d=u.detail;!d||typeof d.text!="string"||d.text.length===0||(o(h=>h===d.text?`${d.text}â`:d.text),r(!0))};return window.addEventListener(J7,c),()=>{window.removeEventListener(J7,c)}},[]),t.pathname.startsWith(ee.ME_ASSISTANT)||!Gtt.test(t.pathname)?null:l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:`fixed bottom-6 end-6 z-40 transition-opacity ${n?"pointer-events-none opacity-0":"opacity-100"}`,"data-testid":"floating-chat-bubble","aria-hidden":n,children:[l.jsx("button",{type:"button","aria-label":e("chatBubble.ariaLabel"),"aria-expanded":n,"aria-haspopup":"dialog",className:"group relative flex h-14 w-14 items-center justify-center rounded-full bg-brand-gradient text-white shadow-overlay transition-transform duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 motion-reduce:transition-none motion-reduce:hover:scale-100",onClick:()=>r(c=>!c),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onBlur:()=>s(!1),children:l.jsx(qv,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),i&&!n&&l.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full end-0 mb-2 whitespace-nowrap rounded-lg bg-strong px-3 py-1.5 text-xs font-medium text-on-dark shadow-overlay",children:e("chatBubble.openLabel")})]}),l.jsx(Utt,{open:n,onClose:()=>r(!1),initialMessage:a})]})}function Ytt({query:e,data:t,isLoading:n,isError:r,onSelect:i}){const{t:s}=J("common");if(e.length===0)return null;const a=o=>l.jsx("div",{role:"listbox","aria-label":s("header.search.results.ariaLabel"),className:"absolute end-0 top-full z-50 mt-2 flex w-[28rem] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-2xl border border-border bg-popover text-body-ink shadow-overlay",children:o});return n?a(l.jsx("p",{role:"status",className:"px-4 py-6 text-center text-sm text-muted-ink",children:s("header.search.results.loading")})):r?a(l.jsx("p",{role:"alert",className:"px-4 py-6 text-center text-sm text-clay",children:s("header.search.results.error")})):!t||t.totalCount===0?a(l.jsxs("div",{className:"flex flex-col items-center gap-3 px-6 py-10 text-center",children:[l.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx($M,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("p",{className:"text-sm text-muted-ink",children:s("header.search.results.empty",{query:e})})]})):a(l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"max-h-[60vh] overflow-y-auto overscroll-contain p-1.5",children:[t.courses.length>0&&l.jsx(hj,{label:s("header.search.results.groupCourses"),children:t.courses.map(o=>l.jsx(Ktt,{hit:o,onSelect:i},o.id))}),t.notes.length>0&&l.jsx(hj,{label:s("header.search.results.groupNotes"),children:t.notes.map(o=>l.jsx(Xtt,{hit:o,onSelect:i},o.id))}),t.helpArticles.length>0&&l.jsx(hj,{label:s("header.search.results.groupHelp"),children:t.helpArticles.map(o=>l.jsx(Qtt,{hit:o,onSelect:i},o.id))})]}),l.jsx(Ztt,{})]}))}function hj({label:e,children:t}){return l.jsxs("div",{className:"pb-1",children:[l.jsx("p",{className:"px-3 pb-1 pt-3 text-[9.5px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:e}),t]})}const YD="group/row flex items-center gap-3 rounded-xl px-3 py-2.5 text-sm transition-colors hover:bg-edition-pale focus-visible:bg-edition-pale focus-visible:outline-none";function KD({icon:e}){return l.jsx("span",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-[9px] bg-edition-pale text-edition-deeper",children:e})}function XD({label:e}){return l.jsx("span",{className:"flex-shrink-0 text-[10.5px] uppercase tracking-[0.08em] text-muted-ink",children:e})}function Ktt({hit:e,onSelect:t}){const{t:n}=J("common"),r=e.enrolled?Wa(e.id):OD(e.id);return l.jsxs(ir,{to:r,role:"option",onClick:t,className:YD,children:[l.jsx(KD,{icon:l.jsx(Ci,{className:"h-[17px] w-[17px]",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate font-medium text-strong",children:e.name}),e.description.length>0&&l.jsx("span",{className:"block truncate text-xs text-muted-ink",children:e.description})]}),l.jsx(XD,{label:n("header.search.results.groupCourses")})]})}function Xtt({hit:e,onSelect:t}){const{t:n}=J("common"),i=e.courseId!==null&&e.week!==null&&e.day!==null&&e.lesson!==null?ts(e.courseId,e.week,e.day,e.lesson):ee.ME_NOTES,s=e.excerpt.length>0?e.excerpt:n("header.search.results.noteFallbackTitle");return l.jsxs(ir,{to:i,role:"option",onClick:t,className:YD,children:[l.jsx(KD,{icon:l.jsx(Vv,{className:"h-[17px] w-[17px]",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-strong",children:s}),l.jsx(XD,{label:n("header.search.results.groupNotes")})]})}function Qtt({hit:e,onSelect:t}){const{t:n}=J("common");return l.jsxs(ir,{to:DD(e.slug),role:"option",onClick:t,className:YD,children:[l.jsx(KD,{icon:l.jsx(Pxe,{className:"h-[17px] w-[17px]",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate font-medium text-strong",children:e.title}),e.summary.length>0&&l.jsx("span",{className:"block truncate text-xs text-muted-ink",children:e.summary})]}),l.jsx(XD,{label:n("header.search.results.groupHelp")})]})}function Ztt(){return l.jsxs("div",{"aria-hidden":"true",className:"flex items-center gap-4 border-t border-border bg-card px-4 py-2.5 text-[11px] text-muted-ink",children:[l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx(fj,{children:"â"}),l.jsx(fj,{children:"â"}),"Navigate"]}),l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx(fj,{children:l.jsx(Exe,{className:"h-3 w-3",strokeWidth:1.75})}),"Select"]}),l.jsxs("span",{className:"ml-auto inline-flex items-center gap-1.5",children:[l.jsx(of,{className:"h-3.5 w-3.5 text-edition-deeper",strokeWidth:1.75}),"Ask Arthur anything"]})]})}function fj({children:e}){return l.jsx("kbd",{className:"inline-flex min-w-[18px] items-center justify-center rounded-[5px] border border-border bg-card px-1.5 py-0.5 font-mono text-[10.5px] font-medium text-muted-ink",children:e})}function Sce(){return at.legal.platform?l.jsx("span",{children:at.legal.copyright}):l.jsxs("span",{children:[at.legal.productName,at.legal.trademarked&&l.jsx("sup",{className:"text-[8px]",children:"â¢"}),at.legal.editionTag," â Powered by ","Eve-Education",l.jsx("sup",{className:"text-[8px]",children:"â¢"}),", a product of MindHYVE.ai",l.jsx("sup",{className:"text-[8px]",children:"â¢"}),", Inc."]})}const Jtt=["version","status"];function Cce(e=!0){return At({queryKey:Jtt,queryFn:()=>_e.get(he.VERSION_STATUS),enabled:e,staleTime:6e4,refetchInterval:5*6e4,refetchOnWindowFocus:!0,retry:1})}const ent={info:zm,maintenance:LQ,incident:lf},dq={info:"border-edition-soft bg-edition-pale text-edition-deeper",maintenance:"border-edition-soft bg-edition-pale text-edition-deeper",incident:"border-destructive/40 bg-destructive/10 text-destructive"};function hq(e,t){const n=new Date(e);if(Number.isNaN(n.getTime()))return"";
1674try{return n.toLocaleString(t||"en-US",{dateStyle:"medium",timeStyle:"short"})}catch{return n.toISOString()}}function kce({n:e,onDismiss:t}){const{t:n,i18n:r}=J("common"),i=ent[e.severity]??zm,s=e.active?e.endsAt?n("release.noticeUntil",{when:hq(e.endsAt,r.language)}):null:n("release.noticePlanned",{when:hq(e.startsAt,r.language)});return l.jsxs("div",{className:`flex items-start gap-2.5 rounded-xl border-[0.5px] px-3.5 py-2.5 text-sm ${dq[e.severity]??dq.info}`,"data-testid":"ple-status-notice",children:[l.jsx(i,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":!0}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"font-semibold",children:e.title})," ",l.jsx("span",{children:e.message}),s&&l.jsx("span",{className:"mt-0.5 block text-xs opacity-80",children:s})]}),t&&l.jsx("button",{type:"button","aria-label":n("release.dismiss"),onClick:t,className:"rounded p-0.5 opacity-70 hover:opacity-100",children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":!0})})]})}const _ce="ple:notices-dismissed";function tnt(){try{const e=JSON.parse(sessionStorage.getItem(_ce)??"[]");return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}catch{return[]}}function nnt(){const e=Cce();return l.jsx(rnt,{status:e.data})}function rnt({status:e}){const{t}=J("common"),[n,r]=b.useState(tnt),i=((e==null?void 0:e.notices)??[]).filter(a=>!n.includes(a.id));if(i.length===0)return null;const s=a=>{const o=[...n,a];r(o);try{sessionStorage.setItem(_ce,JSON.stringify(o))}catch{}};return l.jsx("section",{role:"status","aria-label":t("release.status"),className:"mb-4 space-y-2 print:hidden",children:i.map(a=>l.jsx(kce,{n:a,onDismiss:()=>s(a.id)},a.id))})}var fq={product:"CIAI",productKey:"ciai-app",version:"1.0.0",buildId:"120417",display:"1.0.0 (Build 120417)",component:"app",commit:"b8705c2",built:"2026-10-05T11:45:23Z",environment:"production",aiLabel:"Eve-Education F5/reasoner",critical:!1,criticalReason:null,notes:[{type:"New",text:"Version numbers and release notes now appear in the product"}],register:[{version:"1.0.0",buildId:"120417",component:"app",commit:"b8705c2",built:"2026-10-05T11:45:23Z",notes:[{type:"New",text:"Version numbers and release notes now appear in the product"}],critical:!1,criticalReason:null}]};const Tce=at.key==="ciai",int=Tce?"ciai-app":"arthurai-ple",snt=Tce?"CIAI":"ArthurAI⢠PLE",ant="Eve-Education F5/reasoner",ont=5*60*1e3,Ece=`${int}:last-seen-version`;function jce(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.version!="string"||typeof t.buildId!="string"||typeof t.product!="string"?null:{product:t.product,productKey:typeof t.productKey=="string"?t.productKey:"",version:t.version,buildId:t.buildId,display:typeof t.display=="string"&&t.display?t.display:`${t.version} (Build ${t.buildId})`,component:typeof t.component=="string"?t.component:"",commit:typeof t.commit=="string"?t.commit:"",built:typeof t.built=="string"?t.built:"",environment:typeof t.environment=="string"?t.environment:"production",aiLabel:typeof t.aiLabel=="string"?t.aiLabel:void 0,critical:t.critical===!0,criticalReason:t.critical===!0&&typeof t.criticalReason=="string"&&t.criticalReason.trim()?t.criticalReason.trim():null,notes:Array.isArray(t.notes)?t.notes:[],register:Array.isArray(t.register)?t.register:[]}}function Nce(e,t=at.key){return e?t==="arthur"?!0:!e.productKey.startsWith("arthurai")&&!e.product.includes("ArthurAI"):!1}function lnt(){const t=jce(typeof fq<"u"?fq:null);return Nce(t)?t:null}const dy=lnt();function cnt(e=dy,t=at.key){return t==="arthur"||e!==null}function mq(e){const t=/^(\d+)\.(\d+)\.(\d+)/.exec(e);return t?[Number(t[1]),Number(t[2]),Number(t[3])]:null}function unt(e,t){const n=mq(e),r=mq(t);if(!n||!r)return n?1:r?-1:0;for(let a=0;a<3;a++)if(n[a]!==r[a])return n[a]-r[a];const i=e.includes("-"),s=t.includes("-");return i===s?0:i?-1:1}function Ace(e,t){if(!e)return null;const n=t==null?void 0:t.product;return!n||n.key!==e.productKey||unt(n.version,e.version)<=0?e:{...e,version:n.version,buildId:n.buildId,display:n.display||`${n.version} (Build ${n.buildId})`}}function dnt(e){return e?`${e.product} ${e.display}`:""}async function hnt(e=fetch){try{const t=await e("/release.json",{cache:"no-store",credentials:"same-origin"});if(!t.ok)return null;const n=jce(await t.json());return Nce(n)?n:null}catch{return null}}function fnt(e,t){return mnt(e,t)?t!=null&&t.critical?"critical":"available":"current"}function mnt(e,t){return!!(e&&t&&e.buildId&&t.buildId&&e.buildId!==t.buildId)}async function pnt(e=Ew(),t=fetch){try{const n=await t(`${e}/version`,{cache:"no-store",credentials:"omit"});if(!n.ok)return null;const r=await n.json(),i=r&&typeof r.data=="object"&&r.data?r.data:r,s=i.product,a=u=>typeof u=="string"?u:"",o=a(i.buildId),c=a(i.commit);
1674return s&&typeof s.version=="string"?{product:{name:a(s.name),key:a(s.key),version:s.version,display:a(s.display)||s.version,buildId:a(s.buildId)},buildId:o,commit:c}:o?{product:null,buildId:o,commit:c}:null}catch{return null}}let mj=null;function Mce(e=!1){return dy?((!mj||e)&&(mj=pnt()),mj):Promise.resolve(null)}function gnt(e,t){if(!e||e.version.endsWith("-preview"))return!1;let n=null;try{n=t.getItem(Ece)}catch{return!1}return n!==null&&n!==e.version}function xnt(e,t){if(e)try{t.setItem(Ece,e.version)}catch{}}function pq({notes:e}){const{t}=J("common");return e.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:t("release.noNotes")}):l.jsx("ul",{className:"space-y-1.5",children:e.map(n=>l.jsxs("li",{className:"flex gap-2 text-sm",children:[l.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:t(`release.noteType.${n.type}`,{defaultValue:n.type})}),l.jsx("span",{children:n.text})]},`${n.type}:${n.text}`))})}function ynt(e,t){const n=new Date(e);if(Number.isNaN(n.getTime()))return"";try{return n.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})}catch{return n.toISOString().slice(0,10)}}function bnt(e){const t=e.product?`${e.product.name} ${e.product.display}`:`Build ${e.buildId}`;return e.commit?`${t} · ${e.commit}`:t}const vnt=()=>Mce(!0);function Rce({status:e}){const{t}=J("common");return l.jsxs("section",{"data-testid":"ple-about-status",children:[l.jsx("h3",{className:"mb-2 text-sm font-semibold",children:t("release.status")}),e&&e.notices.length>0?l.jsx("div",{className:"space-y-2",children:e.notices.map(n=>l.jsx(kce,{n},n.id))}):l.jsx("p",{className:"text-sm text-muted-foreground",children:t(e?"release.statusOk":"release.unavailable")})]})}function wnt(){const e=Cce();return l.jsx(Rce,{status:e.data})}function Oce({open:e,onOpenChange:t,mode:n="about",release:r=dy,loadApi:i=vnt,status:s}){const{t:a,i18n:o}=J("common"),[c,u]=b.useState(void 0);b.useEffect(()=>{if(!e)return;let p=!0;return u(void 0),i().then(x=>{p&&u(x)}),()=>{p=!1}},[e,i]);const d=Ace(r,c??null),h=(d==null?void 0:d.product)??snt,f=n==="whatsNew"&&r?a("release.whatsNewIn",{product:h,version:r.version}):a("release.about",{product:h}),m=((r==null?void 0:r.register)??[]).filter(p=>p.version!==(r==null?void 0:r.version)||p.buildId!==(r==null?void 0:r.buildId));return l.jsx(Px,{open:e,onOpenChange:t,children:l.jsxs(Ix,{children:[l.jsx(Fx,{className:"fixed inset-0 z-50 bg-black/50"}),l.jsxs(Bx,{"aria-describedby":"ple-about-version",className:"fixed left-1/2 top-1/2 z-50 flex max-h-[88dvh] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col rounded-2xl border border-border bg-card text-strong shadow-xl","data-testid":"ple-about-dialog",children:[l.jsxs("div",{className:"relative border-b border-border p-5 pe-12",children:[l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button","aria-label":a("release.close"),className:"absolute end-4 top-4 roun
1674ded p-1 hover:bg-muted",children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":!0})})}),l.jsx(zx,{className:"text-lg font-semibold",children:f}),l.jsx("p",{id:"ple-about-version",className:"mt-1 text-sm text-muted-foreground","data-testid":"ple-about-version",children:d?`${a("release.version")} ${d.version} · ${a("release.build")} ${d.buildId}`:a("release.devBuild")})]}),l.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto p-5",children:[n==="about"&&(s===void 0?l.jsx(wnt,{}):l.jsx(Rce,{status:s})),l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-sm font-semibold",children:a("release.whatsNew")}),l.jsx(pq,{notes:(r==null?void 0:r.notes)??[]})]}),m.length>0&&l.jsxs("details",{children:[l.jsx("summary",{className:"cursor-pointer text-sm font-semibold",children:a("release.history")}),l.jsx("ol",{className:"mt-2 space-y-3","data-testid":"ple-release-history",children:m.map(p=>l.jsxs("li",{children:[l.jsxs("div",{className:"text-xs font-medium text-muted-foreground",children:[p.version," · ",a("release.build")," ",p.buildId,p.built?` · ${ynt(p.built,o.language)}`:"",p.critical?` · ${a("release.criticalBadge")}`:""]}),p.notes.length>0&&l.jsx("div",{className:"mt-1",children:l.jsx(pq,{notes:p.notes})})]},`${p.version}:${p.buildId}`))})]}),l.jsxs("details",{"data-testid":"ple-release-details",children:[l.jsx("summary",{className:"cursor-pointer text-sm font-semibold",children:a("release.details")}),l.jsxs("dl",{className:"mt-2 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 text-sm",children:[l.jsx("dt",{className:"text-muted-foreground",children:a("release.app")}),l.jsx("dd",{"data-testid":"ple-app-version",children:r?`${r.product} ${r.display}${r.commit?` · ${r.commit}`:""}`:a("release.devBuild")}),l.jsx("dt",{className:"text-muted-foreground",children:a("release.api")}),l.jsx("dd",{"data-testid":"ple-api-version",children:c===void 0?"â¦":c?bnt(c):a("release.unavailable")}),l.jsx("dt",{className:"text-muted-foreground",children:a("release.ai")}),l.jsx("dd",{children:(r==null?void 0:r.aiLabel)||ant})]})]})]}),l.jsx("div",{className:"flex justify-end border-t border-border p-4",children:l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button",className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:opacity-90",children:a(n==="whatsNew"?"release.gotIt":"release.close")})})})]})]})})}function Snt(e=dy,t=Mce){const[n,r]=b.useState(void 0);return b.useEffect(()=>{if(!e)return;let i=!0;return t().then(s=>{i&&r(s)}),()=>{i=!1}},[e,t]),{release:Ace(e,n??null),api:n}}function Dce({className:e,prefix:t="",baked:n,load:r}){const{release:i}=Snt(n,r),s=dnt(i);return s?l.jsxs("span",{className:e,"data-testid":"ple-version-line",children:[t,s]}):null}function Cnt({release:e=dy}){const[t,n]=b.useState(!1);return b.useEffect(()=>{if(!e)return;let r;try{r=window.localStorage}catch{return}const i=gnt(e,r);xnt(e,r),i&&n(!0)},[e]),t?l.jsx(Oce,{open:t,onOpenChange:n,mode:"whatsNew",release:e}):null}function Lce(e){return e.mfaRequired===!0}function knt(){return rt({mutationFn:e=>_e.post(he.AUTH_SIGNIN,e)})}function _nt(){return rt({mutationFn:e=>_e.post(he.AUTH_MFA_VERIFY,e)})}function Tnt(){return rt({mutationFn:e=>_e.post(he.AUTH_SIGNUP,e)})}function Ent(){return rt({mutationFn:e=>_e.post(he.AUTH_FORGOT_PASSWORD,e)})}function jnt(){return rt({mutationFn:e=>_e.post(he.AUTH_RESET_PASSWORD,e)})}function Nnt(){return rt({mutationFn:e=>_e.post(he.AUTH_RECOVER_USERNAME,e)})}function Ant(){return rt({mutationFn:e=>_e.post(he.AUTH_VERIFY_EMAIL,e)})}function Pce(){return rt({mutationFn:e=>_e.post(he.AUTH_RESEND_VERIFICATION,e)})}function Mnt(){return rt({mutationFn:e=>_e.post(he.AUTH_UPDATE_PASSWORD,e)})}function a_(e){return{id:e.id,email:e.email,username:e.username,firstName:e.firstName,lastName:e.lastName,role:e.role,mustChangePassword:e.mustChangePassword}}function Rnt(){var c;const{t:e,i18n:t}=J("auth"),n=Ps(),r=Pce(),i=n.data;if(!i||i.isEmailVerified!==!1)return null;const s=i.emailVerificationRequiredBy?new Date(i.emailVerificationRequiredBy):null,a=s&&!Number.isNaN(s.getTime())?s.toLocaleDateString(t.language||"en-US",{weekday:"long",month:"long",day:"numeric"}):null,o=r.error instanceof AD&&((c=r.error.response)==null?void 0:c.status)===429;return l.jsxs("section",{role:"region","aria-label":e("verifyBanner.aria"),"data-testid":"verify-email-banner",className:"mb-4 flex flex-col gap-3 rounded-xl border-[0.5px] border-edition-soft bg-edition-pale px-4 py-3 text-sm text-edition-deeper sm:flex-row sm:items-center",children:[l.jsx(Bxe,{className:"hidden h-5 w-5 shrink-0 sm:block","aria-hidden":"true"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"font-medium",children:a?e("verifyBanner.titleBy",{date:a,email:i.email}):e("verifyBanner.title",{email:i.email})}),l.jsx("p",{className:"mt-0.5 text-xs",children:e("verifyBanner.body")}),l.jsx("p",{"aria-live":"polite",className:"mt-1 min-h-[1rem] text-xs",children:r.isSuccess?e("signup.success.resendSuccess"):o?e("signup.success.resendRateLimited"):r.isError?e("signup.success.resendError"):null})]}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",isLoading:r.isPending,onClick:()=>r.mutate({email:i.email}),children:e("signup.success.resend")})]})}const _p=["me","courses"],Ont=e=>[..._p,{status:e??"all"}],db=e=>["me","course",e];function gs(e){return At({queryKey:Ont(e),queryFn:()=>{const t=e?`${he.ME_COURSES}?status=${encodeURIComponent(e)}`:he.ME_COURSES;return _e.get(t)},staleTime:3e4})}function Ice(e){return At({queryKey:db(e??""),queryFn:()=>_e.get(he.meCourseDetail(e)),enabled:!!e,staleTime:15e3,refetchInterval:t=>{const n=t.state.data;return n&&!n.curriculum&&(n.curriculumStatus==="QUEUED"||n.curriculumStatus==="GENERATING")?1e4:!1}})}function QD(){const e=Tt();return rt({mutationFn:({courseId:t})=>_e.patch(he.meCourseArchive(t),void 0),onSuccess:()=>
1674{e.invalidateQueries({queryKey:_p})}})}function Dnt(){const e=Tt();return rt({mutationFn:({courseId:t})=>_e.patch(he.meCourseUnenrol(t),void 0),onSuccess:()=>{e.invalidateQueries({queryKey:_p})}})}function Lnt(){const e=Tt();return rt({mutationFn:({courseId:t})=>_e.patch(he.meCourseUnarchive(t),void 0),onSuccess:()=>{e.invalidateQueries({queryKey:_p})}})}function Pnt(){const e=Tt();return rt({mutationFn:({courseId:t,customName:n})=>_e.patch(he.meCourseCustomName(t),{customName:n}),onMutate:async({courseId:t,customName:n})=>{const r=db(t);await e.cancelQueries({queryKey:r});const i=e.getQueryData(r);return i&&e.setQueryData(r,{...i,customName:n}),{previous:i}},onError:(t,{courseId:n},r)=>{r!=null&&r.previous&&e.setQueryData(db(n),r.previous)},onSettled:(t,n,{courseId:r})=>{e.invalidateQueries({queryKey:db(r)}),e.invalidateQueries({queryKey:_p})}})}const Int=["courses","notes","helpArticles"],Fnt=Ue({id:Q(),name:Q(),description:Q(),imageUrl:Q().nullable(),enrolled:ni()}),Bnt=Ue({id:Q(),excerpt:Q(),courseId:Q().nullable(),week:Re().int().nullable(),day:Re().int().nullable(),lesson:Re().int().nullable(),updatedAt:sv.date()}),znt=Ue({id:Q(),slug:Q(),title:Q(),summary:Q()}),$nt=Ue({query:Q(),courses:bt(Fnt),notes:bt(Bnt),helpArticles:bt(znt),totalCount:Re().int().nonnegative()});function Unt(){const[e,t]=b.useState(""),[n,r]=b.useState(""),i=b.useRef(null),s=b.useCallback(c=>{const u=c.trim();t(c),r(u)},[]),a=b.useCallback(()=>{var c;(c=i.current)==null||c.focus()},[]),o=b.useCallback(()=>{t(""),r("")},[]);return{value:e,onSearch:s,inputRef:i,focus:a,query:n,reset:o}}const Vnt=(e,t,n)=>["me","search",e,t.slice().sort().join(","),n],Fce=Int,Hnt=5,qnt=3e4;function Gnt(e,t,n){const r=new URLSearchParams;return r.set("q",e),t!==Fce&&t.length>0&&r.set("types",t.join(",")),r.set("limit",String(n)),`${he.ME_SEARCH}?${r.toString()}`}function Wnt(e,t={}){const n=t.types??Fce,r=t.limit??Hnt,i=e.trim(),s=(t.enabled??!0)&&i.length>0;return At({queryKey:Vnt(i,n,r),queryFn:async()=>{const a=await _e.get(Gnt(i,n,r));return $nt.parse(a)},enabled:s,staleTime:qnt,refetchOnWindowFocus:!1})}const gq=b.lazy(()=>_r(()=>import("./AnalyticsConsent-C4EoQTmc.js"),[]).then(e=>({default:e.CookieSettingsButton}))),xq=at.logoSrc,pj=at.logoFilter,Ynt="/logos/wordmark-ple.svg",Knt="var(--primary-gradient)",Xnt="hsl(var(--secondary))",Qnt="linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)))";function Znt(){var O,P,I;const{user:e,signOut:t,isAuthenticated:n}=yf(),{enabled:r,start:i,active:s,currentStepTargetsSidebar:a}=ID(),{t:o}=J("me");ttt(),ett();const{t:c}=J("common"),u=St(),h=is().pathname.startsWith(ee.ME_MARKETPLACE),[f,m]=b.useState(!1),[p,x]=b.useState(!1),[v,g]=b.useState(!1);PD(p);const y=Let(),w=b.useRef(!1);b.useEffect(()=>{!r||!window.matchMedia("(max-width: 640px)").matches||(s&&a?p||(w.current=!0,x(!0)):w.current&&(w.current=!1,x(!1)))},[r,s,a]);const S=gs(),C=lce(),k=Unt(),_=Wnt(k.query,{enabled:n}),E=async()=>{await t(),u(ee.AUTH_LOGIN)},A=((O=S.data)==null?void 0:O.length)??0,j=C.count,D=b.useRef(k.focus);D.current=k.focus,b.useEffect(()=>{function q(R){(R.metaKey||R.ctrlKey)&&R.key.toLowerCase()==="k"&&(R.preventDefault(),D.current())}return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const M=b.useMemo(()=>[{label:o("sidebar.sections.learning"),items:[{label:o("nav.home"),href:ee.ME_HOME,icon:l.jsx(kQ,{})},{label:o("nav.courses"),href:ee.ME_COURSES,icon:l.jsx(Ci,{}),badge:A},{label:o("nav.practice"),href:ee.ME_PRACTICE,icon:l.jsx(f4,{}),badge:j},{label:o("nav.calendar"),href:ee.ME_CALENDAR,icon:l.jsx(h4,{})},{label:o("nav.library"),href:ee.ME_LIBRARY,icon:l.jsx(LM,{})}]},{label:o("sidebar.sections.discover"),items:[{label:o("nav.marketplace"),href:ee.ME_MARKETPLACE,icon:l.jsx(AQ,{})},{label:o("nav.askArthur"),href:ee.ME_ASSISTANT,icon:l.jsx(Rn,{})}]},{label:"",items:[{label:o("nav.help"),href:ee.ME_HELP,icon:l.jsx(_xe,{})}]}],[o,A,j]),$=b.useMemo(()=>[ee.ME_HELP],[]),B=((((P=e==null?void 0:e.firstName)==null?void 0:P[0])??"")+(((I=e==null?void 0:e.lastName)==null?void 0:I[0])??"")).trim().toUpperCase(),z=l.jsxs(l.Fragment,{children:[!h&&l.jsxs("div",{className:"relative hidden w-64 md:block",children:[l.jsx(Ex,{ref:k.inputRef,value:k.value,onSearch:k.onSearch,placeholder:c("header.search.placeholder"),"aria-label":c("header.search.ariaLabel"),className:""}),l.jsx("kbd",{"aria-hidden":"true",className:"pointer-events-none absolute end-3 top-1/2 hidden -translate-y-1/2 roun
1674ded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold text-muted-foreground lg:inline-block",children:c("header.search.kbdHint")}),l.jsx(Ytt,{query:k.query,data:_.data,isLoading:_.isLoading&&_.fetchStatus!=="idle",isError:_.isError,onSelect:k.reset})]}),y.actions,l.jsx(xtt,{}),l.jsx(Aae,{displayName:e?`${e.firstName} ${e.lastName}`.trim()||e.email:o("profile.guest"),roleLabel:o((e==null?void 0:e.role)==="admin"?"profile.admin":"profile.student"),avatarContent:B||l.jsx(Lb,{className:"h-5 w-5","aria-hidden":"true"}),avatarStyle:{background:Qnt},menuItems:[...r?[{icon:Bm,label:o("tour.launch"),desc:o("tour.launchDesc"),iconBg:"hsl(var(--primary) / 0.10)",iconClass:"text-primary",hover:"hover:bg-muted",action:()=>i()}]:[],{icon:NQ,label:o("profile.menu.settings"),desc:o("profile.menu.settingsDesc"),iconBg:"hsl(var(--primary) / 0.10)",iconClass:"text-primary",hover:"hover:bg-muted",action:()=>u(ee.ME_SETTINGS)},...cnt()?[{icon:zm,label:o("profile.menu.about"),desc:o("profile.menu.aboutDesc"),iconBg:"hsl(var(--primary) / 0.10)",iconClass:"text-primary",hover:"hover:bg-muted",action:()=>g(!0)}]:[],{icon:TQ,label:o("profile.menu.signOut"),desc:o("profile.menu.signOutDesc"),iconBg:"hsl(var(--destructive) / 0.10)",iconClass:"text-destructive",labelClass:"text-destructive",hover:"hover:bg-destructive/5",action:()=>void E()}],labels:{ariaLabel:o("profile.menu.ariaLabel")}})]});return l.jsxs("div",{className:"flex min-h-[100dvh] flex-col bg-background md:h-[100dvh] md:flex-row md:overflow-hidden",children:[l.jsx(yle,{sections:M,helpRoutes:$,collapsed:f,onToggleCollapsed:()=>m(q=>!q),mobileOpen:p,onMobileOpenChange:x,defaultLogoSrc:xq,defaultLogoFilter:pj,brandMarkSrc:Ynt,variant:"light",brandName:at.name,brandSubtitle:at.subtitle,primaryColor:Knt,secondaryColor:Xnt,labels:{ariaLabel:o("sidebar.ariaLabel"),collapseSidebar:o("sidebar.collapse"),expandSidebar:o("sidebar.expand"),primaryNavAriaLabel:o("sidebar.primaryNavAriaLabel"),logoAlt:o("sidebar.logoAlt"),brandMarkAlt:o("sidebar.brandMarkAlt")}}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col pb-[calc(3.25rem+env(safe-area-inset-bottom))] md:overflow-hidden md:pb-0",children:[l.jsx("div",{className:"sticky top-0 z-40 shrink-0 bg-background px-[max(1.5rem,env(safe-area-inset-left))] pe-[max(1.5rem,env(safe-area-inset-right))] pt-[max(1rem,env(safe-area-inset-top))] md:static md:bg-transparent",children:l.jsx(Oae,{leading:l.jsxs("div",{className:"-ms-1 flex shrink-0 items-center gap-2 md:hidden",children:[l.jsx("img",{src:xq,alt:"","aria-hidden":"true",className:"h-8 w-8 rounded-lg object-contain",style:pj?{filter:pj}:void 0}),l.jsx("span",{className:"text-sm font-semibold tracking-tight text-strong",children:at.name})]}),left:l.jsx("div",{className:"hidden md:block",children:y.left}),right:z})}),l.jsxs("main",{id:"main-content",className:"flex-1 px-[max(1.5rem,env(safe-area-inset-left))] pe-[max(1.5rem,env(safe-area-inset-right))] py-4 md:overflow-auto md:overscroll-contain md:pb-[max(1rem,env(safe-area-inset-bottom))]",children:[y.left?l.jsx("div",{className:"mb-4 md:hidden",children:y.left}):null,l.jsx(Rnt,{}),l.jsx(nnt,{}),l.jsx($v,{})]}),l.jsx(ble,{copyright:l.jsxs(l.Fragment,{children:[l.jsx(Sce,{}),l.jsx(Dce,{prefix:" · "}),gq?l.jsxs(l.Fragment,{children:[" · ",l.jsx(b.Suspense,{fallback:null,children:l.jsx(gq,{className:"underline underline-offset-2"})})]}):null]}),className:"h-auto min-h-9 flex-wrap bg-transparent py-1.5 text-center"})]}),l.jsx(Oce,{open:v,onOpenChange:g}),l.jsx(Cnt,{}),l.jsx(ott,{onOpenMore:()=>x(!0),coursesBadge:A,practiceBadge:j}),l.jsx("div",{className:"hidden md:block",children:l.jsx(Wtt,{})})]})}function Jnt(){return l.jsx(Det,{children:l.jsx($et,{children:l.jsx(Znt,{})})})}const Bce=["interview"];function bf(){return At({queryKey:Bce,queryFn:()=>_e.get(he.INTERVIEW),staleTime:0})}function ert(){const e=Tt();return rt({mutationFn:t=>_e.post(he.INTERVIEW_CHAT,t),onSuccess:t=>{t.type==="summary"&&(rce(),e.invalidateQueries({queryKey:Bce}))}})}const trt=[{labelKey:"groups.account",tabs:[{to:ee.ME_SETTINGS_PROFILE,labelKey:"tabs.profile",Icon:Lb},{to:ee.ME_SETTINGS_SECURITY,labelKey:"tabs.security",Icon:Db},{to:ee.ME_SETTINGS_NOTIFICATIONS,labelKey:"tabs.notifications",Icon:Rb}]},{labelKey:"groups.preferences",tabs:[{to:ee.ME_SETTINGS_APPEARANCE,labelKey:"tabs.appearance",Icon:EQ},{to:ee.ME_SETTINGS_LEARNING_PREFERENCES,labelKey:"tabs.learningPreferences",Icon:ki}]},{labelKey:"groups.learning",tabs:[{to:ee.ME_LEARNING_PROFILE,matchPrefix:ee.ME_LEARNING_PROFILE,labelKey:"tabs.learningProfile",Icon:Fi},{to:ee.ME_INTERVIEW,matchPrefix:ee.ME_INTERVIEW,labelKey:"tabs.interview",Icon:FM},{to:ee.ME_CAREER,matchPrefix:ee.ME_CAREER,labelKey:"tabs.career",Icon:yQ,requiresInterview:!0}]},{labelKey:"groups.billing",tabs:[{to:ee.ME_ORDERS,matchPrefix:ee.ME_ORDERS,labelKey:"tabs.orders",Icon:Hv},{to:ee.ME_SETTINGS_INVOICES,labelKey:"tabs.invoices",Icon:Vv}]},{labelKey:"groups.credentials",tabs:[{to:ee.ME_SETTINGS_CERTIFICATES,matchPrefix:ee.ME_SETTINGS_CERTIFICATES,labelKey:"tabs.certificates",Icon:Mb}]}];function nrt(){const{t:e}=J("settings"),t=is(),n=b.useMemo(()=>l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-xl bg-edition-pale p-2 text-primary",children:l.jsx(NQ,{className:"h-6 w-6","aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light text-strong",children:l.jsx("span",{className:"font-medium text-primary",children:e("page.title")})}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("page.subtitle")})]})]}),[e,t.pathname]);On({left:n},{mode:"default"})}function rrt(){const{t:e}=J("settings"),t=is();nrt();const{data:n}
1674=bf(),r=(n==null?void 0:n.status)==="COMPLETED",i=n!==void 0,s=a=>{const o=a.matchPrefix??a.to;return t.pathname===a.to||t.pathname.startsWith(`${o}/`)?!0:t.pathname===o};return l.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-[260px,1fr]",children:[l.jsx("nav",{"aria-label":e("tabs.ariaLabel"),className:"flex flex-col gap-4 rounded-2xl border border-border bg-card p-3 lg:sticky lg:top-6 lg:self-start",children:trt.map(a=>l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("p",{className:"px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:e(a.labelKey)}),l.jsx("ul",{className:"flex flex-col gap-1",children:a.tabs.map(o=>{const c=s(o);return o.requiresInterview===!0&&i&&!r?l.jsx("li",{children:l.jsxs("span",{"aria-disabled":"true",title:e("tabs.careerLocked"),className:re("flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm","cursor-not-allowed font-normal text-muted-ink/60"),children:[l.jsx(o.Icon,{className:"h-5 w-5","aria-hidden":"true"}),l.jsx("span",{className:"flex-1",children:e(o.labelKey)}),l.jsx(Di,{className:"h-3.5 w-3.5","aria-hidden":"true"})]})},o.to):l.jsx("li",{children:l.jsxs(yk,{to:o.to,end:o.to===ee.ME_SETTINGS_PROFILE,className:re("ds-touch-target","flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",c?"bg-edition-pale font-medium text-edition-deeper":"font-normal text-body-ink hover:bg-cream hover:text-strong"),"aria-current":c?"page":void 0,children:[l.jsx(o.Icon,{className:"h-5 w-5","aria-hidden":"true"}),l.jsx("span",{children:e(o.labelKey)})]})},o.to)})})]},a.labelKey))}),l.jsx("section",{"aria-label":e("page.title"),className:"flex min-w-0 flex-col gap-5",children:l.jsx($v,{})})]})}const zce=["English","Spanish","French","German","Italian","Portuguese","Russian","Chinese (Mandarin)","Chinese (Cantonese)","Japanese","Korean","Arabic","Hindi","Bengali","Urdu","Punjabi","Tagalog","Vietnamese","Turkish","Persian","Swahili","Other"],yq={en:"English",es:"Spanish",fr:"French",de:"German",it:"Italian",pt:"Portuguese",ru:"Russian",zh:"Chinese (Mandarin)",ja:"Japanese",ko:"Korean",ar:"Arabic",hi:"Hindi",bn:"Bengali",ur:"Urdu",pa:"Punjabi",tl:"Tagalog",vi:"Vietnamese",tr:"Turkish",fa:"Persian",sw:"Swahili",other:"Other"},irt=new Map(zce.map(e=>[e.toLowerCase(),e]));function srt(e){if(typeof e!="string")return null;const t=e.trim();if(!t)return null;const n=irt.get(t.toLowerCase());if(n)return n;const r=yq[t.toLowerCase()];if(r)return r;const i=t.toLowerCase().split(/[-_]/)[0];return yq[i]??null}const tg=at.minSelfSignupAge,art="https://fle.arthurgrid.ai",ort=at.underMinAge.message,$ce=Q().min(8,"Password must be at least 8 characters").regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,"Password must contain uppercase, lowercase, and number"),Uce=Ue({identifier:Q().min(1,"Email or username is required"),password:Q().min(1,"Password is required"),rememberMe:ni().optional().default(!1)}),lrt=Ue({firstName:Q().min(1,"First name is required").trim(),lastName:Q().trim().optional(),email:Q().email("Invalid email address").toLowerCase().trim(),password:$ce,ageConfirmed:Ah(!0,{errorMap:()=>({message:ort})}),website:Q().optional()}),crt=Ue({email:Q().email("Invalid email address").toLowerCase().trim()}),urt=Ue({newPassword:$ce,confirmPassword:Q().min(1,"Confirm your password")}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]}),drt=Ue({email:Q().email("Invalid email address").toLowerCase().trim()});Uce.omit({rememberMe:!0});const gS=400;function hrt(e){var s,a;const{firstName:t,lastName:n,email:r,profile:i}=e;return{firstName:t??"",lastName:n??"",email:r??"",phoneNumber:((s=i==null?void 0:i.preferences)==null?void 0:s.phoneNumber)??"",age:(i==null?void 0:i.age)!=null?String(i.age):"",nativeLanguage:srt(i==null?void 0:i.nativeLanguage)??"",bio:((a=i==null?void 0:i.preferences)==null?void 0:a.bio)??""}}function frt({me:e}){const{t}=J("settings"),n=GD(),[r,i]=b.useState(()=>hrt(e)),s=b.useMemo(()=>zce.map(h=>({value:h,label:h})),[]),a=n.isPending,o=r.bio.length,c=o>gS,u=(h,f)=>{i(m=>({...m,[h]:f}))},d=async h=>{if(h.preventDefault(),c){Vt.error(t("profile.bioTooLong"));return}const f=r.age.trim()===""?null:parseInt(r.age,10);if(f!==null&&Number.isFinite(f)&&f<tg){Vt.error(t("profile.ageTooYoung"));return}if(!(f===null||Number.isFinite(f)&&f>=tg&&f<=120)){Vt.error(t("profile.saveError"));return}try{await n.mutateAsync({firstName:r.firstName.trim()||void 0,lastName:r.lastName.trim()||void 0,nativeLanguage:r.nativeLanguage.trim()||void 0,age:f,bio:r.bio,phoneNumber:r.phoneNumber.trim()}),Vt.success(t("profile.saveSuccess"))}catch{Vt.error(t("profile.saveError"))}};return l.jsx("section",{className:"rounded-2xl border border-border bg-card p-6",children:l.jsxs("form",{onSubmit:d,className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-edition-deeper","aria-hidden":"true",children:l.jsx(Lb,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-strong",children:t("profile.headerTitle")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:t("profile.headerDescription")})]})]}),l.jsx(ce,{type:"submit",variant:"primary",isLoading:a,leftIcon:a?void 0:l.jsx(zM,{className:"h-4 w-4",strokeWidth:1.75}
1674),disabled:c,className:"shrink-0 self-start",children:t(a?"common.saving":"common.saveChanges")})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 border-t border-border pt-6 md:grid-cols-2",children:[l.jsx(dr,{label:t("profile.fields.firstName"),htmlFor:"settings-firstName",children:l.jsx(fn,{id:"settings-firstName",value:r.firstName,onChange:h=>u("firstName",h.target.value),placeholder:t("profile.fields.firstNamePlaceholder"),autoComplete:"given-name"})}),l.jsx(dr,{label:t("profile.fields.lastName"),htmlFor:"settings-lastName",children:l.jsx(fn,{id:"settings-lastName",value:r.lastName,onChange:h=>u("lastName",h.target.value),placeholder:t("profile.fields.lastNamePlaceholder"),autoComplete:"family-name"})}),l.jsx(dr,{label:t("profile.fields.email"),htmlFor:"settings-email",hint:t("profile.fields.emailHint"),children:l.jsx(fn,{id:"settings-email",type:"email",value:r.email,readOnly:!0,tabIndex:-1,className:"bg-muted/30 text-muted-foreground",autoComplete:"email"})}),l.jsx(dr,{label:t("profile.fields.phoneNumber"),htmlFor:"settings-phone",children:l.jsx(fn,{id:"settings-phone",type:"tel",value:r.phoneNumber,onChange:h=>u("phoneNumber",h.target.value),placeholder:t("profile.fields.phoneNumberPlaceholder"),autoComplete:"tel"})}),l.jsx(dr,{label:t("profile.fields.age"),htmlFor:"settings-age",children:l.jsx(fn,{id:"settings-age",type:"number",min:tg,max:120,value:r.age,onChange:h=>u("age",h.target.value),placeholder:t("profile.fields.agePlaceholder")})}),l.jsx(dr,{label:t("profile.fields.nativeLanguage"),htmlFor:"settings-language",children:l.jsx(Ho,{options:s,value:r.nativeLanguage,onChange:h=>u("nativeLanguage",h),placeholder:t("profile.fields.nativeLanguagePlaceholder"),ariaLabel:t("profile.fields.nativeLanguage")})})]}),l.jsx(dr,{label:t("profile.fields.bio"),htmlFor:"settings-bio",hint:t("profile.bioHint",{remaining:Math.max(0,gS-o),max:gS}),children:l.jsx(Io,{id:"settings-bio",rows:4,value:r.bio,maxLength:gS,onChange:h=>u("bio",h.target.value),placeholder:t("profile.fields.bioPlaceholder"),"aria-invalid":c,"aria-describedby":c?"settings-bio-error":void 0})}),c&&l.jsx("p",{id:"settings-bio-error",role:"alert",className:"text-xs font-medium text-destructive",children:t("profile.bioTooLong")})]})})}function mrt(){const{t:e}=J("settings"),t=Ps();return t.isLoading||!t.data?l.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",role:"status","aria-live":"polite",children:e("common.saving")}):l.jsx("div",{className:"space-y-6",children:l.jsx(frt,{me:t.data},t.data.id)})}const ZD={"data-clarity-mask":"true"};function prt(){return rt({mutationFn:async()=>{const e=await _e.get(he.ME_DATA_EXPORT),t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(t);try{const r=document.createElement("a");r.href=n,r.download=`my-data-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(r),r.click(),r.remove()}finally{URL.revokeObjectURL(n)}}})}function grt(){return rt({mutationFn:({password:e})=>_e.post(he.ME_ACCOUNT_DELETE,{password:e,confirm:"DELETE"})})}function xrt(){const{t:e}=J("settings"),{signOut:t}=yf(),n=prt(),r=grt(),[i,s]=b.useState(!1),[a,o]=b.useState(""),[c,u]=b.useState(null),d=()=>{r.mutate({password:a},{onSuccess:h=>{u(h),o("")}})};return l.jsxs("section",{"aria-labelledby":"settings-privacy-heading",className:"space-y-5 rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-edition-deeper","aria-hidden":"true",children:l.jsx(Dg,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h2",{id:"settings-privacy-heading",className:"text-lg font-semibold text-strong",children:e("privacy.headingTitle")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:e("privacy.headingDescription")})]})]}),l.jsxs("div",{className:"rounded-xl border border-border p-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-strong",children:e("privacy.export.title")}),l.jsx("p",{className:"mt-1 text-sm text-body-ink",children:e("privacy.export.description")}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"mt-3",isLoading:n.isPending,leftIcon:n.isPending?void 0:l.jsx(Dg,{className:"h-4 w-4","aria-hidden":"true"}),onClick:()=>n.mutate(),children:n.isPending?e("privacy.export.preparing"):e("privacy.export.action")}),n.isError&&l.jsx("div",{className:"mt-2",role:"alert",children:l.jsx(lo,{variant:"error",message:e("privacy.export.error")})})]}),l.jsxs("div",{className:"rounded-xl border border-clay/40 bg-clay/5 p-4",children:[l.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-clay",children:[l.jsx(Fg,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),e("privacy.delete.title")]}),l.jsx("p",{className:"mt-1 text-sm text-body-ink",children:e("privacy.delete.description")}),c?l.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-card p-3",children:[l.jsx("p",{className:"text-sm font-medium text-strong",children:e("privacy.delete.doneTitle")}),l.jsx("p",{className:"mt-1 text-sm text-body-ink",children:e("privacy.delete.doneBody")}),l.jsx("ul",{className:"mt-2 list-disc space-y-1 ps-5 text-xs text-muted-ink",children:c.retained.map(h=>l.jsx("li",{children:h},h))}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",className:"mt-3",onClick:()=>void t(),children:e("privacy.delete.signOut")})]}):i?l.jsxs("div",{className:"mt-3 space-y-3 rounded-lg border border-clay/40 bg-card p-3",children:[l.jsxs("div",{className:"flex items-start gap-2 text-sm text-clay",children:[l.jsx(UM,{className:"mt-0.5 h-4 w-4 shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{children:e("privacy.delete.warning")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"delete-password",className:"mb-1 block text-sm font-medium text-strong",children:e("privacy.delete.passwordLabel")}),l.jsx("input",{id:"delete-password",type:"password",autoComplete:"current-password",value:a,onChange:h=>o(h.target.value),className:"w-full rounded-lg border border-input bg-card px-3 py-2 text-base text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary md:text-sm"})]}),r.isError&&l.jsx("div",{role:"alert",children:l.jsx(lo,{variant:"error",message:e(yrt(r.error))})}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>{s(!1),o("")},children:e("privacy.delete.cancel")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",isLoading:r.isPending,disabled:a.length===0,onClick:d,children:e("privacy.delete.confirm")})]})]}):l.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"mt-3 border-clay/50 text-clay",onClick:()=>s(!0),children:e("privacy.delete.action")})]})]})}function yrt(e){var n;const t=(n=e==null?void 0:e.response)==null?void 0:n.status;return t===401?"privacy.delete.wrongPassword":t===429?"privacy.delete.tooManyAttempts":"privacy.delete.failed"}const JD=["me","security","sessions"];function brt(e=!0){return At({queryKey:JD,queryFn:async()=>(await _e.get(he.ME_SECURITY_SESSIONS)).data,enabled:e,staleTime:3e4})}function vrt(){const e=Tt();return rt({mutationFn:t=>_e.del(he.meSecurityRevokeSession(t)),onSuccess:()=>
1674{e.invalidateQueries({queryKey:JD})}})}function wrt(){const e=Tt();return rt({mutationFn:()=>_e.post(he.ME_SECURITY_SESSIONS_REVOKE_OTHERS,{}),onSuccess:()=>{e.invalidateQueries({queryKey:JD})}})}const Vce=["me"];function Srt(){return rt({mutationFn:()=>_e.post(he.ME_SECURITY_MFA_ENROLL,{})})}function Crt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.ME_SECURITY_MFA_VERIFY,t),onSuccess:()=>{e.invalidateQueries({queryKey:Vce})}})}function krt(){const e=Tt();return rt({mutationFn:t=>_e.del(he.ME_SECURITY_MFA,{data:t}),onSuccess:()=>{e.invalidateQueries({queryKey:Vce})}})}const bq={current:"",next:"",confirm:""};function _rt(){var a,o;const{i18n:e}=J("settings"),t=Mnt(),n=Ps(),[r,i]=b.useState(null),s=b.useCallback(c=>{try{return new Date(c).toLocaleString(e.language,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return c}},[e.language]);return l.jsxs("div",{className:"space-y-6",...ZD,children:[l.jsx(Trt,{statusMessage:r,setStatusMessage:i,changePassword:t}),l.jsx(Ert,{formatDate:s}),l.jsx(jrt,{isEnabled:((a=n.data)==null?void 0:a.mfaEnabled)??!1,enrolledAt:((o=n.data)==null?void 0:o.mfaEnrolledAt)??null,formatDate:s}),l.jsx(xrt,{})]})}function Trt({statusMessage:e,setStatusMessage:t,changePassword:n}){const{t:r}=J("settings"),[i,s]=b.useState(bq),[a,o]=b.useState({current:!1,next:!1,confirm:!1}),c=(f,m)=>{s(p=>({...p,[f]:m}))},u=f=>{o(m=>({...m,[f]:!m[f]}))},d=async f=>{var m,p;if(f.preventDefault(),t(null),i.next!==i.confirm){t({kind:"error",text:r("security.password.errorMismatch")});return}if(i.next.length<8){t({kind:"error",text:r("security.password.errorTooShort")});return}if(!/(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/.test(i.next)){t({kind:"error",text:r("security.password.errorRequirements")});return}try{await n.mutateAsync({currentPassword:i.current,newPassword:i.next}),s(bq),t({kind:"success",text:r("security.password.success")})}catch(x){const v=(p=(m=x==null?void 0:x.response)==null?void 0:m.data)==null?void 0:p.message,g=v!=null&&v.includes("Password must contain")?r("security.password.errorRequirements"):v??r("security.password.errorGeneric");t({kind:"error",text:g})}},h=(f,m,p,x)=>{const v=`settings-pw-${f}`,g=a[f];return l.jsx(dr,{label:r(m),htmlFor:v,children:l.jsxs("div",{className:"relative",children:[l.jsx(fn,{id:v,type:g?"text":"password",value:i[f],onChange:y=>c(f,y.target.value),placeholder:r(p),autoComplete:x,className:"pr-12"}),l.jsx("button",{type:"button",onClick:()=>u(f),"aria-label":r(g?"security.password.hideAriaLabel":"security.password.showAriaLabel"),className:"ds-touch-target absolute right-2 top-1/2 inline-flex h-9 w-9 -translate-y-1/2 items-center justify-center rounded-lg text-muted-ink transition-colors hover:bg-edition-pale hover:text-edition-deeper focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:g?l.jsx(bk,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}):l.jsx(_x,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})})]})})};return l.jsxs("form",{onSubmit:d,className:"space-y-6 rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-edition-deeper","aria-hidden":"true",children:l.jsx(Db,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-strong",children:r("security.password.title")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:r("security.password.description")})]})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 border-t border-border pt-6 md:max-w-2xl",children:[h("current","security.password.current","security.password.currentPlaceholder","current-password"),l.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[h("next","security.password.new","security.password.newPlaceholder","new-password"),h("confirm","security.password.confirm","security.password.confirmPlaceholder","new-password")]})]}),e&&l.jsx("div",{role:e.kind==="error"?"alert":"status",className:e.kind==="error"?"rounded-lg border border-clay/30 bg-clay/10 px-4 py-3 text-sm text-clay":"rounded-lg border border-sage/30 bg-sage/10 px-4 py-3 text-sm text-sage",children:e.text}),l.jsx("div",{className:"flex justify-end pt-2",children:l.jsx(ce,{type:"submit",variant:"primary",isLoading:n.isPending,leftIcon:n.isPending?void 0:l.jsx(zM,{className:"h-4 w-4",strokeWidth:1.75}),disabled:!i.current||!i.next||!i.confirm,children:n.isPending?r("security.password.submitting"):r("security.password.submit")})})]})}function Ert({formatDate:e}){const{t}=J("settings-security"),n=brt(),r=vrt(),i=wrt(),[s,a]=b.useState(null),[o,c]=b.useState(null),u=n.data??[],d=u.filter(m=>!m.isCurrent).length,h=async m=>{a(m),c(null);try{await r.mutateAsync(m)}catch{c({kind:"error",text:t("sessions.errorGeneric")})}finally{a(null)}},f=async()=>{c(null);try{const m=await i.mutateAsync();c({kind:"success",text:t("sessions.revokeOthersSuccess",{count:m.count})})}catch{c({kind:"error",text:t("sessions.revokeOthersError")})}};return l.jsxs("section",{"aria-labelledby":"settings-sessions-heading",className:"space-y-5 rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-edition-deeper","aria-hidden":"true",children:l.jsx(Db,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h2",{id:"settings-sessions-heading",className:"text-lg font-semibold text-strong",children:t("sessions.title")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:t("sessions.description")})]})]}),o&&l.jsx("div",{role:o.kind==="error"?"alert":"status",className:o.kind==="error"?"rounded-lg border border-clay/30 bg-clay/10 px-4 py-3 text-sm text-clay":"rounded-lg border border-sage/30 bg-sage/10 px-4 py-3 text-sm text-sage",children:o.text}),n.isLoading?l.jsx("p",{className:"text-sm text-muted-foreground",children:t("sessions.loading")}):u.length<=1?l.jsx("p",{className:"text-sm text-muted-foreground",children:t("sessions.empty")}):l.jsx("ul",{className:"space-y-3",children:u.map(m=>l.jsx("li",{children:l.jsx(zae,{deviceLabel:m.deviceLabel,userAgent:m.userAgent,ipAddress:m.ipAddress,loginAtFormatted:e(m.loginAt),isCurrent:m.isCurrent,currentLabel:t("sessions.currentBadge"),action:m.isCurrent?null:l.jsx(ce,{variant:"outline",size:"sm",isLoading:s===m.id,onClick:()=>{h(m.id)},children:s===m.id?t("sessions.revoking"):t("sessions.revoke")})})},m.id))}),d>0&&l.jsx(V9,{title:t("sessions.revokeOthersTitle"),description:t("sessions.revokeOthersDescription"),action:l.jsx(ce,{variant:"destructive",size:"sm",isLoading:i.isPending,onClick:()=>{f()},children:i.isPending?t("sessions.revokeOthersInFlight"):t("sessions.revokeOthersAction")})})]})}function jrt({isEnabled:e,enrolledAt:t,formatDate:n}){const{t:r}=J("settings-security"),i=Srt(),s=Crt(),a=krt(),[o,c]=b.useState(!1),[u,d]=b.useState(!1),[h,f]=b.useState(null),[m,p]=b.useState(""),[x,v]=b.useState(null),[g,y]=b.useState(null),[w,S]=b.useState(""),C=async()=>{v(null),p("");try{const E=await i.mutateAsync();f(E),c(!0)}catch{v(r("mfa.dialog.errorGeneric"))}},k=async E=>{if(E.preventDefault(),!!h){v(null);try{await s.mutateAsync({code:m.trim(),backupCodes:h.backupCodes}),c(!1),f(null),p("")}catch{v(r("mfa.dialog.errorInvalidCode")),p("")}}},_=async E=>{E.preventDefault(),y(null);try{await a.mutateAsync({password:w}),d(!1),S("")}catch{y(r("mfa.disableDialog.errorInvalidPassword")),S("")}};return l.jsxs("section",{"aria-labelledby":"settings-mfa-heading",className:"space-y-5 rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:re("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",e?"bg-sage/10 text-sage":"bg-edition-pale text-edition-deeper"),"aria-hidden":"true",children:e?l.jsx(jh,{className:"h-5 w-5",strokeWidth:1.75}):l.jsx(Db,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h2",{id:"settings-mfa-heading",className:"text-lg font-semibold text-strong",children:r("mfa.title")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:r("mfa.description")})]})]}),e&&l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-sage/10 px-3 py-1 text-xs font-semibold text-sage",children:[l.jsx(jh,{className:"h-3.5 w-3.5",
1674strokeWidth:2,"aria-hidden":"true"}),r("mfa.enrolledStatus")]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx(rv,{icon:l.jsx(jh,{className:"h-5 w-5","aria-hidden":"true"}),label:r("mfa.enrolledStatus"),description:t?r("mfa.enrolledSince",{date:n(t)}):void 0}),l.jsx(V9,{title:r("mfa.disableCta"),description:r("mfa.disableDialog.description"),action:l.jsx(ce,{variant:"destructive",onClick:()=>d(!0),leftIcon:l.jsx(Qxe,{className:"h-4 w-4"}),children:r("mfa.disableCta")})})]}):l.jsx(rv,{icon:l.jsx(Db,{className:"h-5 w-5","aria-hidden":"true"}),label:r("mfa.notEnrolledStatus"),description:r("mfa.notEnrolledDescription"),error:x,children:l.jsx(ce,{variant:"primary",isLoading:i.isPending,onClick:()=>{C()},children:i.isPending?r("mfa.enableInProgress"):r("mfa.enableCta")})}),h&&l.jsx(Nrt,{open:o,onOpenChange:E=>{c(E),E||(f(null),p(""),v(null))},enrollment:h,code:m,onCodeChange:p,onSubmit:k,isSubmitting:s.isPending,errorMessage:x}),l.jsx(Art,{open:u,onOpenChange:E=>{d(E),E||(S(""),y(null))},password:w,onPasswordChange:S,onSubmit:_,isSubmitting:a.isPending,errorMessage:g})]})}function Nrt({open:e,onOpenChange:t,enrollment:n,code:r,onCodeChange:i,onSubmit:s,isSubmitting:a,errorMessage:o}){const{t:c}=J("settings-security"),[u,d]=b.useState("idle"),h=async()=>{try{await navigator.clipboard.writeText(n.backupCodes.join(` 1675`)),d("copied"),window.setTimeout(()=>d("idle"),2e3)}catch{}},f=()=>{const m=new Blob([`# ${at.productWithEdition} â MFA backup codes 1676`,`# Generated ${new Date().toISOString()} 1677`,`# Each code can be used exactly once. 1678 1679`,n.backupCodes.join(` 1680`),` 1681`],{type:"text/plain;charset=utf-8"}),p=URL.createObjectURL(m),x=document.createElement("a");x.href=p,x.download="arthurai-ple-backup-codes.txt",document.body.appendChild(x),x.click(),document.body.removeChild(x),URL.revokeObjectURL(p)};return l.jsx(_u,{open:e,onOpenChange:t,title:c("mfa.dialog.title"),onSubmit:s,isSubmitting:a,submitLabel:c(a?"mfa.dialog.submitting":"mfa.dialog.submit"),cancelLabel:c("mfa.dialog.cancel"),size:"lg",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx(gj,{title:c("mfa.dialog.step1Title"),description:c("mfa.dialog.step1Description"),children:l.jsxs("div",{className:"flex flex-col items-center gap-3 sm:flex-row sm:items-start",children:[l.jsx("img",{src:n.qrCodeDataUri,alt:"",className:"h-40 w-40 shrink-0 rounded-xl border border-border bg-white p-2"}),l.jsx(dr,{label:c("mfa.dialog.manualSecretLabel"),htmlFor:"mfa-manual-secret",children:l.jsx(fn,{id:"mfa-manual-secret",value:n.secret,readOnly:!0,onFocus:m=>m.target.select(),className:"font-mono text-sm"})})]})}),l.jsxs(gj,{title:c("mfa.dialog.step2Title"),description:c("mfa.dialog.step2Description"),children:[l.jsxs("div",{className:"flex items-start gap-2 rounded-xl border border-amber-300/40 bg-amber-100/30 px-3 py-2 text-xs text-amber-900 dark:border-amber-300/30 dark:bg-amber-300/10 dark:text-amber-100",children:[l.jsx(Uv,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),l.jsx("span",{children:c("mfa.backupCodes.warning")})]}),l.jsx("ul",{"aria-label":"MFA backup codes",className:"grid grid-cols-2 gap-2 font-mono text-sm",children:n.backupCodes.map(m=>l.jsx("li",{className:"rounded-lg border border-border bg-muted/40 px-3 py-2 text-foreground",children:m},m))}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",size:"sm",leftIcon:l.jsx(wQ,{className:"h-4 w-4"}),onClick:()=>{h()},children:c(u==="copied"?"mfa.dialog.copied":"mfa.dialog.copyAll")}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",leftIcon:l.jsx(Dg,{className:"h-4 w-4"}),onClick:f,children:c("mfa.dialog.downloadTxt")})]})]}),l.jsxs(gj,{title:c("mfa.dialog.step3Title"),description:void 0,children:[l.jsx(dr,{label:c("mfa.dialog.codeLabel"),htmlFor:"mfa-code-input",children:l.jsx(fn,{id:"mfa-code-input",type:"tel",inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,value:r,onChange:m=>i(m.target.value.replace(/\D/g,"").slice(0,6)),placeholder:c("mfa.dialog.codePlaceholder")})}),o&&l.jsx("div",{role:"alert",className:"rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:o})]})]})})}function Art({open:e,onOpenChange:t,password:n,onPasswordChange:r,onSubmit:i,isSubmitting:s,errorMessage:a}){const{t:o}=J("settings-security");return l.jsx(_u,{open:e,onOpenChange:t,title:o("mfa.disableDialog.title"),description:o("mfa.disableDialog.description"),onSubmit:i,isSubmitting:s,submitLabel:o(s?"mfa.disableDialog.submitting":"mfa.disableDialog.submit"),cancelLabel:o("mfa.disableDialog.cancel"),children:l.jsxs("div",{className:"space-y-4",children:[l.jsx(dr,{label:o("mfa.disableDialog.passwordLabel"),htmlFor:"mfa-disable-password",children:l.jsx(fn,{id:"mfa-disable-password",type:"password",autoComplete:"current-password",value:n,onChange:c=>r(c.target.value),placeholder:o("mfa.disableDialog.passwordPlaceholder")})}),a&&l.jsx("div",{role:"alert",className:"rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:a})]})})}function gj({title:e,description:t,children:n}){return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e}),t&&l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),n]})}var Ya=(e=>
1681(e.QUEUED="QUEUED",e.GENERATING_CURRICULUM="GENERATING_CURRICULUM",e.DRAFT="DRAFT",e.FAILED_CURRICULUM="FAILED_CURRICULUM",e.PUBLISHED="PUBLISHED",e.ARCHIVED="ARCHIVED",e))(Ya||{}),Tm=(e=>(e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e.PENDING="PENDING",e))(Tm||{}),pv=(e=>(e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e))(pv||{}),Em=(e=>(e.IN_PROGRESS="IN_PROGRESS",e.COMPLETED="COMPLETED",e.ABANDONED="ABANDONED",e))(Em||{}),T1=(e=>(e.NOT_GENERATED="NOT_GENERATED",e.GENERATING="GENERATING",e.GENERATED="GENERATED",e.FAILED="FAILED",e))(T1||{}),E1=(e=>(e.NOT_STARTED="NOT_STARTED",e.GENERATING="GENERATING",e.GENERATED="GENERATED",e.FAILED="FAILED",e))(E1||{}),xl=(e=>(e.ACTIVE="ACTIVE",e.PAUSED="PAUSED",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.TRIAL="TRIAL",e))(xl||{});Ya.QUEUED+"",Ya.GENERATING_CURRICULUM+"",Ya.DRAFT+"",Ya.FAILED_CURRICULUM+"",Ya.PUBLISHED+"",Ya.ARCHIVED+"";Tm.ACTIVE+"",Tm.INACTIVE+"",Tm.PENDING+"";pv.ACTIVE+"",pv.INACTIVE+"";Em.IN_PROGRESS+"",Em.COMPLETED+"",Em.ABANDONED+"";T1.NOT_GENERATED+"",T1.GENERATING+"",T1.GENERATED+"",T1.FAILED+"";E1.NOT_STARTED+"",E1.GENERATING+"",E1.GENERATED+"",E1.FAILED+"";xl.ACTIVE+"",xl.PAUSED+"",xl.CANCELLED+"",xl.EXPIRED+"",xl.TRIAL+"";Ya.QUEUED+"",Ya.GENERATING_CURRICULUM+"",Ya.DRAFT+"",Ya.FAILED_CURRICULUM+"",Ya.PUBLISHED+"",Ya.ARCHIVED+"";Tm.ACTIVE+"",Tm.INACTIVE+"",Tm.PENDING+"";pv.ACTIVE+"",pv.INACTIVE+"";Em.IN_PROGRESS+"",Em.COMPLETED+"",Em.ABANDONED+"";xl.ACTIVE+"",xl.PAUSED+"",xl.CANCELLED+"",xl.EXPIRED+"",xl.TRIAL+"";const Mrt=["text","callout","definition","diagram","guided_diagram","hierarchy_tree","comparison","table","timeline","quiz_inline","match","code","accordion","key_takeaway","image"];function eL(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.type=="string"&&Mrt.includes(t.type)}const Rrt=["text","callout","definition","key_takeaway","accordion"],Ort={enabled:!1,voiceId:"en-US-DavisNeural",speed:1},gv={all:["tts"],voices:e=>[...gv.all,"voices",e],preferences:()=>[...gv.all,"preferences"]};function Drt(){return rt({mutationFn:e=>_e.post(he.ME_TTS_GENERATE,e)})}function Lrt(){return rt({mutationFn:e=>_e.post(he.ME_TTS_GENERATE_BATCH,e)})}function Hce(){return At({queryKey:gv.preferences(),queryFn:()=>_e.get(he.ME_TTS_PREFERENCES),staleTime:5*60*1e3})}function qce(){const e=Tt();return rt({mutationFn:t=>_e.patch(he.ME_TTS_PREFERENCES,t),onMutate:async t=>{const n=gv.preferences();await e.cancelQueries({queryKey:n});const r=e.getQueryData(n),i=r??Ort;return e.setQueryData(n,{...i,...t}),{previous:r,key:n}},onError:(t,n,r)=>{r!=null&&r.key&&(r.previous?e.setQueryData(r.key,r.previous):e.removeQueries({queryKey:r.key}))},onSettled:()=>{e.invalidateQueries({queryKey:gv.preferences()})}})}function Prt(){var a;const{t:e}=J("settings"),t=Hce(),n=qce(),r=((a=t.data)==null?void 0:a.enabled)??!1,i=t.isLoading||n.isPending,s=()=>{i||n.mutate({enabled:!r})};return l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"mb-5 flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(DQ,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:e("appearance.readAloud.eyebrow",{defaultValue:"Accessibility"})}),l.jsx("h2",{className:"mt-1 text-section-title text-strong",children:e("appearance.readAloud.label",{defaultValue:"Read lessons aloud"})}),l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:e("appearance.readAloud.description",{defaultValue:"Adds a play control to every lesson so you can listen instead of read. You can change the speed while it plays."})})]})]}),l.jsxs("button",{type:"button",role:"switch","aria-checked":r,"aria-busy":i||void 0,disabled:i,onClick:s,className:re("flex min-h-[44px] w-full items-center justify-between gap-4 rounded-xl border px-4 py-3 text-left transition-colors",r?"border-primary bg-edition-pale":"border-border bg-surface hover:border-strong",i&&"cursor-wait opacity-70"),children:[l.jsxs("span",{className:"flex flex-col gap-0.5",children:[l.jsx("span",{className:re("text-card-title",r?"text-primary":"text-strong"),children:r?e("appearance.readAloud.on",{defaultValue:"Read-aloud is on"}):e("appearance.readAloud.off",{defaultValue:"Read-aloud is off"})}),l.jsx("span",{className:"text-xs leading-snug text-muted-ink",children:r?e("appearance.readAloud.onHint",{defaultValue:"Look for the play button on any lesson."}):e("appearance.readAloud.offHint",{defaultValue:"Turn this on to listen to lessons."})})]}),l.jsx("span",{"aria-hidden":"true",className:re("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors",r?"bg-primary":"bg-border"),children:l.jsx("span",{className:re("inline-block h-5 w-5 transform rounded-full bg-white shadow transition-transform",r?"translate-x-[1.375rem]":"translate-x-0.5")})})]}),n.isError&&l.jsx("p",{role:"alert",className:"mt-3 text-xs text-destructive",children:e("appearance.readAloud.error",{defaultValue:"That didn't save. Try again in a moment."})})]})}const xj="paper",Gce="ple.readingTheme";function Wce(e){return e==="paper"||e==="white"||e==="sepia"}function e8(){if(typeof window>"u")return xj;try{const e=window.localStorage.getItem(Gce);return Wce(e)?e:xj}catch{return xj}}function tL(e){typeof document>"u"||(document.documentElement.dataset.readingTheme=e)}function vq(e){if(typeof window<"u")try{window.localStorage.setItem(Gce,e)}catch{}tL(e)}const Yy=[{value:"paper",labelKey:"appearance.theme.paper",descriptionKey:"appearance.theme.paperDescription",surface:"#FBF7EE",swatchInk:"rgba(48, 48, 48, 0.55)",ink:"#303030"},{value:"white",labelKey:"appearance.theme.white",descriptionKey:"appearance.theme.whiteDescription",surface:"#FFFFFF",swatchInk:"rgba(48, 48, 48, 0.55)",ink:"#303030"},{value:"sepia",labelKey:"appearance.theme.sepia",descriptionKey:"appearance.theme.sepiaDescription",surface:"#F4ECD8",swatchInk:"rgba(58, 51, 38, 0.6)",ink:"#3A3326"}];function Irt(){var u,d,h;const{t:e}=J("settings"),t=Ps(),n=GD(),[r,i]=b.useState(e8);b.useEffect(()=>{const f=e8();i(f),tL(f)},[]);const s=(h=(d=(u=t.data)==null?void 0:u.profile)==null?void 0:d.preferences)==null?void 0:h.readingTheme;b.useEffect(()=>{Wce(s)&&(i(s),vq(s))},[s]);const a=f=>{i(f),vq(f),n.mutate({readingTheme:f})},o=b.useRef([]),c=(f,m)=>{var x;let p=null;f.key==="ArrowRight"||f.key==="ArrowDown"?p=(m+1)%Yy.length:(f.key==="ArrowLeft"||f.key==="ArrowUp")&&(p=(m-1+Yy.length)%Yy.length),p!==null&&(f.preventDefault(),a(Yy[p].value),(x=o.current[p])==null||x.focus())};return l.jsxs("section",{className:"flex flex-col gap-5",children:[l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"mb-5 flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(EQ,{
1681className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:e("appearance.title")}),l.jsx("h2",{className:"mt-1 text-section-title text-strong",children:e("appearance.theme.label")}),l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:e("appearance.theme.description")})]})]}),l.jsx("div",{role:"radiogroup","aria-label":e("appearance.theme.groupAriaLabel"),className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:Yy.map((f,m)=>{const p=r===f.value;return l.jsxs("button",{ref:x=>{o.current[m]=x},type:"button",role:"radio","aria-checked":p,tabIndex:p?0:-1,onClick:()=>a(f.value),onKeyDown:x=>c(x,m),className:re("flex flex-col gap-3 rounded-2xl border p-4 text-left transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",p?"border-primary bg-edition-pale ring-1 ring-primary":"border-border hover:border-edition-soft"),children:[l.jsxs("span",{"aria-hidden":"true",className:"relative block w-full overflow-hidden rounded-xl border border-border px-3 py-2.5",style:{backgroundColor:f.surface,color:f.ink},children:[l.jsx("span",{className:"block pe-7 text-[13px] leading-snug",children:e("appearance.theme.swatchSample")}),p&&l.jsx("span",{className:"absolute right-2 top-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:l.jsx(Kn,{className:"h-3 w-3",strokeWidth:3})})]}),l.jsxs("span",{className:"flex flex-col gap-0.5",children:[l.jsx("span",{className:re("text-card-title",p?"text-primary":"text-strong"),children:e(f.labelKey)}),l.jsx("span",{className:"text-xs leading-snug text-muted-ink",children:e(f.descriptionKey)})]})]},f.value)})}),l.jsxs("div",{className:"mt-6",children:[l.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.12em] text-muted-ink",children:e("appearance.theme.previewLabel")}),l.jsx("div",{className:"reading-surface rounded-2xl border border-border p-5",children:l.jsx("p",{className:"text-base leading-relaxed",children:e("appearance.theme.previewBody")})}),l.jsx("p",{className:"mt-2 text-xs text-muted-ink",children:e("appearance.theme.appliesTo")})]})]}),l.jsx(Prt,{})]})}const ka={all:["calendar"],bundle:e=>[...ka.all,"bundle",(e==null?void 0:e.from)??"",(e==null?void 0:e.to)??""],grid:e=>[...ka.all,"grid",e.view,e.from,e.to,e.courseId??""],prefs:e=>[...ka.all,"prefs",e],examTarget:()=>[...ka.all,"examTarget"]};function o_(e){return At({queryKey:ka.bundle(e),queryFn:()=>_e.get(he.ME_CALENDAR,{params:e}),staleTime:3e4})}function Frt(e){return At({queryKey:ka.grid(e),queryFn:()=>_e.get(he.ME_CALENDAR_GRID,{params:e}),staleTime:15e3})}function Brt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.ME_CALENDAR_EVENTS,t),onSuccess:()=>{e.invalidateQueries({queryKey:ka.all})}})}function zrt(){const e=Tt();return rt({mutationFn:({id:t,data:n})=>_e.patch(he.meCalendarEvent(t),n),onSuccess:()=>{e.invalidateQueries({queryKey:ka.all})}})}function $rt(){const e=Tt();return rt({mutationFn:({id:t,scope:n})=>_e.del(he.meCalendarEvent(t),{params:{scope:n??"instance"}}),onSuccess:()=>{e.invalidateQueries({queryKey:ka.all})}})}function Urt(){const e=Tt();return rt({mutationFn:({id:t,data:n})=>_e.patch(he.meCalendarEventMove(t),n),onSettled:()=>{e.invalidateQueries({queryKey:ka.all})}})}function Vrt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.ME_CALENDAR_LESSONS_RESCHEDULE,t),onSuccess:()=>{e.invalidateQueries({queryKey:ka.all})}})}function Yce(){return At({queryKey:ka.examTarget(),queryFn:()=>_e.get(he.ME_EXAM_TARGET),staleTime:6e4})}function Kce(){const e=Tt();return rt({mutationFn:t=>_e.put(he.ME_EXAM_TARGET,t),onSuccess:t=>{e.setQueryData(ka.examTarget(),t),e.invalidateQueries({queryKey:ka.all})}})}const xS=30,yj=90,Hrt=10,qrt={career:ki,explore:Bm,hybrid:_Q};function Grt({value:e,onChange:t}){const{t:n}=J("settings"),r=c=>{var u;if(c==="career")t({mode:c,mix:{career:100,explore:0}});else if(c==="explore")t({mode:c,mix:{career:0,explore:100}});else{const d=((u=e.mix)==null?void 0:u.career)??70,h=Math.min(yj,Math.max(xS,d));
1681t({mode:"hybrid",mix:{career:h,explore:100-h}})}},i=c=>{t({mode:"hybrid",mix:{career:c,explore:100-c}})},s=e.mode==="hybrid"?e.mix.career:70,a=(s-xS)/(yj-xS)*100,o=["career","explore","hybrid"];return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-strong",children:n("learningPreferences.intent.label")}),l.jsx("p",{className:"text-sm text-muted-ink",children:n("learningPreferences.intent.help")})]}),l.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-3",children:o.map(c=>{const u=qrt[c],d=e.mode===c;return l.jsx("button",{type:"button",onClick:()=>r(c),"aria-pressed":d,className:re("rounded-2xl border p-4 text-left transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",d?"border-edition-soft bg-edition-pale":"border-border hover:border-edition-soft"),children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(u,{className:re("mt-0.5 h-5 w-5",d?"text-edition-deeper":"text-muted-ink"),strokeWidth:1.75}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:re("mb-1 text-sm font-medium",d?"text-edition-deeper":"text-strong"),children:n(`learningPreferences.intent.modes.${c}.title`)}),l.jsx("div",{className:"text-xs text-muted-ink",children:n(`learningPreferences.intent.modes.${c}.description`)})]})]})},c)})}),e.mode==="hybrid"&&l.jsxs("div",{className:"space-y-3 rounded-2xl border border-edition-soft bg-edition-pale p-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-sm",children:[l.jsx("span",{className:"text-muted-ink",children:n("learningPreferences.intent.careerFocus")}),l.jsxs("span",{className:"font-semibold text-edition-deeper",children:[s,"%"]})]}),l.jsxs("div",{className:"relative py-2",children:[l.jsx("div",{className:"relative h-2 overflow-hidden rounded-full bg-white",children:l.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-gradient-to-r from-edition-deeper to-edition-primary transition-all duration-200",style:{width:`${a}%`}})}),l.jsx("input",{type:"range",min:xS,max:yj,step:Hrt,value:s,onChange:c=>i(parseInt(c.target.value,10)),"aria-label":n("learningPreferences.intent.sliderAriaLabel"),className:re("ds-touch-expand","absolute inset-0 h-full w-full cursor-pointer appearance-none bg-transparent","[&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-primary [&::-webkit-slider-thumb]:bg-white","[&::-moz-range-thumb]:h-5 [&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary [&::-moz-range-thumb]:bg-white")})]}),l.jsxs("div",{className:"flex justify-between text-xs text-muted-ink",children:[l.jsx("span",{children:n("learningPreferences.intent.exploreLabel",{value:100-s})}),l.jsx("span",{children:n("learningPreferences.intent.careerLabel",{value:s})})]})]})]})}function Xce({open:e,current:t,isSubmitting:n,isClearing:r,onCancel:i,onSubmit:s,onClear:a}){const[o,c]=b.useState(""),[u,d]=b.useState(""),[h,f]=b.useState(null);b.useEffect(()=>{e&&(c((t==null?void 0:t.targetExamDate)??""),d((t==null?void 0:t.targetExamLabel)??""),f(null))},[e,t]);const m=p=>{if(p.preventDefault(),f(null),!o){f("Pick an exam date.");return}if(!u.trim()){f('Give your exam a short name (e.g., "MDCAT 2027").');return}s({targetExamDate:o,targetExamLabel:u.trim()})};return l.jsx(_u,{open:e,onOpenChange:p=>{p||i()},title:"Target exam",description:"Set the date you're aiming for. Arthur will surface a countdown across the app and fire reminders at T-30, T-7, T-1 and T-0.",onSubmit:m,isSubmitting:n,submitLabel:t?"Update":"Set target",children:l.jsxs("div",{className:"cal-modal-grid",children:[l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:"Exam date"}),l.jsx(fn,{type:"date",value:o,onChange:p=>c(p.currentTarget.value),required:!0,autoFocus:!0})]}),l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:"Exam name"}),l.jsx(fn,{type:"text",value:u,onChange:p=>d(p.currentTarget.value),placeholder:"MDCAT 2027",maxLength:60,required:!0})]}),h&&l.jsx("p",{className:"cal-modal-error",children:h}),t&&l.jsx("div",{className:"cal-modal-actions",style:{justifyContent:"flex-start"},children:l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:a,disabled:r,children:"Clear target"})})]})})}
1681const Af=5,Ky=1200,wq=5,Wrt=/^([01]\d|2[0-3]):[0-5]\d$/;function Yrt(){const{t:e}=J("settings"),t=BD(),n=s_();return t.isLoading?l.jsx("div",{className:"flex items-center justify-center py-10",role:"status","aria-live":"polite","aria-label":e("learningTab.loading"),children:l.jsx(Rx,{})}):t.isError||!t.data?l.jsx(lo,{variant:"error",message:e("learningTab.loadError"),action:{label:e("learningTab.retry"),onClick:()=>{t.refetch()}}}):l.jsxs("section",{"aria-label":e("learningTab.sectionLabel"),children:[n.isError&&l.jsx("div",{className:"mb-4",children:l.jsx(lo,{variant:"warning",message:e("learningTab.saveError")})}),l.jsxs("div",{className:"divide-y divide-border",children:[l.jsx(Krt,{view:t.data}),l.jsx(Xrt,{view:t.data})]})]})}const Qce="rounded-none border-0 bg-transparent px-0 py-4 first:pt-0 last:pb-0";function Krt({view:e}){const{t}=J("settings"),n=s_(),[r,i]=b.useState(e.weeklyGoalMinutes);b.useEffect(()=>{i(e.weeklyGoalMinutes)},[e.weeklyGoalMinutes]);const s=r!==e.weeklyGoalMinutes,a=Number.isNaN(r)||r<Af||r>Ky,o=Math.round(r/60*10)/10,c=()=>{!s||a||n.mutate({weeklyGoalMinutes:r})};return l.jsx(rv,{label:t("learningTab.weeklyGoalCard.label"),htmlFor:"learning-weekly-goal-input",description:t("learningTab.weeklyGoalCard.description",{hours:o}),error:a?t("learningTab.weeklyGoalCard.outOfRange",{min:Af,max:Ky}):void 0,info:l.jsx(ki,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),fullWidthControl:!0,className:Qce,children:l.jsxs("div",{className:"flex w-full flex-col gap-2 sm:flex-row sm:items-center sm:gap-3",children:[l.jsx("input",{id:"learning-weekly-goal-slider",type:"range",min:Af,max:Ky,step:wq,value:Number.isNaN(r)?Af:r,onChange:u=>i(Number(u.target.value)),"aria-label":t("learningTab.weeklyGoalCard.sliderAriaLabel"),"aria-valuemin":Af,"aria-valuemax":Ky,"aria-valuenow":Number.isNaN(r)?Af:r,className:"ds-touch-expand h-2 w-full cursor-pointer accent-[hsl(var(--primary))]"}),l.jsx(fn,{id:"learning-weekly-goal-input",type:"number",min:Af,max:Ky,step:wq,value:Number.isNaN(r)?"":r,error:a,onChange:u=>i(Number(u.target.value)),"aria-describedby":a?"learning-weekly-goal-input-error":void 0,className:"sm:w-24"}),l.jsx(ce,{variant:"primary",size:"sm",isLoading:n.isPending,disabled:!s||a,onClick:c,children:t("common.saveChanges")})]})})}function Xrt({view:e}){const{t}=J("settings"),n=s_(),[r,i]=b.useState(e.reminderTime??"");b.useEffect(()=>{i(e.reminderTime??"")},[e.reminderTime]);const s=r.trim(),a=s!==(e.reminderTime??""),o=s!==""&&!Wrt.test(s),c=()=>{!a||o||n.mutate({reminderTime:s===""?null:s})},u=()=>{i(""),e.reminderTime!==null&&n.mutate({reminderTime:null})};return l.jsx(rv,{label:t("learningTab.reminderTimeCard.label"),htmlFor:"learning-reminder-time-input",description:t("learningTab.reminderTimeCard.description"),error:o?t("learningTab.reminderTimeCard.invalid"):void 0,info:l.jsx(mQ,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),className:Qce,children:l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-2",children:[l.jsx(fn,{id:"learning-reminder-time-input",type:"time",value:s,error:o,onChange:d=>i(d.target.value),"aria-describedby":o?"learning-reminder-time-input-error":void 0,className:"sm:w-36"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(ce,{variant:"primary",size:"sm",isLoading:n.isPending,disabled:!a||o,onClick:c,children:t("common.saveChanges")}),e.reminderTime!==null&&l.jsx(ce,{variant:"ghost",size:"sm",disabled:n.isPending,onClick:u,children:t("learningTab.reminderTimeCard.clear")})]})]})})}const Sq={mode:"hybrid",mix:{career:70,explore:30}};function Qrt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.career=="number"&&typeof t.explore=="number"}function Zrt(e){return e==="career"||e==="explore"||e==="hybrid"}function Jrt(){var w;const{t:e}=J("settings"),t=Ps(),n=bf(),r=GD(),i=Yce(),s=Kce(),[a,o]=b.useState(Sq),[c,u]=b.useState(null),[d,h]=b.useState(!1);b.useEffect(()=>{var _;const S=(_=t.data)==null?void 0:_.profile;if(!S)return;const C=Zrt(S.intentMode)?S.intentMode:"hybrid",k=Qrt(S.intentMix)?S.intentMix:Sq.mix;o({mode:C,mix:k})},[t.data]);const f=async()=>{u(null);
1681try{await r.mutateAsync({intentMode:a.mode,intentMix:a.mix}),u({kind:"success",text:e("learningPreferences.saveSuccess")})}catch{u({kind:"error",text:e("learningPreferences.saveError")})}},m=((w=n.data)==null?void 0:w.profile)??null,p=(m==null?void 0:m.careerGoals)??[],x=(m==null?void 0:m.interests)??[],v=(m==null?void 0:m.focusThemes)??[],g=(m==null?void 0:m.careerStage)??null,y=m!=null&&(p.length>0||x.length>0||v.length>0||!!g);return l.jsxs("div",{className:"flex flex-col gap-5",children:[l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"mb-5 flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(ki,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-section-title text-strong",children:e("learningPreferences.title")}),l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:e("learningPreferences.description")})]})]}),l.jsx(Yrt,{})]}),l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"mb-5 flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(Rn,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-section-title text-strong",children:e("learningTab.intentSectionTitle")}),l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:e("learningTab.intentSectionDescription")})]})]}),y&&l.jsxs("div",{className:"mb-5 space-y-3 rounded-2xl border border-edition-soft bg-edition-pale p-5",children:[l.jsxs("h3",{className:"flex items-center gap-2 text-card-title text-strong",children:[l.jsx(Fi,{className:"h-5 w-5 text-edition-deeper",strokeWidth:1.75,"aria-hidden":"true"}),e("learningPreferences.careerProfile.title")]}),p.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.14em] text-muted-ink",children:e("learningPreferences.careerProfile.careerGoals")}),l.jsx("p",{className:"mt-1 text-sm text-body-ink",children:p.join(" · ")})]}),g&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.14em] text-muted-ink",children:e("learningPreferences.careerProfile.background")}),l.jsx("p",{className:"mt-1 text-sm text-body-ink",children:g})]}),v.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.14em] text-muted-ink",children:e("learningPreferences.careerProfile.motivation")}),l.jsx("p",{className:"mt-1 text-sm text-body-ink",children:v.join(" · ")})]}),x.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.14em] text-muted-ink",children:e("learningPreferences.careerProfile.interests")}),l.jsx("ul",{className:"mt-2 flex flex-wrap gap-2",children:x.map(S=>l.jsx("li",{className:"rounded-full bg-edition-pale px-3 py-1 text-xs font-medium text-edition-deeper ring-1 ring-edition-soft",children:S},S))})]})]}),l.jsx("div",{className:"mb-5 rounded-xl border border-slate-info/30 bg-slate-info/10 px-4 py-3 text-sm text-slate-info",children:e("learningPreferences.infoBanner")}),l.jsx(Grt,{value:a,onChange:o})]}),l.jsx("section",{className:"rounded-2xl border border-border bg-card p-6",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(of,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h3",{className:"text-sm font-medium text-strong",children:"Target exam"}),i.data?l.jsxs("p",{className:"mt-1 text-xs text-muted-ink",children:[i.data.targetExamLabel," â"," ",i.data.daysRemaining>0?`${i.data.daysRemaining} day${i.data.daysRemaining===1?"":"s"} remaining`:i.data.daysRemaining===0?"today":`${Math.abs(i.data.daysRemaining)} day${i.data.daysRemaining===-1?"":"s"} ago`]}):l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:"Pick an exam date â Arthur will c
1681ount down the days and fire reminders at T-30, T-7, T-1, and on the day."})]}),l.jsx(ce,{variant:i.data?"ghost":"primary",size:"sm",leftIcon:i.data?l.jsx(Lg,{className:"h-4 w-4"}):l.jsx(ki,{className:"h-4 w-4"}),onClick:()=>h(!0),children:i.data?"Edit":"Set target"})]})}),c&&l.jsx("div",{role:c.kind==="error"?"alert":"status",className:c.kind==="error"?"rounded-xl border border-clay/30 bg-clay/10 px-4 py-3 text-sm text-clay":"rounded-xl border border-sage/30 bg-sage/10 px-4 py-3 text-sm text-sage",children:c.text}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{variant:"primary",isLoading:r.isPending,leftIcon:r.isPending?void 0:l.jsx(zM,{className:"h-4 w-4"}),onClick:()=>void f(),children:r.isPending?e("learningPreferences.saving"):e("learningPreferences.save")})}),l.jsx(Xce,{open:d,current:i.data??null,isSubmitting:s.isPending,isClearing:s.isPending,onCancel:()=>h(!1),onSubmit:S=>s.mutate(S,{onSuccess:()=>h(!1)}),onClear:()=>s.mutate({targetExamDate:null,targetExamLabel:null},{onSuccess:()=>h(!1)})})]})}const Hd=["me","reminder-preferences"],bj={LESSON_24H:{email:!0,inApp:!0},MISSED_LESSON:{email:!0,inApp:!0},WEEKLY_GOAL_RECAP:{email:!1,inApp:!0}};function eit(){return{LESSON_24H:{...bj.LESSON_24H},MISSED_LESSON:{...bj.MISSED_LESSON},WEEKLY_GOAL_RECAP:{...bj.WEEKLY_GOAL_RECAP}}}function tit(e){const t=eit();if(!e)return t;for(const n of e){const r=t[n.reminderType];r&&(n.channel==="EMAIL"?r.email=n.optedIn:n.channel==="IN_APP"&&(r.inApp=n.optedIn))}return t}function nit(e,t){const n=e??[];let r=!1;const i=n.map(s=>s.reminderType===t.reminderType&&s.channel===t.channel?(r=!0,{...s,optedIn:t.optedIn}):s);return r||i.push({reminderType:t.reminderType,channel:t.channel,optedIn:t.optedIn,updatedAt:new Date(0).toISOString()}),i}function rit(){const e=At({queryKey:Hd,queryFn:()=>_e.get(he.ME_REMINDER_PREFERENCES),staleTime:6e4});return{preferences:tit(e.data),isLoading:e.isLoading,error:e.error??null,refetch:e.refetch,rows:e.data}}function iit(){const e=Tt();return rt({mutationFn:t=>_e.patch(he.ME_REMINDER_PREFERENCES,[t]),onMutate:async t=>{await e.cancelQueries({queryKey:Hd});const n=e.getQueryData(Hd);return e.setQueryData(Hd,r=>nit(r,t)),{previous:n}},onError:(t,n,r)=>{r!=null&&r.previous?e.setQueryData(Hd,r.previous):e.removeQueries({queryKey:Hd})},onSuccess:t=>{e.setQueryData(Hd,t)},onSettled:()=>{e.invalidateQueries({queryKey:Hd})}})}const sit=[{type:"LESSON_24H",titleKey:"notifications.lessonRemindersTitle",descriptionKey:"notifications.lessonRemindersDescription"},{type:"MISSED_LESSON",titleKey:"notifications.missedLessonsTitle",descriptionKey:"notifications.missedLessonsDescription"},{type:"WEEKLY_GOAL_RECAP",titleKey:"notifications.weeklyRecapTitle",descriptionKey:"notifications.weeklyRecapDescription",badgeKey:"notifications.weeklyRecapBadge"}];function ait(){const{t:e}=J("settings"),{preferences:t,isLoading:n,error:r,refetch:i}=rit(),s=iit(),a=(o,c,u)=>{s.mutate({reminderType:o,channel:c,optedIn:u})};return l.jsxs("section",{className:"flex flex-col gap-5",children:[r&&l.jsx(lo,{variant:"error",message:e("notifications.loadingError"),action:{label:e("notifications.retry"),onClick:()=>{i()}}}),s.isError&&l.jsx(lo,{variant:"warning",message:e("notifications.saveError")}),l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"mb-5 flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(Rb,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-section-title text-strong",children:e("notifications.header")}),l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:e("notifications.subtitle")})]})]}),n?l.jsx("div",{className:"flex items-center justify-center py-10",role:"status","aria-live":"polite","aria-label":e("notifications.loading"),children:l.jsx(Rx,{})}):l.jsx("div",{className:"divide-y divide-border",children:sit.map(o=>{const c=t[o.type];return l.jsx(Iae,{title:e(o.titleKey),description:e(o.descriptionKey),badge:o.badgeKey?e(o.badgeKey):void 0,emailLabel:e("notifications.emailLabel"),inAppLabel:e("notifications.inAppLabel"),email:{optedIn:c.email,onChange:u=>a(o.type,"EMAIL",u),disabled:s.isPending},inApp:{optedIn:c.inApp,onChange:u=>a(o.type,"IN_APP",u),disabled:s.isPending},className:"rounded-none border-0 bg-transparent px-0 py-4 first:pt-0 last:pb-0"},o.type)})})]})]})}const oit=["me","orders"],lit=e=>["me","order",e];function Zce(e=50){return At({queryKey:[...oit,e],queryFn:()=>_e.get(he.ME_ORDERS,{params:{limit:e}}),staleTime:3e4})}
1681function Jce(e,t){return At({queryKey:lit(e??""),queryFn:()=>_e.get(he.meOrder(e)),enabled:!!e,staleTime:0,refetchInterval:t!=null&&t.pollWhilePending?n=>{var r;return((r=n.state.data)==null?void 0:r.status)==="PENDING"?3e3:!1}:void 0})}const eue=Jce;function cit(e,t){if(!e)return t;const n=/filename\*?=(?:UTF-8'')?"?([^";]+)"?/i.exec(e);return n!=null&&n[1]?decodeURIComponent(n[1]):t}async function nL(e){var i;const t=await du.get(he.meOrderReceipt(e),{responseType:"blob"}),n=cit((i=t.headers)==null?void 0:i["content-disposition"],`invoice-${e.slice(0,8).toUpperCase()}.pdf`),r=URL.createObjectURL(t.data);try{const s=document.createElement("a");s.href=r,s.download=n,document.body.appendChild(s),s.click(),s.remove()}finally{URL.revokeObjectURL(r)}}const Cq=20,kq=100;function uit(e,t){return`$${Number(e).toFixed(2)} ${t.toUpperCase()}`}function dit(e){return new Date(e).toLocaleDateString()}function hit(e){return e.status==="COMPLETED"}function yS({title:e,subtitle:t,children:n}){return l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"border-b border-border pb-5",children:[l.jsx("h2",{className:"text-section-title text-strong",children:e}),l.jsx("p",{className:"mt-1 text-sm text-muted-ink",children:t})]}),l.jsx("div",{className:"pt-6",children:n})]})}function fit(){var v;const{t:e}=J("settings-invoices"),t=St(),[n,r]=b.useState(Cq),[i,s]=b.useState(null),[a,o]=b.useState(null),c=Zce(n),u=gs(),d=(c.data??[]).filter(hit),h=d.length,f=((v=c.data)==null?void 0:v.length)??0,m=f===n&&n<kq,p=new Map;for(const g of u.data??[])p.set(g.courseId,g.name);const x=async g=>{s(g),o(null);try{await nL(g)}catch{o(g)}finally{s(null)}};return c.isLoading?l.jsxs(yS,{title:e("page.title"),subtitle:e("page.subtitle"),children:[l.jsx("ul",{className:"divide-y divide-border","aria-hidden":"true",children:[0,1,2].map(g=>l.jsxs("li",{className:"flex animate-pulse items-center gap-4 py-4 first:pt-0",children:[l.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[l.jsx("span",{className:"block h-3.5 w-1/2 rounded-full bg-cream"}),l.jsx("span",{className:"block h-3 w-24 rounded-full bg-cream"})]}),l.jsx("span",{className:"h-5 w-16 rounded-full bg-cream"}),l.jsx("span",{className:"h-8 w-20 rounded-lg bg-cream"})]},g))}),l.jsx("p",{className:"mt-4 text-center text-sm text-muted-ink",role:"status","aria-live":"polite",children:e("list.loading")})]}):c.isError?l.jsx(yS,{title:e("page.title"),subtitle:e("page.subtitle"),children:l.jsx("p",{role:"alert",className:"rounded-2xl border border-clay/30 bg-clay/5 px-6 py-10 text-center text-sm text-clay",children:e("list.errorBody")})}):h===0?l.jsx(yS,{title:e("page.title"),subtitle:e("page.subtitle"),children:l.jsx(bc,{icon:l.jsx(Vv,{strokeWidth:1.75,"aria-hidden":"true"}),title:e("list.empty.title"),description:e("list.empty.body"),titleLevel:3})}):l.jsxs(yS,{title:e("page.title"),subtitle:e("page.subtitle"),children:[l.jsx("ul",{className:"divide-y divide-border","aria-label":e("list.title"),children:d.map(g=>{const w=(g.courseId?p.get(g.courseId):null)??(g.packId?e("list.row.packPurchase"):e("list.row.coursePurchase")),S=i===g.id;return l.jsxs("li",{className:"flex flex-wrap items-center gap-x-4 gap-y-3 py-4 first:pt-0 last:pb-0",children:[l.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-sage/10 text-sage","aria-hidden":"true",children:l.jsx(Kn,{className:"h-4 w-4",strokeWidth:2.25})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-semibold text-strong",children:w}),l.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-muted-ink",children:[l.jsx("span",{className:"font-mono uppercase tracking-[0.08em]",children:e("list.row.invoiceNumber",{id:g.id.slice(0,8).toUpperCase()})}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{children:dit(g.createdAt)})]})]}),l.jsx("span",{className:"font-mono text-sm font-semibold text-strong",children:uit(g.amount,g.currency)}),l.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>t(ece(g.id)),children:e("list.row.viewDetails")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",leftIcon:l.jsx(Dg,{className:"h-4 w-4",strokeWidth:1.75}),isLoading:S,onClick:()=>void x(g.id),children:e(S?"list.row.downloading":"list.row.downloadInvoice")})]}),a===g.id&&l.jsx("div",{className:"basis-full",role:"alert",children:l.jsx(lo,{variant:"error",message:e("list.row.downloadError")})})]},g.id)})}),f>0&&l.jsx("div",{className:"mt-2 border-t border-border pt-4",children:l.jsx(ey,{mode:"cursor",hasMore:m,isLoadingMore:c.isFetching&&!c.isLoading,onLoadMore:()=>r(g=>Math.min(g+Cq,kq)),summary:e("list.pagination.loadedSummary",{count:h}),labels:{loadMore:e("list.pagination.loadMore"),loading:e("list.pagination.loading"),allLoaded:e("list.pagination.allLoaded"),loadMoreAria:e("list.pagination.loadMoreAria")}})})]})}const tue=["me","certificates"];function mit(){return At({queryKey:tue,queryFn:()=>_e.get(he.ME_CERTIFICATES),staleTime:15e3,refetchInterval:e=>{const t=e.state.data;return!t||t.length===0?!1:t.some(r=>r.status==="PENDING")?8e3:!1}})}function pit(){return rt({mutationFn:e=>_e.get(he.meCertificateDownload(e)),onSuccess:e=>{typeof window<"u"&&window.open(e.url,"_blank","noopener,noreferrer")}})}function git(){const e=Tt();return rt({mutationFn:t=>_e.post(he.meCertificateRetry(t),{}),onSuccess:()=>
1681{e.invalidateQueries({queryKey:tue})}})}function xit(e){return At({queryKey:["certificates","verify",e??""],queryFn:()=>_e.get(he.certificateVerify(e)),enabled:!!e,staleTime:5*60*1e3,retry:!1})}function yit(e,t){const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})}function bit({certificate:e,onDownload:t,isDownloading:n,variant:r="page",onRetry:i,isRetrying:s=!1,retryError:a=null,onShare:o,sharedCode:c=null}){const{t:u,i18n:d}=J("certificates"),h=u("card.completedOn",{date:yit(e.issuedAt,d.language)}),f=e.kind==="PACK"?u("kind.pack"):u("kind.course"),m=r==="compact",p=e.status==="ISSUED",x=p?"bg-edition-pale text-edition-deeper border border-edition-soft":"bg-cream text-muted-ink border border-border";return l.jsxs("article",{className:["flex h-full flex-col gap-3.5 rounded-2xl border border-border bg-card transition-colors hover:border-edition-soft",m?"p-4":"p-5"].join(" "),"aria-label":e.subjectTitle,children:[l.jsxs("header",{className:"flex items-start gap-3",children:[l.jsx("span",{className:["flex shrink-0 items-center justify-center rounded-xl",x,m?"h-9 w-9":"h-11 w-11"].join(" "),"aria-hidden":"true",children:l.jsx(Mb,{className:m?"h-4 w-4":"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx(Oi,{variant:"outline",size:"sm",className:"mb-1.5 border-border uppercase tracking-[0.14em] text-muted-ink",children:f}),l.jsx("h3",{className:["truncate font-semibold text-strong",m?"text-sm":"text-card-title"].join(" "),title:e.subjectTitle,children:e.subjectTitle}),l.jsx("p",{className:"mt-1 text-xs text-muted-ink",children:h})]})]}),p?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"truncate font-mono text-[11px] uppercase tracking-[0.08em] text-muted-ink",title:e.id,children:e.id.slice(0,8)}),l.jsx(ce,{variant:m?"outline":"primary",size:"sm",onClick:()=>t(e.id),isLoading:n,leftIcon:n?void 0:l.jsx(Dg,{className:"h-4 w-4",strokeWidth:1.75}),"aria-label":u("card.download"),className:"mt-auto self-stretch",children:u(n?"card.downloading":"card.download")}),l.jsxs("button",{type:"button",onClick:()=>void(o==null?void 0:o(e.verificationCode)),className:"ds-touch-target mt-2 inline-flex w-full items-center justify-center gap-1.5 rounded-lg text-xs font-medium text-primary transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:[l.jsx(Ixe,{className:"h-3.5 w-3.5","aria-hidden":"true"}),c===e.verificationCode?u("card.shareCopied"):u("card.share")]})]}):e.status==="PENDING"?l.jsxs("div",{className:"mt-auto flex items-center gap-2 rounded-xl border border-edition-soft bg-edition-pale px-3 py-2 text-xs text-edition-deeper",role:"status",children:[l.jsx(Qo,{className:"h-3.5 w-3.5 animate-spin","aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"font-medium",children:u("card.pending")}),!m&&l.jsx("p",{className:"truncate text-edition-deeper/80",children:u("card.pendingHint")})]})]}):null,(e.status==="PENDING"||e.status==="FAILED")&&l.jsxs("div",{className:"mt-2",children:[l.jsx(ce,{type:"button",variant:"outline",size:"sm",isLoading:s,onClick:()=>i==null?void 0:i(e.id),leftIcon:s?void 0:l.jsx(Tx,{className:"h-3.5 w-3.5","aria-hidden":"true"}),className:"w-full",children:u(s?"card.retrying":"card.retry")}),a&&l.jsx("p",{role:"alert",className:"mt-1.5 text-xs text-clay",children:a})]}),e.status==="FAILED"&&l.jsxs("div",{className:"mt-auto flex items-center gap-2 rounded-xl border border-clay/30 bg-clay/10 px-3 py-2 text-xs text-clay",role:"alert",children:[l.jsx(UM,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"font-medium",children:u("card.failed")}),!m&&l.jsx("p",{className:"truncate text-clay/80",children:u("card.failedHint")})]})]}),!p&&l.jsxs("div",{className:"flex items-center justify-end text-xs text-muted-ink",children:[l.jsx(od,{className:"mr-1 h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("time",{dateTime:e.issuedAt,children:h})]})]})}function vit(){const{t:e}=J("certificates"),t=St(),n=mit(),r=pit(),i=git(),[s,a]=b.useState(null),o=b.useCallback(u=>{var f;const d=`${window.location.origin}${yet(u)}`,h=(f=navigator.clipboard)==null?void 0:f.writeText(d);if(h){h.then(()=>a(u)).catch(()=>{window.prompt(e("card.share"),d)});return}window.prompt(e("card.share"),d)},[e]),c=u=>{r.mutate(u,{onError:d=>{Vt.error(e("errors.downloadFailed"),{description:d.message})}})};return l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"flex items-start justify-between gap-4 border-b border-border pb-5",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-edition-soft bg-edition-pale text-edition-deeper","aria-hidden":"true",children:l.jsx(Mb,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-section-title text-strong",children:e("page.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-ink",children:e("page.subtitle")})]})]}),l.jsx("span",{className:"hidden shrink-0 items-center gap-1.5 text-sage sm:inline-flex","aria-hidden":"true",children:l.jsx(jh,{className:"h-4 w-4",strokeWidth:1.75})})]}),l.jsx("div",{className:"pt-6",children:n.isLoading?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2 text-sm text-muted-ink",role:"status","aria-live":"polite",children:[l.jsx(Qo,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),l.jsxs("span",{children:[e("page.title"),"â¦"]})]}),l.jsx("ul",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3","aria-hidden":"true",children:[0,1,2].map(u=>l.jsxs("li",{className:"flex h-40 animate-pulse flex-col gap-3.5 rounded-2xl border border-border bg-card p-5",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"h-11 w-11 shrink-0 rounded-xl bg-edition-pale"}),l.jsxs("div",{className:"flex-1 space-y-2",children:[l.jsx("span",{className:"block h-3 w-16 rounded-full bg-cream"}),l.jsx("span",{className:"block h-4 w-3/4 rounded-full bg-cream"}),l.jsx("span",{className:"block h-3 w-1/3 rounded-full bg-cream"})]})]}),l.jsx("span",{className:"mt-auto block h-8 w-full rounded-lg bg-cream"})]},u))})]}):n.isError?l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border border-clay/30 bg-clay/5 px-6 py-10 text-center",role:"alert",children:[l.jsx("p",{className:"text-sm font-medium text-clay",children:e("errors.loadFailed")}),l.jsx(ce,{variant:"outline",size:"sm",onClick:()=>void n.refetch(),children:e("errors.retry")})]}):n.data&&n.data.length===0?l.jsx(bc,{icon:l.jsx(Mb,{strokeWidth:1.75,"aria-hidden":"true"}),title:e("empty.title"),description:e("empty.body"),titleLevel:3,action:{label:e("empty.browseCourses"),onClick:()=>t(ee.ME_COURSES)}}):l.jsx("ul",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3","aria-label":e("page.title"),children:(n.data??[]).map(u=>l.jsx("li",{children:l.jsx(bit,{certificate:u,onDownload:c,isDownloading:r.isPending&&r.variables===u.id,onRetry:d=>i.mutate(d),isRetrying:i.isPending&&i.variables===u.id,retryError:i.isError&&i.variables===u.id?e("card.retryError"):null,onShare:o,sharedCode:s,variant:"page"})},u.id))})})]})}function wit({messages:e,isLoading:t,error:n,escalation:r,onSend:i,onCancel:s,onEscalate:a,onCitationClick:o,className:c}){const{t:u}=J("help"),[d,h]=b.useState(""),f=b.useRef(null),m=b.useRef(null);b.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight)},[e,t,n]),b.useEffect(()=>{if(!t)return;
1681function g(y){y.key==="Escape"&&s()}return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[t,s]);const p=d.trim().length>2&&!t;function x(g){var w;if(g.preventDefault(),!p)return;const y=d.trim();h(""),i(y),(w=m.current)==null||w.focus()}const v=e.length===0&&!t&&!n;return l.jsxs("div",{className:re("flex h-[36rem] flex-col gap-4 rounded-2xl border border-border bg-card p-4 md:p-6",c),children:[l.jsxs("header",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(Rn,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-card-title",children:u("askAi.title")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:u("askAi.subtitle")})]})]}),l.jsxs("div",{ref:f,role:"log","aria-live":"polite","aria-label":u("askAi.title"),className:"flex flex-1 flex-col gap-3 overflow-y-auto rounded-xl border border-border bg-background/50 p-3",children:[v&&l.jsx(Sit,{}),e.map(g=>l.jsx(Cit,{message:g,onCitationClick:o},g.id)),t&&l.jsx(kit,{}),n&&l.jsx(_it,{message:n}),r&&a&&l.jsx(Tit,{escalation:r,onEscalate:a})]}),l.jsxs("form",{onSubmit:x,className:"flex flex-col gap-2",children:[l.jsx("label",{className:"sr-only",htmlFor:"help-ai-input",children:u("askAi.inputLabel")}),l.jsx(Io,{ref:m,id:"help-ai-input",rows:2,value:d,maxLength:1e3,onChange:g=>h(g.target.value),placeholder:u("askAi.inputPlaceholder"),disabled:t,onKeyDown:g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),p&&x(g))}}),l.jsxs("div",{className:"flex justify-end gap-2",children:[t&&l.jsx(ce,{type:"button",variant:"outline",size:"sm",leftIcon:l.jsx(ar,{className:"h-4 w-4"}),onClick:s,children:u("askAi.stop")}),l.jsx(ce,{type:"submit",variant:"primary",size:"sm",leftIcon:t?void 0:l.jsx(Pg,{className:"h-4 w-4"}),disabled:!p,isLoading:t,children:u(t?"askAi.sending":"askAi.send")})]})]})]})}function Sit(){const{t:e}=J("help");return l.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-4 text-sm",children:[l.jsx("p",{className:"font-medium text-foreground",children:e("askAi.starter.title")}),l.jsx("p",{className:"mt-1 text-muted-foreground",children:e("askAi.starter.description")})]})}function Cit({message:e,onCitationClick:t}){const{t:n}=J("help"),r=e.role==="assistant";return l.jsx("div",{className:re("flex",r?"justify-start":"justify-end"),"data-role":e.role,children:l.jsxs("div",{className:re("max-w-[85%] rounded-2xl px-4 py-3 text-sm",r?"border border-border bg-card text-foreground":"bg-primary text-primary-foreground"),children:[l.jsx("div",{className:"text-xs font-medium opacity-80",children:n(r?"askAi.labels.assistant":"askAi.labels.you")}),l.jsx("p",{className:"mt-1 whitespace-pre-wrap leading-relaxed",children:e.content}),r&&typeof e.confidence=="number"&&l.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsxs("span",{children:[n("askAi.confidenceLabel"),":"]}),l.jsxs(Oi,{variant:"outline",size:"sm",children:[Math.round(e.confidence*100),"%"]})]}),r&&e.citations&&e.citations.length>0&&l.jsxs("div",{className:"mt-3 border-t border-border/40 pt-2",children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n("askAi.citationsTitle")}),l.jsx("ul",{className:"mt-1 flex flex-wrap gap-2",children:e.citations.map(i=>l.jsx("li",{children:l.jsx(ce,{type:"button",size:"sm",variant:"link",onClick:()=>t==null?void 0:t(i),rightIcon:l.jsx(gn,{className:"h-3 w-3"}),children:i})},i))})]})]})})}function kit(){const{t:e}=J("help");return l.jsx("div",{className:"flex justify-start",children:l.jsx("div",{className:"max-w-[85%] rounded-2xl border border-border bg-card px-4 py-3 text-sm text-muted-foreground",children:l.jsxs("span",{className:"inline-flex items-center gap-2",children:[l.jsxs("span",{className:"flex gap-1","aria-hidden":"true",children:[l.jsx(vj,{delayMs:0}),l.jsx(vj,{delayMs:150}),l.jsx(vj,{delayMs:300})]}),e("askAi.sending")]})})})}function vj({delayMs:e}){return l.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-foreground
1681/40",style:{animation:"help-ai-dot 1s infinite",animationDelay:`${e}ms`}})}function _it({message:e}){const{t}=J("help");return l.jsxs("div",{role:"alert",className:"flex items-start gap-2 rounded-2xl border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:[l.jsx(lf,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:t("askAi.errorTitle")}),l.jsx("p",{className:"mt-1 text-xs opacity-90",children:e||t("askAi.errorBody")})]})]})}function Tit({escalation:e,onEscalate:t}){const{t:n}=J("help"),r=b.useMemo(()=>e.suggestedBody.length>240?`${e.suggestedBody.slice(0,240)}...`:e.suggestedBody,[e.suggestedBody]);return l.jsxs("div",{className:"rounded-2xl border border-warning/30 bg-warning/5 p-4",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:n("askAi.escalationTitle")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n("askAi.escalationBody")}),l.jsxs("div",{className:"mt-3 rounded-xl bg-background p-3 text-sm",children:[l.jsx("p",{className:"font-medium text-foreground",children:e.suggestedTitle}),l.jsx("p",{className:"mt-1 whitespace-pre-wrap text-muted-foreground",children:r})]}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(ce,{variant:"primary",size:"sm",rightIcon:l.jsx(gn,{className:"h-4 w-4"}),onClick:()=>t(e),children:n("askAi.escalationCta")})})]})}const Eit=6e4,jit=["help","categories"],Nit=e=>["help","articles",e],Ait=e=>["help","article",e];function Mit(){return At({queryKey:jit,queryFn:()=>_e.get(he.HELP_CATEGORIES),staleTime:5*6e4})}function Rit(e={}){return At({queryKey:Nit(e),queryFn:()=>{const t=new URLSearchParams;e.category&&t.set("category",e.category),e.search&&t.set("search",e.search),e.cursor&&t.set("cursor",e.cursor),e.limit&&t.set("limit",String(e.limit));const n=t.toString(),r=n?`${he.HELP_ARTICLES}?${n}`:he.HELP_ARTICLES;return _e.get(r)},staleTime:6e4})}function Oit(e){return At({queryKey:e?Ait(e):["help","article","noop"],queryFn:()=>_e.get(he.helpArticle(e??"")),enabled:!!e,staleTime:6e4})}function Dit(){return rt({mutationFn:e=>_e.post(he.HELP_AI_ASSISTANT,e,{timeout:Eit})})}function Lit({onEscalate:e}){const t=St(),[n,r]=b.useState([]),[i,s]=b.useState(),[a,o]=b.useState(null),[c,u]=b.useState(null),d=b.useRef(null),h=Dit();b.useEffect(()=>()=>{var v;(v=d.current)==null||v.abort()},[]);const f=b.useCallback(v=>{var w;u(null),o(null);const g=`local-${Date.now()}`;r(S=>[...S,{id:g,role:"user",content:v}]);const y=new AbortController;(w=d.current)==null||w.abort(),d.current=y,h.mutate({question:v,sessionId:i},{onSuccess:S=>{if(!y.signal.aborted)if(s(S.sessionId),S.escalateToTicket){const C={suggestedTitle:S.suggestedTitle??"Question from Help Assistant",suggestedBody:S.suggestedBody??v};o(C)}else S.answer&&r(C=>[...C,{id:`assistant-${Date.now()}`,role:"assistant",content:S.answer??"",citations:S.citations,confidence:S.confidence}])},onError:S=>{y.signal.aborted||u(S.message)},onSettled:()=>{d.current===y&&(d.current=null)}})},[h,i]),m=b.useCallback(()=>{var v;(v=d.current)==null||v.abort(),d.current=null,h.reset()},[h]),p=b.useCallback(v=>{o(null),e==null||e(v)},[e]),x=b.useCallback(v=>{t(DD(v))},[t]);return l.jsx(wit,{messages:n,isLoading:h.isPending,error:c,escalation:a,onSend:f,onCancel:m,onEscalate:p,onCitationClick:x})}function Pit({article:e}){const{t,i18n:n}=J("help"),r=St(),i=Iit(e.updatedAt,n.language);
1681return l.jsxs("div",{className:"flex h-full flex-col gap-4 rounded-2xl border border-border bg-card p-5 transition-colors hover:border-edition-soft",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(Vv,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx(Oi,{variant:"outline",size:"sm",children:e.categoryName})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-card-title leading-snug",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3",children:e.summary})]}),l.jsxs("div",{className:"mt-auto flex items-center justify-between gap-3 pt-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:t("kb.card.updatedOn",{date:i})}),l.jsx(ce,{variant:"ghost",size:"sm",rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5"}),onClick:()=>r(DD(e.slug)),children:t("kb.card.viewArticle")})]})]})}function Iit(e,t){try{return(typeof e=="string"?new Date(e):e).toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}const bS="__all";function Fit({onAskAssistant:e}){var p,x;const{t}=J("help"),[n,r]=b.useState(""),[i,s]=b.useState(bS),a=Mit(),o=Rit({category:i===bS?void 0:i,search:n.trim()||void 0,limit:24}),c=((p=o.data)==null?void 0:p.data)??[],u=a.data??[],d=[{value:bS,label:t("kb.filters.allCategories")},...u.map(v=>({value:v.slug,label:v.name}))],h=o.isLoading,f=o.isError,m=!h&&!f&&c.length===0;return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("header",{className:"space-y-1",children:[l.jsx("h2",{className:"text-section-title",children:t("kb.title")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t("kb.
1681subtitle")})]}),u.length>0&&l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:u.map(v=>{const g=i===v.slug;return l.jsxs("button",{type:"button","aria-pressed":g,onClick:()=>s(g?bS:v.slug),className:re("flex items-start gap-3 rounded-2xl border bg-card p-4 text-left transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",g?"border-edition-soft bg-edition-pale":"border-border hover:border-edition-soft"),children:[l.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(Axe,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("span",{className:"min-w-0",children:[l.jsx("span",{className:"block truncate text-sm font-semibold text-strong",children:v.name}),v.description&&l.jsx("span",{className:"mt-0.5 block truncate text-xs text-muted-foreground",children:v.description})]})]},v.id)})}),l.jsx(nne,{searchValue:n,onSearch:r,searchPlaceholder:t("kb.search.placeholder"),filters:[{key:"category",options:d,value:i,onChange:s}]}),h&&l.jsx("div",{className:"flex justify-center py-12 text-muted-foreground",children:l.jsxs("span",{className:"inline-flex items-center gap-2 text-sm",children:[l.jsx(Rx,{size:"sm"}),t("kb.loading")]})}),f&&l.jsx(bc,{icon:l.jsx(Ci,{className:"h-8 w-8","aria-hidden":"true"}),title:t("kb.errorTitle"),description:t("kb.errorBody")}),m&&l.jsx(bc,{icon:l.jsx(Ci,{className:"h-8 w-8","aria-hidden":"true"}),title:t("kb.empty.title"),description:t("kb.empty.description"),action:e?{label:t("tabs.askAi"),onClick:e}:void 0}),!h&&!f&&c.length>0&&l.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(v=>l.jsx(Pit,{article:v},v.id))}),((x=o.data)==null?void 0:x.hasMore)&&l.jsx("div",{className:"flex justify-center pt-2",children:l.jsx(ce,{variant:"outline",size:"sm",onClick:()=>o.refetch(),disabled:o.isFetching,children:o.isFetching?t("kb.loading"):t("kb.card.viewArticle")})})]})}const rL=["support","tickets"],nue=e=>["support","tickets",e];function Bit(e={}){return At({queryKey:[...rL,e],queryFn:async()=>{const t=new URLSearchParams;e.status&&t.set("status",e.status),e.cursor&&t.set("cursor",e.cursor),e.limit&&t.set("limit",String(e.limit));const n=t.toString(),r=n?`${he.ME_SUPPORT_TICKETS}?${n}`:he.ME_SUPPORT_TICKETS;return(await _e.get(r)).data},staleTime:6e4})}function zit(e){return At({queryKey:e?nue(e):["support","tickets","noop"],queryFn:()=>_e.get(he.meSupportTicket(e??"")),enabled:!!e})}function $it(){const e=Tt();return rt({mutationFn:t=>_e.post(he.ME_SUPPORT_TICKETS,t),onSuccess:()=>{e.invalidateQueries({queryKey:rL})}})}function Uit(){const e=Tt();return rt({mutationFn:({ticketId:t,content:n})=>_e.post(he.meSupportTicketComments(t),{content:n}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:nue(n.ticketId)}),e.invalidateQueries({queryKey:rL})}})}function rue(e,t){var n;return{id:e.id,ticketNumber:e.ticketNumber,subject:e.subject,description:e.description,status:e.status,priority:e.priority,category:e.category,createdAt:e.createdAt,updatedAt:e.updatedAt,resolvedAt:e.resolvedAt,commentCount:(t==null?void 0:t.comments.length)??0,comments:(n=t==null?void 0:t.comments)==null?void 0:n.map(r=>({id:r.id,authorType:r.authorType,content:r.content,createdAt:r.createdAt}))}}function Vit(){const{t:e}=J("support"),t=Bit(),n=Uit(),[r,i]=b.useState(null),s={loading:e("myTickets.loading"),emptyTitle:e("myTickets.emptyTitle"),emptyDescription:e("myTickets.emptyDescription"),errorTitle:e("myTickets.errorTitle"),description:e("myTickets.card.description"),comments:e("myTickets.card.comments"),supportTeam:e("myTickets.card.supportTeam"),you:e("myTickets.card.you"),replyPlaceholder:e("myTickets.card.replyPlaceholder"),sendReply:e("myTickets.card.sendReply")},a=async(c,u)=>{i(c);try{await n.mutateAsync({ticketId:c,content:u})}finally{i(null)}},o=(t.data??[]).map(c=>rue(c));return l.jsxs("div",{className:"space-y-4",children:[l.jsx("header",{children:l.jsx("h2",{className:"text-section-title",children:e("myTickets.title")})}),l.jsx(Hit,{tickets:t.data??[],isLoading:t.isLoading,isError:t.isError,errorMessage:e("myTickets.errorBody"),onReply:a,isReplying:n.isPending&&r!==null,labels:s,fallback:l.jsx(Rae,{tickets:o,isLoading:t.isLoading,isError:t.isError,labels:s})})]})}function Hit({tickets:e,isLoading:t,isError:n,errorMessage:r,onReply:i,isReplying:s,labels:a,fallback:o}){return t||n||e.length===0?o:l.jsx("div",{className:"space-y-3",children:e.map(c=>l.jsx(qit,{ticket:c,onReply:i,isReplying:s,labels:a,errorMessage:r},c.id))})}function qit({ticket:e,onReply:t,isReplying:n,labels:r}){const i=zit(e.id);return l.jsx(Rae,{tickets:[rue(e,i.data??void 0)],isLoading:!1,isError:!1,labels:r,onReply:t,isReplying:n})}const Git=["TECHNICAL_ISSUE","COURSE_CONTENT","BILLING","ACCOUNT","FEATURE_REQUEST","OTHER"],iue={subject:"",category:"OTHER",description:""};function Wit({onSuccess:e,prefill:t}){const{t:n}=J("support"),r=$it(),[i,s]=b.useState(()=>_q(t)),[a,o]=b.useState(null);b.useEffect(()=>{t&&s(f=>f.subject.trim()===""&&f.description.trim()===""?_q(t):f)},[t]);const c=b.useMemo(()=>Git.map(f=>({value:f,label:n(`submitTicket.categories.${f}`)})),[n]),u=(f,m)=>
1681{s(p=>({...p,[f]:m}))},d=async f=>{f.preventDefault(),o(null);try{const m=await r.mutateAsync({subject:i.subject.trim(),description:i.description.trim(),category:i.category});s(iue),o({kind:"success",text:n("submitTicket.successBody",{ticketNumber:m.ticketNumber})}),window.setTimeout(()=>e==null?void 0:e(),1200)}catch{o({kind:"error",text:n("submitTicket.errorBody")})}},h=i.subject.trim().length>0&&i.description.trim().length>=10;return l.jsxs("form",{onSubmit:d,className:"space-y-6",children:[l.jsxs("header",{className:"space-y-1",children:[l.jsx("h2",{className:"text-section-title",children:n("submitTicket.title")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:n("submitTicket.description")})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[l.jsx(dr,{label:n("submitTicket.fields.subject"),htmlFor:"support-subject",children:l.jsx(fn,{id:"support-subject",value:i.subject,onChange:f=>u("subject",f.target.value),placeholder:n("submitTicket.fields.subjectPlaceholder"),maxLength:200,required:!0})}),l.jsx(dr,{label:n("submitTicket.fields.category"),htmlFor:"support-category",children:l.jsx(Ho,{options:c,value:i.category,onChange:f=>u("category",f),ariaLabel:n("submitTicket.fields.category")})})]}),l.jsx(dr,{label:n("submitTicket.fields.description"),htmlFor:"support-description",children:l.jsx(Io,{id:"support-description",rows:6,value:i.description,onChange:f=>u("description",f.target.value),placeholder:n("submitTicket.fields.descriptionPlaceholder"),maxLength:2e3,required:!0})}),a&&l.jsx("div",{role:a.kind==="error"?"alert":"status",className:a.kind==="error"?"rounded-xl border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive":"rounded-xl border border-success/30 bg-success/10 px-4 py-3 text-sm text-success",children:a.text}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"submit",variant:"primary",isLoading:r.isPending,leftIcon:r.isPending?void 0:l.jsx(Pg,{className:"h-4 w-4"}),disabled:!h,children:r.isPending?n("submitTicket.fields.submitting"):n("submitTicket.fields.submit")})})]})}function _q(e){return e?{subject:e.subject.slice(0,200),category:"OTHER",description:e.description.slice(0,2e3)}:iue}const Yit=[{key:"kb",labelKey:"tabs.knowledgeBase",ns:"help",Icon:Ci},{key:"askai",labelKey:"tabs.askAi",ns:"help",Icon:Rn},{key:"submit",labelKey:"tabs.submitTicket",ns:"support",Icon:FM},{key:"mytickets",labelKey:"tabs.myTickets",ns:"support",Icon:k6}];function Kit(){const{t:e}=J("support"),t=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light",children:e("page.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("page.subtitle")})]}),[e]);On({left:t})}function Xit(){const{t:e}=J("support"),{t}=J("help"),[n,r]=b.useState("kb"),[i,s]=b.useState(null);Kit();const a=o=>{s({subject:o.suggestedTitle,description:o.suggestedBody}),r("submit")};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{className:"rounded-2xl bg-brand-gradient px-6 py-10 text-center text-on-dark sm:px-8 sm:py-12",children:[l.jsx("h2",{className:"text-2xl font-light sm:text-[1.7rem]",children:e("page.title")}),l.jsxs("button",{type:"button",onClick:()=>r("kb"),className:"mx-auto mt-5 flex w-full max-w-lg items-center gap-2.5 rounded-xl bg-white/95 px-4 py-3 text-left text-sm text-muted-ink shadow-overlay transition hover:bg-white",children:[l.jsx($M,{className:"h-[18px] w-[18px] shrink-0 text-edition-deeper",strokeWidth:1.75,"aria-hidden":"true"}
1681),l.jsx("span",{className:"flex-1",children:t("kb.search.placeholder")})]}),l.jsx("p",{className:"mt-3 text-xs text-on-dark/80",children:e("page.subtitle")})]}),l.jsx("div",{role:"tablist","aria-label":e("tabs.ariaLabel"),className:"inline-flex flex-wrap gap-1 rounded-full border border-border bg-card p-1",children:Yit.map(o=>{const c=n===o.key,u=o.ns==="help"?t(o.labelKey):e(o.labelKey);return l.jsxs("button",{role:"tab",type:"button","aria-selected":c,"aria-controls":`help-tab-panel-${o.key}`,id:`help-tab-${o.key}`,onClick:()=>r(o.key),className:re("ds-touch-target","inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",c?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-edition-pale hover:text-edition-deeper"),children:[l.jsx(o.Icon,{className:"h-4 w-4","aria-hidden":"true"}),u]},o.key)})}),l.jsxs("div",{role:"tabpanel",id:`help-tab-panel-${n}`,"aria-labelledby":`help-tab-${n}`,className:re("rounded-2xl border border-border bg-card p-6"),children:[n==="kb"&&l.jsx(Fit,{onAskAssistant:()=>r("askai")}),n==="askai"&&l.jsx(Lit,{onEscalate:a}),n==="submit"&&l.jsx(Wit,{prefill:i,onSuccess:()=>{s(null),r("mytickets")}}),n==="mytickets"&&l.jsx(Vit,{})]}
1681),l.jsxs("div",{className:"flex flex-col gap-4 rounded-2xl bg-brand-gradient px-6 py-5 text-on-dark sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-base font-semibold",children:e("needMoreHelp.title")}),l.jsx("p",{className:"mt-1 text-sm text-on-dark/80",children:e("needMoreHelp.body")})]}),l.jsx(ce,{variant:"outline",rightIcon:l.jsx(IM,{className:"h-4 w-4"}),className:"shrink-0 border-white/30 bg-white/10 text-on-dark hover:bg-white/20 hover:text-on-dark",onClick:()=>r("submit"),children:e("needMoreHelp.cta")})]})]})}function Qit(){var d;const{slug:e}=Ec(),{t,i18n:n}=J("help"),r=St(),i=Oit(e),s=((d=i.data)==null?void 0:d.title)??t("article.loading"),a=b.useMemo(()=>l.jsx("div",{children:l.jsx("h1",{className:"text-page-title font-light",children:s})}),[s]),o=b.useMemo(()=>l.jsx($i,{label:t("article.back"),onClick:()=>r(ee.ME_HELP)}),[r,t]);if(On({left:a,actions:o}),i.isLoading)return l.jsx("div",{className:"flex justify-center py-16 text-sm text-muted-foreground",children:l.jsxs("span",{className:"inline-flex items-center gap-2",children:[l.jsx(Rx,{size:"sm"}),t("article.loading")]})});if(i.isError||!i.data)return l.jsx(bc,{icon:l.jsx(kx,{className:"h-8 w-8","aria-hidden":"true"}),title:t("article.notFoundTitle"),description:t("article.notFoundBody"),action:{label:t("article.back"),onClick:()=>r(ee.ME_HELP)}});const c=i.data,u=Zit(c.updatedAt,n.language);return l.jsxs("article",{className:"space-y-6",children:[l.jsxs("div",{className:"reading-surface space-y-4 rounded-2xl border border-border p-6 md:p-8",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(Oi,{variant:"outline",size:"sm",children:c.category.name}),l.jsx("span",{className:"text-xs text-muted-foreground",children:t("article.lastUpdated",{date:u})})]}),l.jsxs("header",{className:"space-y-2",children:[l.jsx("h1",{className:"text-display font-light md:text-3xl",children:c.title}),l.jsx("p",{className:"text-base text-muted-foreground",children:c.summary})]}),l.jsx("div",{className:"prose prose-sm max-w-none md:prose-base",children:l.jsx(qne,{children:c.bodyMarkdown})})]}),l.jsxs("div",{className:"flex flex-col items-start gap-3 rounded-2xl border border-edition-soft bg-edition-pale p-5 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-card text-primary",children:l.jsx(Rn,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("div",{children:l.jsx("p",{className:"text-sm font-semibold text-edition-deeper",children:t("article.askFollowUp")})})]}),l.jsx(ce,{variant:"primary",size:"sm",onClick:()=>r(ee.ME_HELP),children:t("tabs.askAi")})]})]})}function Zit(e,t){try{return(typeof e=="string"?new Date(e):e).toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}let t8=0;const n8=new Set;function Tq(){for(const e of n8)e()}function Jit(e){return n8.add(e),()=>{n8.delete(e)}}function est(){b.useLayoutEffect(()=>(t8+=1,Tq(),()=>{t8-=1,Tq()}),[])}function I0t(){return b.useSyncExternalStore(Jit,()=>t8>0,()=>!1)}const tst="#FAF9F7";function sue({logo:e,size:t}){const{frame:n,bars:r}=e;return l.jsxs("svg",{width:t,height:t,viewBox:e.viewBox,fill:"none","aria-hidden":"true",children:[l.jsx("rect",{x:n.x,y:n.y,width:n.width,height:n.height,rx:n.rx,fill:"none",stroke:n.stroke,strokeWidth:n.strokeWidth}),r.map(i=>l.jsx("rect",{x:i.x,y:i.y,width:i.width,height:i.height,rx:i.rx,fill:i.fill},`${i.x}-${i.y}`))]})}function nst({size:e=40,tone:t="gradient",className:n}){const r=t==="on-dark",i=at.mark.logo;if(i){const a=Math.round(e*.14);return l.jsx("span",{"aria-hidden":"true",className:["inline-flex flex-shrink-0 items-center justify-center rounded-xl border-[0.5px] border-black/5",n??""].filter(Boolean).join(" "),style:{width:e,height:e,backgroundColor:tst},children:l.jsx(sue,{logo:i,size:e-a})})}const s=Math.round(e*.55);return l.jsx("span",{"aria-hidden":"true",className:["inline-flex flex-shrink-0 items-center justify-center text-on-dark",r?"rounded-xl border-[0.5px] border-white/20 bg-white/15":"rounded-xl bg-brand-gradient",n??""].filter(
1681Boolean).join(" "),style:{width:e,height:e},children:l.jsx("svg",{width:s,height:s,viewBox:at.mark.viewBox,fill:"none",stroke:"currentColor",strokeWidth:at.mark.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",children:at.mark.paths.map(a=>l.jsx("path",{d:a},a))})})}function aue({className:e,variant:t="full"}){return l.jsxs("div",{className:e,children:[l.jsx("p",{children:at.legal.copyright}),t==="full"&&at.legal.operator?l.jsx("p",{className:"mt-1",children:at.legal.operator}):null,t==="full"?l.jsx("p",{className:"mt-1",children:at.legal.trademarks}):null]})}const rst=[{label:"Ask Arthur about any lesson, any time",path:"M12 4.4l1.7 4.4 4.4 1.7-4.4 1.7L12 16.6l-1.7-4.4L5.9 10.5l4.4-1.7Z"},{label:"Practice drawn from the lessons you've finished",path:"M5 9v6M8 7v10M16 7v10M19 9v6M8 12h8"},{label:"A path planned from your career interview",path:"M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8ZM12 11.4a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Z"}];function ist(){return l.jsxs("aside",{className:"relative hidden flex-col justify-between overflow-hidden bg-brand-gradient px-12 py-12 text-on-dark lg:flex lg:w-[44%]",children:[l.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -right-24 -top-24 h-[340px] w-[340px] rounded-full border border-white/10"}),l.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -bottom-32 right-8 h-[280px] w-[280px] rounded-full border border-white/[0.09]"}),l.jsxs("div",{className:"relative flex items-center gap-3",children:[at.mark.logo?l.jsx("span",{"aria-hidden":"true",className:"inline-flex h-[42px] w-[42px] items-center justify-center rounded-xl border-[0.5px] border-black/5",style:{backgroundColor:"#FAF9F7"},children:l.jsx(sue,{logo:at.mark.logo,size:34})}):l.jsx("span",{"aria-hidden":"true",className:"inline-flex h-[42px] w-[42px] items-center justify-center rounded-xl border-[0.5px] border-white/20 bg-white/15 text-on-dark",children:l.jsx("svg",{width:23,height:23,viewBox:at.mark.viewBox,fill:"none",stroke:"currentColor",strokeWidth:at.mark.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",children:at.mark.paths.map(e=>l.jsx("path",{d:e},e))})}),l.jsxs("span",{className:"leading-tight",children:[l.jsx("span",{className:"block text-base font-semibold",children:at.name}),l.jsx("span",{className:"block text-[9.5px] font-medium uppercase tracking-[0.18em] text-on-dark/80",children:at.subtitle})]})]}),l.jsxs("div",{className:"relative max-w-sm",children:[l.jsxs("h2",{className:"mb-4 text-[2rem] font-light leading-tight tracking-tight",children:["Learning built around"," ",l.jsx("span",{className:"font-semibold",children:"where you're going"}),"."]}),l.jsx("p",{className:"mb-7 text-sm leading-relaxed text-on-dark/80",children:"Tell Arthur about your work and where you want to go. Arthur plans the courses to get you there, writes each lesson, and answers your questions along the way."}),l.jsx("ul",{className:"flex flex-col gap-3.5",children:rst.map(e=>l.jsxs("li",{className:"flex items-center gap-3.5",children:[l.jsx("span",{className:"inline-flex h-[34px] w-[34px] flex-shrink-0 items-center justify-center rounded-[9px] bg-white/15 text-on-dark",children:l.jsx("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:e.path})})}),l.jsx("span",{className:"text-[13.5px] text-on-dark/90",children:e.label})]},e.label))})]}),l.jsx(aue,{className:"relative text-[11px] leading-relaxed text-on-dark/70",variant:"full"}),at.key!=="ciai"&&l.jsx("p",{className:"relative mt-1 text-[11px] text-on-dark/70",children:"Newport Beach · Islamabad · Nairobi"})]})}function Ju({lead:e,accent:t}){return l.jsxs(l.Fragment,{children:[e," ",l.jsx("span",{className:"font-medium text-primary",children:t})]})}function ed({title:e,subtitle:t,children:n,centered:r=!1}){return est(),l.jsxs("div",{className:"flex min-h-[100dvh] w-full bg-background text-strong",children:[l.jsx(ist,{}),l.jsx("main",{className:"flex flex-1 flex-col items-center justify-center px-6 py-10 sm:px-8",...ZD,children:l.jsxs("div",{className:"w-full max-w-[404px]",children:[l.jsxs("div",{className:["mb-8 flex items-center gap-3",r&&"justify-center"].filter(
1681Boolean).join(" "),children:[l.jsx(nst,{size:40,tone:"gradient"}),l.jsx("span",{className:"text-base font-semibold text-strong",children:at.name})]}),l.jsxs("div",{className:["mb-7",r&&"text-center"].filter(Boolean).join(" "),children:[l.jsx("h1",{className:"text-page-title font-light tracking-tight text-strong",children:e}),t&&l.jsx("p",{className:"mt-1.5 text-sm text-muted-ink",children:t})]}),n,l.jsxs("p",{className:"mt-10 text-center text-[11px] leading-relaxed text-muted-ink",children:[l.jsx(Sce,{}),l.jsx(Dce,{className:"mt-1 block"})]})]})})]})}const sst=/email verification required/i;function ast(e){var i,s,a;const t=e;if(((t==null?void 0:t.status)??((i=t==null?void 0:t.response)==null?void 0:i.status))!==403)return!1;const r=((a=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:a.message)??(t==null?void 0:t.message)??"";return sst.test(String(r))}function ost(){const{t:e}=J("auth"),t=St(),{setSession:n}=yf(),r=knt(),[i,s]=b.useState(!1),a=iet(),o=pf({resolver:gf(Uce),defaultValues:{identifier:a??"",password:"",rememberMe:!!a}}),c=o.watch("rememberMe"),[u,d]=b.useState(!1),h=o.handleSubmit(async f=>{try{const m=await r.mutateAsync(f);if(f.rememberMe?set(f.identifier):aet(),Lce(m)){t(ee.AUTH_MFA_VERIFY,{state:{tempToken:m.tempToken,redirectTo:ee.ME_HOME}});return}n(m.accessToken,m.refreshToken,a_(m.user),m.expiresIn),t(ee.ME_HOME)}catch(m){if(ast(m)){d(!0);return}o.setError("root",{type:"manual",message:e("login.invalidCredentials")})}});return l.jsx(F3,{...o,children:l.jsxs("form",{onSubmit:h,className:"space-y-4",noValidate:!0,children:[u&&l.jsxs("div",{role:"alert",className:"rounded-xl border-[0.5px] border-edition-soft bg-edition-pale px-4 py-3 text-sm text-edition-deeper",children:[l.jsx("p",{className:"font-medium",children:e("login.unverifiedTitle")}),l.jsx("p",{className:"mt-1",children:e("login.unverifiedBody")}),l.jsx(ir,{to:ee.AUTH_VERIFY_EMAIL,className:"ds-touch-target mt-2 inline-flex items-center font-medium underline underline-offset-2",children:e("login.unverifiedAction")})]}),o.formState.errors.root&&l.jsx("div",{role:"alert",className:"flex items-start rounded-xl border-[0.5px] border-clay/30 bg-clay/5 px-4 py-3 text-sm text-clay",children:l.jsx("span",{className:"font-medium",children:o.formState.errors.root.message})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{htmlFor:"identifier",className:"block text-xs font-semibold text-body-ink",children:e("login.identifierLabel")}),l.jsx(fn,{...o.register("identifier"),id:"identifier",type:"text",autoComplete:"username",placeholder:e("login.identifierPlaceholder"),leftIcon:l.jsx(Ih,{size:18,strokeWidth:1.75}),error:!!o.formState.errors.identifier}),o.formState.errors.identifier&&l.jsx("p",{className:"text-xs text-clay",children:o.formState.errors.identifier.message})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("label",{htmlFor:"password",className:"block text-xs font-semibold text-body-ink",children:e("login.passwordLabel")}),l.jsx(ir,{to:ee.AUTH_FORGOT_PASSWORD,className:"text-xs font-medium text-primary transition-colors hover:underline",children:e("login.forgotPassword")})]}),l.jsx(fn,{...o.register("password"),id:"password",type:i?"text":"password",autoComplete:"current-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",leftIcon:l.jsx(Di,{size:18,strokeWidth:1.75}),rightIcon:l.jsx("button",{type:"button",onClick:()=>s(!i),className:"pointer-events-auto -mr-1 p-1 text-muted-ink transition-colors hover:text-primary","aria-label":i?"Hide password":"Show password",children:i?l.jsx(bk,{size:18,strokeWidth:1.75}):l.jsx(_x,{size:18,strokeWidth:1.75})}),error:!!o.formState.errors.password}),o.formState.errors.password&&l.jsx("p",{className:"text-xs text-clay",children:o.formState.errors.password.message})]}),l.jsxs("label",{className:"group flex cursor-pointer select-none items-center gap-3 pt-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{...o.register("rememberMe"),type:"checkbox",className:"peer sr-only"}),l.jsx("div",{className:"h-5 w-5 rounded-md border-[1.5px] border-input bg-card transition-all peer-checked:border-primary peer-checked:bg-primary group-hover:border-primary/50"}),l.jsx(Kn,{size:12,className:["pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 stroke-[3] text-primary-foreground transition-opacity",c?"opacity-100":"opacity-0"].join(" ")})]}),l.jsx("span",{className:"text-sm text-muted-ink transition-colors group-hover:text-body-ink",children:e("login.rememberMe")})]}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",isLoading:r.isPending,className:"mt-1 h-12 w-full rounded-xl text-sm font-semibold",children:r.isPending?e("login.submitting"):e("login.submit")}),l.jsxs("p",{className:"pt-2 text-center text-sm text-muted-ink",children:[e("login.noAccount")," ",l.jsx(ir,{to:ee.AUTH_SIGNUP,className:"font-semibold text-primary hover:underline",children:e("login.signupLink")})]})]})})}function lst(){return At({queryKey:["auth","sso","providers"],queryFn:()=>_e.get(he.AUTH_SSO_PROVIDERS),staleTime:5*60*1e3,retry:!1})}function cst(e,t){const n=new URLSearchParams({intent:t.intent});return t.ageConfirmed&&n.set("age",String(tg)),`${Ew()}/auth/${e}/start?${n.toString()}`}function ust(){return rt({mutationFn:e=>_e.post(he.AUTH_SSO_EXCHANGE,e)})}const dst=["microsoft","google"];function oue({intent:e,ageConfirmed:t,onBeforeStart:n,navigateTo:r=i=>window.location.assign(i)}){const{t:i}=J("auth"),s=lst(),a=dst.filter(o=>{var c;return((c=s.data)==null?void 0:c[o])===!0});return a.length===0?null:l.jsxs("div",{className:"space-y-3","data-testid":"sso-buttons",children:[l.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-ink",children:[l.jsx("span",{className:"h-px flex-1 bg-rule","aria-hidden":"true"}),i("sso.or"),l.jsx("span",{className:"h-px flex-1 bg-rule","aria-hidden":"true"})]}),a.map(o=>l.jsx("button",{type:"button",onClick:()=>{n&&!n()||r(cst(o,{intent:e,ageConfirmed:t}))},className:"ds-touch-target flex h-12 w-full items-center justify-center rounded-xl border-[0.5px] border-rule bg-card text-sm font-semibold text-strong transition-colors hover:bg-cream focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:i(`sso.c
1681ontinue.${o}`)},o))]})}function lue(e){const{t}=J("auth");return e?t(`sso.errors.${e}`,{defaultValue:t("sso.errors.generic"),age:tg}):null}function hst(){const{t:e}=J("auth"),[t]=ps(),n=lue(t.get("sso_error"));return l.jsxs(ed,{title:l.jsx(Ju,{lead:e("login.titleLead"),accent:e("login.titleAccent")}),subtitle:e("login.subtitle"),children:[n?l.jsx("p",{role:"alert",className:"mb-4 rounded-xl border-[0.5px] border-clay/30 bg-clay/5 px-4 py-3 text-sm text-clay",children:n}):null,l.jsx(ost,{}),l.jsx("div",{className:"mt-4",children:l.jsx(oue,{intent:"signin"})})]})}function fst(e,t){var n;if(e instanceof AD){const r=(n=e.response)==null?void 0:n.data;if(r!=null&&r.message)return r.message}return t}function mst(){var p;const{t:e}=J("auth"),t=St(),n=Tnt(),{setSession:r}=yf(),[i,s]=b.useState(!1),[a]=ps(),o=lue(a.get("sso_error")),c=pf({resolver:gf(lrt),defaultValues:{firstName:"",lastName:"",email:"",password:"",website:""},mode:"onTouched"}),{register:u,formState:{errors:d}}=c,h=c.handleSubmit(async x=>{try{const v=await n.mutateAsync({email:x.email,password:x.password,firstName:x.firstName,lastName:x.lastName??"",ageConfirmed:!0,website:x.website??""});r(v.accessToken,v.refreshToken,a_(v.user),v.expiresIn),t(ee.ME_HOME)}catch(v){c.setError("root",{type:"manual",message:fst(v,e("signup.failed"))})}}),f="mb-1.5 block text-xs font-semibold text-body-ink",m=c.watch("ageConfirmed")===!0;return l.jsxs("form",{onSubmit:h,className:"space-y-4",noValidate:!0,"data-testid":"signup-form",children:[o&&!d.root?l.jsx("p",{role:"alert",className:"rounded-xl border-[0.5px] border-clay/30 bg-clay/5 px-4 py-3 text-sm text-clay",children:o}):null,d.root&&l.jsx("p",{role:"alert",className:"rounded-xl border-[0.5px] border-clay/30 bg-clay/5 px-4 py-3 text-sm text-clay",children:d.root.message}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"signup-first",className:f,children:e("signup.firstNameLabel")}),l.jsx(fn,{id:"signup-first",...u("firstName"),type:"text",autoComplete:"given-name",placeholder:e("signup.firstNamePlaceholder"),leftIcon:l.jsx(Lb,{size:18}),error:!!d.firstName}),d.firstName&&l.jsx("p",{className:"mt-1 text-sm text-clay",children:d.firstName.message})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"signup-last",className:f,children:e("signup.lastNameOptionalLabel")}),l.jsx(fn,{id:"signup-last",...u("lastName"),type:"text",autoComplete:"family-name",placeholder:e("signup.lastNamePlaceholder"),leftIcon:l.jsx(Lb,{size:18})})]})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"signup-email",className:f,children:e("signup.emailLabel")}),l.jsx(fn,{id:"signup-email",...u("email"),type:"email",autoComplete:"email",placeholder:e("signup.emailPlaceholder"),leftIcon:l.jsx(Ih,{size:18}),error:!!d.email}),d.email&&l.jsx("p",{className:"mt-1 text-sm text-clay",children:d.email.message})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"signup-password",className:f,children:e("signup.passwordLabel")}),l.jsx(fn,{id:"signup-password",...u("password"),type:i?"text":"password",autoComplete:"new-password",placeholder:e("signup.passwordPlaceholder"),leftIcon:l.jsx(Di,{size:18}),rightIcon:l.jsx("button",{type:"button",onClick:()=>s(x=>!x),"aria-label":e(i?"signup.hidePasswordAria":"signup.showPasswordAria"),className:"pointer-events-auto ds-touch-target inl
1681ine-flex items-center justify-center text-muted-ink",children:i?l.jsx(bk,{size:18}):l.jsx(_x,{size:18})}),error:!!d.password}),l.jsx("p",{className:`mt-1 text-xs ${d.password?"text-clay":"text-muted-ink"}`,children:((p=d.password)==null?void 0:p.message)??e("signup.passwordHint")})]}),l.jsxs("div",{"aria-hidden":"true",className:"absolute -left-[9999px] h-px w-px overflow-hidden",children:[l.jsx("label",{htmlFor:"signup-website",children:"Website"}),l.jsx("input",{id:"signup-website",type:"text",tabIndex:-1,autoComplete:"off",...u("website")})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"flex items-start gap-2.5 text-sm text-body-ink",children:[l.jsx("input",{type:"checkbox",...u("ageConfirmed"),className:"mt-0.5 h-4 w-4 rounded border-rule accent-primary"}),l.jsx("span",{children:e("signup.ageConfirm",{age:tg})})]}),d.ageConfirmed&&l.jsx("p",{className:"mt-1 text-sm text-clay",role:"alert",children:at.underMinAge.fleReferral?l.jsxs(l.Fragment,{children:[e("signup.underMinAgeTitle")," ",l.jsx("a",{href:art,className:"underline",children:e("signup.underMinAgeLink")})]}):at.underMinAge.message})]}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",isLoading:n.isPending,className:"h-12 w-full rounded-xl",children:n.isPending?e("signup.submitting"):e("signup.submit")}),l.jsx(oue,{intent:"signup",ageConfirmed:m,onBeforeStart:()=>m?!0:(c.trigger("ageConfirmed"),!1)}),l.jsxs("p",{className:"text-center text-xs leading-relaxed text-muted-ink",children:[e("signup.legalPrefix")," ",at.publishedLegal?l.jsxs(l.Fragment,{children:[l.jsx("a",{href:at.publishedLegal.terms,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:e("signup.terms")})," ",e("signup.legalAnd")," ",l.jsx("a",{href:at.publishedLegal.privacy,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:e("signup.privacy")})]}):l.jsxs(l.Fragment,{children:[l.jsx(ir,{to:ee.TERMS,className:"underline underline-offset-2",children:e("signup.terms")})," ",e("signup.legalAnd")," ",l.jsx(ir,{to:ee.PRIVACY,className:"underline underline-offset-2",children:e("signup.privacy")})]}),". ",e("signup.verifyLater")]}),l.jsxs("p",{className:"pt-1 text-center text-sm text-muted-ink",children:[e("signup.haveAccount")," ",l.jsx(ir,{to:ee.AUTH_LOGIN,className:"font-semibold text-primary hover:underline",children:e("signup.loginLink")})]})]})}function pst(){const{t:e}=J("auth");return l.jsx(ed,{title:l.jsx(Ju,{lead:e("signup.titleLead"),accent:e("signup.titleAccent")}),subtitle:e("signup.subtitle"),children:l.jsx(mst,{})})}function P5({name:e,label:t,required:n=!1,type:r="text",leftIcon:i,rightIcon:s,className:a,...o}){var f;const{register:c,formState:{errors:u}}=_We(),d=(f=u[e])==null?void 0:f.message,h=`field-${e}`;return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{htmlFor:h,className:"block text-xs font-semibold text-body-ink",children:[t,n&&l.jsx("span",{className:"ml-0.5 text-clay",children:"*"})]}),l.jsx(fn,{id:h,type:r,leftIcon:i,rightIcon:s,error:!!d,"aria-describedby":d?`${h}-err`:void 0,className:a,...c(e,r==="number"?{valueAsNumber:!0}:void 0),...o}),d&&l.jsx("p",{id:`${h}-err`,role:"alert",className:"text-xs text-clay",children:d})]})}function gst(){const{t:e}=J("auth"),[t,n]=b.useState(!1),r=Ent(),i=pf({resolver:gf(crt),defaultValues:{email:""}}),s=i.handleSubmit(async a=>{await r.mutateAsync({email:a.email}),n(!0)});return t?l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex items-start gap-3 rounded-xl border-[0.5px] border-rule bg-background px-4 py-3.5",children:[l.jsx(Ih,{size:18,strokeWidth:1.75,className:"mt-0.5 flex-shrink-0 text-primary"}),l.jsx("p",{className:"text-sm leading-relaxed text-muted-ink",children:e("forgotPassword.checkInbox")})]}),l.jsx(Eq,{label:e("forgotPassword.backToLogin")})]}):l.jsx(F3,{...i,children:l.jsxs("form",{onSubmit:s,className:"space-y-5",noValidate:!0,children:[l.jsx(P5,{name:"email",label:e("forgotPassword.emailLabel"),type:"email",placeholder:e("forgotPassword.emailPlaceholder"),autoComplete:"email",leftIcon:l.jsx(Ih,{size:18,strokeWidth:1.75}),required:!0}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",isLoading:r.isPending,className:"h-12 w-full rounded-xl text-sm font-semibold",children:r.isPending?e("forgotPassword.submitting"):e("forgotPassword.submit")}),l.jsx(Eq,{label:e("forgotPassword.backToLogin")})]})})}function Eq({label:e}){return l.jsx("p",{className:"text-center text-sm",children:l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:underline",children:[l.jsx($o,{size:14,strokeWidth:2}),e]})})}function xst(){const{t:e}=J("auth");return l.jsx(ed,{title:l.jsx(Ju,{lead:e("forgotPassword.titleLead"),accent:e("forgotPassword.titleAccent")}),subtitle:e("forgotPassword.subtitle"),children:l.jsx(gst,{})})}function yst({token:e}){const{t}=J("auth"),n=St(),[r,i]=b.useState(null),s=jnt(),a=pf({resolver:gf(urt),defaultValues:{newPassword:"",confirmPassword:""}}),o=a.handleSubmit(async c=>{i(null);try{await s.mutateAsync({token:e,newPassword:c.newPassword}),n(ee.AUTH_LOGIN)}catch{i(t("resetPassword.failed"))}});return l.jsx(F3,{...a,children:l.jsxs("form",{onSubmit:o,className:"space-y-5",noValidate:!0,children:[l.jsx(P5,{name:"newPassword",label:t("resetPassword.newPasswordLabel"),type:"password",autoComplete:"new-password",leftIcon:l.jsx(Di,{size:18,strokeWidth:1.75}),required:!0}),l.jsx(P5,{name:"confirmPassword",label:t("resetPassword.confirmPasswordLabel"),type:"password",autoComplete:"new-password",leftIcon:l.jsx(Di,{size:18,strokeWidth:1.75}),required:!0}),r&&l.jsx("p",{role:"alert",className:"rounded-xl border-[0.5px] border-clay/30 bg-clay/5 px-4 py-3 text-sm text-clay",children:r}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",isLoading:s.isPending,className:"h-12 w-full rounded-xl text-sm font-semibold",children:s.isPending?t("resetPassword.submitting"):t("resetPassword.submit")}),l.jsx("p",{className:"text-center text-sm",children:l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:underline",children:[l.jsx($o,{size:14,strokeWidth:2}),t("resetPassword.backToLogin")]})})]})})}function bst(){const{t:e}=J("auth"),[t]=ps(),n=t.get("token")??"";return l.jsx(ed,{title:l.jsx(Ju,{lead:e("resetPassword.titleLead"),accent:e("resetPassword.titleAccent")}),subtitle:e("resetPassword.subtitle"),children:n?l.jsx(yst,{token:n}):l.jsxs("div",{className:"space-y-3",children:[l.jsx("p",{className:"text-sm text-destructive",children:e("resetPassword.missingToken")}),l.jsx(ir,{to:ee.AUTH_FORGOT_PASSWORD,className:"text-sm text-primary hover:underline",children:e("resetPassword.requestNewLink")})]})})}function vst(){const{t:e}=J("auth"),[t,n]=b.useState(!1),r=Nnt(),i=pf({resolver:gf(drt),defaultValues:{email:""}}),s=i.handleSubmit(async a=>{await r.mutateAsync({email:a.email}),n(!0)});return t?l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex items-start gap-3 rounded-xl border-[0.5px] border-rule bg-background px-4 py-3.5",children:[l.jsx(Ih,{size:18,strokeWidth:1.75,className:"mt-0.5 flex-shrink-0 text-primary"}),l.jsx("p",{className:"text-sm leading-relaxed text-muted-ink",children:e("recoverUsername.checkInbox")})]}),l.jsx("p",{className:"text-center text-sm",children:l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:underline",children:[l.jsx($o,{size:14,strokeWidth:2}),e("recoverUsername.backToLogin")]})})]}):l.jsx(F3,{...i,children:l.jsxs("form",{onSubmit:s,className:"space-y-5",noValidate:!0,children:[l.jsx(P5,{name:"email",label:e("recoverUsername.emailLabel"),type:"email",autoComplete:"email",leftIcon:l.jsx(Ih,{size:18,strokeWidth:1.75}),required:!0}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",isLoading:r.isPending,className:"h-12 w-full rounded-xl text-sm font-semibold",children:r.isPending?e("recoverUsername.submitting"):e("recoverUsername.submit")}),l.jsx("p",{className:"text-center text-sm",children:l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:underline",children:[l.jsx($o,{size:14,strokeWidth:2}),e("recoverUsername.backToLogin")]})})]})})}function wst(){const{t:e}=J("auth");return l.jsx(ed,{title:l.jsx(Ju,{lead:e("recoverUsername.titleLead"),accent:e("recoverUsername.titleAccent")}),subtitle:e("recoverUsername.subtitle"),children:l.jsx(vst,{})})}const Sst=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Cst(){const{t:e}=J("auth"),[t]=ps(),n=t.get("token")??"",[r,i]=b.useState("pending"),[s,a]=b.useState(""),[o,c]=b.useState(!1),u=Ant(),d=Pce(),h=b.useRef(!1);b.useEffect(()=>{if(!h.current){if(h.current=!0,!n){i("error");return}u.mutateAsync({token:n}).then(g=>i((g==null?void 0:g.status)==="already_verified"?"already":"success")).catch(()=>i("error"))}},[n,u]);const f=s.trim(),m=Sst.test(f),p=(()=>{var g;return d.isError?MD(d.error)&&((g=d.error.response)==null?void 0:g.status)===429?e("verifyEmail.resendRateLimited"):e("verifyEmail.resendError"):null})();function x(g){if(g.preventDefault(),!m){c(!0);return}c(!1),d.mutate({email:f})}const v=r==="success"||r==="already";return l.jsxs(ed,{title:l.jsx(Ju,{lead:e(v?"verifyEmail.titleLeadDone":"verifyEmail.titleLead"),accent:e(v?"verifyEmail.titleAccentDone":"verifyEmail.titleAccent")}),centered:!0,children:[r==="pending"&&l.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[l.jsx(vS,{tone:"neutral",children:l.jsx(Qo,{size:32,strokeWidth:1.6,className:"animate-spin"})}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("verifyEmail.verifying")})]}),r==="success"&&l.jsxs("div",{className:"flex flex-col items-center gap-5 text-center",children:[l.jsx(vS,{tone:"success",children:l.jsx(jl,{size:32,strokeWidth:1.6})}),l.jsx("p",{className:"text-sm leading-relaxed text-body-ink",children:e("verifyEmail.success")}),l.jsx(ce,{asChild:!0,variant:"primary",size:"lg",className:"h-12 w-full rounded-xl text-sm font-semibold",children:l.jsx(ir,{to:ee.AUTH_LOGIN,children:e("verifyEmail.goToLogin")})})]}),r==="already"&&l.jsxs("div",{className:"flex flex-col items-center gap-5 text-center",children:[l.jsx(vS,{tone:"success",children:l.jsx(jl,{size:32,strokeWidth:1.6})}),l.jsx("p",{className:"text-sm leading-relaxed text-body-ink",children:e("verifyEmail.alreadyVerified")}),l.jsx(ce,{asChild:!0,variant:"primary",size:"lg",className:"h-12 w-full rounded-xl text-sm font-semibold",children:l.jsx(ir,{to:ee.AUTH_LOGIN,children:e("verifyEmail.goToLogin")})})]}),r==="error"&&l.jsxs("form",{className:"space-y-5",onSubmit:x,noValidate:!0,children:[l.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[l.jsx(vS,{tone:"error",children:l.jsx(zxe,{size:32,strokeWidth:1.6})}),l.jsx("p",{className:"text-sm font-medium text-clay",children:e("verifyEmail.failed")}),l.jsx("p",{className:"text-xs leading-relaxed text-muted-ink",children:e("verifyEmail.checkSpam")})]}),l.jsxs("div",{className:"space-y-1.5 text-left",children:[l.jsx("label",{htmlFor:"resend-email",className:"block text-xs font-semibold text-body-ink",children:e("verifyEmail.resendEmailLabel")}),l.jsx(fn,{id:"resend-email",type:"email",autoComplete:"email",required:!0,value:s,placeholder:e("verifyEmail.resendEmailPlaceholder"),"aria-invalid":o||void 0,"aria-describedby":o?"resend-email-error":void 0,onChange:g=>{a(g.target.value),o&&c(!1)},onBlur:()=>{f.length>0&&!m&&c(!0)},leftIcon:l.jsx(Ih,{size:18,strokeWidth:1.75}),error:o}),o&&l.jsx("p",{id:"resend-email-error",className:"text-xs text-clay",children:e("verifyEmail.resendEmailInvalid")})]}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",disabled:f.length===0,isLoading:d.isPending,className:"h-12 w-full rounded-xl text-sm font-semibold",children:d.isPending?e("verifyEmail.resending"):e("verifyEmail.resend")}),l.jsxs("div",{"aria-live":"polite",className:"min-h-[1.25rem] text-center",children:[d.isSuccess&&l.jsx("p",{className:"text-sm text-sage",children:e("verifyEmail.resendSuccess")}),p&&l.jsx("p",{className:"text-sm text-clay",children:p})]})]})]})}function vS({tone:e,children:t}){const n=e==="success"?"bg-sage/10 text-sage":e==="error"?"bg-clay/10 text-clay":"bg-edition-pale text-primary";return l.jsx("span",{"aria-hidden":"true",className:["inline-flex h-[74px] w-[74px] items-center justify-center rounded-full",n].join(" "),children:t})}function kst(e){const n=new URLSearchParams(e.replace(/^#/,"")).get("handoff");return n&&n.length>0?n:null}function _st(){const{t:e}=J("auth"),t=St(),{setSession:n}=yf(),r=ust(),[i,s]=b.useState(!1),a=b.useRef(!1);return b.useEffect(()=>{if(a.current)return;a.current=!0;const o=kst(window.location.hash);if(window.history.replaceState(null,"",window.location.pathname),!o){s(!0);return}r.mutate({handoff:o},{onSuccess:c=>{if(Lce(c)){t(ee.AUTH_MFA_VERIFY,{state:{tempToken:c.tempToken,redirectTo:ee.ME_HOME},replace:!0});return}n(c.accessToken,c.refreshToken,a_(c.user),c.expiresIn),t(ee.ME_HOME,{replace:!0})},onError:()=>s(!0)})},[r,t,n]),l.jsx(ed,{title:l.jsx(Ju,{lead:e("sso.completeLead"),accent:e("sso.completeAccent")}),children:i?l.jsxs("div",{role:"alert",className:"space-y-3 text-sm text-body-ink",children:[l.jsx("p",{children:e("sso.errors.handoff_invalid")}),l.jsx(ir,{to:ee.AUTH_LOGIN,className:"font-semibold text-primary hover:underline",children:e("signup.success.backToLogin")})]}):l.jsx("p",{role:"status",className:"text-sm text-muted-ink",children:e("sso.completing")})})}function Tst(e){var t,n,r;if(e instanceof AD){const i=(t=e.response)==null?void 0:t.status,s=(r=(n=e.response)==null?void 0:n.data)==null?void 0:r.code;if(i===401&&s==="mfa_token_invalid")return"challenge_expired";if(i===401)return"invalid_code"}return"generic"}function Est(){const{t:e}=J("auth"),t=St(),n=is(),{setSession:r}=yf(),i=_nt(),s=n.state??{},a=s.tempToken,o=s.redirectTo??ee.ME_HOME,[c,u]=b.useState(""),[d,h]=b.useState(!1),[f,m]=b.useState(null);b.useEffect(()=>{a||t(ee.AUTH_LOGIN,{replace:!0})},[a,t]);const p=d?12:6,x=d?"text":"tel",v=e(d?"mfaVerify.backupCodePlaceholder":"mfaVerify.codePlaceholder"),g=b.useMemo(()=>f?e(f==="invalid_code"?"mfaVerify.errorInvalidCode":f==="challenge_expired"?"mfaVerify.errorChallengeExpired":"mfaVerify.errorGeneric"):null,[f,e]),y=async w=>{if(w.preventDefault(),!!a){m(null);try{const S=await i.mutateAsync({tempToken:a,code:c.trim()});r(S.accessToken,S.refreshToken,a_(S.user),S.expiresIn),t(o,{replace:!0})}catch(S){const C=Tst(S);m(C),u(""),C==="challenge_expired"&&window.setTimeout(()=>{t(ee.AUTH_LOGIN,{replace:!0})},1800)}}};return a?l.jsx(ed,{title:l.jsx(Ju,{lead:e("mfaVerify.titleLead"),accent:e("mfaVerify.titleAccent")}),subtitle:e("mfaVerify.subtitle"),children:l.jsxs("form",{onSubmit:y,className:"space-y-5",noValidate:!0,children:[g&&l.jsx("div",{role:"alert",className:"rounded-xl border-[0.5px] border-clay/30 bg-clay/5 px-4 py-3 text-sm text-clay",children:g}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:"mfa-code",className:"block text-xs font-semibold text-body-ink",children:e(d?"mfaVerify.backupCodeLabel":"mfaVerify.codeLabel")}),l.jsx(fn,{id:"mfa-code",name:"code",type:x,inputMode:d?"text":"numeric",autoComplete:"one-time-code",placeholder:v,value:c,onChange:w=>u(w.target.value.slice(0,p)),maxLength:p,required:!0,className:["h-[60px] rounded-xl border-[1.5px] text-center font-semibold text-strong",d?"text-xl tracking-[0.3em]":"text-2xl tracking-[0.5em]"].join(" ")})]}),l.jsx(ce,{type:"submit",variant:"primary",size:"lg",isLoading:i.isPending,disabled:c.trim().length<6,className:"h-12 w-full rounded-xl text-sm font-semibold",children:i.isPending?e("mfaVerify.submitting"):e("mfaVerify.submit")}),l.jsx("div",{className:"flex justify-center",children:l.jsxs("button",{type:"button",onClick:()=>{h(w=>!w),u(""),m(null)},className:"inline-flex items-center gap-2 text-sm font-medium text-muted-ink transition-colors hover:text-primary",children:[l.jsx(jh,{size:14,strokeWidth:1.75}),e(d?"mfaVerify.useTotpCode":"mfaVerify.useBackupCode")]})}),l.jsx("p",{className:"text-center text-sm",children:l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:underline",children:[l.jsx($o,{size:14,strokeWidth:2}),e("mfaVerify.backToLogin")]})})]})}):l.jsx(ed,{title:l.jsx(Ju,{lead:e("mfaVerify.ti
1681tleLead"),accent:e("mfaVerify.titleAccent")}),children:l.jsx("p",{className:"text-sm text-muted-ink",children:e("mfaVerify.errorChallengeExpired")})})}function jst(e=new Date){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function Nst(){const e=jst(),t=o_({from:e,to:e});return{totalMinutes:b.useMemo(()=>{var i;return(((i=t.data)==null?void 0:i.agenda)??[]).filter(s=>s.date===e).reduce((s,a)=>s+(a.durationMinutes??0),0)},[t.data,e]),isLoading:t.isLoading}}const Ast=Ue({start:Q(),end:Q(),label:Q(),minutes:Re().nonnegative()}),Mst=Ue({period:na(["daily","weekly","monthly"]),buckets:bt(Ast),goalMinutesPerBucket:Re().nonnegative().nullable()}),Rst=e=>["me","learning-activity",e];function cue(e){return At({queryKey:Rst(e),queryFn:async()=>{const t=await _e.get(`${he.ME_LEARNING_ACTIVITY}?period=${encodeURIComponent(e)}`),n=Mst.safeParse(t);if(!n.success)throw new Error("Malformed /me/learning-activity response from server");return n.data},staleTime:6e4})}const Ost="course_locked";function Dst(e){var n,r;const t=e;return((n=t==null?void 0:t.response)==null?void 0:n.status)===403&&((r=t.response.data)==null?void 0:r.error)===Ost}function iL(e){return e.status==="LOCKED"}function sL(e){return iL(e)&&!!e.personal&&(e.progress.completedLessons??0)===0}function aL(e){return iL(e)?sL(e)?ts(e.courseId,1,1,1):Wa(e.courseId):ts(e.courseId,e.progress.currentWeek,e.progress.currentDay,e.progress.currentLesson)}function Lst(e){const t=[],n=[...e.weeks].sort((r,i)=>r.weekNumber-i.weekNumber);for(const r of n){const i=[...r.days].sort((s,a)=>s.dayNumber-a.dayNumber);for(const s of i)s.lessons.forEach((a,o)=>t.push({week:r.weekNumber,day:s.dayNumber,lesson:o+1}))}return t}function Pst(e,t){if(!e)return{position:null,total:0};const n=Lst(e),r=n.findIndex(i=>i.week===t.week&&i.day===t.day&&i.lesson===t.lesson);return{position:r>=0?r+1:null,total:n.length}}const Ist=["#8b5cf6","#14b8a6","#f59e0b","#ec4899","#3b82f6","#10b981"];function oL(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Fst(e,t=Ist){if(t.length===0)throw new Error("swatchColorFor: palette must contain at least one color");return e?t[oL(e)%t.length]:t[0]}const Bst=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],zst=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$st=75,Ust=100,Vst=5,Hst=20,qst=3,uue="ple.dashboard.learningActivity.period",wj="weekly",Gst={daily:7,weekly:12,monthly:12};function Wst(e=new Date){const t=e.getHours();return t<12?"home.greeting.morning":t<18?"home.greeting.afternoon":"home.greeting.evening"}function Yst(e){const t=new Date(e);return t.setDate(t.getDate()+7),{from:e.toISOString().slice(0,10),to:t.toISOString().slice(0,10)}}function Kst(e){switch(e){case"lesson":case"review":case"event":return e;default:return"event"}}function Xst(e){if(!e)return"All day";const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return e;const n=Number(t[1]),r=t[2],i=n>=12?"PM":"AM";return`${(n+11)%12+1}:${r} ${i}`}function jq(e){return[...e].sort((t,n)=>{const r=t.progress.lastAccessedAt?new Date(t.progress.lastAccessedAt).getTime():0;return(n.progress.lastAccessedAt?new Date(n.progress.lastAccessedAt).getTime():0)-r})}function Qst(e,t){if(!e||e.length===0)return{ordered:[],set:new Set};const n=[],r=new Set;for(const i of e)i.date===t&&i.kind==="lesson"&&i.courseId&&(r.has(i.courseId)||(r.add(i.courseId),n.push(i.courseId)));return{ordered:n,set:r}}function Zst(e,t){if(e.length===0)return e;if(t.ordered.length===0)return jq(e);const n=new Map;e.forEach(s=>n.set(s.courseId,s));const r=[];for(const s of t.ordered){const a=n.get(s);a&&r.push(a)}const i=jq(e.filter(s=>!t.set.has(s.courseId)));return[...r,...i]}function Jst(){try{if(typeof window>"u")return wj;const e=window.localStorage.getItem(uue);return e==="daily"||e==="weekly"||e==="monthly"?e:wj}catch{return wj}}function eat(e){try{if(typeof window>"u")return;window.localStorage.setItem(uue,e)}catch{}}function tat(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function nat(e){const t=e.getDay(),n=t===0?-6:1-t;return new Date(e.getFullYear(),e.getMonth(),e.getDate()+n)}function rat(e){return new Date(e.getFullYear(),e.getMonth(),1)}function iat(e,t){const n=Gst[e];if(e==="daily"){const s=tat(t);return{starts:Array.from({length:n},(o,c)=>{const u=new Date(s);return u.setDate(s.getDate()-(n-1-c)),u}),labelFor:(o,c)=>Bst[c.getDay()]}}if(e==="weekly"){const s=nat(t);return{starts:Array.from({length:n},(o,c)=>{const u=new Date(s);return u.setDate(s.getDate()-7*(n-1-c)),u}),labelFor:o=>`W${o+1}`}}
1681const r=rat(t);return{starts:Array.from({length:n},(s,a)=>{const o=new Date(r);return o.setMonth(r.getMonth()-(n-1-a)),o}),labelFor:(s,a)=>zst[a.getMonth()]}}function sat(e,t,n){var u;const r=iat(t,n),i=r.starts.length,s=new Array(i).fill(0),a=((u=r.starts[0])==null?void 0:u.getTime())??n.getTime();e.forEach(d=>{if(!d.progress.lastAccessedAt)return;const h=new Date(d.progress.lastAccessedAt).getTime();if(Number.isNaN(h)||h<a)return;let f=-1;for(let m=i-1;m>=0;m--)if(h>=r.starts[m].getTime()){f=m;break}f<0||(s[f]+=d.progress.completedLessons||0)});const o=s.map((d,h)=>({label:r.labelFor(h,r.starts[h]),minutes:d*Hst,isToday:h===i-1})),c=o.reduce((d,h)=>d+h.minutes,0);return{days:o,minutesInWindow:c}}function aat(e){const t=e.buckets.map((r,i)=>({label:r.label,minutes:r.minutes,isToday:i===e.buckets.length-1})),n=t.reduce((r,i)=>r+i.minutes,0);return{days:t,minutesInWindow:n}}function oat(){var z,O,P,I,q,R,xe,me,U;const e=Ps(),t=oce(),n=gs(),r=new Date,i=Yst(r),s=r.toISOString().slice(0,10),a=o_(i),o=lce(),c=Nst(),[u,d]=b.useState(()=>Jst()),h=b.useCallback(ae=>{d(ae),eat(ae)},[]),f=b.useMemo(()=>n.data??[],[n.data]),m=b.useMemo(()=>{var ae;return Qst(((ae=a.data)==null?void 0:ae.agenda)??[],s)},[(z=a.data)==null?void 0:z.agenda,s]),p=b.useMemo(()=>Zst(f,m),[f,m]),x=((O=t.data)==null?void 0:O.currentStreak)??0,v=((P=e.data)==null?void 0:P.firstName)??null,g=Wst(r),y=p[0]??null,w=b.useMemo(()=>{if(!(y!=null&&y.progress.lastAccessedAt))return null;const ae=new Date(y.progress.lastAccessedAt).getTime();if(Number.isNaN(ae))return null;const Ce=Date.now()-ae;return Ce<0?0:Math.floor(Ce/6e4)},[y]),S=b.useMemo(()=>y?{courseId:y.courseId,courseTitle:y.name,lessonTitle:void 0,lessonNumber:y.progress.currentLesson,weekNumber:y.progress.currentWeek,dayNumber:y.progress.currentDay,percentComplete:y.progress.percentComplete,remainingMinutes:null}:null,[y]),C=((I=t.data)==null?void 0:I.totalPoints)??0,k=b.useMemo(()=>({resume:S,todayPlanMinutes:c.totalMinutes,streakDays:x,xpTotal:C,lastAccessedMinutesAgo:w}),[S,c.totalMinutes,x,C,w]),_=b.useMemo(()=>{var Te;const Ce=(((Te=a.data)==null?void 0:Te.agenda)??[]).filter(Se=>Se.date===s),je=new Map;return{items:Ce.map(Se=>{const He=`${Se.date}-${Se.time??""}-${Se.title}`,tt=Kst(Se.kind);let we=Se.route??"";we||(tt==="lesson"&&Se.courseId&&Se.week&&Se.day&&Se.lesson?we=ts(Se.courseId,Se.week,Se.day,Se.lesson):tt==="review"?we=ee.ME_PRACTICE:we=ee.ME_CALENDAR),je.set(He,we);const Oe=Se.courseTitle??"â",Je=typeof Se.durationMinutes=="number"&&Se.durationMinutes>0?`${Se.durationMinutes} min`:null;return{id:He,time:Xst(Se.time),kind:tt,title:Se.title,meta:Je?`${Oe} · ${Je}`:Oe}}),resolveItemRoute:Se=>je.get(Se)??null}},[a.data,s]),E=b.useMemo(()=>p.map(ae=>{const{currentWeek:Ce,currentDay:je,currentLesson:ve}=ae.progress,Te=Ce>0&&je>0&&ve>0?`Week ${Ce}, Day ${je}, Lesson ${ve}`:ve>0?`Lesson ${ve}`:"In progress";return{id:ae.courseId,title:ae.name,initial:ae.name.charAt(0),swatchColor:Fst(ae.courseId),meta:Te,progressPercent:ae.progress.percentComplete}}),[p]),A=cue(u),j=b.useMemo(()=>{var ve;const ae=(ve=t.data)!=null&&ve.weeklyGoalMinutes?Math.round(t.data.weeklyGoalMinutes/60):Vst;if(A.data&&A.data.period===u){const{days:Te,minutesInWindow:Se}=aat(A.data);return{days:Te,goalHours:ae,minutesThisWeek:Se,goalMinutesPerBucket:A.data.goalMinutesPerBucket}}const{days:Ce,minutesInWindow:je}=sat(f,u,r);return{days:Ce,goalHours:ae,minutesThisWeek:je,goalMinutesPerBucket:null}},[A.data,f,(q=t.data)==null?void 0:q.weeklyGoalMinutes,u]),D=(R=t.data)!=null&&R.totalQuestionsAnswered?Math.round((t.data.todayCorrect??0)/Math.max(1,t.data.todayQuestions)*100):0,M=b.useMemo(()=>{var ae,Ce,je;return{currentStreak:x,longestStreak:((ae=t.data)==null?void 0:ae.longestStreak)??0,streakDelta:null,scorePercent:D,correctToday:((Ce=t.data)==null?void 0:Ce.todayCorrect)??0,totalToday:((je=t.data)==null?void 0:je.todayQuestions)??0,accuracyDelta:null,dueCount:o.count,soonestNextAt:o.soonestNextAt,activeCourses:f.length,avgPercent:f.length>0?Math.round(f.reduce((ve,Te)=>ve+(Te.progress.percentComplete??0),0)/f.length):null,dueToFinishCount:f.filter(ve=>ve.progress.percentComplete>=$st&&ve.progress.percentComplete<Ust).length,weeksToFinish:qst}},[x,(xe=t.data)==null?void 0:xe.longestStreak,(me=t.data)==null?void 0:me.todayCorrect,(U=t.data)==null?void 0:U.todayQuestions,D,o.count,o.soonestNextAt,f]),$=b.useMemo(()=>f.some(ae=>(ae.progress.completedLessons??0)>0||(ae.progress.percentComplete??0)>0),[f]),B=b.useMemo(()=>ae=>{const Ce=p.find(je=>je.courseId===ae);return Ce?aL(Ce):null},[p]);return{greetingKey:g,firstName:v,streakDays:x,hero:k,stats:M,courseProgress:E,agenda:_,activity:j,period:u,setPeriod:h,resolveCourseResumePath:B,hasCompletedLessons:$}}const r8="ple.profileReadinessDismissed",lat=3,cat=40,uat=50,dat=10;function hat(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(r8)==="1"}catch{return!1}}function due(){var m,p,x;const e=Ps(),t=bf(),n=gs(),[r,i]=b.useState(hat);b.useEffect(()=>{if(typeof window>"u")return;const v=g=>{g.key===r8&&i(g.newValue==="1")};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[]);const s=b.useCallback(()=>
1681{if(typeof window<"u")try{window.localStorage.setItem(r8,"1")}catch{}i(!0)},[]),a=((m=e.data)==null?void 0:m.completedFirstLCP)??!1,o=!!((p=t.data)!=null&&p.completedAt),c=((x=n.data)==null?void 0:x.length)??0,u=a?cat:0,d=o?uat:0,h=Math.min(c/lat,1)*dat,f=Math.round(u+d+h);return{overallPercent:f,breakdown:{cognitiveProfileComplete:a,careerContextComplete:o,enrollmentCount:c},isLoading:e.isLoading||t.isLoading||n.isLoading,isDismissed:r,isComplete:f===100,dismiss:s}}const Sj=1200,wS=600;function fat(e){let t=e>>>0||1;return()=>(t=t*1664525+1013904223>>>0,t/4294967296)}const mat={warm:{a:"#E2496B",b:"#FFB547",flow:["#B01E3C","#FF7A59","#FFB547"]},crimson:{a:"#B01E3C",b:"#E2496B",flow:["#B01E3C","#FF7A59","#FFB547"]},ink:{a:"#9A978F",b:"#E6E3DA",flow:["#6E665D","#A8A398","#E6E3DA"]},light:{a:"#FFFFFF",b:"#FFC978",flow:["#FFFFFF","#FFD9A0","#FFB547"]}};function pat({seed:e=17,className:t,cols:n=9,rows:r=5,palette:i="warm",intensity:s=1,animate:a=!1}){const o=fat(e),c=mat[i],u=[];for(let m=0;m<n;m+=1)for(let p=0;p<r;p+=1)u.push({x:(m+.5)*(Sj/n)+(o()-.5)*(Sj/n)*.8,y:(p+.5)*(wS/r)+(o()-.5)*(wS/r)*.8,r:2+o()*5,t:m/Math.max(1,n-1),live:o()>.72,delay:o()*6});const d=[];for(const m of u){const p=u.filter(x=>x.x>m.x+18&&Math.abs(x.y-m.y)<wS/3).sort((x,v)=>Math.hypot(x.x-m.x,x.y-m.y)-Math.hypot(v.x-m.x,v.y-m.y)).slice(0,o()>.5?2:1);for(const x of p){const v=(m.x+x.x)/2,g=(m.y+x.y)/2+(o()-.5)*70;d.push({d:`M ${m.x.toFixed(1)} ${m.y.toFixed(1)} Q ${v.toFixed(1)} ${g.toFixed(1)} ${x.x.toFixed(1)} ${x.y.toFixed(1)}`,w:.7+o()*1.3,o:.3+o()*.6,delay:o()*7})}}const h=`af-${i}-${e}`,f=`${h}-flow`;return l.jsxs("svg",{className:t,viewBox:`0 0 ${Sj} ${wS}`,preserveAspectRatio:"xMidYMid slice","aria-hidden":"true",focusable:"false",role:"presentation",children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:f,x1:"0",y1:"0",x2:"1",y2:"0",children:[l.jsx("stop",{offset:"0%",stopColor:c.flow[0]}),l.jsx("stop",{offset:"55%",stopColor:c.flow[1]}),l.jsx("stop",{offset:"100%",stopColor:c.flow[2]})]})}),l.jsxs("g",{opacity:s,children:[d.map((m,p)=>l.jsx("path",{d:m.d,fill:"none",stroke:`url(#${f})`,strokeWidth:m.w,opacity:m.o,className:a?"af-edge":void 0,style:a?{animationDelay:`${m.delay.toFixed(2)}s`,"--af-o":m.o.toFixed(2)}:void 0},`${h}-e-${p}`)),u.map((m,p)=>l.jsxs("g",{children:[m.live&&l.jsx("circle",{cx:m.x,cy:m.y,r:m.r*3.2,fill:m.t<.5?c.a:c.b,opacity:.15,className:a?"af-halo":void 0,style:a?{animationDelay:`${m.delay.toFixed(2)}s`}:void 0}),l.jsx("circle",{cx:m.x,cy:m.y,r:m.r,fill:m.t<.5?c.a:c.b,opacity:m.live?.9:.45})]},`${h}-n-${p}`))]})]})}const gat="/logos/mark-ple.svg",xat="linear-gradient(120deg, #7E1229 0%, #A81C3E 55%, #C42A4E 100%)",yat=at.key==="ciai"?xat:void 0,bat=41,vat=at.key==="ciai"?at.faviconSrc:gat,Nq=60,Aq=60*24;function wat(e){return e<Nq?{key:"continueLearning.lastOpened",count:e}:e<Aq?{key:"continueLearning.lastOpenedHours",count:Math.floor(e/Nq)}:{key:"continueLearning.lastOpenedDays",count:Math.floor(e/Aq)}}function Sat({resume:e,todayPlanMinutes:t,streakDays:n,xpTotal:r,lastAccessedMinutesAgo:i,onResume:s,onOpenTodayPlan:a,onBrowseMarketplace:o,resumeLocked:c=!1,onCompleteProfile:u}){const{t:d}=J("me"),h=e!==null,f=c&&h,m=f?l.jsx(oC,{children:d("continueLearning.lockedEyebrow")}):h?l.jsxs(l.Fragment,{children:[l.jsx(oC,{children:d("continueLearning.eyebrow")}),i!==null&&(()=>{const{key:y,count:w}=wat(i);return l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{children:d(y,{count:w})})]})})()]}):l.jsx(oC,{children:d("continueLearning.emptyEyebrow")});let p;h?e.lessonNumber&&e.lessonTitle?p=d("continueLearning.titleWithLesson",{lesson:e.lessonNumber,lessonTitle:e.lessonTitle}):e.lessonNumber?p=d("continueLearning.titleWithLesson",{lesson:e.lessonNumber,lessonTitle:e.courseTitle}):p=e.lessonTitle??e.courseTitle:p=d("continueLearning.emptyTitle");let x;if(f)x=d("continueLearning.lockedLead");else if(!h)x=d("continueLearning.emptyLead");else{const y=e.weekNumber??1,w=e.dayNumber??1,S=Math.max(0,Math.min(100,Math.round(e.percentComplete??0)));x=t>0?d("continueLearning.lead",{week:y,day:w,courseTitle:e.courseTitle,percent:S,planMinutes:t}):d("continueLearning.leadNoPlan",{week:y,day:w,courseTitle:e.courseTitle,percent:S})}const v=f?l.jsx(ce,{type:"button",size:"md",onClick:u,leftIcon:l.jsx(Di,{className:"h-4 w-4"}),className:"rounded-full bg-white px-5 text-primary hover:bg-white/95 hover:text-primary",children:d("continueLearning.completeProfileCta")}):h?l.jsxs(l.Fragment,{children:[l.jsx(ce,{type:"button",size:"md",onClick:()=>s(e.courseId),leftIcon:l.jsx(Ph,{className:"h-4 w-4"}),className:"rounded-full bg-white px-5 text-primary hover:bg-white/95 hover:text-primary",children:d("continueLearning.resume")}),t>0&&l.jsx(ce,{type:"button",size:"md",variant:"ghost",onClick:a,leftIcon:l.jsx(od,{className:"h-4 w-4"}),className:"rounded-full border border-white/20 bg-white/10 px-4 text-white hover:bg-white/20 hover:text-white",children:d("continueLearning.todaysPlan",{minutes:t})})]}):l.jsx(ce,{type:"button",size:"md",onClick:o,className:"rounded-full bg-white px-5 text-[var(--arthur-secondary)] hover:bg-white/95 hover:text-[var(--arthur-secondary)]",children:d("continueLearning.browseMarketplace")}),g=l.jsx(ine,{children:l.jsx("img",{src:vat,alt:d("continueLearning.mascotAlt"),className:"h-16 w-16 object-contain",loading:"lazy",decoding:"async"})});return l.jsx(rne,{eyebrow:m,title:p,lead:x,ctaSlot:v,mascotSlot:g,gradient:yat,artSlot:l.jsx(pat,{seed:bat,palette:"light",cols:11,rows:5,intensity:.34,animate:!0,className:"h-full w-full"})})}function Mq({number:e,state:t,title:n,description:r,ctaLabel:i,onCta:s,statusLabel:a}){const o=t==="done",c=t==="active";
1681return l.jsxs("li",{className:["flex items-start gap-4 rounded-xl border p-4 transition-colors",c?"border-primary/40 bg-edition-pale":"border-border bg-card",t==="upcoming"?"opacity-70":""].join(" "),children:[l.jsx("span",{className:["mt-0.5 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-semibold",o?"text-primary":c?"bg-primary text-primary-foreground":"border border-border text-muted-foreground"].join(" "),"aria-hidden":"true",children:o?l.jsx(jl,{className:"h-6 w-6",strokeWidth:1.75}):e}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:["text-[15px] font-medium",t==="upcoming"?"text-muted-foreground":"text-strong"].join(" "),children:n}),l.jsx("p",{className:"mt-0.5 text-[13px] leading-snug text-muted-foreground",children:r}),c?l.jsx("div",{className:"mt-3",children:l.jsx(ce,{type:"button",variant:"gradient",size:"sm",onClick:s,children:i})}):l.jsxs("p",{className:"mt-2 inline-flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-[0.08em] text-muted-ink",children:[o?l.jsx(jl,{className:"h-3.5 w-3.5 text-primary",strokeWidth:1.75,"aria-hidden":"true"}):l.jsx(Txe,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"}),a]})]})]})}function Cat({step1Done:e,onStartStep1:t,onStartFirstLesson:n}){const{t:r}=J("me"),i=e?"done":"active",s=e?"active":"upcoming";return l.jsxs("section",{"aria-labelledby":"getting-started-heading","data-tour":"gettingStarted",className:"overflow-hidden rounded-2xl border border-border bg-card p-6 sm:p-7",children:[l.jsx("p",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.18em] text-primary",children:r("gettingStarted.eyebrow")}),l.jsx("h2",{id:"getting-started-heading",className:"text-xl font-light tracking-tight text-strong sm:text-2xl",children:r("gettingStarted.title")}),l.jsx("p",{className:"mb-5 mt-1 text-sm text-muted-foreground",children:r("gettingStarted.subtitle")}),l.jsxs("ol",{className:"space-y-3","aria-label":r("gettingStarted.ariaLabel"),children:[l.jsx(Mq,{number:1,state:i,title:r("gettingStarted.step1.title"),description:r("gettingStarted.step1.desc"),ctaLabel:r("gettingStarted.step1.cta"),onCta:t,statusLabel:r("gettingStarted.step1.done")}),l.jsx(Mq,{number:2,state:s,title:r("gettingStarted.step2.title"),description:r("gettingStarted.step2.desc"),ctaLabel:r("gettingStarted.step2.cta"),onCta:n,statusLabel:r("gettingStarted.step2.upcoming")})]})]})}const Aw=["lcp","session"],hue=["lcp","profile"];function kat(){return At({queryKey:Aw,queryFn:()=>_e.get(he.LCP_SESSION_STATUS),staleTime:0})}function fue(e=!0){return At({queryKey:hue,queryFn:()=>_e.get(he.LCP_PROFILE),enabled:e,retry:!1,staleTime:5*60*1e3})}function _at(){const e=Tt();return rt({mutationFn:t=>_e.post(he.LCP_SESSION_START,{mode:t.mode??"initial",language:t.language??"en"}),onSuccess:t=>{e.setQueryData(Aw,t)}})}function Tat(){const e=Tt();return rt({mutationFn:t=>_e.post(he.LCP_SESSION_ANSWER,t),onSuccess:t=>{e.setQueryData(Aw,t)}})}function Eat(){const e=Tt();return rt({mutationFn:t=>_e.post(he.LCP_SESSION_PRELOAD,t),onSuccess:t=>{e.setQueryData(Aw,t)}})}function jat(){const e=Tt();return rt({mutationFn:t=>_e.post(he.LCP_SESSION_COMPLETE,t),onSuccess:()=>{rce(),e.invalidateQueries({queryKey:Aw}),e.invalidateQueries({queryKey:hue}),e.invalidateQueries({queryKey:qD})}})}function Nat(e){return e.length===0?null:[...e].sort((t,n)=>{const r=t.progress.lastAccessedAt?new Date(t.progress.lastAccessedAt).getTime():0;return(n.progress.lastAccessedAt?new Date(n.progress.lastAccessedAt).getTime():0)-r})[0]}function Aat(){var h,f;const{t:e}=J("me"),t=St(),n=at.key==="ciai",r=fue(n),i=Ps(n),s=gs(),a=bf(),o=b.useMemo(()=>{const m=new Date,p=m.getFullYear(),x=String(m.getMonth()+1).padStart(2,"0"),v=String(m.getDate()).padStart(2,"0");return`${p}-${x}-${v}`},[]),c=o_({from:o,to:o}),u=b.useMemo(()=>{var k,_,E,A,j,D,M;const m=r.data;if(!m)return[];const p=[],x=(m.strengths??[]).filter(Boolean).slice(0,2);x.length>0&&p.push({key:"learn",icon:Fi,label:e("personalization.rows.learn.label"),lines:x});
1681const v=(m.preferredStrategies??[]).filter(Boolean).slice(0,2);v.length>0&&p.push({key:"teaches",icon:Rn,label:e("personalization.rows.teaches.label"),lines:v});const g=Nat(s.data??[]),y=((k=c.data)==null?void 0:k.preferences)??[],w=g?y.find($=>$.courseId===g.courseId):void 0;if(g&&w&&w.lessonsPerDay>0){const $=w.courseTitle||g.name,B=((_=w.scheduledDays)==null?void 0:_.length)??0,z=g.progress.totalLessons,O=w.lessonsPerDay*B,P=z>0&&O>0?Math.ceil(z/O):0,I=P>0?e("personalization.rows.plan.textWeeks",{courseTitle:$,lessonsPerDay:w.lessonsPerDay,weeks:P}):e("personalization.rows.plan.text",{courseTitle:$,lessonsPerDay:w.lessonsPerDay}),q=w.pacedBy==="weekly_time"&&w.weeklyMinutes?e("personalization.rows.plan.pacedFrom",{hours:Math.round(w.weeklyMinutes/60*2)/2}):null;p.push({key:"plan",icon:Sxe,label:e("personalization.rows.plan.label"),lines:q?[I,q]:[I]})}const S=!!((E=a.data)!=null&&E.completedAt&&a.data.profile),C=(M=(D=(j=(A=a.data)==null?void 0:A.profile)==null?void 0:j.recommendedRoles)==null?void 0:D[0])==null?void 0:M.title;return S&&C&&p.push({key:"goal",icon:Bm,label:e("personalization.rows.goal.label"),lines:[e("personalization.rows.goal.text",{role:C})]}),p},[r.data,s.data,c.data,a.data,e]);if(!n||!r.data||u.length===0)return null;const d=(f=(h=i.data)==null?void 0:h.firstName)==null?void 0:f.trim();return l.jsxs("section",{"aria-labelledby":"personalization-heading","data-tour":"personalization",className:"overflow-hidden rounded-2xl border border-border bg-card p-6 sm:p-7",children:[l.jsx("p",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.18em] text-primary",children:e("personalization.eyebrow")}),l.jsx("h2",{id:"personalization-heading",className:"mb-5 text-xl font-light tracking-tight text-strong sm:text-2xl",children:d?e("personalization.titleNamed",{name:d}):e("personalization.title")}),l.jsx("p",{className:"-mt-3 mb-5 text-sm text-muted-foreground",children:e("personalization.subtitle")}),l.jsx("ul",{className:"space-y-4",children:u.map(m=>{const p=m.icon;return l.jsxs("li",{className:"flex items-start gap-3.5",children:[l.jsx("span",{className:"mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary","aria-hidden":"true",children:l.jsx(p,{className:"h-[18px] w-[18px]",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.08em] text-muted-ink",children:m.label}),l.jsx("div",{className:"mt-1 space-y-1",children:m.lines.map((x,v)=>l.jsx("p",{className:"text-[13.5px] leading-snug text-body-ink",children:x},v))})]})]},m.key)})}),l.jsx("div",{className:"mt-5 border-t border-border pt-3",children:l.jsx(ce,{type:"button",variant:"link",size:"sm",onClick:()=>t(ee.ME_LEARNING_PROFILE_REPORT),rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),className:"h-auto px-0 py-0 text-xs font-semibold",children:e("personalization.viewProfile")})})]})}function Mat({date:e,items:t,maxItems:n=4,onItemClick:r,onOpenCalendar:i}){const{t:s}=J("me"),{t:a}=J("card-info"),o=t.slice(0,n),c=pEe(e,"EEEE, MMM d");return l.jsxs("section",{"aria-labelledby":"todays-agenda-heading",className:"flex h-full min-h-[240px] flex-col overflow-hidden rounded-2xl border border-border bg-card p-5 shadow-soft",children:[l.jsxs("header",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsxs("h2",{id:"todays-agenda-heading",className:"flex items-center gap-2 text-section-title",children:[l.jsx(FI,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),s("todaysAgenda.header")]}),l.jsx(gd,{ariaLabel:a("todaysAgenda.ariaLabel"),popoverContent:l.jsx(xd,{title:a("todaysAgenda.title"),purpose:a("todaysAgenda.purpose")})})]}),l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c})]}),o.length===0?l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border p-6 text-center",children:[l.jsx(FI,{className:"h-7 w-7 text-muted-foreground
1681/40","aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:s("todaysAgenda.empty")}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:i,children:s("todaysAgenda.openCalendar")})]}):l.jsx("div",{role:"list","aria-label":s("todaysAgenda.listAriaLabel"),children:o.map(u=>l.jsx("div",{role:"listitem",children:l.jsx(Lae,{time:u.time,kind:u.kind,title:u.title,meta:u.meta,onClick:()=>r(u.id),ariaLabel:s("todaysAgenda.itemAria",{time:u.time,kind:u.kind,title:u.title})})},u.id))})]})}function SS(e,t){return l.jsx(gd,{ariaLabel:e(`stats.${t}.ariaLabel`),popoverContent:l.jsx(xd,{title:e(`stats.${t}.title`),purpose:e(`stats.${t}.purpose`),calculation:e(`stats.${t}.calculation`)}),side:"bottom",align:"end"})}function Rat(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0");return`${n}:${r}`}function Oat({data:e,t,infoButton:n}){const r=e.streakDelta!==void 0&&e.streakDelta!==null&&e.streakDelta>0;return l.jsx(yw,{variant:"streak",icon:l.jsx(Nxe,{}),value:e.currentStreak,unit:t("stats.streak.unit",{count:e.currentStreak}),label:t("stats.streak.label"),trendChip:r?l.jsx(iw,{direction:"up",label:`+${e.streakDelta}`,icon:l.jsx(DM,{}),ariaLabel:t("stats.streak.trendAriaLabel",{count:e.streakDelta??0})}):void 0,infoButton:n,footSlot:t("stats.streak.footWithLongest",{count:e.longestStreak})})}function Dat({data:e,t,infoButton:n}){const r=e.accuracyDelta!==void 0&&e.accuracyDelta!==null&&e.accuracyDelta!==0,i=r&&e.accuracyDelta<0?"down":"up",s=r?Math.abs(e.accuracyDelta):0,a=r?`${i==="up"?"+":"-"}${s}%`:"",o=e.totalToday>0?t("stats.accuracy.foot",{correct:e.correctToday,total:e.totalToday}):t("stats.accuracy.footEmpty");return l.jsx(yw,{variant:"accuracy",icon:l.jsx(ki,{}),value:e.scorePercent,unit:t("stats.accuracy.unit"),label:t("stats.accuracy.label"),trendChip:r?l.jsx(iw,{direction:i,label:a,icon:i==="up"?l.jsx(DM,{}):l.jsx(pQ,{}),ariaLabel:t("stats.accuracy.trendAriaLabel",{direction:i,percent:s})}):void 0,infoButton:n,footSlot:o})}function Lat({data:e,t,onPracticeNow:n,infoButton:r}){const i=e.dueCount>0;let s;return i?s=t("stats.due.cta"):e.soonestNextAt?s=t("stats.due.footAllCaught",{time:Rat(e.soonestNextAt)}):s=t("stats.due.footAllCaughtNoNext"),l.jsx(yw,{variant:"due",icon:l.jsx(od,{}),value:e.dueCount,label:t("stats.due.label"),trendChip:at.key==="ciai"?void 0:l.jsx(iw,{direction:"neutral",label:t("stats.due.chip")}),infoButton:r,footSlot:i?l.jsxs("span",{className:"inline-flex items-center gap-1 font-bold text-primary",children:[s,l.jsx(gn,{className:"h-3 w-3","aria-hidden":"true"})]}):s,onClick:i?n:void 0,ariaLabel:i?t("stats.due.ctaAriaLabel",{count:e.dueCount}):t("stats.due.label")})}function Pat({data:e,t,infoButton:n}){const r=e.avgPercent!==null,i=e.dueToFinishCount>0;return l.jsx(yw,{variant:"active",icon:l.jsx(Ci,{}),value:e.activeCourses,label:t("stats.active.label"),trendChip:l.jsx(iw,{direction:"neutral",label:r?t("stats.active.chipAvg",{percent:e.avgPercent}):t("stats.active.chipNone")}),infoButton:n,footSlot:i?t("stats.active.foot",{count:e.dueToFinishCount,weeks:e.weeksToFinish}):t("stats.active.footNone")})}function Iat({data:e,onPracticeNow:t}){const{t:n}=J("me"),{t:r}=J("card-info");return l.jsxs("section",{"aria-label":n("stats.streak.label"),className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Oat,{data:e,t:n,infoButton:SS(r,"streak")}),l.jsx(Dat,{data:e,t:n,infoButton:SS(r,"accuracy")}),l.jsx(Lat,{data:e,t:n,onPracticeNow:t,infoButton:SS(r,"due")}),l.jsx(Pat,{data:e,t:n,infoButton:SS(r,"active")})]})}function Fat({courses:e,maxItems:t=3,onBrowseCourses:n,onViewAll:r,onResume:i,resumeLocked:s=!1}){const{t:a}=J("me"),{t:o}=J("card-info"),c=e.slice(0,t);return l.jsxs("section",{"aria-labelledby":"continue-learning-heading",className:"overflow-hidden rounded-2xl border border-border bg-card p-5 shadow-soft",children:[l.jsxs("header",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsxs("h2",{id:"continue-learning-heading",className:"flex items-center gap-2 text-section-title",children:[l.jsx(Ci,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),a("continueLearningCard.header")]}),l.jsx(gd,{ariaLabel:o("courseProgress.ariaLabel"),popoverContent:l.jsx(xd,{title:o("courseProgress.title"),purpose:o("courseProgress.purpose"),calculation:o("courseProgress.calculation")})})]}),e.length>0&&r&&l.jsx(ce,{type:"button",variant:"link",size:"sm",onClick:r,rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5"}),className:"-mr-2",children:a("continueLearningCard.viewAll")})]}),c.length===0?l.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[l.jsx(Ci,{className:"h-10 w-10 text-muted-foreground
1681/30","aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:a("continueLearningCard.emptyTitle")}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:n,children:a("continueLearningCard.emptyCta")})]}):l.jsx("div",{role:"list","aria-label":a("continueLearningCard.listAriaLabel"),children:c.map((u,d)=>{const h=d===0,f=(u.initial??u.title.charAt(0)??"?").toUpperCase();return l.jsx("div",{role:"listitem",children:l.jsx(Dae,{initial:f,swatchColor:u.swatchColor,title:u.title,meta:u.meta,progressPercent:u.progressPercent,action:{label:a(s?"continueLearningCard.completeProfile":h?"continueLearningCard.resume":"continueLearningCard.open"),variant:h||s?"primary":"secondary",onClick:()=>i(u.id),ariaLabel:s?a("continueLearningCard.completeProfileAria",{title:u.title}):h?a("continueLearningCard.resumeAria",{title:u.title}):a("continueLearningCard.openAria",{title:u.title})}})},u.id)})})]})}const AC=600,j1=160,ng=16,Cj=24,i8=28,Bat=30,zat=4,Rq=5.5;function $at(e,t){const n=AC-ng*2,r=j1-Cj-i8,i=e.reduce((d,h)=>Math.max(d,h.minutes),0),s=Math.max(Bat,i,t??0),a=e.length>1?n/(e.length-1):n/2,o=e.map((d,h)=>{const f=e.length>1?ng+h*a:ng+n/2,m=s>0?d.minutes/s:0,p=Cj+r*(1-m);return{x:f,y:p,minutes:d.minutes,label:d.label,isToday:!!d.isToday}});let c="";if(o.length===1)c=`M ${o[0].x} ${o[0].y}`;else{c=`M ${o[0].x} ${o[0].y}`;for(let d=0;d<o.length-1;d++){const h=o[d===0?d:d-1],f=o[d],m=o[d+1],p=o[d+2<o.length?d+2:d+1],x=f.x+(m.x-h.x)/6,v=f.y+(m.y-h.y)/6,g=m.x-(p.x-f.x)/6,y=m.y-(p.y-f.y)/6;c+=` C ${x} ${v}, ${g} ${y}, ${m.x} ${m.y}`}}let u=null;return t&&t>0&&s>0&&(u=Cj+r*(1-t/s)),{points:o,pathD:c,goalY:u,yAxisMax:s}}function Uat({days:e,goalHours:t,minutesThisWeek:n,goalMinutesPerBucket:r=null,onStartLearning:i,period:s,onPeriodChange:a}){const{t:o}=J("me"),{t:c}=J("card-info"),u=n===0&&e.every(m=>m.minutes===0),d=b.useMemo(()=>$at(e,r),[e,r]),h={daily:o("learningActivity.period.daily"),weekly:o("learningActivity.period.weekly"),monthly:o("learningActivity.period.monthly")},f=s==="daily"?"learningActivity.period.rangeDaily":s==="monthly"?"learningActivity.period.rangeMonthly":"learningActivity.period.rangeWeekly";return l.jsxs("section",{"aria-labelledby":"learning-activity-heading",className:"flex h-full min-h-[240px] flex-col overflow-hidden rounded-2xl border border-border bg-card p-5 shadow-soft",children:[l.jsxs("header",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("h2",{id:"learning-activity-heading",className:"text-section-title",children:o("learningActivity.header")}),l.jsx(gd,{ariaLabel:c("learningActivity.ariaLabel"),popoverContent:l.jsx(xd,{title:c("learningActivity.title"),purpose:c("learningActivity.purpose"),calculation:c("learningActivity.calculation")})})]}),l.jsx(cTe,{value:s,onChange:a,labels:h,ariaLabel:o("learningActivity.period.ariaLabel")})]}),l.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:[o("learningActivity.goalLabel")," ",l.jsx("span",{className:"font-medium text-foreground",children:o("learningActivity.goalValue",{count:t,hours:t})})]}),l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o(f)})]}),u?l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border p-8 text-center",children:[l.jsx(U0,{className:"h-7 w-7 text-edition-primary/40","aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:o("learningActivity.emptyTitle")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:o("learningActivity.emptyHint")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:i,rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5"}),children:o("learningActivity.startLearning")})]}):l.jsx("div",{className:"flex flex-1 flex-col",children:l.jsxs("svg",{role:"img","aria-label":o("learningActivity.chartAriaLabel"),viewBox:`0 0 ${AC} ${j1}`,preserveAspectRatio:"none",className:"h-32 w-full",children:[d.goalY!==null&&l.jsxs("g",{children:[l.jsx("line",{x1:ng,x2:AC-ng,y1:d.goalY,y2:d.goalY,stroke:"currentColor",strokeWidth:1.25,strokeDasharray:"6 5",className:"text-muted-foreground
1681/40"}),l.jsx("text",{x:AC-ng,y:Math.max(d.goalY-8,12),textAnchor:"end",className:"fill-muted-foreground text-[10px] font-medium",children:o("learningActivity.goalLineLabel",{minutes:r??0})})]}),l.jsx("defs",{children:l.jsxs("linearGradient",{id:"learning-activity-fill",x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.16"}),l.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),d.points.length>1&&l.jsx("path",{d:`${d.pathD} L ${d.points[d.points.length-1].x} ${j1-i8} L ${d.points[0].x} ${j1-i8} Z`,fill:"url(#learning-activity-fill)",className:"text-edition-primary"}),l.jsx("path",{d:d.pathD,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"text-edition-primary"}),d.points.map((m,p)=>{const x=p===0,v=p===d.points.length-1,g=x?"start":v?"end":"middle";return l.jsxs("g",{children:[l.jsx("circle",{cx:m.x,cy:m.y,r:m.isToday?Rq:zat,fill:"currentColor",className:m.isToday?"text-edition-primary":"text-edition-primary/70"}),m.isToday&&l.jsx("circle",{cx:m.x,cy:m.y,r:Rq+3,fill:"none",stroke:"currentColor",strokeWidth:1.25,className:"text-edition-primary/40"}),l.jsx("text",{x:m.x,y:j1-8,textAnchor:g,className:`text-[11px] font-medium uppercase tracking-wide ${m.isToday?"fill-foreground":"fill-muted-foreground"}`,children:m.label})]},`${m.label}-${p}`)})]})})]})}const Oq=3;function Vat(e){return[{kind:"cognitive",weight:40,swatchClass:"bg-primary",isComplete:e.cognitiveProfileComplete,ctaRoute:ee.ME_LEARNING_PROFILE},{kind:"career",weight:50,swatchClass:"bg-secondary",isComplete:e.careerContextComplete,ctaRoute:ee.ME_INTERVIEW},{kind:"enrollment",weight:10,swatchClass:"bg-amber-500",isComplete:e.enrollmentCount>=Oq,partial:{current:e.enrollmentCount,target:Oq}}]}function Hat(){const{t:e}=J("card-info");return l.jsx(gd,{ariaLabel:e("profileReadiness.ariaLabel"),popoverContent:l.jsx(xd,{title:e("profileReadiness.title"),purpose:e("profileReadiness.purpose"),calculation:e("profileReadiness.calculation")})})}function Dq({state:e}={}){const{t}=J("me"),n=St(),r=due(),{overallPercent:i,breakdown:s,isComplete:a,isDismissed:o,dismiss:c}=e??r;if(a&&o)return null;const u=Vat(s),d=u.find(h=>!h.isComplete);return l.jsxs("section",{"aria-labelledby":"profile-readiness-heading",className:"relative flex h-full min-h-[240px] flex-col overflow-hidden rounded-2xl border border-edition-soft bg-edition-pale p-5",children:[l.jsxs("header",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("h2",{id:"profile-readiness-heading",className:"text-card-title text-strong",children:t("profileReadiness.header")}),l.jsx(Hat,{})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("span",{className:"text-xs font-semibold text-primary",children:t("profileReadiness.overallLabel",{percent:i})}),a&&!o&&l.jsx(Pn,{type:"button",variant:"ghost",size:"sm","aria-label":t("profileReadiness.dismissAria"),onClick:c,className:"-mr-2",children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),l.jsx("ul",{className:"mt-1 flex flex-1 flex-col gap-2.5",children:u.map(h=>l.jsxs("li",{className:"flex items-center gap-2.5 text-[13px]",children:[l.jsx("span",{"aria-hidden":"true",className:`flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-full ${h.isComplete?"bg-primary text-white":"border-[1.5px] border-edition-soft"}`,children:h.isComplete&&l.jsx(Kn,{className:"h-2.5 w-2.5",strokeWidth:3,"aria-hidden":"true"})}),l.jsx("span",{className:h.isComplete?"text-body-ink":"text-muted-ink",children:t(`profileReadiness.breakdown.${h.kind}.label`)})]},h.kind))}),d&&l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:()=>n(d.ctaRoute??ee.ME_MARKETPLACE),rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),className:"mt-auto self-start",children:t("profileReadiness.ctaGetStarted")})]})}function l_({variant:e,scope:t,onStart:n,onDismiss:r}){const{t:i}=J("courses"),s=i(t==="course"?"lcpSuggestion.course":"lcpSuggestion.general");return e==="inline"?l.jsxs("div",{"data-testid":"lcp-suggestion",className:"flex items-start gap-2 rounded-lg bg-edition-pale px-2.5 py-2 text-[12px] leading-snug text-edition-deeper",onClick:a=>a.stopPropagation(),children:[l.jsx(Rn,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("button",{type:"button",onClick:n,className:"flex-1 text-left font-medium underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:s}),l.jsx("button",{type:"button",onClick:r,"aria-label":i("lcpSuggestion.dismiss"),className:"shrink-0 rounded text-edition-deeper/70 hover:text-edition-deeper focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:l.jsx(ar,{className:"h-3.5 w-3.5",
1681strokeWidth:1.75,"aria-hidden":"true"})})]}):l.jsxs("div",{role:"note","data-testid":"lcp-suggestion",className:"flex items-center gap-3 rounded-xl border border-border bg-edition-pale px-4 py-3 text-sm text-edition-deeper",children:[l.jsx(Rn,{className:"h-4 w-4 shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{className:"flex-1 font-medium",children:s}),l.jsxs("button",{type:"button",onClick:n,className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-primary px-4 py-2 text-[12.5px] font-medium text-on-dark transition hover:brightness-[1.06] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[i("lcpSuggestion.cta"),l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})]}),l.jsx("button",{type:"button",onClick:r,"aria-label":i("lcpSuggestion.dismiss"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-edition-deeper/70 hover:text-edition-deeper focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})})]})}const mue="ple.lcpSuggestion.dismissed.v1",kj="ple:lcp-suggestion-dismissed";let pue=!1;function Lq(){if(pue)return!0;try{return window.localStorage.getItem(mue)==="1"}catch{return!1}}function c_(){var s;const e=Ps(),[t,n]=b.useState(Lq);b.useEffect(()=>{const a=()=>n(Lq());return window.addEventListener(kj,a),()=>window.removeEventListener(kj,a)},[]);const r=b.useCallback(()=>{pue=!0;try{window.localStorage.setItem(mue,"1")}catch{}n(!0),window.dispatchEvent(new Event(kj))},[]);return{show:jet()&&((s=e.data)==null?void 0:s.completedFirstLCP)===!1&&!t,dismiss:r}}const qat=["me","mastery","summary"];function Gat(){return At({queryKey:qat,queryFn:()=>_e.get(he.ME_MASTERY_SUMMARY),staleTime:6e4})}function Wat(e,t){return[{label:t.mastered,count:e.mastered,variant:"gold"},{label:t.approaching,count:e.approaching,variant:"purple"},{label:t.needsWork,count:e.needsWork,variant:"red"}]}function Yat({state:e}={}){const{t}=J("me"),{t:n}=J("card-info"),r=St(),i=Gat(),{data:s,isLoading:a,isError:o}=e??i,c=()=>{r(ee.ME_PRACTICE_WEAKNESSES)},u=()=>{r(ee.ME_PRACTICE)};return l.jsxs("section",{"aria-labelledby":"mastery-card-heading",className:"flex h-full min-h-[240px] flex-col overflow-hidden rounded-2xl border border-border bg-card p-5 shadow-soft",children:[l.jsxs("header",{className:"mb-4 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("h2",{id:"mastery-card-heading",className:"text-section-title",children:t("mastery.header")}),l.jsx(gd,{ariaLabel:n("mastery.ariaLabel"),popoverContent:l.jsx(xd,{title:n("mastery.title"),purpose:n("mastery.purpose"),calculation:n("mastery.calculation")})})]}),l.jsx(ce,{type:"button",variant:"link",size:"sm",onClick:c,rightIcon:l.jsx(gn,{className:"h-3 w-3","aria-hidden":"true"}),className:"h-auto px-1 py-0 text-xs font-semibold",children:t("mastery.viewAll")})]}),a?l.jsxs("div",{"aria-label":t("mastery.loading"),role:"status",className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[l.jsx(ei,{className:"h-[88px] rounded-xl"}),l.jsx(ei,{className:"h-[88px] rounded-xl"}),l.jsx(ei,{className:"h-[88px] rounded-xl"})]}):o||!s||s.totalSkills===0?l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border p-6 text-center",children:[l.jsx(Rn,{className:"h-7 w-7 text-primary/40","aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:t("mastery.empty.title")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:u,rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5"}),children:t("mastery.empty.cta")})]}):l.jsx(Pae,{ariaLabel:t("mastery.gridAria"),buckets:Wat(s,{mastered:t("mastery.bucket.mastered"),approaching:t("mastery.bucket.approaching"),needsWork:t("mastery.bucket.needsWork")})})]})}const Kat=["me","career","track-progress"];function Xat(){return At({queryKey:Kat,queryFn:()=>_e.get(he.ME_CAREER_TRACK_PROGRESS),staleTime:6e4})}function Qat(e){return e.planExists?e.planLocked?e.percentComplete>=100?"complete":"in-progress":"draft":"no-plan"}function Zat({state:e,interviewComplete:t}={}){var p;const{t:n}=J("me"),{t:r}=J("card-info"),i=St(),s=Xat(),a=bf(),{data:o,isLoading:c,isError:u}=e??{data:s.data,isLoading:s.isLoading,isError:s.isError},d=t??!!((p=a.data)!=null&&p.profile&&a.data.completedAt),h=()=>{i(ee.ME_CAREER)},f=()=>{i(d?ee.ME_CAREER_PLAN:ee.ME_INTERVIEW)},m=c?"loading":u||!o?"error":Qat(o);
1681return l.jsxs("section",{"aria-labelledby":"career-track-heading",className:"flex h-full min-h-[240px] flex-col overflow-hidden rounded-2xl border border-border bg-card p-5 shadow-soft",children:[l.jsxs("header",{className:"mb-4 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("h2",{id:"career-track-heading",className:"text-section-title",children:n("careerTrack.header")}),l.jsx(gd,{ariaLabel:r("careerTrack.ariaLabel"),popoverContent:l.jsx(xd,{title:r("careerTrack.title"),purpose:r("careerTrack.purpose"),calculation:r("careerTrack.calculation")})})]}),(o==null?void 0:o.planExists)&&m!=="loading"&&m!=="error"&&l.jsx(ce,{type:"button",variant:"link",size:"sm",onClick:h,rightIcon:l.jsx(gn,{className:"h-3 w-3","aria-hidden":"true"}),className:"h-auto px-1 py-0 text-xs font-semibold",children:n("careerTrack.viewPlan")})]}),m==="loading"&&l.jsxs("div",{role:"status","aria-label":n("careerTrack.loading"),className:"space-y-3",children:[l.jsx(ei,{className:"h-5 w-1/3"}),l.jsx(ei,{className:"h-4 w-2/3"}),l.jsx(ei,{className:"h-2.5 w-full"}),l.jsx(ei,{className:"h-12 w-full"})]}),(m==="no-plan"||m==="error")&&l.jsx(Jat,{title:n("careerTrack.states.noPlan.title"),subtitle:n(d?"careerTrack.states.noPlan.subtitleReady":"careerTrack.states.noPlan.subtitleInterview"),ctaLabel:n(d?"careerTrack.states.noPlan.cta":"careerTrack.states.noPlan.ctaInterview"),onCta:f}),m==="draft"&&o&&l.jsx(eot,{title:n("careerTrack.states.draft.title"),subtitle:n("careerTrack.states.draft.subtitle"),ctaLabel:n("careerTrack.states.draft.cta"),onCta:h}),m==="in-progress"&&o&&l.jsx(tot,{data:o}),m==="complete"&&o&&l.jsx(not,{title:n("careerTrack.states.complete.title"),subtitle:o.targetRole?n("careerTrack.states.complete.subtitle",{role:o.targetRole}):n("careerTrack.states.complete.subtitleGeneric"),ctaLabel:n("careerTrack.states.complete.cta"),onCta:()=>i(ee.ME_CAREER_PLAN)})]})}function Jat({title:e,subtitle:t,ctaLabel:n,onCta:r}){return l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border p-6 text-center",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-xs text-muted-foreground",children:t}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:r,rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),children:n})]})}function eot({title:e,subtitle:t,ctaLabel:n,onCta:r}){return l.jsxs("div",{className:"flex flex-1 flex-col items-start justify-center gap-2 rounded-xl border border-border bg-muted/30 p-4",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-xs text-muted-foreground",children:t}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:r,className:"mt-1",rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),children:n})]})}function tot({data:e}){const{t}=J("me"),n=Math.max(0,Math.min(100,Math.round(e.percentComplete)));return l.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.08em] text-muted-foreground",children:t("careerTrack.meta.targetRole")}),l.jsx("p",{className:"mt-1 text-base font-semibold text-foreground",children:e.targetRole??t("careerTrack.meta.targetRoleFallback")}),l.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[typeof e.weeksToReadiness=="number"&&l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(od,{className:"h-3 w-3","aria-hidden":"true"}),l.jsxs("span",{children:[l.jsx("span",{className:"font-semibold text-foreground",children:e.weeksToReadiness})," ",t("careerTrack.meta.weeksToReadiness")]})]}),typeof e.planVersion=="number"&&l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(of,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{children:t("careerTrack.meta.planVersion",{version:e.planVersion})})]})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"mb-1 flex items-center justify-between text-xs",children:[l.jsx("span",{className:"font-semibold text-foreground",children:t("careerTrack.meta.readiness")}),l.jsxs("span",{className:"font-bold text-foreground",children:[n,"%"]})]}),l.jsx(Cx,{value:n,size:"md","aria-label":t("careerTrack.meta.readinessAria",{percent:n})})]}),(typeof e.aiDecisionsCount=="number"||typeof e.recommendedRolesCount=="number")&&l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[typeof e.aiDecisionsCount=="number"&&l.jsx(Pq,{value:e.aiDecisionsCount,label:t("careerTrack.meta.aiDecisions")}),typeof e.recommendedRolesCount=="number"&&l.jsx(Pq,{value:e.recommendedRolesCount,label:t("careerTrack.meta.recommendedRoles")})]})]})}
1681function not({title:e,subtitle:t,ctaLabel:n,onCta:r}){return l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 rounded-xl border border-emerald-500/30 bg-emerald-500/5 p-6 text-center",children:[l.jsx(eye,{className:"h-8 w-8 text-emerald-600 dark:text-emerald-400","aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-xs text-muted-foreground",children:t}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:r,rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5","aria-hidden":"true"}),children:n})]})}function Pq({value:e,label:t}){return l.jsxs("div",{className:"flex flex-col items-start justify-center rounded-lg bg-muted/40 p-3",children:[l.jsx("span",{className:"text-xl font-extrabold leading-none text-foreground",children:e}),l.jsx("span",{className:"mt-1 text-[10.5px] font-bold uppercase tracking-[0.08em] text-muted-foreground",children:t})]})}const gue=na(["YELLOW","GREEN","BLUE","PINK"]),rot=Ue({id:Q(),userId:Q(),courseId:Q(),week:Re().int(),day:Re().int(),lesson:Re().int(),stepKey:Q(),blockIndex:Re().int().min(0),startOffset:Re().int().min(0),endOffset:Re().int().min(0),highlightedText:Q(),color:gue,createdAt:Q()});Ue({courseId:Q().uuid(),week:Re().int().min(1).max(52),day:Re().int().min(1).max(7),lesson:Re().int().min(1).max(20),stepKey:Q().min(1).max(40),blockIndex:Re().int().min(0),startOffset:Re().int().min(0),endOffset:Re().int().min(0),highlightedText:Q().min(1).max(2e3),color:gue});Ue({courseId:Q().optional(),week:Re().int().optional(),day:Re().int().optional(),lesson:Re().int().optional()});const xue=na(["BLOCK","LESSON"]),iot=Ue({id:Q(),userId:Q(),courseId:Q(),week:Re().int(),day:Re().int(),lesson:Re().int(),stepKey:Q(),blockIndex:Re().int().min(0),scope:xue,blockPreview:Q().nullable(),createdAt:Q()});Ue({courseId:Q().uuid(),week:Re().int().min(1).max(52),day:Re().int().min(1).max(7),lesson:Re().int().min(1).max(20),stepKey:Q().min(1).max(40),blockIndex:Re().int().min(0),scope:xue,blockPreview:Q().max(500).nullable().optional()});Ue({courseId:Q().optional(),week:Re().int().optional(),day:Re().int().optional(),lesson:Re().int().optional()});Ue({type:na(["HIGHLIGHT","BOOKMARK","NOTE"]).optional(),courseId:Q().optional(),search:Q().optional(),cursor:Q().optional(),limit:Re().int().min(1).max(100).optional()});const sot=Ue({blockIndex:Re().int().min(0).optional(),blockId:Q().optional(),start:Re().int().min(0),end:Re().int().min(0),quote:Q().min(1)}).refine(e=>e.blockIndex!==void 0||e.blockId!==void 0,"Either blockIndex or blockId must be provided"),aot=Ue({id:Q(),userId:Q(),courseId:Q().nullable(),week:Re().nullable(),day:Re().nullable(),lesson:Re().nullable(),stepKey:Q().nullable(),content:Q(),tags:bt(Q()).default([]),blockIndex:Re().nullable().optional(),anchorBlockId:Q().nullable(),anchorStart:Re().nullable(),anchorEnd:Re().nullable(),anchorText:Q().nullable(),createdAt:Q().or(sx()),updatedAt:Q().or(sx())});Ue({courseId:Q().uuid().optional(),week:Re().int().optional(),day:Re().int().optional(),lesson:Re().int().optional(),stepKey:Q().optional(),content:Q().min(1).max(8e3),tags:bt(Q()).optional(),anchor:sot.optional()});Ue({content:Q().min(1).max(8e3).optional(),tags:bt(Q()).optional()});Ue({courseId:Q().optional(),week:Re().optional(),day:Re().optional(),lesson:Re().optional(),stepKey:Q().optional(),search:Q().optional(),limit:Re().int().optional()});const oot=na(["highlight","note","bookmark"]);Ue({type:oot.optional(),courseId:Q().uuid().optional(),search:Q().min(1).max(200).optional(),cursor:Q().min(1).max(500).optional(),limit:Re().int().min(1).max(50).optional()});const _j=Ue({id:Q(),name:Q()}),lot=nD("type",[Ue({type:Ah("highlight"),highlight:rot,course:_j}),Ue({type:Ah("note"),note:aot,course:_j.nullable()}),Ue({type:Ah("bookmark"),bookmark:iot,course:_j})]),cot=Ue({nextCursor:Q().nullable(),hasMore:ni()}),uot=Ue({data:bt(lot),pagination:cot}),dot=(e={})=>["library",{type:e.type??"all",courseId:e.courseId??"all",search:e.search??"",limit:e.limit??20}];function yue(e={}){return TM({queryKey:dot(e),initialPageParam:null,queryFn:async({pageParam:t})=>{const n={};e.type&&(n.type=e.type),e.courseId&&(n.courseId=e.courseId),e.search&&(n.search=e.search),e.limit&&(n.limit=e.limit),t&&(n.cursor=t);const r=await _e.get(he.ME_LIBRARY,{params:n});return uot.parse(r)},getNextPageParam:t=>t.pagination.hasMore?t.pagination.nextCursor:void 0,staleTime:15e3})}const hot=7*24*60*60*1e3,fot=50;function mot(e){if(!e)return!1;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isNaN(t)?!1:Date.now()-t<=hot}function pot(){const e=WD(),t=yue({limit:fot});return b.useMemo(()=>{var o;const r=(e.data??[]).filter(c=>mot(c.createdAt)).length,i=(o=t.data)==null?void 0:o.pages[0],s=(i==null?void 0:i.data.length)??0,a=(i==null?void 0:i.pagination.hasMore)??!1;return{askArthurSessionsWeek:r,libraryItemsCount:s,libraryHasMore:a,isLoading:e.isLoading||t.isLoading}},[e.data,e.isLoading,t.data,t.isLoading])}function got({state:e}={}){const{t}=J("me"),{t:n}=J("card-info"),r=St(),i=pot(),s=e??i;return l.jsxs("section",{"aria-labelledby":"engagement-card-heading",className:"flex h-full min-h-[240px] flex-col overflow-hidden rounded-2xl border border-border bg-card p-5 shadow-soft",children:[l.jsxs("header",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("h2",{id:"engagement-card-heading",className:"text-section-title",children:t("engagement.header")}),l.jsx(gd,{ariaLabel:n("engagement.ariaLabel"),popoverContent:l.jsx(xd,{title:n("engagement.title"),purpose:n("engagement.purpose"),calculation:n("engagement.calculation")})})]}),l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t("engagement.subheader")})]}),s.isLoading?l.jsxs("div",{role:"status","aria-label":t("engagement.loading"),className:"space-y-3",children:[l.jsx(ei,{className:"h-12 w-full rounded-lg"}),l.jsx(ei,{className:"h-12 w-full rounded-lg"})]}):l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx(y7,{icon:l.jsx(Rn,{"aria-hidden":"true"}),label:t("engagement.rows.askArthur.label"),sub:t("engagement.rows.askArthur.sub",{count:s.askArthurSessionsWeek}),count:s.askArthurSessionsWeek,onClick:()=>r(ee.ME_ASSISTANT),ariaLabel:t("engagement.rows.askArthur.aria",{count:s.askArthurSessionsWeek})}),l.jsx(y7,{icon:l.jsx(LM,{"aria-hidden":"true"}),label:t("engagement.rows.library.label"),sub:s.libraryHasMore?t("engagement.rows.library.subMore",{count:s.library
1681ItemsCount}):t("engagement.rows.library.sub",{count:s.libraryItemsCount}),count:s.libraryItemsCount,onClick:()=>r(ee.ME_LIBRARY),ariaLabel:s.libraryHasMore?t("engagement.rows.library.ariaMore",{count:s.libraryItemsCount}):t("engagement.rows.library.aria",{count:s.libraryItemsCount})})]})]})}function xot(){const{t:e}=J("me"),t=St(),n=oat(),r=due(),i=!(r.isComplete&&r.isDismissed),{maybeAutoStart:s}=ID(),a=b.useRef(!1);b.useEffect(()=>{if(a.current||r.isLoading)return;a.current=!0;const S=window.setTimeout(()=>s(),400);return()=>window.clearTimeout(S)},[r.isLoading,s]);const o=at.key==="ciai";r.breakdown.cognitiveProfileComplete;const c=jw(),u=r.breakdown.careerContextComplete,d=()=>t(ee.ME_INTERVIEW),h=()=>t(ee.ME_LEARNING_PROFILE),f=c_(),m=!o||n.hasCompletedLessons,p=o&&!r.isLoading&&!m,x=()=>{var k;const S=(k=n.hero.resume)==null?void 0:k.courseId,C=S?n.resolveCourseResumePath(S):null;t(C??ee.ME_MARKETPLACE)},v=m||n.agenda.items.length>0,g=n.firstName??e("home.defaultName"),y=b.useMemo(()=>l.jsxs("div",{children:[l.jsxs("h1",{className:"text-balance text-page-title font-light max-sm:text-xl",children:[e(n.greetingKey),","," ",l.jsx("span",{className:"font-medium text-primary",children:g}),"."]}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("home.streakSubtitle",{count:n.streakDays})})]}),[e,n.greetingKey,g,n.streakDays]);On({left:y});const w=S=>{const C=n.resolveCourseResumePath(S);C&&t(C)};return l.jsxs("div",{className:"space-y-6",children:[l.jsx(Sat,{...n.hero,onResume:w,onOpenTodayPlan:()=>t(`${ee.ME_CALENDAR}?view=day`),onBrowseMarketplace:()=>t(ee.ME_MARKETPLACE),resumeLocked:c,onCompleteProfile:h}),f.show&&l.jsx(l_,{variant:"banner",scope:"general",onStart:h,onDismiss:f.dismiss}),p&&l.jsx(Cat,{step1Done:u,onStartStep1:d,onStartFirstLesson:x}),o&&l.jsx(Aat,{}),m&&l.jsx(Iat,{data:n.stats,onPracticeNow:()=>t(`${ee.ME_PRACTICE}?mode=due`)}),l.jsxs("section",{className:v?"grid grid-cols-1 gap-6 lg:grid-cols-2":"grid grid-cols-1 gap-6",children:[l.jsx(Fat,{courses:n.courseProgress,onResume:w,onBrowseCourses:()=>t(ee.ME_MARKETPLACE),onViewAll:()=>t(ee.ME_COURSES),resumeLocked:c}),v&&l.jsx(Mat,{date:new Date,items:n.agenda.items,onItemClick:S=>{const C=n.agenda.resolveItemRoute(S);C&&t(C)},onOpenCalendar:()=>t(ee.ME_CALENDAR)})]}),m?l.jsxs("section",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsx(Uat,{days:n.activity.days,goalHours:n.activity.goalHours,minutesThisWeek:n.activity.minutesThisWeek,goalMinutesPerBucket:n.activity.goalMinutesPerBucket,onStartLearning:()=>t(ee.ME_MARKETPLACE),period:n.period,onPeriodChange:n.setPeriod})}),i&&l.jsx(Dq,{state:r})]}):i&&l.jsx("section",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:l.jsx(Dq,{state:r})}),m&&l.jsxs("section",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:[l.jsx(Yat,{}),l.jsx(Zat,{}),l.jsx(got,{})]})]})}function yot({open:e,loading:t,onStart:n,onCancel:r}){const{t:i}=J("lcp");return l.jsx($x,{open:e,onOpenChange:s=>{s||r()},variant:"info",title:i("intro.title"),description:i("intro.body"),confirmLabel:i(t?"intro.starting":"intro.start"),cancelLabel:i("intro.cancel"),isLoading:t,onConfirm:n,children:l.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[l.jsxs("li",{children:["⢠",i("intro.bullet1")]}),l.jsxs("li",{children:["⢠",i("intro.bullet2")]}),l.jsxs("li",{children:["⢠",i("intro.bullet3")]})]})})}const bue=new Set(["career_plan","custom_course"]);function bot(e){return(e??[]).filter(t=>!!t&&!bue.has(t.toLowerCase()))}function vot(e){return typeof e.personal=="boolean"?e.personal:(e.tags??[]).some(t=>bue.has(t.toLowerCase()))}const wot={cognitive_probe:"question.categories.cognitive_probe",scenario:"question.categories.scenario",resonance:"question.categories.resonance",meta_cognitive:"question.categories.meta_cognitive",behavioral:"question.categories.behavioral"};function Sot(e){return wot[(e??"").toLowerCase()]??"question.defaultCategory"}const Cot=5,kot=["A","B","C","D","E","F"];function _ot({question:e,selectedOptionId:t,onSelect:n,onNext:r,isSubmitting:i,engagementSeconds:s=Cot,isLast:a}){const{t:o}=J("lcp"),[c,u]=b.useState(s);b.useEffect(()=>{u(s);const h=window.setInterval(()=>{u(f=>f<=1?0:f-1)},1e3);return()=>window.clearInterval(h)},[e.id,s]);const d=!!t&&c===0&&!i;return l.jsxs("div",{className:"space-y-6 rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-primary",children:o(Sot(e.category))}),l.jsx("h2",{className:"mt-2 text-section-title text-strong",children:e.text})]}),l.jsx("div",{className:"space-y-2",role:"radiogroup","aria-label":o("question.optionsLabel"),children:e.options.map((h,f)=>l.jsx(Fk,{optionLabel:kot[f]??String(f+1),state:t===h.id?"selected":"idle",onClick:()=>n(h.id),children:h.label},h.id))}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("p",{className:"text-xs text-muted-ink",children:c>0?o("question.engagementHint",{seconds:c}):o("question.readyHint")}),l.jsx(ce,{type:"button",variant:"primary",onClick:r,disabled:!d,isLoading:i,children:o(a?"question.finish":"question.next")})]})]})}function Tot(){const{t:e}=J("lcp");return l.jsxs("div",{role:"status","aria-live":"polite",className:"flex min-h-[40vh] flex-col items-center justify-center gap-4 roun
1681ded-2xl border border-border bg-card px-6 py-14 text-center",children:[l.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-edition-pale border-t-primary"}),l.jsx("h2",{className:"text-section-title text-strong",children:e("processing.title")}),l.jsx("p",{className:"max-w-md text-sm text-muted-ink",children:e("processing.body")})]})}const Eot=2;function jot(){var z;const{t:e}=J("lcp"),t=St(),n=Ps(),r=kat(),i=_at(),s=Tat(),a=Eat(),o=jat(),[c,u]=b.useState(!1),[d,h]=b.useState(0),[f,m]=b.useState(null),[p,x]=b.useState(!1),[v,g]=b.useState(null),y=r.data??null,S=b.useMemo(()=>(y==null?void 0:y.questions)??[],[y])[d]??null,C=b.useMemo(()=>l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-xl bg-edition-pale p-2 text-primary",children:l.jsx(Fi,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h1",{className:"text-page-title font-light text-strong",children:e("sessionTitle")})]}),[e]);On({left:C});const k=!!((z=n.data)!=null&&z.completedFirstLCP),_=!!y&&y.questionsLoaded<y.totalQuestions,E=a.isPending,A=!S&&!!y&&_;if(b.useEffect(()=>{r.isLoading||k||y||u(!0)},[r.isLoading,y,k]),b.useEffect(()=>{if(!y){h(0);return}const O=y.nextUnansweredIndex;if(O!=null){const P=Math.max(0,O-1);h(Math.min(P,Math.max(0,y.questionsLoaded-1)))}else d>=y.questionsLoaded&&h(Math.max(0,y.questionsLoaded-1))},[y==null?void 0:y.id,y==null?void 0:y.nextUnansweredIndex,y==null?void 0:y.questionsLoaded]),b.useEffect(()=>{if(!y||E||!_)return;y.questionsLoaded-(d+1)<=Eot&&a.mutate({sessionId:y.id})},[y,d,_,E,a]),r.isLoading||n.isLoading)return l.jsxs("div",{role:"status","aria-live":"polite",children:[l.jsx("div",{className:"h-[180px] animate-pulse rounded-2xl border border-border bg-card"}),l.jsx("span",{className:"sr-only",children:e("loading")})]});if(k)return l.jsx("div",{className:"space-y-6",children:l.jsxs("div",{className:"flex flex-wrap items-stretch overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("div",{className:"flex min-w-0 flex-1 basis-[360px] flex-col justify-center p-7 sm:p-8",children:[l.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-[0.18em] text-primary",children:e("sessionTitle")}),l.jsx("h2",{className:"mb-2.5 text-2xl font-light tracking-tight text-strong sm:text-[27px]",children:e("alreadyDoneTitle")}),l.jsx("p",{className:"mb-5 max-w-[440px] text-sm leading-relaxed text-body-ink",children:e("alreadyDoneBody")}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_LEARNING_PROFILE_REPORT),rightIcon:l.jsx(gn,{className:"h-4 w-4","aria-hidden":"true"}),children:e("viewReport")}),l.jsx(ce,{type:"button",variant:"outline",onClick:()=>{h(0),i.mutate({mode:"review"})},isLoading:i.isPending,leftIcon:l.jsx(Tx,{className:"h-4 w-4","aria-hidden":"true"}),children:e("retake")})]})]}),l.jsx("div",{className:"flex flex-1 basis-[220px] items-center justify-center bg-brand-gradient p-7",children:l.jsx("div",{className:"flex h-[120px] w-[120px] items-center justify-center rounded-full border border-white/25 bg-white/10",children:l.jsx("div",{className:"flex h-[82px] w-[82px] items-center justify-center rounded-full bg-white/90",children:l.jsx(Fi,{className:"h-10 w-10 text-edition-deeper",strokeWidth:1.5,"aria-hidden":"true"})})})})]})});if(p||o.isPending)return l.jsx(Tot,{});if(!y)return l.jsxs(l.Fragment,{children:[l.jsx(yot,{open:c,loading:i.isPending,onStart:()=>{i.mutate({mode:"initial",language:"en"},{onSuccess:()=>{u(!1),h(0)}})},onCancel:()=>t(ee.ME_HOME)}),!c&&l.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-border bg-card px-6 py-14 text-center",children:[l.jsx("span",{className:"h-9 w-9 animate-spin rounded-full border-[3px] border-edition-pale border-t-primary"}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("preparing")})]})]});if(A)return l.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-border bg-card px-6 py-14 text-center",children:[l.jsx("span",{className:"h-9 w-9 animate-spin rounded-full border-[3px] border-edition-pale border-t-primary"}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("preparingNextBatch")})]});if(!S)return l.jsx("div",{role:"alert",className:"flex flex-col items-center justify-center gap-2 rounded-2xl border border-destructive/30 bg-destructive/10 px-6 py-12 text-center",children:l.jsx("p",{className:"text-sm text-destructive",children:e("preparing")})});const j=d+1>=y.totalQuestions,D=O=>{x(!0),g(null),o.mutate({sessionId:O},{onSuccess:()=>{x(!1),t(ee.ME_LEARNING_PROFILE_REPORT)},onError:()=>{x(!1),g(e("errors.completeBody"))}})},M=()=>{f&&s.mutate({sessionId:y.id,questionId:S.id,optionId:f},{onSuccess:O=>{if(m(null),d+1>=O.totalQuestions){D(O.id);return}h(P=>Math.min(P+1,Math.max(0,O.questionsLoaded-1)))}})},$=()=>{y&&D(y.id)},B=()=>{m(null),g(null),h(0),i.mutate({mode:"initial",language:"en"},{onError:()=>g(e("errors.startOverBody"))})};return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:B,isLoading:i.isPending,children:e("startOver")})}),l.jsx("div",{className:"rounded-2xl border border-border bg-card p-5",children:l.jsx(Cx,{value:y.totalQuestions>0?Math.round((d+1)/y.totalQuestions*100):0,label:e("progress.questionOfTotal",{current:d+1,total:y.totalQuestions}),showPercentage:!0,size:"sm"})}),v&&l.jsxs("div",{role:"alert",className:"flex flex-col gap-3 rounded-2xl border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive sm:flex-row sm:items-center sm:justify-between",children:[l.jsx("span",{children:v}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:$,isLoading:o.isPending,children:e("errors.retry")})]}),l.jsx(_ot,{question:S,selectedOptionId:f,onSelect:m,onNext:M,isSubmitting:s.isPending,isLast:j})]})}const Not=[{key:"visual-verbal",leftKey:"visual",leftLabelKey:"report.dimensions.visual",rightKey:"verbal",rightLabelKey:"report.dimensions.verbal"},{key:"active-reflective",leftKey:"active",leftLabelKey:"report.dimensions.active",rightKey:"reflective",rightLabelKey:"report.dimensions.reflective"},{key:"sensing-intuitive",leftKey:"sensing",leftLabelKey:"report.dimensions.sensing",rightKey:"intuitive",rightLabelKey:"report.dimensions.intuitive"},{key:"sequential-global",leftKey:"sequential",leftLabelKey:"report.dimensions.sequential",rightKey:"global",rightLabelKey:"report.dimensions.global"}];function Aot(e,t,n){const r=Number(e[t]??0),i=Number(e[n]??0),s=Math.max(1,Math.abs(r)+Math.abs(i));return(i-r)/s*100}function Mot({profile:e}){const{t}=J("lcp"),n=e.rawDimensions??{};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{className:"flex flex-wrap items-stretch overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("div",{className:"flex min-w-0 flex-1 basis-[360px] flex-col justify-center p-7 sm:p-8",children:[l.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-[0.18em] text-primary",children:t("report.pageTitle")}),l.jsx("h2",{className:"mb-2.5 text-2xl font-light tracking-tight text-strong sm:text-[27px]",children:t("report.title")}),l.jsx("p",{className:"max-w-[440px] text-sm leading-relaxed text-body-ink",children:t("report.subtitle")})]}),l.jsx("div",{className:"flex flex-1 basis-[220px] items-center justify-center bg-brand-gradient p-7",children:l.jsx("div",{className:"flex h-[120px] w-[120px] items-center justify-center rounded-full border border-white/25 bg-white/10",children:l.jsx("div",{className:"flex h-[82px] w-[82px] items-center justify-center rounded-full bg-white/90",children:l.jsx(Rn,{className:"h-10 w-10 text-edition-deeper",strokeWidth:1.5,"aria-hidden":"true"})})})})]}),l.jsxs("section",{className:"flex flex-wrap items-start gap-6",children:[l.jsxs("div",{className:"min-w-0 flex-1 basis-[420px] rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-5 flex items-center gap-2.5",children:[l.jsx(_x,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title text-strong",children:t("report.title")})]}),l.jsx("div",{className:"space-y-5",children:Not.map(r=>{const i=Aot(n,r.leftKey,r.rightKey),s=Math.abs(i),a=Math.min(100,Math.max(0,50+i/2)),o=i>0,c=i<0;return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center justify-between text-[12.5px]",children:[l.jsx("span",{className:c?"font-semibold text-strong":"text-muted-ink",children:t(r.leftLabelKey)}),l.jsx("span",{className:o?"font-semibold text-strong":"text-muted-ink",children:t(r.rightLabelKey)})]}),l.jsx("div",{className:"relative h-1.5 rounded-full bg-edition-pale",children:l.jsx("div",{className:"absolute top-1/2 h-4 w-4 -translate-x-1/2 -translate-y-1/2 roun
1681ded-full border-[3px] border-card bg-primary shadow-[0_0_0_0.5px_#E4DECF]",style:{left:`${a}%`}})}),l.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-muted-ink",children:t("report.lean",{percent:Math.round(s)})})]},r.key)})})]}),l.jsx("div",{className:"flex min-w-[280px] flex-1 basis-[300px] flex-col gap-[18px]",children:e.strengths.length>0?l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5",children:[l.jsxs("div",{className:"mb-3.5 flex items-center gap-2.5",children:[l.jsx("span",{className:"inline-flex h-[30px] w-[30px] items-center justify-center rounded-[9px] bg-sage/10 text-sage",children:l.jsx(V1,{className:"h-[17px] w-[17px]",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h3",{className:"text-card-title text-strong",children:t("report.strengthsTitle")})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:e.strengths.map(r=>l.jsx("span",{className:"rounded-full border border-border bg-cream px-3.5 py-1.5 text-[12.5px] text-body-ink",children:r},r))})]}):l.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 rounded-2xl border border-dashed border-border p-6 text-center",children:[l.jsx(V1,{className:"h-6 w-6 text-primary/40",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{className:"text-[12.5px] text-muted-ink",children:t("report.strengthsTitle")})]})})]}),e.preferredStrategies.length>0&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2.5",children:[l.jsx(Rn,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title text-strong",children:t("report.strategiesTitle")})]}),l.jsx("ul",{className:"grid grid-cols-1 gap-x-7 sm:grid-cols-2",children:e.preferredStrategies.map(r=>l.jsxs("li",{className:"flex items-start gap-2.5 border-b border-border py-2.5 last:border-b-0 sm:[&:nth-last-child(2)]:border-b-0",children:[l.jsx("span",{className:"mt-0.5 inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full bg-edition-pale text-primary",children:l.jsx(Kn,{className:"h-3 w-3",strokeWidth:2.5,"aria-hidden":"true"})}),l.jsx("span",{className:"text-[13px] leading-snug text-body-ink",children:r})]},r))})]})]})}function Rot(){const{t:e}=J("lcp"),t=St(),n=fue(),r=at.key==="ciai",i=gs(),s=b.useMemo(()=>{const o=i.data??[];if(o.length===0)return null;const c=[...o].sort((f,m)=>{const p=f.progress.lastAccessedAt?new Date(f.progress.lastAccessedAt).getTime():0;return(m.progress.lastAccessedAt?new Date(m.progress.lastAccessedAt).getTime():0)-p})[0],{currentWeek:u,currentDay:d,currentLesson:h}=c.progress;return ts(c.courseId,u||1,d||1,h||1)},[i.data]),a=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("report.pageTitle")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("report.pageSubtitle")})]}),[e]);return On({left:a}),n.isLoading?l.jsxs("div",{className:"space-y-6",role:"status","aria-live":"polite",children:[l.jsx("div",{className:"h-[176px] animate-pulse rounded-2xl border border-border bg-card"}),l.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[l.jsx("div",{className:"h-[320px] min-w-0 flex-1 basis-[420px] animate-pulse rounded-2xl border border-border bg-card"}),l.jsx("div",{className:"h-[140px] min-w-[280px] flex-1 basis-[300px] animate-pulse rounded-2xl border border-border bg-card"})]}),l.jsx("span",{className:"sr-only",children:e("loading")})]}):n.isError||!n.data?l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-dashed border-border bg-card p-10 text-center",children:[l.jsx("span",{className:"inline-flex h-11 w-11 items-center justify-center rounded-full bg-edition-pale text-primary",children:l.jsx(Fi,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h2",{className:"text-section-title text-strong",children:e("report.unavailableTitle")}),l.jsx("p",{className:"max-w-md text-sm text-muted-ink",children:e("report.unavailableBody")}),l.jsx(ce,{type:"button",variant:"primary",className:"mt-1",onClick:()=>t(ee.ME_LEARNING_PROFILE),children:e("report.startNow")})]}):l.jsxs("div",{className:"space-y-6",children:[r?l.jsx("section",{className:"overflow-hidden rounded-2xl border border-border bg-card p-6 sm:p-7",children:l.jsxs("div",{className:"flex items-start gap-3.5",children:[l.jsx("span",{className:"mt-0.5 inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary","aria-hidden":"true",children:l.jsx(Rn,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-[0.18em] text-primary",children:e("ciaiReveal.eyebrow")}),l.jsx("h2",{className:"text-xl font-light tracking-tight text-strong sm:text-2xl",children:e("ciaiReveal.title")}),l.jsx("p",{className:"mt-2 max-w-[520px] text-sm leading-relaxed text-body-ink",children:e("ciaiReveal.body")}),l.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[s&&l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(s),rightIcon:l.jsx(gn,{className:"h-4 w-4","aria-hidden":"true"}),children:e("ciaiReveal.startLesson")}),l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(ee.ME_CALENDAR),children:e("ciaiReveal.seePlan")})]})]})]})}):l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_INTERVIEW),rightIcon:l.jsx(gn,{className:"h-4 w-4","aria-hidden":"true"}),children:e("report.continueToInterview")})}),l.jsx(Mot,{profile:n.data})]})}function Oot({message:e}){if(e.role==="system")return null;const t=e.role==="assistant";return l.jsx("div",{className:`flex ${t?"justify-start":"justify-end"}`,"data-role":e.role,children:l.jsx("div",{className:`max-w-[85%] px-4 py-2.5 text-sm leading-relaxed ${t?"rounded-2xl rounded-tl-md border border-border bg-card text-body-ink":"rounded-2xl rounded-tr-md bg-edition-deeper text-on-dark"}`,children:t?l.jsx(Jx,{content:e.content,className:"text-sm"}):l.jsx("p",{className:"whitespace-pre-wrap",children:e.content})})})}function Dot({onSend:e,disabled:t}){const{t:n}=J("interview"),[r,i]=b.useState(""),s=()=>{const o=r.trim();!o||t||(e(o),i(""))},a=o=>
1681{o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),s())};return l.jsxs("div",{className:"flex items-end gap-2 rounded-2xl border border-border bg-card p-2.5 transition-colors focus-within:border-edition-soft",children:[l.jsx("textarea",{value:r,onChange:o=>i(o.target.value),onKeyDown:a,rows:2,placeholder:n("input.placeholder"),"aria-label":n("input.ariaLabel"),disabled:t,className:"flex-1 resize-none border-0 bg-transparent p-2 text-sm text-strong outline-none placeholder:text-muted-ink"}),l.jsxs("button",{type:"button",onClick:s,disabled:t||!r.trim(),className:"inline-flex items-center gap-1.5 rounded-xl bg-primary px-4 py-2.5 text-sm font-medium text-white transition-[filter,opacity] hover:brightness-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50",children:[l.jsx(Xxe,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{children:n("input.send")})]})]})}function Lot(){const{t:e}=J("interview");return l.jsx("div",{className:"flex justify-start","aria-label":e("typing"),children:l.jsxs("div",{className:"flex max-w-[85%] items-center gap-1.5 rounded-2xl rounded-tl-md border border-border bg-card px-4 py-3",children:[l.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-edition-primary [animation-delay:-0.2s]"}),l.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-edition-primary [animation-delay:-0.1s]"}),l.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-edition-primary"})]})})}function Pot({profile:e,onContinueToCareer:t}){const{t:n}=J("interview");return l.jsxs("div",{className:"space-y-[22px]",children:[l.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-6 rounded-2xl border border-border bg-card p-6 sm:p-7",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[l.jsx("div",{className:"flex h-14 w-14 flex-shrink-0 items-center justify-center rounded-2xl bg-brand-gradient text-on-dark",children:l.jsx(jl,{className:"h-7 w-7",strokeWidth:1.6,"aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-section-title text-strong",children:n("summary.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-ink",children:n("summary.subtitle")})]})]}),l.jsxs("button",{type:"button",onClick:t,className:"inline-flex flex-shrink-0 items-center gap-2 rounded-xl bg-primary px-5 py-3 text-sm font-semibold text-white transition-[filter] hover:brightness-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[l.jsx("span",{children:n("summary.continueToCareer")}),l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})]})]}),(e.careerStage||e.careerGoals.length>0)&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(ki,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title text-strong",children:n("summary.careerGoals")})]}),e.careerStage&&l.jsxs("div",{className:"mb-4 rounded-xl border border-edition-soft bg-edition-pale px-4 py-3",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-edition-deeper",children:n("summary.careerStage")}),l.jsx("p",{className:"mt-1 text-sm font-medium text-strong",children:e.careerStage})]}),e.careerGoals.length>0&&l.jsx("ul",{className:"space-y-2",children:e.careerGoals.map(r=>l.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-body-ink",children:[l.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-edition-primary","aria-hidden":"true"}),l.jsx("span",{children:r})]},r))})]}),e.recommendedRoles.length>0&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(Bm,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title text-strong",children:n("summary.recommendedRoles")})]}),l.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:e.recommendedRoles.map(r=>l.jsxs("div",{className:"rounded-xl border border-border bg-cream p-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("p",{className:"text-sm font-semibold text-strong",children:r.title}),typeof r.fit=="number"&&l.jsx("span",{className:"flex-shrink-0 rounded-full bg-edition-pale px-2.5 py-0.5 text-xs font-semibold text-edition-deeper",children:n("summary.fit",{percent:r.fit})})]}),typeof r.fit=="number"&&l.jsx("div",{className:"mt-3 h-1.5 overflow-hidden rounded-full bg-edition-pale",role:"presentation",children:l.jsx("div",{className:"h-full rounded-full bg-edition-primary",style:{width:`${Math.max(0,Math.min(100,r.fit))}%`}})}),r.skills&&r.skills.length>0&&l.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:r.skills.map(i=>l.jsx("span",{className:"rounded-md border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-muted-ink",children:i},i))})]},r.title))})]})]})}const Iq=8;function Iot(){var p;const{t:e}
1681=J("interview"),t=St(),n=bf(),r=ert(),[i,s]=b.useState([]),[a,o]=b.useState(null),c=b.useRef(!1),u=b.useRef(null);b.useEffect(()=>{if(!n.data||c.current)return;if(c.current=!0,n.data.status==="COMPLETED"&&n.data.profile){o(n.data.profile);return}const x=n.data.chatHistory??[];x.length>0?s(x):r.mutate({history:[]},{onSuccess:v=>{v.type==="question"?s([{role:"assistant",content:v.content}]):v.type==="summary"&&o(v.profile)}})},[n.data]),b.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[i.length,r.isPending,a]);const d=b.useMemo(()=>i.filter(x=>x.role==="user").length,[i]),h=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light text-strong",children:e("pageTitle")}),l.jsx("p",{className:"mt-1 text-sm text-muted-ink",children:e("turnHint",{current:d,suggested:Iq})})]}),[e,d]);On({left:h});const f=x=>{const v={role:"user",content:x},g=[...i,v];s(g),r.mutate({history:g},{onSuccess:y=>{y.type==="question"?s(w=>[...w,{role:"assistant",content:y.content}]):y.type==="summary"&&(o(y.profile),window.setTimeout(()=>t(ee.ME_CAREER),4e3))}})};if(n.isLoading)return l.jsxs("div",{role:"status","aria-label":e("loading"),className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-border bg-card px-6 py-16 text-center",children:[l.jsx(Qo,{className:"h-6 w-6 animate-spin text-edition-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("loading")})]});if(a)return l.jsx(Pot,{profile:a,onContinueToCareer:()=>t(ee.ME_CAREER)});const m=i.length===0&&!r.isPending;return l.jsx("div",{className:"flex flex-col gap-[22px]",children:l.jsxs("div",{className:"flex h-[calc(100dvh-18rem)] min-h-[420px] flex-col overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("div",{className:"flex items-center gap-3 border-b border-border px-5 py-4",children:[l.jsx("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl bg-brand-gradient text-on-dark",children:l.jsx(FM,{className:"h-5 w-5",strokeWidth:1.6,"aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"text-card-title text-strong",children:e("pageTitle")}),l.jsx("p",{className:"mt-0.5 text-xs text-muted-ink",children:e("turnHint",{current:d,suggested:Iq})})]})]}),l.jsxs("div",{ref:u,className:"flex-1 space-y-3 overflow-y-auto overscroll-contain p-5",children:[m?l.jsxs("div",{role:"status","aria-label":e("loading"),className:"flex h-full flex-col items-center justify-center gap-3 text-center",children:[l.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(Rn,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("loading")})]}):i.map((x,v)=>l.jsx(Oot,{message:x},v)),r.isPending&&l.jsx(Lot,{})]}),r.isError&&l.jsxs("div",{className:"mx-5 mb-3 flex items-center gap-2 rounded-xl border border-clay/40 bg-clay/10 px-3.5 py-2.5 text-sm text-clay",children:[l.jsx(Uv,{className:"h-4 w-4 flex-shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{children:((p=r.error)==null?void 0:p.message)??e("loading")})]}),l.jsxs("div",{className:"border-t border-border p-3",children:[l.jsx(Dot,{onSend:f,disabled:r.isPending}),l.jsx("p",{className:"mt-1.5 text-center text-[11px] leading-tight text-muted-ink",children:e("disclosure","Arthur is an AI tutor and can make mistakes. Check important information.")})]})]})})}const Fot=new Set(["forbidden","forbidden resource","insufficient permissions","unauthorized"]);function u_(e){var t;if(Mr.isAxiosError(e)){const n=(t=e.response)==null?void 0:t.status;if(!e.response)return"We couldn't reach the server. Check your connection and try again.";const r=ox(e,""),i=!r||Fot.has(r.trim().toLowerCase())||/^Request failed with status code/.test(r);return n===401?"Your session has ended. Please sign in again.":n===403&&i?"This account isn't allowed to do that.":n===429?"Too many attempts. Please wait a moment and try again.":n!==void 0&&n>=500&&i?"Something went wrong on our side. Please try again in a moment.":i?"Something went wrong. Please try again.":r}return ox(e)}function I5(e,t){Vt.error(e,{description:u_(t)})}const hy=["career","plan"],Mw=["career","history"],Bot=["career","suggestions"],vue=["career","preferences"];function zot(){return At({queryKey:hy,queryFn:()=>_e.get(he.CAREER_PLAN),staleTime:3e4})}function $ot(e=20){return At({queryKey:[...Mw,e],queryFn:()=>_e.get(`${he.CAREER_PLAN_HISTORY}?limit=${e}`),staleTime:3e4})}function wue(){return At({queryKey:Bot,queryFn:()=>_e.get(he.CAREER_SUGGESTIONS),staleTime:6e4})}function Uot(){return At({queryKey:vue,queryFn:()=>_e.get(he.CAREER_PREFERENCES),staleTime:6e4})}function Vot(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CAREER_PLAN,t),onSuccess:t=>
1681{e.setQueryData(hy,t),e.invalidateQueries({queryKey:Mw})}})}function Hot(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CAREER_PLAN_HISTORY,t),onSuccess:t=>{e.setQueryData(hy,t),e.invalidateQueries({queryKey:Mw})}})}function qot(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CAREER_PREFERENCES,t),onSuccess:t=>{e.setQueryData(hy,t),e.invalidateQueries({queryKey:Mw}),e.invalidateQueries({queryKey:vue})}})}function Got(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CAREER_LOCK,t),onSuccess:t=>{e.setQueryData(hy,t),e.invalidateQueries({queryKey:Mw})}})}function Wot(){return rt({mutationFn:e=>_e.post(he.CAREER_BRIDGE,e)})}function Yot(){return rt({mutationFn:e=>_e.post(he.CAREER_COMPARE,e)})}function Kot(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CAREER_MATERIALIZE,t),onSuccess:()=>{e.invalidateQueries({queryKey:hy})}})}function Xot({plan:e}){var s,a,o;const{t}=J("career"),n=((s=e.role)==null?void 0:s.title)??t("plan.untitledRole"),r=((a=e.role)==null?void 0:a.skills)??[],i=e.trajectory??[];return l.jsxs("div",{className:"space-y-[22px]",children:[l.jsxs("section",{className:"relative overflow-hidden rounded-2xl bg-brand-gradient p-8 text-on-dark sm:p-9",children:[l.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -right-12 -top-14 h-60 w-60 rounded-full border border-white/15"}),l.jsx("div",{className:"relative flex flex-wrap items-center gap-7",children:l.jsxs("div",{className:"min-w-[240px] flex-1",children:[l.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-[0.18em] text-on-dark/80",children:t("plan.versionLabel",{version:e.version})}),l.jsx("h2",{className:"text-3xl font-light leading-tight tracking-[-0.01em]",children:n}),((o=e.role)==null?void 0:o.description)&&l.jsx("p",{className:"mt-2 max-w-[460px] text-sm leading-relaxed text-on-dark/85",children:e.role.description}),l.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2.5",children:[e.locked&&l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-[11px] font-semibold text-on-dark",children:[l.jsx(ki,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"}),t("plan.locked")]}),e.estimatedWeeks!=null&&l.jsx("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-[11px] font-medium text-on-dark",children:t("plan.estimatedWeeks",{weeks:e.estimatedWeeks})})]})]})})]}),r.length>0&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-3.5 flex items-center gap-2.5",children:[l.jsx(ki,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title",children:t("suggestions.skills")})]}),l.jsx("ul",{className:"flex flex-wrap gap-2",children:r.map(c=>l.jsxs("li",{className:"inline-flex items-center gap-2 rounded-lg border border-border bg-cream px-2.5 py-1.5 text-[11.5px] font-medium text-body-ink",children:[l.jsx("span",{"aria-hidden":"true",className:"h-1.5 w-1.5 rounded-full bg-edition-primary"}),c]},c))})]}),i.length>0&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-[18px] flex items-center gap-2.5",children:[l.jsx(Ob,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title",children:t("plan.trajectory")})]}),l.jsx("ol",{className:"flex flex-col",children:i.map((c,u)=>{const d=u===i.length-1,h=u===0,f=u===1;return l.jsxs("li",{className:"flex gap-4",children:[l.jsxs("div",{className:"flex flex-shrink-0 flex-col items-center",children:[l.jsx("span",{"aria-hidden":"true",className:h?"inline-flex h-[30px] w-[30px] items-center justify-center rounded-full bg-sage text-white":f?"inline-flex h-[30px] w-[30px] items-center justify-center rounded-full bg-primary text-white":"inline-flex h-[30px] w-[30px] items-center justify-center rounded-full border-[1.5px] border-edition-soft bg-card",children:h?l.jsx(Kn,{className:"h-4 w-4",strokeWidth:2.5}):f?l.jsx("span",{className:"h-2 w-2 rounded-full bg-white"}):null}),!d&&l.jsx("span",{"aria-hidden":"true",className:"my-1 min-h-[30px] w-px flex-1 bg-border"})]}),l.jsxs("div",{className:d?"flex-1":"flex-1 pb-[22px]",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[l.jsx("span",{className:"text-sm font-semibold text-strong",children:c.title}),(c.phase||c.duration)&&l.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-[0.14em] text-edition-deeper",children:[c.p
1681hase,c.duration?` · ${c.duration}`:""]})]}),c.topics&&c.topics.length>0&&l.jsx("div",{className:"mt-2.5 flex flex-wrap gap-2",children:c.topics.map(m=>l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-cream px-2.5 py-1.5 text-[11.5px] text-body-ink",children:[l.jsx(of,{className:"h-[13px] w-[13px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),m]},m))})]})]},`${c.phase}-${u}`)})})]}),e.courses&&e.courses.length>0&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h3",{className:"text-card-title",children:t("plan.recommendedCourses")}),l.jsx("ul",{className:"mt-4 grid gap-3 md:grid-cols-2",children:e.courses.map((c,u)=>l.jsxs("li",{className:"rounded-xl border border-border bg-cream/60 p-4",children:[l.jsx("p",{className:"text-sm font-semibold text-strong",children:c.title}),l.jsx("p",{className:"mt-0.5 text-xs text-muted-ink",children:[c.level,c.duration??(c.durationWeeks?`${c.durationWeeks}w`:null),c.phase].filter(Boolean).join(" · ")}),c.skills&&c.skills.length>0&&l.jsx("p",{className:"mt-1.5 text-xs text-muted-ink",children:c.skills.join(", ")})]},`${c.title}-${u}`))})]})]})}function Qot({role:e,isTarget:t=!1,onLock:n,onBridge:r}){const{t:i}=J("career"),s=typeof e.fit=="number"?Math.max(0,Math.min(100,Math.round(e.fit))):null;return l.jsxs("article",{className:t?"rounded-2xl border border-edition-soft bg-edition-pale/60 p-4":"rounded-2xl border border-border bg-card p-4 transition-colors hover:border-edition-soft",children:[l.jsxs("header",{className:"flex items-start justify-between gap-3",children:[l.jsx("h3",{className:"text-sm font-semibold text-strong",children:e.title}),t&&l.jsxs("span",{className:"inline-flex flex-shrink-0 items-center gap-1 rounded-full bg-primary px-2.5 py-0.5 text-[10px] font-semibold text-on-dark",children:[l.jsx(ki,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),i("plan.locked")]})]}),s!=null&&l.jsxs("div",{className:"mt-2.5 flex items-center gap-2.5",children:[l.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:"h-full rounded-full bg-edition-primary",style:{width:`${s}%`}})}),l.jsxs("span",{className:"text-xs font-bold text-edition-deeper",children:[s,"%"]})]}),e.skills&&e.skills.length>0&&l.jsxs("p",{className:"mt-2 text-xs text-muted-ink",children:[i("suggestions.skills"),": ",e.skills.join(", ")]}),l.jsxs("footer",{className:"mt-3 flex flex-wrap gap-2",children:[l.jsx("button",{type:"button",onClick:n,className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-on-dark transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:i("suggestions.lock")}),l.jsx("button",{type:"button",onClick:r,className:"rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-body-ink transition-colors hover:border-edition-soft hover:text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:i("suggestions.bridge")})]})]})}const Zot=Ue({title:Q().min(1).max(160),description:Q().max(2e3).optional(),skills:bt(Q().max(80)).max(40).optional()}),Sue=Ue({hoursPerWeek:sv.number().int().min(1).max(80).optional(),timelineWeeks:sv.number().int().min(1).max(104).optional(),modality:na(["video","reading","project","mixed"]).optional(),learningStyle:Q().max(80).optional()}),Jot=Ue({phase:Q(),title:Q(),duration:Q().optional(),topics:bt(Q()).optional(),skills:bt(Q()).optional()}),elt=Ue({title:Q(),phase:Q().optional(),skills:bt(Q()).optional(),duration:Q().optional(),durationWeeks:Re().optional(),description:Q().optional(),level:Q().optional()});Ue({id:Q(),userId:Q(),version:Re(),locked:ni(),estimatedWeeks:Re().nullable().optional(),role:Zot.nullable().optional(),trajectory:bt(Jot).nullable().optional(),courses:bt(elt).nullable().optional(),preferences:Sue.nullable().optional(),createdAt:Q().or(sx()).optional()});Ue({title:Q(),fit:Re().optional(),skills:bt(Q()).optional()});Ue({skills:bt(Ue({skill:Q(),content:Q()}))});Ue({rows:bt(Ue({aspect:Q(),values:z3(Q())}))});Ue({planId:Q(),coursesCreated:Re(),curriculumJobsQueued:Re(),packSlug:Q(),packId:Q(),packPrice:Re()});const Tj="__any__",Ej="mt-1.5 w-full rounded-[10px] border border-border bg-cream px-3 py-2 text-sm text-strong placeholder:text-muted-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1";function tlt({initial:e,onSubmit:t,isSubmitting:n}){const{t:r}=J("career"),{register:i,handleSubmit:s,control:a,formState:{errors:o}}=pf({resolver:gf(Sue),defaultValues:e??{}}),c=b.useMemo(()=>[{value:Tj,label:r("preferences.modalityAny")},{value:"video",label:r("preferences.modalityVideo")},{value:"reading",label:r("preferences.modalityReading")},{value:"project",label:r("preferences.modalityProject")},{value:"mixed",label:r("preferences.modalityMixed")}],[r]);return l.jsxs("form",{onSubmit:s(t),className:"space-y-4 rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx(MQ,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title",children:r("preferences.title")})]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("label",{className:"block text-sm",children:[l.jsx("span",{className:"text-muted-ink",children:r("preferences.hoursPerWeek")}),l.jsx("input",{type:"number",min:1,max:80,...i("hoursPerWeek"),className:Ej}),o.hoursPerWeek&&l.jsx("p",{className:"mt-1 text-xs text-clay",children:o.hoursPerWeek.message})]}),l.jsxs("label",{className:"block text-sm",children:[l.jsx("span",{className:"text-muted-ink",children:r("preferences.timelineWeeks")}),l.jsx("input",{type:"number",min:1,max:104,...i("timelineWeeks"),className:Ej}),o.timelineWeeks&&l.jsx("p",{className:"mt-1 text-xs text-clay",children:o.timelineWeeks.message})]}),l.jsxs("div",{className:"space-y-1 text-sm",children:[l.jsx("span",{className:"block text-muted-ink",children:r("preferences.modality")}),l.jsx(S7,{control:a,name:"modality",render:({field:u})=>l.jsx(Ho,{options:c,value:u.value??Tj,onChange:d=>u.onChange(d===Tj?void 0:d),ariaLabel:r("preferences.modality")})})]}),l.jsxs("label",{className:"block text-sm",children:[l.jsx("span",{className:"text-muted-ink",children:r("preferences.learningStyle")}),l.jsx("input",{type:"text",...i("learningStyle"),className:Ej})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"submit",variant:"primary",size:"md",isLoading:n,disabled:n,children:r("preferences.save")})})]})}
1681function nlt({open:e,role:t,isSubmitting:n,onConfirm:r,onCancel:i}){const{t:s}=J("career");return t?l.jsx($x,{open:e,onOpenChange:a=>{a||i()},variant:"warning",title:s("lock.title"),description:s("lock.body",{title:t.title}),confirmLabel:s(n?"lock.locking":"lock.confirm"),cancelLabel:s("lock.cancel"),isLoading:n,onConfirm:r}):null}function rlt({content:e}){var n;const{t}=J("career");return(n=e==null?void 0:e.skills)!=null&&n.length?l.jsxs("div",{className:"space-y-3",children:[e.skills.map(r=>l.jsxs("article",{className:"rounded-xl border border-border bg-cream/60 p-4",children:[l.jsx("h4",{className:"text-sm font-semibold text-strong",children:r.skill}),l.jsx(Jx,{content:r.content,className:"mt-2 text-sm"})]},r.skill)),l.jsx("p",{className:"text-[11px] leading-tight text-muted-ink",children:t("disclosure","Arthur is an AI tutor and can make mistakes. Check important information.")})]}):l.jsx("p",{className:"text-sm text-muted-ink",children:t("bridge.empty")})}function ilt({open:e,courses:t,isSubmitting:n,onConfirm:r,onCancel:i}){const{t:s}=J("career");return l.jsx($x,{open:e,onOpenChange:a=>{a||i()},variant:"default",title:s("materialize.title"),description:s("materialize.body",{count:t.length}),confirmLabel:s(n?"materialize.creating":"materialize.confirm"),cancelLabel:s("materialize.cancel"),isLoading:n,onConfirm:r,children:l.jsx("ul",{className:"max-h-64 space-y-2 overflow-y-auto overscroll-contain rounded-lg border border-border p-3 text-sm",children:t.map((a,o)=>l.jsxs("li",{className:"flex items-start justify-between gap-3 border-b border-border pb-2 last:border-b-0",children:[l.jsx("span",{className:"font-medium text-foreground",children:a.title}),l.jsx("span",{className:"text-xs text-muted-foreground",children:[a.level,a.duration??(a.durationWeeks?`${a.durationWeeks}w`:null)].filter(Boolean).join(" · ")})]},`${a.title}-${o}`))})})}function slt(){const{t:e}=J("career"),t=St(),n=zot(),r=wue(),i=Uot(),s=Vot(),a=S=>I5(e("generate.toast.error"),S),o=Got(),c=qot(),u=Wot(),d=Kot(),[h,f]=b.useState(null),[m,p]=b.useState(null),[x,v]=b.useState(!1),g=n.data??null,y=(g==null?void 0:g.courses)??[],w=b.useMemo(()=>l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-xl bg-edition-pale p-2 text-primary",children:l.jsx(yQ,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light text-strong",children:e("pageTitle")}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("pageSubtitle")})]})]}),[e]);return On({left:w}),n.isLoading?l.jsxs("div",{className:"space-y-[22px]",children:[l.jsx(ei,{className:"h-44 w-full rounded-2xl"}),l.jsxs("div",{className:"grid gap-[22px] lg:grid-cols-[1fr,300px]",children:[l.jsx(ei,{className:"h-72 w-full rounded-2xl"}),l.jsx(ei,{className:"h-72 w-full rounded-2xl"})]})]}):l.jsxs("div",{className:"space-y-[22px]",children:[l.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>t(ee.ME_CAREER_PLAN_HISTORY),leftIcon:l.jsx(Hv,{className:"h-4 w-4",strokeWidth:1.75}),children:e("header.history")}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>t(ee.ME_CAREER_COMPARE),leftIcon:l.jsx(Rxe,{className:"h-4 w-4",strokeWidth:1.75}),children:e("header.compare")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:()=>{const S=g!=null&&g.locked&&g.role?g.role:void 0;s.mutate(S?{role:S}:{},{onError:a})},isLoading:s.isPending,children:s.isPending?e("header.generating"):e(g?"header.regenerate":"header.generate")})]}),!g&&!s.isPending&&l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-10 text-center",children:[l.jsx("span",{className:"mx-auto mb-4 inline-flex h-12 w-12 items-center justify-center rounded-2xl bg-edition-pale text-primary",children:l.jsx(Bm,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h2",{className:"text-section-title text-strong",children:e("empty.title")}),l.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-muted-ink",children:e("empty.body")}),l.jsx(ce,{type:"button",variant:"primary",className:"mt-5",onClick:()=>s.mutate({},{onError:a}),children:e("empty.cta")})]}),s.isPending&&!g&&l.jsxs("div",{className:"space-y-[22px]",children:[l.jsx(ei,{className:"h-44 w-full rounded-2xl"}),l.jsx(ei,{className:"h-72 w-full rounded-2xl"})]}),g&&l.jsxs(l.Fragment,{children:[l.jsx(Xot,{plan:g}),y.length>0&&l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"button",variant:"primary",onClick:()=>v(!0),children:e("materialize.cta",{count:y.length})})})]}),l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-1 flex items-center gap-2.5",children:[l.jsx(Bm,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title",children:e("suggestions.title")})]}),r.isLoading&&l.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[l.jsx(ei,{className:"h-28 w-full rounded-2xl"}),l.jsx(ei,{className:"h-28 w-full rounded-2xl"})]}),r.data&&r.data.length===0&&l.jsx("p",{className:"mt-3 text-sm text-muted-ink",children:e("suggestions.empty")}),r.data&&r.data.length>0&&l.jsx("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:r.data.map(S=>{var C;return l.jsx(Qot,{role:S,isTarget:!!(g!=null&&g.locked)&&!!((C=g.role)!=null&&C.title)&&g.role.title===S.title,onLock:()=>f(S),onBridge:()=>{var k;u.mutate({targetRole:S.title,currentSkills:((k=g==null?void 0:g.role)==null?void 0:k.skills)??[]},{onSuccess:_=>p(_)})}},S.title)})})]}),u.isPending&&l.jsx("p",{className:"text-sm text-muted-ink",children:e("bridge.generating")}),m&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsxs("div",{className:"mb-1 flex items-center gap-2.5",children:[l.jsx(Rn,{className:"h-[18px] w-[18px] text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-card-title",children:e("bridge.title")})]}),l.jsx("div",{className:"mt-4",children:l.jsx(rlt,{content:m})})]}),l.jsx(tlt,{initial:i.data??(g==null?void 0:g.preferences)??null,isSubmitting:c.isPending,onSubmit:S=>c.mutate(S)}),l.jsx(nlt,{open:!!h,role:h?{title:h.title,skills:h.skills}:null,isSubmitting:o.isPending,onCancel:()=>f(null),onConfirm:()=>{h&&o.mutate({role:{title:h.title,skills:h.skills}},{onSuccess:()=>f(null)})}}),l.jsx(ilt,{open:x&&y.length>0,courses:y,isSubmitting:d.isPending,onCancel:()=>v(!1),onConfirm:()=>{g&&d.mutate({planId:g.id},{onSuccess:S=>{v(!1),Vt.success(e("materialize.toast.success")),S!=null&&S.packSlug?t(Jle(S.packSlug)):t(ee.ME_MARKETPLACE)},onError:S=>{I5(e("materialize.toast.error"),S)}})}})]})}function alt(){var a;const{t:e}=J("career"),t=St(),n=$ot(50),r=Hot(),i=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("history.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("history.subtitle")})]}),[e]),s=b.useMemo(()=>l.jsx($i,{label:e("history.back"),onClick:()=>t(ee.ME_CAREER)}),[e,t]);return On({left:i,actions:s}),n.isLoading?l.jsx("p",{className:"py-12 text-center text-muted-foreground",children:e("loading")}):l.jsxs("div",{className:"space-y-6",children:[n.data&&n.data.length===0&&l.jsx("p",{className:"rounded-xl border border-border bg-card p-6 text-sm text-muted-foreground",children:e("history.empty")}),l.jsx("ul",{className:"space-y-3",children:(a=n.data)==null?void 0:a.map(o=>{var c;return l.jsxs("li",{className:"flex items-center justify-between rounded-xl border border-border bg-card p-4",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[e("history.versionLabel",{version:o.version}),o.locked?` · ${e("plan.locked")}`:""]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:((c=o.role)==null?void 0:c.title)??e("plan.untitledRole")})]}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>{r.mutate({version:o.version},{onSuccess:()=>t(ee.ME_CAREER)})},isLoading:r.isPending,children:e("history.restore")})]},o.id)})})]})}const Fq=2,Bq=4;function olt(){var d;const{t:e}=J("career"),t=St(),n=wue(),r=Yot(),[i,s]=b.useState([]),a=h=>{s(f=>f.find(p=>p.title===h.title)?f.filter(p=>p.title!==h.title):f.length>=Bq?f:[...f,h])},o=i.length>=Fq,c=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("compare.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("compare.subtitle",{min:Fq,max:Bq})})]}),[e]),u=b.useMemo(()=>l.jsx($i,{label:e("compare.back"),onClick:()=>t(ee.ME_CAREER)}),[e,t]);return On({left:c,actions:u}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{className:"rounded-xl border border-border bg-card p-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e("compare.pickRoles")}),n.isLoading&&l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e("loading")}),l.jsx("div",{className:"mt-3 grid gap-2 sm:grid-cols-2",children:(d=n.data)==null?void 0:d.map(h=>{const f=!!i.find(m=>m.title===h.title);return l.jsxs("label",{className:`flex cursor-pointer items-start gap-2 rounded-lg border px-3 py-2 transition-colors ${f?"border-primary bg-primary/10":"border-input hover:border-primary/50"}`,children:[l.jsx("input",{type:"checkbox",checked:f,onChange:()=>a({title:h.title,skills:h.skills}),className:"mt-1 h-4 w-4 accent-primary"}),l.jsx("span",{className:"text-sm text-foreground",children:h.title})]},h.title)})}),l.jsx("div",{className:"mt-4 flex justify-end",children:l.jsx(ce,{type:"button",variant:"primary",disabled:!o,isLoading:r.isPending,onClick:()=>r.mutate({roles:i}),children:r.isPending?e("compare.comparing"):e("compare.compareCta")})})]}),r.data&&r.data.rows.length>0&&l.jsx("section",{className:"overflow-x-auto rounded-xl border border-border bg-card",children:l.jsxs("table",{className:"min-w-full divide-y divide-border text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{className:"px-4 py-2 text-left font-semibold text-foreground",children:e("compare.aspectColumn")}),i.map(h=>l.jsx("th",{className:"px-4 py-2 text-left font-semibold text-foreground",children:h.title},h.title))]})}),l.jsx("tbody",{className:"divide-y divide-border",children:r.data.rows.map(h=>l.jsxs("tr",{children:[l.jsx("td",{className:"px-4 py-2 align-top text-foreground",children:h.aspect}),i.map(f=>l.jsx("td",{className:"px-4 py-2 align-top text-muted-foreground",children:h.values[f.title]??"â"},`${h.aspect}-${f.title}`))]},h.aspect))})]})})]})}const llt=60;function clt(e){if(!e||!Array.isArray(e.buckets)||e.buckets.length===0)return null;const t=e.buckets[e.buckets.length-1];return!t||typeof t.minutes!="number"||!Number.isFinite(t.minutes)?null:Math.max(0,t.minutes)}function ult(e){const t=clt(e);return t===null?null:Math.floor(t/llt)}function Cue({completedLcp:e,completedInterview:t,onStartLcp:n,onStartInterview:r,onDismiss:i}){const{t:s}=J("me");if(e&&t)return null;const a=s(t?"onboardingBanner.descriptionLcpOptional":"onboardingBanner.descriptionInterviewFirst");return l.jsxs("section",{role:"region","aria-label":s("onboardingBanner.ariaLabel"),className:"relative flex items-start justify-between gap-4 overflow-hidden rounded-xl border border-border bg-card p-5 shadow-soft",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:l.jsx(Fi,{className:"h-5 w-5 text-primary","aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"mb-1 text-section-title",children:s("onboardingBanner.title")}),l.jsx("p",{className:"mb-3 max-w-2xl text-sm text-muted-foreground",children:a}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[!t&&l.jsx(ce,{type:"button",variant:"gradient",size:"sm",onClick:r,leftIcon:l.jsx(Rn,{className:"h-4 w-4"}),children:s("onboardingBanner.startInterview")}),!e&&l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:n,leftIcon:l.jsx(Fi,{className:"h-4 w-4"}),children:s("onboardingBanner.startLcpOptional")})]})]})]}),l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:i,"aria-label":s("onboardingBanner.dismiss"),children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":"true"})})]})}function dlt({firstName:e,hoursThisWeek:t}){const{t:n}=J("courses"),r=e||n("hero.defaultName");return l.jsxs("section",{role:"region","aria-label":n("hero.ariaLabel"),className:"relative overflow-hidden rounded-2xl border border-border bg-card px-6 py-5",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsxs("div",{className:"relative",children:[l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-edition-pale px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-[0.16em] text-edition-deeper",children:[l.jsx(Rn,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),n("hero.eyebrow")]}),l.jsx("h2",{className:"mt-2.5 text-2xl font-light tracking-tight text-strong sm:text-[28px]",children:n("hero.headline",{name:r})}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n("hero.subtitle",{count:t??0})})]})]})}function hlt({hoursThisWeek:e,goalHours:t}){const{t:n}=J("courses"),r=e??0,i=t&&t>0?Math.min(100,Math.round(r/t*100)):0;return l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-[18px]",children:[l.jsxs("header",{className:"flex items-center gap-2",children:[l.jsx(ki,{className:"h-3.5 w-3.5 text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:n("widgets.weeklyGoal.label")})]}),l.jsxs("p",{className:"mt-2 text-2xl font-bold leading-none tracking-tight text-strong",children:[r,l.jsx("span",{className:"ml-1 text-sm font-normal text-muted-foreground",children:t?`/ ${t} ${n("widgets.weeklyGoal.unit")}`:n("widgets.weeklyGoal.unit")})]}),l.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-label":n("widgets.weeklyGoal.ariaLabel",{percent:i}),className:"mt-2.5 h-1.5 overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:"h-full rounded-full bg-brand-gradient transition-[width] duration-700",style:{width:`${i}%`}})}),l.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:n("widgets.weeklyGoal.hint")})]})}function flt(e,t){try{const n=new Date(`${e}T${t??"00:00"}:00`);if(Number.isNaN(n.getTime()))return e;const r=n.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});if(!t)return r;const i=n.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"});return`${r} · ${i}`}catch{return e}}function mlt({items:e,onScheduleSession:t,onItemClick:n,maxItems:r=3}){const{t:i}=J("courses"),s=e.slice(0,r);return l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-[18px]",children:[l.jsxs("header",{className:"flex items-center gap-2",children:[l.jsx(h4,{className:"h-3.5 w-3.5 text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:i("widgets.schedule.label")})]}),s.length===0?l.jsxs("div",{className:"mt-3 flex flex-col items-center gap-2 rounded-lg border border-dashed border-edition-soft p-4 text-center",children:[l.jsx(h4,{className:"h-6 w-6 text-edition-soft",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:i("widgets.schedule.empty")}),l.jsx("button",{type:"button",onClick:t,className:"ds-touch-target inl
1681ine-flex items-center text-xs font-medium text-primary hover:underline focus-visible:outline-none focus-visible:underline",children:i("widgets.schedule.scheduleSession")})]}):l.jsx("ul",{className:"mt-2 space-y-1",children:s.map(a=>{const o=a.locked===!0,c=!!n&&!o;return l.jsx("li",{children:l.jsxs("button",{type:"button",onClick:c?()=>n==null?void 0:n(a):void 0,disabled:!c,"aria-disabled":o||void 0,title:o?i("widgets.schedule.lockedTooltip"):void 0,className:["group flex w-full items-center justify-between gap-2 rounded-lg p-2 text-start transition-colors",o?"cursor-not-allowed bg-edition-pale/40":"hover:bg-cream disabled:cursor-default disabled:hover:bg-transparent"].join(" "),children:[l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:["block truncate text-xs font-medium",o?"text-muted-foreground":"text-foreground"].join(" "),children:a.title}),l.jsxs("span",{className:"mt-0.5 flex items-center gap-1 text-[11px] text-muted-foreground",children:[flt(a.date,a.time),o&&l.jsx("span",{className:"ms-1 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide",children:i("widgets.schedule.lockedBadge")})]})]}),o?l.jsx(Di,{className:"h-3.5 w-3.5 text-muted-foreground","aria-label":i("widgets.schedule.lockedAriaLabel")}):n&&l.jsx(ns,{className:"h-3.5 w-3.5 text-muted-foreground transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})},a.id)})})]})}function plt({onBrowseCatalog:e}){const{t}=J("courses");return l.jsxs("section",{role:"region","aria-label":t("widgets.exploreSkills.ariaLabel"),className:"relative overflow-hidden rounded-2xl border border-border bg-card p-[18px]",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-edition-pale text-edition-deeper",children:l.jsx(Bm,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h3",{className:"text-card-title",children:t("widgets.exploreSkills.title")})]}),l.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:t("widgets.exploreSkills.body")}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:e,rightIcon:l.jsx(gn,{className:"h-3.5 w-3.5"}),className:"mt-3 w-full",children:t("widgets.exploreSkills.cta")})]})}function glt({onGenerate:e}){const{t}=J("courses");return l.jsxs("section",{role:"region","aria-label":t("widgets.customCourse.ariaLabel"),className:"relative overflow-hidden rounded-2xl border border-border bg-card p-[18px]",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-edition-pale text-edition-deeper",children:l.jsx(Rn,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h3",{className:"text-card-title",children:t("widgets.customCourse.title")})]}),l.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:t("widgets.customCourse.body")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:e,className:"mt-3 w-full",children:t("widgets.customCourse.cta")})]})}function xlt({hoursThisWeek:e,goalHours:t,upcomingItems:n,onScheduleSession:r,onScheduleItemClick:i,onBrowseCatalog:s,onGenerateCustomCourse:a}){return l.jsxs("aside",{"aria-label":"My Courses sidebar",className:"flex w-full flex-col gap-4",children:[l.jsx(hlt,{hoursThisWeek:e,goalHours:t}),l.jsx(mlt,{items:n,onScheduleSession:r,onItemClick:i}),a?l.jsx(glt,{onGenerate:a}):null,l.jsx(plt,{onBrowseCatalog:s})]})}function ylt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.ME_COURSES_GENERATE,t),onSuccess:()=>{e.invalidateQueries({queryKey:_p})}})}const blt=["quick","standard","deep"],vlt=["Beginner","Intermediate","Advanced"],wlt=Ue({topic:Q().trim().min(3,"Please tell us what you want to learn.").max(200),purpose:Q().trim().min(3,"Tell us why this matters for you.").max(400),goal:Q().trim().min(3,"Describe what success looks like for you.").max(400),priorKnowledge:Q().trim().max(400).default(""),courseSize:na(blt),skillLevel:na(vlt),additionalContext:Q().trim().max(800).default("")});function kue({open:e,onOpenChange:t}){var v,g,y,w,S,C,k;const{t:n}=J("courses"),r=ylt(),i=St(),[s,a]=b.useState(null),o=b.useMemo(()=>({topic:"",purpose:"",goal:"",priorKnowledge:"",courseSize:"standard",skillLevel:"Beginner",additionalContext:""}),[]),{register:c,handleSubmit:u,control:d,reset:h,formState:{errors:f}}=pf({resolver:gf(wlt),defaultValues:o});b.useEffect(()=>{e&&(h(o),a(null))},[e,o,h]);const m=b.useMemo(()=>[{label:n("generateDialog.size.quick"),value:"quick"},{label:n("generateDialog.size.standard"),value:"standard"},{label:n("generateDialog.size.deep"),value:"deep"}],[n]),p=b.useMemo(()=>[{label:n("generateDialog.level.beginner"),value:"Beginner"},{label:n("generateDialog.level.intermediate"),value:"Intermediate"},{label:n("generateDialog.level.advanced"),value:"Advanced"}],[n]),x=u(_=>{a(null),r.mutate({topic:_.topic,purpose:_.purpose,goal:_.goal,priorKnowledge:_.priorKnowledge||void 0,courseSize:_.courseSize,skillLevel:_.skillLevel,additionalContext:_.additionalContext||null},{onSuccess:E=>{t(!1),Vt.success(n("generateDialog.created",{title:E.title})),i(Wa(E.courseId))},onError:E=>{a(MD(E)?u_(E):Slt(E)??n("generateDialog.errors.generic"))}})});return l.jsxs(_u,{open:e,onOpenChange:t,title:n("generateDialog.title"),description:n("generateDialog.subtitle"),onSubmit:x,isSubmitting:r.isPending,submitLabel:n("generateDialog.submit"),cancelLabel:n("generateDialog.cancel"),size:"lg",children:[s?l.jsxs("div",{role:"alert",className:"flex items-start gap-2.5 rounded-xl border border-clay/30 bg-clay/5 px-3.5 py-3 text-sm text-clay",children:[l.jsx(Uv,{className:"mt-0.5 h-4 w-4 flex-shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{children:s})]}
1681):null,l.jsx(dr,{label:n("generateDialog.fields.topic.label"),htmlFor:"cc-topic",hint:n("generateDialog.fields.topic.helper"),error:(v=f.topic)==null?void 0:v.message,required:!0,children:l.jsx(fn,{id:"cc-topic",...c("topic"),placeholder:n("generateDialog.fields.topic.placeholder"),maxLength:200})}),l.jsx(dr,{label:n("generateDialog.fields.purpose.label"),htmlFor:"cc-purpose",hint:n("generateDialog.fields.purpose.helper"),error:(g=f.purpose)==null?void 0:g.message,required:!0,children:l.jsx(Io,{id:"cc-purpose",...c("purpose"),rows:2,placeholder:n("generateDialog.fields.purpose.placeholder"),maxLength:400})}),l.jsx(dr,{label:n("generateDialog.fields.goal.label"),htmlFor:"cc-goal",hint:n("generateDialog.fields.goal.helper"),error:(y=f.goal)==null?void 0:y.message,required:!0,children:l.jsx(Io,{id:"cc-goal",...c("goal"),rows:2,placeholder:n("generateDialog.fields.goal.placeholder"),maxLength:400})}),l.jsx(dr,{label:n("generateDialog.fields.priorKnowledge.label"),htmlFor:"cc-prior",hint:n("generateDialog.fields.priorKnowledge.helper"),error:(w=f.priorKnowledge)==null?void 0:w.message,children:l.jsx(Io,{id:"cc-prior",...c("priorKnowledge"),rows:2,placeholder:n("generateDialog.fields.priorKnowledge.placeholder"),maxLength:400})}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[l.jsx(dr,{label:n("generateDialog.fields.courseSize.label"),htmlFor:"cc-size",hint:n("generateDialog.fields.courseSize.helper"),hintPlacement:"below",error:(S=f.courseSize)==null?void 0:S.message,required:!0,children:l.jsx(S7,{control:d,name:"courseSize",render:({field:_})=>l.jsx(Ho,{options:m,value:_.value,onChange:_.onChange,ariaLabel:n("generateDialog.fields.courseSize.label")})})}),l.jsx(dr,{label:n("generateDialog.fields.skillLevel.label"),htmlFor:"cc-level",hint:n("generateDialog.fields.skillLevel.helper"),hintPlacement:"below",error:(C=f.skillLevel)==null?void 0:C.message,required:!0,children:l.jsx(S7,{control:d,name:"skillLevel",render:({field:_})=>l.jsx(Ho,{options:p,value:_.value,onChange:_.onChange,ariaLabel:n("generateDialog.fields.skillLevel.label")})})})]}),l.jsx(dr,{label:n("generateDialog.fields.additionalContext.label"),htmlFor:"cc-extra",hint:n("generateDialog.fields.additionalContext.helper"),error:(k=f.additionalContext)==null?void 0:k.message,children:l.jsx(Io,{id:"cc-extra",...c("additionalContext"),rows:3,placeholder:n("generateDialog.fields.additionalContext.placeholder"),maxLength:800})}),l.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-edition-soft bg-edition-pale px-3.5 py-3",children:[l.jsx("span",{className:"flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-[9px] bg-card text-edition-deeper",children:l.jsx(Rn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("p",{className:"text-xs leading-relaxed text-body-ink",children:n("generateDialog.disclaimer")})]})]})}function Slt(e){var t;if(MD(e)){const n=(t=e.response)==null?void 0:t.data;if(n&&typeof n.message=="string"&&n.message.length>0)return n.message}return e instanceof Error&&e.message?e.message:null}function Clt(){const e=new Date,t=new Date(e);return t.setDate(t.getDate()+7),{from:e.toISOString().slice(0,10),to:t.toISOString().slice(0,10)}}function klt(){var S,C,k,_;const{t:e}=J("courses"),t=St(),n=Ps(),r=oce(),i=cue("weekly"),s=bf(),a=Clt(),o=o_(a),[c,u]=b.useState(!1),[d,h]=b.useState(!1),f=((S=n.data)==null?void 0:S.completedFirstLCP)??!1,m=!!((C=s.data)!=null&&C.profile&&s.data.completedAt),p=ult(i.data),x=(k=r.data)!=null&&k.weeklyGoalMinutes?Math.round(r.data.weeklyGoalMinutes/60):null,v=b.useMemo(()=>{var j;const E=((j=o.data)==null?void 0:j.agenda)??[],A=new Date;return E.filter(D=>new Date(`${D.date}T${D.time??"00:00"}`)>=A).slice(0,3).map((D,M)=>({id:`${D.date}-${D.time??""}-${M}`,title:D.title,date:D.date,time:D.time,route:D.route,locked:D.locked}))},[o.data]),g=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("list.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("list.subtitle")})]}),[e]);On({left:g});const y=!m,w=b.useMemo(()=>[{id:"active",label:e("tabs.active"),path:ee.ME_COURSES_ACTIVE},{id:"completed",label:e("tabs.completed"),path:ee.ME_COURSES_COMPLETED}
1681,{id:"archived",label:e("tabs.archived"),path:ee.ME_COURSES_ARCHIVED},{id:"custom",label:e("tabs.custom"),path:ee.ME_COURSES_CUSTOM}],[e]);return l.jsxs("div",{className:"space-y-6",children:[l.jsx(dlt,{firstName:(_=n.data)==null?void 0:_.firstName,hoursThisWeek:p}),!c&&l.jsx(Cue,{completedLcp:f,completedInterview:m,onStartLcp:()=>t(ee.ME_LEARNING_PROFILE),onStartInterview:()=>t(ee.ME_INTERVIEW),onDismiss:()=>u(!0)}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx(Wte,{tabs:w,ariaLabel:e("tabs.ariaLabel")}),!y&&l.jsx(ce,{type:"button",variant:"primary",size:"sm",leftIcon:l.jsx(Gv,{className:"h-4 w-4","aria-hidden":"true"}),onClick:()=>h(!0),children:e("widgets.customCourse.cta")})]}),l.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row",children:[l.jsx("div",{className:"min-w-0 flex-1 space-y-4",children:l.jsx($v,{})}),l.jsx("div",{className:"w-full lg:w-80 lg:flex-shrink-0",children:l.jsx(xlt,{hoursThisWeek:p,goalHours:x,upcomingItems:v,onScheduleSession:()=>t(ee.ME_CALENDAR),onScheduleItemClick:E=>E.route&&t(E.route),onBrowseCatalog:()=>t(ee.ME_MARKETPLACE),onGenerateCustomCourse:y?void 0:()=>h(!0)})})]}),l.jsx(kue,{open:d,onOpenChange:h})]})}const zq=[{banner:"from-edition-deeper to-edition-primary",progress:"bg-edition-primary"},{banner:"from-[#8F4327] to-clay",progress:"bg-clay"},{banner:"from-[#3C6B50] to-sage",progress:"bg-sage"},{banner:"from-[#3F5C78] to-slate-info",progress:"bg-slate-info"}];function _ue({course:e,index:t=0,isLocked:n,onOpen:r,onUnlock:i,onCompleteProfile:s,profileSuggestion:a}){const{t:o}=J("courses"),c=Math.round(e.progress.percentComplete),u=c>0&&c<100,d=c>=100,h=!n&&e.status==="LOCKED",f=h&&sL(e),m=e.customName??e.name,p=h?o("paywall.unlockCta",{price:e.price.toFixed(2)}):null,x=f?o("list.startFree"):h?p:o(d?"list.review":u?"list.continue":"list.start"),v=f?Ph:h?Di:u||d?Ph:gn,g=zq[oL(e.courseId)%zq.length],y=d?"bg-sage":g.progress,w=()=>{n||r(e)},S=()=>{if(!n){if(h&&!f&&i){i(e);return}r(e)}};return l.jsxs("div",{onClick:w,className:["group relative flex h-full min-w-[280px] flex-col overflow-hidden rounded-2xl border border-border bg-card text-left transition duration-200",n?"cursor-default":"cursor-pointer hover:-translate-y-0.5 hover:border-edition-soft"].join(" "),children:[l.jsxs("div",{className:`relative h-[104px] overflow-hidden bg-gradient-to-br ${g.banner}`,children:[h?l.jsxs("span",{className:"absolute left-3.5 top-3 inline-flex items-center gap-1 rounded-full border border-white/25 bg-white/[0.18] px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.1em] text-on-dark",children:[l.jsx(Di,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),o("paywall.statusLocked")]}):l.jsx("span",{className:"absolute left-3.5 top-3 inline-flex items-center rounded-full border border-white/25 bg-white/[0.18] px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.1em] text-on-dark",children:e.level}),l.jsx(of,{className:"absolute -bottom-3.5 -right-2 h-20 w-20 text-white/20",strokeWidth:1.5,"aria-hidden":"true"})]}),n&&l.jsxs("div",{role:"group","aria-labelledby":`lcp-lock-${e.enrollmentId}`,"data-testid":"lcp-lock",className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-card/90 px-6 text-center backdrop-blur-[2px]",children:[l.jsx(Di,{className:"h-6 w-6 text-muted-foreground",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{id:`lcp-lock-${e.enrollmentId}`,className:"max-w-[220px] text-sm font-medium leading-snug text-strong",children:o("lcpLock.message")}),s&&l.jsxs("button",{type:"button","aria-label":o("lcpLock.ctaAria",{title:m}),onClick:C=>{C.stopPropagation(),s()},className:"inline-flex items-center gap-1.5 rounded-full bg-primary px-4 py-2 text-[12.5px] font-medium text-on-dark transition hover:brightness-[1.06] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[o("lcpLock.cta"),l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})]})]}),l.jsxs("div",{className:"relative z-[5] flex flex-1 flex-col gap-3 p-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[h?l.
1681jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-clay/10 px-2 py-0.5 text-[11px] font-semibold text-clay",children:[l.jsx(Di,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),o("paywall.statusLocked")]}):u?l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-edition-pale px-2 py-0.5 text-[11px] font-semibold text-edition-deeper",children:[l.jsx(ki,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),o("list.statusInProgress")]}):d?l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-sage/10 px-2 py-0.5 text-[11px] font-semibold text-sage",children:[l.jsx(jl,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),o("list.statusCompleted")]}):l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-[11px] font-semibold text-muted-foreground",children:[l.jsx(Ci,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),o("list.statusNotStarted",{defaultValue:"Not started"})]}),(e.curriculumStatus==="QUEUED"||e.curriculumStatus==="GENERATING")&&l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:[l.jsx(Rn,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),e.personal?o("list.beingWritten"):o("list.preparing")]})]}),l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("h3",{className:"line-clamp-2 text-card-title leading-snug",children:m}),l.jsx("p",{className:"mt-1 line-clamp-2 text-sm leading-relaxed text-muted-foreground",children:e.description})]}),a&&!n&&l.jsx(l_,{variant:"inline",scope:"course",onStart:a.onStart,onDismiss:a.onDismiss}),(u||d)&&l.jsx("div",{className:"space-y-1.5",children:l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c,"aria-label":o("list.progressAriaLabel",{title:m,percent:c}),className:"h-1.5 flex-1 overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${y}`,style:{width:`${Math.max(c,5)}%`}})}),l.jsxs("span",{className:"text-[11px] font-semibold text-muted-foreground",children:[c,"%"]})]})}),l.jsxs("div",{className:"flex items-center justify-between gap-2.5",children:[l.jsxs("button",{type:"button",disabled:n,onClick:C=>{C.stopPropagation(),S()},className:["inline-flex items-center gap-1.5 rounded-full px-4 py-2 text-[12.5px] font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-default",u?"bg-primary text-on-dark hover:brightness-[1.06]":"border border-border bg-cream text-primary hover:border-edition-soft hover:bg-edition-pale"].join(" "),children:[l.jsx(v,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),x]}),l.jsx("button",{type:"button",disabled:n,"aria-label":o("list.viewDetails"),onClick:C=>{C.stopPropagation(),w()},className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground transition hover:border-edition-soft hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-default",children:l.jsx(jxe,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})})]})]})]})}function _lt({titleOverride:e,bodyOverride:t,ctaLabelOverride:n,hideCta:r,onBrowseMarketplace:i}){const{t:s}=J("courses");return l.jsxs("section",{className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-dashed border-edition-soft bg-card p-12 text-center",children:[l.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-edition-pale text-edition-deeper",children:l.jsx(Ci,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h2",{className:"text-section-title",children:e??s("empty.title")}),l.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:t??s("empty.body")}),!r&&l.jsx(ce,{type:"button",variant:"primary",size:"md",onClick:i,className:"mt-2",children:n??s("empty.browseCta")})]})}function Tue(){return At({queryKey:["checkout","square-config"],queryFn:()=>_e.get(he.CHECKOUT_SQUARE_CONFIG),staleTime:5*60*1e3})}function Eue(){return At({queryKey:["checkout","provider"],queryFn:()=>_e.get(he.CHECKOUT_PROVIDER),staleTime:5*60*1e3})}function Tlt(){return rt({mutationFn:e=>_e.post(he.CHECKOUT_STRIPE,e)})}function jue(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CHECKOUT_CLAIM,t),onSuccess:()=>
1681{e.invalidateQueries({queryKey:["me","courses"]}),e.invalidateQueries({queryKey:["marketplace"]}),e.invalidateQueries({queryKey:["me","orders"]})}})}function Elt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.CHECKOUT_SQUARE,t),onSuccess:t=>{t.status==="COMPLETED"&&(e.invalidateQueries({queryKey:["me","courses"]}),e.invalidateQueries({queryKey:["marketplace"]}),e.invalidateQueries({queryKey:["me","orders"]}))}})}const $q={sandbox:"https://sandbox.web.squarecdn.com/v1/square.js",production:"https://web.squarecdn.com/v1/square.js"};function jlt(e){return new Promise((t,n)=>{if(typeof window>"u"){n(new Error("No window available"));return}if(window.Square){t();return}const r=e==="production"?$q.production:$q.sandbox,i=document.querySelector(`script[src="${r}"]`);if(i){i.addEventListener("load",()=>t()),i.addEventListener("error",()=>n(new Error("Square SDK failed to load")));return}const s=document.createElement("script");s.src=r,s.async=!0,s.onload=()=>t(),s.onerror=()=>n(new Error("Square SDK failed to load")),document.head.appendChild(s)})}function Nlt({open:e,items:t,amountCents:n,onClose:r,onSuccess:i}){var w,S;const{t:s}=J("checkout"),a=Tue(),o=Elt(),c=b.useRef(null),u=b.useRef(null),[d,h]=b.useState(null),[f,m]=b.useState(!1),[p,x]=b.useState(!1),v=!!((w=a.data)!=null&&w.applicationId&&((S=a.data)!=null&&S.locationId));if(b.useEffect(()=>{if(!e||!a.data||!v)return;let C=!1,k=null;return(async()=>{try{if(await jlt(a.data.environment),C||!window.Square||!c.current)return;const E=await window.Square.payments(a.data.applicationId,a.data.locationId).card();if(await E.attach(c.current),C){await E.destroy();return}u.current=E,k=()=>{E.destroy().catch(()=>{}),u.current=null}}catch(_){C||(h(_.message),m(!0))}})(),()=>{C=!0,k==null||k()}},[e,a.data,v]),b.useEffect(()=>{if(!e)return;const C=k=>{k.key==="Escape"&&!p&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[e,p,r]),!e)return null;const g=async()=>{if(h(null),!u.current){h(s("square.notReady"));return}x(!0);try{const C=await u.current.tokenize();if(C.status!=="OK"||!C.token){h(s("square.tokenizeFailed"));return}const k=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,_=await o.mutateAsync({sourceId:C.token,idempotencyKey:k,items:t});_.status==="COMPLETED"?i(_.orderId):h(s("square.failed"))}catch(C){h(u_(C))}finally{x(!1)}},y=(n/100).toFixed(2);return a.data&&!v?l.jsx(Uq,{label:s("square.title"),onScrimClose:()=>r(),children:l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(C6,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsx("h3",{className:"text-card-title",children:s("square.title")})]}),l.jsx("button",{type:"button",onClick:r,"aria-label":s("square.close"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75})})]}),l.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:s("square.notConfigured")}),l.jsx("div",{className:"mt-6 flex justify-end",children:l.jsx("button",{type:"button",onClick:r,className:"rounded-lg border border-border bg-card px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted",children:s("square.close")})})]})}):l.jsxs(Uq,{label:s("square.title"),onScrimClose:()=>{p||r()},children:[l.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-border px-6 pb-5 pt-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(C6,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-card-title",children:s("square.title")}),l.jsxs("span",{className:"mt-0.5 inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[l.jsx(jh,{className:"h-3.5 w-3.5 text-sage",strokeWidth:1.75}),s("square.poweredBy")]})]})]}),l.jsx("button",{type:"button",onClick:()=>{p||r()},disabled:p,"aria-label":s("square.cancel"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-50",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75})})]}),l.jsxs("div",{className:"px-6 py-5",children:[l.jsxs("div",{className:"flex items-center justify-between rounded-xl bg-edition-pale px-4 py-3",children:[l.jsx("span",{className:"text-sm font-medium text-edition-deeper",children:s("square.title")}),l.jsx("span",{className:"text-lg font-bold text-edition-deeper",children:s("square.amount",{amount:y})})]}),l.jsxs("div",{className:"mt-4",children:[l.jsx("label",{className:"mb-1.5 block text-sm font-medium text-strong",children:s("square.title")}),l.jsx("div",{ref:c,className:"min-h-[44px] rounded-lg border border-input bg-card px-3 py-2.5 transition-[border-color] focus-within:border-ring"})]}),!a.data&&l.jsxs("p",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx("span",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-edition-soft border-t-primary"}),s("square.loading")]}),d&&l.jsx("p",{role:"alert",className:"mt-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:d}),l.jsxs("div",{className:"mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[l.jsx("button",{type:"button",onClick:r,disabled:p,className:"rounded-lg border border-border bg-card px-4 py-2.5 text-sm font-medium text-foreground transition-colors hover:bg-muted disabled:opacity-50",children:s("square.cancel")}),l.jsx("button",{type:"button",onClick:()=>void g(),disabled:p||!a.data||f,className:"inline-flex items-center justify-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90 active:bg-primary/95 disabled:opacity-60",children:p?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary-foreground
1681/40 border-t-primary-foreground"}),s("square.processing")]}):l.jsxs(l.Fragment,{children:[l.jsx(Di,{className:"h-4 w-4",strokeWidth:1.75}),s("square.pay")]})})]})]})]})}function Uq({label:e,onScrimClose:t,children:n}){return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(20,22,27,0.42)] px-4 py-6",role:"presentation",onClick:t,children:l.jsx("div",{role:"dialog","aria-modal":"true","aria-label":e,onClick:r=>r.stopPropagation(),className:"w-full max-w-md overflow-hidden rounded-2xl border border-border bg-card shadow-overlay",children:n})})}const Alt="disabled",Mlt="mask-all",Rlt=2;function Olt(){return{schemaVersion:Rlt,collectionMode:Alt,replayMaskingMode:Mlt,clarityProjectsByTenant:{},clarityProjectId:null}}function Dlt(){return Olt()}function Llt(e=Dlt()){return e.collectionMode==="enabled"}const Vq="ple.analytics.sessionId",Plt={tenantId:null,tenantName:null,tier:null,userId:null,userRole:null};let Ilt={...Plt};function Flt(){try{const e=sessionStorage.getItem(Vq);if(e)return e;const t=`${Date.now()}-${Math.random().toString(36).slice(2,10)}`;return sessionStorage.setItem(Vq,t),t}catch{return`${Date.now()}-ephemeral`}}function Blt(){return{...Ilt}}const zlt=1,$lt=/^[a-z0-9][a-z0-9_.:-]{0,63}$/,Ult=[/(?:^|[^0-9])(?:19|20)\d{2}([-/._])(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|[12]\d|3[01])(?:t\d{1,2}:\d{2}(?::\d{2})?z?)?(?![0-9])/,/(?:^|[^0-9])(?:0?[1-9]|[12]\d|3[01])([-/.])(?:0?[1-9]|[12]\d|3[01])\1(?:19|20)\d{2}(?![0-9])/,/(?:^|[^0-9])(?:0?[1-9]|[12]\d|3[01])([-/._])(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\1(?:\d{2}|(?:19|20)\d{2})(?![0-9])/,/(?:^|[^a-z0-9])(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)([-/._])(?:0?[1-9]|[12]\d|3[01])\1(?:\d{2}|(?:19|20)\d{2})(?![0-9])/,/(?:^|[^0-9])(?:19|20)\d{2}([-/._])(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\1(?:0?[1-9]|[12]\d|3[01])(?![0-9])/,/^(?:0?[1-9]|[12]\d|3[01])([-/])(?:0?[1-9]|[12]\d|3[01])\1\d{2}$/];function Vlt(e){return typeof e!="string"?!1:Ult.some(t=>t.test(e))}const Nue=/^[a-z][A-Za-z0-9_]{0,39}$/,Hlt=/^[a-z0-9]+(?:[-_][a-z0-9]+)*(?:\.[a-z0-9]+(?:[-_][a-z0-9]+)*)*$/;function qlt(e){return typeof e=="number"?Number.isFinite(e):typeof e=="boolean"?!0:typeof e=="string"?$lt.test(e)&&!Vlt(e):!1}function Glt(e){const t={};let n=0;if(!e||typeof e!="object")return{attributes:t,dropped:n};for(const r of Object.keys(e)){if(!Nue.test(r)){n+=1;continue}const i=e[r];if(!qlt(i)){n+=1;continue}t[r]=i}return{attributes:t,dropped:n}}function Wlt(e){const t={};let n=0;if(!e||typeof e!="object")return{measures:t,dropped:n};for(const r of Object.keys(e)){const i=e[r];if(!Nue.test(r)||typeof i!="number"||!Number.isFinite(i)){n+=1;continue}t[r]=i}return{measures:t,dropped:n}}function Hq(e){if(typeof e!="string")return"unknown";const t=e.trim().toLowerCase();return Hlt.test(t)?t:"unknown"}function Ylt(e,t,n=()=>new Date){const r=Glt(t.attributes),i=Wlt(t.measures),s=r.dropped+i.dropped,a={...i.measures};return s>0&&(a.droppedAttributes=s),{schemaVersion:zlt,product:e.product,edition:e.edition,surface:Hq(t.surface),action:Hq(t.action),tenantId:e.identity.tenantId,tenantName:e.identity.tenantName,tier:e.identity.tier,userId:e.identity.userId,userRole:e.identity.userRole,sessionId:e.sessionId,occurredAt:n().toISOString(),environment:e.environment,appVersion:e.appVersion,measures:a,attributes:r.attributes}}const Klt={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_BASE_URL:"/api/v1",VITE_BRAND:"ciai"},Xlt="arthur",Qlt="ple",Zlt=[];function Jlt(){var e;try{const t=((e=globalThis.location)==null?void 0:e.hostname)??"";return t==="ple.arthurgrid.ai"?"production":t==="localhost"||t==="127.0.0.1"?"development":"preview"}catch{return"development"}}function ect(){try{const e=Klt;return(e==null?void 0:e.VITE_APP_VERSION)??null}catch{return null}}function tct(){return{product:Xlt,edition:Qlt,environment:Jlt(),appVersion:ect(),sessionId:Flt(),identity:Blt()}}function Aue(e){try{if(!Llt())return;const t=Ylt(tct(),e);for(const n of Zlt)try{n.send(t)}catch{}}catch{}}function nct(e){const t=e.filter(n=>n.packId).length;return t===0?"course":t===e.length?"pack":"mixed"}function rct(e){at.key==="arthur"&&Aue({surface:"checkout",action:"started",attributes:{provider:e.provider,itemType:nct(e.items)},measures:{itemCount:e.items.length,amountCents:Math.max(0,Math.round(e.amountCents))}})}function ict(e){at.key==="arthur"&&Aue({surface:"checkout",action:"completed",attributes:{provider:e.provider,itemType:e.itemType},measures:{amountCents:Math.max(0,Math.round(e.amountCents))}})}function Rw(e){var r;const n=((r=Eue().data)==null?void 0:r.provider)==="stripe";return b.useEffect(()=>
1681{e.open&&rct({provider:n?"stripe":"square",items:e.items,amountCents:e.amountCents})},[e.open]),n?l.jsx(act,{...e}):l.jsx(Nlt,{...e})}function sct(e){var r;const t=e,n=(r=t==null?void 0:t.response)==null?void 0:r.data;return(n==null?void 0:n.error)==="stripe_not_configured"?"not_configured":u_(e)}function act({open:e,items:t,onClose:n,onSuccess:r}){const{t:i}=J("checkout"),s=Tlt(),[a,o]=b.useState(null),c=b.useRef(!1);if(b.useEffect(()=>{if(!e){c.current=!1,o(null);return}if(c.current)return;c.current=!0,o(null);const d=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`;s.mutate({items:t,idempotencyKey:d},{onSuccess:h=>{if(h.checkoutUrl){window.location.assign(h.checkoutUrl);return}if(h.status==="COMPLETED"){r(h.orderId);return}o(i("stripe.failed"))},onError:h=>{const f=sct(h);o(f==="not_configured"?i("stripe.notConfigured"):f??i("stripe.failed"))}})},[e]),!e)return null;const u=!!a;return l.jsx(oct,{label:i("stripe.title"),onScrimClose:()=>{u&&n()},children:l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(C6,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-card-title",children:i("stripe.title")}),l.jsxs("span",{className:"mt-0.5 inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[l.jsx(jh,{className:"h-3.5 w-3.5 text-sage",strokeWidth:1.75}),i("stripe.poweredBy")]})]})]}),u&&l.jsx("button",{type:"button",onClick:n,"aria-label":i("stripe.close"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75})})]}),u?l.jsxs(l.Fragment,{children:[l.jsx("p",{role:"alert",className:"mt-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:a}),l.jsx("div",{className:"mt-6 flex justify-end",children:l.jsx("button",{type:"button",onClick:n,className:"rounded-lg border border-border bg-card px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted",children:i("stripe.close")})})]}):l.jsxs("div",{className:"mt-6 flex flex-col items-center gap-3 py-4 text-center",children:[l.jsx(Qo,{className:"h-7 w-7 animate-spin text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-medium text-strong",children:i("stripe.redirecting")}),l.jsx("p",{className:"max-w-xs text-sm text-muted-foreground",children:i("stripe.redirectingBody")})]})]})})}function oct({label:e,onScrimClose:t,children:n}){return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(20,22,27,0.42)] px-4 py-6",role:"presentation",onClick:t,...ZD,children:l.jsx("div",{role:"dialog","aria-modal":"true","aria-label":e,onClick:r=>r.stopPropagation(),className:"w-full max-w-md overflow-hidden rounded-2xl border border-border bg-card shadow-overlay",children:n})})}function d_({status:e,emptyTitle:t,emptyBody:n,renderRowActions:r}){var v;const{t:i}=J("courses"),s=St(),a=gs(e),o=Ps(),[c,u]=b.useState(null),d=a.data??[],h=((v=o.data)==null?void 0:v.completedFirstLCP)??!1,f=e==="active"&&!h&&jw(),m=c_(),p=e==="active"&&m.show?{onStart:()=>s(ee.ME_LEARNING_PROFILE),onDismiss:m.dismiss}:void 0,x=g=>{s(aL(g))};return a.isLoading?l.jsx("ul",{"aria-busy":"true","aria-label":i("loading"),className:"grid gap-[18px] [grid-template-columns:repeat(auto-fill,minmax(280px,1fr))]",children:Array.from({length:4}).map((g,y)=>l.jsxs("li",{className:"flex h-[300px] animate-pulse flex-col overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsx("div",{className:"h-[104px] bg-edition-pale"}),l.jsxs("div",{className:"flex flex-1 flex-col gap-3 p-4",children:[l.jsx("div",{className:"h-4 w-20 rounded-full bg-muted"}),l.jsx("div",{className:"h-4 w-3/4 rounded bg-muted"}),l.jsx("div",{className:"h-3 w-full rounded bg-muted"}),l.jsx("div",{className:"mt-auto h-1.5 w-full rounded-full bg-edition-pale"}),l.jsx("div",{className:"h-8 w-28 rounded-full bg-muted"})]})]},y))}):d.length===0?l.jsx(_lt,{titleOverride:t,bodyOverride:n,onBrowseMarketplace:()=>s(ee.ME_MARKETPLACE)}):l.jsxs(l.Fragment,{children:[l.jsx("ul",{className:"grid gap-[18px] [grid-template-columns:repeat(auto-fill,minmax(280px,1fr))]",children:d.map((g,y)=>l.jsxs("li",{className:"flex flex-col gap-2",children:[l.jsx(_ue,{course:g,index:y,isLocked:f,onCompleteProfile:()=>s(ee.ME_LEARNING_PROFILE),profileSuggestion:p,onOpen:x,onUnlock:w=>u(w)}),r?l.jsx("div",{className:"flex justify-end",children:r(g)}):null]},g.enrollmentId))}),l.jsx(Rw,{open:!!c,items:c?[{courseId:c.courseId}]:[],amountCents:c?Math.round(c.price*100):0,onClose:()=>u(null),onSuccess:()=>{const g=c;u(null),g&&s(ts(g.courseId,1,1,1))}})]})}function lct(){const{t:e}=J("courses"),t=QD(),n=Dnt();return l.jsx(d_,{status:"active",emptyTitle:e("empty.active.title"),emptyBody:e("empty.active.body"),renderRowActions:r=>{var i,s;return l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(ce,{variant:"ghost",size:"sm",leftIcon:l.jsx(OM,{className:"h-4 w-4","aria-hidden":"true"}),isLoading:t.isPending&&((i=t.variables)==null?void 0:i.courseId)===r.courseId,onClick:()=>{t.mutate({courseId:r.courseId},{onError:()=>{Vt.error(e("actions.archiveError"))}})},children:e("actions.archive")}),l.jsx(ce,{variant:"ghost",size:"sm",leftIcon:l.jsx(TQ,{className:"h-4 w-4","aria-hidden":"true"}),isLoading:n.isPending&&((s=n.variables)==null?void 0:s.courseId)===r.courseId,onClick:()=>{window.confirm(e("actions.unenrolConfirm"))&&n.mutate({courseId:r.courseId},{onError:()=>{Vt.error(e("actions.unenrolError"))}})},children:e("actions.unenrol")})]})}})}function cct(){const{t:e}=J("courses"),t=QD();
1681return l.jsx(d_,{status:"completed",emptyTitle:e("empty.completed.title"),emptyBody:e("empty.completed.body"),renderRowActions:n=>{var r;return l.jsx(ce,{variant:"ghost",size:"sm",leftIcon:l.jsx(OM,{className:"h-4 w-4","aria-hidden":"true"}),isLoading:t.isPending&&((r=t.variables)==null?void 0:r.courseId)===n.courseId,onClick:()=>{t.mutate({courseId:n.courseId},{onError:()=>{Vt.error(e("actions.archiveError"))}})},children:e("actions.archive")})}})}function uct(){const{t:e}=J("courses"),t=Lnt();return l.jsx(d_,{status:"archived",emptyTitle:e("empty.archived.title"),emptyBody:e("empty.archived.body"),renderRowActions:n=>{var r;return l.jsx(ce,{variant:"ghost",size:"sm",leftIcon:l.jsx(bxe,{className:"h-4 w-4","aria-hidden":"true"}),isLoading:t.isPending&&((r=t.variables)==null?void 0:r.courseId)===n.courseId,onClick:()=>{t.mutate({courseId:n.courseId},{onError:()=>{Vt.error(e("actions.unarchiveError"))}})},children:e("actions.unarchive")})}})}function dct(){const{t:e}=J("courses"),t=QD();return l.jsx(d_,{status:"custom",emptyTitle:e("empty.custom.title"),emptyBody:e("empty.custom.body"),renderRowActions:n=>{var r;return l.jsx(ce,{variant:"ghost",size:"sm",leftIcon:l.jsx(OM,{className:"h-4 w-4","aria-hidden":"true"}),isLoading:t.isPending&&((r=t.variables)==null?void 0:r.courseId)===n.courseId,onClick:()=>{t.mutate({courseId:n.courseId},{onError:()=>{Vt.error(e("actions.archiveError"))}})},children:e("actions.archive")})}})}const hct=1,Mue=80,fct=Ue({customName:Q().transform(e=>e.trim()).refine(e=>e.length===0||e.length>=hct,{message:"rename.errors.tooShort"}).refine(e=>e.length<=Mue,{message:"rename.errors.tooLong"})});function mct({open:e,onOpenChange:t,currentName:n,hasCustomName:r,isSubmitting:i,onSubmit:s}){var f;const{t:a}=J("courses"),o=pf({resolver:gf(fct),defaultValues:{customName:r?n:""}});b.useEffect(()=>{e&&o.reset({customName:r?n:""})},[e,n,r,o]);const c=o.handleSubmit(m=>{const p=m.customName.trim();s(p.length===0?null:p)}),u=(f=o.formState.errors.customName)==null?void 0:f.message,d=u?a(u):void 0,h=d?"rename-course-error":"rename-course-hint";return l.jsxs(_u,{open:e,onOpenChange:t,title:a("rename.title"),description:a("rename.description"),onSubmit:c,isSubmitting:i,submitLabel:a("rename.save"),cancelLabel:a("rename.cancel"),size:"sm",children:[l.jsx("label",{htmlFor:"rename-course-input",className:"block text-sm font-medium text-foreground",children:a("rename.label")}),l.jsx(fn,{id:"rename-course-input",autoFocus:!0,maxLength:Mue,placeholder:n,"aria-describedby":h,"aria-invalid":!!d||void 0,error:!!d,...o.register("customName")}),d?l.jsx("p",{id:"rename-course-error",role:"alert",className:"text-xs text-destructive",children:d}):l.jsx("p",{id:"rename-course-hint",className:"text-xs text-muted-foreground",children:a("rename.hint")})]})}function pct(e){const t=[];for(const n of e.weeks)for(const r of n.days)r.lessons.forEach((i,s)=>{t.push({week:n.weekNumber,day:r.dayNumber,lesson:s+1,node:i})});return t}function gct(e){return e.days.reduce((t,n)=>t+n.lessons.length,0)}function xct(){var I,q;const{t:e}=J("courses"),{courseId:t}=Ec(),n=St(),r=Ice(t);Ps();const i=jw(),s=c_(),[a,o]=b.useState(1),[c,u]=b.useState(!1),d=Pnt(),[h,f]=b.useState(null),m=r.data?r.data.customName??r.data.name:void 0,p=(I=r.data)==null?void 0:I.level,x=(q=r.data)!=null&&q.personal?e("detail.builtForYou"):null,v=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:p?x?`${p} · ${x}`:p:e("detail.headerEyebrow")}),l.jsx("h1",{className:"mt-1 line-clamp-2 break-words text-xl font-semibold text-foreground sm:text-2xl",children:m??e("detail.headerLoadingTitle")})]}),[e,m,p,x]),g=b.useMemo(()=>l.jsx($i,{label:e("detail.backToList"),onClick:()=>n(ee.ME_COURSES)}),[e,n]);if(On({left:v,actions:g}),r.isLoading)return l.jsx("p",{className:"py-12 text-center text-muted-foreground",children:e("detail.loading")});if(r.isError||!r.data)return l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h1",{className:"text-section-title",children:e("detail.notFound")}),l.jsx("button",{type:"button",onClick:()=>n(ee.ME_COURSES),className:"mt-3 text-sm font-medium text-primary hover:underline",children:e("detail.backToList")})]});const y=r.data,w=y.curriculum,S=w?pct(w):[],C=(R,xe,me)=>!!y.completedLessonMap[`${R}_${xe}_${me}`],k=iL(y),_=R=>{if(k)return R===0&&!!y.personal;if(R===0)return!0;const xe=S[R-1];return C(xe.week,xe.day,xe.lesson)},E={week:y.progress.currentWeek,day:y.progress.currentDay,lesson:y.progress.currentLesson},A=(R,xe,me)=>E.week===R&&E.day===xe&&E.lesson===me,j=y.customName??y.name,D=y.customName!==null&&y.customName!==void 0,M=Math.round(y.progress.percentComplete),$=sL(y),B=$?e("detail.startFree"):k?e("detail.unlockCourse",{price:y.price.toFixed(2)}):M>0?e("detail.continue"):e("detail.start"),z=k?y.pack??null:null,O=R=>{d.mutate({courseId:y.courseId,customName:R},{onSuccess:()=>{u(!1),Vt.success(e(R===null?"rename.toasts.cleared":"rename.toasts.saved"))},onError:()=>{Vt.error(e("rename.toasts.error"))}})},P=()=>{if(k&&!$){f("course");return}n(aL(y))};return l.jsxs("div",{className:"space-y-[22px]",children:[l.jsxs("section",{className:"overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("div",{className:"relative h-[150px] overflow-hidden bg-brand-gradient",children:[l.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-12 -top-16 h-[230px] w-[230px] rounded-full border border-white/15"}),l.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute -bottom-24 right-10 h-[180px] w-[180px] rounded-full border border-white/10"}),l.jsx(Ci,{"aria-hidden":"true",className:"absolute right-6 top-7 h-24 w-24 text-white/25",strokeWidth:1.4}),l.jsxs("span",{className:"absolute left-6 top-5 inline-flex items-center rounded-full border border-white/25 bg-white/[0.16] px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-on-dark",children:[y.level,y.personal&&l.jsxs(l.Fragment,{children:[" · ",e("detail.builtForYou")]})]})]}),l.jsxs("div",{className:"flex flex-wrap items-end gap-6 p-6",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h2",{className:"text-2xl font-light tracking-tight text-strong sm:text-[26px]",children:j}),l.jsx(ce,{variant:"ghost",size:"sm",leftIcon:l.jsx(Lg,{className:"h-4 w-4","aria-hidden":"true"}),onClick:()=>u(!0),"aria-label":e("rename.openAriaLabel",{name:j}),children:e("rename.button")})]}),D&&l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:e("rename.originalNameNote",{name:y.name})}),l.jsx("p",{className:"mt-2 max-w-xl text-sm leading-relaxed text-muted-foreground",children:y.description})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-2.5",children:[l.jsxs("button",{type:"button",disabled:y.curriculumStatus!=="READY"&&!$,onClick:P,className:"inline-flex items-center gap-2 rounded-lg bg-primary px-5 py-3 text-sm font-semibold text-on-dark transition hover:brightness-[1.06] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50",children:[l.jsx(Ph,{className:"h-[18px] w-[18px]",strokeWidth:1.75,"aria-hidden":"true"}),B]}),k&&$&&l.jsx("button",{type:"button",onClick:()=>f("course"),className:"inline-flex items-center gap-2 rounded-lg border border-border px-4 py-3 text-sm font-semibold text-strong transition hover:bg-cream focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:e("detail.unlockCourse",{price:y.price.toFixed(2)})}),z&&l.jsx("button",{type:"button",onClick:()=>f("pack"),className:"inline-flex items-center gap-2 rounded-lg border border-border px-4 py-3 text-sm font-semibold text-strong transition hover:bg-cream focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:e("detail.unlockPath",{price:z.price.toFixed(2)})})]})]}),i]}),s.show&&l.jsx(l_,{variant:"banner",scope:"course",onStart:()=>n(ee.ME_LEARNING_PROFILE),onDismiss:s.dismiss}),!w&&l.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-card p-6 text-center",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:y.personal&&(y.curriculumStatus==="QUEUED"||y.curriculumStatus==="GENERATING")?e("detail.beingWritten"):e("detail.curriculumPreparing")})}),k&&l.jsx(Rw,{open:h!==null,items:h==="pack"&&z?[{packId:z.id}]:[{courseId:y.courseId}],amountCents:Math.round((h==="pack"&&z?z.price:y.price)*100),onClose:()=>f(null),onSuccess:R=>{f(null),n(lx(R))}}),l.jsx(mct,{open:c,onOpenChange:u,currentName:j,hasCustomName:D,isSubmitting:d.isPending,onSubmit:O}),w&&l.jsxs("div",{className:"flex flex-col items-start gap-[22px] lg:flex-row",children:[l.jsxs("section",{className:"flex min-w-0 flex-1 flex-col gap-[22px]",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("h3",{className:"text-section-title",children:e("detail.curriculumTitle")}),y.progress.totalLessons>0&&l.jsx("span",{className:"text-xs text-muted-foreground",children:e("detail.progress",{completed:y.progress.completedLessons,total:y.progress.totalLessons})})]}),w.weeks.map(R=>
1681{const xe=a===R.weekNumber,me=gct(R),U=R.days.reduce((ae,Ce)=>ae+Ce.lessons.reduce((je,ve,Te)=>je+(C(R.weekNumber,Ce.dayNumber,Te+1)?1:0),0),0);return l.jsxs("article",{className:"overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("button",{type:"button",onClick:()=>o(xe?null:R.weekNumber),"aria-expanded":xe,className:"flex w-full items-center gap-3 border-b border-border bg-cream px-4 py-4 text-left transition-colors hover:bg-edition-pale/40",children:[l.jsx("span",{className:"shrink-0 rounded-md border border-border bg-card px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.12em] text-primary",children:e("detail.weekLabel",{number:R.weekNumber})}),l.jsx("span",{className:"min-w-0 flex-1",children:l.jsx("span",{className:"block truncate text-sm font-semibold text-strong",children:R.title??e("detail.weekLabel",{number:R.weekNumber})})}),l.jsx("span",{className:"shrink-0 text-[11.5px] text-muted-foreground",children:e("detail.progress",{completed:U,total:me})}),l.jsx(ns,{"aria-hidden":"true",className:`h-4 w-4 shrink-0 text-muted-foreground transition-transform ${xe?"rotate-90":""}`,strokeWidth:1.75})]}),xe&&l.jsx("div",{className:"p-1.5",children:R.days.map(ae=>l.jsxs("div",{className:"mb-1 last:mb-0",children:[l.jsx("h4",{className:"px-3 pb-1 pt-2.5 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground",children:e("detail.dayLabel",{number:ae.dayNumber})}),l.jsx("ul",{children:ae.lessons.map((Ce,je)=>{const ve=je+1,Te=S.findIndex(Oe=>Oe.week===R.weekNumber&&Oe.day===ae.dayNumber&&Oe.lesson===ve),Se=C(R.weekNumber,ae.dayNumber,ve),He=_(Te),tt=!Se&&He&&A(R.weekNumber,ae.dayNumber,ve),we=e(Se?"detail.review":He?"detail.open":"detail.locked");return l.jsx("li",{children:l.jsxs("button",{type:"button",disabled:!He,onClick:()=>n(ts(y.courseId,R.weekNumber,ae.dayNumber,ve)),className:`flex w-full items-center gap-3 rounded-xl px-3 py-3 text-left transition-colors disabled:cursor-default ${tt?"bg-edition-pale":"hover:bg-cream"} ${He?"":"opacity-60"}`,children:[Se?l.jsx("span",{className:"inline-flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-full bg-sage text-on-dark",children:l.jsx(Kn,{className:"h-3.5 w-3.5",strokeWidth:2.5,"aria-hidden":"true"})}):tt?l.jsx("span",{className:"inline-flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-full bg-primary text-on-dark",children:l.jsx(Ph,{className:"h-[15px] w-[15px]",strokeWidth:1.75,"aria-hidden":"true"})}):l.jsx("span",{className:"inline-flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-full border-[1.5px] border-rule text-[11px] font-semibold text-muted-foreground",children:ve}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:`block truncate text-[13px] ${tt?"font-semibold text-primary":"font-medium text-strong"}`,children:Ce.title??e("detail.untitledLesson")}),Ce.estimatedMinutes&&l.jsx("span",{className:"mt-0.5 block text-[11px] text-muted-foreground",children:e("detail.estimatedMinutes",{minutes:Ce.estimatedMinutes})})]}),Se||tt?l.jsx("span",{className:`shrink-0 text-[11px] font-semibold ${tt?"text-primary":"text-muted-foreground"}`,children:we}):l.jsx(ns,{"aria-hidden":"true",className:"h-[15px] w-[15px] shrink-0 text-muted-foreground",strokeWidth:1.75})]})},ve)})})]},ae.dayNumber))})]},R.weekNumber)})]}),l.jsx("aside",{className:"flex w-full shrink-0 flex-col gap-[18px] lg:w-[300px]",children:l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5",children:[l.jsxs("div",{className:"mb-2.5 flex items-baseline justify-between",children:[l.jsx("span",{className:"text-[13px] font-semibold text-strong",children:e("list.yourProgress")}),l.jsxs("span",{className:"text-xl font-bold text-primary",children:[M,"%"]})]}),l.jsx("div",{className:"mb-4 h-[7px] overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:"h-full rounded-full bg-brand-gradient transition-[width] duration-500",style:{width:`${M}%`}})}),y.progress.totalLessons>0&&l.jsx("p",{className:"text-[11.5px] leading-relaxed text-muted-foreground",children:e("detail.progress",{completed:y.progress.completedLessons,total:y.progress.totalLessons})})]})})]})]})}const s8=3e3,yct=9e4;
1681function bct(e,t,n){if((e==null?void 0:e.status)==="preparing"||(e==null?void 0:e.status)==="queued")return{interval:s8,emptySince:null};if((e==null?void 0:e.status)==="ready"&&(!e.practiceQuestions||e.practiceQuestions.length===0)){const r=n??t;return t-r>=yct?{interval:!1,emptySince:r}:{interval:s8,emptySince:r}}return{interval:!1,emptySince:null}}const vct=(e,t)=>["me","lesson-data",e,t.week,t.day,t.lesson];function wct(e,t){const n=b.useRef(null);return At({queryKey:vct(e??"",t??{week:0,day:0,lesson:0}),queryFn:()=>_e.get(he.meCourseLessonData(e),{params:{week:t.week,day:t.day,lesson:t.lesson}}),enabled:!!e&&!!t,refetchInterval:r=>{const{interval:i,emptySince:s}=bct(r.state.data,r.state.dataUpdatedAt,n.current);return n.current=s,i},staleTime:0})}function Sct(){const e=Tt();return rt({mutationFn:({courseId:t,...n})=>_e.post(he.meCourseStepComplete(t),n),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:_p}),e.invalidateQueries({queryKey:db(n.courseId)})}})}function Cct(){return rt({mutationFn:({courseId:e,...t})=>_e.post(he.meCoursePracticeAnswer(e),t)})}function kct(){const e=Tt();return rt({mutationFn:({courseId:t,week:n,day:r,lesson:i})=>_e.patch(he.meLessonSkip(t,n,r,i),void 0),onSuccess:()=>{e.invalidateQueries({queryKey:["me","courses"]})}})}const Rue=4*6e4,Oue=(e,t,n)=>["me","courses",e,"extra",t,n.week,n.day,n.lesson];function _ct(e,t,n){const r=b.useRef(Date.now());return At({queryKey:Oue(e,t,n),enabled:!!e,queryFn:()=>_e.get(he.meSupplementaryLesson(e,t),{params:n}),refetchInterval:i=>{var s;return((s=i.state.data)==null?void 0:s.status)!=="preparing"||Date.now()-r.current>Rue?!1:s8}})}function Tct(){const e=Tt();return rt({mutationFn:({courseId:t,kind:n,...r})=>_e.post(he.meSupplementaryLessonComplete(t,n),r),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Oue(n.courseId,n.kind,n)})}})}function qq(e){return`$${e.toFixed(2)}`}function Ect({courseId:e,courseTitle:t,lessonNumber:n,totalLessons:r,price:i,pack:s,onUnlocked:a,onBack:o}){const{t:c}=J("lesson"),[u,d]=b.useState(null),h=n&&r>0?c("paywall.position",{lesson:n,total:r}):c("paywall.positionUnknown");return l.jsxs("section",{"aria-labelledby":"lesson-paywall-title",className:"rounded-2xl border border-border bg-card p-6","data-testid":"lesson-paywall",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-primary",children:l.jsx(Di,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:t}),l.jsx("h1",{id:"lesson-paywall-title",className:"mt-1 text-section-title",children:h}),l.jsx("p",{className:"mt-2 max-w-xl text-sm text-muted-ink",children:c("paywall.body")}),l.jsx("p",{className:"mt-4 text-2xl font-semibold text-strong",children:qq(i)}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx(ce,{type:"button",variant:"primary",onClick:()=>d({kind:"course"}),children:c("paywall.unlockCourse")}),s&&l.jsx(ce,{type:"button",variant:"outline",onClick:()=>d({kind:"pack",pack:s}),children:c("paywall.unlockPath",{price:qq(s.price)})}),l.jsx(ce,{type:"button",variant:"ghost",onClick:o,children:c("paywall.back")})]}),s&&l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:c("paywall.pathNote",{name:s.name})})]})]}),l.jsx(Rw,{open:u!==null,items:(u==null?void 0:u.kind)==="pack"?[{packId:u.pack.id}]:(u==null?void 0:u.kind)==="course"?[{courseId:e}]:[],amountCents:(u==null?void 0:u.kind)==="pack"?Math.round(u.pack.price*100):Math.round(i*100),onClose:()=>d(null),onSuccess:f=>{d(null),a(f)}})]})}function jct(e){return Rrt.includes(e.type)}function Nct(e){return e.reduce((t,n,r)=>(jct(n)&&t.push(r),t),[])}function Gq(e){switch(e.type){case"text":return Xy(e.content);case"callout":return Xy(e.content);case"definition":return`${e.term}: ${Xy(e.definition)}`;case"key_takeaway":return e.items.map(t=>Xy(t)).join(". ");case"accordion":return e.items.map(t=>`${t.title}. ${Xy(t.content)}`).join(". ");default:return null}}function Act(e){return e.split(new RegExp("(?<=[.!?])\\s+")).filter(t=>t.trim().length>0)}function Xy(e){return e.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/\[(.*?)\]\(.*?\)/g,"$1").replace(/#{1,6}\s/g,"").replace(/\n{2,}/g,". ").replace(/\n/g," ").trim()}function Mct(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Rct(e){const t=b.useRef(null),n=b.useRef(null),r=b.useRef(e);b.useEffect(()=>{r.current=e,t.current&&(t.current.playbackRate=e)},[e]);const i=b.useCallback(()=>{var c;(c=n.current)==null||c.abort(),n.current=null,t.current&&(t.current.pause(),t.current.removeAttribute("src"),t.current=null),typeof window<"u"&&window.speechSynthesis&&window.speechSynthesis.cancel()},[]);b.useEffect(()=>i,[i]);const s=b.useCallback(()=>{var c;t.current&&t.current.pause(),(c=window.speechSynthesis)==null||c.pause()},[]),a=b.useCallback(()=>{var c,u;(c=t.current)!=null&&c.paused&&t.current.play(),(u=window.speechSynthesis)==null||u.resume()},[]),o=b.useCallback(()=>{var c;i(),(c=window.speechSynthesis)==null||c.cancel()},[i]);return{audioRef:t,fetchAbortRef:n,speedRef:r,cleanup:i,pause:s,resume:a,stop:o}}function Oct(e,t,n){if(e.sentences.length>0&&e.totalDurationMs>0){const o=t/e.totalDurationMs;return{totalDurationMs:t,sentences:e.sentences.map(c=>({...c,startMs:Math.round(c.startMs*o),endMs:Math.round(c.endMs*o)}))}}const r=Act(n),i=r.reduce((o,c)=>o+c.length,0);if(i===0)return{sentences:[],totalDurationMs:t};const s=[];let a=0;for(const o of r){const c=o.length/i*t;s.push({text:o,startMs:Math.round(a),endMs:Math.round(a+c)}),a+=c}return{sentences:s,totalDurationMs:t}}function Dct(){const[e,t]=b.useState(null),[n,r]=b.useState(null),i=b.useRef(null),s=b.useRef(0),a=b.useCallback(d=>
1681{if(!i.current)return;const h=d.currentTime*1e3,f=i.current.sentences;let m=null,p=null;for(let x=0;x<f.length;x++)if(h>=f[x].startMs&&h<f[x].endMs){m=x;const v=f[x].text.split(/\s+/).filter(Boolean);if(v.length>0){const g=v.reduce((w,S)=>w+S.length,0),y=f[x].endMs-f[x].startMs;if(y>0&&g>0){const w=(h-f[x].startMs)/y;let S=0;for(let C=0;C<v.length;C++)if(S+=v[C].length/g,w<=S){p=C;break}p===null&&(p=v.length-1)}}break}t(m),r(p),d.paused||(s.current=requestAnimationFrame(()=>a(d)))},[]),o=b.useCallback(d=>{s.current=requestAnimationFrame(()=>a(d))},[a]),c=b.useCallback(()=>{s.current&&(cancelAnimationFrame(s.current),s.current=0)},[]),u=b.useCallback(()=>{c(),i.current=null,t(null),r(null)},[c]);return{activeSentenceIndex:e,activeWordIndex:n,timingRef:i,startTracking:o,stopTracking:c,resetTracking:u,setActiveSentenceIndex:t}}const Lct=3;function Pct(e){const{courseId:t,week:n,day:r,lesson:i,step:s,blocks:a,voiceId:o,speed:c}=e,[u,d]=b.useState("idle"),[h,f]=b.useState(0),m=Rct(c),p=Dct(),x=b.useRef([]),v=b.useRef(new Map),g=b.useRef(s);b.useEffect(()=>{g.current=s},[s]);const y=Drt(),w=Lrt();b.useEffect(()=>{x.current=Nct(a)},[a]);const S=x.current,C=S[h]??null,k=S.length,_=k>0?(h+1)/k*100:0,E=C!==null?`${Mct(s)} (${h+1}/${k})`:s;b.useEffect(()=>{m.cleanup(),p.resetTracking(),d("idle"),f(0),v.current.clear()},[s,m.cleanup,p.resetTracking]);const A=b.useCallback(O=>{const P=x.current,I=[];for(let q=1;q<=Lct;q++){const R=O+q;R<P.length&&!v.current.has(P[R])&&I.push(P[R])}I.length!==0&&w.mutate({courseId:t,week:n,day:r,lesson:i,stepKey:s,blockIndices:I,voiceId:o},{onSuccess:q=>{q.blocks.forEach(R=>{v.current.set(R.blockIndex,{audioUrl:R.audioUrl,timingUrl:R.timingUrl})})}})},[t,n,r,i,s,o,w]),j=b.useCallback((O,P)=>{if(!("speechSynthesis"in window)){d("idle");return}const I=a[O];if(!I){d("idle");return}const q=Gq(I);if(!q){d("idle");return}window.speechSynthesis.cancel();const R=new SpeechSynthesisUtterance(q);R.rate=m.speedRef.current;const xe=g.current;R.onend=()=>{if(g.current!==xe)return;const me=P+1;me<x.current.length?D(me):(d("idle"),f(0),p.setActiveSentenceIndex(null))},window.speechSynthesis.speak(R),d("playing")},[a,p,m]),D=b.useCallback(async O=>{var me;(me=m.fetchAbortRef.current)==null||me.abort(),m.cleanup(),p.resetTracking();const P=x.current,I=P[O];if(I===void 0){d("idle"),f(0);return}const q=new AbortController;m.fetchAbortRef.current=q;const R=g.current,xe=()=>g.current===R&&!q.signal.aborted;d("loading"),f(O);try{let U=v.current.get(I);if(!U){const Se=await y.mutateAsync({courseId:t,week:n,day:r,lesson:i,stepKey:s,blockIndex:I,voiceId:o});if(!xe())return;U={audioUrl:Se.audioUrl,timingUrl:Se.timingUrl}}const ae=await fetch(U.timingUrl,{signal:q.signal});if(!xe())return;if(!ae.ok)throw new Error(`timing fetch failed: ${ae.status} ${ae.statusText}`);const Ce=await ae.json();if(!xe())return;const je=Ce&&typeof Ce=="object"&&Array.isArray(Ce.sentences)?Ce:{sentences:[],totalDurationMs:0},ve=Gq(a[I])??"",Te=new Audio(U.audioUrl);if(Te.playbackRate=m.speedRef.current,m.audioRef.current=Te,await new Promise((Se,He)=>{Te.addEventListener("loadedmetadata",()=>{const tt=Te.duration*1e3;p.timingRef.current=Oct(je,tt,ve),Se()},{once:!0}),Te.addEventListener("error",()=>He(new Error("audio load failed")),{once:!0}),Te.load()}),!xe()){Te.pause();return}if(Te.addEventListener("ended",()=>{if(g.current!==R)return;const Se=O+1;Se<P.length?D(Se):(d("idle"),f(0),p.setActiveSentenceIndex(null))}),Te.addEventListener("error",()=>{g.current===R&&j(I,O)}),await Te.play(),!xe()){Te.pause();return}d("playing"),p.startTracking(Te),A(O)}catch{if(!xe())return;j(P[O],O)}},[t,n,r,i,s,o,a,m,p,y,A,j]),M=b.useCallback(()=>{x.current.length!==0&&D(0)},[D]),$=b.useCallback(()=>{m.pause(),p.stopTracking(),d("paused")},[m,p]),B=b.useCallback(()=>{m.resume(),m.audioRef.current&&p.startTracking(m.audioRef.current),d("playing")},[m,p]),z=b.useCallback(()=>{m.stop(),p.resetTracking(),d("idle"),f(0)},[m,p]);return{playbackState:u,currentBlockIndex:C,activeSentenceIndex:p.activeSentenceIndex,activeWordIndex:p.activeWordIndex,progressPercent:_,currentBlockLabel:E,play:M,pause:$,resume:B,stop:z}}const Ict=Ue({currentWeek:Re(),currentDay:Re(),currentLesson:Re(),completedLessons:Re(),totalLessons:Re(),percentComplete:Re(),lastAccessedAt:Q().or(sx()).nullable()}),Fct=Ue({enrollmentId:Q(),courseId:Q(),name:Q(),description:Q(),imageUrl:Q().nullable(),level:Q(),status:Q(),sourceType:Q(),curriculumStatus:Q(),price:sv.number().default(0),startDate:Q().or(sx()).nullable(),archivedAt:Q().or(sx()).nullable().optional().default(null),customName:Q().nullable().optional().default(null),personal:ni().optional(),progress:Ict}),Due=Ue({id:Q().optional(),title:Q().optional(),description:Q().optional(),type:Q().optional(),bloomLevel:Q().optional(),estimatedMinutes:Re().optional(),objectives:bt(Q()).optional(),sections:bt(Q()).optional(),steps:bt(Q()).optional(),skills:bt(Q()).optional(),keyTerms:bt(Q()).optional(),masteryThreshold:Re().optional()}),Bct=Ue({dayNumber:Re(),lessons:bt(Due)}),zct=Ue({weekNumber:Re(),title:Q().optional(),objectives:bt(Q()).optional(),days:bt(Bct)}),Lue=Ue({weeks:bt(zct),generatedAt:Q().optional(),courseId:Q().optional()});Fct.extend({curriculum:Lue.nullable(),curriculumStatus:Q(),completedLessonMap:z3(Ah(!0)).default({}),pack:Ue({id:Q(),slug:Q(),name:Q(),price:sv.number()}).nullable().optional()});const jj="practice_questions",xv=Ue({week:Re().int(),day:Re().int(),lesson:Re().int()}),$ct=Ue({blocks:bt(B3())}),Uct=Ue({left:Q(),right:Q()}),Wq=bt(Ue({id:Q(),text:Q()})),Vct=Ue({id:Q(),type:na(["mcq","true_false","multi_select","short_answer","fill_blank","matching"]),bloomLevel:Q().optional(),difficulty:Q().optional(),question:Q(),options:bt(Q()).optional(),correctAnswer:B3(),correctAnswers:bt(Q()).optional(),caseSensitive:ni().optional(),leftColumn:Wq.optional(),rightColumn:Wq.optional(),correctPairs:bt(Uct).optional(),explanation:Q().optional()}),Hct=Ue({status:Ah("ready"),coords:xv,lessonNode:Due.nullable(),steps:z3($ct),stepOrder:bt(Q()),practiceQuestions:bt(Vct),expectedPracticeMs:Re(),isCompleted:ni()}),qct=Ue({status:na(["preparing","queued"]),coords:xv,message:Q(),title:Q().optional()});nD("status",[Hct,qct]);const Gct=Ue({decision:na(["CONTINUE","SKIP","REMEDIATE","DEEP_DIVE"]),reason:Q(),metadata:z3(B3())}),a8=na(["review","stretch"]),Wct=Ue({kind:a8,status:na(["preparing","ready"])});nD("status",[Ue({status:Ah("ready"),kind:a8,coords:xv,title:Q().nullable(),sections:bt(Ue({key:Q(),blocks:bt(B3())})),completed:ni()}),Ue({status:Ah("preparing"),kind:a8,coords:xv})]);Ue({progress:Ue({currentWeek:Re(),currentDay:Re(),currentLesson:Re(),currentStep:Re(),completedLessons:Re(),totalLessons:Re(),percentComplete:Re()}),lessonCompleted:ni(),adaptiveDecision:Gct.nullable(),nextCoords:xv.nullable(),nextLessonQueued:ni(),supplementary:Wct.nullable().optional()});Ue({questionId:Q(),correct:ni(),explanation:Q().nullable(),alreadyAnswered:ni()});function Yct({stepOrder:e,currentIndex:t,highestCompletedIndex:n,onJump:r,onNotify:i}){const{t:s}=J("lesson");return l.jsxs("nav",{"aria-label":s("sidebar.title"),className:"sticky top-4 max-h-[calc(100dvh-6rem)] self-start overflow-y-auto overscroll-contain rounded-2xl border border-border bg-card p-4",children:[l.jsxs("p",{className:"flex items-center gap-2 px-1 pb-3 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:[l.jsx(Fxe,{className:"h-4 w-4 text-primary",strokeWidth:1.75,"aria-hidden":"true"}),s("sidebar.title")]}),l.jsx("div",{className:"space-y-0.5",children:e.map((a,o)=>{const c=o<=n,u=o===t,d=o<=n+1;return l.jsxs("button",{type:"button",onClick:()=>
1681{if(!d){i(s("sidebar.locked"));return}r(o)},className:`flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-[13px] transition-colors ${u?"bg-edition-pale font-semibold text-edition-deeper":"text-body-ink hover:bg-cream"}`,children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[l.jsx("span",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-[11px] font-semibold ${c?"bg-sage text-white":u?"bg-primary text-white":"border-[1.5px] border-rule text-muted-ink"}`,children:c?l.jsx(Kn,{className:"h-3 w-3",strokeWidth:2.5,"aria-hidden":"true"}):u?l.jsx(vk,{className:"h-2.5 w-2.5",fill:"currentColor",strokeWidth:0,"aria-hidden":"true"}):o+1}),l.jsx("span",{className:"truncate",children:s(`stepNames.${a}`,{defaultValue:a})})]}),!d&&l.jsx("span",{className:"flex-shrink-0 text-muted-ink/70","aria-hidden":"true",children:l.jsx(Di,{className:"h-3 w-3",strokeWidth:1.75})})]},a)})})]})}function Kct({stepOrder:e,currentIndex:t,highestCompletedIndex:n,onJump:r,onNotify:i}){const{t:s}=J("lesson");return l.jsx("nav",{"aria-label":s("sidebar.title"),className:"mb-4 overflow-x-auto md:hidden",children:l.jsx("div",{className:"flex min-w-max gap-2 px-1 pb-2",children:e.map((a,o)=>{const c=o<=n,u=o===t,d=o<=n+1,h=s(`stepNames.${a}`,{defaultValue:a});return l.jsxs(ce,{type:"button",variant:"ghost",size:"sm",onClick:()=>{if(!d){i==null||i(s("sidebar.locked"));return}r(o)},"aria-disabled":!d||void 0,"aria-current":u?"step":void 0,"aria-label":d?s("mobileStepBar.stepAria",{number:o+1,label:h}):s("mobileStepBar.lockedAria",{label:h}),"data-testid":`mobile-step-${o}`,className:`flex h-auto min-w-[4rem] flex-col items-center gap-1 py-1.5 transition-all ${d?"":"cursor-not-allowed opacity-40"}`,children:[l.jsx("span",{className:`flex h-8 w-8 items-center justify-center rounded-full text-xs font-semibold transition-colors ${c?"bg-sage text-white":u?"bg-primary text-white ring-2 ring-edition-soft":"bg-edition-pale text-muted-ink"}`,"aria-hidden":"true",children:c?l.jsx(Kn,{className:"h-3.5 w-3.5",strokeWidth:2.5}):d?o+1:l.jsx(Di,{className:"h-3 w-3",strokeWidth:1.75})}),l.jsx("span",{className:`w-[4.5rem] whitespace-normal break-words text-center text-[10px] leading-tight ${u?"font-medium text-strong":"text-muted-ink"}`,children:h})]},a)})})})}function Xct({stepOrder:e,currentIndex:t,highestCompletedIndex:n}){const{t:r}=J("lesson"),i=Math.max(0,n+1);return l.jsx("div",{className:"flex gap-1.5 py-2",role:"progressbar","aria-label":r("progress.aria"),"aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":e.length,"data-testid":"lesson-step-progress",children:e.map((s,a)=>{const o=a<=n,c=a===t,u=o?100:c?50:0;return l.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:`h-full rounded-full transition-[width] ease-in-out ${o||c?"bg-brand-gradient":""}`,style:{width:`${u}
1681%`,...c&&!o?{opacity:.6}:{}},role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r("progress.stepAria",{number:a+1,total:e.length})})},s)})})}function Qct({onPrev:e,onNext:t,isFirstStep:n,isLastStep:r,isNextDisabled:i=!1,isLoading:s=!1,isPracticeStep:a=!1,nextStepName:o}){const{t:c}=J("lesson"),u=a?c("continue"):r?c("finishLesson"):o?c("nextStepName",{stepName:o}):c("next");return l.jsxs("div",{className:"mt-6 flex flex-col-reverse gap-3 border-t border-border pt-4 sm:flex-row sm:items-center sm:justify-between","data-testid":"step-navigation",children:[l.jsx(ce,{type:"button",variant:"ghost",onClick:e,disabled:n,leftIcon:l.jsx($o,{className:"h-4 w-4"}),"data-testid":"step-nav-prev",children:c("back")}),l.jsx(ce,{type:"button",variant:"primary",onClick:t,disabled:i||s,isLoading:s,rightIcon:!r&&!a?l.jsx(ns,{className:"h-4 w-4"}):void 0,"data-testid":"step-nav-next",children:u})]})}function Pue({stepKey:e,blocks:t}){const{t:n}=J("lesson"),r=b.useMemo(()=>!t||!Array.isArray(t.blocks)?[]:t.blocks.filter(eL),[t]);return r.length===0?l.jsx("p",{className:"text-sm text-muted-ink",children:n("renderer.empty")}):l.jsx("div",{"data-step":e,children:l.jsx(xle,{blocks:r})})}const Zct=["A","B","C","D","E","F","G","H"];function Jct({question:e,selectedAnswer:t,onSelect:n,disabled:r}){const{t:i}=J("lesson");return l.jsxs("fieldset",{className:"space-y-3",disabled:r,children:[l.jsx("legend",{className:"sr-only",children:i("practice.selectYourAnswer")}),(e.options??[]).map((s,a)=>{const o=t===s,c=Zct[a]??String(a+1);return l.jsx(ec,{role:"radio","aria-checked":o,tabIndex:r?-1:0,onClick:()=>{r||n(s)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&!r&&(u.preventDefault(),n(s))},className:re("cursor-pointer rounded-xl transition-colors duration-200",o?"border-primary bg-edition-pale ring-1 ring-primary":"hover:border-edition-soft",r&&"pointer-events-none opacity-70"),children:l.jsxs(fu,{className:"flex items-center gap-3 p-3.5",children:[l.jsx("span",{className:re("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg text-xs font-semibold transition-colors",o?"bg-primary text-primary-foreground":"border border-rule bg-cream text-muted-ink"),children:c}),l.jsx(xn,{as:"span",className:"text-sm leading-snug",children:s})]})},a)})]})}function eut({selectedAnswer:e,onSelect:t,disabled:n}){const{t:r}=J("lesson");return l.jsxs("fieldset",{className:"grid grid-cols-2 gap-4",disabled:n,children:[l.jsx("legend",{className:"sr-only",children:r("practice.selectTrueOrFalse")}),["true","false"].map(i=>{const s=e===i;return l.jsx(ce,{type:"button",variant:"outline",onClick:()=>{n||t(i)},className:re("h-16 text-lg font-semibold capitalize transition-all",s&&"ring-2 ring-primary border-primary bg-primary/5",n&&"pointer-events-none opacity-70"),children:r(i==="true"?"practice.true":"practice.false")},i)})]})}function tut({question:e,selectedAnswer:t,onSelect:n,disabled:r}){const{t:i}=J("lesson"),s=t??[],a=o=>{if(r)return;const c=s.includes(o)?s.filter(u=>u!==o):[...s,o];n(c)};return l.jsxs("fieldset",{className:"space-y-3",disabled:r,children:[l.jsx("legend",{className:"sr-only",children:i("practice.selectAllThatApply")}),(e.options??[]).map((o,c)=>{const u=s.includes(o);return l.jsx(ec,{role:"checkbox","aria-checked":u,tabIndex:r?-1:0,onClick:()=>a(o),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&!r&&(d.preventDefault(),a(o))},className:re("cursor-pointer rounded-xl transition-colors duration-200",u?"border-primary bg-edition-pale ring-1 ring-primary":"hover:border-edition-soft",r&&"pointer-events-none opacity-70"),children:l.jsxs(fu,{className:"flex items-center gap-3 p-3.5",children:[l.jsx("span",{className:re("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg text-xs font-semibold transition-colors",u?"bg-primary text-primary-foreground":"border border-rule bg-cream text-muted-ink"),children:u?l.jsx(Kn,{className:"h-4 w-4"}):l.jsx(RQ,{className:"h-4 w-4"})}),l.jsx(xn,{as:"span",className:"text-sm leading-snug",children:o})]})},c)})]})}function nut({question:e,selectedAnswer:t,onSelect:n,disabled:r}){const{t:i}=J("lesson"),s=e.question.split("___");return s.length<=1?l.jsx(fn,{type:"text",value:t??"",onChange:a=>n(a.target.value),placeholder:i("practice.typeYourAnswer"),disabled:r,className:"max-w-md","aria-label":i("practice.yourAnswerAriaLabel")}):l.jsx(xn,{className:"flex flex-wrap items-center gap-1 font-medium leading-relaxed",children:s.map((a,o)=>l.jsxs(b.Fragment,{children:[l.jsx(xn,{as:"span",children:a}),o<s.length-1&&l.jsx(fn,{type:"text",value:t??"",onChange:c=>n(c.target.value),placeholder:"...",disabled:r,className:"mx-1 inline-block w-40","aria-label":i("practice.fillInTheBlank")})]},o))})}const Yq=[{bg:"bg-blue-50",border:"border-blue-400",text:"text-blue-700",dot:"bg-blue-500"},{bg:"bg-purple-50",border:"border-purple-400",text:"text-purple-700",dot:"bg-purple-500"},{bg:"bg-amber-50",border:"border-amber-400",text:"text-amber-700",dot:"bg-
1681amber-500"},{bg:"bg-cyan-50",border:"border-cyan-400",text:"text-cyan-700",dot:"bg-cyan-500"},{bg:"bg-rose-50",border:"border-rose-400",text:"text-rose-700",dot:"bg-rose-500"}],Kq=e=>Yq[e%Yq.length];function rut({question:e,selectedAnswer:t,onSelect:n,disabled:r}){const{t:i}=J("lesson"),[s,a]=b.useState(null),o=t??[],c=e.leftColumn??[],u=e.rightColumn??[],d=b.useMemo(()=>new Set(o.map(v=>v.left)),[o]),h=b.useMemo(()=>new Set(o.map(v=>v.right)),[o]),f=(v,g)=>o.findIndex(y=>g==="left"?y.left===v:y.right===v),m=b.useCallback(v=>{if(!r){if(d.has(v)){n(o.filter(g=>g.left!==v)),a(null);return}a(v)}},[r,d,o,n]),p=b.useCallback(v=>{if(r||!s)return;const g=h.has(v)?o.filter(y=>y.right!==v):o;n([...g,{left:s,right:v}]),a(null)},[r,s,h,o,n]),x=(v,g)=>{const y=f(v.text,g),w=y>=0,S=g==="left"&&s===v.text,C=w?Kq(y):null;return l.jsxs(ce,{type:"button",variant:"outline",disabled:g==="right"?r||!s&&!w:r,onClick:()=>g==="left"?m(v.text):p(v.text),className:re("h-auto w-full justify-start whitespace-normal px-4 py-3 text-start transition-all",S&&"ring-2 ring-primary border-primary bg-primary/5",w&&!S&&`${C==null?void 0:C.bg} ${C==null?void 0:C.border} ${C==null?void 0:C.text}`,g==="right"&&s&&!w&&"border-primary/40 bg-primary/5"),children:[w&&l.jsx(xn,{as:"span",className:re("me-2 h-3 w-3 shrink-0 rounded-full",C==null?void 0:C.dot)}),l.jsx(xn,{as:"span",className:"text-sm",children:v.text})]},v.id)};return l.jsxs("div",{className:"space-y-4",children:[l.jsx(Qa,{children:i("practice.matchingInstructions")}),l.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Qa,{className:"font-medium uppercase tracking-wide text-muted-foreground",children:i("practice.terms")}),c.map(v=>x(v,"left"))]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Qa,{className:"font-medium uppercase tracking-wide text-muted-foreground",children:i("practice.definitions")}),u.map(v=>x(v,"right"))]})]}),o.length>0&&l.jsxs("div",{className:"space-y-2 rounded-xl border border-border p-4",children:[l.jsx(Qa,{className:"mb-2 font-medium text-muted-foreground",children:i("practice.yourMatches",{count:o.length})}),o.map((v,g)=>{const y=Kq(g);return l.jsxs("div",{className:re("flex items-center gap-3 rounded-lg px-3 py-2 text-sm",y.bg),children:[l.jsx(xn,{as:"span",className:re("h-2.5 w-2.5 shrink-0 rounded-full",y.dot)}),l.jsx(xn,{as:"span",className:re("font-semibold",y.text),children:v.left}),l.jsx(gn,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(xn,{as:"span",className:y.text,children:v.right})]},g)})]})]})}function iut({question:e,selectedAnswer:t,onSelect:n,disabled:r}){switch(e.type){case"mcq":return l.jsx(Jct,{question:e,selectedAnswer:t,onSelect:n,disabled:r});case"true_false":return l.jsx(eut,{selectedAnswer:t,onSelect:n,disabled:r});case"multi_select":return l.jsx(tut,{question:e,selectedAnswer:t,onSelect:n,disabled:r});case"matching":return l.jsx(rut,{question:e,selectedAnswer:t,onSelect:n,disabled:r});case"short_answer":case"fill_blank":default:return l.jsx(nut,{question:e,selectedAnswer:t,onSelect:n,disabled:r})}}function sut({question:e,selectedAnswer:t,isCorrect:n,explanation:r}){var c;const{t:i}=J("lesson"),s=e.type,a=r??e.explanation??null,o=e.correctAnswers??[];return l.jsxs(ec,{className:re("border-s-4 animate-in fade-in slide-in-from-bottom-2 duration-300",n?"border-s-green-500":"border-s-red-500"),children:[l.jsx(Qf,{className:"pb-2",children:l.jsx(y0,{className:"flex items-center gap-2 text-base",children:n?l.jsxs(l.Fragment,{children:[l.jsx(jl,{className:"h-5 w-5 text-green-500"}),l.jsx(xn,{as:"span",className:"text-green-700",children:i("practice.correct")})]}):l.jsxs(l.Fragment,{children:[l.jsx(PM,{className:"h-5 w-5 text-red-500"}),l.jsx(xn,{as:"span",className:"text-red-700",children:i("practice.incorrect")})]})})}),l.jsxs(fu,{className:"space-y-3",children:[(s==="mcq"||s==="true_false")&&!n&&e.correctAnswer!=null&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(xn,{as:"span",className:"shrink-0 rounded bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700",children:i("practice.yourAnswer")}),l.jsx(xn,{className:"text-sm capitalize text-muted-foreground",children:String(t)})]}),l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(xn,{as:"span",className:"shrink-0 rounded bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700",children:i("practice.correctAnswer")}),l.jsx(xn,{className:"text-sm capitalize text-muted-foreground",children:String(e.correctAnswer)})]})]}),(s==="fill_blank"||s==="short_answer")&&!n&&o.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(xn,{as:"span",className:"shrink-0 rounded bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700",children:i("practice.youTyped")}),l.jsx(xn,{className:"text-sm text-muted-foreground",children:String(t)})]}),l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(xn,{as:"span",className:"shrink-0 rounded bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700",children:i("practice.acceptedA
1681nswers")}),l.jsx(xn,{className:"text-sm text-muted-foreground",children:o.join(", ")})]})]}),s==="multi_select"&&!n&&o.length>0&&(()=>{const u=new Set(t),d=new Set(o),h=e.options??[];return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(Qa,{className:"mb-1 text-xs font-medium text-red-700",children:i("practice.yourSelections")}),l.jsx("div",{className:"space-y-1",children:h.filter(f=>u.has(f)).map((f,m)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[d.has(f)?l.jsx(Kn,{className:"h-3.5 w-3.5 shrink-0 text-green-600"}):l.jsx(ar,{className:"h-3.5 w-3.5 shrink-0 text-red-600"}),l.jsx(xn,{as:"span",className:re("rounded px-2 py-0.5",d.has(f)?"bg-green-50":"bg-red-50"),children:f})]},m))})]}),l.jsxs("div",{children:[l.jsx(Qa,{className:"mb-1 text-xs font-medium text-green-700",children:i("practice.acceptedAnswers")}),l.jsx("div",{className:"space-y-1",children:h.filter(f=>d.has(f)).map((f,m)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(Kn,{className:"h-3.5 w-3.5 shrink-0 text-green-600"}),l.jsx(xn,{as:"span",className:"rounded bg-green-50 px-2 py-0.5",children:f})]},m))})]})]})})(),s==="matching"&&!n&&(((c=e.correctPairs)==null?void 0:c.length)??0)>0&&(()=>{const u=new Map((e.leftColumn??[]).map(h=>[h.id,h.text])),d=new Map((e.rightColumn??[]).map(h=>[h.id,h.text]));return l.jsxs("div",{children:[l.jsx(Qa,{className:"mb-1 text-xs font-medium text-green-700",children:i("practice.correctPairs")}),l.jsx("div",{className:"space-y-1",children:(e.correctPairs??[]).map((h,f)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[l.jsx(xn,{as:"span",className:"rounded bg-green-50 px-2 py-0.5",children:u.get(h.left)??h.left}),l.jsx(gn,{className:"h-3 w-3 text-muted-foreground"}),l.jsx(xn,{as:"span",className:"rounded bg-green-50 px-2 py-0.5",children:d.get(h.right)??h.right})]},f))})]})})(),a&&l.jsxs("div",{className:"rounded-md bg-muted/50 p-3",children:[l.jsx(Qa,{className:"mb-1 text-xs font-medium text-muted-foreground",children:i("practice.explanation")}),l.jsx(xn,{className:"text-sm leading-relaxed text-foreground",children:a})]})]})]})}const o8=new Set;function aut(e){return o8.add(e),()=>{o8.delete(e)}}async function out(){const e=[...o8].filter(n=>{try{return n.dirty()}catch{return!0}});return e.some(n=>!n.save)?{kind:"busy"}:(await Promise.allSettled(e.map(n=>n.save()))).every(n=>n.status==="fulfilled")?{kind:"ready"}:{kind:"failed"}}async function Iue(e=()=>window.location.reload()){const t=await out();return t.kind==="ready"&&e(),t}let Fue=0;typeof window<"u"&&window.addEventListener("keydown",()=>{Fue=Date.now()},!0);function lut(e=Date.now()){if(typeof document>"u")return!1;const t=document.activeElement;return!!t&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)&&e-Fue<8e3}function lL(e,t){const n=b.useRef({dirty:e,save:t});n.current={dirty:e,save:t};const r=t!==void 0;b.useEffect(()=>aut({dirty:()=>n.current.dirty,...r?{save:()=>n.current.save?n.current.save():Promise.resolve()}:{}}),[r])}function cut(e){return Array.isArray(e)?e.map(t=>{if(typeof t=="string")return t;if(t&&typeof t=="object"){const n=t;if(typeof n.text=="string")return n.text;if(typeof n.label=="string")return n.label;if(typeof n.id=="string")return n.id}return""}).filter(t=>t.length>0):[]}function uut(e){return e.type==="mcq"||e.type==="multi_select"?{...e,options:cut(e.options)}:e}function Nj(e,t){var n,r;if(t==null)return!1;if(e.type==="multi_select")return Array.isArray(t)&&t.length>0;if(e.type==="matching"){const i=((n=e.leftColumn)==null?void 0:n.length)??((r=e.correctPairs)==null?void 0:r.length)??1;return Array.isArray(t)&&t.length>=i}return typeof t=="string"&&t.trim().length>0}function dut({courseId:e,coords:t,questions:n,onAllAnswered:r}){const{t:i}=J("lesson"),s=Cct(),[a,o]=b.useState({}),[c,u]=b.useState({}),[d,h]=b.useState(null),f=b.useMemo(()=>Array.isArray(n)?n.map(uut):[],[n]),m=d!==null||f.some(g=>!c[g.id]&&Nj(g,a[g.id]));lL(m);const p=b.useMemo(()=>f.length>0&&f.every(g=>!!c[g.id]),[f,c]),x=b.useMemo(()=>
1681{if(f.length===0)return 0;const g=Object.values(c).filter(y=>y.correct).length;return Math.round(g/f.length*100)},[f,c]);if(f.length===0)return l.jsx(xn,{className:"text-sm text-muted-ink",children:i("practice.empty")});const v=g=>{const y=a[g.id];!Nj(g,y)||s.isPending||(h(g.id),s.mutate({courseId:e,week:t.week,day:t.day,lesson:t.lesson,questionId:g.id,answer:y},{onSuccess:w=>{u(S=>{const C={...S,[g.id]:{correct:w.correct,explanation:w.explanation,answer:y}};if(f.every(k=>!!C[k.id])){const k=Object.values(C).filter(_=>_.correct).length;r(Math.round(k/f.length*100))}return C})},onSettled:()=>h(null)}))};return l.jsxs("div",{className:"space-y-6",children:[l.jsx(xn,{className:"text-sm text-muted-ink",children:i("practice.subtitle")}),l.jsx("ol",{className:"space-y-4",children:f.map((g,y)=>{const w=c[g.id],S=d===g.id&&s.isPending;return l.jsx("li",{className:"rounded-xl border border-border bg-cream p-4",children:l.jsxs(NO,{fallback:l.jsx("div",{className:"rounded-lg border border-clay/40 bg-clay/[0.06] p-3 text-sm text-clay",children:i("practice.questionRenderError",{defaultValue:"We couldn't render this question. Skip it for now â the rest of the set still works."})}),children:[l.jsx(xn,{as:"p",className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-edition-deeper",children:i("practice.questionNumber",{number:y+1})}),g.type!=="fill_blank"&&l.jsx(xn,{as:"p",className:"mt-1.5 text-base leading-relaxed text-strong",children:g.question}),l.jsx("div",{className:"mt-3",children:l.jsx(iut,{question:g,selectedAnswer:w?w.answer:a[g.id],onSelect:C=>o(k=>({...k,[g.id]:C})),disabled:!!w})}),!w&&l.jsxs(ce,{type:"button",variant:"primary",size:"sm",className:"mt-3",disabled:!Nj(g,a[g.id])||S,onClick:()=>v(g),children:[S&&l.jsx(Qo,{className:"me-2 h-4 w-4 animate-spin"}),i("practice.submit")]}),w&&l.jsx("div",{className:"mt-3",children:l.jsx(sut,{question:g,selectedAnswer:w.answer,isCorrect:w.correct,explanation:w.explanation})})]})},g.id)})}),p&&l.jsx("div",{className:"rounded-xl border border-edition-soft bg-edition-pale p-4 text-center",children:l.jsx(xn,{as:"p",className:"text-sm font-semibold text-edition-deeper",children:i("practice.scoreSummary",{percent:x})})})]})}function hut({open:e,outcome:t,onConfirm:n,onAlternate:r,alternateLabel:i,note:s,onDismiss:a}){const{t:o}=J("lesson");if(!t)return null;const c=t.decision,u=o("adaptive."+c+".title"),d=o("adaptive."+c+".primary"),h=i??o("adaptive."+c+".secondary",{defaultValue:""}),f=!!(h&&r);return l.jsx(Px,{open:e,children:l.jsxs(Ix,{children:[l.jsx(Fx,{className:"fixed inset-0 z-50 bg-[rgba(20,22,27,0.42)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),l.jsxs(Bx,{className:"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-2xl border border-border bg-card p-6 shadow-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",children:[f&&l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button","aria-label":"Close",onClick:a??r??void 0,className:"absolute end-4 top-4 roun
1681ded-lg p-1 text-muted-ink transition-colors hover:bg-cream",children:l.jsx(ar,{className:"h-4 w-4",strokeWidth:1.75})})}),l.jsx(zx,{className:"text-section-title",children:u}),l.jsx(Qk,{className:"mt-2 text-sm leading-relaxed text-muted-ink",children:t.reason}),s?l.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-ink","data-testid":"adaptive-note",children:s}):null,l.jsxs("div",{className:"mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[f&&l.jsx(ce,{type:"button",variant:"outline",size:"md",onClick:r??void 0,children:h}),l.jsx(ce,{type:"button",variant:"primary",size:"md",onClick:n,children:d})]})]})]})})}function CS({message:e}){const{t}=J("lesson");return l.jsxs("div",{className:"flex min-h-[40vh] flex-col items-center justify-center space-y-4 text-center",children:[l.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-edition-soft border-t-primary"}),l.jsx("h2",{className:"text-section-title",children:t("preparing.title")}),l.jsx("p",{className:"max-w-md text-sm text-muted-ink",children:e??t("preparing.body")})]})}const Bue={YELLOW:"arthur-hl-yellow",GREEN:"arthur-hl-green",BLUE:"arthur-hl-blue",PINK:"arthur-hl-pink"},zue=["YELLOW","GREEN","BLUE","PINK"],F5=new Map;let Xq=!1;function $ue(){return typeof CSS>"u"?null:CSS.highlights??null}function Uue(){return typeof window<"u"&&$ue()!==null&&typeof window.Highlight=="function"}function fut(){if(Xq||typeof document>"u")return;const e=document.createElement("style");e.dataset.arthurHighlights="true",e.textContent=zue.map(t=>`::highlight(${Bue[t]}){background-color:${q9[t]};color:#111827;border-radius:2px;}`).join(` 1682`),document.head.appendChild(e),Xq=!0}function Vue(){const e=$ue();if(!e)return;const t=window.Highlight;for(const n of zue){const r=[];for(const s of F5.values()){const a=s[n];a&&r.push(...a)}const i=Bue[n];r.length===0?e.delete(i):e.set(i,new t(...r))}}function mut(e,t,n){var d;if(n<=t)return null;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let i=0,s=null,a=0,o=null,c=0,u=r.nextNode();for(;u;){const h=((d=u.nodeValue)==null?void 0:d.length)??0;if(s===null&&t>=i&&t<i+h&&(s=u,a=t-i),n>i&&n<=i+h){o=u,c=n-i;break}i+=h,u=r.nextNode()}if(!s||!o)return null;try{const h=document.createRange();return h.setStart(s,a),h.setEnd(o,c),h}catch{return null}}function put(e,t,n){var i;if(!Uue())return;if(!t||n.length===0){l8(e);return}fut();const r={};for(const s of n){const a=mut(t,s.startOffset,s.endOffset);a&&(r[i=s.color]??(r[i]=[])).push(a)}if(Object.keys(r).length===0){l8(e);return}F5.set(e,r),Vue()}function l8(e){F5.has(e)&&(F5.delete(e),Vue())}const gut=typeof window<"u"?b.useLayoutEffect:b.useEffect;function xut(e){if(e.length===0)return[];const t=[...e].sort((r,i)=>r.startOffset-i.startOffset),n=[];for(const r of t){const i=n[n.length-1];i&&r.startOffset<=i.end?(i.end=Math.max(i.end,r.endOffset),i.ids.push(r.id)):n.push({start:r.startOffset,end:r.endOffset,color:r.color,ids:[r.id]})}return n}function yut(e,t){if(t.length===0)return e.length>0?[{key:"plain-only",text:e,color:null}]:[];const n=[];let r=0;return t.forEach((i,s)=>{const a=Math.max(i.start,r),o=Math.min(i.end,e.length);a>r&&n.push({key:`plain-${s}`,text:e.slice(r,a),color:null}),o>a&&(n.push({key:`hl-${s}-${i.ids.join("_")}`,text:e.slice(a,o),color:i.color}),r=o)}),r<e.length&&n.push({key:"plain-tail",text:e.slice(r),color:null}),n}function but({blockIndex:e,blockToken:t,blockText:n,highlights:r,notes:i,bookmarks:s,bookmarkNumber:a=null,children:o,onClickNoteMarker:c,onToggleBookmark:u,bookmarkLabel:d}){const{t:h}=J("personal-layer"),f=t??`block-${e}`,m=s.length>0,p=b.useRef(null),x=b.useMemo(()=>xut(r),[r]),v=Uue(),g=b.useMemo(()=>n&&!v?yut(n,x):[],[n,x,v]);gut(()=>{if(!v)return;const w=p.current,S=()=>put(f,w,r.map(_=>({startOffset:_.startOffset,endOffset:_.endOffset,color:_.color})));S();let C=0;const k=w&&r.length>0?new MutationObserver(()=>{window.cancelAnimationFrame(C),C=window.requestAnimationFrame(S)}):null;return k==null||k.observe(w,{childList:!0,subtree:!0,characterData:!0}),()=>{window.cancelAnimationFrame(C),k==null||k.disconnect(),l8(f)}},[v,f,r]);const y=w=>h("block.noteMarker",{number:w+1});return l.jsxs("section",{ref:p,"data-block-index":e,"data-testid":`annotated-block-${e}`,className:"group relative rounded-md transition-colors",children:[l.jsx("div",{className:`absolute -right-1 -top-1 z-10 flex items-center gap-1 transition-opacity focus-within:opacity-100 group-hover:opacity-100 ${m?"opacity-100":"opacity-0"}`,children:u?l.jsxs(Pn,{type:"button","aria-label":d??h(m?"bookmark.removeAria":"bookmark.addAria"),"aria-pressed":m,onClick:u,variant:"ghost",size:"sm","data-testid":`bookmark-toggle-${e}`,children:[m&&a!==null?l.jsx("span",{className:"inline-flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold text-primary-foreground","data-testid":`bookmark-number-${e}`,children:a}
1682):null,l.jsx(xQ,{className:`h-4 w-4 ${m?"ml-1":""}`,"aria-hidden":"true",fill:m?"currentColor":"none"})]}):null}),o,g.length>0?l.jsx("p",{className:"mt-2 text-sm leading-relaxed","aria-label":h("block.highlightPreview"),"data-testid":`highlight-preview-${e}`,children:g.map(w=>w.color?l.jsx("mark",{style:{backgroundColor:q9[w.color]},className:"rounded-sm px-0.5 text-foreground",children:w.text},w.key):l.jsx("span",{children:w.text},w.key))}):null,i.length>0?l.jsx("ul",{"aria-label":h("block.notesAria",{count:i.length}),className:"mt-2 flex flex-wrap items-center gap-1",children:i.map((w,S)=>l.jsx("li",{children:l.jsxs(Pn,{type:"button","aria-label":y(S),onClick:()=>c==null?void 0:c(w.id),variant:"ghost",size:"sm","data-testid":`note-marker-${w.id}`,children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-[10px] font-semibold text-primary-foreground",children:S+1}),l.jsx(qv,{className:"ml-1 h-3 w-3","aria-hidden":"true"})]})},w.id))}):null]})}const vut=8e3;function B5({initialBody:e="",onSave:t,onCancel:n,onDelete:r,maxLength:i=vut,placeholder:s,autoFocus:a=!0,className:o}){const{t:c}=J("personal-layer"),[u,d]=b.useState(e),[h,f]=b.useState(!1),[m,p]=b.useState(!1),x=b.useRef(null);b.useEffect(()=>{var S;a&&((S=x.current)==null||S.focus())},[a]);const v=u.trim(),g=v.length>0&&v!==e.trim(),y=async()=>{if(g){f(!0);try{await t(v)}finally{f(!1)}}},w=async()=>{if(r){p(!0);try{await r()}finally{p(!1)}}};return l.jsxs("div",{className:o,"data-testid":"inline-note-editor",children:[l.jsx(Io,{ref:x,value:u,onChange:S=>d(S.target.value),maxLength:i,rows:4,placeholder:s??c("note.placeholder"),"aria-label":c("note.editorAria"),disabled:h||m}),l.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[l.jsx("div",{children:r?l.jsx(ce,{type:"button",variant:"destructive",size:"sm",onClick:w,isLoading:m,disabled:h,"data-testid":"note-delete",children:c("note.delete")}):null}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:h||m,"data-testid":"note-cancel",children:c("note.cancel")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:y,isLoading:h,disabled:!g||m,"data-testid":"note-save",children:c("note.save")})]})]})]})}const wut="data-block-index";function Qq(e,t){let n=e;for(;n;){if(n.nodeType===Node.ELEMENT_NODE){const r=n;if(r.hasAttribute(t))return r}n=n.parentNode}return null}function Zq(e,t,n){var a;if(t===e)return n;let r=0;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let s=i.nextNode();for(;s;){if(s===t)return r+n;r+=((a=s.nodeValue)==null?void 0:a.length)??0,s=i.nextNode()}return r}function Sut(e={}){const{blockAttr:t=wut,enabled:n=!0}=e,[r,i]=b.useState(null),s=b.useRef(n);s.current=n;const a=b.useCallback(()=>{if(!s.current||typeof window>"u")return;const c=window.getSelection();if(!c||c.isCollapsed||c.rangeCount===0){i(null);return}const u=c.getRangeAt(0),d=Qq(u.startContainer,t),h=Qq(u.endContainer,t);if(!d||!h||d!==h){i(null);return}const f=c.toString();if(!f.trim()){i(null);return}const m=Number.parseInt(d.getAttribute(t)??"",10);if(!Number.isFinite(m)||m<0){i(null);return}const p=Zq(d,u.startContainer,u.startOffset),x=Zq(d,u.endContainer,u.endOffset),v=typeof u.getBoundingClientRect=="function"?u.getBoundingClientRect():{x:0,y:0,top:0,left:0,right:0,bottom:0,width:0,height:0,toJSON:()=>({})};i({rect:v,text:f,blockEl:d,blockIndex:m,startOffset:Math.min(p,x),endOffset:Math.max(p,x)})},[t]);b.useEffect(()=>{if(!n){i(null);return}if(typeof document>"u")return;const c=()=>{a()},u=()=>{a()};return document.addEventListener("selectionchange",c),document.addEventListener("pointerup",u),()=>{document.removeEventListener("selectionchange",c),document.removeEventListener("pointerup",u)}},[n,a]);const o=b.useCallback(()=>{i(null)},[]);return b.useMemo(()=>({selection:r,clearSelection:o}),[r,o])}const kS={YELLOW:"colors.yellow",GREEN:"colors.green",BLUE:"colors.blue",PINK:"colors.pink"};function Cut(e){switch(e.type){case"text":return e.content;case"callout":return`${e.title}: ${e.content}`;case"definition":return`${e.term} â ${e.definition}`;case"key_takeaway":return e.items.join("; ");case"code":return e.title??e.language;default:return null}}function kut(e){switch(e.type){case"text":return e.content;case"callout":return e.content;case"definition":return e.definition;case"key_takeaway":return e.items.join(` 1683`);default:return null}}function _ut({blocks:e,personalLayer:t,stepKey:n,className:r,activeBlockIndex:i=null,activeSentenceIndex:s=null,activeWordIndex:a=null}){const{t:o}=J("personal-layer"),c=b.useMemo(()=>Array.isArray(e)?e.filter(eL):[],[e]),{selection:u,clearSelection:d}=Sut({enabled:!0}),[h,f]=b.useState(null),[m,p]=b.useState(null),x=b.useMemo(()=>({YELLOW:o(kS.YELLOW),GREEN:o(kS.GREEN),BLUE:o(kS.BLUE),PINK:o(kS.PINK)}),[o]),v=b.useCallback(async()=>{u&&(await t.handleHighlight({blockIndex:u.blockIndex,startOffset:u.startOffset,endOffset:u.endOffset,highlightedText:u.text}),d())},[u,t,d]),g=b.useCallback(()=>{u&&p(u.blockIndex)},[u]),y=b.useCallback(async()=>
1683{if(u){if(typeof navigator<"u"&&navigator.clipboard)try{await navigator.clipboard.writeText(u.text)}catch{}d()}},[u,d]),w=b.useCallback(C=>{const k=C.trim();k&&(qtt(k),d())},[d]),S=b.useMemo(()=>[{id:"highlight",label:o("tooltip.highlight"),icon:l.jsx(CQ,{className:"h-3.5 w-3.5","aria-hidden":"true"}),onClick:()=>{v()}},{id:"note",label:o("tooltip.note"),icon:l.jsx(VM,{className:"h-3.5 w-3.5","aria-hidden":"true"}),onClick:g},{id:"copy",label:o("tooltip.copy"),icon:l.jsx(wQ,{className:"h-3.5 w-3.5","aria-hidden":"true"}),onClick:()=>{y()}}],[o,v,g,y]);return l.jsxs("div",{className:r,"data-testid":"annotated-content",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-end gap-3",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("colorPicker.label")}),l.jsx($ae,{value:t.activeColor,onChange:t.setActiveColor,label:o("colorPicker.label"),colorLabels:x})]}),l.jsx("div",{"data-step":n,className:"space-y-6",children:c.map((C,k)=>{var A;const _=Cut(C),E=kut(C);return l.jsxs(but,{blockIndex:k,blockToken:`${n}-${k}`,blockText:E,highlights:t.getHighlightsForBlock(k),notes:t.getNotesForBlock(k),bookmarks:t.getBookmarksForBlock(k),bookmarkNumber:t.getBookmarkNumber(k),bookmarkLabel:t.isBookmarked(k)?o("bookmark.removeAria"):o("bookmark.addAria"),onClickNoteMarker:j=>f(j),onToggleBookmark:()=>{t.handleToggleBookmark({blockIndex:k,blockPreview:_})},children:[l.jsx(xle,{blocks:[C],renderAiDisclosure:!1,activeBlockIndex:k===i?0:null,activeSentenceIndex:k===i?s:null,activeWordIndex:k===i?a:null}),m===k?l.jsx("div",{className:"mt-3 rounded-lg border border-border bg-card p-3",children:l.jsx(B5,{onCancel:()=>p(null),onSave:async j=>{await t.handleAddNote({blockIndex:k,content:j}),p(null)}})}):null,h&&t.getNotesForBlock(k).some(j=>j.id===h)?l.jsx("div",{className:"mt-3 rounded-lg border border-border bg-card p-3",children:l.jsx(B5,{initialBody:((A=t.notes.find(j=>j.id===h))==null?void 0:A.content)??"",onCancel:()=>f(null),onSave:async j=>{await t.handleSaveNote({id:h,content:j}),f(null)},onDelete:async()=>{await t.handleDeleteNote(h),f(null)}})}):null]},`${n}-${k}`)})}),l.jsx(ple,{}),l.jsx(Uae,{selection:u?{rect:u.rect,text:u.text}:null,actions:S,onDismiss:d,ariaLabel:o("tooltip.ariaLabel"),onAskArthur:w,askArthurLabel:o("tooltip.askArthur")})]})}const yv=e=>["bookmarks",e.courseId,e.week,e.day,e.lesson];function Tut(e){return At({queryKey:yv(e),queryFn:()=>_e.get(he.BOOKMARKS,{params:e}),enabled:!!e.courseId,staleTime:3e4})}function Eut(){const e=Tt();return rt({mutationFn:t=>_e.post(he.BOOKMARKS,t),onMutate:async t=>{const n=yv({courseId:t.courseId,week:t.week,day:t.day,lesson:t.lesson});await e.cancelQueries({queryKey:n});const r=e.getQueryData(n)??[],i={id:`optimistic-${Date.now()}`,userId:"optimistic",courseId:t.courseId,week:t.week,day:t.day,lesson:t.lesson,stepKey:t.stepKey,blockIndex:t.blockIndex,scope:t.scope,blockPreview:t.blockPreview??null,createdAt:new Date().toISOString()};return e.setQueryData(n,[...r,i]),{previous:r,key:n}},onError:(t,n,r)=>{r!=null&&r.previous&&(r!=null&&r.key)&&e.setQueryData(r.key,r.previous)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:yv({courseId:r.courseId,week:r.week,day:r.day,lesson:r.lesson})}),e.invalidateQueries({queryKey:["library"]})}})}function Hue(){const e=Tt();return rt({mutationFn:({id:t})=>_e.del(he.bookmark(t)),onMutate:async({id:t,locator:n})=>{if(!n)return{previous:null,key:null};const r=yv(n);await e.cancelQueries({queryKey:r});const i=e.getQueryData(r)??[];return e.setQueryData(r,i.filter(s=>s.id!==t)),{previous:i,key:r}},onError:(t,n,r)=>{r!=null&&r.previous&&(r!=null&&r.key)&&e.setQueryData(r.key,r.previous)},onSettled:(t,n,{locator:r})=>
1683{r?e.invalidateQueries({queryKey:yv(r)}):e.invalidateQueries({queryKey:["bookmarks"]}),e.invalidateQueries({queryKey:["library"]})}})}const bv=e=>["highlights",e.courseId,e.week,e.day,e.lesson];function jut(e){return At({queryKey:bv(e),queryFn:()=>_e.get(he.HIGHLIGHTS,{params:e}),enabled:!!e.courseId,staleTime:3e4})}function Nut(){const e=Tt();return rt({mutationFn:t=>_e.post(he.HIGHLIGHTS,t),onMutate:async t=>{const n=bv({courseId:t.courseId,week:t.week,day:t.day,lesson:t.lesson});await e.cancelQueries({queryKey:n});const r=e.getQueryData(n)??[],i={id:`optimistic-${Date.now()}`,userId:"optimistic",courseId:t.courseId,week:t.week,day:t.day,lesson:t.lesson,stepKey:t.stepKey,blockIndex:t.blockIndex,startOffset:t.startOffset,endOffset:t.endOffset,highlightedText:t.highlightedText,color:t.color,createdAt:new Date().toISOString()};return e.setQueryData(n,[...r,i]),{previous:r,key:n}},onError:(t,n,r)=>{r!=null&&r.previous&&(r!=null&&r.key)&&e.setQueryData(r.key,r.previous)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:bv({courseId:r.courseId,week:r.week,day:r.day,lesson:r.lesson})}),e.invalidateQueries({queryKey:["library"]})}})}function Aut(){const e=Tt();return rt({mutationFn:({id:t})=>_e.del(he.highlight(t)),onMutate:async({id:t,locator:n})=>{if(!n)return{previous:null,key:null};const r=bv(n);await e.cancelQueries({queryKey:r});const i=e.getQueryData(r)??[];return e.setQueryData(r,i.filter(s=>s.id!==t)),{previous:i,key:r}},onError:(t,n,r)=>{r!=null&&r.previous&&(r!=null&&r.key)&&e.setQueryData(r.key,r.previous)},onSettled:(t,n,{locator:r})=>
1683{r?e.invalidateQueries({queryKey:bv(r)}):e.invalidateQueries({queryKey:["highlights"]}),e.invalidateQueries({queryKey:["library"]})}})}function Mut(e){if(typeof e.blockIndex=="number")return e.blockIndex;if(!e.anchorBlockId)return null;const t=Number.parseInt(e.anchorBlockId,10);return Number.isFinite(t)?t:null}function Rut(e){const{t}=J("personal-layer"),n=b.useMemo(()=>({courseId:e.courseId,week:e.week,day:e.day,lesson:e.lesson}),[e.courseId,e.week,e.day,e.lesson]),[r,i]=b.useState("YELLOW"),s=jut(n),a=HD(n),o=Tut(n),c=Nut(),u=_tt(),d=UD(),h=VD(),f=Eut(),m=Hue(),p=s.data??[],x=a.data??[],v=o.data??[],g=b.useCallback(async $=>{try{const B={courseId:e.courseId,week:e.week,day:e.day,lesson:e.lesson,stepKey:e.currentStepKey,blockIndex:$.blockIndex,startOffset:$.startOffset,endOffset:$.endOffset,highlightedText:$.highlightedText,color:r};return await c.mutateAsync(B)}catch{return Vt.error(t("toast.highlightError")),null}},[e.courseId,e.week,e.day,e.lesson,e.currentStepKey,r,c,t]),y=b.useCallback(async $=>{try{const B=await u.mutateAsync({courseId:e.courseId,week:e.week,day:e.day,lesson:e.lesson,stepKey:e.currentStepKey,content:$.content,anchor:$.anchor?{blockIndex:$.blockIndex,start:$.anchor.startOffset,end:$.anchor.endOffset,quote:$.anchor.highlightedText}:void 0});return Vt.success(t("toast.noteSaved")),B}catch{return Vt.error(t("toast.noteError")),null}},[e.courseId,e.week,e.day,e.lesson,e.currentStepKey,u,t]),w=b.useCallback(async $=>{try{const B=await d.mutateAsync({id:$.id,data:{content:$.content}});return Vt.success(t("toast.noteSaved")),B}catch{return Vt.error(t("toast.noteError")),null}},[d,t]),S=b.useCallback(async $=>{try{await h.mutateAsync($)}catch{Vt.error(t("toast.noteError"))}},[h,t]),C=b.useMemo(()=>v.filter($=>$.stepKey===e.currentStepKey),[v,e.currentStepKey]),k=b.useCallback($=>C.some(B=>B.blockIndex===$),[C]),_=b.useCallback(async $=>{const B=C.find(z=>z.blockIndex===$.blockIndex);try{B?(await m.mutateAsync({id:B.id,locator:n}),Vt.success(t("toast.bookmarkRemoved"))):(await f.mutateAsync({courseId:e.courseId,week:e.week,day:e.day,lesson:e.lesson,stepKey:e.currentStepKey,blockIndex:$.blockIndex,scope:"BLOCK",blockPreview:$.blockPreview}),Vt.success(t("toast.bookmarkAdded")))}catch{Vt.error(t("toast.bookmarkError"))}},[C,m,f,n,e.courseId,e.week,e.day,e.lesson,e.currentStepKey,t]),E=b.useCallback($=>p.filter(B=>B.blockIndex===$),[p]),A=b.useCallback($=>x.filter(B=>Mut(B)===$),[x]),j=b.useCallback($=>C.filter(B=>B.blockIndex===$),[C]),D=b.useMemo(()=>{const $=[...v].sort((z,O)=>new Date(z.createdAt).getTime()-new Date(O.createdAt).getTime()),B=new Map;return $.forEach((z,O)=>{B.set(`${z.stepKey}:${z.blockIndex}`,O+1)}),B},[v]),M=b.useCallback($=>D.get(`${e.currentStepKey}:${$}`)??null,[D,e.currentStepKey]);return{highlights:p,notes:x,bookmarks:v,isLoading:s.isLoading||a.isLoading||o.isLoading,activeColor:r,setActiveColor:i,handleHighlight:g,handleAddNote:y,handleSaveNote:w,handleDeleteNote:S,handleToggleBookmark:_,isBookmarked:k,getHighlightsForBlock:E,getNotesForBlock:A,getBookmarksForBlock:j,getBookmarkNumber:M}}function Out(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable||e.closest('[role="dialog"]'))}function Dut(e){const{enabled:t,stepCount:n,currentIndex:r,maxNavigableIndex:i,onJump:s}=e;b.useEffect(()=>{if(!t||n===0||typeof window>"u")return;const a=o=>{if(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey||Out(o.target))return;const c=n-1;let u=null;switch(o.key){case"ArrowLeft":u=Math.max(0,r-1);break;case"ArrowRight":u=Math.min(c,r+1);break;case"Home":u=0;break;case"End":u=c;break;default:return}u===null||u===r||u>i||(o.preventDefault(),s(u))};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[t,n,r,i,s])}const Lut=2500;function Put(e){const{initialAnchor:t,toastTimeoutMs:n=Lut}=e,[r,i]=b.useState(0),[s,a]=b.useState(-1),[o,c]=b.useState(null),[u,d]=b.useState(null),[h,f]=b.useState(null),[m,p]=b.useState(null),[x,v]=b.useState(null),[g,y]=b.useState(null),w=b.useRef(Date.now()),S=b.useRef({stepKey:t.stepKey,anchorBlockId:t.anchorBlockId}),C=b.useCallback(()=>{w.current=Date.now()},[]),k=b.useCallback(()=>{i(0),a(-1),c(null),d(null),f(null),p(null),w.current=Date.now()},[]);return b.useEffect(()=>{if(!x)return;const _=window.setTimeout(()=>v(null),n);return()=>window.clearTimeout(_)},[x,n]),{stepIndex:r,setStepIndex:i,highestCompleted:s,setHighestCompleted:a,practiceScore:o,setPracticeScore:c,practiceStartTs:u,setPracticeStartTs:d,adaptive:h,setAdaptive:f,nextCoords:m,setNextCoords:p,toast:
1683x,setToast:v,pulseBlockId:g,setPulseBlockId:y,stepStartedAtRef:w,initialAnchorRef:S,markStepStart:C,reset:k}}function Iut(e,t={week:1,day:1,lesson:1}){const n=Number(e.get("w")),r=Number(e.get("d")),i=Number(e.get("l"));return{week:Number.isFinite(n)&&n>0?n:t.week,day:Number.isFinite(r)&&r>0?r:t.day,lesson:Number.isFinite(i)&&i>0?i:t.lesson}}function Fut(){var ge,Me,ut,Ct,yn,un,en,Rr,Ei,li,V,te;const{t:e}=J("lesson"),t=St(),{courseId:n}=Ec(),[r,i]=ps(),s=Iut(r),a=wct(n,s),o=Sct(),c=kct(),u=gs(),d=Dst(a.error),h=Ice(d?n:void 0),f=d&&h.data?h.data.customName??h.data.name:void 0,{stepIndex:m,setStepIndex:p,highestCompleted:x,setHighestCompleted:v,practiceScore:g,setPracticeScore:y,practiceStartTs:w,setPracticeStartTs:S,adaptive:C,setAdaptive:k,nextCoords:_,setNextCoords:E,toast:A,setToast:j,pulseBlockId:D,setPulseBlockId:M,stepStartedAtRef:$,initialAnchorRef:B,reset:z}=Put({initialAnchor:{stepKey:r.get("s"),anchorBlockId:r.get("anchorBlockId")}}),O=((ge=a.data)==null?void 0:ge.status)==="ready"?a.data:null,[P,I]=b.useState(null),q=(C==null?void 0:C.decision)==="REMEDIATE"&&(P==null?void 0:P.kind)==="review"||(C==null?void 0:C.decision)==="DEEP_DIVE"&&(P==null?void 0:P.kind)==="stretch"?P.kind:null,R=a.data&&a.data.status!=="ready"?a.data:null,xe=((Me=O==null?void 0:O.lessonNode)==null?void 0:Me.title)??(R==null?void 0:R.title)??f??(R||a.isLoading?e("preparingTitle"):e("untitledLesson"));b.useEffect(()=>{z()},[s.week,s.day,s.lesson,z]);const me=b.useMemo(()=>O?Array.isArray(O.stepOrder)?O.stepOrder:[]:[],[O]),U=b.useMemo(()=>O?Array.isArray(O.practiceQuestions)?O.practiceQuestions:[]:[],[O]),ae=b.useMemo(()=>!O||!O.steps||typeof O.steps!="object"?{}:O.steps,[O]),Ce=me[m]??null,je=Ce===jj,ve=me.length>0&&m===me.length-1;b.useEffect(()=>{if(me.length===0)return;const W=B.current.stepKey;if(!W)return;const ye=me.indexOf(W);ye>=0&&ye!==m&&(p(ye),v(fe=>Math.max(fe,ye-1)),$.current=Date.now())},[me,m]),b.useEffect(()=>{if(me.length===0)return;const W=B.current.anchorBlockId;if(!W)return;const ye=window.setTimeout(()=>{const fe=document.getElementById("lesson-content"),Ne=fe==null?void 0:fe.querySelector(`[data-block-index="${CSS.escape(W)}"]`);Ne&&(Ne.scrollIntoView({behavior:"smooth",block:"center"}),M(W),j(e("anchor.landed")),window.setTimeout(()=>M(null),2200));const ke=new URLSearchParams(r);ke.delete("s"),ke.delete("anchorBlockId"),i(ke,{replace:!0}),B.current={stepKey:null,anchorBlockId:null}},80);return()=>window.clearTimeout(ye)},[me,m,e,r,i]),b.useEffect(()=>{if(me.length===0)return;const W=ye=>{const fe=ye.detail;if(!fe||typeof fe.blockIndex!="number")return;const Ne=String(fe.blockIndex);if(fe.stepKey){const ke=me.indexOf(fe.stepKey);ke>=0&&ke!==m&&(p(ke),v(ze=>Math.max(ze,ke-1)))}window.setTimeout(()=>{const ke=document.getElementById("lesson-content"),ze=ke==null?void 0:ke.querySelector(`[data-block-index="${CSS.escape(Ne)}"]`);ze&&(ze.scrollIntoView({behavior:"smooth",block:"center"}),M(Ne),window.setTimeout(()=>M(null),2200))},120)};return window.addEventListener(Z7,W),()=>window.removeEventListener(Z7,W)},[me,m,p,v,M]);const Te=b.useMemo(()=>l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-edition-deeper",children:e("coords",{week:s.week,day:s.day,lesson:s.lesson})}),l.jsx("h1",{className:"mt-1 line-clamp-2 text-page-title font-light max-sm:text-lg",children:xe})]}),[e,s.week,s.day,s.lesson,xe]),Se=b.useMemo(()=>l.jsx($i,{label:e("backToCourse"),onClick:()=>n&&t(Wa(n))}),[e,n,t]);On({left:Te,actions:Se});const He=Rut({courseId:n??"",week:s.week,day:s.day,lesson:s.lesson,currentStepKey:Ce??""}),tt=b.useMemo(()=>{if(je||!Ce)return[];const W=ae[Ce];return!W||!Array.isArray(W.blocks)?[]:W.blocks.filter(eL)},[ae,Ce,je]),we=Hce(),Oe=qce(),Je=((ut=we.data)==null?void 0:ut.enabled)??!1,It=(Ct=we.data)==null?void 0:Ct.voiceId,mt=((yn=we.data)==null?void 0:yn.speed)??1,De=Pct({courseId:n??"",week:s.week,day:s.day,lesson:s.lesson,step:Ce??"",blocks:tt,voiceId:It,speed:mt}),Pe=async()=>{if(!n||!Ce)return;const W=Date.now()-$.current,ye={courseId:n,week:s.week,day:s.day,lesson:s.lesson,stepKey:Ce,timeMs:W,...je&&g!==null?{practiceScorePct:g,practiceTimeMs:w?Date.now()-w:W}:{}},fe=await o.mutateAsync(ye);if(v(Ne=>Math.max(Ne,m)),ve){E(fe.nextCoords),I(fe.supplementary??null),fe.adaptiveDecision?k(fe.adaptiveDecision):fe.lessonCompleted?t(Wa(n)):fe.nextCoords?t(ts(n,fe.nextCoords.week,fe.nextCoords.day,fe.nextCoords.lesson)):t(Wa(n));return}p(Ne=>Ne+1),$.current=Date.now(),Ce&&Ce!==jj&&me[m+1]===jj&&S(Date.now())},ct=W=>{if(W>x+1){j(e("sidebar.locked"));return}p(W),$.current=Date.now()};if(Dut({enabled:me.length>0&&!je,stepCount:me.length,currentIndex:m,maxNavigableIndex:x+1,onJump:ct}),a.isLoading)return l.jsx(CS,{message:e("preparing.body")});if(a.isError||!a.data){const W=a.error,ye=(un=W==null?void 0:W.response)==null?void 0:un.status,fe=(Rr=(en=W==null?void 0:W.response)==null?void 0:en.data)==null?void 0:Rr.error,Ne=ye===403&&fe==="previous_lesson_locked";if(d&&n){if(h.isLoading)return l.jsx(CS,{});const ke=h.data,{position:ze,total:et}=Pst(ke==null?void 0:ke.curriculum,s);return l.jsx(Ect,{courseId:n,courseTitle:ke?ke.customName??ke.name:"",lessonNumber:ze,totalLessons:et,price:Number((ke==null?void 0:ke.price)??0),pack:(ke==null?void 0:ke.pack)??null,onUnlocked:Fe=>t(lx(Fe)),onBack:()=>t(Wa(n))})}if(Ne){const ke=(Ei=u.data)==null?void 0:Ei.find(Fe=>Fe.courseId===n),ze=ke?{week:ke.progress.currentWeek,day:ke.progress.currentDay,lesson:ke.progress.currentLesson}:null,et=!!ze&&ze.week===s.week&&ze.day===s.day&&ze.lesson===s.lesson;return l.jsx("div",{className:"rounded-2xl border border-border bg-card p-6",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-edition-pale text-primary",children:l.jsx(Di,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h1",{className:"text-section-title",children:e("error.previousLessonLocked.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-ink",children:((V=(li=W==null?void 0:W.response)==null?void 0:li.data)==null?void 0:V.message)??e("error.previousLessonLocked.body")}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[ze&&n&&!et&&l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ts(n,ze.week,ze.day,ze.lesson)),isLoading:u.isLoading,children:e("error.previousLessonLocked.openCurrent")}),l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(ee.ME_COURSES),children:e("error.backToCourses")})]})]})]})})}return l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h1",{className:"text-section-title",children:e("error.title")}),l.jsx("p",{className:"mt-2 text-sm text-muted-ink",children:((te=a.error)==null?void 0:te.message)??e("error.body")}),l.jsx(ce,{type:"button",variant:"ghost",className:"mt-4",onClick:()=>t(ee.ME_COURSES),children:e("error.backToCourses")})]})}if(a.data.status!=="ready")return l.jsx(CS,{message:a.data.message});if(!O)return l.jsx(CS,{});if(!Ce||me.length===0)return l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h1",{className:"text-section-title",children:e("error.noSteps.title")}),l.jsx("p",{className:"mt-2 text-sm text-muted-ink",children:e("error.noSteps.body")}),l.jsxs("div",{className:"mt-4 flex gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(0),children:e("back")}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_COURSES),children:e("error.backToCourses")})]})]});const Tn=je&&U.length===0,Nn=!je||g!==null||Tn,ln=()=>{n&&(k(null),t(_?ts(n,_.week,_.day,_.lesson):Wa(n)))},Bn=()=>{!n||!P||(k(null),t(fet(n,P.kind,s,_)))},Sn=()=>{k(null),p(0),v(-1),$.current=Date.now()},zr=()=>{!n||!_||c.mutate({courseId:n,week:_.week,day:_.day,lesson:_.lesson},{onSuccess:W=>{k(null),W.next?t(ts(n,W.next.week,W.next.day,W.next.lesson)):t(Wa(n))},onError:()=>{k(null),j(e("adaptive.skipUnavailable")),t(ts(n,_.week,_.day,_.lesson))}})},or=je?null:ae[Ce]??null;return l.jsxs("div",{className:"space-y-4 pb-24 md:pb-4",children:[l.jsx(Xct,{stepOrder:me,currentIndex:m,highestCompletedIndex:x}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-[220px_1fr]",children:[l.jsx("div",{className:"hidden md:block",children:l.jsx(Yct,{stepOrder:me,currentIndex:m,highestCompletedIndex:x,onJump:ct,onNotify:W=>j(W)})}),l.jsxs("main",{id:"lesson-content",className:"reading-surface min-w-0 space-y-5 rounded-2xl border border-border p-6 sm:p-8",children:[l.jsx(Kct,{stepOrder:me,currentIndex:m,highestCompletedIndex:x,onJump:ct,onNotify:W=>j(W)}),l.jsx("h2",{className:"text-section-title",children:e("stepNames."+Ce,{defaultValue:Ce})}),l.jsx(NO,{fallback:l.jsxs("div",{className:"rounded-xl border border-clay/40 bg-clay/[0.06] p-4 text-sm text-clay",children:[l.jsx("p",{className:"font-semibold",children:e("error.stepRender.title")}),l.jsx("p",{className:"mt-1 text-body-ink",children:e("error.stepRender.body")})]}),children:je?l.jsx(dut,{courseId:n,coords:s,questions:U,onAllAnswered:W=>{y(W),w||S(Date.now())}}):or&&Array.isArray(or.blocks)?l.jsx(_ut,{blocks:or.blocks,personalLayer:He,stepKey:Ce,activeBlockIndex:De.currentBlockIndex,activeSentenceIndex:De.activeSentenceIndex,activeWordIndex:De.activeWordIndex}):l.jsx(Pue,{stepKey:Ce,blocks:or})}),je&&g===null?l.jsx("p",{className:"text-xs text-muted-ink",children:e(Tn?"practice.emptyContinuePrompt":"practice.answerAllPrompt")}
1683):null,l.jsx(Qct,{onPrev:()=>ct(Math.max(0,m-1)),onNext:()=>void Pe(),isFirstStep:m===0,isLastStep:ve,isNextDisabled:!Nn,isLoading:o.isPending,isPracticeStep:je,nextStepName:ve?void 0:e("stepNames."+(me[m+1]??""),{defaultValue:me[m+1]??""})})]})]}),A&&l.jsx("div",{role:"status",className:"fixed bottom-4 right-4 rounded-xl bg-strong px-4 py-2.5 text-sm font-medium text-on-dark shadow-overlay",children:A}),D?l.jsx("style",{children:`#lesson-content [data-block-index="${CSS.escape(D)}"] { 1684 animation: ple-anchor-pulse 2s ease-in-out; 1685 } 1686 @keyframes ple-anchor-pulse { 1687 0%, 100% { box-shadow: 0 0 0 0 transparent; background-color: transparent; } 1688 50% { box-shadow: 0 0 0 4px rgba(74, 79, 158, 0.22); background-color: rgba(74, 79, 158, 0.06); } 1689 }`}):null,l.jsx(hut,{open:!!C,outcome:C,onConfirm:(C==null?void 0:C.decision)==="SKIP"?zr:ln,onAlternate:(C==null?void 0:C.decision)==="SKIP"?ln:(C==null?void 0:C.decision)==="REMEDIATE"?q==="review"?Bn:Sn:(C==null?void 0:C.decision)==="DEEP_DIVE"&&q==="stretch"?Bn:null,alternateLabel:q==="review"?e("adaptive.reviewLesson"):q==="stretch"?e("adaptive.stretchLesson"):void 0,note:q==="review"?e("adaptive.reviewNote"):q==="stretch"?e("adaptive.stretchNote"):void 0,onDismiss:q?()=>k(null):void 0}),Je&&!je&&tt.length>0?l.jsxs(l.Fragment,{children:[l.jsx(hje,{state:De.playbackState,progressPercent:De.progressPercent,speed:mt,onToggle:()=>{De.playbackState==="idle"?De.play():De.playbackState==="playing"?De.pause():De.playbackState==="paused"&&De.resume()},onSpeedChange:W=>{Oe.mutate({speed:W})}}),l.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:De.playbackState==="loading"?e("audio.loading"):De.playbackState==="playing"?e("audio.playing",{label:De.currentBlockLabel}):De.playbackState==="paused"?e("audio.paused",{label:De.currentBlockLabel}):""})]}):null]})}function Gp(e){const t=Number(e);return Number.isFinite(t)&&t>0?t:null}function But(){const{t:e}=J("lesson"),t=St(),{courseId:n,kind:r}=Ec(),i=r==="stretch"?"stretch":"review",[s]=ps(),a={week:Gp(s.get("w"))??1,day:Gp(s.get("d"))??1,lesson:Gp(s.get("l"))??1},o=Gp(s.get("nw")),c=Gp(s.get("nd")),u=Gp(s.get("nl")),d=o&&c&&u?{week:o,day:c,lesson:u}:null,h=_ct(n,i,a),f=Tct(),m=h.data,p=(m==null?void 0:m.status)==="ready"?m:null,[x,v]=b.useState(!1);b.useEffect(()=>{const E=window.setTimeout(()=>v(!0),Rue);return()=>window.clearTimeout(E)},[]);const g=x&&(m==null?void 0:m.status)==="preparing",y=e(i==="stretch"?"extra.stretchEyebrow":"extra.reviewEyebrow"),w=(p==null?void 0:p.title)??e("extra.preparingTitle"),S=b.useMemo(()=>l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-edition-deeper",children:y}),l.jsx("h1",{className:"mt-1 line-clamp-2 text-page-title font-light max-sm:text-lg",children:w})]}),[y,w]);On({left:S});const C=()=>{n&&t(d?ts(n,d.week,d.day,d.lesson):Wa(n))},k=()=>{n&&f.mutate({courseId:n,kind:i,...a},{onSettled:C})},_=l.jsxs("div",{className:"flex flex-wrap gap-3",children:[p?l.jsx(ce,{type:"button",variant:"primary",size:"md",onClick:k,isLoading:f.isPending,children:e(d?"extra.done":"extra.doneToCourse")}):l.jsx(ce,{type:"button",variant:"primary",size:"md",onClick:C,children:e(d?"adaptive.CONTINUE.primary":"extra.back")}),i==="review"&&n?l.jsx(ce,{type:"button",variant:"outline",size:"md",onClick:()=>t(ts(n,a.week,a.day,a.lesson)),children:e("extra.redo")}):null,n?l.jsx(ce,{type:"button",variant:"ghost",size:"md",onClick:()=>t(Wa(n)),children:e("extra.back")}):null]});return h.isError?l.jsxs("div",{className:"mx-auto max-w-3xl space-y-6",children:[l.jsx("p",{role:"alert",className:"text-sm text-muted-ink",children:e("extra.notFound")}),_]}):p?l.jsxs("div",{className:"mx-auto max-w-3xl space-y-8","data-testid":"extra-lesson",children:[p.sections.map(E=>l.jsxs("section",{"aria-labelledby":`extra-${E.key}`,children:[l.jsx("h2",{id:`extra-${E.key}`,className:"mb-3 text-section-title",children:e(`extra.sections.${E.key}`,{defaultValue:E.key})}),l.jsx(Pue,{stepKey:E.key,blocks:{blocks:E.blocks}})]},E.key)),_]}):l.jsxs("div",{className:"mx-auto max-w-3xl space-y-6",children:[l.jsxs("section",{role:"status","aria-live":"polite",className:"rounded-2xl border border-border bg-card p-6","data-testid":"extra-preparing",children:[l.jsx("h2",{className:"text-section-title",children:e(g?"extra.slowTitle":"extra.preparingTitle")}),l.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-ink",children:e(g?"extra.slowBody":"extra.preparingBody")}),g?l.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"mt-4",onClick:()=>void h.refetch(),children:e("extra.retry")}):null]}),_]})}function zut(e){const t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function $ut({totalNotes:e,totalCourses:t,lastUpdatedAt:n}){const{t:r}=J("notes"),i=n?zut(n):null;return l.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground","aria-label":r("stats.ariaLabel"),children:[l.jsx("span",{children:r("stats.notes",{count:e})}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{children:r("stats.courses",{count:t})}),i&&l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{children:r("stats.updated",{date:i})})]})]})}const Uut=250,Vut="__key_takeaways";function Hut(e,t){return e===Vut?t:e}function qut({search:e,onSearchChange:t,sort:n,onSortChange:r,tags:i,activeTag:s,onTagChange:a}){const{t:o}=J("notes"),c=[{value:"updatedDesc",label:o("filters.sort.updatedDesc")},{value:"updatedAsc",label:o("filters.sort.updatedAsc")},{value:"createdDesc",label:o("filters.sort.createdDesc")},{value:"createdAsc",label:o("filters.sort.createdAsc")}];return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[l.jsx("div",{className:"flex-1 sm:max-w-md",children:l.jsx(Ex,{value:e,onSearch:t,debounceMs:Uut,placeholder:o("filters.searchPlaceholder"),"aria-label":o("filters.searchPlaceholder")})}),l.jsx(Ho,{options:c,value:n,onChange:u=>r(u),ariaLabel:o("filters.sort.ariaLabel"),className:"!h-10 w-44 text-sm"})]}),l.jsxs("div",{role:"group","aria-label":o("filters.tagChips.ariaLabel"),className:"flex flex-wrap gap-1.5",children:[l.jsx(Jq,{label:o("filters.tagChips.all"),isActive:s===null,onClick:()=>a(null)}),i.map(u=>l.jsx(Jq,{label:Hut(u,o("filters.tagChips.summary")),isActive:s===u,onClick:()=>a(u)},u))]})]})}function Jq({label:e,isActive:t,onClick:n}){return l.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:`rounded-full px-3 py-1 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${t?"bg-edition-pale text-edition-deeper":"border border-border bg-card text-muted-foreground hover:border-edition-soft hover:text-strong"}`,children:e})}function Gut({visibleCount:e,hasAnyExpanded:t,onExpandAll:n,onCollapseAll:r,children:i}){const{t:s}=J("notes");return l.jsxs("section",{className:"overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("header",{className:"flex items-center justify-between border-b border-border px-5 py-3",children:[l.jsx("h2",{className:"text-card-title",children:s("panel.title")}),l.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[l.jsx("button",{type:"button",onClick:n,disabled:t&&e===0,className:"font-medium text-primary hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:s("panel.expandAll")}),l.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground
1689/40",children:"|"}),l.jsx("button",{type:"button",onClick:r,disabled:!t,className:"font-medium text-muted-foreground hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:s("panel.collapseAll")})]})]}),l.jsx("p",{className:"border-b border-border px-5 py-2 text-xs text-muted-foreground",children:s("panel.showingCount",{count:e})}),l.jsx("div",{className:"px-5 py-4",children:i})]})}function Wut({note:e,courseLabel:t,isUpdating:n,isDeleting:r,onSave:i,onDelete:s}){const{t:a}=J("notes"),[o,c]=b.useState(!1),[u,d]=b.useState(e.content),h=o&&u.trim()!==""&&u.trim()!==e.content.trim();lL(h,async()=>{await i(e.id,u.trim()),c(!1)});const f=[t,e.week?`W${e.week}`:null,e.day?`D${e.day}`:null,e.lesson?`L${e.lesson}`:null,e.stepKey??null].filter(Boolean).join(" · ");return l.jsxs("article",{className:"rounded-xl border border-border bg-card p-4 transition-colors hover:border-edition-soft",children:[l.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:f}),l.jsxs("div",{className:"flex items-center gap-1",children:[!o&&l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:()=>{d(e.content),c(!0)},leftIcon:l.jsx(Lg,{className:"h-3.5 w-3.5"}),"aria-label":a("row.edit"),children:a("row.edit")}),l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:()=>s(e.id),disabled:r,leftIcon:l.jsx(Fg,{className:"h-3.5 w-3.5"}),className:"text-destructive hover:bg-destructive/10 hover:text-destructive","aria-label":a("row.delete"),children:a("row.delete")})]})]}),e.anchorText&&l.jsx("blockquote",{className:"mt-2 border-l-2 border-edition-soft pl-3 text-xs italic text-muted-foreground",children:e.anchorText}),o?l.jsxs("div",{className:"mt-3 space-y-2",children:[l.jsx(Io,{value:u,onChange:m=>d(m.target.value),rows:3,"aria-label":a("row.editAriaLabel")}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:()=>c(!1),children:a("row.cancel")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",isLoading:n,disabled:!u.trim(),onClick:()=>{Promise.resolve(i(e.id,u.trim())).catch(()=>{}),c(!1)},children:a("row.save")})]})]}):l.jsx("p",{className:"mt-3 whitespace-pre-wrap text-sm text-body-ink",children:e.content}),e.tags.length>0&&l.jsx("div",{className:"mt-3 flex flex-wrap gap-1",children:e.tags.map(m=>l.jsx("span",{className:"rounded-md bg-edition-pale px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-edition-deeper",children:m==="__key_takeaways"?a("row.summaryTag"):m},m))})]})}const Yut="__none__";function Kut(e){return e??Yut}function Xut({groups:e,expandedCourseIds:t,onToggleCourse:n,isUpdatingId:r,isDeletingId:i,onSaveNote:s,onDeleteNote:a}){const{t:o}=J("notes");return l.jsx("div",{className:"space-y-3",children:e.map(c=>{const u=Kut(c.courseId),d=t.has(u),h=c.notes.length;return l.jsxs("div",{className:"overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsxs("button",{type:"button",onClick:()=>n(u),"aria-expanded":d,"aria-controls":`notes-course-${u}`,className:"flex w-full items-center justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-edition-pale/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:[l.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[d?l.jsx(ad,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true",strokeWidth:1.75}):l.jsx(ns,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true",strokeWidth:1.75}),l.jsx("span",{className:"truncate text-card-title",children:c.courseLabel})]}),l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("accordion.noteCount",{count:h})})]}),d&&l.jsx("ul",{id:`notes-course-${u}`,className:"space-y-3 border-t border-border bg-cream/40 px-4 py-3",children:c.notes.map(f=>l.jsx("li",{children:l.jsx(Wut,{note:f,courseLabel:c.courseLabel,isUpdating:r===f.id,isDeleting:i===f.id,onSave:s,onDelete:a})},f.id))})]},u)})})}function Qut({filtersActive:e}){const{t}=J("notes");return l.jsxs("section",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[l.jsx(Vv,{className:"h-10 w-10 text-edition-soft","aria-hidden":"true",strokeWidth:1.75}),l.jsx("h3",{className:"text-card-title",children:t(e?"empty.filtersTitle":"empty.title")}),l.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:t(e?"empty.filtersBody":"empty.body")})]})}const Aj=25,eG=100,que="__none__";function tG(e){return e??que}function Zut(e,t,n){const r=n.startsWith("updated")?e.updatedAt:e.createdAt,i=n.startsWith("updated")?t.updatedAt:t.createdAt,s=new Date(r).getTime(),a=new Date(i).getTime();return n.endsWith("Asc")?s-a:a-s}function Jut(){const{t:e}=J("notes"),t=gs(),n=UD(),r=VD(),[i,s]=b.useState(""),[a,o]=b.useState("updatedDesc"),[c,u]=b.useState(null),[d,h]=b.useState(Aj),[f,m]=b.useState(new Set);b.useEffect(()=>{h(Aj)},[i]);const p=b.useMemo(()=>({...i?{search:i}:{},limit:d}
1689),[i,d]),x=ktt(p),v=b.useMemo(()=>x.data??[],[x.data]),g=v.length===d&&d<eG,y=b.useMemo(()=>c?v.filter(P=>P.tags.includes(c)):v,[v,c]),w=b.useMemo(()=>[...y].sort((P,I)=>Zut(P,I,a)),[y,a]),S=b.useMemo(()=>{const P=new Map;for(const I of t.data??[])P.set(I.courseId,I.name);return P},[t.data]),C=P=>P?S.get(P)??e("global.unknownCourse"):e("global.notLinked"),k=b.useMemo(()=>{const P=new Map;for(const I of w){const q=tG(I.courseId);P.has(q)||P.set(q,[]),P.get(q).push(I)}return Array.from(P.entries()).map(([I,q])=>{const R=I===que?null:I;return{courseId:R,courseLabel:C(R),notes:q}})},[w,S,e]),_=b.useMemo(()=>{const P=new Set;for(const I of v)I.courseId&&P.add(I.courseId);return P.size},[v]),E=b.useMemo(()=>{let P=null;for(const I of v){const q=new Date(I.updatedAt).getTime();Number.isFinite(q)&&(P===null||q>P)&&(P=q)}return P?new Date(P).toISOString():null},[v]),A=b.useMemo(()=>{const P=new Set;for(const I of v)for(const q of I.tags)P.add(q);return Array.from(P).sort((I,q)=>I.localeCompare(q))},[v]);b.useEffect(()=>{c&&!A.includes(c)&&u(null)},[A,c]);const j=()=>{m(new Set(k.map(P=>tG(P.courseId))))},D=()=>{m(new Set)},M=P=>{m(I=>{const q=new Set(I);return q.has(P)?q.delete(P):q.add(P),q})},$=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light",children:e("global.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("global.subtitle")})]}),[e]);On({left:$});const B=x.isLoading,z=x.isError,O=!!i||c!==null;return l.jsxs("div",{className:"space-y-4",children:[l.jsx($ut,{totalNotes:v.length,totalCourses:_,lastUpdatedAt:E}),l.jsx(qut,{search:i,onSearchChange:s,sort:a,onSortChange:o,tags:A,activeTag:c,onTagChange:u}),l.jsx(Gut,{visibleCount:w.length,hasAnyExpanded:f.size>0,onExpandAll:j,onCollapseAll:D,children:z?l.jsx("p",{role:"alert",className:"py-12 text-center text-sm text-destructive",children:e("errorBody")}):B?l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("loading")}):w.length===0?l.jsx(Qut,{filtersActive:O}):l.jsxs(l.Fragment,{children:[l.jsx(Xut,{groups:k,expandedCourseIds:f,onToggleCourse:M,isUpdatingId:n.isPending&&n.variables?n.variables.id:null,isDeletingId:r.isPending&&typeof r.variables=="string"?r.variables:null,onSaveNote:(P,I)=>n.mutateAsync({id:P,data:{content:I}}),onDeleteNote:P=>r.mutate(P)}),l.jsx(ey,{mode:"cursor",hasMore:g,isLoadingMore:x.isFetching&&!x.isLoading,onLoadMore:()=>h(P=>Math.min(P+Aj,eG)),summary:e("pagination.loadedSummary",{count:v.length}),labels:{loadMore:e("pagination.loadMore"),loading:e("pagination.loading"),allLoaded:e("pagination.allLoaded"),loadMoreAria:e("pagination.loadMoreAria")},className:"mt-2"})]})})]})}const Mj="__all__";function edt(){const{t:e}=J("library"),[t,n]=ps(),r=gs(),i=t.get("courseId")??Mj,s=t.get("search")??"",a=b.useMemo(()=>{const c=[{value:Mj,label:e("filters.course.all")}];for(const u of r.data??[])c.push({value:u.courseId,label:u.customName??u.name});return c},[r.data,e]),o=(c,u)=>{n(d=>{const h=new URLSearchParams(d);return u===null||u===""||u===Mj?h.delete(c):h.set(c,u),h},{replace:!0})};return l.jsxs("section",{"aria-label":e("filters.ariaLabel"),className:"flex w-full flex-col gap-2 sm:flex-row sm:items-center sm:justify-end",children:[l.jsx("div",{className:"min-w-0 flex-1 sm:max-w-xs",children:l.jsx(Ex,{value:s,onSearch:c=>o("search",c),placeholder:e("filters.search.placeholder"),"aria-label":e("filters.search.ariaLabel")})}),l.jsx(Ok,{label:e("filters.course.label"),options:a,value:i,onChange:c=>o("courseId",c),disabled:r.isLoading})]})}const tdt=160;function nG(e,t){const n=e instanceof Date?e:new Date(e);if(Number.isNaN(n.getTime()))return"";const r=Date.now()-n.getTime(),i=Math.round(r/1e3),s=Math.round(i/60),a=Math.round(s/60),o=Math.round(a/24);return i<60?t("card.relative.justNow"):s<60?t("card.relative.minutes",{count:s}):a<24?t("card.relative.hours",{count:a}):o<30?t("card.relative.days",{count:o}):n.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function ndt(e,t){return e.length<=t?e:`${e.slice(0,t).trimEnd()}â¦`}function rdt(e){switch(e){case"highlight":return{Icon:CQ,badgeLabelKey:"card.type.highlight",badgeClass:"bg-edition-deeper/10 text-edition-deeper",chipClass:"bg-edition-pale text-edition-deeper",accentClass:"before:bg-edition-deeper"};case"note":return{Icon:VM,badgeLabelKey:"card.type.note",badgeClass:"bg-slate-info/10 text-slate-info",chipClass:"bg-slate-info/10 text-slate-info",accentClass:"before:bg-slate-info"};case"bookmark":return{Icon:xQ,badgeLabelKey:"card.type.bookmark",badgeClass:"bg-clay/10 text-clay",chipClass:"bg-clay/10 text-clay",accentClass:"before:bg-clay"}}}function idt(e){if(e.type==="highlight"){const r=e.highlight;return{courseId:r.courseId,week:r.week,day:r.day,lesson:r.lesson,stepKey:r.stepKey,anchorBlockId:String(r.blockIndex)}}if(e.type==="bookmark"){const r=e.bookmark;return{courseId:r.courseId,week:r.week,day:r.day,lesson:r.lesson,stepKey:r.stepKey,anchorBlockId:String(r.blockIndex)}}const t=e.note,n=typeof t.blockIndex=="number"?String(t.blockIndex):t.anchorBlockId;return{courseId:t.courseId,week:t.week,day:t.day,lesson:t.lesson,stepKey:t.stepKey,anchorBlockId:n}}function sdt(e,t){return e.type==="highlight"?{text:e.highlight.highlightedText,emphasis:!0}:e.type==="note"?{text:ndt(e.note.content,tdt)}:{text:e.bookmark.blockPreview??t("card.preview.bookmarkFallback")}}function adt(e){return e.type==="highlight"?e.highlight.id:e.type==="note"?e.note.id:e.bookmark.id}
1689function odt(e){return e.type==="highlight"?e.highlight.createdAt:e.type==="note"?e.note.createdAt:e.bookmark.createdAt}function ldt({item:e,variant:t="card"}){var D;const{t:n}=J("library"),r=St(),[i,s]=b.useState(!1),[a,o]=b.useState(!1),c=Aut(),u=Hue(),d=VD(),h=UD(),f=rdt(e.type),m=f.Icon,p=idt(e),x=sdt(e,n),v=adt(e),g=odt(e),y=c.isPending||u.isPending||d.isPending,w=((D=e.course)==null?void 0:D.name)??n("card.course.missing"),S=[w,p.week!==null?n("card.breadcrumb.week",{week:p.week}):null,p.day!==null?n("card.breadcrumb.day",{day:p.day}):null,p.lesson!==null?n("card.breadcrumb.lesson",{lesson:p.lesson}):null].filter(M=>!!M).join(" · "),C=p.courseId!==null&&p.week!==null&&p.day!==null&&p.lesson!==null,k=()=>{if(!C)return;const M=met(p.courseId,p.week,p.day,p.lesson,{stepKey:p.stepKey,anchorBlockId:p.anchorBlockId});r(M)},_=()=>{e.type==="highlight"?c.mutate({id:v}):e.type==="bookmark"?u.mutate({id:v}):d.mutate(v),s(!1)},E=async M=>{e.type==="note"&&(await h.mutateAsync({id:v,data:{content:M}}),o(!1))},A=n("card.ariaLabel",{type:n(f.badgeLabelKey),course:w}),j=l.jsx($x,{open:i,onOpenChange:s,title:n(`card.confirmDelete.${e.type}.title`),description:n(`card.confirmDelete.${e.type}.description`),confirmLabel:n("card.confirmDelete.confirm"),cancelLabel:n("card.confirmDelete.cancel"),variant:"destructive",onConfirm:_,isLoading:y});return t==="row"?l.jsxs("div",{"aria-label":A,"data-testid":`library-row-${e.type}`,className:`group relative flex items-start gap-3 overflow-hidden rounded-lg border border-border bg-card px-3 py-2.5 transition-colors hover:border-edition-soft before:absolute before:inset-y-0 before:start-0 before:w-1 ${f.accentClass}`,children:[l.jsx("span",{className:`mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md ${f.chipClass}`,"aria-hidden":"true",children:l.jsx(m,{className:"h-3.5 w-3.5",strokeWidth:1.75})}),l.jsx("div",{className:"min-w-0 flex-1",children:a&&e.type==="note"?l.jsx(B5,{initialBody:e.note.content,onSave:E,onCancel:()=>o(!1)}):l.jsxs(l.Fragment,{children:[l.jsx("p",{className:`break-words text-sm leading-relaxed text-foreground ${x.emphasis?"italic":""}`,children:x.text}),l.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[l.jsx("span",{className:"font-medium",children:n(f.badgeLabelKey)})," · ",nG(g,n)]})]})}),!a&&l.jsxs("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100",children:[l.jsx(Pn,{type:"button",size:"sm",variant:"ghost","aria-label":n("card.actions.open"),onClick:k,disabled:!C,"data-testid":"library-row-open",children:l.jsx(gn,{className:"h-4 w-4","aria-hidden":"true"})}),e.type==="note"&&l.jsx(Pn,{type:"button",size:"sm",variant:"ghost","aria-label":n("card.actions.edit"),onClick:()=>o(!0),"data-testid":"library-row-edit",children:l.jsx(Lg,{className:"h-4 w-4","aria-hidden":"true"})}),l.jsx(Pn,{type:"button",size:"sm",variant:"ghost","aria-label":n("card.actions.delete"),onClick:()=>s(!0),"data-testid":"library-row-delete",children:l.jsx(Fg,{className:"h-4 w-4","aria-hidden":"true"})})]}),j]}):l.jsxs(ec,{"aria-label":A,className:`relative flex flex-col gap-3 overflow-hidden rounded-2xl border border-border bg-card p-[18px] transition-colors hover:border-edition-soft before:absolute before:inset-y-0 before:start-0 before:w-1 ${f.accentClass}`,"data-testid":`library-card-${e.type}`,children:[l.jsxs("header",{className:"flex items-center justify-between gap-2 ps-2",children:[l.jsx(Oi,{icon:l.jsx(m,{"aria-hidden":"true",strokeWidth:1.75}),className:`${f.badgeClass} text-[10px] font-semibold uppercase tracking-[0.08em]`,size:"sm",children:n(f.badgeLabelKey)}),l.jsx("time",{dateTime:new Date(g).toISOString(),className:"text-xs text-muted-foreground",children:nG(g,n)})]}),a&&e.type==="note"?l.jsx("div",{className:"ps-2",children:l.jsx(B5,{initialBody:e.note.content,onSave:E,onCancel:()=>o(!1)})}):l.jsx("blockquote",{className:`ps-2 text-sm leading-relaxed text-body-ink ${x.emphasis?"italic":""}`,children:x.text}),l.jsxs("div",{className:"mt-auto flex items-center gap-2 ps-2 pt-0.5",children:[l.jsx("span",{className:"inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-md bg-edition-pale text-primary","aria-hidden":"true",children:l.jsx(Ci,{className:"h-3.5 w-3.5",
1689strokeWidth:1.75})}),l.jsx("p",{className:"truncate text-xs font-medium text-muted-foreground",children:S})]}),l.jsxs("footer",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-border ps-2 pt-3",children:[l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:k,disabled:!C,rightIcon:l.jsx(gn,{"aria-hidden":"true"}),"data-testid":"library-card-open",children:n("card.actions.open")}),l.jsxs("div",{className:"flex items-center gap-2",children:[e.type==="note"&&!a&&l.jsx(ce,{type:"button",variant:"ghost",size:"sm",leftIcon:l.jsx(Lg,{"aria-hidden":"true"}),onClick:()=>o(!0),"data-testid":"library-card-edit",children:n("card.actions.edit")}),l.jsx(ce,{type:"button",variant:"ghost",size:"sm",leftIcon:l.jsx(Fg,{"aria-hidden":"true"}),onClick:()=>s(!0),isLoading:y,"data-testid":"library-card-delete",children:n("card.actions.delete")})]})]}),j]})}const cdt=["highlight","note","bookmark"],udt=[{value:null,labelKey:"filters.type.all"},{value:"highlight",labelKey:"filters.type.highlights"},{value:"note",labelKey:"filters.type.notes"},{value:"bookmark",labelKey:"filters.type.bookmarks"}],Qy="__orphan__",s0="__no_lesson__";function ddt(e){if(e)return cdt.includes(e)?e:void 0}function hdt(e){return e.type==="highlight"?`h:${e.highlight.id}`:e.type==="note"?`n:${e.note.id}`:`b:${e.bookmark.id}`}function Rj(e){const t=r=>{const s=(r instanceof Date?r:new Date(r)).getTime();return Number.isNaN(s)?0:s};if(e.type==="highlight"){const r=e.highlight;return{week:r.week,day:r.day,lesson:r.lesson,createdAtMs:t(r.createdAt)}}if(e.type==="bookmark"){const r=e.bookmark;return{week:r.week,day:r.day,lesson:r.lesson,createdAtMs:t(r.createdAt)}}const n=e.note;return{week:n.week,day:n.day,lesson:n.lesson,createdAtMs:t(n.createdAt)}}function fdt(e){const t=new Map;for(const r of e){const i=Rj(r),s=r.course===null,a=s?Qy:r.course.id,o=s?null:r.course.name;let c=t.get(a);
1689c||(c={key:a,courseId:s?null:r.course.id,courseName:o,itemCount:0,lessons:[]},t.set(a,c));const u=i.week===null||i.day===null||i.lesson===null?s0:`${i.week}.${i.day}.${i.lesson}`;let d=c.lessons.find(h=>h.key===u);d||(d={key:u,week:i.week,day:i.day,lesson:i.lesson,items:[]},c.lessons.push(d)),d.items.push(r),c.itemCount+=1}for(const r of t.values()){r.lessons.sort((i,s)=>i.key===s0&&s.key!==s0?-1:s.key===s0&&i.key!==s0?1:i.week!==s.week?(i.week??0)-(s.week??0):i.day!==s.day?(i.day??0)-(s.day??0):(i.lesson??0)-(s.lesson??0));for(const i of r.lessons)i.items.sort((s,a)=>{const o=Rj(s).createdAtMs;return Rj(a).createdAtMs-o})}const n=Array.from(t.values());return n.sort((r,i)=>r.key===Qy&&i.key!==Qy?1:i.key===Qy&&r.key!==Qy?-1:(r.courseName??"").localeCompare(i.courseName??"",void 0,{sensitivity:"base"})),n}function mdt(){var S;const{t:e}=J("library"),t=St(),[n,r]=ps(),i=b.useMemo(()=>({type:ddt(n.get("type")),courseId:n.get("courseId")??void 0,search:n.get("search")??void 0}),[n]),s=yue(i),a=b.useMemo(()=>{var C;return((C=s.data)==null?void 0:C.pages.flatMap(k=>k.data))??[]},[s.data]),o=b.useMemo(()=>fdt(a),[a]),c=a.length,u=i.type!==void 0||i.courseId!==void 0||(((S=i.search)==null?void 0:S.length)??0)>0,d=i.type??null,h=b.useMemo(()=>{const C={highlight:0,note:0,bookmark:0};for(const k of a)C[k.type]+=1;return C},[a]),f=b.useCallback(C=>{r(k=>{const _=new URLSearchParams(k);return C===null?_.delete("type"):_.set("type",C),_},{replace:!0})},[r]),[m,p]=b.useState({}),x=b.useCallback(C=>m[C]??u,[m,u]),v=b.useCallback(C=>p(k=>({...k,[C]:!(k[C]??u)})),[u]),g=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light",children:e("page.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:u?e("page.subtitleFiltered",{count:c}):e("page.subtitle")})]}),[e,u,c]);On({left:g});const y=()=>s.isError?l.jsx("p",{role:"alert",className:"rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-6 text-center text-sm text-destructive",children:e("page.error")}):s.isLoading?l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("page.loading")}):a.length===0?l.jsx(bc,{icon:l.jsx(LM,{"aria-hidden":"true"}),title:e(u?"page.empty.filtered.title":"page.empty.default.title"),description:e(u?"page.empty.filtered.description":"page.empty.default.description"),action:u?void 0:{label:e("page.empty.default.cta"),onClick:()=>t(ee.ME_COURSES)}}):l.jsxs(l.Fragment,{children:[l.jsx("div",{role:"region","aria-label":e("page.listAriaLabel"),className:"space-y-8",children:o.map(C=>{const k=C.courseName??e("group.personalNotes"),_=x(C.key),E=`library-course-panel-${C.key}`,A=`library-course-trigger-${C.key}`;return l.jsxs("section",{className:"overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsx("h2",{className:"m-0",children:l.jsxs("button",{type:"button",id:A,"aria-expanded":_,"aria-controls":E,onClick:()=>v(C.key),"data-testid":`library-course-toggle-${C.key}`,className:"flex w-full items-center justify-between gap-3 px-[18px] py-4 text-start transition-colors hover:bg-edition-pale/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:[l.jsxs("span",{className:"min-w-0",children:[l.jsx("span",{className:"block truncate text-card-title",children:k}),l.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:e("group.courseCount",{count:C.itemCount})})]}),l.jsx(ad,{className:`h-5 w-5 shrink-0 text-muted-foreground transition-transform ${_?"rotate-180":""}`,"aria-hidden":"true",strokeWidth:1.75})]})}),_&&l.jsx("div",{id:E,role:"region","aria-labelledby":A,className:"space-y-5 border-t border-border px-[18px] py-4",children:C.lessons.map(j=>{const D=`library-lesson-${C.key}-${j.key}`,M=j.key===s0?e("group.lessonUnscoped"):e("group.lesson",{week:j.week,day:j.day,lesson:j.lesson});return l.jsxs("section",{"aria-labelledby":D,className:"space-y-2",children:[l.jsxs("h3",{id:D,className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:[M,l.jsxs("span",{className:"ms-2 font-normal normal-case tracking-normal text-muted-foreground",children:["· ",e("group.lessonCount",{count:j.items.length})]})]}),l.jsx("ul",{"aria-label":e("group.lessonListAriaLabel",{lesson:M}),className:"flex flex-col gap-2",children:j.items.map($=>l.jsx("li",{children:l.jsx(ldt,{item:$,variant:"row"})},hdt($)))})]},j.key)})})]},C.key)})}),l.jsx(ey,{mode:"cursor",hasMore:!!s.hasNextPage,isLoadingMore:s.isFetchingNextPage,onLoadMore:()=>void s.fetchNextPage(),summary:e("page.loadedSummary",{count:c}
1689),labels:{loadMore:e("page.pagination.loadMore"),loading:e("page.pagination.loading"),allLoaded:e("page.pagination.allLoaded"),loadMoreAria:e("page.pagination.loadMoreAria")},className:"mt-2"})]}),w=!s.isLoading&&!s.isError&&a.length>0?l.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground",children:[l.jsx("span",{className:"font-semibold text-body-ink",children:e("page.loadedSummary",{count:c})}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{children:[h.highlight," ",e("filters.type.highlights")]}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{children:[h.note," ",e("filters.type.notes")]}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{children:[h.bookmark," ",e("filters.type.bookmarks")]})]}):null;return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("div",{role:"group","aria-label":e("filters.type.label"),className:"inline-flex gap-1 rounded-full border border-border bg-card p-1",children:udt.map(C=>{const k=d===C.value;return l.jsx("button",{type:"button","aria-pressed":k,"data-testid":`library-type-tab-${C.value??"all"}`,onClick:()=>f(C.value),className:`rounded-full px-4 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${k?"bg-edition-pale text-edition-deeper":"text-muted-foreground hover:text-strong"}`,children:e(C.labelKey)},C.value??"all")})}),l.jsx("div",{className:"flex min-w-0 flex-1 justify-end sm:max-w-md",children:l.jsx(edt,{})})]}),w,y()]})}function pdt(){const{t:e}=J("marketplace"),t=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title",children:e("list.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("list.subtitle")})]}),[e]);On({left:t});const n=b.useMemo(()=>[{id:"for-you",label:e("tabs.forYou"),path:ee.ME_MARKETPLACE_FOR_YOU},{id:"browse",label:e("tabs.browse"),path:ee.ME_MARKETPLACE_BROWSE},{id:"create",label:e("tabs.create"),path:ee.ME_MARKETPLACE_CREATE}],[e]);return l.jsxs("div",{className:"space-y-6",children:[l.jsx(Wte,{tabs:n,ariaLabel:e("tabs.ariaLabel")}),l.jsx($v,{})]})}const gdt=e=>["marketplace","rails",""],xdt=e=>["marketplace","course",e],ydt=e=>["marketplace","pack",e];function bdt(e){return At({queryKey:gdt(),queryFn:()=>_e.get(he.MARKETPLACE,{params:void 0}),staleTime:3e4})}const vdt=e=>["marketplace","catalog",e];function wdt(e,t){const n={sort:e.sort};return e.search&&(n.search=e.search),e.categoryId&&(n.categoryId=e.categoryId),e.level&&(n.level=e.level),e.price&&(n.price=e.price),e.priceMax!==void 0&&(n.priceMax=e.priceMax),e.durationMin!==void 0&&(n.durationMin=e.durationMin),e.durationMax!==void 0&&(n.durationMax=e.durationMax),t&&(n.cursor=t),n}function Sdt(e){return TM({queryKey:vdt(e),initialPageParam:void 0,queryFn:({pageParam:t})=>_e.get(he.MARKETPLACE_CATALOG,{params:wdt(e,t)}),getNextPageParam:t=>t.pagination.nextCursor??void 0,staleTime:3e4})}function Cdt(e){return At({queryKey:xdt(e??""),queryFn:()=>_e.get(he.marketplaceCourse(e)),enabled:!!e,refetchInterval:t=>{const n=t.state.data;return n&&n.curriculumStatus!=="READY"?15e3:!1},staleTime:0})}function kdt(e){return At({queryKey:ydt(e??""),queryFn:()=>_e.get(he.marketplacePack(e)),enabled:!!e,staleTime:3e4})}const su=Ue({id:Q(),name:Q(),description:Q(),level:Q(),price:Re(),imageUrl:Q().nullable(),trackType:Q().nullable(),tags:bt(Q()),personal:ni().optional(),durationWeeks:Re(),curriculumStatus:Q(),isBonus:ni(),isEnrolled:ni(),enrollmentCount:Re().optional(),rating:Re().optional(),ratingCount:Re().optional()});Ue({id:Q(),rating:Re(),comment:Q().nullable(),authorName:Q(),createdAt:Q()});const c8=Ue({id:Q(),slug:Q(),name:Q(),description:Q(),price:Re(),originalPrice:Re().optional(),imageUrl:Q().nullable(),courseCount:Re(),isEnrolledAny:ni()});Ue({intent:Ue({mode:Q(),mix:Ue({career:Re().optional(),explore:Re().optional()})}),personalPack:c8.nullable().optional(),bonus:bt(su),personalizedCareer:bt(su),personalizedExplore:bt(su),trending:bt(su),newest:bt(su),all:bt(su),packs:bt(c8)});const _dt=["recommended","popular","newest","price_asc","price_desc"];Ue({data:bt(su),pagination:Ue({total:Re(),limit:Re(),nextCursor:Q().nullable(),hasMore:ni()})});su.extend({outcomes:bt(Q()),skills:bt(Q()),curriculumPreview:Lue.nullable()});c8.extend({courses:bt(su)});const Tdt=Ue({id:Q(),name:Q(),description:Q(),level:Q().nullable().optional(),price:coe([Re(),Q()]).nullable().optional(),imageUrl:Q().nullable().optional(),trackType:Q().nullable().optional(),tags:bt(Q()).optional(),skills:bt(Q()).optional(),courseDuration:Re().optional(),isBonus:ni().optional(),categoryId:Q().nullable().optional()}),Edt=Ue({id:Q(),name:Q(),slug:Q(),description:Q(),price:coe([Re(),Q()]).nullable().optional(),imageUrl:Q().nullable().optional(),categoryId:Q().nullable().optional(),courseCount:Re().optional(),skills:bt(Q()).optional(),tags:bt(Q()).optional()}),jdt=Ue({item:Tdt,score:Re(),reasons:bt(Q())}),rG=Ue({item:Edt,score:Re(),reasons:bt(Q())}),Ndt=Ue({courses:bt(jdt),packs:bt(rG),careerPaths:bt(rG)});function Adt(e){const{item:t}=e;return{id:t.id,name:t.name,description:t.description,level:t.level??"",price:typeof t.price=="number"?t.price:Number(t.price??0),imageUrl:t.imageUrl??null,trackType:t.trackType??null,tags:t.tags??[],durationWeeks:t.courseDuration??0,curriculumStatus:"READY",isBonus:t.
1689isBonus??!1,isEnrolled:!1}}function iG(e){const{item:t}=e;return{id:t.id,slug:t.slug,name:t.name,description:t.description,price:typeof t.price=="number"?t.price:Number(t.price??0),imageUrl:t.imageUrl??null,courseCount:t.courseCount??0,isEnrolledAny:!1}}const Mdt=Ue({id:Q(),slug:Q(),title:Q(),imageUrl:Q().nullable(),price:Re(),difficulty:Q().nullable(),categoryName:Q(),type:na(["course","pack"]),courseCount:Re().optional()}),Rdt=Ue({categoryId:Q(),categorySlug:Q(),name:Q(),items:bt(Mdt)});Ue({rails:bt(Rdt)});const Odt=["marketplace","recommended"];function Ddt(){return At({queryKey:Odt,queryFn:async()=>{const e=await _e.get(he.ME_MARKETPLACE_RECOMMENDED);return Ndt.parse(e)},staleTime:6e4})}function Ldt({value:e,count:t,size:n=13,className:r=""}){const i=Math.max(0,Math.min(5,e)),s=t&&t>0?`${i.toFixed(1)} out of 5, ${t} reviews`:`${i.toFixed(1)} out of 5`;return l.jsxs("span",{className:`inline-flex items-center gap-1 ${r}`,role:"img","aria-label":s,children:[l.jsx("span",{className:"text-[11px] font-semibold text-strong",children:i.toFixed(1)}),l.jsx("span",{className:"inline-flex","aria-hidden":"true",children:[0,1,2,3,4].map(a=>{const o=Math.max(0,Math.min(1,i-a));return l.jsxs("span",{className:"relative inline-block",style:{width:n,height:n},children:[l.jsx(Ig,{className:"absolute inset-0 text-edition-soft",style:{width:n,height:n},"aria-hidden":"true"}),l.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:`${o*100}%`},children:l.jsx(Ig,{className:"text-edition-primary",style:{width:n,height:n,fill:"currentColor"},"aria-hidden":"true"})})]},a)})}),t&&t>0?l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["(",t,")"]}):null]})}const Pdt="min-w-[280px] w-[280px] flex-shrink-0 md:min-w-[300px] md:w-[300px]",Idt="w-full",Fdt=2,sG=["from-edition-deeper to-edition-primary","from-[#8F4327] to-clay","from-[#3C6B50] to-sage","from-[#3F5C78] to-slate-info"];function cL({course:e,index:t=0,progressPct:n,reason:r,fluid:i=!1}){const{t:s}=J("marketplace"),a=Number(e.price)<=0,o=!!e.isEnrolled,c=a?s("card.free"):`$${Number(e.price).toFixed(2)}`,u=Math.min(100,Math.max(0,n??0)),d=o&&u>0,h=s(o?"card.continueLearning":"card.viewCourse"),f=o?Ph:gn,m=!!e.trackType&&e.trackType!=="career",p=bot(e.tags).slice(0,Fdt),x=vot(e),v=!x&&typeof e.enrollmentCount=="number"&&e.enrollmentCount>0?e.enrollmentCount:null,g=typeof e.ratingCount=="number"&&e.ratingCount>0,y=sG[oL(e.id)%sG.length];return l.jsxs(ir,{to:OD(e.id),className:["group relative flex h-full cursor-pointer flex-col overflow-hidden rounded-2xl border border-border bg-card text-left transition duration-200 hover:-translate-y-0.5 hover:border-edition-soft",i?Idt:Pdt].join(" "),children:[l.jsxs("div",{className:`relative h-[118px] overflow-hidden bg-gradient-to-br ${y}`,children:[e.level&&l.jsx("span",{className:"absolute left-3 top-3 inline-flex items-center rounded-full border border-white/25 bg-white/[0.18] px-2.5 py-1 text-[9.5px] font-semibold uppercase tracking-[0.1em] text-on-dark",children:e.level}),o?l.jsxs("span",{className:"absolute right-3 top-3 inline-flex items-center gap-1 rounded-full border border-white/25 bg-white/[0.18] px-2 py-0.5 text-[11px] font-semibold text-on-dark",children:[l.jsx(gQ,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),s("card.enrolled")]}):e.isBonus?l.jsx("span",{className:"absolute right-3 top-3 inline-flex items-center rounded-full border border-white/25 bg-white/[0.18] px-2 py-0.5 text-[11px] font-semibold text-on-dark",children:s("card.bonus")}):null,l.jsx(of,{className:"absolute -bottom-3 -right-1.5 h-20 w-20 text-white/20",strokeWidth:1.5,"aria-hidden":"true"})]}),l.jsxs("div",{className:"flex flex-1 flex-col gap-2.5 p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-edition-pale px-2 py-0.5 text-[11px] font-medium text-edition-deeper",children:[x?l.jsx(Rn,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}):l.jsx(jh,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),s(x?"card.builtForYou":"card.curated")]}),m&&l.jsx("span",{className:"inline-flex rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground",children:s("card.explore")}),g&&l.jsx(Ldt,{value:e.rating??0,count:e.ratingCount})]}),l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("h3",{className:"line-clamp-2 text-card-title leading-snug",children:e.name}),l.jsx("p",{className:"mt-1 line-clamp-2 text-sm leading-relaxed text-muted-foreground",children:e.description}),(e.level||!!e.durationWeeks||v)&&l.jsxs("p",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:[e.level&&l.jsx("span",{children:e.level}),e.level&&!!e.durationWeeks&&l.jsx("span",{"aria-hidden":"true",children:"·"}),!!e.durationWeeks&&l.jsx("span",{children:s("card.weeks",{count:e.durationWeeks})}),v&&l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{className:"inline-flex items-center gap-1 normal-case",children:[l.jsx(OQ,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),s("card.learners",{count:v})]})]})]}),p.length>0&&l.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:p.map(w=>l.jsx("span",{className:"rounded-md bg-edition-pale px-1.5 py-0.5 text-[11px] font-medium text-edition-deeper",children:w}
1689,w))}),r&&l.jsxs("p",{className:"mt-2 flex items-center gap-1 text-[11px] font-medium text-primary",children:[l.jsx(Rn,{className:"h-3 w-3 shrink-0",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{className:"line-clamp-1",children:r})]})]}),d&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground",children:[l.jsx("span",{children:s("card.yourProgress")}),l.jsxs("span",{className:"font-semibold text-strong",children:[Math.round(u),"%"]})]}),l.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(u),"aria-label":s("card.progressAriaLabel",{title:e.name,percent:Math.round(u)}),className:"h-1.5 overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:"h-full rounded-full bg-sage transition-all duration-500",style:{width:`${Math.max(u,5)}%`}})})]}),l.jsxs("div",{className:"mt-auto flex items-center justify-between gap-2.5 pt-1",children:[l.jsx("span",{className:`text-[15px] font-bold ${a?"text-sage":"text-strong"}`,children:c}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-primary px-4 py-2 text-[12.5px] font-medium text-on-dark transition group-hover:brightness-[1.06]",children:[l.jsx(f,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),h]})]})]})]})}function Bdt({onClick:e}){const{t}=J("marketplace");return l.jsxs("button",{type:"button",onClick:e,className:"group flex min-w-[140px] flex-shrink-0 flex-col items-center justify-center gap-2 self-stretch rounded-2xl border border-dashed border-border px-4 transition-colors hover:border-edition-soft hover:bg-edition-pale focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[l.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-edition-pale transition-transform group-hover:scale-105",children:l.jsx(ns,{className:"h-5 w-5 text-primary",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("span",{className:"text-sm font-medium text-strong",children:t("rails.viewAll")})]})}function aG({title:e,subtitle:t,courses:n,icon:r,delay:i=0,onViewAll:s,progressByCourseId:a,reasonByCourseId:o}){const c=rw();return n.length===0?null:l.jsxs(nc.section,{initial:c?!1:{opacity:0,y:24},whileInView:c?void 0:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:c?{duration:0}:{duration:.5,delay:i},className:"border-b border-border/30 py-6 last:border-0",children:[l.jsxs("header",{className:"mb-4 flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[r&&l.jsx(r,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),l.jsx("h2",{className:"text-section-title",children:e})]}),t&&l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.jsx("div",{className:"-mx-1 flex w-full overflow-x-auto pb-4 pt-2","data-testid":"rail-scroller",children:l.jsxs("div",{className:"flex w-max gap-4 px-1",children:[n.map((u,d)=>l.jsx(cL,{course:u,index:d,progressPct:a==null?void 0:a[u.id],reason:o==null?void 0:o[u.id]},u.id)),s&&l.jsx(Bdt,{onClick:s})]})})]})}const zdt="min-w-[280px] w-[280px] flex-shrink-0 md:min-w-[300px] md:w-[300px]";function Gue({pack:e,index:t=0}){const{t:n}=J("marketplace"),r=St(),i=Number(e.price),s=i<=0,a=s?n("card.free"):`$${i.toFixed(2)}`,o=e.originalPrice??0,c=o>i&&o>0?Math.round((1-i/o)*100):0;return l.jsxs("div",{onClick:()=>r(Jle(e.slug)),className:["group relative flex h-full cursor-pointer flex-col overflow-hidden rounded-2xl border border-border bg-card text-left transition duration-200 hover:-translate-y-0.5 hover:border-edition-soft",zdt].join(" "),children:[l.jsxs("div",{className:"relative h-[118px]",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-3 top-1.5 h-full rounded-2xl bg-edition-soft"}),l.jsxs("div",{className:"relative h-full overflow-hidden rounded-t-2xl bg-brand-gradient",children:[l.jsx(Ob,{className:"absolute -bottom-3 -right-1.5 h-20 w-20 text-white/20",strokeWidth:1.5,"aria-hidden":"true"}),l.jsxs("span",{className:"absolute left-3 top-3 inline-flex items-center gap-1 rounded-full border border-white/25 bg-white/[0.18] px-2.5 py-1 text-[9.5px] font-semibold uppercase tracking-[0.1em] text-on-dark",children:[l.jsx(Ob,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),n("pack.badgeCount",{count:e.courseCount})]}),c>0&&l.jsx("span",{className:"absolute right-3 top-3 inline-flex items-center rounded-full bg-sage px-2 py-0.5 text-[11px] font-semibold text-on-dark",children:n("pack.save",{percent:c}
1689)})]})]}),l.jsxs("div",{className:"flex flex-1 flex-col p-4",children:[l.jsx("h3",{className:"line-clamp-2 text-card-title leading-snug",children:e.name}),l.jsx("p",{className:"mt-1 line-clamp-2 text-sm leading-relaxed text-muted-foreground",children:e.description}),l.jsxs("div",{className:"mt-auto flex items-center justify-between gap-2.5 pt-3",children:[l.jsxs("div",{className:"flex items-baseline gap-1.5",children:[l.jsx("span",{className:`text-[15px] font-bold ${s?"text-sage":"text-strong"}`,children:a}),c>0&&l.jsxs("span",{className:"text-xs text-muted-foreground line-through",children:["$",o.toFixed(2)]})]}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-primary px-4 py-2 text-[12.5px] font-medium text-on-dark transition group-hover:brightness-[1.06]",children:[n("pack.viewPack"),l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})]})]})]})]})}function oG({title:e,subtitle:t,packs:n,icon:r,delay:i=0}){const s=rw();return n.length===0?null:l.jsxs(nc.section,{initial:s?!1:{opacity:0,y:24},whileInView:s?void 0:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:s?{duration:0}:{duration:.5,delay:i},className:"border-b border-border/30 py-6 last:border-0",children:[l.jsxs("header",{className:"mb-4 flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[r&&l.jsx(r,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),l.jsx("h2",{className:"text-section-title",children:e})]}),t&&l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.jsx("div",{className:"-mx-1 flex w-full overflow-x-auto pb-4 pt-2","data-testid":"pack-rail-scroller",children:l.jsx("div",{className:"flex w-max gap-4 px-1",children:n.map((a,o)=>l.jsx(Gue,{pack:a,index:o},a.id))})})]})}const $dt="min-w-[280px] w-[280px] flex-shrink-0 md:min-w-[300px] md:w-[300px]";function Udt({suggestion:e,index:t=0,isAccepting:n,isDismissing:r,onAccept:i,onDismiss:s}){const{t:a}=J("marketplace"),o=`${e.level} · ${a("card.weeks",{count:e.durationWeeks})}`,c=e.skills.slice(0,3).join(" · "),u=n||r;return l.jsxs("div",{onClick:i,className:["group relative flex h-full cursor-pointer flex-col overflow-hidden rounded-2xl border border-border bg-card text-left transition duration-200",u?"":"hover:-translate-y-0.5 hover:border-edition-soft",$dt].join(" "),children:[l.jsx("div",{"aria-hidden":"true",className:"h-0.5 bg-brand-gradient"}),l.jsxs("div",{className:"flex flex-1 flex-col p-5",children:[l.jsxs("div",{className:"mb-2 flex items-start justify-between gap-2",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-edition-pale px-2 py-0.5 text-[11px] font-semibold uppercase tracking-[0.1em] text-edition-deeper",children:[l.jsx(Rn,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"}),a("suggestions.aiBadge")]}),l.jsx("button",{type:"button","aria-label":a("suggestions.dismiss"),onClick:d=>{d.stopPropagation(),s()},disabled:r,className:"rounded-full p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-strong disabled:opacity-50",children:l.jsx(ar,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"})})]}),l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("h3",{className:"line-clamp-2 text-card-title leading-snug",children:e.title}),l.jsx("p",{className:"mt-1 line-clamp-3 text-sm leading-relaxed text-muted-foreground",children:e.reason}),l.jsx("p",{className:"mt-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:o}),c&&l.jsx("p",{className:"mt-0.5 line-clamp-1 text-[11px] text-muted-foreground",children:c})]}),l.jsxs("span",{className:"mt-auto inline-flex w-fit items-center gap-1.5 rounded-full bg-primary px-4 py-2 text-[12.5px] font-medium text-on-dark transition group-hover:brightness-[1.06]",children:[a(n?"suggestions.accepting":"suggestions.viewBuy"),l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})]})]})]})}const Vdt=e=>["suggestions",e];function Hdt(e){return At({queryKey:Vdt(e),queryFn:()=>_e.get(he.ME_COURSE_SUGGESTIONS,{params:{status:e}}),staleTime:3e4})}function qdt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.meCourseSuggestionAccept(t)),onSuccess:()=>
1689{e.invalidateQueries({queryKey:["suggestions"]}),e.invalidateQueries({queryKey:["me","courses"]})}})}function Gdt(){const e=Tt();return rt({mutationFn:t=>_e.post(he.meCourseSuggestionDismiss(t)),onSuccess:()=>{e.invalidateQueries({queryKey:["suggestions"]})}})}const Wdt=12;function Ydt({title:e,subtitle:t,icon:n,filter:r,delay:i=0,className:s}){const a=St(),o=rw(),c=Hdt("PENDING"),u=qdt(),d=Gdt();if(c.isLoading)return null;const h=c.data??[],m=(r?h.filter(r):h).slice(0,Wdt);if(m.length===0)return null;const p=n??l.jsx(Rn,{className:"h-4 w-4 text-primary",strokeWidth:1.75,"aria-hidden":"true"});return l.jsxs(nc.section,{initial:o?!1:{opacity:0,y:24},whileInView:o?void 0:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:o?{duration:0}:{duration:.5,delay:i},className:`border-b border-border/30 py-6 last:border-0 ${s??""}`,children:[l.jsxs("header",{className:"mb-4 flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[p,l.jsx("h2",{className:"text-section-title",children:e})]}),t&&l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.jsx("div",{className:"-mx-1 flex w-full overflow-x-auto pb-4 pt-2","data-testid":"suggestions-rail-scroller",children:l.jsx("div",{className:"flex w-max gap-4 px-1",children:m.map((x,v)=>{const g=u.isPending&&u.variables===x.id,y=d.isPending&&d.variables===x.id;return l.jsx(Udt,{suggestion:x,index:v,isAccepting:g,isDismissing:y,onAccept:()=>u.mutate(x.id,{onSuccess:w=>{a(OD(w.courseId))}}),onDismiss:()=>d.mutate(x.id)},x.id)})})})]})}function Kdt(){var p,x,v,g;const{t:e}=J("marketplace"),t=St(),n=gs(),r=bdt(),i=Ddt(),s=r.data,a=b.useMemo(()=>{var y;return(((y=i.data)==null?void 0:y.courses)??[]).map(Adt)},[(p=i.data)==null?void 0:p.courses]),o=b.useMemo(()=>{var y;return(((y=i.data)==null?void 0:y.packs)??[]).map(iG)},[(x=i.data)==null?void 0:x.packs]),c=b.useMemo(()=>{var y;return(((y=i.data)==null?void 0:y.careerPaths)??[]).map(iG)},[(v=i.data)==null?void 0:v.careerPaths]),u=a.length>0||o.length>0||c.length>0,d=b.useMemo(()=>{var w;const y={};return(((w=i.data)==null?void 0:w.courses)??[]).forEach(S=>{var k;const C=(k=S.reasons)==null?void 0:k[0];C&&(y[S.item.id]=C)}),y},[(g=i.data)==null?void 0:g.courses]),h=n.data??[],f=b.useMemo(()=>{const y={};return h.forEach(w=>{y[w.courseId]=w.progress.percentComplete}),y},[h]),m=b.useMemo(()=>h.filter(y=>y.progress.percentComplete>0&&y.progress.percentComplete<100),[h]);return l.jsxs("div",{className:"space-y-8",children:[m.length>0&&l.jsxs("section",{"aria-labelledby":"rails-continue",className:"space-y-2",children:[l.jsxs("header",{className:"mb-1",children:[l.jsx("h2",{id:"rails-continue",className:"text-section-title",children:e("forYou.continueTitle")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e("forYou.continueSubtitle")})]}),l.jsx("div",{className:"-mx-1 flex w-full overflow-x-auto pb-2 pt-1",children:l.jsx("div",{className:"flex w-max gap-4 px-1",children:m.map((y,w)=>l.jsx("div",{className:"w-[300px] flex-shrink-0",children:l.jsx(_ue,{course:y,index:w,onOpen:S=>t(`/me/courses/${S.courseId}`)})},y.enrollmentId))})})]}),l.jsxs("section",{className:"relative overflow-hidden rounded-2xl border border-border bg-card p-5",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-edition-pale text-primary",children:l.jsx(Rn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-section-title",children:e("forYou.createTitle")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:e("forYou.createSubtitle")})]})]}),l.jsxs("button",{type:"button",onClick:()=>
1689t(ee.ME_MARKETPLACE_CREATE),className:"ds-touch-target inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-on-dark transition hover:brightness-[1.06] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[e("forYou.createCta"),l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})]})]})]}),(s==null?void 0:s.personalPack)&&l.jsxs("section",{"aria-labelledby":"rails-your-career-path",className:"relative overflow-hidden rounded-2xl border border-border bg-card p-5",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsxs("header",{className:"mb-4 flex items-start gap-3",children:[l.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-edition-pale text-primary",children:l.jsx(ki,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h2",{id:"rails-your-career-path",className:"text-section-title",children:e("rails.yourCareerPath")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:e("rails.yourCareerPathSubtitle")})]})]}),l.jsx("div",{className:"-mx-1 flex w-full overflow-x-auto pb-2 pt-1",children:l.jsx("div",{className:"flex w-max gap-4 px-1",children:l.jsx(Gue,{pack:s.personalPack,index:0})})})]}),i.isSuccess&&u&&l.jsxs("section",{"aria-labelledby":"rails-recommended-section",className:"space-y-2",children:[l.jsx("h2",{id:"rails-recommended-section",className:"sr-only",children:e("rails.recommended.title")}),l.jsx(aG,{title:e("rails.recommended.title"),subtitle:e("rails.recommended.subtitle"),courses:a,icon:Rn,delay:0,progressByCourseId:f,reasonByCourseId:d}),l.jsx(oG,{title:e("rails.recommendedPacks.title"),subtitle:e("rails.recommendedPacks.subtitle"),packs:o,icon:Mxe,delay:.05}),l.jsx(oG,{title:e("rails.recommendedCareer.title"),subtitle:e("rails.recommendedCareer.subtitle"),packs:c,icon:ki,delay:.1})]}),s&&s.bonus.length>0&&l.jsx(aG,{title:e("rails.bonus"),subtitle:e("rails.bonusSubtitle"),courses:s.bonus,icon:U0,delay:.05,progressByCourseId:f}),l.jsx(Ydt,{title:e("suggestions.title"),subtitle:e("suggestions.subtitle"),icon:l.jsx(Rn,{className:"h-5 w-5 text-primary",strokeWidth:1.75,"aria-hidden":"true"}),filter:()=>!0,delay:.1}),i.isSuccess&&!u&&!(s!=null&&s.personalPack)&&l.jsx("p",{className:"rounded-2xl border border-border bg-card p-6 text-center text-sm text-muted-foreground",children:e("rails.recommendedEmpty")})]})}const Xdt=400,Qdt=["Beginner","Intermediate","Advanced"],Zdt=["free","paid"],Jdt=["short","medium","long"],eht=6;function _S({label:e,active:t,onClick:n}){return l.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:`rounded-full border px-3.5 py-1.5 text-[12.5px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ${t?"border-edition-soft bg-edition-pale text-primary":"border-border bg-card text-body-ink hover:border-edition-soft hover:bg-edition-pale hover:text-primary"}`,children:e})}function tht(){return l.jsxs("div",{className:"h-[330px] w-full animate-pulse overflow-hidden rounded-2xl border border-border bg-card",children:[l.jsx("div",{className:"h-[118px] w-full bg-edition-pale"}),l.jsxs("div",{className:"space-y-2 p-4",children:[l.jsx("div",{className:"h-3 w-20 rounded bg-muted"}),l.jsx("div",{className:"h-4 w-3/4 rounded bg-muted"}),l.jsx("div",{className:"h-3 w-full rounded bg-muted"}),l.jsx("div",{className:"h-3 w-2/3 rounded bg-muted"})]})]})}function nht(){var A,j,D;const{t:e}=J("marketplace"),[t,n]=ps(),[r,i]=b.useState(!1),a=((A=BD().data)==null?void 0:A.availableCategories)??[],o=t.get("q")??"",c=t.get("category")??"",u=t.get("level")??"",d=t.get("price")??"",h=t.get("duration")??"",f=t.get("sort")||"recommended",m=(M,$)=>{n(B=>{const z=new URLSearchParams(B);return $?z.set(M,$):z.delete(M),z},{replace:!0})},p=(M,$,B)=>m(M,B===$?"":$),x=()=>n(M=>{const $=new URLSearchParams(M);return["q","category","level","price","duration"].forEach(B=>$.delete(B)),$},{replace:!0}),v=b.useMemo(()=>{const M={sort:f};return o&&(M.search=o),c&&(M.categoryId=c),u&&(M.level=u),(d==="free"||d==="paid")&&(M.price=d),h==="short"?M.durationMax=2:h==="medium"?(M.durationMin=3,M.durationMax=6):h==="long"&&(M.durationMin=7),M},[o,c,u,d,h,f]),g=Sdt(v),y=b.useMemo(()=>{var M;return((M=g.data)==null?void 0:M.pages.flatMap($=>$.data))??[]},[g.data]),w=((D=(j=g.data)==null?void 0:j.pages[0])==null?void 0:D.pagination.total)??0,S=M=>{var $;return(($=a.find(B=>B.id===M))==null?void 0:$.name)??M},C=M=>e(`browse.duration.${M}
1689`),k=[c,u,d,h].filter(Boolean).length,_=[];o&&_.push({key:"q",label:`"${o}"`,clear:()=>m("q","")}),c&&_.push({key:"category",label:S(c),clear:()=>m("category","")}),u&&_.push({key:"level",label:u,clear:()=>m("level","")}),d&&_.push({key:"price",label:e(`browse.price.${d}`),clear:()=>m("price","")}),h&&_.push({key:"duration",label:C(h),clear:()=>m("duration","")});const E=l.jsxs("div",{className:"space-y-5",children:[a.length>0&&l.jsxs("div",{children:[l.jsx("h3",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.16em] text-muted-ink",children:e("browse.filters.category")}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(M=>l.jsx(_S,{label:M.name,active:c===M.id,onClick:()=>p("category",M.id,c)},M.id))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.16em] text-muted-ink",children:e("browse.filters.level")}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Qdt.map(M=>l.jsx(_S,{label:M,active:u===M,onClick:()=>p("level",M,u)},M))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.16em] text-muted-ink",children:e("browse.filters.price")}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Zdt.map(M=>l.jsx(_S,{label:e(`browse.price.${M}`),active:d===M,onClick:()=>p("price",M,d)},M))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.16em] text-muted-ink",children:e("browse.filters.duration")}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Jdt.map(M=>l.jsx(_S,{label:C(M),active:h===M,onClick:()=>p("duration",M,h)},M))})]})]});return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[l.jsx("div",{className:"min-w-0 flex-1",children:l.jsx(Ex,{onSearch:M=>m("q",M.trim()),debounceMs:Xdt,placeholder:e("list.searchPlaceholder"),"aria-label":e("list.searchPlaceholder")})}),l.jsxs("button",{type:"button",onClick:()=>i(!0),className:"inline-flex items-center justify-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-sm font-medium text-body-ink transition hover:border-edition-soft hover:bg-edition-pale hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 lg:hidden",children:[l.jsx(MQ,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),e("browse.filtersTitle"),k>0&&l.jsx("span",{className:"rounded-full bg-primary px-1.5 text-xs font-semibold text-on-dark",children:k})]}),l.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx("span",{className:"whitespace-nowrap",children:e("browse.sort.label")}),l.jsx("select",{value:f,onChange:M=>m("sort",M.target.value),className:"rounded-lg border border-border bg-card px-2.5 py-1.5 text-sm text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:_dt.map(M=>l.jsx("option",{value:M,children:e(`browse.sort.${M}`)},M))})]})]}),l.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row",children:[l.jsx("aside",{className:"hidden lg:block lg:w-60 lg:flex-shrink-0",children:l.jsx("div",{className:"lg:sticky lg:top-4",children:E})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:e("browse.resultCount",{count:w})}),_.map(M=>l.jsxs("button",{type:"button",onClick:M.clear,className:"inline-flex items-center gap-1 rounded-full border border-edition-soft bg-edition-pale px-2.5 py-1 text-sm font-medium text-primary transition hover:brightness-[0.98]",children:[M.label,l.jsx(ar,{className:"h-3 w-3",strokeWidth:1.75,"aria-hidden":"true"})]},M.key)),_.length>0&&l.jsx("button",{type:"button",onClick:x,className:"text-sm text-muted-foreground underline-offset-2 hover:underline",children:e("browse.clearAll")})]}),g.isLoading?l.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:eht}).map((M,$)=>l.jsx(tht,{},$))}):g.isError?l.jsx("p",{role:"alert",className:"rounded-2xl border border-clay/30 bg-clay/5 p-6 text-center text-sm text-clay",children:e("list.errorBody")}):y.length===0?l.jsx("p",{className:"rounded-2xl border border-border bg-card py-12 text-center text-sm text-muted-foreground",children:e("browse.empty")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:y.map((M,$)=>l.jsx(cL,{course:M,index:$,fluid:!0},M.id))}),g.hasNextPage&&l.jsx("div",{className:"pt-2 text-center",children:l.jsx("button",{type:"button",onClick:()=>g.fetchNextPage(),disabled:g.isFetchingNextPage,className:"rounded-lg border border-border bg-card px-4 py-2 text-sm font-medium text-primary transition hover:border-edition-soft hover:bg-edition-pale disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:g.isFetchingNextPage?e("list.loading"):e("browse.loadMore")})})]})]})]}),r&&l.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",role:"dialog","aria-modal":"true","aria-label":e("browse.filtersTitle"),children:[l.jsx("div",{className:"absolute inset-0 bg-[rgba(20,22,27,0.42)]",onClick:()=>i(!1)}),l.jsxs("div",{className:"absolute inset-x-0 bottom-0 max-h-[80vh] overflow-y-auto overscroll-contain rounded-t-2xl border-t border-border bg-card p-5 shadow-overlay",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsx("h2",{className:"text-card-title",children:e("browse.filtersTitle")}),l.jsx("button",{type:"button",onClick:()=>i(!1),"aria-label":e("browse.close"),className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-strong",children:l.jsx(ar,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})})]}),E,l.jsxs("div",{className:"mt-5 flex gap-2",children:[k>0&&l.jsx("button",{type:"button",onClick:x,className:"rounded-lg border border-border px-4 py-2 text-sm font-medium text-body-ink transition hover:border-edition-soft hover:bg-edition-pale hover:text-primary",children:e("browse.clearAll")}),l.jsx("button",{type:"button",onClick:()=>i(!1),className:"flex-1 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-on-dark transition hover:brightness-[1.06]",children:e("browse.showResults",{count:w})})]})]})]})]})}function rht(){const{t:e}=J("marketplace"),t=St(),[n,r]=b.useState(!1),i=e("create.examples",{returnObjects:!0}),s=Array.isArray(i)?i:[];return l.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[l.jsxs("section",{className:"relative overflow-hidden rounded-2xl border border-border bg-card p-8 text-center",children:[l.jsx("div",{"aria-hidden":"true",className:"absolute inset-x-0 top-0 h-0.5 bg-brand-gradient"}),l.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(tye,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h2",{className:"text-2xl font-light tracking-tight text-strong",children:e("create.title")}),l.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm leading-relaxed text-muted-foreground",children:e("create.subtitle")}),s.length>0&&l.jsx("div",{className:"mt-5 flex flex-wrap justify-center gap-2",children:s.map(a=>l.jsx("span",{className:"rounded-full border border-border bg-card px-3 py-1 text-xs font-medium text-body-ink",children:a},a))}),l.jsxs("button",{type:"button",onClick:()=>r(!0),className:"mt-6 inline-flex items-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-on-dark transition hover:brightness-[1.06] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[l.jsx(Rn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),e("create.cta")]})]}),l.jsxs("button",{type:"button",onClick:()=>t(ee.ME_COURSES_CUSTOM),className:"flex w-full items-center justify-between rounded-2xl border border-border bg-card p-4 text-left transition hover:border-edition-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-card-title",children:e("create.myCustomTitle")}),l.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:e("create.myCustomSubtitle")})]}),l.jsx(gn,{className:"h-4 w-4 shrink-0 text-muted-foreground",strokeWidth:1.75,"aria-hidden":"true"})]}),l.jsx(kue,{open:n,onOpenChange:r})]})}const iht=na(["not_started","in_progress","completed"]),sht=Ue({id:Q(),title:Q(),stepCount:Re().int().nonnegative(),durationMinutes:Re().int().positive().nullable(),progress:Ue({state:iht,percent:Re().min(0).max(100)}).optional()}),aht=Ue({weekNumber:Re().int().positive(),title:Q(),lessons:bt(sht)}),oht=Ue({id:Q(),name:Q(),avatarUrl:Q().nullable(),bio:Q(),totalCourses:Re().int().nonnegative(),totalStudents:Re().int().nonnegative(),averageRating:Re().min(0).max(5)}),lht=Ue({slug:Q(),name:Q()}),cht=Ue({5:Re().int().nonnegative(),4:Re().int().nonnegative(),3:Re().int().nonnegative(),2:Re().int().nonnegative(),1:Re().int().nonnegative()}),uht=Ue({average:Re().min(0).max(5),total:Re().int().nonnegative(),breakdown:cht}),dht=Ue({isEnrolled:ni(),progressPercent:Re().min(0).max(100),lastViewedStepId:Q().nullable(),nextLessonId:Q().nullable()}),hht=Ue({id:Q(),slug:Q(),title:Q(),subtitle:Q().nullable(),description:Q(),coverImageUrl:Q().nullable(),lastUpdated:Q(),language:Q(),durationMinutes:Re().int().positive().nullable(),personal:ni().optional()}),fht=Ue({course:hht,outcomes:bt(Q()).max(8),curriculum:bt(aht),instructor:oht,skills:bt(lht),reviewsSummary:uht,enrollment:dht.nullable()}),Wue=(e,t)=>
1689["course-overview",t,e];async function Yue(e){const t=await _e.get(e);return fht.parse(t)}function mht(e,t={}){const n=t.enabled!==void 0?t.enabled:!!e;return At({queryKey:Wue(e??"","auth"),queryFn:()=>Yue(he.meCourseOverview(e)),enabled:n,initialData:t.initialData,staleTime:3e4})}function pht(e,t={}){const n=t.enabled!==void 0?t.enabled:!!e;return At({queryKey:Wue(e??"","public"),queryFn:()=>Yue(he.marketplaceCourseOverview(e)),enabled:n,initialData:t.initialData,staleTime:6e4})}function Kue({outcomes:e}){const{t}=J("course-overview");return e.length===0?null:l.jsxs("section",{"aria-labelledby":"learning-outcomes-title",className:"rounded-2xl border border-border bg-card p-5 text-card-foreground",children:[l.jsxs("header",{className:"mb-4",children:[l.jsx("h2",{id:"learning-outcomes-title",className:"text-section-title",children:t("outcomes.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t("outcomes.subtitle")})]}),l.jsx("ul",{className:"grid gap-3 md:grid-cols-2",children:e.map(n=>l.jsxs("li",{className:"flex items-start gap-2.5 text-sm leading-relaxed text-body-ink",children:[l.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-edition-pale text-primary",children:l.jsx(Kn,{"aria-hidden":"true",strokeWidth:2.5,className:"h-3 w-3"})}),l.jsx("span",{children:n})]},n))})]})}function ght(e){return e.trim().split(/\s+/).slice(0,2).map(n=>n.charAt(0).toUpperCase()).join("").padEnd(1,"?")}function Xue({instructor:e,personal:t=!1}){const{t:n}=J("course-overview");return l.jsxs("section",{"aria-labelledby":"instructor-title",className:"rounded-2xl border border-border bg-card p-5 text-card-foreground",children:[l.jsx("h2",{id:"instructor-title",className:"text-section-title",children:n("instructor.title")}),l.jsxs("div",{className:"mt-4 flex items-start gap-4",children:[l.jsx(cR,{src:e.avatarUrl??void 0,alt:e.name,fallback:ght(e.name),size:"lg"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"text-base font-semibold text-strong",children:e.name}),!t&&l.jsxs("dl",{className:"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Ig,{"aria-hidden":"true",strokeWidth:1.75,className:"h-3.5 w-3.5 fill-edition-primary text-edition-primary"}),l.jsx("dd",{children:n("instructor.rating",{rating:e.averageRating.toFixed(1)})})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(OQ,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),l.jsx("dd",{children:n("instructor.students",{count:e.totalStudents})})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Ci,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),l.jsx("dd",{children:n("instructor.courses",{count:e.totalCourses})})]})]}),e.bio&&l.jsx("p",{className:"mt-3 text-sm leading-relaxed text-body-ink",children:e.bio})]})]})]})}function u8(e){return!e||e<=0?"":`$${e.toFixed(2)}`}function Que({price:e,originalPrice:t,primaryCta:n,progressPercent:r,showValueProps:i=!0}){const{t:s}=J("course-overview"),a=!e||e<=0,o=typeof r=="number"&&r>0;return l.jsxs("aside",{"aria-label":s("enroll.title"),className:"rounded-2xl border border-border bg-card p-5 text-card-foreground lg:sticky lg:top-6",children:[l.jsxs("div",{className:"flex items-baseline gap-2",children:[l.jsx("span",{className:"text-3xl font-bold text-strong",children:a?s("enroll.priceFree"):u8(e)}),!a&&t&&t>(e??0)&&l.jsx("span",{className:"text-base text-muted-foreground line-through",children:u8(t)})]}),o&&l.jsxs("div",{className:"mt-4",children:[l.jsx(Cx,{value:r??0,size:"sm","aria-label":s("enroll.progressAriaLabel",{percent:Math.round(r??0)})}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:s("enroll.progressLabel",{percent:Math.round(r??0)})})]}),l.jsx("div",{className:"mt-4",children:l.jsx(ce,{variant:n.variant??"primary",size:"lg",className:"w-full",onClick:n.onClick,isLoading:n.isLoading,disabled:n.disabled,children:n.label})}),i&&l.jsxs("ul",{className:"mt-5 space-y-2.5 border-t border-border pt-4 text-sm text-body-ink",children:[l.jsxs("li",{className:"flex items-center gap-2.5",children:[l.jsx(Lxe,{"aria-hidden":"true",strokeWidth:1.75,className:"h-4 w-4 shrink-0 text-primary"}),l.jsx("span",{children:s("enroll.lifetime")}
1689)]}),l.jsxs("li",{className:"flex items-center gap-2.5",children:[l.jsx(Mb,{"aria-hidden":"true",strokeWidth:1.75,className:"h-4 w-4 shrink-0 text-primary"}),l.jsx("span",{children:s("enroll.certificate")})]})]})]})}function Zue({price:e,primaryCta:t}){const{t:n}=J("course-overview"),r=!e||e<=0;return l.jsxs("div",{role:"region","aria-label":n("enroll.title"),className:"fixed inset-x-0 bottom-[calc(3.25rem+env(safe-area-inset-bottom))] z-40 flex items-center justify-between gap-3 border-t border-border bg-card px-4 pt-3 pb-3 shadow-overlay md:bottom-0 md:pb-[max(0.75rem,env(safe-area-inset-bottom))] lg:hidden",children:[l.jsx("div",{className:"flex flex-col",children:l.jsx("span",{className:"text-lg font-bold text-strong",children:r?n("enroll.priceFree"):u8(e)})}),l.jsx(ce,{variant:t.variant??"primary",size:"md",onClick:t.onClick,isLoading:t.isLoading,disabled:t.disabled,children:t.label})]})}function xht(){return null}function yht(e){const t=e.curriculumPreview;return!t||t.weeks.length===0?[]:t.weeks.map(n=>({weekNumber:n.weekNumber,title:n.title??`Week ${n.weekNumber}`,lessons:n.days.flatMap((r,i)=>r.lessons.map((s,a)=>{var o;return{id:s.id??`w${n.weekNumber}-d${r.dayNumber}-l${a}`,title:s.title??`Lesson ${i+1}.${a+1}`,stepCount:((o=s.steps)==null?void 0:o.length)??0,durationMinutes:s.estimatedMinutes??null}}))}))}function bht(e,t){const{variant:n}=t,r=t.isEnrolled??e.isEnrolled;return{course:{id:e.id,slug:e.id,title:e.name,subtitle:e.trackType,description:e.description,coverImageUrl:e.imageUrl,lastUpdated:new Date().toISOString(),language:"en",durationMinutes:xht()},outcomes:e.outcomes.slice(0,8),curriculum:yht(e),instructor:{id:"platform",name:"ArthurAI",avatarUrl:null,bio:"This course was authored on ArthurAI.",totalCourses:0,totalStudents:0,averageRating:0},skills:e.skills.map(i=>({slug:i,name:i})),reviewsSummary:{average:0,total:0,breakdown:{5:0,4:0,3:0,2:0,1:0}},enrollment:n==="public"?null:{isEnrolled:r,progressPercent:0,lastViewedStepId:null,nextLessonId:null}}}function vht(e,t){return{course:{id:e,slug:e,title:"Course preview",subtitle:null,description:"Sign in to see the full course description, curriculum, and instructor details.",coverImageUrl:null,lastUpdated:new Date().toISOString(),language:"en",durationMinutes:0},outcomes:[],curriculum:[],instructor:{id:"placeholder",name:"ArthurAI",avatarUrl:null,bio:"",totalCourses:0,totalStudents:0,averageRating:0},skills:[],reviewsSummary:{average:0,total:0,breakdown:{5:0,4:0,3:0,2:0,1:0}},enrollment:t==="public"?null:{isEnrolled:!1,progressPercent:0,lastViewedStepId:null,nextLessonId:null}}}function wht({overview:e,marketplaceDetail:t,t:n,navigate:r,onClaim:i,onBuy:s,isClaiming:a}){const o=e.enrollment,u=Number((t==null?void 0:t.price)??0)<=0;if(o!=null&&o.isEnrolled){const d=o.progressPercent>0,h=!!o.lastViewedStepId;return{label:n(h?"enroll.resume":d?"enroll.continue":"enroll.goToCourse"),onClick:()=>r(ts(e.course.id,1,1,1)),variant:"primary"}}return e.course.personal&&!u?{label:n("enroll.startFree"),onClick:()=>r(ts(e.course.id,1,1,1)),variant:"primary"}:u?{label:n(a?"enroll.claiming":"enroll.claim"),onClick:i,variant:"gradient",isLoading:a,disabled:a}:{label:n("enroll.buyNow"),onClick:s,variant:"primary"}}function Sht(e){return{hours:Math.floor(e/60),mins:e%60}}function Cht(){var _;const{t:e}=J("course-overview"),t=St(),{courseId:n}=Ec(),r=Cdt(n),i=mht(n),s=jue(),[a,o]=b.useState(!1),c=b.useMemo(()=>{if(r.data)return bht(r.data,{variant:"auth"})},[r.data]),u=i.data??c,d=u==null?void 0:u.course.title,h=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:(u==null?void 0:u.course.subtitle)??""}),l.jsx("h1",{className:"mt-1 line-clamp-3 break-words text-xl font-bold tracking-tight text-foreground sm:text-3xl",children:d??e("loading")})]}),[u==null?void 0:u.course.subtitle,d,e]),f=b.useMemo(()=>l.jsx($i,{label:e("notFound.backToMarketplace"),onClick:()=>t(ee.ME_MARKETPLACE)}),[t,e]);if(On({left:h,actions:f}),r.isLoading&&!u)return l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("loading")});if(r.isError&&!u||!u)return l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h1",{className:"text-section-title",children:e("notFound.title")}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e("notFound.body")}),l.jsx("div",{className:"mt-4",children:l.jsx(ce,{type:"button",variant:"primary",size:"md",onClick:()=>t(ee.ME_MARKETPLACE),children:e("notFound.backToMarketplace")})})]});const m=r.data,p=Number((m==null?void 0:m.price)??0),g=wht({overview:u,marketplaceDetail:m,t:e,navigate:t,onClaim:()=>{u.course.id&&s.mutate({items:[{courseId:u.course.id}]},{onSuccess:E=>{E.enrolledCourseIds.length>0?t(Wa(E.enrolledCourseIds[0])):t(lx(E.orderId))},onError:E=>I5(e("enroll.claimError"),E)})},onBuy:()=>o(!0),isClaiming:s.isPending}),y=u.course.durationMinutes===null?null:Sht(u.course.durationMinutes),w=u.curriculum.reduce((E,A)=>E+A.lessons.length,0),S=(()=>{try{return new Date(u.course.lastUpdated).toLocaleDateString(void 0,{month:"short",year:"numeric"})}catch{return u.course.lastUpdated}})(),C=[...u.reviewsSummary.total>0?[{key:"rating",icon:l.jsx(Ig,{className:"h-4 w-4"}),label:e("hero.metaRating",{rating:u.reviewsSummary.average.toFixed(1),total:u.reviewsSummary.total.toLocaleStr
1689ing()})}]:[],...y?[{key:"duration",icon:l.jsx(od,{className:"h-4 w-4"}),label:y.hours>0?e("hero.metaDuration",{hours:y.hours,minutes:y.mins}):e("hero.metaDurationShort",{minutes:y.mins})}]:[],...w>0?[{key:"lessons",icon:l.jsx(Ci,{className:"h-4 w-4"}),label:e("hero.metaLessons",{count:w})}]:u.course.personal?[{key:"lessons",icon:l.jsx(Ci,{className:"h-4 w-4"}),label:e("hero.beingWritten")}]:[],{key:"language",icon:l.jsx(SQ,{className:"h-4 w-4"}),label:e("hero.metaLanguage",{language:u.course.language})},{key:"updated",icon:l.jsx(jQ,{className:"h-4 w-4"}),label:e("hero.metaLastUpdated",{date:S})}],k=u.skills.map(E=>({key:E.slug,label:E.name}));return l.jsxs("div",{className:"space-y-6 pb-20 lg:pb-6",children:[l.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_360px]",children:[l.jsxs("div",{className:"space-y-6",children:[l.jsx(SD,{eyebrow:u.course.subtitle??void 0,title:u.course.title,subtitle:u.course.subtitle??void 0,description:u.course.description,meta:C,tags:k,coverImageUrl:u.course.coverImageUrl,coverImageAlt:u.course.title}),l.jsx(Kue,{outcomes:u.outcomes}),l.jsxs("section",{"aria-labelledby":"curriculum-title",className:"rounded-2xl border border-border bg-card p-5 text-card-foreground",children:[l.jsxs("header",{className:"mb-4",children:[l.jsx("h2",{id:"curriculum-title",className:"text-section-title",children:e("curriculum.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:w===0?u.course.personal?e("hero.beingWritten"):null:e("curriculum.subtitle",{weeks:u.curriculum.length,lessons:w,duration:y?y.hours>0?e("hero.metaDuration",{hours:y.hours,minutes:y.mins}):e("hero.metaDurationShort",{minutes:y.mins}):""})})]}),u.curriculum.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:e("curriculum.preparing")}):l.jsx(U9,{weeks:u.curriculum.map(E=>({...E,lessons:E.lessons.map(A=>({...A,durationMinutes:A.durationMinutes??void 0}))})),weekLabel:e("curriculum.weekLabel"),stepsLabel:e("curriculum.stepsLabel"),minutesLabel:e("curriculum.minutesLabel"),lessonsLabel:e("curriculum.lessonsLabel")})]}),l.jsx(Xue,{instructor:u.instructor,personal:u.course.personal}),l.jsxs("section",{"aria-labelledby":"reviews-title",className:"rounded-2xl border border-border bg-card p-5 text-card-foreground",children:[l.jsx("header",{className:"mb-4",children:l.jsx("h2",{id:"reviews-title",className:"text-section-title",children:e("reviews.title")})}),u.reviewsSummary.total===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:e("reviews.empty")}):l.jsx(H9,{average:u.reviewsSummary.average,total:u.reviewsSummary.total,breakdown:u.reviewsSummary.breakdown,outOfFiveLabel:e("reviews.outOfFive"),totalLabel:e("reviews.total",{count:u.reviewsSummary.total}),rowLabel:e("reviews.rowLabel")})]})]}),l.jsx("div",{className:"hidden lg:block",children:l.jsx(Que,{price:p,primaryCta:g,progressPercent:(_=u.enrollment)==null?void 0:_.progressPercent})})]}),l.jsx(Zue,{price:p,primaryCta:g}),l.jsx(Rw,{open:a,onClose:()=>o(!1),items:[{courseId:u.course.id}],amountCents:Math.round(p*100),onSuccess:E=>{o(!1),t(lx(E))}})]})}function kht(){var g,y,w,S;const{t:e}=J("marketplace"),t=St(),{slug:n}=Ec(),r=kdt(n),i=jue(),s=Tue(),a=Eue(),[o,c]=b.useState(!1),u=((g=r.data)==null?void 0:g.name)??e("detail.loading"),d=b.useMemo(()=>l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-[11px] font-medium uppercase tracking-[0.16em] text-primary",children:e("pack.badge")}),l.jsx("h1",{className:"truncate text-page-title",children:u})]}),[u,e]),h=b.useMemo(()=>l.jsx($i,{label:e("detail.backToMarketplace"),onClick:()=>t(ee.ME_MARKETPLACE)}),[t,e]);if(On({left:d,actions:h}),r.isLoading)return l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("detail.loading")});if(r.isError||!r.data)return l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h1",{className:"text-section-title",children:e("detail.notFound")}),l.jsx("button",{type:"button",onClick:()=>t(ee.ME_MARKETPLACE),className:"mt-3 text-sm font-medium text-primary hover:underline",children:e("detail.backToMarketplace")})]});const f=r.data,m=Number(f.price)<=0,p=((y=a.data)==null?void 0:y.provider)!=="str
1689ipe",x=!!((w=s.data)!=null&&w.applicationId&&((S=s.data)!=null&&S.locationId)),v=()=>{i.mutate({items:[{packId:f.id}]},{onSuccess:C=>t(lx(C.orderId)),onError:C=>I5(e("pack.claimError"),C)})};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{"aria-labelledby":"pack-summary-heading",className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h2",{id:"pack-summary-heading",className:"sr-only",children:f.name}),l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0 max-w-2xl",children:[l.jsx("p",{className:"text-sm leading-relaxed text-body-ink",children:f.description}),l.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:e("pack.courseCount",{count:f.courseCount})})]}),l.jsxs("div",{className:"flex flex-col items-end gap-2",children:[l.jsx("span",{className:`text-2xl font-bold ${m?"text-sage":"text-strong"}`,children:m?e("card.free"):`$${Number(f.price).toFixed(2)}`}),m?l.jsx("button",{type:"button",onClick:v,disabled:i.isPending,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-on-dark transition hover:brightness-[1.06] disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:i.isPending?e("detail.claiming"):e("detail.claim")}):l.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-on-dark transition hover:brightness-[1.06] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:e("detail.buy")}),!m&&p&&s.data&&!x&&l.jsx("p",{className:"max-w-xs text-right text-xs text-muted-foreground",children:e("detail.paymentsNotConfigured")})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-section-title",children:e("pack.includedCourses")}),l.jsx("div",{className:"-mx-1 flex w-full overflow-x-auto pb-4 pt-2",children:l.jsx("div",{className:"flex w-max gap-5 px-1",children:f.courses.map((C,k)=>l.jsx(cL,{course:C,index:k},C.id))})})]}),l.jsx(Rw,{open:o,onClose:()=>c(!1),items:[{packId:f.id}],amountCents:Math.round(Number(f.price)*100),onSuccess:C=>{c(!1),t(lx(C))}})]})}function _ht(){var x,v;const{t:e}=J("checkout"),t=St(),n=Tt(),[r]=ps(),i=r.get("orderId")??void 0,s=eue(i,{pollWhilePending:!0}),a=gs(),o=(x=s.data)==null?void 0:x.status,c=b.useRef(null);b.useEffect(()=>{const g=s.data;if(!g||g.status!=="COMPLETED"||c.current===g.id)return;c.current=g.id;const y=`ple.checkoutCompleted.${g.id}`;try{if(window.sessionStorage.getItem(y))return;window.sessionStorage.setItem(y,"1")}catch{}ict({provider:g.provider==="STRIPE"?"stripe":"square",itemType:g.packId?"pack":"course",amountCents:Math.round(Number(g.amount)*100)||0})},[s.data]);const u=b.useRef(void 0);b.useEffect(()=>{u.current==="PENDING"&&o==="COMPLETED"&&n.invalidateQueries({queryKey:["me","courses"]}),u.current=o},[o,n]);const d=o==="PENDING"?"success.pendingTitle":o==="FAILED"?"success.failedTitle":o==="REFUNDED"?"success.refundedTitle":o==="COMPLETED"?"success.title":"success.lookupTitle",h=b.useMemo(()=>l.jsx("div",{children:l.jsx("h1",{className:"text-page-title font-light",children:e(d)})}),[e,d]),f=b.useMemo(()=>l.jsx($i,{label:e("success.backToMarketplace"),onClick:()=>t(ee.ME_MARKETPLACE)}),[e,t]);if(On({left:h,actions:f}),!i||!s.isLoading&&!s.data)return l.jsx("div",{className:"mx-auto max-w-xl",children:l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 text-center",children:[l.jsx("p",{className:"text-base font-medium text-strong",children:e("success.missingOrder")}),l.jsx("div",{className:"mt-5 flex justify-center",children:l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(ee.ME_ORDERS),children:e("success.viewOrders")})})]})});if(s.isLoading)return l.jsxs("div",{className:"mx-auto flex max-w-xl flex-col items-center gap-3 py-16",children:[l.jsx("span",{className:"h-7 w-7 animate-spin rounded-full border-2 border-edition-soft border-t-primary"}),l.jsx("p",{className:"text-sm text-muted-ink",children:e("success.loading")})]});const m=((v=a.data)==null?void 0:v.filter(g=>{var y;return(y=s.data)!=null&&y.courseId?g.courseId===s.data.courseId:!0}))??[],p=s.data?Number(s.data.amount).toFixed(2):"0.00";if(o==="PENDING")return l.jsxs("div",{className:"mx-auto w-full max-w-xl",children:[l.jsxs("div",{role:"status",className:"flex flex-col items-center gap-3 rounded-2xl border border-border bg-card px-8 py-10 text-center",children:[l.jsx(Qo,{className:"h-7 w-7 animate-spin text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("p",{className:"max-w-sm text-sm text-muted-ink",children:e("success.processing")}),l.jsx("p",{className:"max-w-sm text-xs text-muted-foreground",children:e("success.processingHint")})]}),l.jsx("div",{className:"mt-6 flex justify-center",children:l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(ee.ME_ORDERS),children:e("success.viewOrders")})})]});if(o!=="COMPLETED"){const g=o==="REFUNDED"?"success.refundedBody":"success.failedBody";return l.jsx("div",{className:"mx-auto w-full max-w-xl",children:l.jsxs("div",{className:"rounded-2xl border border-border bg-card px-8 pb-8 pt-10 text-center",children:[l.jsx("div",{className:"mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-full bg-clay/10 text-clay",children:l.jsx(Uv,{className:"h-7 w-7",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("p",{role:"alert",className:"mx-auto max-w-sm text-sm text-muted-ink",children:e(g)}),l.jsxs("div",{className:"mt-6 flex flex-col-reverse justify-center gap-3 sm:flex-row",children:[l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(ee.ME_ORDERS),children:e("success.viewOrders")}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_MARKETPLACE),rightIcon:l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75}),children:e("success.backToMarketplace")})]})]})})}return l.jsxs("div",{className:"mx-auto flex w-full max-w-[620px] flex-col gap-6",children:[l.jsxs("section",{className:"relative overflow-hidden rounded-2xl border border-border bg-card px-8 pb-8 pt-10 text-center",children:[l.jsx("div",{className:"bg-brand-gradient pointer-events-none absolute inset-x-0 top-0 h-28"}),l.jsx("div",{className:"relative mx-auto mb-5 flex h-20 w-20 items-center justify-center rounded-full border border-border bg-card",children:l.jsx("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-sage text-white",children:l.jsx(Kn,{className:"h-8 w-8",strokeWidth:2.5})})}),l.jsx("p",{className:"text-lg font-semibold text-sage",children:e("success.body",{total:p})}),s.data&&l.jsxs("div",{className:"mt-5 inline-flex items-center gap-2 rounded-full bg-edition-pale px-4 py-1.5 text-sm text-edition-deeper",children:[l.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.08em]",children:s.data.id.slice(0,8)}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{className:"font-semibold",children:["$",p]})]})]}),m.length>0&&l.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6",children:[l.jsx("h2",{className:"text-section-title",children:e("success.enrolledTitle")}),l.jsx("ul",{className:"mt-4 space-y-3",children:m.map(g=>l.jsxs("li",{className:"flex items-center justify-between gap-4 roun
1689ded-xl border border-border bg-card px-4 py-3 transition-colors hover:border-edition-soft",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.jsx("span",{className:"bg-brand-gradient flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-white",children:l.jsx(Ph,{className:"h-5 w-5",strokeWidth:1.75})}),l.jsx("span",{className:"truncate text-sm font-semibold text-strong",children:g.name})]}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:()=>t(Wa(g.courseId)),rightIcon:l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75}),children:e("success.startLearning")})]},g.courseId))})]}),l.jsxs("div",{className:"flex flex-col-reverse justify-center gap-3 sm:flex-row",children:[l.jsx(ce,{type:"button",variant:"outline",onClick:()=>t(ee.ME_ORDERS),children:e("success.viewOrders")}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_COURSES),rightIcon:l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75}),children:e("success.goToCourses")})]})]})}function Tht(){var c;const{t:e}=J("checkout"),t=St(),[n]=ps(),r=n.get("orderId")??void 0,s=((c=eue(r).data)==null?void 0:c.status)==="COMPLETED",a=b.useMemo(()=>l.jsx("div",{children:l.jsx("h1",{className:"text-page-title font-light",children:e("cancel.title")})}),[e]),o=b.useMemo(()=>l.jsx($i,{label:e("cancel.backToMarketplace"),onClick:()=>t(ee.ME_MARKETPLACE)}),[e,t]);return On({left:a,actions:o}),l.jsx("div",{className:"mx-auto w-full max-w-xl",children:l.jsxs("div",{className:"rounded-2xl border border-border bg-card px-8 pb-8 pt-10 text-center",children:[l.jsx("div",{className:"mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-full bg-clay/10 text-clay",children:l.jsx(AQ,{className:"h-7 w-7",strokeWidth:1.75})}),l.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-ink",children:e(s?"cancel.alreadyPaid":"cancel.body")}),l.jsx("div",{className:"mt-6 flex justify-center",children:s?l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_COURSES),rightIcon:l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75}),children:e("cancel.goToCourses")}):l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.ME_MARKETPLACE),rightIcon:l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75}),children:e("cancel.backToMarketplace")})})]})})}const lG=20,cG=100;function Eht(){var x,v;const{t:e}=J("orders"),t=St(),[n,r]=b.useState(lG),[i,s]=b.useState(null),[a,o]=b.useState(null),c=Zce(n),u=gs(),d=((x=c.data)==null?void 0:x.length)??0,h=d===n&&n<cG,f=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("list.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("list.subtitle")})]}),[e]);On({left:f});const m=async g=>{s(g),o(null);try{await nL(g)}catch{o(g)}finally{s(null)}};if(c.isLoading)return l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("loading")});if(c.isError)return l.jsx("p",{role:"alert",className:"rounded-xl border border-destructive/30 bg-destructive/5 p-6 text-center text-sm text-destructive",children:e("list.errorBody")});const p=new Map;for(const g of u.data??[])p.set(g.courseId,g.name);return l.jsxs("div",{className:"space-y-6",children:[c.data&&c.data.length===0&&l.jsx("p",{className:"rounded-xl border border-border bg-card p-6 text-center text-sm text-muted-foreground",children:e("list.empty")}),l.jsx("ul",{className:"space-y-3","aria-busy":c.isFetching,children:(v=c.data)==null?void 0:v.map(g=>{const w=(g.courseId?p.get(g.courseId):null)??(g.packId?e("list.packPurchase"):e("list.coursePurchase")),S=g.paymentMethod?`${g.provider} · ${g.paymentMethod}`:g.provider;return l.jsxs("li",{children:[l.jsx(Bae,{orderId:g.id,orderLabel:e("list.orderId",{id:g.id.slice(0,8)}),dateLabel:new Date(g.createdAt).toLocaleDateString(),itemName:w,amountLabel:`$${Number(g.amount).toFixed(2)} ${g.currency.toUpperCase()}`,status:g.status,statusLabel:e(`status.${g.status}`),metaLabel:S,onViewDetails:()=>t(ece(g.id)),onViewReceipt:()=>void m(g.id),receiptDisabled:i===g.id,viewDetailsLabel:e("actions.viewDetails"),viewReceiptLabel:e("actions.viewReceipt")}),a===g.id&&l.jsx("div",{className:"mt-2",role:"alert",children:l.jsx(lo,{variant:"error",message:e("detail.receiptError")})})]},g.id)})}),d>0&&l.jsx(ey,{mode:"cursor",hasMore:h,isLoadingMore:c.isFetching&&!c.isLoading,onLoadMore:()=>r(g=>Math.min(g+lG,cG)),summary:e("list.pagination.loadedSummary",{count:d}),labels:{loadMore:e("list.pagination.loadMore"),loading:e("list.pagination.loading"),allLoaded:e("list.pagination.allLoaded"),loadMoreAria:e("list.pagination.loadMoreAria")}})]})}function Oj(e,t){return`$${Number(e).toFixed(2)} ${t.toUpperCase()}`}function uG(e){return e?new Date(e).toLocaleDateString():"â"}function jht(){const{t:e}=J("orders"),t=St(),{id:n}=Ec(),r=Jce(n),[i,s]=b.useState(!1),[a,o]=b.useState(!1),c=()=>t(ee.ME_ORDERS),u=b.useMemo(()=>l.jsx("div",{children:l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("detail.title")})}),[e]),d=b.useMemo(()=>l.jsx($i,{label:e("actions.back"),onClick:c}),[e,c]);On({left:u,actions:d});const h=async()=>
1689{if(n){o(!1),s(!0);try{await nL(n)}catch{o(!0)}finally{s(!1)}}};if(r.isLoading)return l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("detail.loading")});if(r.isError||!r.data)return l.jsx(lo,{variant:"error",title:e("detail.notFoundTitle"),message:e("detail.notFoundBody")});const f=r.data,m=p=>p.type==="pack"?e("detail.packPurchase"):e("detail.coursePurchase");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsx("div",{children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:[e("detail.orderId",{id:f.id.slice(0,8)})," ·"," ",e("detail.placedOn",{date:uG(f.createdAt)})]})}),l.jsx(Oi,{variant:Fae(f.status),size:"md",children:e(`status.${f.status}`)})]}),l.jsxs(ec,{children:[l.jsx(Qf,{children:l.jsx(y0,{children:e("detail.lineItemsTitle")})}),l.jsx(fu,{children:l.jsxs("ul",{className:"divide-y divide-border",children:[f.lineItems.length===0?l.jsxs("li",{className:"flex items-center justify-between py-2 text-sm",children:[l.jsx("span",{className:"text-foreground",children:e("detail.coursePurchase")}),l.jsx("span",{className:"font-medium text-foreground",children:Oj(f.amount,f.currency)})]}):f.lineItems.map(p=>l.jsxs("li",{className:"flex items-center justify-between py-2 text-sm",children:[l.jsxs("span",{className:"min-w-0",children:[l.jsx("span",{className:"block truncate font-medium text-foreground",children:p.name}),l.jsx("span",{className:"text-xs text-muted-foreground",children:m(p)})]}),l.jsx("span",{className:"font-medium text-foreground",children:Oj(p.amount,p.currency)})]},`${p.type}-${p.id}`)),l.jsxs("li",{className:"flex items-center justify-between py-2 text-sm font-semibold",children:[l.jsx("span",{className:"text-foreground",children:e("detail.total")}),l.jsx("span",{className:"text-foreground",children:Oj(f.amount,f.currency)})]})]})})]}),l.jsxs(ec,{children:[l.jsx(Qf,{children:l.jsx(y0,{children:e("detail.paymentTitle")})}),l.jsx(fu,{children:l.jsx("dl",{className:"grid grid-cols-1 gap-x-6 gap-y-2 text-sm sm:grid-cols-2",children:[{label:e("detail.paymentProvider"),value:f.payment.provider},{label:e("detail.paymentMethod"),value:f.payment.method??"â"},{label:e("detail.paymentReference"),value:f.payment.referenceLast4?e("detail.paymentReferenceValue",{last4:f.payment.referenceLast4}):"â"},{label:e("detail.paidOn"),value:f.payment.paidAt?uG(f.payment.paidAt):e("detail.notPaid")}].map(p=>l.jsxs("div",{className:"flex items-center justify-between gap-2 sm:block",children:[l.jsx("dt",{className:"text-muted-foreground",children:p.label}),l.jsx("dd",{className:"font-medium text-foreground",children:p.value})]},p.label))})})]}),l.jsxs(ec,{children:[l.jsxs(Qf,{children:[l.jsx(y0,{children:e("receipts.title")}),l.jsx(S6,{children:e("receipts.description")})]}),l.jsxs(fu,{className:"space-y-3",children:[a&&l.jsx(lo,{variant:"error",message:e("detail.receiptError")}),l.jsx(ce,{variant:"primary",leftIcon:l.jsx(Dg,{className:"h-4 w-4","aria-hidden":"true"}),isLoading:i,onClick:()=>void h(),children:e(i?"receipts.downloading":"actions.downloadReceipt")})]})]}),l.jsxs(ec,{children:[l.jsxs(Qf,{children:[l.jsx(y0,{children:e("subscriptions.title")}),l.jsx(S6,{children:e("subscriptions.description")})]}),l.jsx(fu,{children:l.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[l.jsx(Yxe,{className:"h-8 w-8 text-muted-foreground","aria-hidden":"true"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:e("subscriptions.empty.title")}),l.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:e("subscriptions.empty.body")})]})})]})]})}const Nht=768;function Aht(e){return e<Nht?"day":"week"}const Dj="__all__";function Mht({value:e,onChange:t,className:n}){const{t:r}=J("calendar"),i=gs(),s=b.useMemo(()=>{const o=i.data??[];return[{label:r("courseFilter.allCourses"),value:Dj},...o.map(c=>({label:c.customName??c.name,value:c.courseId}))]},[i.data,r]),a=o=>{t(o===Dj?null:o)};return l.jsx(Ok,{label:r("courseFilter.label"),options:s,value:e??Dj,onChange:a,disabled:i.isLoading,className:n})}const Rht=[{kind:"lesson",label:"Lessons",className:"cal-filter-lesson"},{kind:"review",label:at.key==="ciai"?"Quick refreshers":"Spaced reviews",className:"cal-filter-review"},{kind:"custom",label:"Custom events",className:"cal-filter-custom"},{kind:"mock",label:"Mock tests",className:"cal-filter-mock"},{kind:"exam",label:"Exam day",className:"cal-filter-exam"}];function Oht({enabled:e,countsByKind:t,onToggle:n}){return l.jsxs("div",{className:"cal-filters",children:[l.jsx("div",{className:"cal-section-label",children:"My Calendars"}),Rht.map(r=>{const i=e.has(r.kind),s=t==null?void 0:t[r.kind];return l.jsxs("button",{type:"button",className:`cal-filter-row ${r.className}`,onClick:()=>n(r.kind),"aria-pressed":i,children:[l.jsx("span",{className:`cal-filter-check ${i?"on":""}`,children:i&&l.jsx(Kn,{size:10,"aria-hidden":"true"})}),l.jsx("span",{className:"cal-filter-lbl",children:r.label}),typeof s=="number"&&s>0&&l.jsx("span",{className:"cal-filter-n",children:s})]},r.kind)})]})}function Dht({examTarget:e,onSet:t}){if(!e)return l.jsxs("button",{type:"button",className:"cal-countdown cal-countdown-empty",onClick:t,children:[l.jsx("div",{className:"cal-countdown-lbl",children:"Target Exam"}),l.jsxs("div",{className:"cal-countdown-set",children:[l.jsx(Gv,{size:14,"aria-hidden":"true"})," Set a target"]}),l.jsx("div",{className:"cal-countdown-help",children:"Drive your study plan with a deadline."})]});const n=e.daysRemaining;let r,i;return n>0?(r=String(n),i=n===1?" day":" days"):n===0?(r="Today",i=""):(r=String(Math.abs(n)),i=n===-1?" day ago":" days ago"),l.jsxs("div",{className:"cal-countdown",children:[l.jsxs("div",{className:"cal-countdown-lbl",children:[l.jsx(of,{size:11,"aria-hidden":"true"})," Target Exam"]}),l.jsxs("div",{className:"cal-countdown-v",children:[r,l.jsx("small",{children:i})]}),l.jsxs("div",{className:"cal-countdown-ev",children:[e.targetExamLabel," · ",Lht(e.targetExamDate)]})]})}function Lht(e){return new Date(`${e}
1689T00:00:00Z`).toLocaleString("en-US",{timeZone:"UTC",month:"short",day:"numeric"})}const cx=48,dG=15;function z5(e){const t=e.getUTCDay();return t===0?7:t}function wa(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function rg(e){const t=wa(e),n=z5(t);return t.setUTCDate(t.getUTCDate()-(n-1)),t}function tf(e,t){const n=new Date(e);return n.setUTCDate(n.getUTCDate()+t),n}function Sr(e){return wa(e).toISOString().slice(0,10)}function jm(e,t){return Sr(e)===Sr(t)}function Pht(e){return e.toLocaleString("en-US",{timeZone:"UTC",month:"long",year:"numeric"})}function Iht(e,t,n){return e==="day"?t.toLocaleString("en-US",{timeZone:"UTC",weekday:"long",month:"long",day:"numeric",year:"numeric"}):e==="month"?Pht(t):t.getUTCMonth()===n.getUTCMonth()?`${t.toLocaleString("en-US",{timeZone:"UTC",month:"long",day:"numeric"})} â ${n.getUTCDate()}, ${t.getUTCFullYear()}`:`${t.toLocaleString("en-US",{timeZone:"UTC",month:"short",day:"numeric"})} â ${n.toLocaleString("en-US",{timeZone:"UTC",month:"short",day:"numeric"})}, ${t.getUTCFullYear()}`}function Fht(e,t){if(e==="day")return{from:Sr(t),to:Sr(t)};if(e==="month"){const i=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1)),s=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,0)),a=rg(i),o=tf(rg(s),6);return{from:Sr(a),to:Sr(o)}}const n=rg(t),r=e==="workWeek"?4:6;return{from:Sr(n),to:Sr(tf(n,r))}}function hG(e,t,n){if(e==="day")return tf(t,n);if(e==="month"){const i=new Date(t);return i.setUTCMonth(i.getUTCMonth()+n),i}return tf(t,n*7)}function Bht(e,t,n){const r=new Date(e),i=new Date(t),s=r.getUTCHours()*60+r.getUTCMinutes(),a=i.getUTCHours()*60+i.getUTCMinutes(),o=s-n*60,c=Math.max(15,a-s);return{top:o/60*cx,height:c/60*cx}}function Jue(e){return e===0?"12 AM":e===12?"12 PM":e<12?`${e} AM`:`${e-12} PM`}function A0(e,t){const n=new Date(e),r=new Date(t);return`${fG(n)} â ${fG(r)}`}function fG(e){const t=e.getUTCHours(),n=e.getUTCMinutes(),r=(t+11)%12+1,i=t<12?"AM":"PM",s=n===0?"":`:${String(n).padStart(2,"0")}`;return`${r}${s} ${i}`}function zht({selected:e,eventDates:t,onSelect:n}){const[r,i]=b.useState(()=>wa(e)),s=r.toLocaleString("en-US",{timeZone:"UTC",month:"long",year:"numeric"}),a=b.useMemo(()=>$ht(r),[r]),o=wa(new Date);return l.jsxs("div",{className:"cal-mini",children:[l.jsxs("div",{className:"cal-mini-head",children:[l.jsx("span",{className:"cal-mini-month",children:s}),l.jsxs("span",{className:"cal-mini-nav",children:[l.jsx("button",{type:"button","aria-label":"Previous month",onClick:()=>i(new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()-1,1))),children:l.jsx($o,{size:12})}),l.jsx("button",{type:"button","aria-label":"Next month",onClick:()=>i(new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+1,1))),children:l.jsx(ns,{size:12})})]})]}),l.jsxs("div",{className:"cal-mini-grid",children:[["M","T","W","T","F","S","S"].map((c,u)=>l.jsx("span",{className:"cal-mini-dow",children:c},`dow-${u}`)),a.map(c=>{const u=Sr(c),d=c.getUTCMonth()===r.getUTCMonth(),h=t==null?void 0:t.has(u),f=jm(c,o),m=jm(c,e);return l.jsx("button",{type:"button",className:["cal-mini-day",!d&&"cal-mini-muted",h&&"cal-mini-has",f&&"cal
1689-mini-today",m&&"cal-mini-selected"].filter(Boolean).join(" "),onClick:()=>n(c),children:c.getUTCDate()},u)})]})]})}function $ht(e){const t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),n=rg(t);return Array.from({length:42},(r,i)=>tf(n,i))}function Uht({selectedDate:e,grid:t,examTarget:n,filters:r,onSelectDate:i,onToggleFilter:s,onSetExamTarget:a}){const o=new Set,c={};for(const u of(t==null?void 0:t.events)??[]){o.add(Sr(new Date(u.startUtc)));const d=u.kind;c[d]=(c[d]??0)+1}return l.jsxs("aside",{className:"cal-rail",children:[l.jsx(zht,{selected:e,eventDates:o,onSelect:i}),l.jsx(Dht,{examTarget:n??null,onSet:a}),l.jsx(Oht,{enabled:r,countsByKind:c,onToggle:s})]})}const Vht=[{id:"day",label:"Day"},{id:"workWeek",label:"Work Week"},{id:"week",label:"Week"},{id:"month",label:"Month"}];function Hht({view:e,rangeLabel:t,onViewChange:n,onPrev:r,onNext:i,onToday:s,onCreateEvent:a}){return l.jsxs("header",{className:"cal-toolbar",children:[l.jsxs("div",{className:"cal-toolbar-left",children:[l.jsxs("div",{className:"cal-toolbar-nav",children:[l.jsx(Pn,{variant:"ghost",size:"sm","aria-label":"Previous",onClick:r,children:l.jsx($o,{size:17,strokeWidth:1.75})}),l.jsx(Pn,{variant:"ghost",size:"sm","aria-label":"Next",onClick:i,children:l.jsx(ns,{size:17,strokeWidth:1.75})})]}),l.jsx("h2",{className:"cal-toolbar-center","aria-live":"polite",children:t}),l.jsxs(ce,{variant:"outline",size:"sm",onClick:s,"aria-label":"Jump to today",children:[l.jsx(ki,{size:14,strokeWidth:1.75,"aria-hidden":"true"})," Today"]})]}),l.jsxs("div",{className:"cal-toolbar-right",children:[l.jsx("div",{className:"cal-view-switcher",role:"tablist","aria-label":"Calendar view",children:Vht.map(o=>l.jsx("button",{type:"button",role:"tab","aria-selected":o.id===e,className:`cal-view-btn ${o.id===e?"cal-view-btn-active":""}`,onClick:()=>n(o.id),children:o.label},o.id))}),l.jsxs(ce,{variant:"primary",size:"sm",onClick:a,children:[l.jsx(Gv,{size:14,strokeWidth:1.75,"aria-hidden":"true"})," New event"]})]})]})}function qht({open:e,conflicts:t,onConfirm:n,onCancel:r}){const i=t.length===1?`This conflicts with "${t[0].conflictingTitle}".`:`This conflicts with ${t.length} other events.`;return l.jsx($x,{open:e,title:"Schedule conflict",description:`${i} Move anyway?`,confirmLabel:"Move anyway",cancelLabel:"Cancel",variant:"warning",onConfirm:n,onOpenChange:s=>{s||r()}})}const Ght={lesson:"cal-evt-lesson",review:"cal-evt-review",custom:"cal-evt-custom",mock:"cal-evt-mock",exam:"cal-evt-exam"};function Wht({event:e,style:t,onClick:n,onPointerDown:r,onResizePointerDown:i}){var f,m,p;const{t:s}=J("calendar"),a=Yht(e),o=(f=e.lesson)==null?void 0:f.punctuality,c=!!((m=e.lesson)!=null&&m.completed),u=o?s(`punctuality.${mG(o)}`):"",d=Kht(o,u),h=o?`${e.title}, ${s(`punctuality.ariaSuffix.${mG(o)}`)}`:e.title;return l.jsxs("div",{role:"button",tabIndex:0,"data-event-id":e.id,"data-event-kind":e.kind,"data-conflict":e.conflict||void 0,"data-completed":c||void 0,"data-punctuality":o,"aria-label":h,className:["cal-evt",Ght[e.kind],e.conflict?"cal-evt-conflict":"",c?"cal-evt-completed":"",o?`cal-evt-punctuality-${o.toLowerCase()}`:""].filter(Boolean).join(" "),style:t,onClick:()=>n==null?void 0:n(e),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),n==null||n(e))},onPointerDown:x=>{x.target.dataset.resizeHandle||r==null||r(e,x)},children:[e.resizable&&i&&l.jsx("span",{"data-resize-handle":"top",className:"cal-evt-resize cal-evt-resize-t",onPointerDown:x=>i(e,"top",x)}),l.jsxs("div",{className:"cal-evt-title",children:[((p=e.customEvent)==null?void 0:p.isRecurring)&&l.jsx(Kxe,{size:11,"aria-label":"Recurring",className:"cal-evt-icon"}),e.conflict&&l.jsx(lf,{size:11,"aria-label":"Conflict",className:"cal-evt-icon"}),d,l.jsx("span",{children:e.title})]}),a&&l.jsx("div",{className:"cal-evt-meta",children:a}),l.jsxs("div",{className:"cal-evt-time",children:[l.jsx(od,{size:9,className:"cal-evt-icon-inline"}),A0(e.startUtc,e.endUtc)]}),e.resizable&&i&&l.jsx("span",{"data-resize-handle":"bottom",className:"cal-evt-resize cal-evt-resize-b",onPointerDown:x=>i(e,"bottom",x)})]})}function Yht(e){var t;return e.lesson?`${e.lesson.courseTitle} · W${e.lesson.week}D${e.lesson.day}L${e.lesson.lesson}`:e.review?e.review.conceptSummary:(t=e.customEvent)!=null&&t.isRecurring?"Recurring":null}function Kht(e,t){return e?e==="EARLY"?l.jsx(Cxe,{size:11,"aria-label":t,className:"cal-evt-icon"}):e==="LATE"?l.jsx(mQ,{size:11,"aria-label":t,className:"cal-evt-icon"}):l.jsx(vQ,{size:11,"aria-label":t,className:"cal-evt-icon"}):null}function mG(e){return e==="EARLY"?"early":e==="LATE"?"late":"onTime"}function Xht({workingStartHour:e,workingEndHour:t}){const[n,r]=b.useState(()=>new Date);b.useEffect(()=>{const c=window.setInterval(()=>r(new Date),6e4);return()=>window.clearInterval(c)},[]);const i=n.getHours();if(i<e||i>=t)return null;const a=((i-e)*60+n.getMinutes())/60*cx,o=n.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});
1689return l.jsx("div",{className:"cal-now-line",style:{top:a},"aria-hidden":"true",children:l.jsx("span",{className:"cal-now-label",children:o})})}function Qht({startHour:e,endHour:t}){const n=Array.from({length:t-e},(r,i)=>e+i);return l.jsx("div",{className:"cal-time-rail",style:{width:56},children:n.map(r=>l.jsx("div",{className:"cal-time-label",style:{height:cx},children:Jue(r)},r))})}function ede({data:e,dayCount:t=7,startOverride:n,onEventClick:r,onEventPointerDown:i,onResizePointerDown:s,onSlotClick:a}){const o=wa(n??new Date(`${e.range.from}T00:00:00Z`)),c=wa(new Date),u=b.useMemo(()=>Array.from({length:t},(p,x)=>tf(o,x)),[o,t]),{workingHours:d,events:h}=e,f=b.useMemo(()=>Zht(h,u),[h,u]),m=h.find(p=>p.kind==="exam"&&p.allDay);return l.jsxs("div",{className:"cal-week-view","data-day-count":t,children:[l.jsxs("div",{className:"cal-week-header",style:{gridTemplateColumns:`56px repeat(${t}, 1fr)`},children:[l.jsx("div",{className:"cal-week-corner","aria-hidden":"true"}),u.map(p=>{const x=jm(p,c),g=z5(p)>=6,y=f.get(Sr(p))??[];return l.jsxs("div",{className:`cal-week-dayhead ${x?"cal-today":""} ${g?"cal-weekend":""}`,children:[l.jsx("div",{className:"cal-week-dow",children:pG(p)}),l.jsx("div",{className:"cal-week-dnum",children:p.getUTCDate()}),l.jsxs("div",{className:"cal-week-evcount",children:[y.length," events"]})]},Sr(p))})]}),l.jsxs("div",{className:"cal-allday-strip",style:{gridTemplateColumns:`56px repeat(${t}, 1fr)`},children:[l.jsx("div",{className:"cal-allday-corner",children:"ALL-DAY"}),u.map(p=>{const x=m&&jm(p,new Date(m.startUtc));return l.jsx("div",{className:"cal-allday-cell",children:x&&m&&l.jsx("span",{className:"cal-exam-pill",title:m.title,children:m.title})},`allday-${Sr(p)}`)})]}),l.jsxs("div",{className:"cal-time-grid",style:{gridTemplateColumns:`56px repeat(${t}, 1fr)`},children:[l.jsx(Qht,{startHour:d.startHour,endHour:d.endHour}),u.map(p=>{const x=jm(p,c),g=z5(p)>=6,y=f.get(Sr(p))??[];return l.jsxs("div",{className:`cal-day-col ${x?"cal-today":""} ${g?"cal-weekend":""}`,"data-date":Sr(p),children:[Array.from({length:d.endHour-d.startHour},(w,S)=>{const C=d.startHour+S;return l.jsx("button",{type:"button",className:"cal-hour-row",style:{height:cx},"aria-label":`Create event ${Jue(C)} ${pG(p)}`,onClick:()=>a==null?void 0:a(p,C)},`hr-${C}`)}),x&&l.jsx(Xht,{workingStartHour:d.startHour,workingEndHour:d.endHour}),y.filter(w=>!w.allDay).map(w=>{const S=Bht(w.startUtc,w.endUtc,d.startHour);return l.jsx(Wht,{event:w,style:{position:"absolute",top:S.top,height:S.height,left:4,right:4},onClick:r,onPointerDown:i,onResizePointerDown:s},w.id)})]},`col-${Sr(p)}`)})]})]})}function pG(e){return e.toLocaleString("en-US",{timeZone:"UTC",weekday:"short"})}function Zht(e,t){const n=new Map;for(const r of t)n.set(Sr(r),[]);for(const r of e){const i=Sr(new Date(r.startUtc)),s=n.get(i);s&&s.push(r)}return n}function Jht({data:e,date:t,onEventClick:n,onEventPointerDown:r,onResizePointerDown:i,onSlotClick:s}){return l.jsx(ede,{data:e,dayCount:1,startOverride:wa(t),onEventClick:n,onEventPointerDown:r,onResizePointerDown:i,onSlotClick:s})}const eft=[{id:"instance",label:e=>`${e} this event only`,help:"Other instances of the recurring series are untouched."},{id:"series",label:e=>`${e} the whole series`,help:"Apply to every past and future instance."},{id:"thisAndFuture",label:e=>`${e} this and future events`,help:"Earlier instances stay as they are."}];function gG({value:e,onChange:t,verb:n}){return l.jsxs("fieldset",{className:"cal-scope-picker",children:[l.jsx("legend",{className:"cal-scope-legend",children:"This event is recurring"}),eft.map(r=>l.jsxs("label",{className:"cal-scope-option",children:[l.jsx("input",{type:"radio",name:"cal-scope",value:r.id,checked:e===r.id,onChange:()=>t(r.id)}),l.jsxs("span",{children:[l.jsx("span",{className:"cal-scope-label",children:r.label(n)}),l.jsx("span",{className:"cal-scope-help",children:r.help})]})]},r.id))]})}function tft({open:e,event:t,isSavingUpdate:n,isDeletingEvent:r,onClose:i,onUpdate:s,onDelete:a,onOpenLesson:o}){var x;const[c,u]=b.useState("view"),[d,h]=b.useState(""),[f,m]=b.useState("instance");b.useEffect(()=>{!e||!t||(u("view"),h(t.title),m("instance"))},[e,t==null?void 0:t.id]);const p=b.useMemo(()=>{var v;return!!((v=t==null?void 0:t.customEvent)!=null&&v.isRecurring)},[t]);return t?t.kind==="lesson"?l.jsxs(_u,{open:e,onOpenChange:v=>{v||i()}
1689,title:t.title,description:t.lesson?`${t.lesson.courseTitle} · Week ${t.lesson.week}, Day ${t.lesson.day}, Lesson ${t.lesson.lesson}`:void 0,onSubmit:v=>{v.preventDefault(),o==null||o(t)},submitLabel:"Open lesson",cancelLabel:"Close",children:[l.jsx("p",{className:"cal-modal-meta",children:A0(t.startUtc,t.endUtc)}),((x=t.lesson)==null?void 0:x.isOverridden)&&l.jsx("p",{className:"cal-modal-meta cal-modal-meta-warn",children:"This lesson was rescheduled from its default Arthur-planned slot."})]}):t.kind==="review"?l.jsx(_u,{open:e,onOpenChange:v=>{v||i()},title:t.title,description:at.key==="ciai"?"Quick refreshers are scheduled by Arthur from your practice queue.":"Spaced reviews are scheduled by Arthur from your practice queue.",onSubmit:v=>{v.preventDefault(),window.location.assign("/me/practice/spaced")},submitLabel:"Open practice",cancelLabel:"Close",children:l.jsx("p",{className:"cal-modal-meta",children:A0(t.startUtc,t.endUtc)})}):l.jsxs(_u,{open:e,onOpenChange:v=>{v||i()},title:c==="confirm-delete"?"Delete event?":t.title,description:c==="view"?A0(t.startUtc,t.endUtc):void 0,onSubmit:v=>{v.preventDefault(),c==="edit"&&t.customEvent?s({id:t.customEvent.eventId,data:{title:d.trim(),scope:p?f:void 0}}):c==="confirm-delete"&&t.customEvent&&a({id:t.customEvent.eventId,scope:p?f:"instance"})},isSubmitting:n||r,submitLabel:c==="view"?"Edit":c==="edit"?"Save":"Delete",cancelLabel:"Close",children:[c==="view"&&l.jsxs("div",{className:"cal-modal-grid",children:[l.jsxs("p",{className:"cal-modal-meta",children:[A0(t.startUtc,t.endUtc),p&&" · Recurring"]}),l.jsxs("div",{className:"cal-modal-actions",children:[l.jsx(ce,{variant:"ghost",size:"sm",onClick:()=>u("edit"),type:"button",children:"Edit"}),l.jsx(ce,{variant:"destructive",size:"sm",onClick:()=>u("confirm-delete"),type:"button",children:"Delete"})]})]}),c==="edit"&&l.jsxs("div",{className:"cal-modal-grid",children:[l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:"Title"}),l.jsx(fn,{value:d,onChange:v=>h(v.currentTarget.value),required:!0,autoFocus:!0})]}),p&&l.jsx(gG,{value:f,onChange:m,verb:"Edit"})]}),c==="confirm-delete"&&l.jsxs("div",{className:"cal-modal-grid",children:[l.jsx("p",{children:"This event will be removed from your calendar."}),p&&l.jsx(gG,{value:f,onChange:m,verb:"Delete"})]})]}):null}function nft({data:e,selectedDate:t,examTarget:n,onSelectDate:r,onEventClick:i}){const s=wa(t),a=rg(s),o=b.useMemo(()=>Array.from({length:7},(h,f)=>tf(a,f)),[a]),c=b.useMemo(()=>{const h=new Map;for(const f of e.events){const m=Sr(new Date(f.startUtc)),p=h.get(m)??[];p.push(f),h.set(m,p)}for(const[,f]of h)f.sort((m,p)=>m.startUtc.localeCompare(p.startUtc));return h},[e.events]),u=Sr(s),d=c.get(u)??[];return l.jsxs("div",{className:"cal-mobile",children:[l.jsx("div",{className:"cal-mobile-daystrip",children:o.map(h=>{const f=c.get(Sr(h))??[],m=jm(h,s);return l.jsxs("button",{type:"button",className:`cal-mobile-day ${m?"cal-mobile-day-selected":""}`,onClick:()=>r(h),children:[l.jsx("div",{className:"cal-mobile-dow",children:rft(h)}),l.jsx("div",{className:"cal-mobile-dn",children:h.getUTCDate()}),l.jsx("div",{className:"cal-mobile-dots",children:f.slice(0,3).map(p=>l.jsx("span",{className:`cal-mobile-dot cal-mobile-dot-${p.kind}`},p.id))})]},Sr(h))})}),n&&l.jsx("div",{className:"cal-mobile-exam",children:l.jsxs("span",{className:"cal-mobile-exam-pill",children:[n.targetExamLabel," â"," ",n.daysRemaining>0?`${n.daysRemaining} day${n.daysRemaining===1?"":"s"}`:"Today"]})}),l.jsx("div",{className:"cal-mobile-agenda",children:d.length===0?l.jsx("div",{className:"cal-mobile-empty",children:"Nothing scheduled."}):d.map(h=>{var f;return l.jsxs("button",{type:"button",className:`cal-mobile-evt cal-mobile-evt-${h.kind}`,onClick:()=>i==null?void 0:i(h),children:[l.jsx("div",{className:"cal-mobile-evt-time",children:h.allDay?"All day":A0(h.startUtc,h.endUtc)}),l.jsx("div",{className:"cal-mobile-evt-title",children:h.title}),h.lesson&&l.jsx("div",{className:"cal-mobile-evt-sub",children:h.lesson.courseTitle}),((f=h.customEvent)==null?void 0:f.isRecurring)&&l.jsx("div",{className:"cal-mobile-evt-sub",children:"Recurring"})]}
1689,h.id)})})]})}function rft(e){return e.toLocaleString("en-US",{timeZone:"UTC",weekday:"short"})}const xG=3;function ift({data:e,referenceDate:t,onEventClick:n,onDayClick:r}){const i=b.useMemo(()=>sft(t),[t]),s=wa(new Date),a=b.useMemo(()=>{const o=new Map;for(const c of e.events){const u=Sr(new Date(c.startUtc)),d=o.get(u)??[];d.push(c),o.set(u,d)}for(const[,c]of o)c.sort((u,d)=>u.startUtc.localeCompare(d.startUtc));return o},[e.events]);return l.jsxs("div",{className:"cal-month-view",children:[l.jsx("div",{className:"cal-month-dow-row",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map((o,c)=>l.jsx("div",{className:`cal-month-dow ${c>=5?"cal-weekend":""}`,children:o},o))}),l.jsx("div",{className:"cal-month-grid",children:i.map(o=>{const c=o.getUTCMonth()===t.getUTCMonth(),u=jm(o,s),d=z5(o)>=6,h=a.get(Sr(o))??[],f=h.slice(0,xG),m=Math.max(0,h.length-xG);return l.jsxs("button",{type:"button",className:["cal-month-cell",!c&&"cal-muted",d&&"cal-weekend",u&&"cal-today"].filter(Boolean).join(" "),onClick:()=>r==null?void 0:r(o),"aria-label":`Open day view for ${Sr(o)}`,children:[l.jsx("span",{className:"cal-month-day-num",children:o.getUTCDate()}),l.jsxs("div",{className:"cal-month-chips",children:[f.map(p=>l.jsx("span",{className:`cal-month-chip cal-month-chip-${p.kind}`,onClick:x=>{x.stopPropagation(),n==null||n(p)},title:p.title,children:p.allDay?p.title:`${aft(p.startUtc)} ${p.title}`},p.id)),m>0&&l.jsxs("span",{className:"cal-month-more","aria-label":`${m} more events`,children:["+ ",m," more"]})]})]},Sr(o))})})]})}function sft(e){const t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),n=rg(t);return Array.from({length:42},(r,i)=>tf(n,i))}function aft(e){const t=new Date(e),n=t.getUTCHours(),r=t.getUTCMinutes(),i=(n+11)%12+1,s=n<12?"a":"p";return r===0?`${i}${s}`:`${i}:${String(r).padStart(2,"0")}${s}`}const oft=[{value:"custom",labelKey:"newEvent.kinds.custom"},{value:"study",labelKey:"newEvent.kinds.study"},{value:"mock",labelKey:"newEvent.kinds.mock"},{value:"reminder",labelKey:"newEvent.kinds.reminder"}],lft=[{value:1,labelKey:"newEvent.weekdays.mon"},{value:2,labelKey:"newEvent.weekdays.tue"},{value:3,labelKey:"newEvent.weekdays.wed"},{value:4,labelKey:"newEvent.weekdays.thu"},{value:5,labelKey:"newEvent.weekdays.fri"},{value:6,labelKey:"newEvent.weekdays.sat"},{value:7,labelKey:"newEvent.weekdays.sun"}];function cft({open:e,defaults:t,isSubmitting:n,onCancel:r,onSubmit:i}){const{t:s}=J("calendar"),[a,o]=b.useState(""),[c,u]=b.useState(""),[d,h]=b.useState("custom"),[f,m]=b.useState(""),[p,x]=b.useState(""),[v,g]=b.useState(60),[y,w]=b.useState([]),[S,C]=b.useState(""),[k,_]=b.useState(15),[E,A]=b.useState(null);b.useEffect(()=>{e&&(o(""),u(""),h((t==null?void 0:t.kind)??"custom"),m((t==null?void 0:t.date)??""),x((t==null?void 0:t.time)??""),g(60),w([]),C(""),_(15),A(null))},[e,t==null?void 0:t.date,t==null?void 0:t.time,t==null?void 0:t.kind]);const j=M=>{w($=>$.includes(M)?$.filter(B=>B!==M):[...$,M].sort())},D=M=>{if(M.preventDefault(),A(null),!a.trim()){A("Title is required.");return}if(!f){A("Date is required.");return}if(y.length>0&&!S){A("Recurring events need an end date.");return}if(y.length>0&&(new Date(S).getTime()-new Date(f).getTime())/864e5>365){A("Recurrence end date cannot be more than 365 days from the start.");return}i({title:a.trim(),body:c.trim()||void 0,kind:d,date:f,time:p||void 0,durationMinutes:v,reminderMinutes:k===""?void 0:Number(k),recurrenceDays:y.length>0?y:void 0,recurrenceEndDate:y.length>0?S:void 0})};return l.jsx(_u,{open:e,onOpenChange:M=>{M||r()},title:s("newEvent.dialogTitle"),description:s("newEvent.dialogDescription"),onSubmit:D,isSubmitting:n,submitLabel:s("newEvent.submit"),children:l.jsxs("div",{className:"cal-modal-grid",children:[l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:s("newEvent.title")}),l.jsx(fn,{value:a,onChange:M=>o(M.currentTarget.value),placeholder:s("newEvent.titlePlaceholder"),required:!0,autoFocus:!0})]}),l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:s("newEvent.kind")}),l.jsx(Ho,{value:d,onChange:M=>h(M),options:oft.map(M=>({value:M.value,label:s(M.labelKey)})),ariaLabel:"Event kind"})]}),l.jsxs("div",{className:"cal-modal-row cal-modal-split",children:[l.jsxs("label",{children:[l.jsx("span",{children:s("newEvent.date")}),l.jsx(fn,{type:"date",value:f,onChange:M=>m(M.currentTarget.value),required:!0})]}),l.jsxs("label",{children:[l.jsx("span",{children:s("newEvent.startTime")}),l.jsx(fn,{type:"time",value:p,onChange:M=>x(M.currentTarget.value)})]}),l.jsxs("label",{children:[l.jsx("span",{children:s("newEvent.duration")}
1689),l.jsx(fn,{type:"number",min:15,max:480,step:15,value:v,onChange:M=>g(Number(M.currentTarget.value))})]})]}),l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:s("newEvent.notes")}),l.jsx(Io,{value:c,onChange:M=>u(M.currentTarget.value),rows:2,placeholder:s("newEvent.notesPlaceholder")})]}),l.jsxs("fieldset",{className:"cal-modal-row cal-recurrence-fieldset",children:[l.jsx("legend",{children:s("newEvent.repeatWeeklyOn")}),l.jsx("div",{className:"cal-weekday-row",children:lft.map(M=>l.jsx("button",{type:"button","aria-pressed":y.includes(M.value),className:`cal-weekday-btn ${y.includes(M.value)?"on":""}`,onClick:()=>j(M.value),children:s(M.labelKey)},M.value))}),y.length>0&&l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:s("newEvent.endOn")}),l.jsx(fn,{type:"date",value:S,onChange:M=>C(M.currentTarget.value),required:!0})]})]}),l.jsxs("label",{className:"cal-modal-row",children:[l.jsx("span",{children:s("newEvent.reminder")}),l.jsx(fn,{type:"number",min:0,max:10080,value:k,onChange:M=>_(M.currentTarget.value===""?"":Number(M.currentTarget.value))})]}),E&&l.jsx("p",{className:"cal-modal-error",children:E})]})})}function yG(e){const t=e/cx*60;return Math.round(t/dG)*dG}function TS(e,t){return new Date(new Date(e).getTime()+t*60*1e3).toISOString()}function uft({onCommit:e}){const t=b.useRef(null),n=b.useCallback(a=>{const o=t.current;if(!o)return;const c=a.clientY-o.startY,u=yG(c),d=document.querySelector(`[data-event-id="${CSS.escape(o.event.id)}"]`);if(d){if(o.mode==="move")d.style.transform=`translateY(${u/60*48}px)`;else if(o.mode==="resize-bottom"){const h=d.offsetHeight;d.style.height=`${Math.max(24,h+u/60*48)}px`}else if(o.mode==="resize-top"){d.style.transform=`translateY(${u/60*48}px)`;const h=d.offsetHeight;d.style.height=`${Math.max(24,h-u/60*48)}px`}}},[]),r=b.useCallback(a=>{const o=t.current;if(t.current=null,document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",r),!o)return;const c=document.querySelector(`[data-event-id="${CSS.escape(o.event.id)}"]`);c&&(c.style.transform="",c.style.height="");const u=a.clientY-o.startY,d=yG(u);if(d===0)return;let h=o.originalStartUtc,f=o.originalEndUtc;o.mode==="move"?(h=TS(o.originalStartUtc,d),f=TS(o.originalEndUtc,d)):o.mode==="resize-bottom"?f=TS(o.originalEndUtc,d):o.mode==="resize-top"&&(h=TS(o.originalStartUtc,d)),e(o.event,h,f)},[e,n]),i=b.useCallback((a,o)=>{a.draggable&&(o.preventDefault(),t.current={event:a,startY:o.clientY,mode:"move",originalStartUtc:a.startUtc,originalEndUtc:a.endUtc},document.addEventListener("pointermove",n),document.addEventListener("pointerup",r))},[n,r]),s=b.useCallback((a,o,c)=>{a.resizable&&(c.preventDefault(),c.stopPropagation(),t.current={event:a,startY:c.clientY,mode:o==="top"?"resize-top":"resize-bottom",originalStartUtc:a.startUtc,originalEndUtc:a.endUtc},document.addEventListener("pointermove",n),document.addEventListener("pointerup",r))},[n,r]);return{onEventPointerDown:i,onResizePointerDown:s}}const dft=["lesson","review","custom","mock","exam"],Lj="courseId";function hft(){const e=St(),t=c_(),{t:n}=J("calendar"),r=b.useMemo(()=>l.jsxs("div",{children:[l.jsxs("h1",{className:"text-page-title font-light text-strong",children:[n("pageTitle")," ",l.jsx("span",{className:"font-medium text-primary",children:n("pageTitleAccent")})]}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n("pageSubtitle")})]}),[n]);On({left:r});const[i,s]=b.useState(!0),[a,o]=b.useState(()=>Aht(window.innerWidth)),[c,u]=b.useState(()=>wa(new Date)),[d,h]=b.useState(()=>new Set(dft)),[f,m]=ps(),p=f.get(Lj),x=b.useCallback(De=>{m(Pe=>{const ct=new URLSearchParams(Pe);return De===null?ct.delete(Lj):ct.set(Lj,De),ct},{replace:!0})},[m]),[v,g]=b.useState(()=>typeof window<"u"&&window.matchMedia("(max-width: 767px)").matches);b.useEffect(()=>{if(typeof window>"u")return;const De=window.matchMedia("(max-width: 767px)"),Pe=ct=>g(ct.matches);return De.addEventListener("change",Pe),()=>De.removeEventListener("change",Pe)},[]);const y=v?"day":a,w=b.useMemo(()=>Fht(y,c),[y,c]),S=Frt({view:y,...w,courseId:p??void 0}),C=Yce(),k=Brt(),_=zrt(),E=$rt(),A=Urt(),j=Vrt(),D=Kce(),[M,$]=b.useState({open:!1}),[B,z]=b.useState(null),[O,P]=b.useState(null),[I,q]=b.useState(!1),R=b.useMemo(()=>S.data?{...S.data,events:S.data.events.filter(De=>d.has(De.kind))}:S.data,[S.data,d]),xe=b.useMemo(()=>Iht(a,new Date(`${w.from}T00:00:00Z`),new Date(`${w.to}T00:00:00Z`)),[a,w]),me=b.useCallback(()=>{u(De=>hG(a,De,-1))},[a]),U=b.useCallback(()=>{u(De=>hG(a,De,1))},[a]),ae=b.useCallback(()=>{u(wa(new Date))},[]),Ce=b.useCallback(De=>{h(Pe=>{const ct=new Set(Pe);return ct.has(De)?ct.delete(De):ct.add(De),ct})},[]),je=b.useCallback((De,Pe,ct,Tn=!1)=>{var ln;if(De.kind==="lesson"&&De.lesson){const Bn=/^lesson:([^:]+):/.exec(De.id),Sn=Bn==null?void 0:Bn[1];if(!Sn)return;const zr=Pe.slice(0,10),or=Pe.slice(11,16);j.mutate({enrollmentId:Sn,week:De.lesson.week,day:De.lesson.day,lesson:De.lesson.lesson,targetDate:zr,targetTime:or,force:Tn},{onSuccess:()=>Vt.success("Lesson rescheduled"),onError:ge=>{const Me=fft(ge);Me.length>0&&!Tn?P({event:De,targetStartUtc:Pe,targetEndUtc:ct,conflicts:Me}):Vt.error(ge.message??"Reschedule failed")}});return}const Nn=((ln=De.customEvent)==null?void 0:ln.eventId)??De.id.split("@")[0];A.mutate({id:Nn,data:{targetStartUtc:Pe,targetEndUtc:ct,scope:"instance",force:Tn}},{onSuccess:Bn=>{Bn.conflicts.length>0&&!Tn?P({event:De,targetStartUtc:Pe,targetEndUtc:ct,conflicts:Bn.conflicts}):Vt.success("Event moved")},onError:Bn=>Vt.error(Bn.message??"Move failed")})},[A,j]),ve=uft({onCommit:(De,Pe,ct)=>je(De,Pe,ct,!1)}),Te=b.useCallback(()=>{O&&(je(O.event,O.targetStartUtc,O.targetEndUtc,!0),P(null))},[je,O]),Se=b.useCallback(()=>P(null),[]),He=b.useCallback(De=>{z(De)},[]),tt=b.useCallback((De,Pe)=>{$({open:!0,defaults:{date:De.toISOString().slice(0,10),time:`${String(Pe).padStart(2,"0")}:00`}})},[]),we=b.useCallback(De=>{k.mutate(De,{onSuccess:()=>{$({open:!1}),Vt.success("Event created")},onError:Pe=>Vt.error(Pe.message??"Create failed")})},[k]),Oe=b.useCallback(De=>{_.mutate(De,{onSuccess:()=>{z(null),Vt.success("Event updated")},onError:Pe=>
1689Vt.error(Pe.message??"Update failed")})},[_]),Je=b.useCallback(({id:De,scope:Pe})=>{E.mutate({id:De,scope:Pe},{onSuccess:()=>{z(null),Vt.success("Event deleted")},onError:ct=>Vt.error(ct.message??"Delete failed")})},[E]),It=b.useCallback(De=>{De.lesson&&e(`/me/courses/${De.lesson.courseId}/learn?w=${De.lesson.week}&d=${De.lesson.day}&l=${De.lesson.lesson}`)},[e]),mt=b.useCallback(()=>{q(!0)},[]);return l.jsxs("div",{className:"cal-page",children:[t.show&&l.jsx(l_,{variant:"banner",scope:"general",onStart:()=>e(ee.ME_LEARNING_PROFILE),onDismiss:t.dismiss}),!i&&l.jsx("div",{className:"cal-teams-callout","data-testid":"cal-teams-callout",children:l.jsx(lo,{variant:"info",title:n("teamsCallout.title"),message:n("teamsCallout.message"),dismissible:!0,onDismiss:()=>s(!0)})}),l.jsx(Hht,{view:a,rangeLabel:xe,onViewChange:o,onPrev:me,onNext:U,onToday:ae,onCreateEvent:()=>$({open:!0})}),l.jsx("div",{className:"cal-course-filter-bar",children:l.jsx(Mht,{value:p,onChange:x})}),l.jsxs("div",{className:"cal-body",children:[l.jsx(Uht,{selectedDate:c,grid:R,examTarget:C.data,filters:d,onSelectDate:De=>{u(wa(De)),a==="month"&&o("day")},onToggleFilter:Ce,onSetExamTarget:mt}),R?v?l.jsx(nft,{data:R,selectedDate:c,examTarget:C.data??void 0,onSelectDate:De=>u(wa(De)),onEventClick:He}):a==="day"?l.jsx(Jht,{data:R,date:c,onEventClick:He,onEventPointerDown:ve.onEventPointerDown,onResizePointerDown:ve.onResizePointerDown,onSlotClick:tt}):a==="month"?l.jsx(ift,{data:R,referenceDate:c,onEventClick:He,onDayClick:De=>{u(wa(De)),o("day")}}):l.jsx(ede,{data:R,dayCount:a==="workWeek"?5:7,onEventClick:He,onEventPointerDown:ve.onEventPointerDown,onResizePointerDown:ve.onResizePointerDown,onSlotClick:tt}):S.isError?l.jsxs("div",{className:"cal-error",role:"alert",children:[l.jsx(lo,{variant:"error",title:n("errors.gridTitle",{defaultValue:"We couldn't load your calendar"}),message:n("errors.gridBody",{defaultValue:"Your schedule is still here â we just could not fetch it. Check your connection and try again."})}),l.jsx("button",{type:"button",className:"cal-retry",onClick:()=>void S.refetch(),disabled:S.isFetching,children:S.isFetching?n("errors.retrying",{defaultValue:"Retryingâ¦"}):n("errors.retry",{defaultValue:"Try again"})})]}):l.jsx("div",{className:"cal-loading",role:"status","aria-live":"polite",children:n("loading",{defaultValue:"Loadingâ¦"})})]}),l.jsx(cft,{open:M.open,defaults:M.defaults,isSubmitting:k.isPending,onCancel:()=>$({open:!1}),onSubmit:we}),l.jsx(tft,{open:B!==null,event:B,isSavingUpdate:_.isPending,isDeletingEvent:E.isPending,onClose:()=>z(null),onUpdate:Oe,onDelete:Je,onOpenLesson:It}),l.jsx(qht,{open:O!==null,conflicts:(O==null?void 0:O.conflicts)??[],onConfirm:Te,onCancel:Se}),l.jsx(Xce,{open:I,current:C.data??null,isSubmitting:D.isPending,isClearing:D.isPending,onCancel:()=>q(!1),onSubmit:De=>D.mutate(De,{onSuccess:()=>{q(!1),Vt.success("Target exam updated")},onError:Pe=>Vt.error(Pe.message??"Could not save")}),onClear:()=>D.mutate({targetExamDate:null,targetExamLabel:null},{onSuccess:()=>{q(!1),Vt.success("Target exam cleared")}})})]})}function fft(e){var n,r;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)??e;return t&&Array.isArray(t.conflicts)?t.conflicts:[]}const tde="practice.lcpPromptShown";function mft(){if(typeof window>"u")return!0;try{return window.sessionStorage.getItem(tde)==="true"}catch{return!1}}function pft(){if(!(typeof window>"u"))try{window.sessionStorage.setItem(tde,"true")}catch{}}function gft({shouldPrompt:e,onStartLcp:t}){const{t:n}=J("practice"),[r,i]=b.useState(!1);return b.useEffect(()=>{e&&(mft()||(i(!0),pft()))},[e]),l.jsx(Px,{open:r,onOpenChange:i,children:l.jsxs(Ix,{children:[l.jsx(Fx,{className:"fixed inset-0 z-50 bg-black/40"}),l.jsxs(Bx,{className:"fixed left-1/2 top-1/2 z-50 max-h-[90vh] w-[90vw] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-auto rounded-2xl border border-border bg-card p-6 shadow-2xl",children:[l.jsx(qu,{asChild:!0,children:l.jsx("button",{type:"button","aria-label":n("lcpPrompt.close"),className:"ds-touch-target absolute right-3 top-3 inline-flex items-center justify-center rounded-full p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":"true"})})}),l.jsxs("header",{className:"mb-3 flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary",children:l.jsx(Fi,{className:"h-6 w-6 text-primary-foreground","aria-hidden":"true"})}),l.jsx(zx,{className:"text-xl font-bold text-foreground",children:n("lcpPrompt.title")})]}),l.jsx(Qk,{className:"text-sm text-muted-foreground",children:n("lcpPrompt.description")}),l.jsxs("div",{className:"mt-4 space-y-3",children:[l.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-primary/20 bg-primary/10 p-3",children:[l.jsx("span",{className:"mt-0.5 flex h-7 w-7 items-center justify-center rounded-md bg-primary",children:l.jsx(Fi,{className:"h-4 w-4 text-primary-foreground","aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:n("lcpPrompt.assessmentTitle")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:n("lcpPrompt.assessmentBody")})]})]}),l.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-primary/20 bg-primary/10 p-3",children:[l.jsx("span",{className:"mt-0.5 flex h-7 w-7 items-center justify-center rounded-md bg-primary",children:l.jsx(Rn,{className:"h-4 w-4 text-primary-foreground","aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:n("lcpPrompt.careerTitle")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:n("lcpPrompt.careerBody")})]})]})]}),l.jsxs("footer",{className:"mt-6 flex flex-wrap justify-end gap-2",children:[l.jsx(ce,{type:"button",variant:"outline",onClick:()=>i(!1),children:n("lcpPrompt.maybeLater")}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>{i(!1),t()},children:n("lcpPrompt.startLcp")})]})]})]})})}function xft({onExploreCourses:e}){const{t}=J("practice");return l.jsxs("section",{role:"region","aria-label":t("noEnrollmentHero.ariaLabel"),className:"overflow-hidden rounded-2xl border border-edition-soft bg-edition-pale p-8 text-center",children:[l.jsx("span",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-2xl border border-edition-soft bg-card",children:l.jsx(Rn,{className:"h-7 w-7 text-primary",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("h2",{className:"mb-2 text-2xl font-light text-strong",children:t("noEnrollmentHero.title")}),l.jsx("p",{className:"mx-auto mb-6 max-w-md text-sm leading-relaxed text-body-ink",children:t("noEnrollmentHero.body")}),l.jsx(ce,{type:"button",variant:"primary",size:"lg",onClick:e,className:"rounded-full px-8",children:t("noEnrollmentHero.cta")})]})}function yft({isLocked:e,onStart:t,etaMinutes:n=5,firstLessonLocked:r=!1,onStartFirstLesson:i}){const{t:s}=J("practice");return r?l.jsxs("article",{className:"flex h-full flex-col justify-between gap-6 rounded-2xl border border-edition-soft bg-edition-pale p-7",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-primary",children:[l.jsx(U0,{className:"h-3.5 w-3.5",
1689strokeWidth:1.75,"aria-hidden":"true"}),s("recommended.firstLessonEyebrow")]}),l.jsx("h2",{className:"text-2xl font-light tracking-tight text-strong sm:text-[28px]",children:s("recommended.title")}),l.jsx("p",{className:"mt-2 max-w-xl text-sm leading-relaxed text-body-ink",children:s("recommended.firstLessonBody")})]}),l.jsx("div",{className:"flex flex-wrap items-center gap-4",children:i?l.jsx(ce,{type:"button",size:"lg",variant:"primary",onClick:i,rightIcon:l.jsx(ns,{className:"h-5 w-5",strokeWidth:1.75}),className:"rounded-full px-7",children:s("recommended.firstLessonCta")}):l.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium text-muted-ink",children:[l.jsx(Di,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),s("recommended.firstLessonLocked")]})})]}):l.jsxs("article",{className:"flex h-full flex-col justify-between gap-6 rounded-2xl border border-edition-soft bg-edition-pale p-7",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-primary",children:[l.jsx(U0,{className:"h-3.5 w-3.5",strokeWidth:1.75,"aria-hidden":"true"}),s("recommended.eyebrow")]}),l.jsx("h2",{className:"text-2xl font-light tracking-tight text-strong sm:text-[28px]",children:s("recommended.title")}),l.jsx("p",{className:"mt-2 max-w-xl text-sm leading-relaxed text-body-ink",children:s("recommended.body")})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[l.jsx(ce,{type:"button",size:"lg",variant:"primary",onClick:t,disabled:e,leftIcon:e?l.jsx(Di,{className:"h-4 w-4",strokeWidth:1.75}):l.jsx(U0,{className:"h-4 w-4",strokeWidth:1.75}),rightIcon:e?void 0:l.jsx(ns,{className:"h-5 w-5",strokeWidth:1.75}),className:"rounded-full px-7",children:s(e?"recommended.locked":"recommended.start")}),l.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-ink",children:[l.jsx(od,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"}),s("recommended.eta",{count:n})]})]})]})}function bft({sessionsThisWeek:e,goalSessions:t}){const{t:n}=J("practice"),r=Math.max(1,t),i=Math.min(100,Math.round(e/r*100));return l.jsxs("article",{className:"flex h-full flex-col rounded-2xl border border-border bg-card p-6",children:[l.jsxs("header",{className:"mb-4 flex items-center gap-2",children:[l.jsx(ki,{className:"h-5 w-5 text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h2",{className:"text-base font-semibold text-strong",children:n("weeklyGoal.title")})]}),l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 py-2",children:[l.jsx(ste,{value:i,size:128,strokeWidth:8,label:`${i}`,sublabel:"%",ariaLabel:n("weeklyGoal.ariaLabel",{percent:i}),color:"hsl(var(--primary))"}),l.jsx("p",{className:"text-sm text-muted-ink",children:n("weeklyGoal.caption",{current:e,target:t})})]})]})}function vft({title:e,description:t,icon:n,color:r,isLocked:i,onClick:s,delayMs:a=0}){return l.jsx("button",{type:"button",onClick:s,disabled:i,style:{animationDelay:`${a}ms`},className:"group relative w-full overflow-hidden rounded-2xl border border-border bg-card text-left transition-[transform,border-color] duration-200 hover:-translate-y-0.5 hover:border-edition-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:border-border motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1",children:l.jsxs("div",{className:"relative flex items-start justify-between gap-4 p-[18px]",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("span",{className:"flex h-[38px] w-[38px] flex-shrink-0 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(n,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-base font-semibold text-strong",children:e}),l.jsx("p",{className:"mt-1 text-sm leading-snug text-muted-ink",children:t})]})]}),i?l.jsx(Di,{className:"h-5 w-5 flex-shrink-0 text-muted-foreground",strokeWidth:1.75,"aria-hidden":"true"}):l.jsx(ns,{className:"h-5 w-5 flex-shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5",strokeWidth:1.75,"aria-hidden":"true"})]})})}const wft=[{mode:"daily",color:"blue",icon:h4,titleKey:"modes.daily.title",descKey:"modes.daily.desc"},{mode:"spaced",color:"purple",icon:Fi,titleKey:"modes.spaced.title",descKey:"modes.spaced.desc"},{mode:"quiz",color:"green",icon:ki,titleKey:"modes.quiz.title",descKey:"modes.quiz.desc"},{mode:"speed",color:"orange",icon:U0,titleKey:"modes.speed.title",descKey:"modes.speed.desc"}];function Sft({isLocked:e,onSelect:t}){const{t:n}=J("practice");return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:wft.map((r,i)=>l.jsx(vft,{title:n(r.titleKey),description:n(r.descKey),icon:r.icon,
1689color:r.color,isLocked:e,onClick:()=>t(r.mode),delayMs:i*60},r.mode))})}const Cft=7*24*60*60*1e3,kft=5;function _ft(){var w,S,C,k;const{t:e}=J("practice"),t=St(),n=Ps(),r=bf(),i=FD({limit:20}),s=gs(),[a,o]=b.useState(!1),c=((w=n.data)==null?void 0:w.completedFirstLCP)??!1,u=!!((S=r.data)!=null&&S.profile&&r.data.completedAt),d=(((C=s.data)==null?void 0:C.length)??0)>0,h=b.useMemo(()=>(s.data??[]).reduce((_,E)=>_+(E.progress.completedLessons??0),0),[s.data]),f=at.key==="ciai"&&d&&!s.isLoading&&h===0,m=((k=s.data)==null?void 0:k[0])??null,p=()=>{if(!m){t(ee.ME_COURSES);return}t(ts(m.courseId,Math.max(1,m.progress.currentWeek),Math.max(1,m.progress.currentDay),Math.max(1,m.progress.currentLesson)))},x=f,v=b.useMemo(()=>{var A;const _=((A=i.data)==null?void 0:A.pages.flatMap(j=>j.data))??[],E=Date.now()-Cft;return _.filter(j=>{if(j.status!=="COMPLETED")return!1;const D=new Date(j.startedAt).getTime();return Number.isFinite(D)&&D>=E}).length},[i.data]),g=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light",children:l.jsx("span",{className:"font-medium text-primary",children:e("hub.title")})}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("hub.subtitle")})]}),[e]);On({left:g});const y=_=>{x||t(X7(_))};return l.jsxs("div",{className:"space-y-6",children:[l.jsx(gft,{shouldPrompt:!c&&!n.isLoading,onStartLcp:()=>t(ee.ME_LEARNING_PROFILE)}),!a&&l.jsx(Cue,{completedLcp:c,completedInterview:u,onStartLcp:()=>t(ee.ME_LEARNING_PROFILE),onStartInterview:()=>t(ee.ME_INTERVIEW),onDismiss:()=>o(!0)}),!d&&l.jsx(xft,{onExploreCourses:()=>t(ee.ME_MARKETPLACE)}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"button",variant:"outline",size:"sm",onClick:()=>t(ee.ME_PRACTICE_HISTORY),leftIcon:l.jsx(Hv,{className:"h-4 w-4",strokeWidth:1.75}),children:e("hub.history")})}),l.jsxs("section",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsx(yft,{isLocked:!1,onStart:()=>t(X7("daily")),firstLessonLocked:f,onStartFirstLesson:p})}),l.jsx("div",{className:"lg:col-span-1",children:l.jsx(bft,{sessionsThisWeek:v,goalSessions:kft})})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-base font-semibold text-strong",children:e("hub.modesTitle")}),l.jsx(Sft,{isLocked:x,onSelect:y})]})]})}const Tft=["A","B","C","D","E","F","G","H"];function Eft({question:e,onAnswer:t,disabled:n}){const{t:r}=J("practice"),[i,s]=b.useState(""),[a,o]=b.useState([]),[c,u]=b.useState(null),d=h=>{if(h.preventDefault(),!n){if(e.type==="short_answer"){if(!i.trim())return;t(i.trim());return}if(e.type==="multi_select"){if(a.length===0)return;t(a);return}}};if(e.type==="mcq"||e.type==="true_false"){const h=e.type==="true_false"?["true","false"]:e.options??[];return l.jsx("div",{className:"space-y-2",role:"radiogroup","aria-label":r("runner.optionsAriaLabel"),children:h.map((f,m)=>l.jsx(Fk,{optionLabel:Tft[m]??String(m+1),state:c===f?"selected":"idle",disabled:n,onClick:()=>{u(f),t(f)},children:f},f))})}return e.type==="multi_select"?l.jsxs("form",{onSubmit:d,className:"space-y-3",children:[l.jsx("div",{className:"space-y-2",children:(e.options??[]).map(h=>{const f=a.includes(h);return l.jsx("div",{className:"flex items-start rounded-xl border-2 border-border bg-card p-3 transition-colors hover:border-primary/40 hover:bg-accent/50",children:l.jsx(xJ,{checked:f,disabled:n,onCheckedChange:m=>o(p=>m===!0?[...p,h]:p.filter(x=>x!==h)),label:h})},h)})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"submit",variant:"primary",size:"sm",disabled:n||a.length===0,leftIcon:l.jsx(Pg,{className:"h-4 w-4"}),children:r("runner.submit")})})]}):l.jsxs("form",{onSubmit:d,className:"flex flex-col gap-2 sm:flex-row",children:[l.jsx(fn,{type:"text",disabled:n,value:i,onChange:h=>s(h.target.value),placeholder:r("runner.shortAnswerPlaceholder"),className:"flex-1","aria-label":r("runner.shortAnswerPlaceholder")}),l.jsx(ce,{type:"submit",variant:"primary",disabled:n||!i.trim(),leftIcon:l.jsx(Pg,{className:"h-4 w-4"}),children:r("runner.submit")})]})}function h_({sessionId:e,questions:t,perQuestionSeconds:n,onSubmitted:r}){const{t:i}=J("practice"),s=Ket(),[a,o]=b.useState(0),[c,u]=b.useState({}),[d]=b.useState(()=>Date.now()),[h,f]=b.useState(n??null);lL(!0);const m=t.length,p=t[a]??null,x=a===m-1,v=b.useMemo(()=>async()=>{const S={sessionId:e,durationMs:Date.now()-d,answers:Object.entries(c).map(([k,_])=>({questionId:k,answer:_}))},C=await s.mutateAsync(S);r(C)},[e,c,d,s,r]),g=b.useRef(()=>{});g.current=()=>{p&&u(S=>({...S,[p.id]:""})),a<m-1?o(S=>S+1):v()},b.useEffect(()=>{if(n==null)return;f(n);const S=window.setInterval(()=>{f(C=>C==null?null:C>1?C-1:(window.clearInterval(S),g.current(),0))},1e3);return()=>window.clearInterval(S)},[a,n]);const y=S=>{if(!p)return;const C={...c,[p.id]:S};u(C),x?v():o(k=>k+1)};if(!p)return l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:i("runner.empty")});const w=Math.round((a+1)/m*100);return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("header",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[l.jsx("span",{className:"font-semibold",children:i("runner.progress",{current:a+1,total:m})}),h!=null&&l.jsxs(Oi,{variant:h<=5?"error":h<=10?"warning":"info",size:"sm",children:[l.jsx(_6,{className:"mr-1 h-3 w-3","aria-hidden":"true"}),i("runner.timeLeft",{seconds:h})]})]}),l.jsx(Cx,{value:w,color:"bg-ple-primary",size:"sm","aria-label":i("runner.progressAriaLabel",{current:a+1,total:m,percent:w})})]}),l.jsxs(bm,{className:"p-5",children:[p.skill&&l.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wide text-ple-primary",children:[p.skill,p.difficulty?` · ${p.difficulty}`:""]}),l.jsx("h2",{className:"mt-1 text-lg font-semibold text-foreground",children:p.question}),l.jsx("div",{className:"mt-4",children:l.jsx(Eft,{question:p,onAnswer:y,disabled:s.isPending})})]}),s.isPending&&l.jsx("p",{className:"text-center text-xs text-muted-foreground",children:i("runner.submitting")})]})}function Ow({caption:e}){return l.jsxs("div",{className:"space-y-4","aria-busy":"true","aria-live":"polite",children:[e?l.jsx("p",{className:"text-center text-sm text-muted-foreground",children:e}
1689):null,l.jsx(ei,{className:"h-2 w-full rounded-full"}),l.jsxs("div",{className:"space-y-4 rounded-xl border border-border bg-card p-5",children:[l.jsx(ei,{className:"h-3 w-24"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{className:"h-5 w-3/4"}),l.jsx(ei,{className:"h-5 w-1/2"})]}),l.jsx("div",{className:"space-y-3 pt-2",children:[0,1,2,3].map(t=>l.jsx(ei,{className:"h-12 w-full rounded-lg"},t))})]})]})}function f_({result:e,onRetry:t,onClose:n}){const{t:r}=J("practice"),i=Math.max(e.totalQuestions-e.correctCount,0),s=e.totalQuestions>0?Math.round(e.correctCount/e.totalQuestions*100):0,a=e.totalQuestions>0?100-s:0;return l.jsxs("div",{className:"mx-auto flex w-full max-w-[680px] flex-col gap-5",children:[l.jsxs("section",{className:"relative overflow-hidden rounded-2xl border border-border bg-card px-8 pb-8 pt-10 text-center",children:[l.jsx("div",{className:"absolute inset-x-0 top-0 h-[130px] bg-brand-gradient","aria-hidden":"true"}),l.jsx("div",{className:"relative mx-auto mb-5 flex h-[84px] w-[84px] items-center justify-center rounded-full border border-border bg-card",children:l.jsx("span",{className:"flex h-[60px] w-[60px] items-center justify-center rounded-full bg-edition-pale text-primary",children:l.jsx(Kn,{className:"h-8 w-8",strokeWidth:2.25,"aria-hidden":"true"})})}),l.jsx("h2",{className:"text-2xl font-light text-strong",children:r("results.title")}),l.jsxs("p",{className:"mt-3 text-5xl font-bold leading-none text-strong",children:[e.scorePct,l.jsx("span",{className:"text-2xl font-normal text-muted-ink",children:"%"})]}),l.jsx("p",{className:"mt-2 text-sm text-muted-ink",children:r("results.summary",{correct:e.correctCount,total:e.totalQuestions})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3.5 sm:grid-cols-4",children:[l.jsx(ES,{icon:l.jsx(jl,{className:"h-[18px] w-[18px]",strokeWidth:1.75}),value:`${e.correctCount}`,unit:`/${e.totalQuestions}`,label:r("results.correct")}),l.jsx(ES,{icon:l.jsx(Rn,{className:"h-[18px] w-[18px]",strokeWidth:1.75}),value:`+${e.pointsEarned}`,label:r("results.points")}),l.jsx(ES,{icon:l.jsx(V1,{className:"h-[18px] w-[18px]",strokeWidth:1.75}),value:`${e.newStreak}`,label:r("results.streak")}),l.jsx(ES,{icon:l.jsx(ki,{className:"h-[18px] w-[18px]",strokeWidth:1.75}),value:`${e.masteredAdded.length}`,label:r("results.mastered")})]}),l.jsxs("section",{className:"flex flex-wrap items-stretch gap-5",children:[l.jsxs("div",{className:"min-w-0 flex-1 basis-[300px] rounded-2xl border border-border bg-card p-6",children:[l.jsx("h3",{className:"mb-4 text-sm font-semibold text-strong",children:r("results.breakdown")}),l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsx(bG,{label:r("results.correct"),tone:"sage",count:e.correctCount,pct:s}),l.jsx(bG,{label:r("results.incorrect"),tone:"clay",count:i,pct:a})]})]}),l.jsxs("div",{className:"min-w-0 flex-1 basis-[300px] rounded-2xl border border-border bg-card p-6",children:[l.jsxs("h3",{className:"mb-1 flex items-center gap-2 text-sm font-semibold text-strong",children:[l.jsx(V1,{className:"h-[17px] w-[17px] text-sage",strokeWidth:1.75,"aria-hidden":"true"}),r("results.mastered")]}),e.masteredAdded.length>0?l.jsx("ul",{className:"mt-2",children:e.masteredAdded.map((o,c)=>l.jsxs("li",{className:`flex items-center gap-3 py-3 ${c<e.masteredAdded.length-1?"border-b border-border":""}`,children:[l.jsx("span",{className:"flex h-[30px] w-[30px] flex-shrink-0 items-center justify-center rounded-lg bg-sage/[0.12] text-sage",children:l.jsx(V1,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium text-strong",children:o})]},o))}):l.jsx("p",{className:"mt-2 py-3 text-[13px] leading-relaxed text-muted-ink",children:r("results.masteredNone")})]})]}),e.breakdown.length>0&&l.jsx("section",{className:"rounded-2xl border border-border bg-card p-6",children:l.jsx("ul",{className:"flex flex-col gap-2",children:e.breakdown.map((o,c)=>l.jsxs("li",{className:`rounded-xl border p-3.5 text-sm ${o.correct?"border-sage/30 bg-sage/[0.05]":"border-clay/30 bg-clay/[0.05]"}`,children:[l.jsxs("div",{className:"flex items-center gap-2",children:[o.correct?l.jsx(jl,{className:"h-4 w-4 text-sage",strokeWidth:1.75,"aria-hidden":"true"}):l.jsx(PM,{className:"h-4 w-4 text-clay",strokeWidth:1.75,"aria-hidden":"true"}),l.jsxs("p",{className:"font-semibold text-strong",children:[r("results.questionNumber",{number:c+1})," ",l.jsx("span",{className:o.correct?"text-sage":"text-clay",children:o.correct?r("results.correct"):r("results.incorrect")})]})]}),o.explanation&&l.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-ink",children:o.explanation})]},o.questionId))})}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[t&&l.jsx(ce,{type:"button",variant:"outline",onClick:t,leftIcon:l.jsx(Tx,{className:"h-4 w-4",strokeWidth:1.75}),className:"rounded-full px-6",children:r("results.retry")}),n&&l.jsx(ce,{type:"button",variant:"primary",onClick:n,rightIcon:l.jsx(gn,{className:"h-4 w-4",strokeWidth:1.75}),className:"rounded-full px-6",children:r("results.done")})]})]})}function ES({icon:e,value:t,unit:n,label:r}){return l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-[18px] text-center",children:[l.jsx("span",{className:"mb-2.5 inline-flex h-[34px] w-[34px] items-center justify-center rounded-[10px] bg-edition-pale text-primary",children:e}),l.jsxs("div",{className:"text-2xl font-bold leading-none text-strong",children:[t,n&&l.jsx("span",{className:"text-[13px] font-normal text-muted-ink",children:n})]}),l.jsx("div",{className:"mt-1.5 text-[11.5px] text-muted-ink",children:r})]})}function bG({label:e,tone:t,count:n,pct:r}){const i=t==="sage"?"text-sage":"text-clay",s=t==="sage"?"bg-sage":"bg-clay";return l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:`w-16 flex-shrink-0 text-[12.5px] font-semibold ${i}`,children:e}),l.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-edition-pale",children:l.jsx("div",{className:`h-full rounded-full ${s}`,style:{width:`${r}%`}})}),l.jsx("span",{className:"w-6 flex-shrink-0 text-right text-[12.5px] font-semibold text-body-ink",children:n})]})}const jft=10;function Nft(){const{t:e}=J("practice"),t=St(),n=Vet(),[r,i]=b.useState(null),[s,a]=b.useState([]),[o,c]=b.useState(null),[u,d]=b.useState(null),h=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("modes.daily.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("modes.daily.runnerSubtitle")})]}),[e]),f=b.useMemo(()=>l.jsx($i,{label:e("errors.backToHub"),onClick:()=>t(ee.ME_PRACTICE)}),[e,t]);On({left:h,actions:f});function m(){d(null),i(null),a([]),c(null),n.mutate({count:jft},{onSuccess:p=>{i(p.sessionId),a(p.questions)},onError:p=>
1689d(ox(p))})}return b.useEffect(()=>{m()},[]),u?l.jsxs("div",{className:"rounded-xl border border-destructive/30 bg-destructive/5 p-6",children:[l.jsx("p",{className:"text-base font-semibold text-destructive",children:e("errors.title")}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:u}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:m,children:e("errors.retry")})]}):r?o?l.jsx(f_,{result:o,onClose:()=>t(ee.ME_PRACTICE),onRetry:m}):l.jsx(h_,{sessionId:r,questions:s,onSubmitted:c}):l.jsx(Ow,{caption:e("runner.preparing")})}const Aft=[{value:1,labelKey:"spaced.choice.again.label",hintKey:"spaced.choice.again.hint",tone:"clay",icon:l.jsx(Tx,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})},{value:3,labelKey:"spaced.choice.hard.label",hintKey:"spaced.choice.hard.hint",tone:"slate",icon:l.jsx(Jxe,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})},{value:4,labelKey:"spaced.choice.good.label",hintKey:"spaced.choice.good.hint",tone:"periwinkle",icon:l.jsx(Kn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})},{value:5,labelKey:"spaced.choice.easy.label",hintKey:"spaced.choice.easy.hint",tone:"sage",icon:l.jsx(Rn,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":"true"})}],Mft={clay:"border-clay/40 bg-clay/[0.08] text-clay hover:bg-clay/[0.14] focus-visible:ring-clay",slate:"border-slate-info/40 bg-slate-info/[0.08] text-slate-info hover:bg-slate-info/[0.14] focus-visible:ring-slate-info",periwinkle:"border-edition-primary/50 bg-edition-pale text-primary hover:bg-edition-soft/40 focus-visible:ring-primary",sage:"border-sage/40 bg-sage/[0.08] text-sage hover:bg-sage/[0.14] focus-visible:ring-sage"};function Rft(e){const{t}=J("practice"),{item:n,onRate:r,isSubmitting:i,current:s,total:a}=e,[o,c]=b.useState(!1),u=n.question.correctAnswer,d=typeof u=="string"?u:Array.isArray(u)?u.join(", "):String(u??""),h=typeof s=="number"&&typeof a=="number"&&a>0;return l.jsxs("div",{className:"mx-auto flex w-full max-w-[660px] flex-col gap-5",children:[h&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex items-center justify-between gap-4",children:l.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-ink",children:[l.jsx(Ob,{className:"h-4 w-4 text-primary",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{className:"font-semibold text-body-ink",children:t("spaced.progress",{current:s,total:a})})]})}),l.jsx("div",{className:"flex gap-1.5","aria-hidden":"true",children:Array.from({length:a}).map((f,m)=>{const p=m<s-1?"bg-sage":m===s-1?"bg-primary":"bg-edition-pale";return l.jsx("span",{className:`h-[5px] flex-1 rounded-full ${p}`},m)})})]}),l.jsxs("article",{className:"flex min-h-[340px] flex-col rounded-2xl border border-border bg-card p-9 sm:p-10",children:[l.jsxs("div",{className:"mb-6 flex items-center justify-between gap-3",children:[l.jsx("span",{className:"rounded-md bg-edition-pale px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-primary",children:n.conceptKey}),l.jsx("span",{className:"text-xs text-muted-ink",children:t("modes.spaced.title")})]}),l.jsxs("div",{className:"flex flex-1 flex-col justify-center gap-6",children:[l.jsx("h2",{className:"text-xl font-normal leading-relaxed text-strong sm:text-[21px]",children:n.question.question}),o?l.jsxs("div",{className:"border-t border-border pt-6",children:[l.jsxs("p",{className:"mb-2.5 flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.1em] text-sage",children:[l.jsx(Kn,{className:"h-3.5 w-3.5",strokeWidth:2.5,"aria-hidden":"true"}),t("spaced.answer")]}),l.jsx("p",{className:"text-[15px] leading-relaxed text-body-ink",children:d}),n.question.explanation&&l.jsx("p",{className:"mt-3 text-[13px] leading-relaxed text-muted-ink",children:n.question.explanation})]}):l.jsxs("div",{className:"space-y-4 border-t border-border pt-6",children:[l.jsx("p",{className:"text-sm leading-relaxed text-muted-ink",children:t("spaced.thinkPrompt")}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>c(!0),leftIcon:l.jsx(_x,{className:"h-4 w-4",strokeWidth:1.75}),className:"rounded-full px-6",children:t("spaced.reveal")})]})]})]}),o&&l.jsxs("div",{children:[l.jsx("p",{className:"mb-3 text-center text-xs text-muted-ink",children:t("spaced.ratePrompt")}),l.jsx("div",{className:"grid grid-cols-2 gap-2.5 sm:grid-cols-4",role:"group","aria-label":t("spaced.ratePrompt"),children:Aft.map(f=>l.jsxs("button",{type:"button",onClick:()=>r(f.value),disabled:i,className:`flex flex-col items-center gap-1 rounded-xl border px-2 py-3.5 text-center transition-[transform,background-color,border-color] duration-200 hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0 ${Mft[f.tone]}`,children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-semibold",children:[f.icon,t(f.labelKey)]}),l.jsx("span",{className:"text-[11px] text-muted-ink",children:t(f.hintKey)})]},f.value))})]})]})}function Oft(){var v;const{t:e}=J("practice"),t=St(),[n]=ps(),r=n.get("skill")??void 0,i=n.get("courseId")??void 0,s=Wet({skill:r,courseId:i}),a=Yet(),[o,c]=b.useState(0),u=((v=s.data)==null?void 0:v.items)??[],d=u.length,h=d?e("spaced.progress",{current:Math.min(o+1,d),total:d}):e("modes.spaced.runnerSubtitle"),f=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("modes.spaced.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:h})]}),[e,h]),m=b.useMemo(()=>l.jsx($i,{label:e("errors.backToHub"),onClick:()=>t(ee.ME_PRACTICE)}),[e,t]);if(On({left:f,actions:m}),s.isLoading)return l.jsx(Ow,{caption:e("runner.preparing")});if(s.isError)return l.jsx("div",{role:"alert",className:"mx-auto max-w-[660px] rounded-2xl border border-clay/40 bg-clay/[0.06] p-8 text-center",children:l.jsx("p",{className:"text-sm leading-relaxed text-clay",children:e("errors.spacedQueueBody")})});if(u.length===0)return l.jsxs("div",{className:"mx-auto max-w-[660px] rounded-2xl border border-border bg-card p-10 text-center",children:[l.jsx("span",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-edition-pale text-primary",children:l.jsx(Ob,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"})}),l.jsx("p",{className:"text-base font-semibold text-strong",children:e("spaced.emptyTitle")}),l.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-ink",children:e("spaced.emptyBody")}),l.jsx(ce,{type:"button",variant:"primary",className:"mt-5 rounded-full px-6",onClick:()=>t(ee.ME_PRACTICE),children:e("spaced.backToHub")})]});if(o>=u.length)return l.jsxs("div",{className:"mx-auto max-w-[660px] rounded-2xl border border-edition-soft bg-edition-pale p-10 text-center",children:[l.jsx("span",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-card text-sage",children:l.jsx(Kn,{className:"h-7 w-7",strokeWidth:2.25,"aria-hidden":"true"})}),l.jsx("p",{className:"text-lg font-light text-strong",children:e("spaced.allCaughtUp")}),l.jsx(ce,{type:"button",variant:"primary",className:"mt-5 rounded-full px-6",onClick:()=>t(ee.ME_PRACTICE),children:e("spaced.backToHub")})]});const p=u[o];function x(g){a.mutate({itemId:p.id,quality:g},{onSuccess:()=>c(y=>y+1)})}return l.jsx(Rft,{item:p,current:Math.min(o+1,d),total:d,isSubmitting:a.isPending,onRate:x},p.id)}const Dft=10,vG=3,wG=30,Pj="__all__";function Lft(){const{t:e}=J("practice"),t=St(),n=gs(),r=Het(),[i,s]=b.useState(Pj),[a,o]=b.useState("mixed"),[c,u]=b.useState(Dft),[d,h]=b.useState(null),[f,m]=b.useState([]),[p,x]=b.useState(null),[v,g]=b.useState(null),y=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("modes.quiz.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("modes.quiz.runnerSubtitle")})]}),[e]),w=b.useMemo(()=>l.jsx($i,{label:e("errors.backToHub"),onClick:()=>t(ee.ME_PRACTICE)}),[e,t]);On({left:y,actions:w});const S=b.useMemo(()=>[{value:Pj,label:e("quiz.allCourses")},...(n.data??[]).map(_=>({value:_.courseId,label:_.name}))],[n.data,e]),C=b.useMemo(()=>[{value:"mixed",label:e("quiz.mixed")},{value:"easy",label:e("quiz.easy")},{value:"medium",label:e("quiz.medium")},{value:"hard",label:e("quiz.hard")}],[e]);function k(){g(null),r.mutate({courseId:i===Pj?void 0:i,difficulty:a,count:c},{onSuccess:_=>{h(_.sessionId),m(_.questions)},onError:_=>g(ox(_))})}return d&&!p?l.jsx(h_,{sessionId:d,questions:f,onSubmitted:x}):p?l.jsx(f_,{result:p,onClose:()=>t(ee.ME_PRACTICE),onRetry:()=>{h(null),m([]),x(null),k()}}):r.isPending?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"rounded-xl border border-border bg-card p-8 text-center",children:[l.jsx(Fi,{className:"mx-auto h-10 w-10 animate-pulse text-primary","aria-hidden":"true"}),l.jsx("h2",{className:"mt-3 text-lg font-semibold text-foreground",children:e("quiz.generatingTitle")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("quiz.generatingBody")})]}),l.jsx(Ow,{})]}):l.jsx("div",{className:"space-y-4",children:l.jsxs("section",{className:"rounded-xl border border-border bg-card p-5",children:[l.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[l.jsx(dr,{label:e("quiz.course"),htmlFor:"quiz-course",children:l.jsx(Ho,{value:i,onChange:s,ariaLabel:e("quiz.course"),options:S})}),l.jsx(dr,{label:e("quiz.difficulty"),htmlFor:"quiz-difficulty",children:l.jsx(Ho,{value:a,onChange:_=>o(_),ariaLabel:e("quiz.difficulty"),options:C})}),l.jsx(dr,{label:e("quiz.count"),htmlFor:"quiz-count",children:l.jsx(fn,{id:"quiz-count",type:"number",min:vG,max:wG,value:c,onChange:_=>{const E=Number(_.target.value);Number.isFinite(E)&&u(Math.min(wG,Math.max(vG,E)))}})})]}),l.jsx("div",{className:"mt-4 flex justify-end",children:l.jsx(ce,{type:"button",variant:"primary",onClick:k,isLoading:r.isPending,leftIcon:l.jsx(Fi,{className:"h-4 w-4"}),children:r.isPending?e("quiz.starting"):e("quiz.start")})}),v&&l.jsx("p",{role:"alert",className:"mt-3 rounded-md border border-destructive/30 bg-destructive/5 p-2 text-sm text-destructive",children:v})]})})}const Pft=[{value:"10",labelKey:"speed.option10"},{value:"20",labelKey:"speed.option20"},{value:"30",labelKey:"speed.option30"},{value:"45",labelKey:"speed.option45"},{value:"60",labelKey:"speed.option60"}],Ift=30,Fft=15,SG=5,CG=40;function Bft(){const{t:e}=J("practice"),t=St(),n=qet(),[r,i]=b.useState(Fft),[s,a]=b.useState(Ift),[o,c]=b.useState(null),[u,d]=b.useState([]),[h,f]=b.useState(null),[m,p]=b.useState(null),x=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("modes.speed.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:o?e("modes.speed.runnerSubtitle",{seconds:s}):e("speed.preSubtitle")})]}),[e,o,s]),v=b.useMemo(()=>l.jsx($i,{label:e("errors.backToHub"),onClick:()=>t(ee.ME_PRACTICE)}),[e,t]);On({left:x,actions:v});function g(){p(null),n.mutate({count:r,perQuestionSeconds:s},{onSuccess:y=>{c(y.sessionId),d(y.questions)},onError:y=>p(ox(y))})}return o&&!h?l.jsx(h_,{sessionId:o,questions:u,perQuestionSeconds:s,onSubmitted:f}):h?l.jsx(f_,{result:h,onClose:()=>t(ee.ME_PRACTICE),onRetry:()=>{c(null),d([]),f(null),g()}}):n.isPending?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"rounded-xl border border-border bg-card p-8 text-center",children:[l.jsx(_6,{className:"mx-auto h-10 w-10 animate-pulse text-primary","aria-hidden":"true"}),l.jsx("h2",{className:"mt-3 text-lg font-semibold text-foreground",children:e("speed.generatingTitle")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("speed.generatingBody")})]}),l.jsx(Ow,{})]}):l.jsx("div",{className:"space-y-4",children:l.jsxs("section",{className:"rounded-xl border border-border bg-card p-5",children:[l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsx(dr,{label:e("speed.count"),htmlFor:"speed-count",children:l.jsx(fn,{id:"speed-count",type:"number",min:SG,max:CG,value:r,onChange:y=>{const w=Number(y.target.value);Number.isFinite(w)&&i(Math.min(CG,Math.max(SG,w)))}})}),l.jsx(dr,{label:e("speed.perQuestionSeconds"),htmlFor:"speed-per-question",children:l.jsx(Ho,{value:String(s),onChange:y=>a(Number(y)),ariaLabel:e("speed.perQuestionSeconds"),options:Pft.map(y=>({value:y.value,label:e(y.labelKey)}))})})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:e("speed.preview",{seconds:s,count:r})}),l.jsx("div",{className:"mt-4 flex justify-end",children:l.jsx(ce,{type:"button",variant:"primary",onClick:g,isLoading:n.isPending,leftIcon:l.jsx(_6,{className:"h-4 w-4"}),children:e("speed.start")})}),m&&l.jsx("p",{role:"alert",className:"mt-3 rounded-md border border-destructive/30 bg-destructive/5 p-2 text-sm text-destructive",children:m})]})})}const zft=10;function $ft(){const{t:e}=J("practice"),t=St(),[n]=ps(),r=n.get("skill")??"",i=n.get("courseId")??void 0,s=Get(),[a,o]=b.useState(null),[c,u]=b.useState([]),[d,h]=b.useState(null),[f,m]=b.useState(null),p=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("skill.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:r?e("skill.runnerSubtitle",{skill:r}):e("skill.runnerSubtitleGeneric")})]}),[e,r]),x=b.useMemo(()=>l.jsx($i,{label:e("weaknesses.backToHistory"),onClick:()=>t(ee.ME_PRACTICE_WEAKNESSES)}),[e,t]);On({left:p,actions:x});function v(){m(null),o(null),u([]),h(null),s.mutate({skill:r,courseId:i,count:zft},{onSuccess:g=>{o(g.sessionId),u(g.questions)},onError:g=>m(ox(g))})}return b.useEffect(()=>{if(!r){t(ee.ME_PRACTICE_WEAKNESSES,{replace:!0});return}v()},[r,i]),f?l.jsxs("div",{className:"rounded-xl border border-destructive/30 bg-destructive/5 p-6",children:[l.jsx("p",{className:"text-base font-semibold text-destructive",children:e("errors.title")}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:f}),l.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:v,children:e("errors.retry")})]}):a?d?l.jsx(f_,{result:d,onClose:()=>t(ee.ME_PRACTICE_WEAKNESSES),onRetry:v}):l.jsx(h_,{sessionId:a,questions:c,onSubmitted:h}):l.jsx(Ow,{caption:e("skill.preparing",{skill:r})})}function Uft(e){if(e==null||e<=0)return"â";const t=Math.round(e/1e3),n=Math.floor(t/60),r=t%60;return n>0?`${n}m ${r}s`:`${r}s`}function Vft(e,t){if(!e)return"â";
1689try{return new Date(e).toLocaleString(t,{dateStyle:"medium",timeStyle:"short"})}catch{return String(e)}}function Hft(){const{t:e,i18n:t}=J("practice"),n=St(),[r]=ps(),i=r.get("sessionId"),s=Qet(i??void 0),a=()=>n(ee.ME_PRACTICE),o=()=>n(ee.ME_PRACTICE_HISTORY),c=()=>n(ee.ME_PRACTICE_WEAKNESSES),u=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("results.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("results.headerSubtitle")})]}),[e]),d=b.useMemo(()=>l.jsx($i,{label:e("errors.backToHub"),onClick:a}),[e,a]);if(On({left:u,actions:d}),!i)return l.jsxs(Zy,{children:[l.jsx("p",{className:"text-xl font-semibold text-foreground",children:e("results.directAccessNoIdTitle")}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e("results.directAccessNoId")}),l.jsx(Fj,{onBackToHub:a,onViewHistory:o,onReviewWeakSkills:c,t:e})]});if(s.isLoading)return l.jsx(Zy,{children:l.jsx("p",{className:"text-sm text-muted-foreground",children:e("results.loading")})});if(s.isError||!s.data)return l.jsxs(Zy,{children:[l.jsx("p",{className:"text-xl font-semibold text-foreground",children:e("results.notFoundTitle")}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e("results.notFoundBody")}),l.jsx(Fj,{onBackToHub:a,onViewHistory:o,onReviewWeakSkills:c,t:e})]});const h=s.data,f=h.scorePct!=null?`${h.scorePct}%`:e("results.scorePending");return l.jsxs("div",{className:"space-y-4",children:[l.jsxs(Zy,{children:[l.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:e(`modes.${h.type.toLowerCase()}.title`,{defaultValue:h.type})}),l.jsx("p",{className:"mt-1 text-3xl font-semibold text-foreground",children:f}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("results.summary",{correct:h.correctCount,total:h.totalQuestions})})]}),l.jsx(Zy,{children:l.jsxs("dl",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[l.jsx(Ij,{label:e("results.statStatus"),value:e(`results.sessionStatus.${h.status}`,{defaultValue:h.status})}),l.jsx(Ij,{label:e("results.statDuration"),value:Uft(h.durationMs)}),l.jsx(Ij,{label:e("results.statCompleted"),value:Vft(h.completedAt,t.language)})]})}),l.jsx(Fj,{onBackToHub:a,onViewHistory:o,onReviewWeakSkills:c,t:e})]})}function Zy({children:e}){return l.jsx("div",{className:"rounded-2xl border border-border bg-card p-6 shadow-sm",children:e})}function Ij({label:e,value:t}){return l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:e}),l.jsx("dd",{className:"mt-1 text-base font-medium text-foreground",children:t})]})}function Fj({onBackToHub:e,onViewHistory:t,onReviewWeakSkills:n,t:r}){return l.jsxs("div",{className:"flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end",children:[l.jsx(ce,{type:"button",variant:"outline",leftIcon:l.jsx(Fi,{className:"h-4 w-4"}),onClick:n,children:r("weaknesses.reviewWeakCta")}),l.jsx(ce,{type:"button",variant:"primary",leftIcon:l.jsx(Hv,{className:"h-4 w-4"}),onClick:t,children:r("results.viewHistory")}),l.jsx(ce,{type:"button",variant:"primary",leftIcon:l.jsx(kx,{className:"h-4 w-4"}),onClick:e,children:r("results.backToHub")})]})}const qft=60*60*1e3,Gft=25;function Wft(){const{t:e}=J("practice"),t=St(),n=FD({limit:Gft}),r=b.useMemo(()=>{var c;return((c=n.data)==null?void 0:c.pages.flatMap(u=>u.data))??[]},[n.data]),i=r.length,s=!!n.hasNextPage,a=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("history.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("history.subtitle")})]}),[e]),o=b.useMemo(()=>l.jsx($i,{label:e("history.back"),onClick:()=>t(ee.ME_PRACTICE)}),[e,t]);return On({left:a,actions:o}),n.isLoading?l.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:e("loading")}):n.isError?l.jsx("div",{role:"alert",className:"rounded-xl border border-destructive/30 bg-destructive/5 p-6 text-center text-sm text-destructive",children:e("history.errorBody")}):l.jsxs("div",{className:"space-y-4",children:[i===0&&l.jsx(bm,{className:"p-6 text-center text-sm text-muted-foreground",children:e("history.empty")}),l.jsx("ul",{className:"space-y-2","aria-busy":n.isFetching,children:r.map(c=>
1689{const u=new Date(c.startedAt),d=u.toLocaleString(),h=c.status==="IN_PROGRESS",f=h&&Date.now()-u.getTime()>qft,m=c.status==="COMPLETED",p=e(`modes.${c.type.toLowerCase()}.title`,{defaultValue:c.type});return l.jsx("li",{children:l.jsxs("button",{type:"button",onClick:()=>t(xet(c.id)),className:"block w-full rounded-xl border border-border bg-card p-4 text-left transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":e("history.openSession",{type:p,date:d}),children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:p}),m&&l.jsx(Oi,{variant:"success",size:"sm",children:e("history.status.completed")}),h&&!f&&l.jsx(Oi,{variant:"info",size:"sm",children:e("history.status.in_progress")}),f&&l.jsx(Oi,{variant:"warning",size:"sm",children:e("history.status.stale")}),c.status==="ABANDONED"&&l.jsx(Oi,{variant:"error",size:"sm",children:e("history.status.abandoned")})]}),l.jsx(ns,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"})]}),l.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[m?e("history.score",{correct:c.correctCount,total:c.totalQuestions,pct:c.scorePct??0}):e("history.questionCount",{count:c.totalQuestions})," · ",d]})]})},c.id)})}),i>0&&l.jsx(ey,{mode:"cursor",hasMore:s,isLoadingMore:n.isFetchingNextPage,onLoadMore:()=>void n.fetchNextPage(),summary:e("history.loadedSummary",{count:i}),labels:{loadMore:e("history.loadMore"),loading:e("history.loading"),allLoaded:e("history.allLoaded"),loadMoreAria:e("history.loadMoreAria")}})]})}const Yft=50,Jy=10,Bj="all";function kG(e){return e<30?"critical":e<50?"low":e<75?"fair":"good"}const Kft={critical:"bg-destructive",low:"bg-warning",fair:"bg-info",good:"bg-success"},Xft={critical:"error",low:"warning",fair:"info",good:"success"};function Qft(e,t){if(!e)return null;try{return new Date(e).toLocaleDateString(t,{month:"short",day:"numeric",year:"numeric"})}catch{return null}}function Zft(){const{t:e,i18n:t}=J("practice"),n=St(),r=gs(),[i,s]=b.useState(Bj),[a,o]=b.useState(1),c=Xet({courseId:i===Bj?void 0:i,limit:Yft});b.useEffect(()=>{o(1)},[i]);const u=b.useMemo(()=>l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground sm:text-3xl",children:e("weaknesses.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("weaknesses.subtitle")})]}),[e]),d=b.useMemo(()=>l.jsx($i,{label:e("weaknesses.backToHistory"),onClick:()=>n(ee.ME_PRACTICE_HISTORY)}),[e,n]);On({left:u,actions:d});const h=b.useMemo(()=>{const y=r.data??[];return[{value:Bj,label:e("weaknesses.allCourses")},...y.map(w=>({value:w.courseId,label:w.customName??w.name}))]},[r.data,e]),f=y=>{y.skill&&n(get(y.skill,y.courseId??void 0))},m=b.useMemo(()=>[{id:"skill",header:e("weaknesses.colSkill"),accessorFn:y=>y.skill,cell:({row:y})=>{const w=y.original,S=kG(Math.round(w.masteryPct));return l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"font-medium text-foreground",children:w.skill}),l.jsx(Oi,{variant:Xft[S],size:"sm",children:e(`weaknesses.band.${S}`)})]})}},{id:"course",header:e("weaknesses.colCourse"),accessorFn:y=>y.courseName??"",cell:({row:y})=>l.jsx("span",{className:"text-sm text-muted-foreground",children:y.original.courseName??e("weaknesses.noCourse")})},{id:"mastery",header:e("weaknesses.colMastery"),accessorFn:y=>y.masteryPct,cell:({row:y})=>{const w=Math.round(y.original.masteryPct),S=kG(w);return l.jsxs("div",{className:"flex min-w-[8rem] flex-col gap-1",children:[l.jsx("span",{className:"text-sm font-semibold text-foreground",children:e("weaknesses.masteryPct",{pct:w})}),l.jsx(Cx,{value:w,size:"sm",color:Kft[S],"aria-label":e("weaknesses.progressAriaLabel",{skill:y.original.skill,pct:w})})]})}},{id:"attempts",header:e("weaknesses.colAttempts"),accessorFn:y=>y.attempts,cell:({row:y})=>l.jsx("span",{className:"text-sm text-foreground",children:e("weaknesses.attemptsValue",{correct:y.original.correctAttempts,total:y.original.attempts})})},{id:"lastReviewed",header:e("weaknesses.colLastReviewed"),accessorFn:y=>y.lastReviewedAt?new Date(y.lastReviewedAt).getTime():0,cell:({row:y})=>l.jsx("span",{className:"text-sm text-muted-foreground",children:Qft(y.original.lastReviewedAt,t.language)??e("weaknesses.never")})},{id:"action",header:e("weaknesses.colAction"),enableSorting:!1,cell:({row:y})=>l.jsx("div",{className:"flex justify-end",children:l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:()=>
1689f(y.original),rightIcon:l.jsx(ns,{className:"h-4 w-4"}),children:e("weaknesses.practiceCta")})})}],[e,t.language]),p=c.data??[],x=p.length,v=b.useMemo(()=>p.slice((a-1)*Jy,a*Jy),[p,a]),g=a*Jy<x;return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("section",{"aria-label":e("weaknesses.filterBarAriaLabel"),className:"flex flex-col gap-3 rounded-2xl border border-border bg-card p-4 shadow-sm sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e("weaknesses.courseFilterLabel")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:e("weaknesses.courseFilterHint")})]}),l.jsx("div",{className:"sm:w-72",children:l.jsx(Ho,{options:h,value:i,onChange:s,disabled:r.isLoading,ariaLabel:e("weaknesses.courseFilterLabel"),className:"w-full"})})]}),c.isError?l.jsx("div",{role:"alert",className:"rounded-xl border border-destructive/30 bg-destructive/5 p-6 text-center text-sm text-destructive",children:e("weaknesses.errorBody")}):!c.isLoading&&x===0?l.jsx("div",{className:"rounded-2xl border border-border bg-card shadow-sm",children:l.jsx(bc,{icon:l.jsx(Fi,{"aria-hidden":"true"}),title:e("weaknesses.emptyTitle"),description:e("weaknesses.emptyBody"),action:{label:e("weaknesses.emptyCta"),onClick:()=>n(X7("daily"))}})}):l.jsx(R3e,{columns:m,data:v,isLoading:c.isLoading,skeletonRows:Jy,currentPage:a,pagination:{total:x,limit:Jy,hasMore:g,nextCursor:g?"next":void 0},onPreviousPage:()=>o(y=>Math.max(1,y-1)),onNextPage:()=>o(y=>y+1)})]})}function Jft({activeSessionId:e,onSelectSession:t,onNewChat:n}){const{t:r}=J("assistant"),i=WD(),s=Ptt(),a=Itt(),[o,c]=b.useState(null),[u,d]=b.useState(""),[h,f]=b.useState(null),m=i.data??[],p=w=>{c(w.id),d(w.title)},x=()=>{c(null),d("")},v=w=>{const S=u.trim();if(S.length===0){x();return}s.mutate({sessionId:w,title:S},{onSuccess:()=>{x(),Vt.success(r("history.toast.renamed"))},onError:C=>Vt.error(r("history.toast.renameFailed",{error:C.message}))})},g=(w,S)=>{w.key==="Enter"?(w.preventDefault(),v(S)):w.key==="Escape"&&(w.preventDefault(),x())},y=()=>{if(!h)return;const w=h===e;a.mutate(h,{onSuccess:()=>{f(null),Vt.success(r("history.toast.deleted")),w&&n()},onError:S=>Vt.error(r("history.toast.deleteFailed",{error:S.message}))})};return l.jsxs(l.Fragment,{children:[l.jsxs("aside",{"aria-label":r("history.ariaLabel"),className:"flex h-full w-full flex-col border-e border-border bg-card",children:[l.jsxs("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3.5",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:r("history.title")}),l.jsx(ce,{type:"button",variant:"primary",size:"sm",onClick:n,leftIcon:l.jsx(Gv,{className:"h-4 w-4"}),children:r("newChat")})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto overscroll-contain px-2 py-2",children:[i.isLoading&&l.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:r("history.loading")}),i.isError&&l.jsx("p",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/5 p-2 text-xs text-destructive",children:r("history.errorBody")}),!i.isLoading&&m.length===0&&l.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:r("history.empty")}),l.jsx("ul",{className:"space-y-1",children:m.map(w=>{const S=w.id===e,C=o===w.id;return l.jsx("li",{children:l.jsx("div",{className:`group flex items-center gap-1 rounded-xl px-2.5 py-2 text-sm transition-colors ${S?"bg-edition-pale text-primary":"text-body-ink hover:bg-edition-pale/60"}`,children:C?l.jsxs(l.Fragment,{children:[l.jsx(fn,{value:u,onChange:k=>d(k.target.value),onKeyDown:k=>g(k,w.id),autoFocus:!0,"aria-label":r("history.renameAriaLabel"),className:"h-8 flex-1 text-sm"}),l.jsx(Pn,{"aria-label":r("history.commitRename"),size:"sm",variant:"ghost",onClick:()=>v(w.id),disabled:s.isPending,children:l.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"})}),l.jsx(Pn,{"aria-label":r("history.cancelRename"),size:"sm",variant:"ghost",onClick:x,children:l.jsx(ar,{className:"h-4 w-4","aria-hidden":"true"})})]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",onClick:()=>t(w.id),className:"flex flex-1 items-center gap-2.5 truncate text-start focus-visible:outline-none focus-visible:underline",children:[l.jsx(qv,{className:`h-4 w-4 shrink-0 ${S?"text-primary":"text-edition-primary"}`,strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("span",{className:`truncate font-medium ${S?"text-primary":"text-strong"}`,children:w.title})]}),l.jsxs("span",{className:"opacity-0 transition-opacity group-hover:opacity-100",children:[l.jsx(Pn,{"aria-label":r("history.renameAriaLabel"),size:"sm",variant:"ghost",onClick:()=>p(w),children:l.jsx(Lg,{className:"h-3 w-3","aria-hidden":"true"})}),l.jsx(Pn,{"aria-label":r("history.deleteAriaLabel"),size:"sm",variant:"ghost",onClick:()=>f(w.id),children:l.jsx(Fg,{className:"h-3 w-3","aria-hidden":"true"})})]})]})})},w.id)})})]})]}),l.jsx($x,{open:h!==null,onOpenChange:w=>!w&&f(null),variant:"destructive",title:r("history.confirmDelete.title"),description:r("history.confirmDelete.body"),confirmLabel:r("history.confirmDelete.confirm"),cancelLabel:r("history.confirmDelete.cancel"),isLoading:a.isPending,onConfirm:y})]})}const e1="ple.assistant.activeSessionId",emt=["Explain something I am learning in simple terms.","Quiz me on what I studied this week.","Suggest a study plan for the next 7 days.","Help me pick what to learn next for my goals."];function tmt(){var _,E,A,j;const{t:e}=J("assistant"),t=Ps(),[n,r]=ps(),[i,s]=b.useState(()=>typeof window>"u"?null:window.localStorage.getItem(e1)),a=n.get("courseId"),o=n.get("lessonRefKey"),c=yce(i),u=bce(),d=vce(),h=()=>{d.cancel(),s(null),typeof window<"u"&&window.localStorage.removeItem(e1),(n.get("courseId")||n.get("lessonRefKey")||n.get("q"))&&r({},{replace:!0})},f=b.useMemo(()=>l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-brand-gradient text-white","aria-hidden":"true",children:l.jsx("svg",{width:22,height:22,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 4 2.5 8.5 12 13l9.5-4.5L12 4ZM6.6 10.8V15c0 1.5 2.5 3 5.4 3s5.4-1.5 5.4-3v-4.2M21.5 8.5v5"})})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-page-title font-light",children:e("title").split(" ").map((D,M)=>/arthur/i.test(D)?l.jsxs("span",{className:"font-medium text-primary",children:[M>0?" ":"",D]},M):l.jsxs("span",{children:[M>0?" ":"",D]},M))}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("subtitle")})]})]}),[e]);On({left:f}),b.useEffect(()=>{i&&c.isError&&(window.localStorage.removeItem(e1),s(null))},[i,c.isError]);const m=D=>{var B;if(i){d.send({sessionId:i,content:D});return}const M=(B=n.get("q"))==null?void 0:B.trim(),$=M?`${M} 1690 1691${D}`:D;u.mutate({courseId:a??void 0,lessonRefKey:o??void 0},{onSuccess:z=>{const O=z.session.id;s(O),typeof window<"u"&&window.localStorage.setItem(e1,O),r({},{replace:!0}),d.send({sessionId:O,content:$})},onError:z=>Vt.error(e("errors.sendFailed",{error:z.message}))})},p=D=>{D!==i&&(d.cancel(),s(D),typeof window<"u"&&window.localStorage.setItem(e1,D))},x=c.data,v=u.isPending,g=d.isStreaming,y=v||g,w=((E=(_=t.data)==null?void 0:_.firstName)==null?void 0:E.
1691charAt(0).toUpperCase())||((j=(A=t.data)==null?void 0:A.email)==null?void 0:j.charAt(0).toUpperCase())||"U",S=(x==null?void 0:x.messages)??[],C=!i&&S.length===0&&!v,k=!!a||!!(x!=null&&x.courseId)&&!i;return l.jsxs("div",{className:"grid h-[calc(100dvh-12rem)] min-h-[480px] grid-cols-1 overflow-hidden rounded-2xl border border-border bg-card md:grid-cols-[260px_minmax(0,1fr)]",children:[l.jsx("div",{className:"hidden md:block",children:l.jsx(Jft,{activeSessionId:i,onSelectSession:p,onNewChat:h})}),l.jsxs("main",{className:"flex min-h-0 min-w-0 flex-col overflow-hidden bg-background",children:[k&&l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border bg-edition-pale/60 px-4 py-2.5 text-xs text-body-ink",children:[l.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-md bg-brand-gradient text-white","aria-hidden":"true",children:l.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 4 2.5 8.5 12 13l9.5-4.5L12 4ZM6.6 10.8V15c0 1.5 2.5 3 5.4 3s5.4-1.5 5.4-3v-4.2M21.5 8.5v5"})})}),l.jsx("span",{className:"font-medium text-strong",children:e("contextBanner.scoped")}),l.jsx(Oi,{variant:"info",size:"sm",children:e("contextBanner.courseChip")})]}),i&&c.isLoading?l.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:e("loading")}):C?l.jsx(nmt,{onPick:D=>m(D),isBusy:y,t:e}):l.jsx(mce,{messages:S,streamingContent:d.partial,isStreaming:g||v,userInitial:w,reasoning:d.reasoning,steps:d.steps}),!C&&d.error&&l.jsx("div",{role:"alert",className:"mx-4 mb-1 mt-2 rounded-xl border border-destructive/30 bg-destructive/10 px-4 py-2.5 text-xs text-destructive",children:d.error}),l.jsx(pce,{onSend:m,onStop:d.cancel,isStreaming:y,disabled:c.isLoading||!!i&&!c.data})]})]})}function nmt({onPick:e,isBusy:t,t:n}){const{t:r}=J("assistant");return l.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-6 px-6 py-10 text-center",children:[l.jsx("span",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-brand-gradient text-white","aria-hidden":"true",children:l.jsx("svg",{width:34,height:34,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 4 2.5 8.5 12 13l9.5-4.5L12 4ZM6.6 10.8V15c0 1.5 2.5 3 5.4 3s5.4-1.5 5.4-3v-4.2M21.5 8.5v5"})})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("h2",{className:"text-section-title",children:r("hero.title")}),l.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:r("hero.subtitle")})]}),l.jsx("ul",{className:"grid w-full max-w-xl gap-2.5 sm:grid-cols-2",children:emt.map(i=>l.jsx("li",{children:l.jsx("button",{type:"button",disabled:t,onClick:()=>e(i),className:"w-full rounded-xl border border-border bg-card px-4 py-3 text-start text-sm text-body-ink transition hover:border-edition-soft hover:bg-edition-pale/50 hover:text-primary motion-safe:hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",children:i})},i))}),l.jsx("p",{className:"text-xs text-muted-foreground",children:n("hero.hint")})]})}const jS=e=>e?"text-primary font-medium transition-colors":"text-muted-ink transition-colors hover:text-primary";
1691function nde({eyebrow:e,title:t,intro:n,updated:r,toc:i,sections:s,contactEmail:a,contactSubline:o,active:c}){return l.jsxs("div",{className:"flex min-h-[100dvh] flex-col bg-background text-foreground",children:[l.jsx("header",{className:"sticky top-0 z-20 border-b border-border bg-background/85 backdrop-blur-md backdrop-saturate-150",children:l.jsxs("div",{className:"mx-auto flex w-full max-w-5xl items-center justify-between px-6 py-3.5 sm:px-7",children:[l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"flex items-center gap-3 no-underline",children:[l.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-[10px] bg-brand-gradient text-white",children:l.jsx(of,{size:20,strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("span",{className:"leading-tight",children:[l.jsx("span",{className:"block text-sm font-semibold text-foreground",children:at.name}),l.jsx("span",{className:"block text-[9px] font-medium uppercase tracking-[0.18em] text-primary",children:"Personal · PLE"})]})]}),l.jsxs(ir,{to:ee.AUTH_LOGIN,className:"inline-flex items-center gap-1.5 rounded-[10px] border border-border bg-card px-4 py-2 text-[13px] font-medium text-body-ink no-underline transition-colors hover:border-edition-soft hover:text-primary",children:[l.jsx(kx,{size:15,strokeWidth:1.75,"aria-hidden":"true"}),"Back to sign in"]})]})}),l.jsxs("div",{className:"mx-auto w-full max-w-5xl px-6 pb-7 pt-12 sm:px-7",children:[l.jsx("p",{className:"mb-3.5 text-[10px] font-semibold uppercase tracking-[0.2em] text-primary",children:e}),l.jsx("h1",{className:"text-page-title mb-3 text-4xl font-light tracking-tight sm:text-[40px]",children:t}),l.jsx("p",{className:"mb-4 max-w-[680px] text-[15px] leading-[1.7] text-body-ink",children:n}),l.jsx("p",{className:"text-[12.5px] text-muted-ink",children:r})]}),l.jsxs("div",{className:"mx-auto flex w-full max-w-5xl flex-1 items-start gap-12 px-6 pb-16 pt-2 sm:px-7",children:[l.jsxs("nav",{"aria-label":"On this page",className:"sticky top-[92px] hidden flex-[0_0_200px] md:block",children:[l.jsx("p",{className:"mb-3 text-[9.5px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:"On this page"}),l.jsx("ul",{className:"flex flex-col gap-2.5 border-l border-border pl-4",children:i.map((u,d)=>l.jsx("li",{children:l.jsx("a",{href:`#${u.id}`,className:`text-[13px] no-underline ${jS(d===0)}`,children:u.label})},u.id))})]}),l.jsxs("article",{className:"flex min-w-0 max-w-[680px] flex-1 flex-col gap-[34px]",children:[s.map(u=>l.jsxs("section",{id:u.id,className:"scroll-mt-24",children:[l.jsx("p",{className:"mb-2 text-[11px] font-semibold text-primary",children:u.ordinal}),l.jsx("h2",{className:"text-section-title mb-2.5 text-xl font-semibold",children:u.title}),u.body]},u.id)),l.jsxs("div",{className:"flex items-center gap-3.5 rounded-[14px] border border-border bg-card px-5 py-[18px]",children:[l.jsx("span",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-[11px] bg-accent text-primary",children:l.jsx(Ih,{size:20,strokeWidth:1.75,"aria-hidden":"true"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-card-title text-[13.5px] font-semibold",children:a}),l.jsx("p",{className:"mt-0.5 text-xs text-muted-ink",children:o})]})]})]})]}),l.jsx("footer",{className:"border-t border-border bg-card",children:l.jsxs("div",{className:"mx-auto flex w-full max-w-5xl flex-wrap items-center justify-between gap-4 px-6 py-[22px] sm:px-7",children:[l.jsx(aue,{className:"text-xs leading-relaxed text-muted-ink",variant:"full"}),l.jsxs("nav",{className:"flex gap-5","aria-label":"Legal",children:[l.jsx(ir,{to:ee.PRIVACY,className:`text-xs no-underline ${jS(c==="privacy")}`,children:"Privacy"}),l.jsx(ir,{to:ee.TERMS,className:`text-xs no-underline ${jS(c==="terms")}`,children:"Terms"}),l.jsx(ir,{to:ee.ME_HELP,className:`text-xs no-underline ${jS(!1)}`,children:"Help"})]})]})})]})}function rde({title:e,url:t}){return b.useEffect(()=>{window.location.replace(t)},[t]),l.jsxs("main",{className:"mx-auto flex min-h-[60vh] max-w-xl flex-col justify-center px-6 text-center",children:[l.jsx("h1",{className:"text-2xl font-semibold text-strong",children:e}),l.jsxs("p",{className:"mt-3 text-sm text-muted-ink",children:["Our ",e.toLowerCase()," is published at"," ",l.jsx("a",{href:t,className:"font-semibold text-primary underline underline-offset-4",children:t.replace(/^https:\/\//,"")}),". Opening it nowâ¦"]})]})}const Dd="text-[14.5px] leading-[1.75] text-body-ink",rmt=[{id:"p1",label:"Overview"},{id:"p2",label:"What we collect"},{id:"p3",label:"How we use it"},{id:"p4",label:"Your data & AI"},{id:"p5",label:"Sharing"},{id:"p6",label:"Your rights"},{id:"p7",label:"Security & retention"},{id:"p8",label:"Changes & contact"}],imt=[{id:"p1",ordinal:"01",title:"Overview",body:l.jsxs("p",{className:Dd,children:[at.productLongName," is operated by MindHYVE.ai, Inc. We collect only what we need to give you a tutor that adapts to you, and we never sell your personal information. This policy covers the PLE web app and related services."]})},{id:"p2",ordinal:"02",title:"Information we collect",body:l.jsxs(l.Fragment,{children:[l.jsx("p",{className:`${Dd} mb-3`,children:"We collect three kinds of information:"}),l.jsxs("ul",{className:"flex flex-col gap-2.5",children:[l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-2 h-[7px] w-[7px] flex-shrink-0 rounded-full bg-primary"}),l.jsxs("span",{className:"text-sm leading-[1.7] text-body-ink",children:[l.jsx("strong",{className:"font-semibold text-foreground",children:"Account details"})," ","you give us â name, email, and password."]})]}),l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-2 h-[7px] w-[7px] flex-shrink-0 rounded-full bg-primary"}),l.jsxs("span",{className:"text-sm leading-[1.7] text-body-ink",children:[l.jsx("strong",{className:"font-semibold text-foreground",children:"Learning activity"})," ","â courses, lessons, practice results, and progress that let Arthur personalize."]})]}),l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-2 h-[7px] w-[7px] flex-shrink-0 rounded-full bg-primary"}),l.jsxs("span",{className:"text-sm leading-[1.7] text-body-ink",children:[l.jsx("strong",{className:"font-semibold text-foreground",children:"Payment information"})," ","â handled by our payment processor; we never store full card numbers."]})]})]})]})},{id:"p3",ordinal:"03",title:"How we use your information",body:l.jsx("p",{className:Dd,children:"We use your information to personalize tutoring and pacing, to run and improve the service, to process payments, and to send you service messages such as receipts and security alerts. Marketing emails are optional and easy to turn off in Settings."})},{id:"p4",ordinal:"04",title:"Your learning data & AI",body:l.jsxs("p",{className:Dd,children:["Arthur uses your learning activity to adapt how it explains and schedules material for ",l.jsx("em",{className:"italic",children:"you"}),". We do not sell your data, and we do not use your personal content to train models for third parties. You remain in control of what you share."]})},{id:"p5",ordinal:"05",title:"Sharing & disclosure",body:l.jsx("p",{className:Dd,children:"We share information only with service providers who help us operate the platform, under contracts that protect your data, and when required by law. We never sell your personal information to advertisers or data brokers."})},{id:"p6",ordinal:"06",title:"Your rights & choices",body:l.jsx("p",{className:Dd,children:"You can access, correct, export, or delete your data at any time from Settings, or by contacting us. Where local law provides additional rights, we honor them. Deleting your account removes your personal data on the schedule described below."})},{id:"p7",ordinal:"07",title:"Security & retention",body:l.jsx("p",{className:Dd,children:"Your data is encrypted in transit and at rest, and access is limited to people who need it. We keep your information while your account is active and for a short period afterward to meet legal and accounting obligations."})},{id:"p8",ordinal:"08",title:"Changes & contact",body:l.jsx("p",{className:Dd,children:"We'll let you know about material changes to this policy in the app or by email. Questions? Reach our privacy team â we read every message."})}];function smt(){return at.publishedLegal?l.jsx(rde,{title:"Privacy Policy",url:at.publishedLegal.privacy}):l.jsx(nde,{eyebrow:"Legal",title:"Privacy Policy",intro:l.jsxs(l.Fragment,{children:["This policy explains what we collect, why we collect it, and the choices you have. We've kept it in plain language â if anything is unclear,"," ",l.jsx(ir,{to:ee.ME_HELP,className:"font-medium text-primary no-underline transition-colors hover:text-edition-deeper",children:"ask our team"}),"."]}),updated:"Last updated June 1, 2026",toc:rmt,sections:imt,contactEmail:at.contact.privacy,contactSubline:"MindHYVE.ai, Inc. · Newport Beach, CA",active:"privacy"})}const Ld="text-[14.5px] leading-[1.75] text-body-ink",amt=[{id:"p1",label:"Acceptance"},{id:"p2",label:"Your account"},{id:"p3",label:"Acceptable use"},{id:"p4",label:"Purchases & refunds"},{id:"p5",label:"Content & licenses"},{id:"p6",label:"AI tutoring"},{id:"p7",label:"Termination"},{id:"p8",label:"Contact"}],omt=[{id:"p1",ordinal:"01",title:"Acceptance of terms",body:l.jsxs("p",{className:Ld,children:["By accessing or using ",at.productWithEdition,", you agree to these Terms and our Privacy Policy. If you do not agree, please do not use the service. We may reference additional guidelines that form part of these Terms."]})},{id:"p2",ordinal:"02",title:"Your account",body:l.jsx("p",{className:Ld,children:"You are responsible for keeping your login secure and for activity under your account. You must be old enough to consent under your local law, and the details you provide should be accurate and current."})},{id:"p3",ordinal:"03",title:"Acceptable use",body:l.jsxs("p",{className:Ld,children:["Use ",at.name," for your own learning. Do not misuse the service â no scraping, reselling access, attempting to break security, or uploading unlawful or harmful content. We may limit use that threatens the platform or other learners."]})},{id:"p4",ordinal:"04",title:"Purchases & refunds",body:l.jsxs("p",{className:Ld,children:["Some courses are paid; prices and any discounts are shown before you check out. Most purchases are covered by a"," ",l.jsx("em",{className:"italic",children:"30-day money-back guarantee"}),", described at checkout. Taxes may apply based on your location."]})},{id:"p5",ordinal:"05",title:"Content & licenses",body:l.jsxs("p",{className:Ld,children:["Course materials are licensed to you for personal, non-commercial learning, not sold. You keep ownership of the notes and work you create in ",at.name," â we do not claim them."]})},{id:"p6",ordinal:"06",title:"AI tutoring",body:l.jsxs("p",{className:Ld,children:["Arthur is an ",l.jsx("em",{className:"italic",children:"assistive"})," tutor. It can make mistakes and is not a substitute for professional, legal, medical, or financial advice. Arthur helps you reason;"," ",l.jsx("strong",{className:"font-semibold text-foreground",children:"you make the final decisions"}),"."]})},{id:"p7",ordinal:"07",title:"Termination & changes",body:l.jsx("p",{className:Ld,children:"You can close your account at any time. We may suspend access for violations of these Terms, and we may update the service or these Terms â giving notice of material changes in the app or by email."})},{id:"p8",ordinal:"08",title:"Contact",body:l.jsx("p",{className:Ld,children:"Questions about these terms? Reach our team â we're happy to help."})}];function lmt(){return at.publishedLegal?l.jsx(rde,{title:"Terms of Service",url:at.publishedLegal.terms}):l.jsx(nde,{eyebrow:"Legal",title:"Terms of Service",intro:l.jsxs(l.Fragment,{children:["These terms govern your use of ",at.productLongName,". By creating an account or using the service, you agree to them â we've kept the language plain. Questions?"," ",l.jsx(ir,{to:ee.ME_HELP,className:"font-medium text-primary no-underline transition-colors hover:text-edition-deeper",children:"Ask our team"}),"."]}),updated:"Last updated June 1, 2026",toc:amt,sections:omt,contactEmail:at.contact.legal,contactSubline:"MindHYVE.ai, Inc. · Newport Beach, CA",active:"terms"})}function cmt(e){return{hours:Math.floor(e/60),mins:e%60}}function umt(){const{t:e}=J("course-overview"),t=St(),n=is(),{courseId:r}=Ec(),i=b.useMemo(()=>vht(r??"unknown","public"),[r]),a=pht(r,{initialData:i}).data;if(!a)return l.jsxs("section",{className:"mx-auto my-12 max-w-md rounded-2xl border border-border bg-card p-6 text-center",children:[l.jsx("h1",{className:"text-section-title",children:e("notFound.title")}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e("notFound.body")}),l.jsx("div",{className:"mt-4",children:l.jsx(ce,{type:"button",variant:"primary",size:"md",onClick:()=>t(ee.ROOT),children:e("notFound.backToCatalog")})})]});const o=()=>{const p=`${n.pathname}${n.search}`;t(pet(p))},c={label:e("enroll.signInToEnroll"),onClick:o,variant:"primary"},u=a.course.durationMinutes===null?null:cmt(a.course.durationMinutes),d=a.curriculum.reduce((p,x)=>p+x.lessons.length,0),h=(()=>{try{return new Date(a.course.lastUpdated).toLocaleDateString(void 0,{month:"short",year:"numeric"})}catch{return a.course.lastUpdated}})(),f=[...a.reviewsSummary.total>0?[{key:"rating",icon:l.jsx(Ig,{className:"h-4 w-4"}),label:e("hero.metaRating",{rating:a.reviewsSummary.average.toFixed(1),total:a.reviewsSummary.total.toLocaleStr
1691ing()})}]:[],...u?[{key:"duration",icon:l.jsx(od,{className:"h-4 w-4"}),label:u.hours>0?e("hero.metaDuration",{hours:u.hours,minutes:u.mins}):e("hero.metaDurationShort",{minutes:u.mins})}]:[],...d>0?[{key:"lessons",icon:l.jsx(Ci,{className:"h-4 w-4"}),label:e("hero.metaLessons",{count:d})}]:a.course.personal?[{key:"lessons",icon:l.jsx(Ci,{className:"h-4 w-4"}),label:e("hero.beingWritten")}]:[],{key:"language",icon:l.jsx(SQ,{className:"h-4 w-4"}),label:e("hero.metaLanguage",{language:a.course.language})},{key:"updated",icon:l.jsx(jQ,{className:"h-4 w-4"}),label:e("hero.metaLastUpdated",{date:h})}],m=a.skills.map(p=>({key:p.slug,label:p.name}));return l.jsxs("main",{className:"mx-auto max-w-6xl space-y-6 px-4 py-6 pb-24 sm:px-6 lg:pb-6",children:[l.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_360px]",children:[l.jsxs("div",{className:"space-y-6",children:[l.jsx(SD,{eyebrow:a.course.subtitle??void 0,title:a.course.title,subtitle:a.course.subtitle??void 0,description:a.course.description,meta:f,tags:m,coverImageUrl:a.course.coverImageUrl,coverImageAlt:a.course.title}),l.jsx(Kue,{outcomes:a.outcomes}),l.jsxs("section",{"aria-labelledby":"curriculum-title",className:"rounded-2xl border border-border bg-card p-5 text-card-foreground",children:[l.jsxs("header",{className:"mb-4",children:[l.jsx("h2",{id:"curriculum-title",className:"text-section-title",children:e("curriculum.title")}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:d===0?a.course.personal?e("hero.beingWritten"):null:e("curriculum.subtitle",{weeks:a.curriculum.length,lessons:d,duration:u?u.hours>0?e("hero.metaDuration",{hours:u.hours,minutes:u.mins}):e("hero.metaDurationShort",{minutes:u.mins}):""})})]}),a.curriculum.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:e("curriculum.preparing")}):l.jsx(U9,{weeks:a.curriculum.map(p=>({...p,lessons:p.lessons.map(x=>({...x,durationMinutes:x.durationMinutes??void 0}))})),weekLabel:e("curriculum.weekLabel"),stepsLabel:e("curriculum.stepsLabel"),minutesLabel:e("curriculum.minutesLabel"),lessonsLabel:e("curriculum.lessonsLabel")})]}),l.jsx(Xue,{instructor:a.instructor,personal:a.course.personal}),l.jsxs("section",{"aria-labelledby":"reviews-title",className:"rounded-2xl border border-border bg-card p-5 text-card-foreground",children:[l.jsx("header",{className:"mb-4",children:l.jsx("h2",{id:"reviews-title",className:"text-section-title",children:e("reviews.title")})}),a.reviewsSummary.total===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:e("reviews.empty")}):l.jsx(H9,{average:a.reviewsSummary.average,total:a.reviewsSummary.total,breakdown:a.reviewsSummary.breakdown,outOfFiveLabel:e("reviews.outOfFive"),totalLabel:e("reviews.total",{count:a.reviewsSummary.total}),rowLabel:e("reviews.rowLabel")})]})]}),l.jsx("div",{className:"hidden lg:block",children:l.jsx(Que,{primaryCta:c,showValueProps:!0})})]}),l.jsx(Zue,{primaryCta:c})]})}function dmt(){var s,a;const{t:e,i18n:t}=J("certificates"),{code:n}=Ec(),r=xit(n),i=b.useMemo(()=>{const o=r.data;if(!(o!=null&&o.valid))return null;const c=new Date(o.issuedAt);return Number.isNaN(c.getTime())?o.issuedAt:c.toLocaleDateString(t.language,{year:"numeric",month:"long",day:"numeric"})},[r.data,t.language]);return l.jsx("main",{className:"mx-auto flex min-h-[100dvh] max-w-lg flex-col justify-center px-6 py-12",children:l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-7 shadow-sm sm:p-9",children:[l.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-ink",children:at.name}),r.isLoading&&l.jsx("p",{className:"mt-4 text-sm text-muted-ink",role:"status",children:e("verify.checking")}),r.isError&&l.jsxs("div",{className:"mt-4",role:"alert",children:[l.jsx("h1",{className:"text-xl font-semibold text-strong",children:e("verify.errorTitle")}),l.jsx("p",{className:"mt-2 text-sm text-body-ink",children:e("verify.errorBody")})]}),((s=r.data)==null?void 0:s.valid)===!0&&l.jsxs("div",{className:"mt-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sage",children:[l.jsx(gQ,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h1",{className:"text-xl font-semibold",children:e("verify.val
1691idTitle")})]}),l.jsxs("dl",{className:"mt-6 space-y-4",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs uppercase tracking-[0.1em] text-muted-ink",children:e("verify.recipient")}),l.jsx("dd",{className:"mt-0.5 text-lg font-medium text-strong",children:r.data.recipientName})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs uppercase tracking-[0.1em] text-muted-ink",children:r.data.kind==="PACK"?e("verify.programme"):e("verify.course")}),l.jsx("dd",{className:"mt-0.5 text-lg font-medium text-strong",children:r.data.subjectTitle})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs uppercase tracking-[0.1em] text-muted-ink",children:e("verify.issued")}),l.jsx("dd",{className:"mt-0.5 text-body-ink",children:i})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs uppercase tracking-[0.1em] text-muted-ink",children:e("verify.code")}),l.jsx("dd",{className:"mt-0.5 break-all font-mono text-sm text-body-ink",children:r.data.verificationCode})]})]})]}),((a=r.data)==null?void 0:a.valid)===!1&&l.jsxs("div",{className:"mt-4",role:"alert",children:[l.jsxs("div",{className:"flex items-center gap-2 text-clay",children:[l.jsx(UM,{className:"h-6 w-6",strokeWidth:1.75,"aria-hidden":"true"}),l.jsx("h1",{className:"text-xl font-semibold",children:e("verify.invalidTitle")})]}),l.jsx("p",{className:"mt-2 text-sm text-body-ink",children:e("verify.invalidBody")})]}),l.jsx("p",{className:"mt-8 border-t border-border pt-4 text-xs text-muted-ink",children:e("verify.footer",{brand:at.name})})]})})}function hmt(){const e=ZX(),t=St();let n="Something went wrong",r="An unexpected error occurred while loading this page.";return Rg(e)?(n=`${e.status} ${e.statusText}`,r=e.data??r):e instanceof Error&&(r=e.message),l.jsx("div",{className:"flex min-h-[100dvh] items-center justify-center bg-background px-6",children:l.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[l.jsx("h1",{className:"text-3xl font-semibold text-foreground",children:n}),l.jsx("p",{className:"text-muted-foreground",children:r}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>t(ee.AUTH_LOGIN),children:"Back to home"})]})})}function fmt(){const{isAuthenticated:e,isHydrated:t}=yf(),n=is(),r=St();return t?e?l.jsx("div",{className:"flex min-h-[100dvh] items-center justify-center bg-background px-6",children:l.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[l.jsx("h1",{className:"text-3xl font-semibold text-foreground",children:"Page not found"}),l.jsx("p",{className:"text-muted-foreground",children:"We couldnât find that page. It may have moved, or the link may be out of date."}),l.jsx(ce,{type:"button",variant:"primary",onClick:()=>r(ee.ME_HOME),children:"Back to your workspace"})]})}):l.jsx(jo,{to:`${ee.AUTH_LOGIN}${n.search}`,replace:!0}):null}function mmt(){const{user:e,isAuthenticated:t,isHydrated:n}=yf();return n?!t||!e?l.jsx(jo,{to:ee.AUTH_LOGIN,replace:!0}):e.role==="admin"&&at.key!=="ciai"?l.jsx(jo,{to:ee.AUTH_LOGIN,replace:!0}):l.jsx(jo,{to:ee.ME_HOME,replace:!0}):null}function NS({prefix:e,target:t}){const n=is(),r=n.pathname.startsWith(e)?n.pathname.slice(e.length):"";return l.jsx(jo,{to:`${t}${r}${n.search}`,replace:!0})}function pmt(){const e=is();return l.jsx(jo,{to:`${ee.AUTH_LOGIN}${e.search}`,replace:!0})}function gmt({title:e}){return l.jsxs("div",{className:"mx-auto flex max-w-xl flex-col items-center justify-center gap-3 rounded-2xl border border-border bg-card px-6 py-10 text-center shadow-soft",children:[l.jsx("h1",{className:"text-xl font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"This experience is under construction and will ship in a future release. Thanks for your patience."})]})}const xmt=[{path:ee.ROOT,element:l.jsx(Oet,{}),errorElement:l.jsx(hmt,{}),children:[{index:!0,element:l.jsx(mmt,{})},{path:ee.AUTH_LOGIN,element:l.jsx(hst,{})},{path:"/signin",element:l.jsx(pmt,{})},{path:ee.AUTH_SIGNUP,element:l.jsx(pst,{})},{path:ee.AUTH_FORGOT_PASSWORD,element:l.jsx(xst,{})},{path:ee.AUTH_RESET_PASSWORD,element:l.jsx(bst,{})},{path:ee.AUTH_RECOVER_USERNAME,element:l.jsx(wst,{})},{path:ee.AUTH_VERIFY_EMAIL,element:l.jsx(Cst,{})},{path:ee.AUTH_MFA_VERIFY,element:l.jsx(Est,{})},{path:ee.AUTH_SSO_COMPLETE,element:l.jsx(_st,{})},{path:ee.PRIVACY,element:l.jsx(smt,{})},{path:ee.TERMS,element:l.jsx(lmt,{})},{path:ee.PUBLIC_COURSE_OVERVIEW,element:l.jsx(umt,{})},{path:ee.PUBLIC_CERTIFICATE_VERIFY,element:l.jsx(dmt,{})},{path:ee.ME_ROOT,loader:r_,element:l.jsx(Jnt,{}),children:[{index:!0,element:l.jsx(jo,{to:ee.ME_HOME,replace:!0})},{path:"home",element:l.jsx(xot,{})},{path:"settings",element:l.jsx(rrt,{}),children:[{index:!0,element:l.jsx(jo,{to:"profile",replace:!0})},{path:"profile",element:l.jsx(mrt,{})},{path:"security",element:l.jsx(_rt,{})},{path:"appearance",element:l.jsx(Irt,{})},{path:"learning-preferences",element:l.jsx(Jrt,{})},{path:"notifications",element:l.jsx(ait,{})},{path:"learning-profile",element:l.jsx(jot,{})},{path:"learning-profile/report",loader:Ret,element:l.jsx(Rot,{})},{path:"interview",element:l.jsx(Iot,{})},{path:"career",loader:lj,element:l.jsx(slt,{})},{path:"career/history",loader:lj,element:l.jsx(alt,{})},{path:"career/compare",loader:lj,element:l.jsx(olt,{})},{path:"orders",element:l.jsx(Eht,{})},{path:"invoices",element:l.jsx(fit,{})},{path:"billing",element:l.jsx(jo,{to:ee.ME_SETTINGS_INVOICES,replace:!0})},{path:"certificates",element:l.jsx(vit,{})}]},{path:"learning-profile/*",element:l.jsx(NS,{prefix:ee.ME_LEGACY_LEARNING_PROFILE,target:ee.ME_LEARNING_PROFILE})},{path:"interview/*",element:l.jsx(NS,{prefix:ee.ME_LEGACY_INTERVIEW,target:ee.ME_INTERVIEW})},{path:"career/*",element:l.jsx(NS,{prefix:ee.ME_LEGACY_CAREER,target:ee.ME_CAREER})},{path:"orders/*",element:l.jsx(NS,{prefix:ee.ME_LEGACY_ORDERS,target:ee.ME_ORDERS})},{path:"settings/orders/:id",element:l.jsx(jht,{})},{path:"courses",children:[{index:!0,element:l.jsx(jo,{to:ee.ME_COURSES_ACTIVE,replace:!0})},{element:l.jsx(klt,{}),children:[{path:"active",element:l.jsx(lct,{})},{path:"completed",element:l.jsx(cct,{})},{path:"archived",element:l.jsx(uct,{})},{path:"custom",element:l.jsx(dct,{})}]},{path:":courseId",element:l.jsx(xct,{})},{path:":courseId/learn",element:l.jsx(Fut,{}),loader:rq},{path:":courseId/extra/:kind",element:l.jsx(But,{}),loader:rq}]},{path:"notes",element:l.jsx(Jut,{})},{path:"library",element:l.jsx(mdt,{})},{path:"help",element:l.jsx(Xit,{})},{path:"help/articles/:slug",element:l.jsx(Qit,{})},{path:"course-marketplace",children:[{index:!0,element:l.jsx(jo,{to:ee.ME_MARKETPLACE_FOR_YOU,replace:!0})},{element:l.jsx(pdt,{}),children:[{path:"for-you",element:l.jsx(Kdt,{})},{path:"browse",element:l.jsx(nht,{})},{path:"create",element:l.jsx(rht,{})}]},{path:"packs/:slug",element:l.jsx(kht,{})},{path:":courseId",element:l.jsx(Cht,{})}]},{path:"checkout/success",element:l.jsx(_ht,{})},{path:"checkout/cancel",element:l.jsx(Tht,{})},{path:"calendar",element:l.jsx(hft,{})},{path:"practice",element:l.jsx(_ft,{})},{path:"practice/daily",element:l.jsx(Nft,{})},{path:"practice/spaced",element:l.jsx(Oft,{})},{path:"practice/quiz",element:l.jsx(Lft,{})},{path:"practice/speed",element:l.jsx(Bft,{})},{path:"practice/skill",element:l.jsx($ft,{})},{path:"practice/results",element:l.jsx(Hft,{})},{path:"practice/history",element:l.jsx(Wft,{})},{path:"practice/weaknesses",element:l.jsx(Zft,{})},{path:"assistant",element:l.jsx(tmt,{})},{path:"ask-arthur",element:l.jsx(jo,{to:ee.ME_ASSISTANT,replace:!0})},{path:"career-plan",element:l.jsx(gmt,{title:"Career Plan"})}]},{path:"*",element:l.jsx(fmt,{})}]}],ymt=lge(xmt),ide=60,bmt=15;
1691function vmt({baked:e=dy,fetchServed:t=hnt,reload:n,criticalSeconds:r=ide}){const{t:i}=J("common"),[s,a]=b.useState(null),o=b.useRef(void 0),c=fnt(e,s);b.useEffect(()=>{if(!e)return;let d=!0;const h=async()=>{if(document.visibilityState!=="visible")return;const p=await t();d&&p&&a(p)},f=window.setInterval(()=>void h(),ont),m=()=>void h();return window.addEventListener("focus",m),h(),()=>{d=!1,window.clearInterval(f),window.removeEventListener("focus",m)}},[e,t]);const u=b.useCallback(()=>{o.current!==void 0||!e||(o.current=Vt.info(i("release.updateTitle",{product:e.product}),{description:i("release.updateBody"),duration:1/0,action:{label:i("release.reload"),onClick:()=>{o.current=void 0,Iue(n).then(d=>{d.kind==="busy"&&Vt.info(i("release.finishFirst")),d.kind==="failed"&&Vt.error(i("release.saveFailed"))})}},onDismiss:()=>{o.current=void 0,a(null)}}))},[i,e,n]);return b.useEffect(()=>{c==="available"&&u(),c==="critical"&&o.current!==void 0&&(Vt.dismiss(o.current),o.current=void 0)},[c,u]),c!=="critical"||!s?null:l.jsx(wmt,{served:s,reload:n,seconds:r})}function wmt({served:e,reload:t,seconds:n=ide}){const{t:r}=J("common"),[i,s]=b.useState(n),[a,o]=b.useState(!1),[c,u]=b.useState(null),[d,h]=b.useState(0),f=b.useCallback(async()=>{o(!0);const p=await Iue(t);p.kind!=="ready"&&(u(p.kind),s(bmt),o(!1),h(x=>x+1))},[t]);b.useEffect(()=>{if(a)return;const p=window.setInterval(()=>{s(x=>x>1?x-1:lut()?(u("typing"),1):(window.clearInterval(p),f(),0))},1e3);return()=>window.clearInterval(p)},[a,d,f]);const m=a?r("release.saving"):c==="failed"?r("release.saveFailed"):c==="busy"?r("release.finishFirst"):c==="typing"?r("release.criticalWaiting"):r("release.criticalCountdown",{seconds:i});return l.jsx("div",{role:"alert","data-testid":"ple-critical-reload",className:"fixed inset-x-0 top-0 z-[60] flex justify-center px-3 pt-3 print:hidden",children:l.jsxs("div",{className:"flex w-full max-w-xl flex-wrap items-start gap-3 rounded-xl border border-border bg-card p-4 text-strong shadow-xl",children:[l.jsx(lf,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive","aria-hidden":!0}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"text-sm font-semibold",children:r("release.criticalTitle",{product:e.product})}),l.jsx("p",{className:"mt-1 text-sm",children:e.criticalReason??r("release.criticalDefault")}),l.jsx("p",{className:`mt-1 text-xs ${c==="failed"?"text-destructive":"text-muted-foreground"}`,"aria-live":"polite","data-testid":"ple-critical-status",children:m})]}),l.jsx("button",{type:"button",onClick:()=>void f(),disabled:a,className:"rounded-lg bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:r("release.reloadNow")})]})})}const Smt=new Mpe({defaultOptions:{queries:{staleTime:6e4,retry:1,refetchOnWindowFocus:!1}}});function Cmt(){return l.jsx(ipe,{client:Smt,children:l.jsx($we,{delayDuration:150,children:l.jsxs(stt,{children:[l.jsx(gge,{router:ymt}),l.jsx(tne,{position:"top-center",expand:!0,richColors:!0,closeButton:!0}),l.jsx(vmt,{})]})})})}const Kt=e=>typeof e=="string",t1=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},_G=e=>e==null?"":""+e,kmt=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},_mt=/###/g,TG=e=>e&&e.indexOf("###")>-1?e.replace(_mt,"."):e,EG=e=>!e||Kt(e),hb=(e,t,n)=>{const r=Kt(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(EG(e))return{};const s=TG(r[i]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++i}return EG(e)?{}:{obj:e,k:TG(r[i])}},jG=(e,t,n)=>{const{obj:r,k:i}=hb(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),o=hb(e,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=hb(e,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${s}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=n},Tmt=(e,t,n,r)=>{const{obj:i,k:s}=hb(e,t,Object);i[s]=i[s]||[],i[s].push(n)},$5=(e,t)=>{const{obj:n,k:r}=hb(e,t);if(n)return n[r]},Emt=(e,t,n)=>{const r=$5(e,n);return r!==void 0?r:$5(t,n)},sde=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Kt(e[r])||e[r]instanceof String||Kt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):sde(e[r],t[r],n):e[r]=t[r]);return e},Wp=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var jmt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Nmt=e=>Kt(e)?e.replace(/[&<>
1691"'\/]/g,t=>jmt[t]):e;class Amt{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Mmt=[" ",",","?","!",";"],Rmt=new Amt(20),Omt=(e,t,n)=>{t=t||"",n=n||"";const r=Mmt.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=Rmt.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(e);if(!s){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(s=!0)}return s},d8=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let c=s;c<r.length;++c)if(c!==s&&(o+=n),o+=r[c],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;s+=c-s+1;break}i=a}return i},U5=e=>e&&e.replace("_","-"),Dmt={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class V5{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Dmt,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(Kt(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new V5(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new V5(this.logger,t)}}var ac=new V5;class m_{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[o,c]=a;for(let u=0;u<c;u++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,c]=a;for(let u=0;u<c;u++)o.apply(o,[t,...r])})}}class NG extends m_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.indexOf(".")>-1?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):Kt(r)&&s?o.push(...r.split(s)):o.push(r)));const c=$5(this.data,o);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=o[0],n=o[1],r=o.slice(2).join(".")),c||!a||!Kt(r)?c:d8(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(o=t.split("."),i=n,n=o[1]),this.addNamespaces(n),jG(this.data,o,i),s.silent||this.emit
vendor: 1,509 bytes, line 1691
1691("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(Kt(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[t,n];t.indexOf(".")>-1&&(o=t.split("."),i=r,r=n,n=o[1]),this.addNamespaces(n);let c=$5(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?sde(c,r,s):c={...c,...r},jG(this.data,o,c),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var ade={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const AG={};class H5 extends m_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),kmt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1691i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ac.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Omt(t,r,i);if(a&&!o){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:Kt(s)?[s]:s};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return{key:t,namespaces:Kt(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(t[t.length-1],n),c=o[o.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const S=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${S}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${S}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const h=this.resolve(t,n);let f=h&&h.res;const m=h&&h.usedKey||a,p=h&&h.exactUsedKey||a,x=Object.prototype.toString.apply(f),v=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!Kt(f)&&typeof f!="boolean"&&typeof f!="number";if(y&&f&&w&&v.indexOf(x)<0&&!(Kt(g)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...n,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=S,h.usedParams=this.getUsedParamsDetails(n),h):S}if(s){const S=Array.isArray(f),C=S?[]:{},k=S?p:m;for(const _ in f)if(Object.prototype.hasOwnProperty.call(f,_)){const E=`${k}${s}${_}`;C[_]=this.translate(E,{...n,joinArrays:!1,ns:o}),C[_]===E&&(C[_]=f[_])}f=C}}else if(y&&Kt(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,t,n,r));else{let S=!1,C=!1;const k=n.count!==void 0&&!Kt(n.count),_=H5.hasDefaultValue(n),E=k?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&k?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",j=k&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),D=j&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&_&&(S=!0,f=D),this.isValidLookup(f)||(C=!0,f=a);const $=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:f,B=_&&D!==f&&this.options.updateMissing;if(C||S||B){if(this.logger.log(B?"updateKey":"missingKey",u,c,a,B?D:f),s){const I=this.resolve(a,{...n,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let z=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let I=0;I<O.length;I++)z.push(O[I]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(n.lng||this.language):z.push(n.lng||this.language);const P=(I,q,R)=>{const xe=_&&R!==f?R:$;this.options.missingKeyHandler?this.options.missingKeyHandler(I,c,q,xe,B,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(I,c,q,xe,B,n),this.emit
vendor: 12,014 bytes, line 1691
1691("missingKey",I,c,q,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?z.forEach(I=>{const q=this.pluralResolver.getSuffixes(I,n);j&&n[`defaultValue${this.options.pluralSeparator}zero`]&&q.indexOf(`${this.options.pluralSeparator}zero`)<0&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(R=>{P([I],a+R,n[`defaultValue${R}`]||D)})}):P(z,a,D))}f=this.extendTranslation(f,t,n,h,r),C&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${c}:${a}`),(C||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,S?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(h.res=f,h.usedParams=this.getUsedParamsDetails(n),h):f}extendTranslation(t,n,r,i,s){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Kt(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const f=t.match(this.interpolator.nestingRegexp);d=f&&f.length}let h=r.replace&&!Kt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||i.usedLng,r),u){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;d<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var f=arguments.length,m=new Array(f),p=0;p<f;p++)m[p]=arguments[p];return s&&s[0]===m[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):a.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,c=Kt(o)?[o]:o;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=ade.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,a,o;return Kt(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;i=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Kt(n.count),m=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(Kt(n.context)||typeof n.context=="number")&&n.context!=="",x=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(v=>{this.isValidLookup(r)||(o=v,!AG[`${x[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(AG[`${x[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${x.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(g=>{if(this.isValidLookup(r))return;a=g;const y=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,d,g,v,n);else{let S;f&&(S=this.pluralResolver.getSuffix(g,n.count,n));const C=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(y.push(d+S),n.ordinal&&S.indexOf(k)===0&&y.push(d+S.replace(k,this.options.pluralSeparator)),m&&y.push(d+C)),p){const _=`${d}${this.options.contextSeparator}${n.context}`;y.push(_),f&&(y.push(_+S),n.ordinal&&S.indexOf(k)===0&&y.push(_+S.replace(k,this.options.pluralSeparator)),m&&y.push(_+C))}}let w;for(;w=y.pop();)this.isValidLookup(r)||(s=w,r=this.getResource(g,v,w,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Kt(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const zj=e=>e.charAt(0).toUpperCase()+e.slice(1);class MG{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ac.create("languageUtils")}getScriptPartFromCode(t){if(t=U5(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=U5(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Kt(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=zj(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=zj(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=zj(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Kt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Kt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Kt(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}let Lmt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Pmt={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const Imt=["v1","v2","v3"],Fmt=["v4"],RG={zero:0,one:1,two:2,few:3,many:4,other:5},Bmt=()=>{const e={};return Lmt.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Pmt[t.fc]}})}),e};class zmt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ac.create("pluralResolver"),(!this.options.compatibilityJSON||Fmt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Bmt(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=U5(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!t.match(/-|_/))return;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,n)}return this.pluralRulesCache[s]=a,a}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};
vendor: 1,299 bytes, line 1691
1691return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>RG[i]-RG[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}
vendor: 24,848 bytes, line 1691
1691shouldUseIntlApi(){return!Imt.includes(this.options.compatibilityJSON)}}const OG=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Emt(e,t,n);return!s&&i&&Kt(n)&&(s=d8(e,n,r),s===void 0&&(s=d8(t,n,r))),s},$j=e=>e.replace(/\$/g,"$$$$");class $mt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ac.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:x,nestingOptionsSeparator:v,maxReplaces:g,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:Nmt,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Wp(s):a||"{{",this.suffix=o?Wp(o):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?Wp(f):m||Wp("$t("),this.nestingSuffix=p?Wp(p):x||Wp(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=g||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,a,o;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=OG(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...i,...n,interpolationkey:m}):g}const p=m.split(this.formatSeparator),x=p.shift().trim(),v=p.join(this.formatSeparator).trim();return this.format(OG(n,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...i,...n,interpolationkey:x})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>$j(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?$j(this.escape(m)):$j(m)}].forEach(m=>{for(o=0;s=m.regex.exec(t);){const p=s[1].trim();if(a=u(p),a===void 0)if(typeof d=="function"){const v=d(t,s,i);a=Kt(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))a="";else if(h){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),a="";else!Kt(a)&&!this.useRawValueToEscape&&(a=_G(a));const x=m.safeValue(a);if(t=t.replace(s[0],x),h?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a;const o=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const h=c.split(new RegExp(`${d}[ ]*{`));let f=`{${h[1]}`;c=h[0],f=this.interpolate(f,a);const m=f.match(/'/g),p=f.match(/"/g);(m&&m.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,x),`${c}${d}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];a={...r},a=a.replace&&!Kt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=d.shift(),c=d,u=!0}if(s=n(o.call(this,i[1].trim(),a),a),s&&i[0]===t&&!Kt(s))return s;Kt(s)||(s=_G(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=c.reduce((d,h)=>this.format(d,h,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const Umt=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=o.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Yp=e=>{const t={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=r+JSON.stringify(s);let o=t[a];return o||(o=e(U5(r),i),t[a]=o),o(n)}};class Vmt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ac.create("formatter"),this.options=t,this.formats={number:Yp((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:Yp((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:Yp((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:Yp((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:Yp((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Yp(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){const o=s.findIndex(c=>c.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,c)=>{const{formatName:u,formatOptions:d}=Umt(c);if(this.formats[u]){let h=o;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=f.locale||f.lng||i.locale||i.lng||r;h=this.formats[u](o,m,{...d,...i,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${u}`);return o},t)}}const Hmt=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class qmt extends m_{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ac.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},a={},o={},c={};return t.forEach(u=>{let d=!0;n.forEach(h=>{const f=`${u}|${h}`;!r.reload&&this.store.hasResourceBundle(u,h)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,d=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),c[h]===void 0&&(c[h]=!0)))}),d||(o[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const i=t.split("|"),s=i[0],a=i[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(c=>{Tmt(c.loaded,[s],a),Hmt(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{o[u]||(o[u]={});const d=c.loaded[u];d.length&&d.forEach(h=>{o[u][h]===void 0&&(o[u][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,s*2,a)},s);return}a(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return c(t,n,o)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Kt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Kt(n)&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,o),this.loaded(t,a,o)})}saveMissing(t,n,r,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,i,c):d=u(t,n,r,i),d&&typeof d.then=="function"?d.then(h=>o(null,h)).catch(o):o(null,d)}catch(d){o(d)}else u(t,n,r,i,o,c)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const DG=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Kt(e[1])&&(t.defaultValue=e[1]),Kt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),LG=e=>(Kt(e.ns)&&(e.ns=[e.ns]),Kt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Kt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),AS=()=>{},Gmt=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class vv extends m_{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=LG(t),this.services={},this.logger=ac,this.modules={external:[]},Gmt(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Kt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=DG();this.options={...i,...this.options,...LG(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?ac.init(s(this.modules.logger),this.options):ac.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=Vmt);const h=new MG(this.options);this.store=new NG(this.options.resources,this.options);const f=this.services;f.logger=ac,f.resourceStore=this.store,f.languageUtils=h,f.pluralResolver=new zmt(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(d),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new $mt(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new qmt(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var p=arguments.length,x=new Array(p>1?p-1:0),v=1;v<p;v++)x[v-1]=arguments[v];t.emit(m,...x)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new H5(this.services,this.options),this.translator.on("*",function(m){for(var p=arguments.length,x=new Array(p>1?p-1:0),v=1;v<p;v++)x[v-1]=arguments[v];t.emit(m,...x)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=AS),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=t1(),u=()=>{const d=(h,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(f),r(h,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:AS;const i=Kt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(s,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(o)})}else r(null)}reloadResources(t,n,r){const i=t1();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=AS),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&ade.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=t1();this.emit("languageChanging",t);const s=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},o=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=Kt(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{a(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,n,r){var i=this;const s=function(a,o){let c;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),h=2;h<u;h++)d[h-2]=arguments[h];c=i.options.overloadTranslationOptionHandler([a,o].concat(d))}else c={...o};c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||s.keyPrefix);const f=i.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(a)?m=a.map(p=>`${c.keyPrefix}${f}${p}`):m=c.keyPrefix?`${c.keyPrefix}${f}${a}`:a,i.t(m,c)};return Kt(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,c)=>{const u=this.services.backendConnector.state[`${o}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(s,t)))}loadNamespaces(t,n){const r=t1();return this.options.ns?(Kt(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=t1();Kt(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new MG(DG());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new vv(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:AS;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new vv(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new NG(this.store.data,i),s.services.resourceStore=s.store),s.translator=new H5(s.services,i),s.translator.on("*",function(o){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];s.emit(o,...u)}),s.init(i,n),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Si=vv.createInstance();Si.createInstance=vv.createInstance;Si.createInstance;Si.dir;Si.init;Si.loadResources;Si.reloadResources;Si.use;Si.changeLanguage;Si.getFixedT;Si.t;Si.exists;Si.setDefaultNamespace;Si.hasLoadedNamespace;Si.loadNamespaces;Si.loadLanguages;function Wmt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wv(e){"@babel/helpers - typeof";return wv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wv(e)}function Ymt(e,t){if(wv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kmt(e){var t=Ymt(e,"string");return wv(t)=="symbol"?t:t+""}function Xmt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kmt(r.key),r)}}function Qmt(e,t,n){return t&&Xmt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ode=[],Zmt=ode.forEach,Jmt=ode.slice;
vendor: 5,954 bytes, line 1691
1691function ept(e){return Zmt.call(Jmt.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var PG=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,tpt=function(t,n,r){var i=r||{};i.path=i.path||"/";var s=encodeURIComponent(n),a="".concat(t,"=").concat(s);if(i.maxAge>0){var o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(i.domain){if(!PG.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!PG.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var c=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(c){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},IG={create:function(t,n,r,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),i&&(s.domain=i),document.cookie=tpt(t,encodeURIComponent(n),s)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var s=r[i];s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(n)===0)return s.substring(n.length,s.length)}return null},remove:function(t){this.create(t,"",-1)}},npt={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=IG.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&IG.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},rpt={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),s=i.split("&"),a=0;a<s.length;a++){var o=s[a].indexOf("=");if(o>0){var c=s[a].substring(0,o);c===t.lookupQuerystring&&(n=s[a].substring(o+1))}}}return n}},n1=null,FG=function(){if(n1!==null)return n1;try{n1=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{n1=!1}return n1},ipt={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&FG()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&FG()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},r1=null,BG=function(){if(r1!==null)return r1;try{r1=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{r1=!1}return r1},spt={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&BG()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&BG()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},apt={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},opt={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},lpt={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},cpt={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},lde=!1;try{document.cookie,lde=!0}catch{}var cde=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];lde||cde.splice(1,1);function upt(){return{order:cde,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var ude=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wmt(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Qmt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=ept(r,this.options||{},upt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(s){return s.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(npt),this.addDetector(rpt),this.addDetector(ipt),this.addDetector(spt),this.addDetector(apt),this.addDetector(opt),this.addDetector(lpt),this.addDetector(cpt)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];
1691return n.forEach(function(s){if(r.detectors[s]){var a=r.detectors[s].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),i=i.map(function(s){return r.options.convertDetectedLanguage(s)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(s){i.detectors[s]&&i.detectors[s].cacheUserLanguage(n,i.options)}))}}])}();ude.type="languageDetector";function dpt(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=hpt(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 1692In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{a||n.return==null||n.return()}finally{if(o)throw s}}}}function hpt(e,t){if(e){if(typeof e=="string")return zG(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zG(e,t):void 0}}function zG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h8(e){"@babel/helpers - typeof";return h8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h8(e)}var dde=["__proto__","constructor","prototype"];function hde(e){return!(typeof e!="string"||e.length===0||e.length>128||dde.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function fde(e){return!(!hde(e)||e.indexOf("/")>-1)}function fpt(e){return hde(e)}var mpt={lng:fde,ns:fpt};function MS(e){return typeof e!="string"?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function ppt(e){if(typeof e!="string"||e.length===0)return e;try{var t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function mde(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":h8(XMLHttpRequest))==="object"}function gpt(e){return!!e&&typeof e.then=="function"}function xpt(e){return gpt(e)?e:Promise.resolve(e)}var ypt=/\{\{(.+?)\}\}/g;function $G(e,t){var n=!1,r=e.replace(ypt,function(i,s){var a=s.trim();if(dde.indexOf(a)>-1)return i;var o=t[a];if(o==null)return i;var c=mpt[a]||fde,u=String(o).split("+"),d=dpt(u),h;try{for(d.s();!(h=d.n()).done;){var f=h.value;if(!c(f))return n=!0,i}}catch(m){d.e(m)}finally{d.f()}return u.join("+")});return n?null:r}function UG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UG(Object(n),!0).forEach(function(r){bpt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bpt(e,t,n){return(t=vpt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vpt(e){var t=wpt(e,"string");return sp(t)=="symbol"?t:t+""}function wpt(e,t){if(sp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sp(e){"@babel/helpers - typeof";return sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sp(e)}var nf=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?nf=global.fetch:typeof window<"u"&&window.fetch&&(nf=window.fetch);var Sv;mde()&&(typeof global<"u"&&global.XMLHttpRequest?Sv=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Sv=window.XMLHttpRequest));var q5;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?q5=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(q5=window.ActiveXObject));typeof nf!="function"&&(nf=void 0);if(!nf&&!Sv&&!q5)try{_r(()=>import("./browser-ponyfill-CVcBNgHj.js").then(e=>e.b),[]).then(function(e){nf=e.default}).catch(function(){})}catch{}var pde=["__proto__","constructor","prototype"],f8=function(t,n){if(n&&sp(n)==="object"){for(var r="",i=0,s=Object.keys(n);i<s.length;i++){var a=s[i];pde.indexOf(a)>
vendor: 6,449 bytes, line 1692
1692-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},HG=function(t,n,r,i){var s=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(u){r(null,{status:c.status,data:u})}).catch(r)};if(i){var a=i(t,n);if(a instanceof Promise){a.then(s).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(s).catch(r):nf(t,n).then(s).catch(r)},Spt=function(t,n,r,i){t.queryStringParams&&(n=f8(n,t.queryStringParams));var s=VG({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,o=VG({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},t._omitFetchOptions?{}:a),c=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{HG(n,o,i,c)}catch(u){if(!a||Object.keys(a).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(a).forEach(function(d){delete o[d]}),HG(n,o,i,c),t._omitFetchOptions=!0}catch(d){i(d)}}},Cpt=function(t,n,r,i){r&&sp(r)==="object"&&(r=f8("",r).slice(1)),t.queryStringParams&&(n=f8(n,t.queryStringParams));try{var s=Sv?new Sv:new q5("MSXML2.XMLHTTP.3.0");s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var o=0,c=Object.keys(a);o<c.length;o++){var u=c[o];pde.indexOf(u)>-1||s.setRequestHeader(u,a[u])}s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(d){console&&console.log(d)}},kpt=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},nf&&n.indexOf("file:")!==0)return Spt(t,n,r,i);if(mde()||typeof ActiveXObject=="function")return Cpt(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function ux(e){"@babel/helpers - typeof";return ux=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ux(e)}function qG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qG(Object(n),!0).forEach(function(r){gde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _pt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tpt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xde(r.key),r)}}function Ept(e,t,n){return t&&Tpt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gde(e,t,n){return(t=xde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xde(e){var t=jpt(e,"string");return ux(t)=="symbol"?t:t+""}function jpt(e,t){if(ux(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ux(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Npt=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return gde({},r,i||"")},parseLoadPayload:function(n,r){},request:kpt,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},yde=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_pt(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Ept(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Uj(Uj(Uj({},Npt()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);ux(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,a){var o=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=xpt(c),c.then(function(u){if(!u)return a(null,{});var d=$G(u,{lng:n.join("+"),ns:i.join("+")});if(d==null){var h=n.map(MS).join(", "),f=i.map(MS).join(", ");return a(new Error("i18next-http-backend: unsafe lng/ns value â refusing to build request URL for languages=["+h+"] namespaces=["+f+"]"),!1)}o.loadUrl(d,a,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var a=this,o=typeof i=="string"?[i]:i,c=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(o,c),d=MS(ppt(n));this.options.request(this.options,n,u,function(h,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+d+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+d+"; status code: "+f.status,!1);if(!f&&h&&h.message){var m=h.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(g){return m.indexOf(g)>-1});if(p)return r("failed loading "+d+": "+MS(h.message),!0)}if(h)return r(h,!1);var x,v;
1692try{typeof f.data=="string"?x=a.options.parse(f.data,i,s):x=f.data}catch{v="failed parsing "+d+" to json"}if(v)return r(v,!1);r(null,x)})}},{key:"create",value:function(n,r,i,s,a){var o=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,s),u=0,d=[],h=[];n.forEach(function(f){var m=o.options.addPath;typeof o.options.addPath=="function"&&(m=o.options.addPath(f,r));var p=$G(m,{lng:f,ns:r});if(p==null){u+=1,a&&u===n.length&&a(d,h);return}o.options.request(o.options,p,c,function(x,v){u+=1,d.push(x),h.push(v),u===n.length&&typeof a=="function"&&a(d,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,a=r.logger,o=i.language;if(!(o&&o.toLowerCase()==="cimode")){var c=[],u=function(h){var f=s.toResolveHierarchy(h);f.forEach(function(m){c.indexOf(m)<0&&c.push(m)})};u(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return u(d)}),c.forEach(function(d){n.allOptions.ns.forEach(function(h){i.read(d,h,"read",null,null,function(f,m){f&&a.warn("loading namespace ".concat(h," for language ").concat(d," failed"),f),!f&&m&&a.log("loaded namespace ".concat(h," for language ").concat(d),m),i.loaded("".concat(d,"|").concat(h),f,m)})})})}}}])}();yde.type="backend";const GG={support:{faqs:{categories:{account:{items:[{q:"How do I update my profile?",a:"Click your avatar in the top-right corner and choose Settings to update your personal information and preferences."},{q:"How do refunds work?",a:'You can request a full refund within 14 days of purchase, as long as less than 20% of the course or programme is complete. See our refund policy at www.ciai.ai/legal/refunds, and ask through the contact page there (choose "Refund request").'}]}}}},settings:{profile:{ageTooYoung:"CIAI programmes are for adults (18+)."}},me:{stats:{due:{label:"Ready to review",ctaAriaLabel:"Start a quick refresher â {{count}} item ready",ctaAriaLabel_other:"Start a quick refresher â {{count}} items ready"}},mastery:{header:"What you've learned",gridAria:"What you've learned, by skill"}},"card-info":{stats:{due:{ariaLabel:"About Ready to review",title:"Ready to review",purpose:"Things you've already learned that are ready for a quick refresher right now.",calculation:"Each time you get one right, we wait a little longer before showing it again; miss it and it comes back sooner. An item is ready once enough time has passed."}},mastery:{ariaLabel:"About what you've learned",title:"What you've learned"},todaysAgenda:{purpose:"The set of items you've planned for today: scheduled lessons, quick refreshers that are ready, and any reminders you've set."}},practice:{dueReviews:{hint:"Items waiting for a quick refresher"},weaknesses:{mastery:"What you've learned",colMastery:"What you've learned"}}};function Apt(e,t="en"){if(!e||typeof e!="string")return t;const n=e.split("@")[0].split(".")[0].replace(/_/g,"-").trim();if(!n||n.toUpperCase()==="C"||n.toUpperCase()==="POSIX")return t;try{const[r]=Intl.getCanonicalLocales(n);return r??t}catch{return t}}const Vj={},Mpt=["common","navigation","auth","me","lesson","lcp","interview","career","courses","notes","marketplace","checkout","orders","calendar","practice","settings","settings-invoices","settings-security","support","help","assistant","certificates","card-info","course-overview","personal-layer","library","dashboard-focus"];function Rpt(){const e=Vj==null?void 0:Vj.VITE_TRANSLATIONS_BASE_URL;return e?`${e}/{{lng}}/{{ns}}.json`:"/locales/{{lng}}/{{ns}}.json"}Si.use(yde).use(ude).use(Q9e).init({fallbackLng:"en",ns:[...Mpt],defaultNS:"common",backend:{loadPath:Rpt(),queryStringParams:void 0},detection:{order:["localStorage","navigator"],lookupLocalStorage:"i18n_language",caches:["localStorage"],convertDetectedLanguage:e=>Apt(e)},interpolation:{escapeValue:!1},react:{useSuspense:!0}});if(at.key==="ciai"){const e=()=>{for(const t of Object.keys(GG))Si.hasResourceBundle("en",t)&&Si.addResourceBundle("en",t,GG[t],!0,!0)};Si.on("loaded",e),Si.on("initialized",e),e()}function Opt(e){if(typeof document>"u")return;const t=e,n=document.documentElement;t==="dark"?n.classList.add("dark"):n.classList.remove("dark"),n.dataset.themePreference=e}Opt("light");Tet();Eet();tL(e8());const bde=document.getElementById("root");
1692if(!bde)throw new Error("Root element not found");rpe.createRoot(bde).render(l.jsx(Y.StrictMode,{children:l.jsx(b.Suspense,{fallback:l.jsx("div",{className:"flex h-screen items-center justify-center",children:l.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-ple-primary border-t-transparent"})}),children:l.jsx(Cmt,{})})}));export{x$e as $,x0t as A,Uie as B,YDe as C,hBe as D,v9 as E,ib as F,eb as G,kVe as H,CVe as I,yVe as J,P3e as K,d0t as L,NVe as M,P$e as N,l_e as O,xO as P,Ete as Q,Sa as R,uo as S,sw as T,Ate as U,s0t as V,zDe as W,RVe as X,n0t as Y,Mse as Z,A9 as _,SVe as a,GFe as a$,d$e as a0,wc as a1,yO as a2,Wd as a3,Hb as a4,QB as a5,p_e as a6,WU as a7,h0t as a8,v$e as a9,e0t as aA,FB as aB,IB as aC,t0t as aD,Jpt as aE,Kpt as aF,Xpt as aG,Zpt as aH,i0t as aI,r0t as aJ,qt as aK,vc as aL,pw as aM,Xx as aN,Q4 as aO,KBe as aP,Lze as aQ,mw as aR,J4 as aS,VBe as aT,nse as aU,WFe as aV,YFe as aW,Bf as aX,LU as aY,KFe as aZ,S9 as a_,D$e as aa,wp as ab,uze as ac,rze as ad,dze as ae,hze as af,cse as ag,_3 as ah,N3 as ai,e5 as aj,HFe as ak,w9 as al,dse as am,lse as an,UBe as ao,FBe as ap,ize as aq,mze as ar,gw as as,y0t as at,_Ve as au,fw as av,jt as aw,Ot as ax,hO as ay,Qpt as az,vVe as b,ZFe as b0,Qx as b1,mf as b2,AU as b3,C9 as b4,ise as b5,h7 as b6,rBe as b7,RE as b8,G$e as b9,IO as ba,PDe as bb,fb as c,bVe as d,L9 as e,_o as f,dx as g,Jse as h,Ys as i,l as j,n5 as k,Rt as l,Qg as m,Nie as n,E9 as o,$$e as p,O3e as q,b as r,wVe as s,mVe as t,I0t as u,O$e as v,B$e as w,T$e as x,vse as y,s$e as z};
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.